/* ==========================================================================
   Pranit Garud - Portfolio
   Design tokens, layout, components, accessibility
   ========================================================================== */

/* --- Design Tokens (Dark mode default) ------------------------------------ */
:root,
[data-theme="dark"] {
  /* Type scale */
  --fs-2xs: 0.75rem;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-body-sm: 0.9375rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;

  /* Surface */
  --bg: hsl(240 28% 12%);
  --bg-elevated: hsl(240 28% 14%);
  --bg-card: hsl(240 27% 19%);
  --bg-card-strong: hsl(240 27% 23%);

  /* Borders */
  --border: hsl(240 30% 85% / 0.13);
  --border-strong: hsl(240 30% 85% / 0.22);

  /* Text */
  --text: hsl(240 8% 95%);
  --text-secondary: hsl(240 8% 75%);
  --text-muted: hsl(240 8% 62%);

  /* Accents - pranitgarud.com brand purple */
  --accent: hsl(240 69% 61%);
  --accent-hover: hsl(240 62% 54%);
  --accent-text: hsl(240 85% 78%);
  --accent-text-hover: hsl(240 90% 86%);
  --accent-glow: hsl(240 69% 61% / 0.20);
  --danger: #ef4444;
  --warn: #fbbf24;

  /* Effects */
  --shadow-sm: 0 1px 2px hsl(240 40% 4% / 0.40);
  --shadow-md: 0 8px 24px hsl(240 40% 4% / 0.45);
  --shadow-lg: 0 24px 48px hsl(240 40% 4% / 0.55);

  /* Typography */
  --font-sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Spacing scale (8pt) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Layout */
  --container: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 220ms;

  --header-h: 72px;

  color-scheme: dark;
}

/* Light theme overrides */
[data-theme="light"] {
  --bg: hsl(240 45% 96%);
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-strong: hsl(240 60% 99%);

  --border: hsl(240 30% 20% / 0.12);
  --border-strong: hsl(240 30% 20% / 0.18);

  --text: hsl(240 15% 10%);
  --text-secondary: hsl(240 8% 30%);
  --text-muted: hsl(240 8% 40%);

  --accent: hsl(240 69% 61%);
  --accent-hover: hsl(240 69% 52%);
  --accent-text: hsl(240 69% 56%);
  --accent-text-hover: hsl(240 69% 46%);
  --accent-glow: hsl(240 69% 61% / 0.14);

  --shadow-sm: 0 1px 2px hsl(240 30% 10% / 0.06);
  --shadow-md: 0 8px 24px hsl(240 30% 10% / 0.08);
  --shadow-lg: 0 24px 48px hsl(240 30% 10% / 0.12);

  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  accent-color: var(--accent);
  scrollbar-color: color-mix(in oklab, var(--accent) 45%, var(--bg-card)) var(--bg);
}

p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }

body,
h1, h2, h3, h4, p, ul, ol, li, figure, blockquote {
  margin: 0;
  padding: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

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

button {
  font: inherit;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
}

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

/* --- Base ----------------------------------------------------------------- */
html, body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main, header, footer {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  body { font-size: 16px; line-height: 1.7; }
}

main {
  flex: 1;
}

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

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

/* --- Skip link ------------------------------------------------------------ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--duration) var(--ease-out);
}
.skip-link:focus-visible {
  top: 16px;
}

/* --- Container ----------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

/* --- Header / Nav -------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  z-index: 100;
  transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-5);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-md);
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
  transition: color var(--duration) var(--ease);
}
.nav-logo:hover { color: var(--accent-text); }

/* Links sit on the right, beside the theme toggle; the name anchors the left. */
.nav { margin-left: auto; }

@keyframes blink {
  50% { opacity: 0; }
}

.nav__list {
  display: flex;
  gap: var(--space-1);
  align-items: center;
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-secondary);
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
  min-height: 44px;
}

.nav__link:hover {
  color: var(--text);
  background: var(--bg-card);
}

.nav__link.is-active {
  color: var(--accent-text);
}

