:root {
  /* Material-inspired semantic tokens: neutral surfaces + Android green accent */
  --bg: #111214;
  --fg: #eceef0;
  --muted: #c3c7cc;
  --faint: #8b9097;
  --line: #2c2f34;
  --accent: #56d98b;
  --accent-strong: #a1f2bd;
  --accent-soft: #183a29;
  --secondary: #d5b86a;
  --card: #18191c;
  --surface: #1d1f23;
  --surface-variant: #24272b;
  --surface-container: #212429;
  --surface-container-high: #2a2d31;
  --on-surface: #f2f3f5;
  --on-primary: #111214;
  --outline: rgba(236, 238, 240, .12);
  --color-scheme: dark;
  --shadow: 0 12px 32px rgba(0, 0, 0, .35);
  --highlight: rgba(255, 255, 255, .045);
  --glow-a: rgba(86, 217, 139, .08);
  --glow-b: rgba(213, 184, 106, .04);
  --danger: #ff8f8a;
  --dots: rgba(86, 217, 139, .13);
  --track-off: color-mix(in srgb, var(--surface) 92%, var(--card));
  --track-on: color-mix(in srgb, var(--accent-soft) 80%, var(--surface));
  color-scheme: var(--color-scheme);
  --display: "Sora", "Instrument Sans", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
[data-theme="light"] {
  --bg: #f2f3f1;
  --fg: #111214;
  --muted: #404b52;
  --faint: #667177;
  --line: #d9dedd;
  --accent: #237a4b;
  --accent-strong: #17623a;
  --accent-soft: #e5f4ea;
  --secondary: #9a6b1f;
  --card: #f8faf8;
  --surface: #eef2ef;
  --surface-variant: #f6f8f7;
  --surface-container: #f5f7f6;
  --surface-container-high: #edf2ef;
  --on-surface: #111214;
  --on-primary: #f8faf8;
  --outline: rgba(17, 18, 20, .08);
  --color-scheme: light;
  --shadow: 0 1px 2px rgba(17, 18, 20, .04), 0 16px 34px rgba(17, 18, 20, .08);
  --highlight: rgba(255, 255, 255, .9);
  --glow-a: rgba(35, 122, 75, .09);
  --glow-b: rgba(154, 107, 31, .045);
  --danger: #b42318;
  --dots: rgba(35, 122, 75, .13);
  --track-off: color-mix(in srgb, var(--surface) 72%, white);
  --track-on: color-mix(in srgb, var(--accent-soft) 78%, white);
  color-scheme: var(--color-scheme);
}
* { box-sizing: border-box; }
::selection { background: color-mix(in srgb, var(--accent) 32%, transparent); color: var(--fg); }
/* ambient light: two very soft glows fixed behind the content, so long sections don't feel flat */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60vw 50vh at 8% 35%, var(--glow-a), transparent 70%), radial-gradient(55vw 45vh at 95% 85%, var(--glow-b), transparent 70%); }
/* theme switch cross-fade (js/theme.js uses the View Transitions API where supported) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }
[hidden] { display: none !important; } /* components set display: flex/grid, which would otherwise override the hidden attribute */
html { scroll-behavior: smooth; background: var(--bg); color-scheme: var(--color-scheme, dark); }
html[data-theme="light"] { color-scheme: light; }
body { min-height: 100svh; margin: 0; background: var(--bg) radial-gradient(var(--dots) 1.2px, transparent 1.4px) 0 0 / 22px 22px; color: var(--fg);
  font: 16.5px/1.65 var(--body); text-align: left; letter-spacing: 0;
  -webkit-font-smoothing: antialiased; transition: background .25s, color .25s; }
img, svg, video { display: block; max-width: 100%; }
a { color: var(--accent); }
nav { position: sticky; top: 14px; z-index: 10; width: min(calc(100% - 32px), 1180px); margin: 0 auto;
  background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
nav .in { padding: 9px 12px 9px 18px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
nav .brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; color: var(--fg); text-decoration: none; letter-spacing: -.03em; }
.monogram { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--accent);
  background: var(--accent-soft); color: var(--accent-strong); font-family: var(--mono); font-size: .68rem; font-weight: 600; letter-spacing: .02em; }
