:root {
  --bg: #08111f;
  --bg-soft: #0e1a2b;
  --card: #111f33;
  --text: #eaf0f7;
  --muted: #9fb0c5;
  --line: #22344d;
  --accent: #78a7ff;
  --accent-2: #a687ff;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  background: radial-gradient(circle at top right, rgba(120,167,255,.1), transparent 30%), var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.section { padding: 96px 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8,17,31,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 1.4rem; font-weight: 700; }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 24px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.menu-toggle { display: none; background: transparent; border: 0; color: var(--text); font-size: 1.5rem; }

.hero { min-height: 78vh; display: grid; grid-template-columns: 1.35fr .85fr; gap: 54px; align-items: center; }
.eyebrow { font-family: 'JetBrains Mono', monospace; color: var(--accent); letter-spacing: .12em; font-size: .78rem; font-weight: 500; }
.hero h1, .section-heading h2, .contact-card h2 { letter-spacing: -.04em; line-height: 1.05; margin: 14px 0 24px; }
.hero h1 { font-size: clamp(3rem, 6vw, 5.8rem); max-width: 900px; }
.hero h1 span { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; color: transparent; }
.hero-text { max-width: 760px; font-size: 1.15rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.button { padding: 13px 20px; border-radius: 10px; font-weight: 700; border: 1px solid var(--line); }
.button.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.button.secondary { background: transparent; }
.button:hover { transform: translateY(-2px); }
.social-row { display: flex; gap: 20px; margin-top: 26px; color: var(--muted); font-weight: 600; }

.hero-panel { background: linear-gradient(180deg, rgba(17,31,51,.95), rgba(12,24,41,.95)); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.code-label { padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: .78rem; }
.hero-panel pre { margin: 0; padding: 24px; overflow-x: auto; color: #c8daf4; font-family: 'JetBrains Mono', monospace; font-size: .86rem; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.02); }
.metrics article { padding: 28px; border-right: 1px solid var(--line); }
.metrics article:last-child { border-right: 0; }
.metrics strong { display: block; font-size: 2rem; letter-spacing: -.04em; }
.metrics span { color: var(--muted); font-size: .92rem; }

.split-section { display: grid; grid-template-columns: .9fr 1.1fr; gap: 70px; }
.section-heading h2 { font-size: clamp(2.2rem, 4vw, 4rem); max-width: 850px; }
.section-copy { color: var(--muted); font-size: 1.08rem; }
.section-copy p + p { margin-top: 22px; }
.section-intro { color: var(--muted); max-width: 720px; }

.timeline { margin-top: 46px; border-top: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 190px 1fr; gap: 40px; padding: 34px 0; border-bottom: 1px solid var(--line); }
.timeline-date { color: var(--accent); font-family: 'JetBrains Mono', monospace; font-size: .86rem; }
.timeline h3 { margin: 0 0 6px; font-size: 1.35rem; }
.timeline h3 span { color: var(--muted); font-weight: 500; }
.location { margin: 0 0 14px; color: var(--muted); }
.timeline p, .timeline li { color: var(--muted); }
.timeline ul { margin: 12px 0 0; padding-left: 20px; }

.projects-section { background: rgba(255,255,255,.025); border-top: 1px solid rgba(255,255,255,.04); border-bottom: 1px solid rgba(255,255,255,.04); }
.project-grid { margin-top: 42px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.project-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 30px; }
.project-card.featured { grid-column: 1 / -1; padding: 38px; background: linear-gradient(135deg, #14253d, #111d32); }
.project-topline { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.project-number { font-family: 'JetBrains Mono', monospace; color: var(--muted); }
.badge { border: 1px solid rgba(120,167,255,.35); color: var(--accent); background: rgba(120,167,255,.07); border-radius: 999px; padding: 5px 10px; font-size: .72rem; font-weight: 700; }
.badge.muted { color: var(--muted); border-color: var(--line); background: transparent; }
.project-card h3 { font-size: 1.8rem; margin: 28px 0 10px; }
.project-card p { color: var(--muted); }
.project-stats { display: flex; flex-wrap: wrap; gap: 30px; margin: 24px 0; }
.project-stats span { color: var(--muted); }
.project-stats strong { color: var(--text); margin-right: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.tags span { padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.04); color: #c4d2e5; font-size: .82rem; font-family: 'JetBrains Mono', monospace; }
.project-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 24px; font-weight: 700; }
.project-links a { color: var(--accent); }

.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 40px; }
.skill-card { padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.02); }
.skill-card h3 { margin-top: 0; }
.skill-card p { color: var(--muted); }

.credential-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 38px; }
.credential-grid > div { border-top: 1px solid var(--line); padding: 24px 0; }
.credential-type { color: var(--accent); font-family: 'JetBrains Mono', monospace; font-size: .72rem; }
.credential-grid h3 { margin-bottom: 5px; }
.credential-grid p { margin: 0; color: var(--muted); }

.contact-section { padding: 60px 0 110px; }
.contact-card { padding: 58px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(145deg, #13233a, #0c1728); }
.contact-card h2 { font-size: clamp(2.2rem, 4vw, 4.2rem); max-width: 900px; }
.contact-card > p:not(.eyebrow) { max-width: 760px; color: var(--muted); font-size: 1.08rem; }

.footer { min-height: 90px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .hero, .split-section { grid-template-columns: 1fr; }
  .hero { padding-top: 70px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metrics article:nth-child(2) { border-right: 0; }
  .metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .project-grid, .skills-grid, .credential-grid { grid-template-columns: 1fr; }
  .project-card.featured { grid-column: auto; }
}

@media (max-width: 680px) {
  .container { width: min(100% - 26px, var(--max)); }
  .section { padding: 70px 0; }
  .menu-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 72px; left: 13px; right: 13px; background: #0d192a; border: 1px solid var(--line); border-radius: 12px; padding: 18px; flex-direction: column; }
  .nav-links.open { display: flex; }
  .timeline-item { grid-template-columns: 1fr; gap: 10px; }
  .metrics { grid-template-columns: 1fr; }
  .metrics article { border-right: 0; border-bottom: 1px solid var(--line); }
  .metrics article:last-child { border-bottom: 0; }
  .hero h1 { font-size: 3.05rem; }
  .contact-card { padding: 32px 22px; }
  .footer { padding: 24px 0; align-items: flex-start; gap: 14px; flex-direction: column; }
}
