/* Layout: one 1080px column; hero splits copy / arched portrait, bands stack below. Palette and faces carried from the prototype. */
:root {
  /* The site is dark-only. */
  --bg: #0e1526;
  --surface: #18223a;
  --ink: #eaeefb;
  --muted: #9eabc8;
  --line: #2a3857;
  --accent: #7b8dff;
  --accent-ink: #0e1526;
  --accent-soft: #232f55;
  --mark: #ffb703;
  --good: #5fd08f;
  --good-soft: #17352a;
  --warn-soft: #3a2f12;
  --warn-ink: #ffd36b;
  --danger: #ff7b6b;

  --head: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.75rem;
  --step-3: clamp(1.9rem, 4.5vw, 2.8rem);
  --step-4: clamp(2.8rem, 8vw, 5.4rem);
  --radius: 20px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--step-0)/1.6 var(--body);
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.08; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: clamp(1rem, 4vw, 2rem); }

/* ---- Header ---- */
.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-block: 1.2rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font: 800 1.2rem var(--head); text-decoration: none; letter-spacing: -.01em; }
.logo { height: clamp(48px, 9vw, 76px); width: auto; }
.brand-mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  font: 800 .8rem var(--head); letter-spacing: .02em; }
.top ul { display: flex; gap: .3rem 1.3rem; list-style: none; margin: 0; padding: 0; font-weight: 500; flex-wrap: wrap; }
.top nav a { text-decoration: none; color: var(--muted); padding-block: .3rem; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }
.top nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 3px; text-underline-offset: 7px; }

.adminbar { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; padding: .45rem 1rem; background: var(--ink); color: var(--bg); font-size: var(--step--1); }
.adminbar a { color: var(--mark); font-weight: 600; }
.notice { background: var(--warn-soft); color: var(--warn-ink); border-radius: 12px; padding: .7rem 1rem; margin-block: .5rem 1rem; font-size: .95rem; }

/* ---- Buttons ---- */
.actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .68rem 1.2rem; border-radius: 999px; font: 600 1rem var(--body);
  text-decoration: none; border: 2px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.sm { padding: .28rem .8rem; font-size: .88rem; border-width: 1.5px; }
.btn.danger { border-color: var(--danger); color: var(--danger); }