.brand-name { transition: opacity .3s, transform .3s, visibility .3s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
nav .brand { min-width: 0; }
@media (max-width: 400px) { .brand-name { font-size: .88rem; } }
nav.hide-brand .brand-name { opacity: 0; transform: translateX(-6px); visibility: hidden; }
/* Name animation (js/name-morph.js): the nav name stays in place and only its two parts show or hide;
   copies of "Sougandh" and "Manikkoth Paremmal" (.name-flyer) fly in from the cover and land on .bn-first / .bn-rest */
nav.morph .brand-name, nav.morph.hide-brand .brand-name { opacity: 1; visibility: visible; transform: none; }
nav.morph .bn-first, nav.morph .bn-rest { opacity: 0; }
nav.morph.name-landed .bn-first, nav.morph.name-landed .bn-rest { opacity: 1; }
.name-flyer { position: fixed; left: 0; top: 0; z-index: 11; visibility: hidden; pointer-events: none; transform-origin: 0 0; will-change: transform;
  font-family: var(--display); font-weight: 800; letter-spacing: -.035em; line-height: normal; white-space: nowrap; color: var(--fg); }
nav .menu { display: flex; gap: 2px; font-size: .9rem; align-items: center; margin-left: auto; }
nav .menu a { color: var(--muted); text-decoration: none; padding: 7px 11px; border-radius: 999px; transition: color .2s, background .2s; }
nav .menu a.active, nav .menu a:focus-visible { color: var(--accent-strong); background: var(--accent-soft); }
@media (hover: hover) { nav .menu a:hover { color: var(--accent-strong); background: var(--accent-soft); } }
nav .menu .nav-cta { margin-left: 8px; padding: 6px 15px; border: 1px solid var(--accent); color: var(--accent-strong); font-weight: 600; }
nav .menu .nav-cta:focus-visible, nav .menu .nav-cta:active { background: var(--accent); border-color: var(--accent); color: var(--on-primary); }
nav a:focus-visible, nav button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.icon-btn { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--fg); cursor: pointer; }
.icon-btn:focus-visible { background: var(--accent-soft); color: var(--accent-strong); }
@media (hover: hover) { .icon-btn:hover, nav .menu .nav-cta:hover { background: var(--accent-soft); color: var(--accent-strong); } nav .menu .nav-cta:hover { background: var(--accent); color: var(--on-primary); } }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Theme switch: sun and moon side by side, the green knob sits under the active theme */
.theme-toggle { position: relative; display: inline-flex; align-items: center; flex: none; width: 70px; height: 48px; padding: 9px 3px; margin-right: 2px;
  border: 0; border-radius: 999px; background: transparent; color: var(--faint); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.theme-toggle:after { content: ""; position: absolute; inset: 5px 0; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.theme-toggle:before { content: ""; position: absolute; top: 9px; left: 3px; z-index: 1; width: 31px; height: 30px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid var(--accent); transform: translateX(31px); transition: transform .25s ease; }
[data-theme="light"] .theme-toggle:before { transform: none; }
.theme-toggle svg { position: relative; z-index: 2; width: 31px; height: 30px; padding: 4px 5px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: color .25s; }
.theme-toggle .moon, [data-theme="light"] .theme-toggle .sun { color: var(--accent-strong); }
[data-theme="light"] .theme-toggle .moon { color: var(--faint); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .theme-toggle:hover { border-color: var(--accent); } }

/* Phone bottom navigation (Material 3 navigation bar) */
.tabbar { display: none; }
@media (max-width: 700px) {
  html, body { overflow-x: hidden; }
  body { text-align: left; }
  .tabbar { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
    width: auto; height: calc(68px + env(safe-area-inset-bottom)); margin: 0; border-radius: 0; border: 0; border-top: 1px solid var(--line);
    padding: 8px 6px env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); box-shadow: 0 -8px 24px rgba(0, 0, 0, .18); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 52px; padding: 2px 0;
    color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; letter-spacing: .01em; -webkit-tap-highlight-color: transparent; }
  .tab-icon { display: grid; place-items: center; width: 56px; height: 30px; border-radius: 999px; transition: background .2s; }
  .tab-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a.active { color: var(--accent-strong); }
  .tabbar a.active .tab-icon { background: var(--accent-soft); }
  .tabbar a:focus-visible { outline: none; }
  .tabbar a:focus-visible .tab-icon { outline: 2px solid var(--accent); outline-offset: 1px; }
  .tabbar a:active .tab-icon { background: var(--accent-soft); }
}
.menu-toggle { display: none; }
.bars, .bars:before, .bars:after { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s, opacity .2s; }
.bars { position: relative; }
.bars:before, .bars:after { content: ""; position: absolute; left: 0; }
.bars:before { top: -6px; }
.bars:after { top: 6px; }
nav.menu-open .bars { background: transparent; }
nav.menu-open .bars:before { transform: translateY(6px) rotate(45deg); }
nav.menu-open .bars:after { transform: translateY(-6px) rotate(-45deg); }
.skip-link { position: absolute; left: 16px; top: -64px; z-index: 30; padding: 10px 16px; border-radius: 12px; background: var(--accent); color: var(--on-primary); font-weight: 700; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 12px; }
@media (max-width: 1080px) and (min-width: 961px) { .brand-name { display: none; } }
@media (max-width: 960px) {
  nav .in { flex-wrap: wrap; row-gap: 0; }
  .nav-actions { margin-left: auto; }
  .menu-toggle { display: grid; }
  nav .menu { order: 3; display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 2px; margin: 8px 0 2px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 1rem; }
  nav.menu-open .menu { display: flex; animation: menu-in .2s ease both; }
  nav .menu a { padding: 12px 14px; border-radius: 14px; }
  nav .menu a.active { box-shadow: inset 3px 0 0 var(--accent); }
  nav .menu .nav-cta { margin: 8px 0 4px; text-align: center; background: var(--accent); color: var(--on-primary); }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
main { width: min(100% - 32px, 1180px); min-height: calc(100svh - 90px); margin: 0 auto; padding: clamp(72px, 10vw, 140px) 0 56px; }
.cover { position: relative; width: 100vw; aspect-ratio: 3 / 1; max-height: 460px; background: transparent; margin: clamp(-140px, -10vw, -72px) 0 0; left: 50%; overflow: hidden; transform: translateX(-50%); }
/* the cover iframe is transparent, so the page background runs through it; its bottom edge fades out with a mask
   (to transparent, not to a flat colour, so no band shows over the dotted background) */
.cover iframe { -webkit-mask-image: linear-gradient(180deg, #000 86%, transparent); mask-image: linear-gradient(180deg, #000 86%, transparent); position: absolute; left: 50%; top: 50%; width: var(--cover-w, 1500px); height: 500px; border: 0; pointer-events: none;
  transform-origin: center; transform: translate(-50%, -50%) scale(var(--cover-scale, 1)); }
.hero { position: relative; margin-top: 16px; }
.hero:after { display: none; content: ""; position: absolute; width: 180px; height: 180px; right: 5%; top: -34px; z-index: -1;
  border-radius: 48% 52% 56% 44%; background: var(--accent-soft); opacity: .7; filter: blur(1px); }
.eyebrow { display: inline-flex; color: var(--accent-strong); background: var(--accent-soft); border-radius: 999px;
  font-family: var(--mono); font-weight: 600; font-size: .8rem; border: 1px solid var(--line); padding: 5px 13px; margin: 0 0 18px; }
h3, .stat b { font-family: var(--display); }
h1 { font-family: var(--display); font-size: clamp(2.65rem, 8vw, 4.8rem); line-height: 1.02; margin: 0 0 22px; font-weight: 800; letter-spacing: -.03em; max-width: 960px; }
h1 .name { color: var(--secondary); }
@media (min-width: 701px) { h1 .name { white-space: nowrap; } }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 670px; margin: 0; }
/* hiring summary under the headline: role, stack and availability, readable in the first few seconds */
.summary { margin: -6px 0 16px; max-width: 720px; font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.5; font-weight: 500; color: var(--fg); }
.hero-stack { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; font-family: var(--mono); font-size: .86rem; font-weight: 600; color: var(--accent-strong); }
.hero-stack li:not(:last-child)::after { content: "·"; margin: 0 10px; color: var(--faint); font-weight: 400; }
.availability { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; font-size: .95rem; color: var(--muted); }
.open-roles::before { content: "·"; margin-right: 10px; color: var(--faint); }
.availability { flex-wrap: wrap; column-gap: 10px; }
.status-dot.off { background: var(--faint); box-shadow: none; animation: none; }
.status-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); animation: status-pulse 2.4s ease-in-out infinite; }
@keyframes status-pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 0%, transparent); } }
.lead.intro { margin-top: 30px; font-size: 1.05rem; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 10px 19px; border-radius: 999px; font-weight: 700;
  text-decoration: none; border: 1px solid var(--line); color: var(--fg); background: var(--card);
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s; }
.btn:hover, .btn:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-primary); }
section { margin-top: clamp(72px, 10vw, 128px); scroll-margin-top: 90px; }
h2 { font-family: var(--mono); font-weight: 600; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint);
  margin: 0 0 22px; display: flex; align-items: center; gap: 12px; }
