:root {
  --bg: #080b0f;
  --bg2: #0d1117;
  --bg3: #111820;
  --accent: #00e676;
  --accent2: #ffffff;
  --text: #e8f5e9;
  --muted: #546e7a;
  --border: rgba(0,230,118,0.12);
  --card: rgba(0,230,118,0.04);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

::selection {
  background: rgba(0, 230, 118, 0.28);
  color: #ffffff;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* SCANLINES */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.14) 2px,
    rgba(0,0,0,0.14) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* MATRIX CANVAS */
#matrix-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.22;
  pointer-events: none;
}

body::after { display: none; }

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 20px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, rgba(8,11,15,0.95), transparent);
  backdrop-filter: blur(8px);
}

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--accent); }

/* SECTIONS */
section { position: relative; z-index: 1; }

/* HERO */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 60px;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,230,118,0.15) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-60%, -50%);
  pointer-events: none;
}

.hero-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-tag::before {
  content: '';
  display: block;
  width: 32px; height: 1px;
  background: var(--accent);
}

.hero-name {
  font-size: clamp(64px, 9vw, 128px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}

.hero-name span { color: var(--accent); }

.hero-terminal {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 52px;
  line-height: 1.8;
}

.hero-terminal .prompt { color: var(--accent); }
.hero-terminal .cursor {
  display: inline-block;
  width: 8px; height: 16px;
  background: var(--accent);
  vertical-align: middle;
  animation: blink 1.1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-cta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 28px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
}

.btn-primary {
  background: var(--accent);
  color: #080b0f;
  font-weight: 600;
}

.btn-primary:hover {
  background: #69ffb0;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* SCROLL INDICATOR */
.scroll-hint {
  position: absolute;
  bottom: 40px; left: 60px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}

.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

/* STATS BAR */
.stats-bar {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 32px 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  z-index: 1;
  position: relative;
}

.stat {
  text-align: center;
}

.stat-num {
  font-size: 42px;
  font-weight: 700;
  color: #00e676;
  line-height: 1;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* SECTION HEADER */
.section-header {
  margin-bottom: 64px;
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  max-width: 80px;
}

.section-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

/* EXPERIENCE */
#experience {
  padding: 120px 60px;
  background: var(--bg);
}

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 72px;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.6s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-dot {
  position: absolute;
  left: -46px; top: 6px;
  width: 12px; height: 12px;
  border: 2px solid var(--accent);
  background: var(--bg);
  border-radius: 50%;
}

.timeline-dot.current {
  background: var(--accent);
  box-shadow: 0 0 16px rgba(0,230,118,0.15);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 16px rgba(0,230,118,0.15); }
  50% { box-shadow: 0 0 28px rgba(0,230,118,0.15); }
}

.job-meta {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.job-period {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.job-industry {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.job-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
}

.job-company {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 20px;
}

.job-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.job-bullets li {
  font-size: 14.5px;
  color: #546e7a;
  line-height: 1.6;
  padding: 4px 8px 4px 20px;
  position: relative;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
}

.job-bullets li:hover {
  background: rgba(0, 230, 118, 0.06);
  color: var(--text);
}

.job-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
}

/* SKILLS */
#skills {
  padding: 120px 60px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.skill-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.skill-card:hover {
  border-color: rgba(0,230,118,0.15);
  transform: translateY(-4px);
}

.skill-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-cat::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text);
  letter-spacing: 0.03em;
  opacity: 0;
  transition: border-color 0.2s;
}

.skill-item.landed { opacity: 1; }

.skill-item i {
  font-size: 16px;
  flex-shrink: 0;
}

.skill-item:hover {
  border-color: rgba(0,230,118,0.15);
}

.skill-clone {
  position: fixed;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(0,230,118,0.15);
  color: var(--text);
  letter-spacing: 0.03em;
  pointer-events: none;
  z-index: 9500;
  box-shadow: 0 0 12px rgba(0,230,118,0.15);
  will-change: transform;
}

.skill-clone i { font-size: 16px; flex-shrink: 0; }

/* PRE-RAIN OVERLAY */
#pre-rain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
}
.pre-rain-drop {
  position: absolute;
  font-size: 22px;
  pointer-events: none;
  line-height: 1;
}

/* PROJECTS */
#projects {
  padding: 120px 60px;
  background: var(--bg);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 28px 28px 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
  cursor: default;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.project-card:hover {
  border-color: rgba(0,230,118,0.15);
  transform: translateY(-5px);
}

.project-card:hover::before { transform: scaleX(1); }

.project-company {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.project-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.project-tagline {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.project-desc {
  font-size: 12.5px;
  color: #546e7a;
  line-height: 1.6;
  text-wrap: pretty;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

.project-card:hover .project-desc {
  max-height: 80px;
  opacity: 1;
  margin-top: 12px;
}

.project-hover-stack {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  transition: max-height 0.45s ease, opacity 0.35s ease, margin-top 0.35s ease;
}

.project-card:hover .project-hover-stack {
  max-height: 110px;
  opacity: 1;
  margin-top: 20px;
}

.stack-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.stack-icon i {
  font-size: 26px;
  transition: transform 0.2s;
}

.stack-icon:hover i { transform: scale(1.15); }

.stack-icon svg { transition: transform 0.2s; }
.stack-icon:hover svg { transform: scale(1.15); }

.stack-icon span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* EDUCATION */
#education {
  padding: 120px 60px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
}

.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.edu-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 36px;
}

.edu-degree {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 8px;
}

.edu-school {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.edu-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.05em;
}

/* CONTACT */
#contact {
  padding: 120px 60px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#contact::before {
  content: '';
  position: absolute;
  width: 800px; height: 400px;
  background: radial-gradient(ellipse, rgba(0,230,118,0.15) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.contact-big {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  line-height: 1.05;
}

.contact-big span { color: var(--accent); }

.contact-sub {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 52px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.contact-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

.contact-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-link:hover { color: var(--accent); }

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

footer span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* REVEAL ANIMATION */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* TWEAKS PANEL */
#tweaks-panel {
  display: none;
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 24px;
  z-index: 10000;
  width: 260px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

#tweaks-panel h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.tweak-row {
  margin-bottom: 16px;
}

.tweak-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.tweak-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tweak-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 5px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.04em;
}

.tweak-btn.active, .tweak-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* MOBILE NAV TOGGLE BUTTON */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--muted);
  transition: transform 0.25s, opacity 0.25s, background 0.25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--accent); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--accent); }

/* MOBILE NAV DRAWER */
.nav-drawer {
  display: none;
  position: fixed;
  top: 64px;
  left: 0; right: 0;
  z-index: 999;
  background: rgba(8,11,15,0.97);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  border-bottom: 1px solid rgba(0,230,118,0.12);
}
.nav-drawer.open { max-height: 360px; }
.nav-drawer ul {
  list-style: none;
  padding: 8px 24px 20px;
  display: flex;
  flex-direction: column;
}
.nav-drawer ul li a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color 0.2s;
}
.nav-drawer ul li:last-child a { border-bottom: none; }
.nav-drawer ul li a:hover { color: var(--accent); }

@media (max-width: 768px) {
  nav { padding: 20px 24px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-drawer { display: block; }
  #hero, #experience, #skills, #projects, #education, #contact { padding-left: 24px; padding-right: 24px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); padding: 24px; gap: 24px; }
  .edu-grid { grid-template-columns: 1fr; }
  footer { padding: 24px; flex-direction: column; gap: 12px; text-align: center; }
}
