/* Talha Tabish — portfolio
   Aesthetic: editorial minimal. Warm off-white, near-black, single warm accent.
   Type: Fraktion Mono (UI labels) is overused — using JetBrains Mono. Display: Instrument Serif.
   Body: Söhne-substitute (Inter Tight feels too tropey, using "Söhne" via fallback to system).
   Decision: Display = "Fraunces" is too tropey; using "Instrument Serif" — tighter, more editorial.
   Body = "Geist" — clean, modern, slightly geometric. Mono = "JetBrains Mono".
*/

:root {
  /* Resume-matched palette — navy ink, cool off-white background */
  --bg: #f4f6f9;
  --bg-2: #e9edf3;
  --bg-3: #dde3ec;
  --ink: #1b3a5c;
  --ink-2: #2c4a6b;
  --ink-3: #5e7388;
  --ink-4: #8ea0b3;
  --rule: #c5cfdc;
  --rule-2: #d8dfe8;

  /* Accent — slightly brighter blue for emphasis vs. the deep navy ink */
  --accent: #2c5d8f;
  --accent-soft: #dde6f0;
  --accent-ink: #102740;

  /* Type */
  --f-display: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --f-body: "Geist", "Inter Tight", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --f-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  /* Density */
  --density: 1;
  --gap-1: calc(10px * var(--density));
  --gap-2: calc(20px * var(--density));
  --gap-3: calc(36px * var(--density));
  --gap-4: calc(64px * var(--density));
  --gap-5: calc(112px * var(--density));
  --gap-6: calc(160px * var(--density));
}

[data-theme="navy"] {
  --bg: #f4f6f9;
  --bg-2: #e9edf3;
  --bg-3: #dde3ec;
  --ink: #1b3a5c;
  --ink-2: #2c4a6b;
  --ink-3: #5e7388;
  --ink-4: #8ea0b3;
  --rule: #c5cfdc;
  --rule-2: #d8dfe8;
  --accent: #2c5d8f;
  --accent-soft: #dde6f0;
  --accent-ink: #102740;
}

[data-theme="dark"] {
  --bg: #0c1620;
  --bg-2: #14202d;
  --bg-3: #1c2a3a;
  --ink: #e8eef5;
  --ink-2: #c8d3e0;
  --ink-3: #8ea0b3;
  --ink-4: #5e7388;
  --rule: #243648;
  --rule-2: #2c4055;
  --accent: #6f9bc8;
  --accent-soft: #1f3247;
  --accent-ink: #a8c5e3;
}

[data-theme="warm"] {
  --bg: #f3efe8;
  --bg-2: #ebe5db;
  --bg-3: #e1d9cb;
  --ink: #1a1814;
  --ink-2: #3d362c;
  --ink-3: #6b6358;
  --ink-4: #9a9285;
  --rule: #cfc6b6;
  --rule-2: #dfd6c5;
  --accent: oklch(0.58 0.12 40);
  --accent-soft: oklch(0.92 0.04 50);
  --accent-ink: oklch(0.32 0.08 35);
}