.nav__link.is-active::after {
  content: "";
  position: absolute;
  inset: auto 14px -6px 14px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* --- Theme toggle -------------------------------------------------------- */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease), border-color var(--duration) var(--ease);
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--bg-card-strong);
}

.theme-toggle .icon {
  width: 18px;
  height: 18px;
}

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* --- Mobile menu --------------------------------------------------------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  margin: 0 auto;
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
}

.mobile-menu {
  position: absolute;
  inset: 100% 0 auto 0;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: var(--space-4) var(--space-5);
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
}

.mobile-menu.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.mobile-menu__link {
  display: block;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  min-height: 44px;
}
.mobile-menu__link:hover,
.mobile-menu__link.is-active {
  background: var(--bg-card);
  color: var(--accent-text);
}

/* --- Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + var(--space-7));
  padding-bottom: var(--space-8);
  display: flex;
  align-items: center;
}

.hero__container {
  display: grid;
  grid-template-columns: minmax(0, 34rem) 300px;
  justify-content: start;
  column-gap: clamp(3rem, 7vw, 7rem);
  row-gap: var(--space-8);
  align-items: center;
}

.hero__title {
  text-wrap: balance;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-5);
}

/* Shared mono prompt glyphs ("~/pranit $" and ">"); one size for both. */
.hero__prompt {
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--accent-text);
  letter-spacing: 0;
}

/* "~/pranit $" sits on its own short line above the name, not on a heading-sized line. */
.hero__title .hero__prompt {
  display: block;
  line-height: 1.5;
  margin-bottom: var(--space-3);
  opacity: 0.85;
}

.hero__caret {
  display: inline-block;
  width: 0.08em;
  height: 0.9em;
  margin-left: 0.08em;
  background: var(--accent);
  vertical-align: -0.05em;
  animation: caret-blink 1.05s steps(2) infinite;
}

@keyframes caret-blink {
  0%, 50%   { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__caret { animation: none; opacity: 0.7; }
}

.hero__name {
  color: var(--accent-text);
}

.hero__subtitle {
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: 1ch;
  min-height: 1.75rem;
}

.hero__caret {
  display: inline-block;
  width: 0.55ch;
  height: 1.1em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1s steps(2) infinite;
}

.hero__description {
  font-size: clamp(1.125rem, 1.9vw, 1.5rem);
  font-weight: 400;
  line-height: 1.4;
  color: var(--text);
  max-width: 32ch;
  margin-bottom: var(--space-6);
  text-wrap: pretty;
}

.hero__socials { margin-bottom: var(--space-7); }

.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--accent-text);
  text-decoration: none;
  transition: color 0.2s ease;
}
.hero__scroll:hover { color: var(--accent-text-hover); }
.hero__scroll-mouse { width: 24px; height: 24px; }
.hero__scroll-arrow { width: 14px; height: 14px; animation: scroll-nudge 1.6s ease-in-out infinite; }
@keyframes scroll-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .hero__scroll-arrow { animation: none; } }

.hero__socials {
  display: flex;
  gap: var(--space-3);
}

.social-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease), border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.social-icon:hover {
  color: var(--accent-text);
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
  transform: translateY(-2px);
}

.social-icon svg {
  width: 18px;
  height: 18px;
}

/* --- Photo card (hero visual) ------------------------------------------- */
.photo-card {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 200 / 187;
  margin-inline: 0;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.35));
  transition: transform 400ms var(--ease-out);
}

.photo-card:hover {
  transform: scale(1.02);
}