/* ---- Hero ---- */
.hero { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; padding-block: clamp(1.5rem, 5vw, 3.5rem) clamp(2.5rem, 6vw, 4.5rem); }
.eyebrow { font-size: var(--step--1); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.hero h1 { font-size: var(--step-4); font-weight: 800; }
.hero h1 span { display: block; color: var(--accent); font-size: .52em; font-weight: 700; margin-top: .35em; letter-spacing: -.015em; }
.bio { display: grid; gap: 1rem; margin-block: 1.5rem 1.9rem; max-width: 38rem; color: var(--muted); }
.bio p:first-child { color: var(--ink); font-size: 1.16rem; }
.portrait { position: relative; justify-self: center; width: min(100%, 340px); margin: 0; isolation: isolate; }
.portrait .frame { aspect-ratio: 4 / 5; border-radius: 999px 999px 28px 28px; background: var(--surface); border: 2px solid var(--ink); overflow: hidden; }
.portrait .frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.portrait::after { content: ""; position: absolute; inset: 14px -14px auto 14px; aspect-ratio: 4 / 5; border-radius: 999px 999px 28px 28px; background: var(--mark); z-index: -1; }
.portrait figcaption { margin-top: 1.2rem; color: var(--muted); font-size: var(--step--1); }

/* ---- Bands ---- */
.band { padding-block: clamp(2rem, 5vw, 3.5rem); border-top: 1px solid var(--line); display: grid; gap: 1.5rem; justify-items: start; }
.band > * { justify-self: stretch; }
.band > .btn { justify-self: start; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.sec-head h2, .page-head h1 { font-size: var(--step-3); }
.sec-head p { margin-top: .4rem; color: var(--muted); }
.arrows { display: flex; gap: .5rem; }
.arrows button { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); background: transparent; color: var(--ink); font-size: 1.2rem; cursor: pointer; }
.arrows button:disabled { opacity: .35; cursor: default; }

.track { display: flex; gap: 1.2rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .3rem .1rem 1rem; scrollbar-width: thin; }
.track > .card { flex: 0 0 min(84%, 330px); scroll-snap-align: start; }

/* ---- Project cards ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.2rem; align-items: start; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; display: flex; flex-direction: column; gap: .8rem; }
.card h3 { font-size: var(--step-1); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.tag { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 600; padding: .18rem .65rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.status::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.status.done { background: var(--good-soft); color: var(--good); }
.status.hold { background: var(--warn-soft); color: var(--warn-ink); }
.status.plan { background: var(--bg); color: var(--muted); }
.features { margin: 0; padding-left: 1.1rem; font-size: .96rem; display: grid; gap: .2rem; }
.features li::marker { color: var(--mark); }
.progress { background: var(--bg); border-radius: 12px; padding: .75rem .9rem; font-size: .95rem; }
.progress-label { font-size: .76rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .25rem; }
.card-link { color: var(--accent); font-weight: 600; text-decoration: none; margin-top: auto; }
.card-link:hover { text-decoration: underline; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.chip-btn { font: 600 .92rem var(--body); padding: .4rem .9rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.chip-btn span { color: var(--muted); font-weight: 500; margin-left: .2rem; font-variant-numeric: tabular-nums; }
.chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-btn[aria-pressed="true"] span { color: inherit; opacity: .7; }

/* ---- Education ---- */
.edu { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1.2rem; }
.edu-item { border-left: 3px solid var(--mark); padding: .2rem 0 .2rem 1rem; }
.edu-item h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.edu-item p { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.chips li { font-size: .92rem; font-weight: 600; padding: .3rem .85rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }

/* ---- Connect ---- */
.connect-card { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; background: var(--ink); color: var(--bg);
  border-radius: var(--radius); padding: clamp(1.4rem, 4vw, 2.2rem); }
.connect-card h2 { font-size: var(--step-2); margin-bottom: .4rem; }
.connect-card p { opacity: .8; max-width: 34rem; }
.connect-card .btn { border-color: var(--bg); color: var(--bg); }
.connect-card .btn.primary { background: var(--mark); border-color: var(--mark); color: #14213d; }

/* ---- Inner pages ---- */
.page-head { padding-block: clamp(1.5rem, 4vw, 2.5rem) 1.5rem; display: grid; gap: .8rem; }
.page-head p { color: var(--muted); max-width: 40rem; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 2.5rem 1.5rem; text-align: center; display: grid; gap: .6rem; margin-block: 1.5rem; }
.empty h1, .empty h2 { font-size: var(--step-2); }
.empty p { color: var(--muted); }

.prose { max-width: 44rem; padding-block: clamp(1.5rem, 4vw, 2.5rem) 3rem; }
.prose h1 { font-size: var(--step-3); margin-bottom: 1.2rem; }
.prose h2 { font-size: var(--step-2); margin: 2rem 0 .6rem; }
.prose h3 { font-size: var(--step-1); margin: 1.5rem 0 .5rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1rem; }
.prose a { color: var(--accent); }
.prose img { border-radius: 14px; margin-block: 1rem; }
.prose blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid var(--mark); color: var(--muted); }
.prose code { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: .05rem .35rem; font-size: .9em; }

/* ---- Name sticker ("HELLO my name is") ---- */
.nametag { display: inline-grid; justify-items: center; gap: 0; background: var(--mark); color: #14213d;
  border-radius: 14px 14px 6px 6px; padding: .5rem 1.4rem .55rem; margin-bottom: 1.1rem; transform: rotate(-2.5deg); transform-origin: left bottom;
  box-shadow: 0 2px 0 var(--ink); }
.nt-hello { font: 800 clamp(1.5rem, 3.4vw, 2rem)/1 var(--head); letter-spacing: .1em; text-transform: uppercase; }
.nt-sub { font: 600 .92rem/1.3 var(--body); letter-spacing: .02em; }

/* ---- Project cards: actions row ---- */
.card-title { text-decoration: none; }
.card-title:hover { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.card-actions { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: auto; padding-top: .2rem; }

/* ---- Project page ---- */
.project-page { padding-block: clamp(1rem, 3vw, 2rem) 3rem; display: grid; gap: 1.6rem; }
.back { color: var(--muted); text-decoration: none; font-size: var(--step--1); font-weight: 600; }
.back:hover { color: var(--ink); }
.pp-head { display: grid; gap: .9rem; max-width: 46rem; }
.pp-head .card-top { justify-content: flex-start; gap: .8rem; }
.pp-head h1 { font-size: var(--step-3); }
.pp-summary { font-size: 1.15rem; color: var(--muted); }
.pp-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: start; }
.pp-body:has(.pp-features):has(.pp-notes) { grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); }
.pp-features { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; display: grid; gap: .7rem; }
.pp-features h2, .pp-notes > h2 { font: 700 .8rem var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 .4rem; }
.pp-notes { padding-block: 0; }
.muted-note { color: var(--muted); font-size: var(--step--1); }

/* ---- Connect form ---- */
.contact-head { max-width: 40rem; }
.contact-form { display: grid; gap: 1rem; max-width: 40rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.2rem, 4vw, 2rem); margin-bottom: 3rem; }
.contact-form .form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1rem; }
.contact-form label { display: grid; gap: .35rem; font-weight: 600; font-size: .95rem; }
.contact-form label small { font-weight: 400; color: var(--muted); }
.contact-form input, .contact-form textarea { font: 400 1rem var(--body); padding: .65rem .85rem; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); width: 100%; }
.contact-form textarea { resize: vertical; line-height: 1.5; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.contact-form [aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-weight: 500; font-size: .88rem; order: 2; }
.form-note { color: var(--muted); font-size: var(--step--1); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- PDF viewer ---- */
.pdf-inline { margin-bottom: 3rem; }
.pdfv { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.pdfv-bar { display: flex; align-items: center; gap: .6rem 1rem; flex-wrap: wrap; padding: .6rem .8rem .6rem 1.1rem; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 2; }
.pdfv-title { font-weight: 700; flex: 1 1 12rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdfv-count { color: var(--muted); font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.pdfv-tools { display: flex; align-items: center; gap: .35rem; }
.pdfv-btn { width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); font-size: 1.15rem; line-height: 1; cursor: pointer; }
.pdfv-btn:hover:not(:disabled) { border-color: var(--ink); }
.pdfv-btn:disabled { opacity: .35; cursor: default; }
.pdfv-zoom { min-width: 3.4em; text-align: center; font-size: var(--step--1); font-variant-numeric: tabular-nums; color: var(--muted); }
.pdfv-dl { margin-left: .4rem; padding: .4rem .9rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: .9rem; text-decoration: none; }
.pdfv-close { margin-left: .2rem; font-size: 1.4rem; }
.pdfv-scroll { overflow-x: auto; background: var(--bg); padding: 12px; }
.pdfv-pages { display: grid; justify-items: center; gap: 12px; min-width: min-content; }
.pdfv-page { background: #fff; box-shadow: 0 1px 3px rgba(20, 33, 61, .18); border-radius: 4px; overflow: hidden; max-width: none; }
.pdfv-page canvas { display: block; width: 100%; height: 100%; }
.pdfv-error { padding: 2rem; text-align: center; display: grid; gap: 1rem; justify-items: center; color: var(--muted); }
.pdfv-modal { position: fixed; inset: 0; z-index: 50; background: rgba(10, 15, 30, .72); display: grid; place-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + clamp(0px, 3vw, 2rem)) clamp(0px, 3vw, 2rem) calc(env(safe-area-inset-bottom, 0px) + clamp(0px, 3vw, 2rem)); }
.pdfv-modal-body { width: min(100%, 1000px); height: 100%; max-height: 100%; }
.pdfv-modal-body .pdfv-bar { position: static; }
.pdfv-modal-body .pdfv-scroll { flex: 1; overflow: auto; }
html.pdfv-lock { overflow: hidden; }
@media (max-width: 640px) { .pdfv-modal-body { border-radius: 0; border: 0; } .pdfv-title { flex-basis: 100%; } }

/* ---- Footer ---- */
.foot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 2rem 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .portrait { order: -1; width: min(66%, 250px); justify-self: start; }
  .arrows { display: none; }
  .pp-body:has(.pp-features):has(.pp-notes) { grid-template-columns: 1fr; }
}

@media print {
  .top, .foot, .adminbar, .noprint { display: none !important; }
  body { background: #fff; color: #000; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}