h2:after { content: ""; height: 1px; background: var(--line); flex: 1; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-top: 62px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 20px; box-shadow: inset 0 1px 0 var(--highlight); transition: transform .2s, border-color .2s, box-shadow .2s; }
.stat:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: var(--shadow); }
.stat b { display: block; font-size: 2rem; line-height: 1.1; color: var(--accent-strong); }
.stat span { color: var(--muted); font-size: .88rem; }
/* Experience timeline: dates | line with a dot per role | details. The line is green at the top (most recent) and fades out */
.timeline { position: relative; --date-col: 150px; --rail: calc(var(--date-col) + 28px); }
.timeline::before { content: ""; position: absolute; top: 8px; bottom: 24px; left: calc(var(--rail) - 1px); width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--line) 28%, var(--line) 82%, transparent); }
.job { position: relative; display: grid; grid-template-columns: var(--date-col) 1fr; column-gap: 56px; row-gap: 8px; padding: 0 0 38px; }
.job::before { content: ""; position: absolute; top: 5px; left: calc(var(--rail) - 7px); width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 0 0 5px var(--bg); transition: background .2s, transform .2s; }
.job:first-child::before { background: var(--accent); box-shadow: 0 0 0 5px var(--bg), 0 0 0 9px color-mix(in srgb, var(--accent) 22%, transparent); }
@media (hover: hover) { .job:hover::before { background: var(--accent); transform: scale(1.15); } }
.job .when { padding-top: 2px; text-align: right; color: var(--faint); font-family: var(--mono); font-size: .82rem; }
.job h3 { margin: 0; font-size: 1.13rem; }
.job .org { color: var(--secondary); margin: 2px 0 8px; font-weight: 600; }
.job ul { margin: 0; padding-left: 18px; color: var(--muted); }
.job li { margin: 4px 0; }
.job .more { display: none; }
.job.expanded .more { display: list-item; }
.job-toggle { min-height: 48px; border: 0; background: none; color: var(--accent); cursor: pointer; font: inherit; font-weight: 700; padding: 5px 0; }
.job-toggle:hover, .job-toggle:focus-visible { color: var(--accent-strong); }
.skills { display: grid; gap: 14px; }
.skillrow { display: grid; grid-template-columns: 170px 1fr; gap: 8px 24px; }
.skillrow .label { color: var(--faint); font-size: .9rem; padding-top: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tags li { display: inline-flex; align-items: center; justify-content: center; border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 72%, var(--surface)); border-radius: 999px; padding: 5px 12px; color: var(--accent-strong);
  font-family: var(--mono); font-size: .77rem; line-height: 1.5; }
