/* ===== Tron Legacy Green Theme ===== */
:root {
  --bg-dark: #000301;
  --bg-surface: #001205;
  --bg-card: rgba(0, 15, 4, 0.75);
  --accent-1: #00ff41; /* Matrix/Tron Green */
  --accent-2: #00cc33;
  --accent-3: #ccffcc; /* Bright core */
  --text-primary: #e0ffe0;
  --text-secondary: #88cc99;
  --text-muted: #337744;
  --border: rgba(0, 255, 65, 0.25);
  --glow-neon: rgba(0, 255, 65, 0.6);
  --glow-bright: rgba(0, 255, 65, 0.9);
  --radius: 0px; /* Sharp technical edges */
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text-secondary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent-1); color: #000; text-shadow: none; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Typography */
h1, h2, h3, h4 { text-transform: uppercase; letter-spacing: 2px; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); border-left: 1px solid var(--border); }
::-webkit-scrollbar-thumb { background: var(--accent-1); box-shadow: inset 0 0 10px #000; }

/* Grid Background */
.grid-container {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; perspective: 1000px;
}
.grid-plane {
  position: absolute; width: 200%; height: 200%; left: -50%;
  background-image: 
    linear-gradient(var(--border) 2px, transparent 2px),
    linear-gradient(90deg, var(--border) 2px, transparent 2px);
  background-size: 60px 60px;
  transform-origin: center center;
}
.grid-bottom {
  bottom: -100%; transform: rotateX(75deg); animation: gridMove 2s linear infinite;
  mask-image: linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,0) 60%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,0) 60%);
}
.grid-top {
  top: -100%; transform: rotateX(-75deg); animation: gridMoveTop 2s linear infinite;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0) 60%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0) 60%);
}

@keyframes gridMove {
  0% { background-position: 0 0; }
  100% { background-position: 0 60px; }
}
@keyframes gridMoveTop {
  0% { background-position: 0 0; }
  100% { background-position: 0 -60px; }
}

.ambient-glow {
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, transparent 30%, var(--bg-dark) 100%);
  z-index: 1;
}

#particle-canvas {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.8;
}
.scanlines {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.15) 50%, rgba(0,0,0,0.15));
  background-size: 100% 4px;
}

