:root {
  --bg: oklch(19% 0.014 255);
  --bg-card: oklch(21% 0.015 255);
  --bg-bar: oklch(25% 0.018 255);
  --border: oklch(33% 0.02 255);
  --border-dashed: oklch(30% 0.018 255);
  --fg: oklch(92% 0.01 255);
  --fg-strong: oklch(94% 0.01 255);
  --fg-soft: oklch(90% 0.01 255);
  --muted-1: oklch(68% 0.015 255);
  --muted-2: oklch(66% 0.015 255);
  --muted-3: oklch(58% 0.015 255);
  --muted-4: oklch(56% 0.015 255);
  --muted-5: oklch(54% 0.015 255);
  --muted-6: oklch(45% 0.015 255);
  --accent-mint: oklch(72% 0.17 165);
  --accent-mint-dark: oklch(15% 0.02 255);
  --accent-purple: oklch(75% 0.15 290);
  --badge-blue-bg: oklch(28% 0.03 265);
  --badge-blue-fg: oklch(80% 0.08 265);
  --badge-mint-bg: oklch(28% 0.05 165);
  --badge-mint-fg: oklch(80% 0.14 165);
  --dot-red: oklch(65% 0.16 25);
  --dot-yellow: oklch(78% 0.14 90);
  --dot-green: oklch(72% 0.17 165);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-mint); }

img { max-width: 100%; display: block; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--accent-mint);
  color: var(--accent-mint-dark);
  padding: 10px 16px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 13px;
  z-index: 50;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px clamp(20px, 5vw, 64px);
  min-height: 64px;
  row-gap: 10px;
  background: oklch(19% 0.014 255 / .88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav__brand {
  font-weight: 700;
  font-size: 14px;
  color: var(--fg-soft);
}
.nav__brand span { color: var(--accent-mint); }
.nav__right {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a { font-size: 13px; color: var(--muted-3); }

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.nav__toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--fg-soft);
  transition: transform .2s ease, opacity .2s ease;
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.lang-toggle {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border: 1px solid oklch(38% 0.02 255);
  border-radius: 3px;
  color: oklch(80% 0.01 255);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.btn {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn--sm { font-size: 12px; padding: 9px 16px; }
.btn--primary { background: var(--accent-mint); color: var(--accent-mint-dark); }
.btn--primary:hover { filter: brightness(1.1); color: var(--accent-mint-dark); }
.btn--outline { border-color: oklch(42% 0.02 255); color: oklch(88% 0.01 255); }
.btn--outline:hover { border-color: var(--accent-mint); color: var(--accent-mint); }

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 48px;
  align-items: center;
  padding: 64px clamp(20px, 5vw, 64px);
  max-width: 1180px;
  margin: 0 auto;
  animation: fadeUp .9s ease both;
}
.hero__badges {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
}
.badge--blue { background: var(--badge-blue-bg); color: var(--badge-blue-fg); }
.badge--mint { background: var(--badge-mint-bg); color: var(--badge-mint-fg); }

.hero__eyebrow {
  font-size: 12.5px;
  color: var(--accent-mint);
  margin-bottom: 14px;
}

.hero__title {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.35;
  font-weight: 700;
  margin: 0 0 24px;
  color: var(--fg-strong);
}
.hero__title .k-purple { color: var(--accent-purple); }
.hero__title .k-mint { color: var(--accent-mint); }
.hero__title .cursor { animation: blink 1s step-start infinite; }
.hero__title .code-line { display: block; }
.hero__title .code-line--indent { padding-left: 1.1em; }

.hero__sub {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted-1);
  max-width: 600px;
  margin: 0 0 30px;
}

.hero__ctas {
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.social-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.social-links a {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 14px;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.social-links a:hover {
  color: var(--accent-mint);
  border-color: var(--accent-mint);
  background: oklch(28% 0.05 165 / .18);
}

.hero__frame {
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: var(--bg-bar);
  border-bottom: 1px solid var(--border);
}
.window-bar .dot { width: 8px; height: 8px; border-radius: 50%; }
.dot--red { background: var(--dot-red); }
.dot--yellow { background: var(--dot-yellow); }
.dot--green { background: var(--dot-green); }
.window-bar .filename { margin-left: 8px; font-size: 11px; color: var(--muted-3); }

.hero__photo {
  width: 100%;
  height: calc(100% - 32px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-5);
  font-size: 12px;
  text-align: center;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 10px, oklch(25% 0.015 255) 10px, oklch(25% 0.015 255) 11px);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Sections ---------- */
.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px clamp(20px, 5vw, 64px) 72px;
}
.section__reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.section__reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.section__label {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--accent-mint);
  margin: 0 0 24px;
}

/* Projects */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.card {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-card);
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: oklch(45% 0.05 255); }
.card__body { padding: 20px; }
.card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.card__head h3 { margin: 0; font-size: 16px; color: var(--fg-soft); }
.card__tag { font-size: 10.5px; color: var(--accent-mint); white-space: nowrap; }
.card__desc { margin: 0 0 12px; font-size: 13px; line-height: 1.65; color: var(--muted-2); }
.card__link { font-size: 12px; color: var(--accent-purple); font-weight: 600; }
.card__link--static { font-size: 12px; color: var(--muted-5); }
.card__links { display: flex; gap: 16px; flex-wrap: wrap; }

/* Experience */
.timeline { display: flex; flex-direction: column; }
.timeline__item {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--border-dashed);
}
.timeline__role { font-size: 14px; color: var(--fg-soft); }
.timeline__role span { color: var(--accent-mint); }
.timeline__meta { font-size: 12px; color: var(--muted-4); margin-top: 4px; }
.timeline__desc { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--muted-2); }

.roadmap-list { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.roadmap-item { padding: 16px 0; border-top: 1px solid var(--border-dashed); }
.roadmap__link { font-size: 14px; color: var(--accent-purple); font-weight: 600; }
.roadmap-item__desc { margin: 6px 0 0; font-size: 13px; line-height: 1.65; color: var(--muted-2); max-width: 640px; }

/* Education */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}
.edu-heading {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-3);
  margin: 0 0 14px;
}
.edu-list { list-style: none; margin: 0; padding: 0; }
.edu-list li {
  font-size: 13.5px;
  line-height: 1.8;
  color: oklch(80% 0.01 255);
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-dashed);
}

/* Contact */
.contact-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: clamp(28px, 5vw, 56px);
  background: var(--bg-card);
}
.contact-card h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  margin: 0 0 14px;
  color: var(--fg-strong);
}
.contact-card__sub {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--muted-1);
  max-width: 520px;
  margin: 0 0 28px;
}
.contact-card__ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.contact-card .social-links {
  border-top: 1px solid var(--border-dashed);
  padding-top: 20px;
  font-size: 12.5px;
}

.footer-note {
  text-align: center;
  font-size: 11.5px;
  color: var(--muted-6);
  margin-top: 28px;
}

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .hero__frame { order: -1; max-width: 160px; margin: 0 auto; }
  .timeline__item { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 860px) {
  .nav { position: relative; flex-wrap: nowrap; }
  .nav__toggle { display: flex; }
  .nav__right {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 24px clamp(20px, 5vw, 64px) 28px;
    background: var(--bg);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
  }
  .nav__right.is-open { display: flex; }
  .nav__links { flex-direction: column; align-items: center; gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