[data-theme="ink"] {
  --bg: #faf8f3;
  --bg-2: #f2efe7;
  --bg-3: #e8e3d6;
  --ink: #0a0a0a;
  --ink-2: #2a2a2a;
  --ink-3: #5a5a5a;
  --ink-4: #8a8a8a;
  --rule: #c8c4ba;
  --rule-2: #d8d4ca;
  --accent: oklch(0.42 0.13 260);
  --accent-soft: oklch(0.92 0.04 260);
  --accent-ink: oklch(0.30 0.10 260);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
ul { list-style: none; padding: 0; margin: 0; }
em { font-style: italic; font-family: var(--f-display); font-weight: 400; }

::selection { background: var(--accent); color: var(--bg); }

/* ============ TOP NAV ============ */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 64px;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.tn-mark {
  font-family: var(--f-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  font-style: italic;
  white-space: nowrap;
}
.tn-links {
  display: flex;
  gap: var(--gap-3);
}
.tn-links a {
  color: var(--ink-3);
  transition: color .2s;
  text-transform: uppercase;
}
.tn-links a:hover { color: var(--ink); }
.tn-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  text-transform: uppercase;
}
.tn-status .blip {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: oklch(0.65 0.15 145);
  box-shadow: 0 0 0 0 oklch(0.65 0.15 145 / 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 oklch(0.65 0.15 145 / 0.5); }
  70% { box-shadow: 0 0 0 6px oklch(0.65 0.15 145 / 0); }
  100% { box-shadow: 0 0 0 0 oklch(0.65 0.15 145 / 0); }
}

/* ============ HERO ============ */
.hero {
  padding: var(--gap-6) 64px var(--gap-6);
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto auto auto;
  gap: var(--gap-4) var(--gap-4);
  max-width: 1440px;
  margin: 0 auto;
}
.hero-meta {
  grid-column: 1 / 4;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.meta-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.hero-headline {
  grid-column: 1 / 4;
  grid-row: 2;
}
.hero-headline {
  margin-bottom: var(--gap-4);
}
.hero-headline h1 {
  font-family: var(--f-display);
  font-size: clamp(56px, 8.5vw, 132px);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.025em;
  margin: 0;
  padding-bottom: 0.08em;
}
.h1-line {
  display: block;
}
.h1-line-2 {
  color: var(--ink-2);
  margin-top: 8px;
}
.h1-line-2 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.hero-sub {
  grid-column: 1 / 3;
  grid-row: 3;
}
.hero-summary {
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 0;
  text-wrap: pretty;
}

/* Aside — switcher */
.hero-aside {
  grid-column: 4;
  grid-row: 2 / 5;
  align-self: end;
  padding: var(--gap-3);
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: var(--gap-3);
}
.aside-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.switcher {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.switcher-pill {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  text-align: left;
  padding: 16px 18px;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: all .18s ease;
  position: relative;
}
.switcher-pill:hover {
  background: var(--bg-3);
}
.switcher-pill.active {
  background: var(--ink);
  color: var(--bg);
}
.switcher-pill.active .pill-tag {
  color: color-mix(in oklch, var(--bg) 70%, transparent);
}
.pill-label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.pill-tag {
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.resume-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 3px;
  font-size: 15px;
  font-weight: 500;
  margin-top: 8px;
  transition: transform .15s ease, background .15s;
}
.resume-cta:hover {
  background: var(--accent-ink);
  transform: translateY(-1px);
}
.cta-arrow { font-family: var(--f-mono); }

/* Strengths grid */
.hero-strengths {
  grid-column: 1 / 4;
  grid-row: 4;
  margin-top: var(--gap-4);
}
.strengths-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: var(--gap-3);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--gap-3);
}
.strengths-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
.strengths-grid li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 22px 16px 22px 0;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink-2);
  transition: background .2s, color .2s;
  animation: fadeUp .4s ease both;
  animation-delay: calc(var(--i) * 0.04s);
}
.strengths-grid li:nth-child(4n) { border-right: none; }
.strengths-grid li:hover { color: var(--ink); background: var(--bg-2); }
.strengths-grid .num {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.05em;
  padding-left: 12px;
}
.strengths-grid .txt { line-height: 1.3; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero footer stats */
.hero-footer {
  grid-column: 1 / -1;
  grid-row: 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-4);
  margin-top: var(--gap-5);
  padding-top: var(--gap-4);
  border-top: 1px solid var(--rule);
}
.hf-stat {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hf-num {
  font-family: var(--f-display);
  font-size: clamp(40px, 4.5vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hf-cap {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ============ SECTIONS ============ */
.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--gap-4);
  padding: var(--gap-6) 64px var(--gap-4);
  max-width: 1440px;
  margin: 0 auto;
}
.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  align-self: start;
  padding-top: 14px;
}
.eyebrow-num { color: var(--accent); }
.eyebrow-line { flex: 1; height: 1px; background: var(--rule); max-width: 80px; }
.section-title {
  font-family: var(--f-display);
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

/* ============ EMPLOYER BAR ============ */
.employer-bar {
  display: flex;
  align-items: center;
  gap: var(--gap-3);
  padding: var(--gap-2) var(--gap-4);
  border-bottom: 1px solid var(--rule);
  background: var(--bg-2);
  overflow-x: auto;
  scrollbar-width: none;
}
.employer-bar::-webkit-scrollbar { display: none; }

.eb-label {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-4);
  white-space: nowrap;
  flex-shrink: 0;
}

.eb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--gap-3);
  flex-wrap: nowrap;
}

.eb-item {
  display: flex;
  align-items: center;
}

/* Logo images — greyscale + muted opacity to match navy theme */
.eb-logo {
  display: block;
  max-height: 28px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  filter: grayscale(1) opacity(0.38);
  transition: filter 0.25s ease;
}
.eb-logo:hover {
  filter: grayscale(0.2) opacity(0.75);
}

/* Logos with dark/coloured backgrounds get inverted first so they sit
   cleanly on the light page background */
.eb-logo--invert {
  filter: invert(1) grayscale(1) opacity(0.38);
}
.eb-logo--invert:hover {
  filter: invert(1) grayscale(0.2) opacity(0.75);
}

