:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #21262d;
  --border-light: #30363d;
  --text: #e6edf3;
  --text-muted: #7d8590;
  --text-dim: #484f58;
  --blue: #58a6ff;
  --blue-dim: #1f6feb;
  --green: #3fb950;
  --green-dim: #238636;
  --font-display: 'Syne', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'IBM Plex Sans', sans-serif;
  --max-w: 860px;
  --nav-h: 60px;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) var(--bg);
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

body {
  background-color: var(--bg);
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 28px 28px;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
strong { color: var(--text); font-weight: 600; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ── NAV ── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(13,17,23,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: -0.3px;
  transition: color 0.2s;
}
.nav-logo:hover { color: var(--text); }

.nav-links { display: flex; gap: 2px; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  padding: 5px 11px;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
  position: relative;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--blue); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 11px; right: 11px;
  height: 2px;
  background: var(--blue);
  border-radius: 1px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text-muted);
  border-radius: 1px;
  transition: all 0.2s;
}

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
}
.hero-glow {
  position: absolute;
  top: 0; left: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(88,166,255,0.07) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner {
  padding: 80px 0 100px;
  position: relative;
  z-index: 1;
}

.hero-eyebrow { margin-bottom: 24px; }
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 20px;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-green 2.5s ease-in-out infinite;
}
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(63,185,80,0.5); }
  50% { box-shadow: 0 0 0 5px rgba(63,185,80,0); }
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(56px, 11vw, 96px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -4px;
  margin-bottom: 22px;
}
.name-first { display: block; color: var(--text); padding-bottom: 0.28em; }
.name-last  { display: block; color: var(--blue); }

.hero-role {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}
.hero-company {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.hero-sub {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 460px;
  line-height: 1.75;
  margin-bottom: 28px;
  min-height: 26px;
}
.cursor {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--blue);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.htag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 13px;
  border-radius: 20px;
  transition: border-color 0.15s, color 0.15s;
}
.htag:hover { color: var(--text); border-color: var(--border-light); }
.htag--blue  { color: var(--blue);  border-color: var(--blue-dim); }
.htag--green { color: var(--green); border-color: var(--green-dim); }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn--primary {
  background: var(--green-dim);
  border: 1px solid var(--green);
  color: #fff;
}
.btn--primary:hover {
  background: #2ea043;
  box-shadow: 0 0 20px rgba(63,185,80,0.2);
}
.btn--ghost {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--text-muted); background: var(--surface); }

/* ── SECTIONS ── */
.section { padding: 96px 0; border-top: 1px solid var(--border); }

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--blue);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1.5px;
  margin-bottom: 48px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-text p {
  color: var(--text-muted);
  line-height: 1.85;
  font-size: 15px;
  margin-bottom: 18px;
}
.about-text p:last-child { margin-bottom: 0; }

.fact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}
.fact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}
.fact-row:last-child { border-bottom: none; }
.fact-key {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.fact-val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--blue);
}

/* ── TIMELINE ── */
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 4px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--blue) 0%, var(--border-light) 30%, var(--border) 100%);
}
.tl-item {
  position: relative;
  margin-bottom: 52px;
}
.tl-item:last-child { margin-bottom: 0; }

.tl-dot {
  position: absolute;
  left: -28px; top: 5px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--border-light);
  border: 2px solid var(--bg);
}
.tl-dot--active {
  background: var(--blue);
  border-color: var(--bg);
  animation: pulse-blue 2.5s ease-in-out infinite;
}
@keyframes pulse-blue {
  0%, 100% { box-shadow: 0 0 0 0 rgba(88,166,255,0.5); }
  50% { box-shadow: 0 0 0 5px rgba(88,166,255,0); }
}
.tl-dot--faded { background: var(--border); }

.tl-period {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--green);
  margin-bottom: 4px;
}
.tl-item--faded .tl-period { color: var(--text-dim); }
.tl-role {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.tl-company {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--blue);
  margin-bottom: 12px;
}
.tl-item--faded .tl-company { color: var(--text-muted); }
.tl-desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 14px;
}
.tl-item--faded .tl-desc { color: var(--text-dim); }
.tl-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tl-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 9px;
  border-radius: 4px;
}

/* ── PROJECTS ── */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.project-card:hover {
  border-color: var(--blue-dim);
  box-shadow: 0 0 28px rgba(88,166,255,0.07);
}
.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}
.project-icon { font-size: 22px; }
.project-links { display: flex; gap: 8px; flex-wrap: wrap; }
.project-link {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 5px;
  border: 1px solid;
  transition: all 0.15s;
}
.project-link--blue {
  color: var(--blue);
  border-color: var(--blue-dim);
  background: rgba(88,166,255,0.05);
}
.project-link--blue:hover { background: rgba(88,166,255,0.13); }
.project-link--green {
  color: var(--green);
  border-color: var(--green-dim);
  background: rgba(63,185,80,0.05);
}
.project-link--green:hover { background: rgba(63,185,80,0.13); }

.project-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.project-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 14px;
}
.project-meta { display: flex; gap: 12px; flex-wrap: wrap; }
.project-stat {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

/* ── SKILLS ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 16px 18px;
  transition: border-color 0.2s;
}
.skill-group:hover { border-color: var(--border-light); }
.skill-group-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--blue);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.stag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 4px;
  transition: border-color 0.15s;
}
.stag:hover { border-color: var(--border-light); }
.stag--blue  { color: var(--blue);  border-color: rgba(88,166,255,0.3); }
.stag--green { color: var(--green); border-color: rgba(63,185,80,0.3); }

/* ── CONTACT ── */
#contact { border-bottom: 1px solid var(--border); }
.contact-inner {
  text-align: center;
  padding: 40px 0 16px;
}
.contact-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1.5px;
  margin-bottom: 12px;
}
.contact-sub {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 420px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.contact-links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 11px 22px;
  border-radius: 8px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.contact-btn:hover {
  border-color: var(--blue-dim);
  color: var(--blue);
  background: rgba(88,166,255,0.05);
}

/* ── FOOTER ── */
footer { padding: 24px 0; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--blue);
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

/* ── RESPONSIVE ── */
@media (max-width: 680px) {
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-name { letter-spacing: -2px; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(13,17,23,0.97);
    backdrop-filter: blur(14px);
    padding: 16px 28px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open a { padding: 10px 12px; }
  .nav-toggle { display: flex; }
}

@media (max-width: 420px) {
  .skills-grid { grid-template-columns: 1fr; }
  .container { padding: 0 18px; }
}