.photo-card__blob {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.photo-card__img {
  /* No blend mode — the SVG filter removes white pixels via alpha, so the photo
     keeps its natural colors and only the background becomes the accent fill. */
}

.floating-terminal {
  position: absolute;
  left: -10%;
  bottom: -20px;
  width: 78%;
  max-width: 340px;
  z-index: 2;
  animation: float-card 5s ease-in-out infinite;
}

@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.terminal-card--mini {
  font-size: var(--fs-2xs);
}

.terminal-card--mini .terminal-card__body {
  padding: var(--space-3) var(--space-4);
  line-height: 1.6;
}

.terminal-card--mini .terminal-card__body p {
  margin: 0;
}

/* --- Terminal card (hero visual) ---------------------------------------- */
.terminal-card {
  background: var(--bg-card-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  position: relative;
  max-width: 560px;
  margin-inline: auto;
  width: 100%;
}

.terminal-card__bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.terminal-dot--red    { background: #ef4444; }
.terminal-dot--yellow { background: #fbbf24; }
.terminal-dot--green  { background: #10b981; }

.terminal-card__title {
  margin-left: auto;
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}

.terminal-card__body {
  padding: var(--space-5);
  color: var(--text-secondary);
  line-height: 1.8;
}

.terminal-card__body p {
  margin: 0;
}

.terminal-card__body .prompt {
  color: var(--accent-text);
}

.terminal-card__body .output {
  color: var(--text);
  padding-left: 0;
}

.terminal-card__body .key  { color: var(--accent-text); }
.terminal-card__body .str  { color: #fbbf24; }
.terminal-card__body .ok   { color: var(--accent-text); }

.terminal-card__body .caret {
  color: var(--accent-text);
  animation: blink 1s steps(2) infinite;
}

/* --- Sections ------------------------------------------------------------ */
.section {
  padding-block: clamp(3.5rem, 5vw, 4.25rem);
  position: relative;
}

.section__header {
  max-width: 720px;
  margin-bottom: var(--space-7);
}

.section__eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--accent-text);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-3);
}

.section__title {
  text-wrap: balance;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: var(--space-3);
}

.section__subtitle {
  color: var(--text-secondary);
  font-size: var(--fs-md);
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--fs-body-sm);
  min-height: 48px;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease), transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn--primary {
  background: var(--accent);
  color: #ffffff;
}
.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn--primary:active { transform: translateY(0) scale(0.98); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent-text);
  background: var(--accent-glow);
}

.btn:focus-visible {
  outline-offset: 4px;
}

/* --- About --------------------------------------------------------------- */
.section__title--center {
  text-align: center;
  margin-bottom: var(--space-7);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-7);
  align-items: start;
}

.about__img {
  width: 100%;
  max-width: 340px;
  height: auto;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  margin-inline: auto;
}

.about__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.about__text {
  font-size: var(--fs-md);
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 60ch;
}

.about__text + .about__text {
  margin-top: var(--space-4);
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

.about__stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.about__stat-value {
  font-size: var(--fs-2xl);
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-text);
  letter-spacing: -0.02em;
  line-height: 1;
}

.about__stat-label {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.4;
}

.about__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}

.btn--download {
  padding: 16px 32px;
  font-size: var(--fs-base);
}

/* --- Skills -------------------------------------------------------------- */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.skill-card:hover {
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
  transform: translateY(-2px);
}

.skill-card__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.skill-card__icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--accent-glow);
  color: var(--accent-text);
  border-radius: var(--radius-sm);
}

.skill-card__icon svg {
  width: 20px;
  height: 20px;
}

.skill-card__title {
  font-size: var(--fs-md);
  font-weight: 600;
}

.skill-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.skill-bar__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.skill-bar__pct {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--accent-text);
}

.skill-bar__track {
  position: relative;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.skill-bar__fill {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  background: var(--accent);
  border-radius: inherit;
  transform-origin: left;
  animation: bar-fill 1.2s var(--ease-out) both;
}

@keyframes bar-fill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* --- Experience (grid for one-glance view) ------------------------------ */
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.timeline__item {
  display: flex;
  flex-direction: column;
}

.timeline__marker,
.timeline__dot,
.timeline__line {
  display: none;
}

.timeline__card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease), background var(--duration) var(--ease);
  height: 100%;
}

.timeline__item--featured .timeline__card {
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
  background: var(--bg-card-strong);
}

.timeline__card:hover {
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
  transform: translateY(-2px);
}

.timeline__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.timeline__role {
  font-size: var(--fs-md);
  font-weight: 600;
  margin: 0 0 2px 0;
  color: var(--text);
  line-height: 1.3;
}