/* Navbar */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(0, 5, 1, 0.85); backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--accent-1);
  box-shadow: 0 0 15px var(--glow-neon);
  transition: all 0.3s;
}
.navbar.scrolled { background: rgba(0, 5, 1, 0.98); box-shadow: 0 0 25px var(--glow-neon); }
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 72px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-weight: 700; font-size: 1.4rem;
  color: var(--accent-1); text-shadow: 0 0 10px var(--glow-neon);
}
.nav-logo span { color: var(--text-primary); }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 0.85rem; font-weight: 600; font-family: var(--font-mono); text-transform: uppercase;
  color: var(--text-secondary); position: relative; transition: color 0.3s; letter-spacing: 1px;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -6px; left: 0; width: 0; height: 2px;
  background: var(--accent-1); transition: width 0.3s; box-shadow: 0 0 8px var(--accent-1);
}
.nav-links a:hover, .nav-links a.active { color: var(--accent-1); text-shadow: 0 0 5px var(--glow-neon); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-resume-btn {
  padding: 8px 20px; font-size: 0.85rem; font-weight: 600; font-family: var(--font-mono);
  background: transparent; border: 1px solid var(--accent-1);
  color: var(--accent-1); text-transform: uppercase; letter-spacing: 1px;
  transition: all 0.3s; position: relative; overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0,255,65,0.2), 0 0 10px rgba(0,255,65,0.2);
}
.nav-resume-btn:hover { background: var(--accent-1); color: #000; box-shadow: 0 0 20px var(--glow-neon); }

/* Mobile Menu */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span { width: 24px; height: 2px; background: var(--accent-1); transition: 0.3s; box-shadow: 0 0 5px var(--accent-1); }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.mobile-menu {
  display: none; position: fixed; top: 72px; left: 0; right: 0;
  background: rgba(0,5,1,0.98); backdrop-filter: blur(20px);
  padding: 24px; border-bottom: 2px solid var(--accent-1); box-shadow: 0 10px 20px rgba(0,255,65,0.2);
  flex-direction: column; gap: 16px; font-family: var(--font-mono); text-transform: uppercase; font-weight: bold;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.mobile-menu a:hover { color: var(--accent-1); text-shadow: 0 0 8px var(--glow-neon); }

/* Sections */
.section { position: relative; z-index: 2; padding: 100px 24px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.9rem; font-weight: 700;
  color: var(--accent-1); text-transform: uppercase; letter-spacing: 4px;
  margin-bottom: 12px; text-shadow: 0 0 8px var(--glow-neon);
}
.section-label::before { content: '>'; color: var(--accent-1); font-weight: bold; }
.section-title {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 800;
  color: var(--text-primary); margin-bottom: 20px; line-height: 1.2;
  text-shadow: 0 0 15px rgba(224,255,224,0.3);
}

/* Hero */
.hero { min-height: 100vh; display: flex; align-items: center; position: relative; z-index: 2; padding-top: 72px; }
.hero-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px; width: 100%;
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border: 1px solid var(--accent-1);
  font-size: 0.8rem; font-weight: 600; font-family: var(--font-mono);
  background: rgba(0, 255, 65, 0.1); color: var(--accent-1); margin-bottom: 20px;
  box-shadow: inset 0 0 10px rgba(0,255,65,0.2); text-transform: uppercase; letter-spacing: 1px;
}
.hero-badge .dot { width: 8px; height: 8px; background: var(--accent-1); animation: blink 1s step-end infinite; box-shadow: 0 0 8px var(--accent-1); }
@keyframes blink { 50% { opacity: 0; } }

.hero-name {
  font-size: clamp(3rem, 6vw, 5rem); font-weight: 800; line-height: 1.1;
  color: var(--text-primary); margin-bottom: 12px; text-shadow: 0 0 20px var(--glow-neon);
}
.hero-name .gradient { color: var(--accent-1); }
.hero-role {
  font-size: 1.4rem; color: var(--accent-1); margin-bottom: 24px;
  font-family: var(--font-mono); font-weight: 600; text-transform: uppercase; letter-spacing: 2px;
  text-shadow: 0 0 10px var(--glow-neon);
}
.hero-desc { font-size: 1.1rem; color: var(--text-secondary); max-width: 520px; margin-bottom: 36px; line-height: 1.8; }
.hero-actions { display: flex; gap: 20px; flex-wrap: wrap; }
.btn-primary {
  padding: 14px 36px; font-weight: 700; font-size: 0.95rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 1px;
  background: var(--accent-1); color: #000; border: 2px solid var(--accent-1);
  transition: all 0.3s; cursor: pointer; box-shadow: 0 0 15px var(--glow-neon);
}
.btn-primary:hover { background: transparent; color: var(--accent-1); box-shadow: 0 0 25px var(--glow-bright), inset 0 0 15px var(--glow-neon); }
.btn-outline {
  padding: 14px 36px; font-weight: 700; font-size: 0.95rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 1px;
  background: transparent; color: var(--text-primary); border: 2px solid var(--border);
  transition: all 0.3s; cursor: pointer;
}
.btn-outline:hover { border-color: var(--accent-1); color: var(--accent-1); box-shadow: inset 0 0 15px rgba(0,255,65,0.2), 0 0 15px rgba(0,255,65,0.2); }

/* Hero Terminal */
.hero-code-card {
  background: rgba(0, 10, 2, 0.85); border: 1px solid var(--accent-1);
  box-shadow: 0 0 30px rgba(0,255,65,0.2), inset 0 0 20px rgba(0,255,65,0.1);
  transition: transform 0.4s; position: relative;
}
.hero-code-card::after {
  content: ''; position: absolute; top: -1px; left: -1px; right: -1px; bottom: -1px;
  border: 1px solid var(--accent-1); z-index: -1; animation: pulseBorder 2s infinite;
}
@keyframes pulseBorder { 0%, 100% { opacity: 0.5; transform: scale(1); } 50% { opacity: 0; transform: scale(1.02); } }
.hero-code-card:hover { transform: translateY(-4px) scale(1.02); }
.code-header {
  display: flex; align-items: center; gap: 8px; padding: 12px 20px;
  border-bottom: 1px solid var(--border); background: rgba(0,255,65,0.1);
}
.code-title { color: var(--accent-1); font-family: var(--font-mono); font-size: 0.85rem; font-weight: bold; letter-spacing: 1px; }
.code-body { padding: 24px; font-family: var(--font-mono); font-size: 0.9rem; line-height: 2; color: var(--accent-1); }
.code-body .kw { color: #fff; }
.code-body .str { color: var(--text-primary); }
.code-line { display: flex; gap: 16px; }
.code-ln { color: var(--text-muted); user-select: none; min-width: 20px; text-align: right; }

/* Stats Bar */
.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 48px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(0,255,65,0.02); position: relative; z-index: 2;}
.stat-item { text-align: center; border-right: 1px solid var(--border); }
.stat-item:last-child { border-right: none; }
.stat-number { font-size: 2.5rem; font-weight: 800; font-family: var(--font-mono); color: var(--accent-1); text-shadow: 0 0 15px var(--glow-neon); }
.stat-label { font-size: 0.85rem; color: var(--text-primary); margin-top: 4px; text-transform: uppercase; letter-spacing: 2px; }

/* Glass Card */
.glass-card {
  background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--accent-1);
  padding: 32px; backdrop-filter: blur(5px); transition: all 0.3s; position: relative; overflow: hidden;
}
.glass-card:hover {
  transform: translateY(-4px); border-color: var(--accent-1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 20px rgba(0,255,65,0.2);
}

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.skill-category h3 { font-size: 1.1rem; color: var(--text-primary); margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.skill-category h3 .icon { color: var(--accent-1); font-size: 1.4rem; text-shadow: 0 0 10px var(--glow-neon); }
.skill-tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tag {
  padding: 8px 16px; font-size: 0.85rem; font-weight: 600; font-family: var(--font-mono);
  background: transparent; border: 1px solid var(--border);
  color: var(--text-secondary); transition: all 0.3s;
}
.skill-tag:hover { border-color: var(--accent-1); color: var(--accent-1); background: rgba(0,255,65,0.1); box-shadow: 0 0 10px var(--glow-neon); }

/* Timeline */
.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-item::before {
  content: ''; position: absolute; left: -36px; top: 6px; width: 10px; height: 10px;
  background: var(--bg-dark); border: 2px solid var(--accent-1); box-shadow: 0 0 10px var(--glow-neon);
}
.timeline-date { font-family: var(--font-mono); font-size: 0.85rem; font-weight:bold; color: var(--accent-1); margin-bottom: 6px; letter-spacing: 1px; }
.timeline-title { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; text-transform: uppercase; }
.timeline-sub { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 10px; }
.timeline-body { color: var(--text-secondary); font-size: 0.95rem; }
.timeline-body li { position: relative; padding-left: 20px; margin-bottom: 8px; }
.timeline-body li::before { content: '>'; position: absolute; left: 0; color: var(--accent-1); font-family: var(--font-mono); font-weight:bold; }

/* Projects */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.project-card {
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all 0.3s; position: relative; overflow: hidden;
}
.project-card:hover {
  transform: translateY(-6px); border-color: var(--accent-1);
  box-shadow: 0 15px 40px rgba(0,0,0,0.8), 0 0 25px rgba(0,255,65,0.2);
}
.project-banner {
  height: 180px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border);
  background: repeating-linear-gradient(45deg, #001104, #001104 10px, #001a06 10px, #001a06 20px);
}
.project-banner::after { content: ''; position: absolute; inset: 0; background: inset 0 0 30px #000; }
.project-card:hover .project-banner { border-bottom-color: var(--accent-1); }
.project-banner .emoji { font-size: 3.5rem; position: relative; z-index: 1; transition: transform 0.3s; filter: drop-shadow(0 0 10px var(--glow-neon)); }
.project-card:hover .emoji { transform: scale(1.15); }
.project-content { padding: 24px; }
.project-content h3 { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; }
.project-card:hover .project-content h3 { color: var(--accent-1); text-shadow: 0 0 8px var(--glow-neon); }
.project-content p { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.project-tag {
  padding: 4px 10px; font-size: 0.75rem; font-family: var(--font-mono); font-weight: bold;
  background: rgba(0,255,65,0.1); border: 1px solid var(--accent-1);
  color: var(--accent-1); text-transform: uppercase; letter-spacing: 1px;
}

/* Form */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info-card { display: flex; align-items: center; gap: 20px; padding: 24px; background: rgba(0,255,65,0.05); border: 1px solid var(--border); transition: all 0.3s; }
.contact-info-card:hover { border-color: var(--accent-1); box-shadow: 0 0 15px rgba(0,255,65,0.2); }
.contact-icon { font-size: 1.5rem; color: var(--accent-1); text-shadow: 0 0 10px var(--glow-neon); }
.contact-info-card .label { font-size: 0.8rem; font-family: var(--font-mono); color: var(--accent-1); text-transform: uppercase; margin-bottom: 4px; }
.contact-info-card .value { color: var(--text-primary); font-weight: 600; font-size: 1.1rem; }

.form-group label { display: block; font-size: 0.85rem; font-family: var(--font-mono); font-weight: 700; color: var(--accent-1); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.form-group input, .form-group textarea {
  width: 100%; padding: 16px; background: rgba(0,0,0,0.5) !important;
  border: 1px solid var(--border) !important; color: var(--text-primary) !important;
  font-family: var(--font-sans); font-size: 1rem; transition: all 0.3s; outline: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent-1) !important; box-shadow: 0 0 15px rgba(0,255,65,0.3) !important; }

/* Misc */
.highlight { color: var(--text-primary); font-weight: 700; text-shadow: 0 0 5px rgba(255,255,255,0.3); border-bottom: 1px dashed var(--accent-1); }
.footer { border-top: 1px solid var(--accent-1); padding: 30px; text-align: center; color: var(--accent-1); font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase; background: #000; position: relative; z-index: 2; box-shadow: 0 -5px 15px var(--glow-neon);}

/* Responsive */
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-code-card { display: none; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 30px; border: none; }
  .stat-item { border-right: none; }
  .contact-grid { grid-template-columns: 1fr; }
}

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