/* Dark theme — flip the inversion so dark-bg logos don't become white blobs */
[data-theme="dark"] .eb-logo--invert {
  filter: grayscale(1) opacity(0.38);
}
[data-theme="dark"] .eb-logo--invert:hover {
  filter: grayscale(0.2) opacity(0.75);
}

@media (max-width: 600px) {
  .employer-bar {
    padding: var(--gap-2) var(--gap-2);
    gap: var(--gap-2);
  }
  .eb-logo {
    max-height: 22px;
    max-width: 100px;
  }
}

/* ============ CASES ============ */
.cases {
  border-bottom: 1px solid var(--rule);
}
.cases-list {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--gap-3) 64px var(--gap-6);
  border-top: 1px solid var(--rule);
}
.case {
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  transition: background .2s;
}
.case:hover {
  background: var(--bg-2);
}
.case.open {
  background: var(--bg-2);
}
.case-row {
  display: grid;
  grid-template-columns: 60px 1fr auto 60px;
  align-items: center;
  gap: var(--gap-3);
  padding: var(--gap-4) 0;
}
.case-num {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}
.case-meta {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
  display: flex;
  gap: 8px;
}
.case-meta .dot { color: var(--ink-4); }
.case-title {
  font-family: var(--f-display);
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}
.case.open .case-title { color: var(--accent-ink); }
.case-tags-inline {
  display: flex;
  gap: 6px;
}
.tag {
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border: 1px solid var(--rule);
  border-radius: 100px;
  color: var(--ink-3);
  background: var(--bg);
  white-space: nowrap;
}
.case-toggle {
  width: 44px; height: 44px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: transform .2s, background .2s, border-color .2s;
}
.case.open .case-toggle {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  transform: rotate(180deg);
}
.toggle-icon { font-size: 22px; line-height: 1; font-weight: 300; }

.case-body {
  display: grid;
  grid-template-columns: 60px 1fr 1fr;
  gap: var(--gap-4) var(--gap-4);
  padding: 0 0 var(--gap-5);
  animation: fadeIn .35s ease;
}
.case-block:nth-child(1) { grid-column: 2; }
.case-block:nth-child(2) { grid-column: 3; }
.case-impact { grid-column: 2 / -1; padding-top: var(--gap-3); border-top: 1px solid var(--rule-2); }
.case-tags { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.block-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.case-block p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.7; max-width: 50ch; }
.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-3);
  margin-top: 16px;
}
.impact-cell {
  padding: var(--gap-3);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.impact-stat {
  font-family: var(--f-display);
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin-bottom: 12px;
}
.impact-cap {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============ EXPERIENCE ============ */
.experience { border-bottom: 1px solid var(--rule); }
.exp-list {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--gap-3) 64px var(--gap-6);
}
.exp-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--gap-4);
  padding: var(--gap-4) 0;
  border-top: 1px solid var(--rule);
}
.exp-row:last-child { border-bottom: 1px solid var(--rule); }
.exp-dates {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.exp-year { color: var(--ink); margin-bottom: 4px; font-weight: 500; }
.exp-loc { color: var(--ink-4); }
.exp-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 6px;
}
.exp-role {
  font-family: var(--f-display);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}
.exp-sep { color: var(--ink-4); }
.exp-company {
  font-size: 16px;
  color: var(--ink-2);
  font-weight: 500;
}
.exp-summary {
  margin: 0 0 var(--gap-3);
  color: var(--ink-2);
  font-size: 16px;
  max-width: 65ch;
  line-height: 1.65;
}
.exp-highlights {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.exp-highlights li {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.6;
  padding-left: 18px;
  position: relative;
  max-width: 70ch;
}
.exp-highlights li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 1px;
  background: var(--accent);
}