.timeline__company {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--accent-text);
  margin: 0;
}

.timeline__period {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
}

.timeline__period svg {
  width: 13px;
  height: 13px;
}

.timeline__bullets {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline__bullets li {
  position: relative;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: var(--fs-body-sm);
  line-height: 1.55;
}

.timeline__bullets li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-text);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

@media (max-width: 768px) {
  .timeline { grid-template-columns: 1fr; }
}

/* --- Badge --------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: var(--bg-card-strong);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.badge--accent {
  background: var(--accent-glow);
  color: var(--accent-text-hover);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
}

.badge__dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* --- Education cards ----------------------------------------------------- */
.edu__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: var(--space-4);
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.edu-card:hover {
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
  transform: translateY(-2px);
}

.edu-card__head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.edu-card__icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--accent-glow);
  color: var(--accent-text);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.edu-card__icon svg {
  width: 20px;
  height: 20px;
}

.edu-card__title {
  font-size: var(--fs-base);
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
}

.edu-card__sub {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin: 0;
}

.edu-card__body {
  color: var(--text-secondary);
  font-size: var(--fs-body-sm);
  line-height: 1.55;
}

.edu-card--featured {
  position: relative;
  border-color: color-mix(in oklab, var(--accent) 35%, var(--border));
  background: var(--bg-card);
}

.edu-card--featured .edu-card__icon {
  background: var(--accent-glow);
  color: var(--accent-text);
}

.link {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--duration) var(--ease);
}
.link:hover { color: var(--accent-text-hover); }

/* --- Contact ------------------------------------------------------------- */
.contact__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.contact-card {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--space-4);
  row-gap: 2px;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease), background var(--duration) var(--ease);
  color: inherit;
}

.contact-card:not(.contact-card--static):hover {
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
  transform: translateY(-2px);
  background: var(--bg-card-strong);
}

.contact-card__icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--accent-glow);
  color: var(--accent-text);
  border-radius: var(--radius-sm);
  grid-row: 1 / span 2;
}

.contact-card__icon svg {
  width: 22px;
  height: 22px;
}

.contact-card__label {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact-card__value {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--text);
}

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-7) var(--space-5);
  background: var(--bg-elevated);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-7);
  align-items: center;
  margin-bottom: var(--space-6);
}

.footer__logo {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: var(--space-2);
}

.footer__tag {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  max-width: 32ch;
}

.footer__nav ul,
.footer__socials {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer__nav ul {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-5);
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__nav a.link {
  text-decoration: none;
  background-image: none;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
}

.footer__nav a.link::after {
  content: none;
}

.footer__nav a.link:hover {
  color: var(--accent-text);
}

.footer__socials {
  flex-direction: row;
  gap: var(--space-2);
}

.footer__social {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.footer__social:hover {
  color: var(--accent-text);
  border-color: var(--accent);
}
.footer__social svg { width: 18px; height: 18px; }

.footer__legal p {
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.footer__legal {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-family: var(--font-mono);
}

/* --- Scroll-to-top ------------------------------------------------------- */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--bg-card-strong);
  border: 1px solid var(--border-strong);
  color: var(--text);
  box-shadow: var(--shadow-md);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease), visibility 0s linear var(--duration), background var(--duration) var(--ease), color var(--duration) var(--ease);
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease), visibility 0s linear 0s, background var(--duration) var(--ease), color var(--duration) var(--ease);
}

.scroll-top:hover {
  background: var(--accent);
  color: #fff;
}

.scroll-top svg {
  width: 18px;
  height: 18px;
}

/* --- Publications -------------------------------------------------------- */
.pubs__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-7);
}

.pub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease), background var(--duration) var(--ease);
  overflow: hidden;
}

.pub-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, transparent 70%, color-mix(in oklab, var(--accent) 5%, transparent));
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}

.pub-card:hover {
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
  transform: translateY(-2px);
}

.pub-card:hover::before {
  opacity: 1;
}

