@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("assets/fonts/space-grotesk-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
}

:root {
  --bg: #f3f6f6;
  --panel: #ffffff;
  --panel-2: #fbfcfc;
  --ink: #14202b;
  --muted: #566575;
  --faint: #647079;
  --line: #e2e8ea;
  --line-strong: #cdd7da;
  --brand: #0f766e;
  --brand-strong: #0b5c55;
  --brand-soft: rgba(15, 118, 110, 0.09);
  --on-brand: #ffffff;
  --signal: #10b981;
  --grid: rgba(15, 118, 110, 0.07);
  --shadow: 0 18px 50px -24px rgba(15, 42, 46, 0.28);
  --shadow-sm: 0 6px 20px -12px rgba(15, 42, 46, 0.35);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --container: 1080px;
  --radius: 16px;
  --radius-sm: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090f16;
    --panel: #0f1823;
    --panel-2: #0c141d;
    --ink: #e7edf1;
    --muted: #9fadbb;
    --faint: #828f9d;
    --line: #1d2836;
    --line-strong: #2a3646;
    --brand: #2dd4bf;
    --brand-strong: #5eead4;
    --brand-soft: rgba(45, 212, 191, 0.1);
    --on-brand: #04211f;
    --signal: #34d399;
    --grid: rgba(45, 212, 191, 0.08);
    --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7);
    --shadow-sm: 0 8px 24px -14px rgba(0, 0, 0, 0.7);
  }
}
:root[data-theme="dark"] {
  --bg: #090f16;
  --panel: #0f1823;
  --panel-2: #0c141d;
  --ink: #e7edf1;
  --muted: #9fadbb;
  --faint: #828f9d;
  --line: #1d2836;
  --line-strong: #2a3646;
  --brand: #2dd4bf;
  --brand-strong: #5eead4;
  --brand-soft: rgba(45, 212, 191, 0.1);
  --on-brand: #04211f;
  --signal: #34d399;
  --grid: rgba(45, 212, 191, 0.08);
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7);
  --shadow-sm: 0 8px 24px -14px rgba(0, 0, 0, 0.7);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

strong {
  font-weight: 600;
  color: var(--ink);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--brand);
}
.eyebrow::before {
  content: "// ";
  color: var(--faint);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip:focus {
  left: 0;
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease,
    color 0.14s ease, box-shadow 0.14s ease;
}
.btn:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}
.btn .ico {
  width: 17px;
  height: 17px;
  fill: currentColor;
}
.btn--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}
.btn--primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  color: var(--on-brand);
}
.btn--ghost {
  background: transparent;
  border-color: transparent;
}
.btn--sm {
  height: 38px;
  padding: 0 0.85rem;
  font-size: 0.85rem;
}

.status__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 22%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--brand);
  color: var(--on-brand);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.brand__url {
  font-size: 0.82rem;
  color: var(--muted);
}
.nav__links {
  display: flex;
  gap: 1.6rem;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav__links a {
  color: var(--muted);
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.15s ease;
}
.nav__links a:hover,
.nav__links a.is-active {
  color: var(--ink);
}
.nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover {
  color: var(--brand);
  border-color: var(--brand);
}
.icon-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: none; }
  :root:not([data-theme="light"]) .icon-moon { display: block; }
}

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(120% 90% at 78% 8%, #000 0%, transparent 62%);
  mask-image: radial-gradient(120% 90% at 78% 8%, #000 0%, transparent 62%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.7rem, 7vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-top: 0.5rem;
  color: var(--ink);
}
.hero__thesis {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  line-height: 1.35;
  margin-top: 1.1rem;
  max-width: 30ch;
}
.hero__thesis strong {
  color: var(--brand);
  font-weight: 600;
}
.hero__sub {
  color: var(--muted);
  font-size: 1.02rem;
  margin-top: 1rem;
  max-width: 52ch;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.5rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--panel);
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.panel__title {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.panel__live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: var(--signal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.metrics {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.metric {
  padding: 1.15rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.metric:nth-child(odd) {
  border-right: 1px solid var(--line);
}
.metric__val {
  display: block;
  font-size: clamp(1.7rem, 3.2vw, 2.25rem);
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.metric__val--good {
  color: var(--signal);
}
.metric__label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}
.panel__foot {
  padding: 0.75rem 1.1rem;
  font-size: 0.72rem;
  color: var(--faint);
  background: var(--panel-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  border-top: 1px solid var(--line);
}
.section--alt {
  background: var(--panel-2);
}
.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-top: 0.4rem;
  color: var(--ink);
}
.section__head--full {
  margin-bottom: 2.5rem;
}
.section__grid {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.section__grid .section__head {
  position: sticky;
  top: 90px;
}
.lede {
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 1rem;
}
.section__body p {
  color: var(--muted);
}

.facts {
  margin-top: 1.6rem;
  display: grid;
  gap: 0.1rem;
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}
.facts > div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.8rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  color: var(--faint);
  text-transform: lowercase;
}
.facts dd {
  color: var(--ink);
}

.timeline {
  list-style: none;
  position: relative;
  max-width: 780px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line-strong);
}
.node {
  position: relative;
  padding-left: 2.4rem;
  padding-bottom: 2.4rem;
}
.node:last-child {
  padding-bottom: 0;
}
.node::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--line-strong);
}
.node:first-child::before {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.node__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
}
.node__date {
  color: var(--muted);
}
.node__tag {
  padding: 0.12rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--faint);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}
.node__tag--now {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--brand-soft);
}
.node__role {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  margin-top: 0.5rem;
  color: var(--ink);
}
.node__org {
  color: var(--brand);
  font-size: 0.92rem;
  font-weight: 500;
  margin-top: 0.15rem;
}
.node__sum {
  color: var(--muted);
  margin-top: 0.6rem;
  max-width: 62ch;
}
.node__points {
  list-style: none;
  margin-top: 0.7rem;
  display: grid;
  gap: 0.4rem;
  max-width: 64ch;
}
.node__points li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.94rem;
}
.node__points li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--brand);
}
.node--early {
  opacity: 0.9;
}

