/* ==========================================================================
   Sailu Chittala — portfolio
   1. Tokens   2. Base   3. Components   4. Sections   5. Responsive
   Every colour comes from the tokens below.
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */

:root {
  --paper: #ffffff;
  --surface: #ffffff;
  --sunken: #fdeef4;
  --ink: #0a0a0a;
  --ink-2: #333333;
  --ink-3: #555555;
  --rule: #f4cfdf;
  --rule-strong: #e8a0c0;
  --accent: #d6197a;
  --accent-strong: #a80f5c;
  --accent-soft: #fde4ef;
  --on-accent: #ffffff;
  --code-bg: #fdf0f6;
  --code-status: #a80f5c;
  --img-filter: none;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 22px 44px -34px rgba(0, 0, 0, 0.36);
  --shadow-figure: 0 1px 0 rgba(0, 0, 0, 0.03), 0 14px 30px -24px rgba(0, 0, 0, 0.32);

  --font-sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1200px;
  --pad: clamp(18px, 4vw, 40px);
  --header-h: 64px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #000000;
    --surface: #0d0d0d;
    --sunken: #1a1a1a;
    --ink: #ffffff;
    --ink-2: #d9d9d9;
    --ink-3: #a6a6a6;
    --rule: #2a2a2a;
    --rule-strong: #4a4a4a;
    --accent: #ff4fa3;
    --accent-strong: #ff8cc4;
    --accent-soft: #2a0f1c;
    --on-accent: #000000;
    --code-bg: #0a0a0a;
    --code-status: #ff9ccb;
    --img-filter: brightness(0.9) contrast(1.03);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 22px 44px -32px rgba(0, 0, 0, 0.85);
    --shadow-figure: 0 1px 0 rgba(0, 0, 0, 0.3), 0 14px 30px -22px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #000000;
  --surface: #0d0d0d;
  --sunken: #1a1a1a;
  --ink: #ffffff;
  --ink-2: #d9d9d9;
  --ink-3: #a6a6a6;
  --rule: #2a2a2a;
  --rule-strong: #4a4a4a;
  --accent: #ff4fa3;
  --accent-strong: #ff8cc4;
  --accent-soft: #2a0f1c;
  --on-accent: #000000;
  --code-bg: #0a0a0a;
  --code-status: #ff9ccb;
  --img-filter: brightness(0.9) contrast(1.03);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 22px 44px -32px rgba(0, 0, 0, 0.85);
  --shadow-figure: 0 1px 0 rgba(0, 0, 0, 0.3), 0 14px 30px -22px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

/* 2. Base ------------------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, h5 { margin: 0; line-height: 1.15; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
dl, dd, figure { margin: 0; }
pre, code { font-family: var(--font-mono); }

:where(p, li, dd, figcaption) code {
  padding: 0.06em 0.34em;
  border-radius: 4px;
  background: var(--sunken);
  color: var(--ink);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute;
  top: -60px; left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}

.icon { width: 1em; height: 1em; flex: none; }

/* Shared small-caps mono label */
.index-title, .index-count, .feature-kicker, .code-label, .fblock h5, .foot-label,
.feature-status span, .other-kicker, .other-fields dt, .quick-facts dt, .lang-label,
.skill-card h3, .fundamentals h3, .edu-meta dt, .edu-course span, .subhead {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* 3. Components ------------------------------------------------------------ */

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-border: var(--rule-strong);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--btn-border);
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 600 0.9375rem/1 var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { --btn-bg: var(--surface); --btn-border: var(--ink); }
.btn .icon { transition: transform 0.18s ease; }
.btn:hover .icon { transform: translate(1px, -1px); }

.btn-primary { --btn-bg: var(--accent); --btn-fg: var(--on-accent); --btn-border: var(--accent); }
.btn-primary:hover { --btn-bg: var(--accent-strong); --btn-border: var(--accent-strong); }
.cta-row .btn-primary:hover .icon { transform: translateY(2px); }

.btn-sm { min-height: 38px; padding: 0 14px; font-size: 0.875rem; }

.tag {
  padding: 2px 5px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font: 500 0.6875rem/1.2 var(--font-mono);
  letter-spacing: 0.06em;
  opacity: 0.8;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { border-color: var(--rule-strong); background: var(--sunken); }

.stack { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.stack li {
  padding: 5px 8px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink-2);
  font: 400 0.75rem/1.2 var(--font-mono);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }

.header-inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-stretch: 108%;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark-mark {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border: 1.5px solid var(--ink);
  border-radius: 5px;
  font: 600 0.6875rem/1 var(--font-mono);
  letter-spacing: 0.04em;
}

.site-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-list a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 6px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-list a:hover { color: var(--ink); background: var(--sunken); }
.nav-list a[aria-current="location"] { color: var(--ink); }
.nav-list a[aria-current="location"]::after {
  content: "";
  position: absolute;
  right: 11px; bottom: 3px; left: 11px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.nav-extra { display: none; }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.nav-toggle { display: none; }

/* 4. Sections -------------------------------------------------------------- */

/* Hero */

.hero { padding-block: clamp(36px, 6vw, 80px) clamp(56px, 8vw, 96px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  color: var(--ink-2);
  font: 400 0.8125rem/1.5 var(--font-mono);
  letter-spacing: 0.03em;
}

.hero-name {
  margin-top: 16px;
  font-size: clamp(2.625rem, 1rem + 4.2vw, 4.25rem);
  font-weight: 800;
  font-stretch: 118%;
  line-height: 1;
  letter-spacing: -0.032em;
}

.hero-role {
  margin-top: 12px;
  color: var(--accent);
  font-size: clamp(1.25rem, 1.02rem + 0.8vw, 1.625rem);
  font-weight: 650;
  font-stretch: 110%;
  letter-spacing: -0.01em;
}

.hero-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "photo name" "photo role";
  column-gap: clamp(16px, 2vw, 24px);
  align-items: center;
  margin-top: 18px;
}
.hero-identity .hero-name {
  grid-area: name;
  align-self: end;
  margin-top: 0;
  font-size: clamp(2.25rem, 0.95rem + 3.5vw, 3.75rem);
}
.hero-identity .hero-role { grid-area: role; align-self: start; margin-top: 10px; }
.hero-photo {
  grid-area: photo;
  width: 120px;
  height: 120px;
  padding: 4px;
  border: 1px solid var(--rule);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-figure);
  object-fit: cover;
}

.hero-lead {
  max-width: 60ch;
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 1.125rem;
  line-height: 1.6;
}

.core-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; list-style: none; }
.core-stack li {
  padding: 5px 9px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  font: 500 0.75rem/1.2 var(--font-mono);
}

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.hero-open {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  color: var(--ink-2);
  font: 400 0.8125rem/1.5 var(--font-mono);
}
.dot {
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.index-panel {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.index-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--rule);
}
.index-list { list-style: none; }
.index-list li + li { border-top: 1px solid var(--rule); }
.index-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name fact" "meta fact";
  gap: 2px 16px;
  align-items: center;
  padding: 13px 20px;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.index-list a:hover { background: var(--sunken); }
.index-name { grid-area: name; font-size: 1rem; font-weight: 650; line-height: 1.3; }
.index-meta { grid-area: meta; color: var(--ink-3); font-size: 0.8125rem; line-height: 1.4; }
.index-fact {
  grid-area: fact;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font: 500 0.75rem/1.2 var(--font-mono);
  white-space: nowrap;
}
.index-fact::after {
  content: "↓";
  color: var(--ink-3);
  transition: transform 0.15s ease, color 0.15s ease;
}
.index-list a:hover .index-fact::after { color: var(--ink); transform: translateY(2px); }
.index-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 12px 20px 14px;
  border-top: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink-2);
  font: 400 0.75rem/1.5 var(--font-mono);
}