.pub-card--featured {
  border-color: color-mix(in oklab, var(--accent) 30%, var(--border));
  background: var(--bg-card);
}

.pub-card--featured::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, transparent 60%, color-mix(in oklab, var(--accent) 8%, transparent));
}

.pub-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.pub-card__type {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.pub-card__title {
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.pub-card__authors {
  margin: 0;
  font-size: var(--fs-body-sm);
  color: var(--text-secondary);
}

.pub-card__abstract {
  font-size: var(--fs-body-sm);
  color: var(--text-secondary);
  line-height: 1.65;
}

.pub-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

.pub-card__doi {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.pub-card__doi svg {
  width: 14px;
  height: 14px;
  color: var(--accent-text);
}

.pub-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.pub-card__actions .btn {
  padding: 10px 16px;
  min-height: 44px;
  font-size: var(--fs-sm);
}

.pub-card__actions .btn svg {
  width: 16px;
  height: 16px;
}

/* --- Talks & Interviews -------------------------------------------------- */
.talks__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
}

.talk-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.talk-card:hover {
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
  transform: translateY(-2px);
}

.talk-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.talk-card__venue {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}

.talk-card__venue svg {
  width: 14px;
  height: 14px;
  color: var(--accent-text);
}

.talk-card__title {
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.talk-card__desc {
  color: var(--text-secondary);
  font-size: var(--fs-body-sm);
  line-height: 1.55;
  flex: 1;
}

.talk-card__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--accent-text);
  font-weight: 500;
  margin-top: auto;
  transition: gap var(--duration) var(--ease);
}

.talk-card__links {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-5);
  margin-top: auto;
}

.talk-card__link:hover {
  gap: var(--space-3);
}

.talk-card__link svg {
  width: 14px;
  height: 14px;
}

/* --- Reveal on scroll ---------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 960px) {
  .hero__container {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }
  .hero__visual {
    order: 2;
    max-width: 560px;
  }
  .photo-card {
    max-width: 300px;
    margin-inline: auto;
  }
  .floating-terminal {
    left: -5%;
    bottom: -10px;
  }
  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .about__img {
    max-width: 320px;
    margin-inline: auto;
  }
  .pubs__grid {
    grid-template-columns: 1fr;
  }
  .footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
}

@media (max-width: 420px) {
  .floating-terminal { display: none; }
}

@media (max-width: 720px) {
  :root { --header-h: 64px; }

  .nav { display: none; }
  .nav-toggle { display: flex; }

  .container { padding-inline: var(--space-4); }

  .hero { padding-top: calc(var(--header-h) + var(--space-7)); }

  .section { padding-block: var(--space-7); }
  .section__header { margin-bottom: var(--space-6); }

  .about__stats { gap: var(--space-3); }
  .about__stat-value { font-size: var(--fs-xl); }

  .skills__grid { grid-template-columns: 1fr; }
  .edu__grid { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }

  .timeline { grid-template-columns: 1fr; gap: var(--space-3); }

  .footer__legal { text-align: center; }
}

@media (max-width: 420px) {
  .btn { justify-content: center; }
}

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

  .skill-bar__fill { animation: none; transform: scaleX(1); }
  .reveal { opacity: 1; transform: none; }
}
/* =========================================================================
   v2 additions — readable sizes, new sections, measured fixes
   ========================================================================= */

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

/* Keep text visually stable while Poppins loads. */
body { font-size-adjust: from-font; }

/* Running text at 16px or more; nothing readable under 13px. */
.timeline__bullets li,
.edu-card__body,
.talk-card__desc,
.pub-card__abstract,
.about__text { font-size: var(--fs-base); }
.badge,
.timeline__period,
.talk-card__venue,
.pub-card__type,
.about__stat-label,
.footer__legal { font-size: var(--fs-xs); }
.pub-card__type { text-transform: none; letter-spacing: 0.01em; }

/* Section rhythm: one shared left edge per section. */
.subsection__title {
  font-size: var(--fs-md);
  font-weight: 600;
  margin: var(--space-7) 0 var(--space-4);
  color: var(--text);
}
.section__header + .subsection__title { margin-top: 0; }