.tags li { transition: transform .2s, border-color .2s, background .2s; }
.tags li:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--accent-soft); }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: -8px 0 18px; }
.filter { min-height: 48px; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 13px; cursor: pointer; font: inherit; font-size: .86rem; }
.filter.active, .filter:hover, .filter:focus-visible { background: var(--accent-soft); color: var(--accent-strong); border-color: transparent; }
.grid { display: grid; gap: 16px; grid-auto-rows: minmax(var(--card-h), auto); --card-h: 405px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { min-height: 100%; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 24px;
  display: flex; flex-direction: column; box-shadow: var(--shadow), inset 0 1px 0 var(--highlight); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-7px); border-color: var(--accent); box-shadow: 0 16px 38px rgba(0, 0, 0, .25); }
.card h3 { margin: 0 0 6px; font-size: 1.08rem; }
.card p { margin: 0 0 14px; color: var(--muted); font-size: .95rem; flex: 1; }
/* cards share one height (--card-h): the description and highlights shrink to fit, and js/main.js ends clipped text with "…" */
.card > * { flex-shrink: 0; }
.card > p:not(.project-card-summary), .card .project-card-highlights { flex: 1 1 0; min-height: 0; overflow: hidden; }
.card p { display: -webkit-box; -webkit-box-orient: vertical; }
.project-card-highlights li[hidden] { display: none; }
.project-card-highlights.clipped::after { content: "…"; color: var(--faint); }
.card .project-card-summary { flex: none; margin-bottom: 16px; color: var(--fg); }
.project-card-facts { display: grid; gap: 8px; flex: none; margin: 0 0 16px; padding: 12px 0; border-block: 1px solid var(--line); }
.project-card-facts div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; }
.project-card-facts b { color: var(--accent-strong); font-family: var(--mono); font-size: .72rem; }
.project-card-facts span { color: var(--muted); font-size: .88rem; }
.project-card-highlights { display: grid; align-content: start; gap: 5px; margin: 0 0 16px; padding-left: 18px; color: var(--muted); font-size: .88rem; }
.project-card-highlights li::marker { color: var(--accent); }
.card .stack { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 14px; padding: 0; }
.card .stack li { padding: 2px 9px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--secondary) 35%, transparent);
  color: var(--secondary); font-family: var(--mono); font-size: .72rem; font-weight: 600; line-height: 1.6; }
.card .stack li.more { border-style: dashed; color: var(--faint); border-color: var(--line); } /* "+N": the rest are on the project page */
/* round icon buttons for GitHub and Google Play links (cards and project pages) */
.icon-link { display: inline-grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg); transition: border-color .2s, color .2s, transform .2s; }
.icon-link svg { width: 18px; height: 18px; fill: currentColor; }
.icon-link.lg { width: 48px; height: 48px; }
.icon-link.lg svg { width: 22px; height: 22px; }
.icon-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .icon-link:hover { border-color: var(--accent); color: var(--accent-strong); transform: translateY(-2px); } }
.icon-link:active { border-color: var(--accent); color: var(--accent-strong); }
.card a { font-weight: 700; text-decoration: none; }
.card .note { color: var(--faint); font-size: .85rem; }
.card .award { align-self: flex-start; margin: -4px 0 12px; }
.award { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 8px; border-radius: 999px; vertical-align: middle;
  font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .01em; line-height: 1.5; color: var(--secondary);
  background: color-mix(in srgb, var(--secondary) 12%, transparent); border: 1px solid color-mix(in srgb, var(--secondary) 45%, transparent); }
.award svg { width: 13px; height: 13px; flex: none; }
.job .award { margin: 6px 0 4px; }
/* larger award on the timeline, so the recognition stands out */
.award.award-lg { margin: 4px 0 12px; padding: 6px 14px 6px 10px; font-size: .8rem; gap: 8px;
  background: color-mix(in srgb, var(--secondary) 16%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--secondary) 7%, transparent); }