/* Section scaffolding */

.section {
  padding-block: clamp(72px, 9vw, 120px);
  border-top: 1px solid var(--rule);
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 12px clamp(24px, 5vw, 64px);
  align-items: end;
  margin-bottom: clamp(32px, 4.5vw, 52px);
}
.section-title {
  font-size: clamp(1.875rem, 1.3rem + 1.6vw, 2.625rem);
  font-weight: 750;
  font-stretch: 114%;
  letter-spacing: -0.022em;
}
.section-sub { max-width: 60ch; color: var(--ink-2); }

/* About */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 5vw, 64px);
}
.about-head { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; }
.prose { max-width: 68ch; color: var(--ink-2); }
.prose p + p { margin-top: 1.05em; }
.lead-lg { color: var(--ink); font-size: clamp(1.1875rem, 1.02rem + 0.6vw, 1.4375rem); line-height: 1.5; }

.quick-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  margin-top: 36px;
  border-top: 1px solid var(--rule);
}
.quick-facts div { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.quick-facts dd { margin-top: 4px; font-size: 0.96875rem; }

/* Projects: group headings */

.group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 20px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule-strong);
}
.group-title { font-size: 1.25rem; font-weight: 700; font-stretch: 108%; letter-spacing: -0.01em; }
.group-note { color: var(--ink-3); font-size: 0.875rem; }
.group-head-secondary { margin-top: clamp(56px, 7vw, 88px); }

