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

:root {
  --bg: #0a0a0f;
  --surface: #0f0f18;
  --surface2: #141420;
  --border: #1e1e2e;
  --border-light: #252538;
  --text: #e2e2f0;
  --text-muted: #7878a0;
  --text-dim: #3a3a58;
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --accent-glow: rgba(124,58,237,0.25);
  --green: #10b981;
  --green-light: #6ee7b7;
  --header-h: 64px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
p { line-height: 1.8; color: var(--text-muted); }
strong { color: var(--text); font-weight: 600; }
.mono { font-family: 'JetBrains Mono', monospace; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 40px; }

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent-light);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  display: block;
}
.section-label::before { content: '// '; opacity: 0.5; }

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 48px;
  line-height: 1.2;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 12px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover {
  background: #6d28d9;
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(124,58,237,0.4);
}

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 12px 28px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, transform 0.15s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent-light); transform: translateY(-2px); }

/* ── Header ── */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 900;
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo-dot { color: var(--accent-light); }

#nav ul { display: flex; align-items: center; gap: 4px; list-style: none; }
#nav a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
#nav a:hover { color: var(--text); background: var(--surface2); }
#nav a.nav-cta {
  background: var(--surface2);
  color: var(--accent-light);
  border: 1px solid var(--border-light);
}
#nav a.nav-cta:hover { border-color: var(--accent-light); background: rgba(124,58,237,0.1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--text); border-radius: 2px; }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 480px;
  align-items: center;
  gap: 60px;
  padding: calc(var(--header-h) + 80px) 10% 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124,58,237,0.12) 0%, transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 10%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(16,185,129,0.06) 0%, transparent 65%);
  pointer-events: none;
}

.hero-tag {
  font-size: 0.72rem;
  color: var(--green-light);
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 20px;
  padding: 4px 12px;
  display: inline-block;
  margin-bottom: 24px;
}

.hero-content h1 {
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 12px;
}

.hero-role {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-weight: 400;
}
.hero-role .sep { color: var(--text-dim); margin: 0 8px; }

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.85;
}

.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* Code window */
.hero-code { position: relative; z-index: 1; }

.code-window {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(124,58,237,0.1);
}

.code-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.code-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-left: 8px;
}

.code-body {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.8;
  padding: 24px;
  overflow-x: auto;
  white-space: pre;
}

.c-keyword { color: #c792ea; }
.c-var { color: #82aaff; }
.c-prop { color: #7fdbca; }
.c-str { color: #c3e88d; }
.c-bool { color: #f78c6c; }

/* ── About ── */
.about {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 80px;
  align-items: start;
}

.about-text .section-label { margin-bottom: 14px; }
.about-text h2 {
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 24px;
}
.about-text p { margin-bottom: 16px; font-size: 0.95rem; }
.about-text p:last-child { margin-bottom: 0; }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--accent-light); }
.stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--accent-light);
  line-height: 1;
}
.stat-label { font-size: 0.72rem; color: var(--text-muted); line-height: 1.3; }

/* ── Skills ── */
.skills {
  padding: 100px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.skill-group {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  transition: border-color 0.2s;
}
.skill-group:hover { border-color: var(--border-light); }

.skill-group h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.skill-group h3 svg { color: var(--accent-light); flex-shrink: 0; }

.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 10px;
  transition: color 0.2s, border-color 0.2s;
}
.tag.highlight {
  color: var(--accent-light);
  border-color: rgba(124,58,237,0.3);
  background: rgba(124,58,237,0.08);
}

/* ── Experience ── */
.experience {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.timeline-item { position: relative; }

.timeline-dot {
  position: absolute;
  left: -35px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-light);
  border: 2px solid var(--bg);
  transition: background 0.2s;
}
.timeline-item.current .timeline-dot {
  background: var(--accent-light);
  box-shadow: 0 0 10px var(--accent-glow);
}
.timeline-item:hover .timeline-dot { background: var(--accent-light); }

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 28px;
  transition: border-color 0.2s;
}
.timeline-item:hover .timeline-content { border-color: var(--border-light); }
.timeline-item.current .timeline-content { border-color: rgba(124,58,237,0.25); }

.timeline-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}
.timeline-company {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent-light);
  font-weight: 500;
}
.timeline-period {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}
.timeline-item.current .timeline-period {
  color: var(--green-light);
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  padding: 2px 8px;
  border-radius: 20px;
}

.timeline-role {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}
.timeline-desc { font-size: 0.88rem; margin-bottom: 16px; }
.timeline-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.timeline-tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-dim);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 3px 8px;
}

/* ── What I Build ── */
.build-section {
  padding: 100px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.build-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.build-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  transition: border-color 0.3s, transform 0.3s;
}
.build-card:hover { border-color: var(--accent-light); transform: translateY(-4px); }

.build-icon {
  width: 44px;
  height: 44px;
  color: var(--accent-light);
  margin-bottom: 20px;
}
.build-icon svg { width: 100%; height: 100%; }

.build-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.build-card p { font-size: 0.85rem; line-height: 1.75; }

/* ── Contact ── */
.contact {
  padding: 120px 0;
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124,58,237,0.08) 0%, transparent 65%);
  pointer-events: none;
}

.contact-inner {
  max-width: 560px;
  position: relative;
  z-index: 1;
}
.contact-inner h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}
.contact-inner > p { font-size: 0.95rem; margin-bottom: 36px; }

.contact-links { display: flex; flex-direction: column; gap: 14px; }

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 20px;
  background: var(--surface);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
  max-width: 360px;
}
.contact-link svg { color: var(--accent-light); flex-shrink: 0; }
.contact-link:hover { color: var(--text); border-color: var(--accent-light); transform: translateX(4px); }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 40px;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-inner .mono { font-size: 0.78rem; color: var(--text-dim); }
.footer-location { font-size: 0.78rem; color: var(--text-dim); }

/* ── Mobile ── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: calc(var(--header-h) + 60px) 40px 60px; }
  .hero-code { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-stats { grid-template-columns: repeat(4, 1fr); }
  .skills-grid { grid-template-columns: 1fr; }
  .build-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .header-inner { padding: 0 24px; }
  .nav-toggle { display: flex; }
  footer { padding: 24px; }

  #nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
  }
  #nav.open { display: block; }
  #nav ul { flex-direction: column; gap: 2px; }
  #nav a { display: block; padding: 10px 14px; }

  .hero { padding: calc(var(--header-h) + 40px) 24px 60px; }
  .hero-btns { flex-direction: column; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .timeline-meta { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}