.award.award-lg svg { width: 16px; height: 16px; }
/* Core skills stand out from the rest */
.skillrow.core .tags li { border-color: color-mix(in srgb, var(--accent) 58%, transparent); color: var(--accent-strong); background: color-mix(in srgb, var(--accent-soft) 80%, var(--surface)); }
/* platform badges (Android, Kotlin Multiplatform, Flutter) under project titles; built by js/platforms.js */
.platforms { --android: #3ddc84; --kmp: #a98bff; --flutter: #54c5f8;
  display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 2px 0 14px; padding: 0; }
[data-theme="light"] .platforms { --android: #13804a; --kmp: #6b3fe8; --flutter: #0167ad; }
.platforms li { --c: var(--fg); display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px;
  color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  font-family: var(--mono); font-size: .72rem; font-weight: 600; line-height: 1.5; }
.platforms svg { width: 14px; height: 14px; flex: none; fill: currentColor; }
.platforms .platform-android { --c: var(--android); }
.platforms .platform-kmp { --c: var(--kmp); }
.platforms .platform-flutter { --c: var(--flutter); }
.project-body > .platforms { margin: 0 0 16px; }
.project-body > .platforms li { padding: 5px 13px 5px 10px; font-size: .8rem; }
.project-body > .platforms svg { width: 16px; height: 16px; }
.card .links, .card > .note { margin-top: auto; }
.card .links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.about, .message-card { --contact-col: 250px; display: grid; grid-template-columns: var(--contact-col) minmax(0, 1fr); gap: 26px 36px; align-items: start; text-align: left; }
.about > div { display: flex; flex-direction: column; gap: 10px; min-width: 0; max-width: 680px; }
.contact .about-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 4px; font-family: var(--mono); font-size: .78rem; color: var(--accent-strong); }
.status-open { display: inline-flex; align-items: center; gap: 10px; }
.local-time { padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.about .about-lede { margin: 0; font-family: var(--body); font-size: 1rem; line-height: 1.7; font-weight: 400; letter-spacing: 0; color: var(--fg); max-width: none; text-align: left; }
.about-photo { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 22px;
  border: 1px solid var(--line); box-shadow: var(--shadow); }
.about figcaption { color: var(--faint); font-family: var(--mono); font-size: .72rem; margin-top: 10px; letter-spacing: .05em; text-transform: uppercase; }
.about figure { margin: 0; padding: 14px; transition: transform .3s, border-color .3s; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--card) 92%, transparent)); box-shadow: inset 0 1px 0 var(--highlight), var(--shadow); }
.facts { display: grid; gap: 8px; margin: 6px 0 12px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 4px 16px; }
.facts dt { color: var(--faint); font-family: var(--mono); font-size: .8rem; padding-top: 3px; }
.facts dd { margin: 0; color: var(--muted); }
.quotes { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.quote { margin: 0; position: relative; display: flex; flex-direction: column; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 26px 26px 22px; box-shadow: var(--shadow), inset 0 1px 0 var(--highlight); }
.quote-trigger { cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; }
.quote-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.quote-trigger:active { border-color: var(--accent); }
.quote-trigger blockquote p:not(:first-child) { display: none; }
.quote-trigger:after { content: "→"; position: absolute; top: 26px; right: 26px; color: var(--accent-strong); font-size: 1.25rem; line-height: 1; font-weight: 700; pointer-events: none; }
.quote-trigger[data-truncated="true"] blockquote p:first-child:after { content: "…"; }
@media (hover: hover) { .quote-trigger:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow), inset 0 1px 0 var(--highlight); } }
.quote blockquote { margin: 0; flex: 1; position: relative; padding-top: 30px; padding-right: 36px; color: var(--fg); font-size: .98rem; line-height: 1.6; }
.quote blockquote p { margin: 0 0 12px; }
.quote blockquote p:last-child { margin-bottom: 0; }
.quote blockquote:before { content: "\201C"; position: absolute; top: -14px; left: -4px; font-family: var(--display); font-size: 4rem; line-height: 1; color: var(--accent); }
.quote figcaption { display: flex; gap: 12px; align-items: center; padding-top: 16px; border-top: 1px solid var(--line); }
.quote figcaption > span:last-child { display: flex; flex-direction: column; line-height: 1.35; }
.quote b { font-weight: 600; }
.quote .role { color: var(--muted); font-size: .88rem; }
.quote .rel { color: var(--faint); font-family: var(--mono); font-size: .72rem; margin-top: 2px; }
.initials { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong);
  border: 1px solid var(--line); font-family: var(--mono); font-size: .8rem; font-weight: 600; }