/* Projects: featured */

.feature {
  padding: clamp(22px, 3.4vw, 44px);
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.feature + .feature { margin-top: clamp(20px, 2.6vw, 32px); }

.feature-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 32px;
}
.feature-heading { min-width: 0; max-width: 780px; }
.feature-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.feature-title {
  margin-top: 12px;
  font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2.125rem);
  font-weight: 750;
  font-stretch: 110%;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.feature-summary {
  max-width: 66ch;
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 1.09375rem;
  line-height: 1.55;
}
.feature-links { display: flex; flex: none; flex-wrap: wrap; gap: 8px; }

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  grid-template-areas: "text aside";
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
  margin-top: clamp(24px, 3vw, 36px);
  padding-top: clamp(24px, 3vw, 36px);
  border-top: 1px solid var(--rule);
}
.feature-text { grid-area: text; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; min-width: 0; }
.feature-aside { grid-area: aside; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.feature-text > *,
.feature-aside > * { min-width: 0; }

.fblock h5 { margin-bottom: 8px; }
.fblock > p,
.fblock > ul > li { color: var(--ink-2); font-size: 0.984rem; line-height: 1.62; }
.fblock > ul { display: grid; gap: 8px; list-style: none; }
.fblock > ul > li { position: relative; padding-left: 18px; }
.fblock > ul > li::before {
  content: "";
  position: absolute;
  top: 0.8em; left: 1px;
  width: 7px; height: 1.5px;
  background: var(--ink-3);
}

.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; margin-bottom: 10px; list-style: none; }
.flow li { display: inline-flex; align-items: center; gap: 6px; }
.flow li span {
  padding: 5px 8px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  font: 500 0.75rem/1.3 var(--font-mono);
}
.flow li:not(:last-child)::after { content: "→"; color: var(--ink-3); font-size: 0.875rem; }

.frame {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow-figure);
}
.frame img { width: 100%; filter: var(--img-filter); }

figcaption { margin-top: 10px; color: var(--ink-3); font-size: 0.8125rem; line-height: 1.5; }

.code-frame {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--code-bg);
  box-shadow: var(--shadow-figure);
}
.code-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--rule);
}
.code-frame pre + .code-label { border-top: 1px solid var(--rule); }
.code-frame pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  color: var(--ink);
  font-size: 0.75rem;
  line-height: 1.7;
  tab-size: 4;
}
.tok-c { color: var(--ink-3); font-style: italic; }
.tok-k { color: var(--accent); font-weight: 600; }
.tok-s { color: var(--code-status); font-weight: 600; }

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
}
.metrics div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 4px;
  padding: 14px 16px;
}
.metrics div:nth-child(odd) { border-right: 1px solid var(--rule); }
.metrics div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
.metrics dd {
  font-size: 1.5rem;
  font-weight: 750;
  font-stretch: 112%;
  line-height: 1.05;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}
.metrics dt { color: var(--ink-2); font-size: 0.8125rem; line-height: 1.35; }

.feature-status {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink-2);
  font-size: 0.84rem;
  line-height: 1.5;
}

.feature-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: clamp(24px, 3vw, 32px);
  padding-top: 18px;
  border-top: 1px dashed var(--rule-strong);
}

/* Projects: secondary */