/* ============ TIMELINE ============ */
.timeline { border-bottom: 1px solid var(--rule); }
.tl-list {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--gap-3) 64px var(--gap-6);
}
.tl-row {
  display: grid;
  grid-template-columns: 180px 40px 1fr;
  gap: 0 var(--gap-3);
  padding: var(--gap-4) 0;
}
.tl-left {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: right;
  padding-top: 4px;
}
.tl-year { color: var(--ink-2); font-weight: 500; margin-bottom: 4px; }
.tl-org { color: var(--ink-4); }
.tl-line {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tl-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  flex-shrink: 0;
  margin-top: 5px;
}
.tl-bar {
  flex: 1;
  width: 1px;
  background: var(--rule);
  margin-top: 6px;
  min-height: 24px;
}
.tl-row:last-child .tl-bar { opacity: 0; }
.tl-community .tl-dot { background: var(--ink-3); }
.tl-content {
  padding-bottom: var(--gap-3);
}
.tl-name {
  font-family: var(--f-display);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
  color: var(--ink);
}
.tl-context {
  font-size: 13px;
  color: var(--ink-4);
  margin: 0 0 10px;
  font-family: var(--f-mono);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.tl-eliminated {
  font-size: 15px;
  color: var(--ink-3);
  line-height: 1.6;
  margin: 0 0 14px;
  max-width: 65ch;
}
.tl-label {
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  margin-right: 10px;
}
.tl-impact {
  font-family: var(--f-display);
  font-size: clamp(18px, 1.8vw, 24px);
  color: var(--accent);
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  font-weight: 400;
}
.tl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tl-tag {
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border: 1px solid var(--rule);
  border-radius: 100px;
  color: var(--ink-3);
  background: var(--bg);
}

/* ============ SKILLS ============ */
.skills { border-bottom: 1px solid var(--rule); }
.skills-grid {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--gap-3) 64px var(--gap-3);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-5);
  border-top: 1px solid var(--rule);
}
.skill-col {
  padding: var(--gap-4) 0;
}
.skill-cat {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--gap-3);
}
.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-list li {
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: 100px;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--bg-2);
  transition: all .15s;
}
.skill-list li:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.education {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 64px var(--gap-6);
}
.edu-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: var(--gap-4) 0 var(--gap-3);
  border-top: 1px solid var(--rule);
}
.edu-row {
  display: grid;
  grid-template-columns: 1.5fr 2fr 100px;
  gap: var(--gap-3);
  padding: var(--gap-3) 0;
  border-top: 1px solid var(--rule-2);
  font-size: 15px;
  align-items: baseline;
}
.edu-school { font-family: var(--f-display); font-size: 22px; }
.edu-prog { color: var(--ink-2); }
.edu-year { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); text-align: right; }

/* ============ COMMUNITY ============ */
.community {
  border-bottom: 1px solid var(--rule);
}
.community-card {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--gap-3) 64px var(--gap-6);
}
.cc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--gap-2);
  padding: var(--gap-4) 0 var(--gap-3);
  border-top: 1px solid var(--rule);
}
.cc-head h3 {
  font-family: var(--f-display);
  font-size: clamp(26px, 2.4vw, 36px);
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0;
}
.cc-dates {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.cc-desc {
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 70ch;
  margin: 0 0 var(--gap-4);
}
.cc-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-4);
  border-top: 1px solid var(--rule-2);
  padding-top: var(--gap-3);
}
.cc-points li {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.6;
  padding-left: 18px;
  position: relative;
}
.cc-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 1px;
  background: var(--accent);
}

/* ============ CONTACT ============ */
.contact {
  background: var(--ink);
  color: var(--bg);
  padding: var(--gap-6) 64px var(--gap-4);
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.contact-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.contact-eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--gap-2);
}
.contact-title {
  font-family: var(--f-display);
  font-size: clamp(40px, 5.5vw, 84px);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.025em;
  margin: 0 0 var(--gap-5);
  color: var(--bg);
  text-wrap: balance;
}
.contact-title-2 { color: color-mix(in oklch, var(--bg) 50%, var(--ink)); font-style: italic; }

.contact-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-4);
  margin-bottom: var(--gap-5);
  padding-bottom: var(--gap-5);
  border-bottom: 1px solid color-mix(in oklch, var(--bg) 15%, transparent);
}
.ca-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--gap-3) var(--gap-3);
  background: var(--accent);
  color: var(--ink);
  border-radius: 4px;
  font-family: var(--f-display);
  font-size: clamp(22px, 2.2vw, 32px);
  letter-spacing: -0.01em;
  transition: transform .2s, background .2s;
  font-weight: 400;
}
.ca-primary:hover {
  background: var(--bg);
  transform: translateY(-2px);
}
.ca-arrow {
  font-family: var(--f-mono);
  font-size: 24px;
}
.contact-secondary {
  display: flex;
  flex-direction: column;
}
.contact-secondary a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--gap-3) 0;
  border-bottom: 1px solid color-mix(in oklch, var(--bg) 15%, transparent);
  transition: padding .2s, color .2s;
}
.contact-secondary a:hover {
  padding-left: 8px;
  color: var(--accent);
}
.cs-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in oklch, var(--bg) 60%, transparent);
}
.cs-val { font-size: 16px; }