.quotes-more { margin: 18px 0 0; }
.quotes-more a { font-weight: 700; text-decoration: none; }
.recommendation-dialog { width: min(720px, calc(100% - 32px)); max-height: min(82vh, 760px); padding: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--card); color: var(--fg); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); overflow: hidden; }
/* open dialog is a column: title bar and nav stay put, and only the recommendation text scrolls */
.recommendation-dialog[open] { display: flex; flex-direction: column; }
.recommendation-bar, .recommendation-nav { flex: none; }
.recommendation-dialog::backdrop { background: rgba(6, 7, 8, .72); backdrop-filter: blur(4px); }
.recommendation-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px 14px 24px; border-bottom: 1px solid var(--line); }
.recommendation-title { margin: 0; font-family: var(--display); font-size: 1.1rem; font-weight: 700; }
.recommendation-close { display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--fg); font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.recommendation-close:hover, .recommendation-close:focus-visible { border-color: var(--accent); color: var(--accent); }
.recommendation-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 24px; }
.recommendation-content blockquote { margin: 0 0 22px; color: var(--fg); font-size: 1rem; line-height: 1.7; }
.recommendation-content blockquote p { margin: 0 0 14px; }
.recommendation-content blockquote p:last-child { margin-bottom: 0; }
.recommendation-content figcaption { display: flex; gap: 12px; align-items: center; padding-top: 18px; border-top: 1px solid var(--line); }
.recommendation-content figcaption > span:last-child { display: flex; flex-direction: column; line-height: 1.35; }
.recommendation-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 16px 24px 24px; border-top: 1px solid var(--line); }
.recommendation-nav-button { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: 18px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, transform .2s; }
.recommendation-prev small::before, .recommendation-next small::after { color: var(--faint); font-size: .95rem; font-weight: 700; }
.recommendation-prev small::before { content: "← "; }
.recommendation-next small::after { content: " →"; }
.recommendation-nav-button:last-child { align-items: flex-end; text-align: right; }
.recommendation-nav-button small i { font-style: normal; }
.recommendation-nav-button small { font-family: var(--mono); font-size: .72rem; color: var(--faint); white-space: nowrap; }
.recommendation-nav-button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--accent-strong); }
.recommendation-nav-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .recommendation-nav-button:hover { border-color: var(--accent); transform: translateY(-3px); } }
/* phones: full screen, like the résumé dialog, with compact side-by-side Previous/Next buttons */
@media (max-width: 560px) {
  .recommendation-dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .recommendation-bar { padding: 10px 12px 10px 20px; padding-top: max(10px, env(safe-area-inset-top)); }
  .recommendation-content { padding: 20px; }
  .recommendation-content blockquote { font-size: 1.02rem; }
  .recommendation-nav { gap: 10px; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .recommendation-nav-button { padding: 10px 14px; border-radius: 14px; }
  .recommendation-nav-button small { font-size: .68rem; }
  .recommendation-nav-button small i { display: none; } /* "Previous" / "Next" only */
  .recommendation-nav-button span { font-size: .9rem; }
}
html:has(.recommendation-dialog[open]) { overflow: hidden; }
.contact { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, var(--card)), var(--card) 58%); border: 1px solid var(--line);
  border-radius: 28px; padding: 30px; box-shadow: var(--shadow), inset 0 1px 0 var(--highlight); }