.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.skillset {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.skillset__title {
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
.skillset__title::before {
  content: "▪ ";
  color: var(--brand);
}
.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.tags li {
  padding: 0.32rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--ink);
  background: var(--panel-2);
  transition: border-color 0.14s ease, color 0.14s ease;
}
.tags li:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.edu {
  margin-top: 2.5rem;
}
.edu__list {
  list-style: none;
  border-top: 1px solid var(--line);
}
.edu__list li {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.edu__deg {
  font-weight: 600;
  color: var(--ink);
}
.edu__org {
  color: var(--muted);
  font-size: 0.92rem;
}
.edu__yr {
  color: var(--faint);
  font-size: 0.82rem;
  text-align: right;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 1rem;
}
.project {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.project:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.project:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}
.project__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.project__name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}
.project__stars {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--faint);
}
.project__stars svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}
.project__desc {
  flex: 1;
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.project__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.1rem;
}
.project__tag {
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--faint);
}
.project__lang {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--muted);
}
.project__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lang, var(--brand));
}
.projects__more {
  margin-top: 1.5rem;
  font-size: 0.85rem;
}
.projects__more a {
  color: var(--brand);
  border-bottom: 1px dashed var(--line-strong);
  padding-bottom: 2px;
  transition: border-color 0.14s ease;
}
.projects__more a:hover {
  border-color: var(--brand);
}

.contact__inner {
  text-align: center;
  max-width: 640px;
}
.contact__lede {
  color: var(--muted);
  font-size: 1.08rem;
  margin: 1rem auto 0;
  max-width: 46ch;
}
.contact__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.8rem;
}
.contact__cv {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1.6rem;
  font-size: 0.85rem;
}
.contact__cv a {
  color: var(--muted);
  border-bottom: 1px dashed var(--line-strong);
  padding-bottom: 2px;
  transition: color 0.14s ease, border-color 0.14s ease;
}
.contact__cv a:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.foot {
  border-top: 1px solid var(--line);
  padding-block: 1.5rem;
}
.foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--faint);
}

@media (max-width: 860px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }
  .panel {
    max-width: 460px;
  }
  .section__grid {
    grid-template-columns: 1fr;
  }
  .section__grid .section__head {
    position: static;
  }
  .nav__links {
    display: none;
  }
  .brand__url {
    display: none;
  }
}
@media (max-width: 560px) {
  .edu__list li {
    grid-template-columns: 1fr auto;
  }
  .edu__org {
    grid-column: 1 / -1;
    order: 3;
  }
  .foot__inner {
    flex-direction: column;
  }
}

.timeline .node:nth-child(2) { transition-delay: 0.05s; }
.timeline .node:nth-child(3) { transition-delay: 0.1s; }
.skills .skillset:nth-child(2) { transition-delay: 0.05s; }
.skills .skillset:nth-child(3) { transition-delay: 0.1s; }
.skills .skillset:nth-child(4) { transition-delay: 0.12s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .status__dot { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
