/* Eleftherios Platis — portfolio. Hand-written CSS that mirrors the original Lovable design. */

:root, [data-theme="dark"] {
  --radius: 0.75rem;
  --bg: oklch(0.20 0.035 255);
  --fg: oklch(0.95 0.008 255);
  --muted: oklch(0.80 0.018 255);
  --dim: oklch(0.72 0.022 255);
  --panel: oklch(0.25 0.035 255);
  --panel2: oklch(0.29 0.035 255);
  --plate: #f4f3ef;
  --line: oklch(0.80 0.018 255 / 0.20);
  --acc: #a7d3f7;
  --acc-ink: #a7d3f7;
  --on-acc: oklch(0.20 0.035 255);
  --ink: oklch(0.20 0.035 255);
  --glow: 0.13;
  --glow-warm: oklch(0.70 0.17 40);
  --glow-warm-amt: 0.09;
  --chip: rgba(167, 211, 247, 0.1);
  --chip-line: rgba(167, 211, 247, 0.25);
  --chip-ink: #cfe6fa;
  --sun: inline;
  --moon: none;
  --nav-glass: color-mix(in oklab, var(--acc) 14%, var(--panel) 86%);
  --nav-glass-border: color-mix(in oklab, var(--acc-ink) 35%, var(--line));
  --nav-glass-shadow: inset 0 1px 0 color-mix(in oklab, var(--fg) 14%, transparent), 0 2px 8px color-mix(in oklab, var(--bg) 12%, transparent);
  --shadow-surface: 0 8px 24px color-mix(in oklab, var(--fg) 8%, transparent);
  --font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --font-serif: "Lora", Georgia, serif;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f7f6f2;
  --fg: #111214;
  --muted: #5b5c58;
  --dim: #73746f;
  --panel: #ffffff;
  --panel2: #eeede8;
  --plate: #ffffff;
  --line: rgba(17, 18, 20, 0.09);
  --acc-ink: #2b74b3;
  --glow: 0.45;
  --glow-warm-amt: 0.22;
  --chip: rgba(167, 211, 247, 0.35);
  --chip-line: rgba(43, 116, 179, 0.25);
  --chip-ink: #1d5a8f;
  --sun: none;
  --moon: inline;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; border: 0 solid var(--line); }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-sans); line-height: 1.5; -webkit-font-smoothing: antialiased; transition: background .3s, color .3s; }
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--acc-ink); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type ---------- */
.page-title { font-size: 2rem; font-weight: 500; line-height: 1.14; }
.section-title { font-size: 1.75rem; font-weight: 500; line-height: 1.2; }
.item-title { font-size: 1.25rem; font-weight: 500; line-height: 1.25; }
.body-copy { font-size: 1rem; line-height: 1.65; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: var(--font-mono); }
.mono-xs { font-family: var(--font-mono); font-size: .75rem; }
.acc-ink { color: var(--acc-ink); }
.serif-em { font-family: var(--font-serif); font-style: italic; font-weight: 500; color: var(--acc-ink); }
.pretty { text-wrap: pretty; }
.balance { text-wrap: balance; }
.page-intro { margin-top: 3rem; }
.section-space { margin-top: 4rem; }
@media (min-width: 768px) {
  .page-title { font-size: 4rem; }
  .section-title { font-size: 2.25rem; }
  .item-title { font-size: 1.5rem; }
  .body-copy { font-size: 1.125rem; }
  .page-intro { margin-top: 5rem; }
  .section-space { margin-top: 6rem; }
}