.contact p { color: var(--muted); margin: 0 0 18px; max-width: none; }
.contact .cta { margin-top: 0; align-items: center; }
@media (hover: hover) { .about figure:hover { transform: rotate(-1.5deg) translateY(-4px); border-color: var(--accent); } }
/* email button with an attached copy button */
.email-group { display: inline-flex; }
.email-group .btn.primary { border-radius: 999px 0 0 999px; }
.copy-email { gap: 6px; border-radius: 0 999px 999px 0; border-left: 0; padding: 10px 16px 10px 14px; cursor: pointer; font: inherit; font-weight: 700; }
.copy-email svg { width: 16px; height: 16px; }
.copy-email.copied { color: var(--accent-strong); border-color: var(--accent); }
.contact .btn { box-shadow: 0 0 0 rgba(0,0,0,0); }
/* "Send me a message" form (js/contact.js) */
.message-card { margin-top: 16px; scroll-margin-top: 90px; }
.message-intro h3 { margin: 0 0 8px; font-size: 1.25rem; line-height: 1.3; }
.message-intro p { margin: 0; font-size: .95rem; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form .wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.topics legend { float: left; width: 100%; margin-bottom: 8px; padding: 0; font-family: var(--mono); font-size: .75rem; font-weight: 600; color: var(--faint); }
.topic { min-height: 40px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted);
  font: inherit; font-size: .88rem; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.topic:hover { border-color: var(--accent); color: var(--fg); transform: translateY(-2px); }
.topic:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.topic[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.topic[aria-pressed="true"]::before { content: "✓ "; }
.char-count { align-self: flex-end; color: var(--faint); font-family: var(--mono); font-size: .72rem; }
.char-count.near { color: var(--danger); }
.field input.valid, .field textarea.valid { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.field label { font-family: var(--mono); font-size: .75rem; font-weight: 600; color: var(--faint); }
.field input, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  color: var(--fg); font: inherit; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.botcheck { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.form-actions .btn { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.form-actions .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.field .req { color: var(--danger); }
.field .opt { font-weight: 400; opacity: .8; }
.field-hint { color: var(--danger); font-size: .82rem; }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.contact .form-hint { margin: 0; line-height: 1.4; font-size: .85rem; color: var(--faint); }
.contact .form-status { margin: 0; line-height: 1.4; font-size: .95rem; color: var(--muted); }
.form-status[data-kind="success"] { color: var(--accent-strong); font-weight: 600; }
.form-status[data-kind="error"] { color: var(--danger); }
.form-status a { color: inherit; font-weight: 700; }
@media (max-width: 860px) { .about, .message-card { --contact-col: 200px; } }
@media (max-width: 700px) {
  .message-card { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
}
/* Project cards: the whole card opens the project page. The title link is stretched over the card with ::after,
   and the card's other links sit above that layer so they still work. */
.card { position: relative; cursor: pointer; }
.card h3 { padding-right: 30px; }
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card a:not(.card-link) { position: relative; z-index: 2; }
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; border-color: var(--accent); }
.card:has(.card-link)::before { content: "→"; position: absolute; top: 22px; right: 22px; color: var(--accent-strong); font-weight: 700; font-size: 1.1rem;
  transition: transform .2s; pointer-events: none; }
@media (hover: hover) { .card:hover::before { transform: translateX(4px); } }
.card:active { border-color: var(--accent); }

/* Project page (project.html, filled by js/project-page.js) */
@view-transition { navigation: auto; } /* smooth cross-fade between the home page and project pages in supporting browsers */
.project-main { width: min(100% - 32px, 880px); min-height: auto; padding-top: 44px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 16px 8px 10px; border-radius: 999px;
  color: var(--fg); font-weight: 600; font-size: .95rem; text-decoration: none; transition: background .2s, color .2s; }
.back-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.back-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.back-link:active { background: var(--accent-soft); }
@media (hover: hover) { .back-link:hover { background: var(--accent-soft); color: var(--accent-strong); } .back-link:hover svg { transform: translateX(-3px); } }
.project-page .nav-actions { gap: 8px; }
.pd-kicker { margin: 0 0 8px; font-family: var(--mono); font-size: .8rem; font-weight: 600; color: var(--accent-strong); }
.pd-title { margin: 0 0 14px; font-family: var(--display); font-size: clamp(2.1rem, 6vw, 3.4rem); font-weight: 800; line-height: 1.05; letter-spacing: -.035em; }
.project-body > .award { margin: 0 0 14px; }
.pd-summary { margin: 0 0 24px; max-width: 700px; font-size: 1.15rem; color: var(--muted); }
.pd-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 20px; margin: 0 0 26px; padding: 18px 0; border-block: 1px solid var(--line); }
.pd-meta dt { font-family: var(--mono); font-size: .72rem; color: var(--faint); }
.pd-meta dd { margin: 2px 0 0; font-weight: 600; }
.pd-impact { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0 0 8px; }
.pd-impact .stat b { font-size: 1.8rem; }
.pd-shots { display: flex; gap: 16px; overflow-x: auto; margin: 26px 0 0; padding: 4px 2px 12px; scroll-snap-type: x mandatory; }
.pd-shots img { flex: none; width: 200px; height: auto; border-radius: 24px; border: 1px solid var(--line); box-shadow: var(--shadow); scroll-snap-align: start; }
.project-body h2.pd-heading { margin: 38px 0 14px; }
.pd-list { margin: 0; padding-left: 20px; color: var(--muted); }
.pd-list li { margin: 8px 0; }
.pd-list li::marker { color: var(--accent); }
.project-body .stack { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.project-body .stack li { padding: 3px 11px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--secondary) 35%, transparent);
  color: var(--secondary); font-family: var(--mono); font-size: .76rem; font-weight: 600; line-height: 1.6; }
.pd-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.pd-note { margin: 26px 0 0; color: var(--faint); font-size: .92rem; }
/* previous / next project; it's a <nav>, so undo the sticky top-bar styles */
.project-nav { position: static; width: auto; margin: 56px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  background: none; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; }
.project-nav a { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--card); text-decoration: none; transition: border-color .2s, transform .2s; }
.project-nav .pd-next { align-items: flex-end; text-align: right; }
.project-nav small { font-family: var(--mono); font-size: .72rem; color: var(--faint); }
.project-nav span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--accent-strong); }
.project-nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .project-nav a:hover { border-color: var(--accent); transform: translateY(-3px); } }
.project-page { padding-bottom: env(safe-area-inset-bottom); } /* no bottom tab bar on project pages */
@media (max-width: 700px) {
  .project-main { padding-top: 28px; }
  .pd-shots { margin-inline: -16px; padding-inline: 16px; }
  .pd-shots img { width: 160px; }
  .project-nav { grid-template-columns: 1fr; }
  .project-nav .pd-next { align-items: flex-start; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

.resume-dialog { width: min(920px, 100% - 32px); height: min(92vh, 1180px); max-width: none; max-height: none; padding: 0;
  border: 1px solid var(--line); border-radius: 22px; background: var(--card); color: var(--fg); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); overflow: hidden; }
.resume-dialog[open] { display: flex; flex-direction: column; }
.resume-dialog::backdrop { background: rgba(6, 7, 8, .72); backdrop-filter: blur(4px); }
html:has(.resume-dialog[open]) { overflow: hidden; }
.resume-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 22px; border-bottom: 1px solid var(--line); }
.resume-title { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.resume-actions { display: flex; align-items: center; gap: 8px; }
.resume-close { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--fg); font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.resume-close:hover, .resume-close:focus-visible { border-color: var(--accent); color: var(--accent); }
.resume-pdf { flex: 1; width: 100%; border: 0; background: #525659; }
.resume-pages { display: none; flex: 1; overflow: auto; padding: 14px; background: var(--surface); }
.resume-pages img { display: block; width: 100%; max-width: 820px; height: auto; margin: 0 auto 14px; border-radius: 6px; box-shadow: var(--shadow); }
.resume-dialog.pages .resume-pdf { display: none; }
.resume-dialog.pages .resume-pages { display: block; }
body { position: relative; }
main { position: relative; z-index: 1; }
.floaters { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.floater { --size: 52px; --gutter: max(6px, calc((100% - 1180px) / 4 - var(--size) / 2)); position: absolute; top: var(--y);
  width: var(--size); height: var(--size); display: grid; place-items: center; align-content: center; gap: 1px; border-radius: 15px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); opacity: .85;
  transform: rotate(var(--r)); animation: drift var(--d) ease-in-out var(--delay) infinite; }
.floater.l { left: calc(var(--gutter) + var(--dx)); }
.floater.r { right: calc(var(--gutter) - var(--dx)); }
.floater svg { width: 26px; height: 26px; display: block; }
.floater span { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .05em; line-height: 1; }
@keyframes drift { 0%, 100% { transform: translate(0, 0) rotate(var(--r)); } 33% { transform: translate(6px, -12px) rotate(calc(var(--r) * -.4)); } 66% { transform: translate(-5px, -5px) rotate(calc(var(--r) * 1.4)); } }
@media (max-width: 1300px) {
  .floater { --size: 38px; border-radius: 11px; opacity: .22; }
  .floater svg { width: 19px; height: 19px; }
  .floater.stack svg { width: 13px !important; height: 13px !important; }
  .floater span { font-size: 8px; }
}
@media (max-width: 700px) { .floater:nth-child(odd) { display: none; } }
footer { margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: .85rem; }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
.footer-links a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--muted); font-weight: 600; text-decoration: none; transition: color .2s; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--accent-strong); }
.footer-links .to-top span { display: inline-block; transition: transform .2s; }
.footer-links .to-top:hover span { transform: translateY(-3px); }
@media (max-width: 560px) { .site-footer { flex-direction: column-reverse; align-items: flex-start; } .footer-links { gap: 0 18px; } }
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
.hero { animation: hero-in .8s ease both; }
@keyframes hero-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (max-width: 700px) {
  .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  nav { position: sticky; top: 8px; z-index: 30; width: calc(100% - 20px); }
  nav .in { flex-wrap: nowrap; min-height: 56px; padding: 4px 8px 4px 12px; }
  nav .brand { flex: 1 1 auto; min-width: 0; }
  nav .brand-name { max-width: min(42vw, 220px); }
  .nav-actions { margin-left: auto; }
  main { width: calc(100% - 32px); padding-top: 72px; }
  .cover { margin-top: -72px; }
  .hero { margin-top: 12px; }
  .about { grid-template-columns: 1fr; text-align: left; }
  .about figure { width: min(220px, 70%); margin: 0 auto; }
  .about > div { width: 100%; }
  .facts div { grid-template-columns: 1fr; }
  h1 { font-size: clamp(2.45rem, 13vw, 4.2rem); }
  .lead { font-size: 1.05rem; }
  .skillrow { grid-template-columns: 1fr; }
  .project-card-facts div { grid-template-columns: 1fr; gap: 2px; }
  /* phones: the line runs down the left edge; date sits above each role */
  .timeline { --rail: 7px; }
  .job { grid-template-columns: 1fr; row-gap: 4px; padding: 0 0 30px 34px; }
  .job .when { text-align: left; padding-top: 0; }
  .hero:after { right: 0; width: 120px; height: 120px; }
  .contact { padding: 24px; }
  .resume-dialog { width: 100%; height: 100dvh; border: 0; border-radius: 0; }
  .resume-bar { padding-left: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* Phones: the bottom navigation bar replaces the top menu (kept last so it wins over the 960px menu rules) */
@media (max-width: 700px) {
  .menu-toggle, nav .menu, nav.menu-open .menu { display: none; }
  html { scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
}