/* --- Skills: groups with proof instead of percentage bars --------------- */
.skills__grid {
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.skill-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.skill-group:hover {
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
  transform: translateY(-2px);
}
/* The flex gap on .skill-group already spaces this label from the title. */
.skill-group__num {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent-text);
}
.skill-group__title {
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.3;
}
.skill-group__proof {
  font-size: var(--fs-body-sm);
  line-height: 1.5;
  color: var(--text-secondary);
}
.skill-group__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: var(--space-2);
}
.skill-tag {
  padding: 4px 10px;
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--text);
  background: color-mix(in oklab, var(--accent) 20%, var(--bg-card));
  border-radius: var(--radius-pill);
  transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease);
}
.skill-group:hover .skill-tag { background: color-mix(in oklab, var(--accent) 20%, transparent); }

/* --- Experience: current role spans the row, so six cards make three rows */
.timeline__item--featured { grid-column: 1 / -1; }
.timeline__item--featured .timeline__bullets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: var(--space-6);
}

/* --- Research: two balanced columns, real pictures ----------------------- */
.pubs__grid { grid-template-columns: repeat(2, 1fr); align-items: stretch; }
.pub-card__media {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: left top;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}
.pub-card__targets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.pub-card__targets li {
  padding: 4px 10px;
  font-size: var(--fs-xs);
  background: color-mix(in oklab, var(--accent) 14%, transparent);
  border-radius: var(--radius-pill);
}
.writing-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
.writing-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.writing-item:hover {
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
  transform: translateY(-2px);
}
.writing-item--text { grid-template-columns: 1fr; }
.writing-item__img {
  width: 112px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.writing-item__title { font-weight: 600; line-height: 1.35; }
a.writing-item__title:hover { color: var(--accent-text); }
.writing-item__meta { margin-top: 4px; font-size: var(--fs-sm); color: var(--text-secondary); line-height: 1.45; }

/* --- Talks: the smart-contract talk carries its own photograph ---------- */
.talk-card__img {
  display: block;
  width: calc(100% + 2 * var(--space-5));
  max-width: none;
  margin: calc(-1 * var(--space-5)) calc(-1 * var(--space-5)) var(--space-5);
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

/* --- Education & certifications: icon | text, two clear groups ---------- */
.edu-card__head {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--space-3);
  align-items: start;
}
.edu-card__text { min-width: 0; }
.edu-card__sub { font-family: var(--font-sans); font-size: var(--fs-sm); line-height: 1.45; color: var(--text-secondary); }
.edu-card__year { color: var(--accent-text); font-weight: 600; }
.edu__grid--two { grid-template-columns: repeat(2, 1fr); }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 960px) {
  .skills__grid { grid-template-columns: repeat(2, 1fr); }
  .pubs__grid, .writing-list { grid-template-columns: 1fr; }
  .timeline__item--featured .timeline__bullets { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .skills__grid, .edu__grid--two { grid-template-columns: 1fr; }
  .about__stats { grid-template-columns: repeat(2, 1fr); row-gap: var(--space-5); }
  .writing-item { grid-template-columns: 88px 1fr; }
  .writing-item__img { width: 88px; }
  .writing-item--text { grid-template-columns: 1fr; }
}

/* Width/height attributes would otherwise fix the rendered height; let aspect-ratio decide. */
.pub-card__media,
.talk-card__img,
.writing-item__img,
.about__img { height: auto; }
/* Tags follow the proof line directly instead of sinking to the card's foot. */
.skill-group__tags { margin-top: 0; }
/* White on the brand blue measured 4.3:1; one step darker clears 4.5:1. */
.btn--primary { background: var(--accent); }
.btn--primary:hover { background: var(--accent-hover); }
/* Eight certifications: two full rows of four on wide screens, pairs on tablets. */
.edu__grid:not(.edu__grid--two) { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .edu__grid:not(.edu__grid--two) { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .edu__grid:not(.edu__grid--two) { grid-template-columns: 1fr; } }

/* Phones: keep the copyright line clear of the floating scroll-top button (44px button + 24px offset). */
@media (max-width: 720px) {
  .footer__legal { padding-bottom: calc(44px + var(--space-5) + var(--space-3)); }
}

/* =========================================================================
   R15 additions: peak-section air, collapsible chips, compact certs, closing ask
   ========================================================================= */
#experience { padding-block: clamp(4rem, 6vw, 5rem); }
@media (max-width: 720px) {
  #experience { padding-block: var(--space-7); }
}

/* Skill chips: show six, the rest behind a toggle (all visible without JS). */
.skill-group.is-collapsible:not(.is-open) .skill-tag:nth-child(n+7) { display: none; }
.skill-group__more {
  align-self: flex-start;
  min-height: 44px;
  padding: var(--space-2) 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  cursor: pointer;
}
.skill-group__more:hover { color: var(--accent-text-hover); }
.skill-group__more:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

/* Certifications as a compact two-column list. */
.edu__grid.cert-list {
  grid-template-columns: repeat(2, 1fr);
  column-gap: var(--space-7);
  row-gap: 0;
}
.cert-list .edu-card {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: var(--space-4) 0;
}
.cert-list .edu-card:hover { transform: none; border-color: var(--border); }
.cert-list .edu-card__icon { display: none; }
.cert-list .edu-card__head { grid-template-columns: 1fr; }
@media (max-width: 720px) {
  .edu__grid.cert-list { grid-template-columns: 1fr; }
}

/* Contact: the email is the closing ask. */
.contact-card--primary {
  grid-column: 1 / -1;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.contact-card--primary .contact-card__icon { background: rgb(255 255 255 / 0.18); color: #fff; }
.contact-card--primary .contact-card__label,
.contact-card--primary .contact-card__value { color: #fff; }
.contact-card--primary .contact-card__value { font-size: var(--fs-lg); }
.contact-card.contact-card--primary:hover {
  background: color-mix(in oklab, var(--accent) 85%, #000);
  border-color: color-mix(in oklab, var(--accent) 85%, #000);
}
.contact-card--primary:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}
@media (max-width: 720px) {
  .contact__grid { grid-template-columns: 1fr; }
}

/* R16 proportions ---------------------------------------------------------- */
@media (min-width: 960px) {
  #contact .container {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    column-gap: var(--space-8);
    align-items: start;
  }
  #contact .section__header { margin-bottom: 0; }
  #contact .contact__grid { gap: var(--space-3); }

  .timeline__item--featured .timeline__card {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    grid-template-areas: "head bullets" "period bullets";
    grid-template-rows: auto 1fr;
    column-gap: var(--space-7);
    align-items: start;
  }
  .timeline__item--featured .timeline__head { grid-area: head; }
  .timeline__item--featured .timeline__period { grid-area: period; }
  .timeline__item--featured .timeline__bullets {
    grid-area: bullets;
    display: flex;
    flex-direction: column;
    max-width: 75ch;
  }
}
.pub-card { padding: var(--space-5); }
.pub-card__title { font-size: var(--fs-md); }
.pub-card__media { aspect-ratio: 2.1 / 1; }
.talk-card { gap: var(--space-2); }
.talk-card__title { font-size: var(--fs-base); }
.talk-card__desc { font-size: var(--fs-body-sm); }
.pub-card:has(.pub-card__media) { gap: var(--space-2); }
.pub-card__targets {
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}
@media (min-width: 960px) {
  /* 514 wide: the experience list wraps near 75 characters */
  .timeline__item--featured .timeline__bullets { max-width: 66ch; }
}
.talk-card { padding-bottom: var(--space-4); }
.talk-card__img { margin-bottom: var(--space-3); }
.talk-card__desc { line-height: 1.5; }
img.pub-card__media { object-position: center 85%; }

/* Blob accent fill (was an inline style attribute; moved here for the CSP). */
.photo-card__fill { fill: var(--accent); }