.other-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}
.other {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  transition: border-color 0.15s ease;
}
.other:hover { border-color: var(--rule-strong); }
.other-kicker { font-size: 0.6875rem; }
.other-title { margin-top: 8px; font-size: 1.1875rem; font-weight: 700; font-stretch: 108%; letter-spacing: -0.01em; }
.other-summary { margin-top: 8px; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.55; }
.other-fields { display: grid; gap: 12px; margin-top: 16px; }
.other-fields dt { margin-bottom: 3px; }
.other-fields dd,
.other-fields li { color: var(--ink-2); font-size: 0.875rem; line-height: 1.55; }
.other-fields ul { display: grid; gap: 5px; list-style: none; }
.other-fields li { position: relative; padding-left: 14px; }
.other-fields li::before {
  content: "";
  position: absolute;
  top: 0.78em; left: 0;
  width: 6px; height: 1.5px;
  background: var(--ink-3);
}
.other .stack { margin-top: 16px; }
.other-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 18px; }

/* Skills */

.lang-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 24px;
  padding: 18px 24px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
}
.lang-list { display: flex; flex-wrap: wrap; gap: 6px 0; list-style: none; }
.lang-list li { font-size: 1.1875rem; font-weight: 650; font-stretch: 108%; }
.lang-list li:not(:last-child)::after {
  content: "·";
  margin-inline: 12px;
  color: var(--ink-3);
  font-weight: 400;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.skill-card {
  padding: 18px 22px 16px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
}
.skill-card h3 { padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.skill-rows { list-style: none; }
.skill-rows li { display: grid; gap: 1px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.skill-rows li:last-child { border-bottom: 0; }
.skill-name { font-size: 0.96875rem; font-weight: 600; }
.skill-where { color: var(--ink-3); font-size: 0.8125rem; line-height: 1.45; }

.fundamentals {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 20px;
  margin-top: 16px;
  padding: 16px 22px;
  border: 1px dashed var(--rule-strong);
  border-radius: 12px;
}
.fundamentals p { color: var(--ink-2); font-size: 0.96875rem; }

/* Education */

.edu-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.edu-card {
  padding: clamp(20px, 2.6vw, 30px);
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.edu-school { font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem); font-weight: 750; font-stretch: 110%; letter-spacing: -0.018em; }
.edu-degree { margin-top: 6px; color: var(--ink-2); }
.edu-meta { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 18px; }
.edu-meta dd { margin-top: 2px; font-size: 1.25rem; font-weight: 700; font-stretch: 110%; font-variant-numeric: tabular-nums; }
.edu-course { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 0.9375rem; }
.edu-course span { display: block; margin-bottom: 4px; }

.edu-rows { margin-top: 18px; border-top: 1px solid var(--rule); list-style: none; }
.edu-rows li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.edu-rows li:last-child { border-bottom: 0; padding-bottom: 0; }
.edu-row-title { grid-column: 1; font-size: 1rem; font-weight: 650; }
.edu-rows .edu-sub { grid-column: 1; color: var(--ink-2); font-size: 0.90625rem; }
.edu-rows .edu-score { grid-column: 2; grid-row: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.edu-rows .edu-year { grid-column: 2; grid-row: 2; color: var(--ink-3); font: 400 0.8125rem/1.5 var(--font-mono); text-align: right; }

.subhead { margin-bottom: 12px; }
.cert-list { display: grid; gap: 10px; list-style: none; }
.cert-list a,
.cert-list .cert-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 16px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.cert-list a:hover { border-color: var(--ink-3); }
.cert-name { grid-column: 1; font-size: 0.96875rem; font-weight: 650; line-height: 1.35; }
.cert-issuer { grid-column: 1; color: var(--ink-2); font-size: 0.8125rem; }
.cert-date { grid-column: 2; grid-row: 1; color: var(--ink-3); font: 400 0.75rem/1.7 var(--font-mono); white-space: nowrap; text-align: right; }
.cert-verify {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font: 500 0.75rem/1.4 var(--font-mono);
}

/* Contact */

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 28px 48px;
  align-items: end;
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.contact-lead { max-width: 54ch; margin-top: 12px; color: var(--ink-2); font-size: 1.09375rem; }
.contact-email {
  display: inline-block;
  margin-top: 22px;
  padding-bottom: 4px;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 2px;
  font-size: clamp(1.25rem, 0.8rem + 2.2vw, 2.375rem);
  font-weight: 700;
  font-stretch: 106%;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-decoration: none;
  overflow-wrap: break-word;
  transition: background-size 0.3s ease;
}
.contact-email:hover,
.contact-email:focus-visible { background-size: 100% 2px; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; list-style: none; }

/* Footer */

.site-footer { padding-block: 26px; border-top: 1px solid var(--rule); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  color: var(--ink-3);
  font-size: 0.8125rem;
}
.footer-inner a { color: var(--ink-2); text-underline-offset: 3px; }

/* 5. Responsive ------------------------------------------------------------ */

@media (max-width: 1100px) {
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1060px) {
  .site-nav { margin-left: 0; }
  .header-actions { margin-left: auto; }
  .nav-toggle { display: inline-grid; }
  .nav-list {
    position: absolute;
    top: var(--header-h);
    right: 0; left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px var(--pad) 14px;
    border-bottom: 1px solid var(--rule);
    background: var(--paper);
    box-shadow: 0 18px 30px -24px rgba(0, 0, 0, 0.35);
  }
  .nav-list.is-open { display: flex; }
  .nav-list a {
    padding: 13px 0;
    border-bottom: 1px solid var(--rule);
    border-radius: 0;
    font-size: 1.0625rem;
  }
  .nav-list li:last-child a { border-bottom: 0; }
  .nav-list a:hover { background: transparent; }
  .nav-list a[aria-current="location"]::after { right: auto; bottom: 7px; left: 0; width: 22px; }
  .nav-extra { display: block; }
}

@media (max-width: 960px) {
  .hero-grid,
  .section-intro,
  .about-grid,
  .edu-layout,
  .contact-card { grid-template-columns: minmax(0, 1fr); }
  .about-head { position: static; }
  .feature-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "aside" "text"; }
  .other-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .other:last-child { grid-column: 1 / -1; }
  .contact-links { justify-content: flex-start; }
}

@media (max-width: 680px) {
  .feature-head { flex-direction: column; }
  .other-grid,
  .skill-grid,
  .quick-facts { grid-template-columns: minmax(0, 1fr); }
  .other:last-child { grid-column: auto; }
  .code-label span:last-child { display: none; }
}

@media (max-width: 520px) {
  .wordmark-name { display: none; }
  .hero-lead { font-size: 1.0625rem; }
  .hero-identity { grid-template-areas: "photo name" "role role"; column-gap: 14px; }
  .hero-identity .hero-name { align-self: center; font-size: 2.5rem; }
  .hero-identity .hero-role { margin-top: 14px; }
  .hero-photo { width: 84px; height: 84px; padding: 3px; border-radius: 18px; }
  .cta-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-row .btn { justify-content: center; }
  .cta-row .btn-primary { grid-column: 1 / -1; }
  .index-head, .index-foot { padding-inline: 16px; }
  .index-list a { padding: 12px 16px; }
  .metrics dd { font-size: 1.3125rem; }
  .metrics div { padding: 12px; }
  .contact-email { font-size: 1.125rem; }
  .cert-list a,
  .cert-list .cert-card { grid-template-columns: minmax(0, 1fr); }
  .cert-date, .cert-verify { grid-column: 1; grid-row: auto; justify-self: start; text-align: left; }
}

@media (max-width: 380px) {
  .header-inner { gap: 10px; }
  .header-actions { gap: 6px; }
  .btn-github { display: none; }
}

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

@media print {
  .site-header, .skip-link, .cta-row, .icon-btn, .feature-links, .other-links { display: none; }
  body { background: #fff; color: #000; }
  .feature, .edu-card, .contact-card, .index-panel { box-shadow: none; }
  .about-head { position: static; }
}

/* Experience & activities */

.exp-card { max-width: 860px; }
.exp-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.exp-date { color: var(--ink-3); font: 400 0.8125rem/1.7 var(--font-mono); white-space: nowrap; }
.exp-list { display: grid; gap: 10px; margin: 18px 0; padding-left: 1.2em; color: var(--ink-2); }
.exp-list li::marker { color: var(--accent); }
.exp-card .stack { padding-top: 16px; border-top: 1px solid var(--rule); }
.activities-head { margin-top: 28px; }
.activity { margin-top: 12px; }
.activity-text { grid-column: 1 / -1; margin-top: 6px; color: var(--ink-2); font-size: 0.875rem; }