/* ---------- Layout ---------- */
.page { position: relative; margin: 0 auto; display: flex; flex-direction: column; width: 100%; min-width: 0; max-width: 1440px; padding: .75rem 1rem 4rem; overflow-wrap: anywhere; }
@media (min-width: 640px) { .page { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 768px) { .page { padding: 2rem 2.5rem 4rem; } }
@media (min-width: 1024px) { .page { padding-left: 4rem; padding-right: 4rem; } }
.narrow { margin-left: auto; margin-right: auto; width: 100%; }
.w-880 { max-width: 880px; } .w-680 { max-width: 680px; } .w-1180 { max-width: 1180px; } .w-760 { max-width: 760px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; flex-shrink: 0; white-space: nowrap; border-radius: 999px; font-size: .875rem; font-weight: 500; height: 2.75rem; padding: 0 1.25rem; transition: background .2s, color .2s, opacity .2s, border-color .2s; }
.btn-primary { background: var(--fg); color: var(--bg); box-shadow: 0 1px 3px rgb(0 0 0 / .15); }
.btn-primary:hover { opacity: .9; }
.btn-outline { border: 1px solid var(--line); background: var(--bg); }
.btn-outline:hover { background: var(--panel2); }
.btn-lg { height: 3rem; padding: 0 1.5rem; font-size: 1rem; }
.btn-sm { height: 2.25rem; padding: 0 1rem; }
.btn-icon { width: 2.75rem; padding: 0; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header-wrap { position: sticky; top: .75rem; z-index: 50; }
@media (min-width: 768px) { .site-header-wrap { top: 2rem; } }
.site-header { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .5rem .75rem; border: 1px solid var(--line); background: color-mix(in oklab, var(--panel) 80%, transparent); border-radius: 28px; padding: .5rem .75rem; box-shadow: var(--shadow-surface); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
@media (min-width: 768px) { .site-header { grid-template-columns: minmax(0,1fr) auto auto; border-radius: 999px; padding: .75rem 1.25rem; } }
@media (min-width: 1280px) { .site-header { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); } }
.header-name { font-family: var(--font-serif); font-weight: 500; line-height: 1.4; font-size: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 4px; animation: header-name-enter 650ms cubic-bezier(.22,1,.36,1) both; }
.header-name em { color: var(--acc-ink); }
@media (min-width: 768px) { .header-name { font-size: 20px; } }
@keyframes header-name-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.main-nav { display: none; }
@media (min-width: 768px) { .main-nav { display: block; justify-self: start; } }
.main-nav-inner { display: flex; align-items: center; gap: .25rem; border: 1px solid var(--line); background: color-mix(in oklab, var(--panel2) 70%, transparent); border-radius: 999px; padding: 5px; font-size: .875rem; }
.nav-link { position: relative; isolation: isolate; border-radius: 999px; padding: .625rem .75rem; color: var(--muted); transition: color .2s; white-space: nowrap; }
@media (min-width: 1024px) { .nav-link { padding-left: 18px; padding-right: 18px; } }
.nav-link:hover { color: var(--fg); }
.nav-link[aria-current="page"] { color: var(--fg); font-weight: 500; }
.nav-glass { position: absolute; inset: 0; z-index: -1; border-radius: 999px; pointer-events: none; background: var(--nav-glass); border: 1px solid var(--nav-glass-border); box-shadow: var(--nav-glass-shadow); backdrop-filter: blur(14px) saturate(140%); transform-origin: left center; }
.header-right { display: flex; align-items: center; gap: .625rem; justify-self: end; }
@media (min-width: 768px) { .header-right { gap: .875rem; } }
.header-clock { display: none; white-space: nowrap; font-family: var(--font-mono); font-size: 13px; color: var(--dim); }
.header-clock b { color: var(--fg); font-weight: 400; }
.header-back { display: none; border: 1px solid var(--line); border-radius: 999px; padding: 9px 1rem; font-size: .875rem; }
@media (min-width: 1024px) { .header-clock, .header-back { display: inline-block; } }
.round-btn { display: flex; width: 2.5rem; height: 2.5rem; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); transition: background .2s, color .2s; }
.round-btn:hover { background: var(--acc); color: var(--on-acc); }
.show-sun { display: var(--sun); } .show-moon { display: var(--moon); }
.menu-btn { display: flex; }
@media (min-width: 768px) { .menu-btn { display: none; } }
.menu-icon { position: relative; width: 18px; height: 16px; }
.menu-icon span { position: absolute; left: 0; width: 18px; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform 280ms ease, opacity 180ms ease; }
.menu-icon span:nth-child(1) { top: 1px; } .menu-icon span:nth-child(2) { top: 7px; } .menu-icon span:nth-child(3) { top: 13px; }
[data-open="true"] .menu-icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
[data-open="true"] .menu-icon span:nth-child(2) { opacity: 0; transform: scaleX(.5); }
[data-open="true"] .menu-icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu { display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden; transform: translateY(-5px); transition: grid-template-rows 300ms cubic-bezier(.22,1,.36,1), opacity 220ms ease, transform 300ms ease, visibility 300ms; }
.mobile-menu[data-open="true"] { grid-template-rows: 1fr; opacity: 1; visibility: visible; transform: none; }
.mobile-menu > div { min-height: 0; overflow: hidden; }
.mobile-menu nav { margin-top: .5rem; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 28px; background: color-mix(in oklab, var(--panel) 95%, transparent); padding: .5rem; box-shadow: var(--shadow-surface); backdrop-filter: blur(24px); }
.mobile-menu a { border-radius: 999px; padding: .75rem 1rem; font-size: 15px; color: var(--muted); }
.mobile-menu a:hover { background: var(--panel2); color: var(--fg); }
.mobile-menu a[aria-current="page"] { background: var(--chip); color: var(--acc-ink); font-weight: 500; }
@media (min-width: 768px) { .mobile-menu { display: none; } }

/* ---------- Home ---------- */
.home { position: relative; min-height: 100vh; overflow-x: clip; }
.glows { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.glow-blob { position: absolute; width: 70vmax; height: 60vmax; left: calc(50% - 35vmax); top: calc(50% - 30vmax); will-change: transform; }
.glow-blue { background: radial-gradient(closest-side, color-mix(in oklab, var(--acc) calc(var(--glow) * 100%), transparent), transparent); transform: translate(45vw, -45vh); animation: glow-orbit 56s ease-in-out infinite; }
.glow-warm { background: radial-gradient(closest-side, color-mix(in oklab, var(--glow-warm) calc(var(--glow-warm-amt) * 100%), transparent), transparent); transform: translate(-45vw, 45vh); animation: glow-orbit 56s ease-in-out infinite; animation-delay: -28s; }
@keyframes glow-orbit { 0%,100% { transform: translate(45vw,-45vh); } 25% { transform: translate(45vw,45vh); } 50% { transform: translate(-45vw,45vh); } 75% { transform: translate(-45vw,-45vh); } }
.home .page { min-height: 100vh; }
.hero { position: relative; display: grid; min-width: 0; flex: 1; align-items: center; gap: 2.25rem; padding: 2.5rem 0; }
@media (min-width: 768px) { .hero { gap: 3rem; padding: 3rem 0; } }
@media (min-width: 1280px) { .hero { grid-template-columns: minmax(0,1fr) 420px; } }
.hero-copy { display: flex; min-width: 0; flex-direction: column; gap: 1.5rem; }
@media (min-width: 768px) { .hero-copy { gap: 2rem; } }
.chip-pill { display: inline-flex; align-items: center; gap: .625rem; align-self: flex-start; border-radius: 999px; border: 1px solid var(--chip-line); background: var(--chip); padding: .5rem 1rem .5rem .75rem; font-size: .875rem; color: var(--chip-ink); }
.pulse-dot { width: .5rem; height: .5rem; border-radius: 999px; background: var(--acc-ink); animation: pulse 2s ease infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(167,211,247,.7); } 70% { box-shadow: 0 0 0 10px rgba(167,211,247,0); } 100% { box-shadow: 0 0 0 0 rgba(167,211,247,0); } }
.greeting { font-size: 22px; font-weight: 500; overflow-wrap: normal; }
.greeting > span { display: flex; flex-direction: column; gap: .16em; line-height: 1.08; }
.greeting .nowrap { white-space: nowrap; }
.rotator { display: inline-block; transition: opacity .3s, transform .3s; }
.rotator.out { opacity: 0; transform: translateY(10px); }
@media (min-width: 640px) { .greeting { font-size: 38px; } }
@media (min-width: 768px) { .greeting { font-size: 46px; } }
@media (min-width: 1024px) { .greeting { font-size: 60px; } }
@media (min-width: 1280px) { .greeting { font-size: 42px; } }
@media (min-width: 1536px) { .greeting { font-size: 46px; } }
@media (max-width: 359px) { .greeting { font-size: 20px; } }
.hero-bio { max-width: 600px; color: var(--muted); white-space: pre-line; }
.btn-row { display: flex; flex-wrap: wrap; gap: .625rem; }
.previously { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; border-top: 1px solid var(--line); padding-top: 22px; font-size: 15px; }
.previously .label { font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; color: var(--dim); }

/* Project deck (home) */
.deck { display: flex; min-width: 0; flex-direction: column; gap: 1rem; }
.deck-stack { display: grid; touch-action: pan-y; user-select: none; }
.deck-stack img { pointer-events: none; -webkit-user-drag: none; }
.deck-card { grid-area: 1 / 1; align-self: stretch; display: flex; min-width: 0; flex-direction: column; gap: 1.25rem; border-radius: var(--radius); background: var(--acc); color: var(--on-acc); padding: .875rem .875rem 1.5rem; transform-origin: top; box-shadow: 0 30px 80px -20px rgba(43,116,179,.35); transition: transform 400ms cubic-bezier(.22,.8,.3,1), opacity 400ms cubic-bezier(.22,.8,.3,1); }
.deck-media { position: relative; height: 240px; overflow: hidden; border-radius: var(--radius); }
@media (min-width: 640px) { .deck-media { height: 280px; } }
.deck-badge { position: absolute; left: .875rem; top: .875rem; border-radius: 999px; background: var(--ink); color: var(--acc); padding: 7px .875rem; font-size: 13px; font-weight: 500; }
.deck-body { display: flex; flex-direction: column; gap: .625rem; padding: 0 .625rem; }
.deck-body .mono-xs { opacity: .7; }
.deck-desc { font-size: 15px; line-height: 1.5; opacity: .8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deck-tags { display: flex; flex-wrap: wrap; gap: .375rem; padding: 0 .625rem; }
.deck-tags span { border-radius: 999px; background: color-mix(in oklab, var(--ink) 10%, transparent); padding: .375rem .75rem; font-size: 13px; }
.deck-nav { display: flex; justify-content: flex-end; gap: .5rem; padding: 0 .25rem; }
.deck-prev, .deck-next { display: flex; width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; border-radius: 999px; font-size: 1.125rem; transition: transform .2s, color .2s, border-color .2s; }
.deck-prev { border: 1px solid var(--line); }
.deck-prev:hover { border-color: var(--acc-ink); color: var(--acc-ink); }
.deck-next { background: var(--acc); color: var(--on-acc); }
.deck-next:hover { transform: scale(1.05); }

/* Image placeholder */
.img-fill { width: 100%; height: 100%; object-fit: cover; }
.img-contain { width: 100%; height: 100%; object-fit: contain; }
.img-ph { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; background: var(--panel2); color: var(--dim); flex-direction: column; gap: .5rem; }
.img-ph::before { content: ""; width: 2.25rem; height: 2.25rem; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); }
.img-ph span { font-family: var(--font-mono); font-size: 11px; }

/* ---------- Projects index ---------- */
.projects-intro { display: flex; max-width: 1220px; flex-direction: column; gap: 1.5rem; }
.cat-word { display: inline; margin: 0 .125rem; border-radius: 999px; padding: 0 .5rem .25rem; font-size: inherit; line-height: 1.14; color: var(--acc-ink); transition: background .2s, color .2s; }
@media (min-width: 768px) { .cat-word { padding-left: 18px; padding-right: 18px; } }
.cat-word span { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.cat-word:hover { background: var(--chip); }
.filtering .cat-word { color: var(--dim); }
.filtering .cat-word:hover { color: var(--acc-ink); background: none; }
.cat-word.on, .filtering .cat-word.on { background: var(--acc); color: var(--on-acc); }
.segmented { display: flex; flex-wrap: wrap; gap: .25rem; align-self: flex-start; border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 5px; }
.segmented button { min-height: 2.75rem; border-radius: 999px; padding: .625rem .75rem; font-size: .875rem; font-weight: 500; color: var(--muted); transition: background .2s, color .2s; }
@media (min-width: 768px) { .segmented button { padding-left: 18px; padding-right: 18px; } }
.segmented button:hover { color: var(--fg); }
.segmented button.on { background: var(--fg); color: var(--bg); }
.cat-sections { display: flex; flex-direction: column; gap: 4rem; }
@media (min-width: 768px) { .cat-sections { gap: 6rem; } }
.cat-section { display: flex; flex-direction: column; gap: 1.75rem; }
.cat-section[hidden] { display: none; }
.cat-head { display: grid; grid-template-columns: minmax(0,1fr); align-items: end; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
@media (min-width: 768px) { .cat-head { grid-template-columns: minmax(0,1fr) auto; gap: 1.5rem; } }
.cat-head .blurb { max-width: 620px; color: var(--muted); margin-top: .625rem; display: block; }
.count-pill { display: none; border: 1px solid var(--line); border-radius: 999px; padding: .5rem .875rem; font-family: var(--font-mono); font-size: 13px; color: var(--dim); }
@media (min-width: 768px) { .count-pill { display: inline; } }
.card-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.p-card { display: flex; height: 380px; flex-direction: column; gap: .875rem; border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: .625rem .625rem 1.25rem; transition: transform .3s, background .3s, color .3s; }
@media (min-width: 768px) { .p-card { height: 440px; } }
.p-card:hover { transform: translateY(-.25rem); background: var(--acc); color: var(--on-acc); }
.p-card .media { position: relative; min-height: 0; flex: 1; overflow: hidden; border-radius: var(--radius); background: var(--panel2); }
.p-card .media img { transition: transform .5s; }
.p-card:hover .media img { transform: scale(1.05); }
.p-card .meta { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding: 0 .625rem; }
.p-card .meta > div { display: flex; min-width: 0; flex-direction: column; gap: .375rem; }
.p-card .mono-xs { opacity: .6; }
.p-card .arrow { display: flex; width: 42px; height: 42px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid currentColor; font-size: 17px; opacity: .7; }

/* ---------- Project page ---------- */
.p-top { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; font-size: .875rem; color: var(--muted); }
.chip { border-radius: 999px; border: 1px solid var(--chip-line); background: var(--chip); color: var(--chip-ink); padding: .375rem .75rem; }
.p-top .counter { margin-left: auto; font-family: var(--font-mono); font-size: .75rem; color: var(--dim); }
.p-facts { margin-top: 2.75rem; display: grid; grid-template-columns: 1fr; gap: 1.25rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; font-size: 15px; }
@media (min-width: 640px) { .p-facts { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
.p-facts div { display: flex; flex-direction: column; gap: .375rem; }
.p-facts .k { font-family: var(--font-mono); font-size: .75rem; color: var(--dim); }
.highlight { margin-top: 2rem; display: flex; max-width: 100%; flex-wrap: wrap; align-items: flex-end; gap: 1rem; align-self: flex-start; border-radius: var(--radius); background: var(--acc); color: var(--on-acc); padding: 1.75rem 2rem; }
.highlight .v { font-size: 2.25rem; font-weight: 500; line-height: 1.25; min-width: 0; }
@media (min-width: 768px) { .highlight .v { font-size: 3.75rem; } }
.highlight .l { padding-bottom: .25rem; font-size: 15px; }
.cover { margin: 3rem auto 0; display: block; aspect-ratio: 16 / 9; width: 100%; max-width: 1180px; overflow: hidden; border-radius: var(--radius); background: var(--panel2); cursor: zoom-in; }
.cover img { transition: transform .5s; }
.cover:hover img { transform: scale(1.02); }
.cover.ph { cursor: default; }
.to-deck { margin: 1rem auto 0; display: flex; width: 100%; max-width: 1180px; justify-content: flex-end; }
.p-sections { display: flex; flex-direction: column; gap: 3rem; }
.p-sections > div { display: flex; flex-direction: column; gap: .875rem; }
.p-sections h2 { font-family: var(--font-mono); font-size: .75rem; font-weight: 400; color: var(--acc-ink); }
.expandable { display: flex; flex-direction: column; align-items: flex-start; }
.clamp { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; -webkit-line-clamp: 5; }
@media (min-width: 768px) { .clamp { -webkit-line-clamp: 8; } }
.clamp-short { -webkit-line-clamp: 4; }
@media (min-width: 768px) { .clamp-short { -webkit-line-clamp: 6; } }
.read-more { margin-top: 1rem; }
.read-more[hidden] { display: none; }
.photos { display: grid; gap: 1rem; }
@media (min-width: 640px) { .photos { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.photo { overflow: hidden; border-radius: var(--radius); background: var(--panel2); aspect-ratio: 4 / 3; cursor: zoom-in; transition: opacity .2s; }
.photo:hover { opacity: .9; }
.photo img { padding: 1rem; }
@media (min-width: 640px) { .photo.wide { grid-column: span 2; aspect-ratio: 21 / 9; } }
.links h2 { padding-bottom: .875rem; font-family: var(--font-mono); font-size: .75rem; font-weight: 400; color: var(--dim); }
.links a { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 1rem; border-top: 1px solid var(--line); padding: 1.25rem 0; font-size: 1.125rem; transition: color .2s; }
.links a:hover { color: var(--acc-ink); }
.prev-next { display: grid; gap: 1rem; }
@media (min-width: 768px) { .prev-next { grid-template-columns: 1fr 1fr; } }
.prev-next a { display: flex; flex-direction: column; gap: .625rem; border-radius: var(--radius); padding: 1.75rem 2rem; }
.prev-next .prev { border: 1px solid var(--line); background: var(--panel); transition: background .2s; }
.prev-next .prev:hover { background: var(--panel2); }
.prev-next .next { align-items: flex-end; text-align: right; background: var(--fg); color: var(--bg); transition: opacity .2s; }
.prev-next .next:hover { opacity: .9; }
.prev-next .t { font-size: 1.5rem; font-weight: 500; }
.prev-next .next .mono-xs { opacity: .6; }
.lightbox { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: color-mix(in oklab, var(--bg) 95%, transparent); padding: 1rem; backdrop-filter: blur(4px); }
@media (min-width: 768px) { .lightbox { padding: 2.5rem; } }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 100%; max-width: 100%; border-radius: var(--radius); object-fit: contain; }
.lightbox .close { position: absolute; right: 1rem; top: 1rem; background: color-mix(in oklab, var(--panel) 90%, transparent); }

/* Slideshow */
.deck-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem; }
.slideshow { display: flex; flex-direction: column; gap: .75rem; outline: none; }
.slideshow:fullscreen { height: 100vh; justify-content: center; background: var(--fg); padding: 1.5rem; }
.slide-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel2); }
.slideshow:fullscreen .slide-stage { aspect-ratio: auto; min-height: 0; flex: 1; border: 0; background: transparent; }
.slide-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .5s ease-out; }
.slide-stage img.on { opacity: 1; }
.slide-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: color-mix(in oklab, var(--panel) 90%, transparent); opacity: 0; backdrop-filter: blur(8px); transition: opacity .2s; }
.slide-stage:hover .slide-arrow, .slide-arrow:focus-visible { opacity: 1; }
@media (max-width: 767px) { .slide-arrow { opacity: 1; } }
.slide-arrow.l { left: .75rem; } .slide-arrow.r { right: .75rem; }
.slide-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: color-mix(in oklab, var(--line) 60%, transparent); }
.slide-progress div { height: 100%; background: var(--acc); transition: width .5s ease-out; }
.slide-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.slideshow:fullscreen .slide-count { color: color-mix(in oklab, var(--bg) 70%, transparent); }
.thumbs { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: thin; }
.thumbs button { aspect-ratio: 16 / 9; width: 6rem; flex-shrink: 0; overflow: hidden; border-radius: .375rem; border: 2px solid transparent; background: var(--panel2); opacity: .55; transition: opacity .2s, border-color .2s; }
@media (min-width: 768px) { .thumbs button { width: 7rem; } }
.thumbs button:hover { opacity: .9; }
.thumbs button[aria-current="true"] { border-color: var(--acc); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Experience ---------- */
.career-bar { position: sticky; top: 70px; z-index: 20; border-bottom: 1px solid var(--line); background: var(--bg); padding: 1rem 0; }
@media (min-width: 768px) { .career-bar { top: 112px; padding: 1.5rem 0; } }
.career-bar > div { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .75rem; }
.career-wrap { position: relative; margin: 0 auto; max-width: 1100px; }
.career-year-rail { display: none; position: absolute; top: 0; bottom: 0; left: 0; z-index: 10; width: 125px; padding-top: 1.5rem; pointer-events: none; }
@media (min-width: 768px) { .career-year-rail { display: block; } }
.career-year { position: sticky; top: calc(max(220px, 34vh) + 2.5rem); display: flex; align-items: center; justify-content: flex-end; gap: .75rem; transform: translateY(-50%); transition: top 420ms cubic-bezier(.22,.61,.36,1); }
.career-year span:first-child { white-space: nowrap; font-family: var(--font-mono); font-size: 1.5rem; font-weight: 500; letter-spacing: -.02em; color: var(--acc-ink); }
.career-year .dot { width: .875rem; height: .875rem; flex-shrink: 0; border-radius: 999px; border: 2px solid var(--acc-ink); background: var(--bg); }
.career-year .fade { animation: career-year-in 450ms ease both; }
@keyframes career-year-in { from { opacity: 0; transform: translateY(10px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
.career-list { position: relative; min-width: 0; padding: 1.5rem 0 6rem; }
.career-line { position: absolute; top: 1.5rem; bottom: 6rem; left: 6px; border-left: 2px dashed color-mix(in oklab, var(--acc-ink) 40%, transparent); pointer-events: none; }
@media (min-width: 768px) { .career-line { left: 118px; } }
.career-item { position: sticky; display: grid; grid-template-columns: 14px minmax(0,1fr); gap: 1rem; padding-bottom: 7rem; top: calc(var(--career-bar-bottom, 137px) + 12px + var(--stack-index, 0) * 8px); scroll-margin-top: calc(var(--career-bar-bottom, 137px) + 12px); }
@media (min-width: 768px) { .career-item { grid-template-columns: 124px minmax(0,1fr); gap: 1.5rem; padding-bottom: 10rem; top: calc(max(220px, 34vh) + var(--stack-index, 0) * 8px); scroll-margin-top: max(220px, 34vh); } }
.career-card { position: relative; display: grid; min-width: 0; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 1.25rem; border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-surface); }
@media (min-width: 768px) { .career-card { padding: 2.25rem; } }
@media (max-width: 559px) { .career-card { grid-template-columns: minmax(0,1fr); } .career-card .logo { order: -1; justify-self: start; } }
.career-card .range { font-family: var(--font-mono); font-size: .875rem; font-weight: 500; line-height: 1.6; color: var(--acc-ink); }
.career-card .place { margin-top: .25rem; font-size: .875rem; color: var(--muted); }
.career-card h3 { margin-top: 1rem; }
.career-card .desc { margin-top: .75rem; max-width: 680px; color: var(--muted); }
.tags { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags span { border-radius: 999px; border: 1px solid var(--chip-line); background: var(--chip); padding: .25rem .75rem; font-size: .75rem; color: var(--chip-ink); }
.logo { display: flex; height: 4rem; width: 7rem; flex-shrink: 0; align-items: center; justify-content: center; border-radius: .5rem; border: 1px solid var(--line); background: var(--plate); padding: .625rem; }
@media (min-width: 768px) { .logo { height: 5rem; width: 9rem; } }
.logo img { max-height: 100%; max-width: 100%; object-fit: contain; }
.logo span { font-family: var(--font-mono); font-size: .875rem; font-weight: 500; color: color-mix(in oklab, var(--ink) 60%, transparent); }
.toolbox { display: grid; gap: 2rem; }
@media (min-width: 768px) { .toolbox { grid-template-columns: minmax(0,360px) minmax(0,1fr); gap: 4rem; } }
.tool-row { display: grid; align-items: center; gap: 1rem; border-top: 1px solid var(--line); padding: 22px 0; }
@media (min-width: 768px) { .tool-row { grid-template-columns: 220px minmax(0,1fr); gap: 1.5rem; } }
.tool-row > span { font-size: 15px; color: var(--muted); }
.tool-row div { display: flex; flex-wrap: wrap; gap: .5rem; }
.tool-row div span { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 9px 1rem; font-size: 15px; }

/* ---------- Education ---------- */
.degrees { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .degrees { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.degree { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 1.5rem; transition: border-color .2s; }
.degree:hover { border-color: var(--acc-ink); }
.degree .plate { display: flex; height: 7rem; align-items: center; justify-content: center; border-radius: .5rem; border: 1px solid var(--line); background: var(--plate); padding: 1rem 1.5rem; color: var(--ink); text-align: center; font-family: var(--font-serif); font-size: 1.15rem; line-height: 1.3; }
.degree .plate img { max-width: 100%; max-height: 72px; object-fit: contain; }
.degree h2 { margin-top: 1.5rem; min-height: 2.5em; }
.degree .school { margin-top: .5rem; min-height: 3.25em; font-size: .875rem; line-height: 1.6; color: var(--muted); }
.degree .grad { margin-top: 1rem; font-family: var(--font-mono); font-size: .75rem; color: var(--acc-ink); }
.degree .dist { margin-top: .5rem; font-size: .875rem; }
.tabs { display: grid; min-width: 0; grid-template-columns: 1fr; gap: .25rem; border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: .25rem; }
@media (min-width: 640px) { .tabs { grid-template-columns: repeat(3, 1fr); } }
.tabs button { min-height: 2.75rem; border-radius: .5rem; padding: .5rem .75rem; font-size: .875rem; font-weight: 500; color: var(--muted); transition: background .2s, color .2s; }
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected="true"] { background: var(--fg); color: var(--bg); }
.transcript { margin-top: 1.75rem; min-width: 0; border-top: 1px solid var(--line); padding: 1.75rem 0; }
@media (min-width: 768px) { .transcript { padding: 2.25rem 0; } }
.transcript[hidden] { display: none; }
.stats { margin-top: 1.75rem; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); background: var(--line); border-radius: var(--radius); }
@media (min-width: 1024px) { .stats { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.stats > div { display: flex; min-width: 0; flex-direction: column; justify-content: space-between; gap: 1rem; background: var(--panel); padding: 1rem; }
@media (min-width: 768px) { .stats > div { padding: 1.5rem; } }
.stats .k { display: flex; align-items: center; gap: .5rem; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); }
.stats .k::before { content: ""; width: .375rem; height: .375rem; border-radius: 999px; background: var(--line); }
.stats > div:first-child .k::before { background: var(--acc); }
.stats .v { font-weight: 500; line-height: 1.25; font-size: 1.5rem; }
@media (min-width: 768px) { .stats .v { font-size: 2.25rem; } }
.stats > div:first-child .v { color: var(--acc-ink); }
.stats > div:nth-child(2) .v { font-size: 1.25rem; }
@media (min-width: 768px) { .stats > div:nth-child(2) .v { font-size: 1.875rem; } }
.grades { margin-top: 2rem; display: grid; gap: 2rem; }
@media (min-width: 1024px) { .grades { grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); } }
.grades .h { font-size: .875rem; font-weight: 500; }
.grades .sub { margin-top: .25rem; display: block; font-size: .75rem; color: var(--dim); }
.chart { margin-top: .75rem; width: 100%; }
.chart .grid { stroke: var(--line); }
.chart .area { fill: var(--acc); opacity: .2; }
.chart .line { stroke: var(--acc); fill: none; }
.chart .pt { fill: var(--bg); stroke: var(--acc); }
.chart .pt.last { fill: var(--fg); }
.chart text { font-family: var(--font-mono); font-size: 12px; fill: var(--dim); }
.chart text.last { fill: var(--fg); font-weight: 600; }
.courses { margin-top: .75rem; max-height: 420px; overflow-y: auto; padding-right: .5rem; }
.courses li { display: grid; grid-template-columns: minmax(0,1fr) 48px 48px; align-items: center; gap: .75rem; border-top: 1px solid var(--line); padding: .625rem 0; font-size: 14px; }
@media (min-width: 640px) { .courses li { grid-template-columns: minmax(0,1fr) 100px 60px; } }
.courses .bar { height: .375rem; overflow: hidden; border-radius: 999px; background: var(--panel2); }
.courses .bar span { display: block; height: 100%; border-radius: 999px; background: var(--dim); }
.courses .bar span.top { background: var(--acc); }
.courses .g { text-align: right; font-family: var(--font-mono); font-size: 13px; }

/* ---------- About ---------- */
.contact { border-top: 1px solid var(--line); padding-top: 2rem; }
.contact-row { margin-top: 2rem; display: grid; min-width: 0; gap: 1.25rem; }
@media (min-width: 768px) { .contact-row { grid-template-columns: minmax(0,1fr) auto; align-items: center; } }
.contact-row .email { color: var(--acc-ink); text-underline-offset: 4px; }
.contact-row .email:hover { text-decoration: underline; }
.contact .btn-row { gap: .75rem; }

/* ---------- 404 ---------- */
.not-found { display: flex; min-height: 70vh; align-items: center; justify-content: center; text-align: center; flex-direction: column; gap: 1rem; }
.not-found h1 { font-size: 4.5rem; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .career-item { position: relative; top: auto; }
}