.all-resumes {
  margin-top: var(--gap-4);
}
.ar-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in oklch, var(--bg) 60%, transparent);
  margin-bottom: var(--gap-3);
}
.ar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.ar-link {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  align-items: baseline;
  padding: var(--gap-3);
  border: 1px solid color-mix(in oklch, var(--bg) 18%, transparent);
  border-radius: 3px;
  transition: all .2s;
}
.ar-link:hover {
  background: color-mix(in oklch, var(--bg) 8%, transparent);
  border-color: var(--accent);
}
.ar-name { font-size: 15px; grid-column: 1; }
.ar-sub {
  grid-column: 1;
  grid-row: 2;
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: color-mix(in oklch, var(--bg) 55%, transparent);
}
.ar-arrow {
  grid-row: 1 / 3;
  grid-column: 2;
  font-family: var(--f-mono);
  font-size: 16px;
  color: var(--accent);
}

.page-footer {
  display: flex;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: color-mix(in oklch, var(--bg) 50%, transparent);
  padding: var(--gap-4) 0 0;
  margin-top: var(--gap-4);
  border-top: 1px solid color-mix(in oklch, var(--bg) 12%, transparent);
}

/* ============ RESPONSIVE ============ */

/* Tablet landscape — layout shifts, padding tightens */
@media (max-width: 1100px) {
  .topnav { padding: 18px 40px; }

  .hero,
  .section-head,
  .cases-list,
  .tl-list,
  .skills-grid,
  .education,
  .community-card,
  .contact { padding-left: 40px; padding-right: 40px; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-meta, .hero-headline, .hero-sub, .hero-strengths { grid-column: 1; }
  .strengths-grid { grid-template-columns: repeat(2, 1fr); }
  .strengths-grid li:nth-child(4n) { border-right: 1px solid var(--rule); }
  .strengths-grid li:nth-child(2n) { border-right: none; }
  .hero-footer { grid-template-columns: repeat(2, 1fr); }

  .section-head { grid-template-columns: 1fr; gap: var(--gap-2); }

  .case-body { grid-template-columns: 1fr; }
  .case-block:nth-child(1), .case-block:nth-child(2), .case-impact, .case-tags { grid-column: 1; }
  .case-row { grid-template-columns: 40px 1fr 50px; }
  .case-tags-inline { display: none; }
  .impact-grid { grid-template-columns: repeat(2, 1fr); }

  .tl-row { grid-template-columns: 140px 32px 1fr; }

  .skills-grid { grid-template-columns: 1fr; gap: 0; }
  .cc-points { grid-template-columns: 1fr; }
  .contact-actions { grid-template-columns: 1fr; }
}

/* Tablet portrait — tighten further, simplify dense areas */
@media (max-width: 768px) {
  .topnav { padding: 16px 24px; }

  .hero,
  .section-head,
  .cases-list,
  .tl-list,
  .skills-grid,
  .education,
  .community-card,
  .contact { padding-left: 24px; padding-right: 24px; }

  .section-head { padding-top: var(--gap-5); }

  .tl-row { grid-template-columns: 100px 28px 1fr; }
  .impact-grid { grid-template-columns: 1fr; }

  .edu-row { grid-template-columns: 1fr 2fr; gap: var(--gap-2); }

  .hero-footer { gap: var(--gap-3); }
  .contact-title { font-size: clamp(36px, 6vw, 64px); }
}

/* Mobile — stack everything, minimal chrome */
@media (max-width: 480px) {
  .topnav { padding: 14px 16px; }
  .tn-links { display: none; }

  .hero,
  .section-head,
  .cases-list,
  .tl-list,
  .skills-grid,
  .education,
  .community-card,
  .contact { padding-left: 16px; padding-right: 16px; }

  .hero { padding-top: var(--gap-5); padding-bottom: var(--gap-5); }
  .section-head { padding-top: var(--gap-4); padding-bottom: var(--gap-3); }

  .strengths-grid { grid-template-columns: 1fr; }
  .strengths-grid li { border-right: none !important; }
  .hero-footer { grid-template-columns: 1fr 1fr; gap: var(--gap-3); }

  .case-row { grid-template-columns: 1fr auto; }
  .case-num { display: none; }

  .tl-row { grid-template-columns: 1fr; }
  .tl-left { text-align: left; display: flex; gap: 8px; align-items: baseline; padding-bottom: 6px; }
  .tl-line { display: none; }

  .edu-row { grid-template-columns: 1fr; }
  .edu-year { text-align: left; }

  .page-footer { flex-direction: column; gap: var(--gap-1); }
  .contact-title { font-size: clamp(32px, 8vw, 48px); }
}
