/* ==========================================================
   Andrew Friedman — Portfolio
   Dark editorial layout, monospace micro-labels, cyan accent.
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Public+Sans:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  color-scheme: dark;

  --bg:        #0a0a0b;
  --bg-2:      #0f0f11;
  --panel:     #141417;
  --fg:        #f6f6f4;
  --fg-dim:    #cfcfcb;
  --muted:     #86867f;
  --line:      rgba(255, 255, 255, 0.09);
  --line-2:    rgba(255, 255, 255, 0.18);
  --accent:    #97ffff;
  --accent-ink:#052226;

  --f-display: 'Space Grotesk', system-ui, sans-serif;
  --f-body:    'Public Sans', system-ui, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, monospace;

  --wrap: 1120px;
  --pad: clamp(1.25rem, 5vw, 3rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: var(--accent-ink); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a2e; border: 3px solid var(--bg); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a40; }

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

/* ---------- shared bits ---------- */

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--accent);
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
}
.arrow-link::after { content: "\2192"; transition: transform 0.3s var(--ease); }
.arrow-link:hover { color: var(--accent); }
.arrow-link:hover::after { transform: translateX(6px); }

/* ---------- nav (floating pill) ---------- */

.nav {
  position: fixed;
  top: clamp(0.7rem, 2vw, 1.2rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: max-content;
  max-width: calc(100vw - 1.25rem);
}
.nav-pill {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.8vw, 1.4rem);
  padding: 0.4rem;
  background: #131316;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5);
}
.nav-badge {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  display: grid;
  place-items: center;
}
.nav-badge img { width: 100%; height: 100%; object-fit: cover; }
.nav-links {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  padding: 0 0.35rem;
}
.nav-links a {
  font-family: var(--f-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.nav-links a:hover,
.nav-links a.is-active { color: #fff; }
.nav-cta {
  flex-shrink: 0;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  background: #fff;
  color: #111214;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s var(--ease);
}
.nav-cta:hover { background: rgba(255, 255, 255, 0.86); }
.nav-cta .short { display: none; }

@media (max-width: 560px) {
  .nav { left: 0.6rem; right: 0.6rem; transform: none; width: auto; max-width: none; }
  .nav-pill { justify-content: space-between; gap: 0.4rem; }
  .nav-links { gap: 0.55rem; padding: 0; }
  .nav-links a { font-size: 0.8rem; }
  .nav-cta { font-size: 0.78rem; padding: 0.5rem 0.8rem; }
  .nav-cta .full { display: none; }
  .nav-cta .short { display: inline; }
  .nav-badge { width: 34px; height: 34px; }
}
@media (max-width: 380px) {
  .nav-links { gap: 0.4rem; }
  .nav-links a { font-size: 0.74rem; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8rem var(--pad) clamp(2rem, 5vw, 3.5rem);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
/* blank photo slot — add: .hero-photo { background-image: url(assets/hero.webp); background-size: cover; } */
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--bg-2);
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(120% 80% at 85% -5%, rgba(151, 255, 255, 0.06), transparent 50%),
    linear-gradient(180deg, rgba(10,10,11,0.35) 0%, rgba(10,10,11,0.78) 55%, var(--bg) 100%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: clamp(52px, 7vw, 92px) clamp(52px, 7vw, 92px);
  -webkit-mask-image: radial-gradient(125% 100% at 50% 0%, #000 25%, transparent 78%);
          mask-image: radial-gradient(125% 100% at 50% 0%, #000 25%, transparent 78%);
  opacity: 0;
  transition: opacity 1.2s ease 0.25s;
}
.hero-grid.is-visible { opacity: 0.4; }

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: var(--bg);
  transform: translateY(0);
  transition: transform 0.9s var(--ease);
}
.hero-overlay.is-gone { transform: translateY(-100%); }

.hero-inner,
.hero-foot {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: var(--wrap);
  margin-left: auto;
  margin-right: auto;
}
.hero h1 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 8vw, 6rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin: 0.4em 0 0.7rem;
  max-width: 16ch;
}
.hero .subhead {
  font-size: clamp(1.02rem, 2vw, 1.35rem);
  font-weight: 400;
  line-height: 1.55;
  color: var(--fg);
  max-width: 52ch;
  margin: 0;
}
.hero-foot {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  flex-wrap: wrap;
}
.hero-social { display: flex; gap: 0.6rem; }
.hero-social a {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
  text-decoration: none;
  transition: color 0.25s, border-color 0.25s, transform 0.25s;
}
.hero-social a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.hero-email a {
  font-family: var(--f-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  text-decoration: none;
}
.hero-email a:hover { color: var(--accent); }

/* ---------- generic section ---------- */

.section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(2.75rem, 6vw, 4.5rem) var(--pad);
}
.section-head { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); max-width: 60ch; }
.section-head h2 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 0;
}
.section-lead { margin: 1rem 0 0; color: var(--fg); max-width: 54ch; }

/* ---------- work / projects ---------- */

.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(2.75rem, 6vw, 4.5rem) 0;
  border-top: 1px solid var(--line);
  color: var(--fg);
}
.project:last-child { border-bottom: 1px solid var(--line); }
.project:nth-child(even) .project-media { order: 2; }
.project:hover h3,
.project:focus-visible h3 { color: var(--accent); }
.project:hover .arrow-link,
.project:focus-visible .arrow-link { color: var(--accent); }
.project:hover .arrow-link::after,
.project:focus-visible .arrow-link::after { transform: translateX(6px); }

.project-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f3f3f1;
  border: 1px solid var(--line);
  overflow: hidden;
}
.project-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-media::after {
  content: attr(data-num);
  position: absolute;
  top: 0.3rem;
  right: 0.9rem;
  z-index: 2;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.75rem, 6.5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: rgba(15, 15, 17, 0.28);
  pointer-events: none;
}
.project-wipe {
  position: absolute;
  inset: 0;
  background: var(--bg-2);
  transform: translateX(0);
  transition: transform 0.85s var(--ease);
}
.project-media.is-visible .project-wipe { transform: translateX(101%); }

.project-tag {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.project h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.2vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 0.7rem 0 0.8rem;
  transition: color 0.25s var(--ease);
}
.project p { margin: 0 0 1.5rem; max-width: 46ch; color: var(--fg); }

/* ---------- experience accordion ---------- */

.acc { border-top: 1px solid var(--line); }
.acc:last-of-type { border-bottom: 1px solid var(--line); }
.acc-head {
  width: 100%;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.4rem, 3vw, 2rem) 0;
}
.acc-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--fg);
}
.acc-role {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.acc-side {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}
.acc-date {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}
.acc-icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.acc-icon::before,
.acc-icon::after {
  content: "";
  position: absolute;
  background: var(--fg-dim);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}
.acc-icon::before { top: 6px; left: 0; width: 14px; height: 2px; }
.acc-icon::after  { left: 6px; top: 0; width: 2px; height: 14px; }
.acc.is-open .acc-icon::after { transform: scaleY(0); }
.acc.is-open .acc-icon::before { background: var(--accent); }

.acc-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}
.acc.is-open .acc-body { grid-template-rows: 1fr; }
.acc-body > div { overflow: hidden; }
.acc-body-inner {
  padding-bottom: clamp(1.4rem, 3vw, 2rem);
  max-width: 62ch;
  color: var(--fg);
}
.acc-body-inner ul { margin: 0; padding-left: 1.15rem; }
.acc-body-inner li { margin-bottom: 0.4rem; }

/* ---------- skills bar chart ---------- */

.skills-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}
.skills-card > h3 {
  margin: 0 0 clamp(1.25rem, 3vw, 2rem);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--fg);
}

.skillchart {
  --plot-h: clamp(230px, 40vw, 330px);
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.9rem;
}
.skillchart-scale {
  height: var(--plot-h);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0.1rem 0 1.4rem;
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.bars {
  list-style: none;
  margin: 0;
  padding: 0;
  height: var(--plot-h);
  display: flex;
  align-items: flex-end;
  gap: clamp(0.3rem, 1.5vw, 0.7rem);
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.4rem;
}
.bar {
  position: relative;
  flex: 1 1 0;
  min-width: 30px;
  align-self: stretch;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: flex-grow 0.35s var(--ease);
}
.bar-fill {
  position: relative;
  width: 100%;
  height: 0;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, var(--accent) 0%, #5fbcbf 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  transition: height 0.8s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}
.skills-card.is-visible .bar-fill { height: calc(var(--level, 50) * 1%); }
.bar-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 0.7rem 0;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
  white-space: nowrap;
  transition: opacity 0.2s var(--ease);
}
.bar-detail {
  position: absolute;
  left: 50%;
  bottom: calc(var(--level, 50) * 1% + 14px);
  transform: translate(-50%, 8px);
  width: max-content;
  max-width: min(240px, 60vw);
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: #16161a;
  border: 1px solid var(--line-2);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 4;
}
.bar-detail b {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.bar-detail span { font-size: 0.82rem; line-height: 1.4; color: var(--fg); }

/* the interaction: bar widens + glows, detail pops up */
.bar:hover,
.bar:focus-within,
.bar.is-open { flex-grow: 3.4; z-index: 3; }
.bar:hover .bar-fill,
.bar:focus-within .bar-fill,
.bar.is-open .bar-fill {
  box-shadow: 0 0 0 1px var(--accent), 0 12px 34px rgba(151, 255, 255, 0.22);
  filter: brightness(1.08);
}
.bar:hover .bar-detail,
.bar:focus-within .bar-detail,
.bar.is-open .bar-detail {
  opacity: 1;
  transform: translate(-50%, 0);
}
.bar-trigger {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .skills-card.is-visible .bar-fill { transition: none; }
}
@media (max-width: 620px) {
  .skillchart { --plot-h: 240px; }
  .bar-label { font-size: 0.62rem; padding: 0.5rem 0; }
}

/* ---------- about / capabilities ---------- */

.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}
.about-col h4 {
  margin: 0 0 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.about-col ul { list-style: none; margin: 0; padding: 0; }
.about-col li { padding: 0.32rem 0; font-size: 0.94rem; color: var(--fg); }
.about-col p { margin: 0 0 0.75rem; font-size: 0.94rem; color: var(--fg); }
.about-col strong { color: var(--fg); font-weight: 600; }

/* ---------- contact ---------- */

.contact .section-head { margin-bottom: 2rem; }
.contact p { max-width: 52ch; }
.contact .big-link {
  margin-top: 2rem;
  font-size: 0.9rem;
}

/* ---------- site footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  padding: 2.5rem var(--pad);
}
.site-foot-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-foot a { color: var(--fg-dim); text-decoration: none; }
.site-foot a:hover { color: var(--accent); }
.site-foot .links { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* ==========================================================
   Project detail pages
   ========================================================== */

.project-head { padding: clamp(7.5rem, 15vw, 11rem) 0 2.5rem; }
.back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.back:hover { color: var(--accent); }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.project-head h1 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--fg);
  margin: 0.5rem 0 1rem;
  max-width: 20ch;
}
.lede {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.55;
  color: var(--fg);
  max-width: 60ch;
  margin: 0 0 2.5rem;
}

.spec-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 2.5rem;
}
.spec { background: var(--bg); padding: 1rem 1.1rem; }
.spec dt {
  margin-bottom: 0.35rem;
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.spec dd {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--fg);
}

/* light "stage" just for the 3D model, so the dark CAD parts read clearly
   against a neutral background instead of disappearing into the dark page */
.viewer {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: #eef0f2;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.viewer model-viewer,
.viewer iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.viewer model-viewer {
  background: #eef0f2;
  --poster-color: #eef0f2;
  --progress-bar-color: var(--accent);
  --progress-mask: transparent;
}

/* placeholder for the old lazy-iframe helper (unused, kept harmless) */
.viewer-slot {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
  padding: 2rem;
  background: repeating-linear-gradient(45deg, #1a1a1f 0 10px, #17171a 10px 20px);
}
.slot-title { margin: 0; font-family: var(--f-display); font-weight: 600; color: var(--fg); }
.slot-help { margin: 0; font-size: 0.85rem; color: var(--fg-dim); max-width: 46ch; }
.viewer-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--line-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.viewer-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 4rem;
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.viewer-caption a { color: var(--fg-dim); text-decoration: none; }
.viewer-caption a:hover { color: var(--accent); }

.prose { max-width: 68ch; }
.prose h2 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.015em;
  color: var(--fg);
  margin: 3rem 0 0.85rem;
}
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.15rem; }
.prose a { color: var(--accent); }

.next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 4rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.next:hover { border-color: var(--accent); background: rgba(151, 255, 255, 0.05); }
.next span:first-child {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.next strong {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--fg);
}
.next > span:last-child { color: var(--accent); font-size: 1.4rem; }

/* footer used by detail pages + index contact */
.footer {
  border-top: 1px solid var(--line);
  padding: clamp(2.75rem, 6vw, 4.5rem) 0;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}
.footer h2 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 5vw, 3rem);
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 0 0 1rem;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.contact-list a {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  text-decoration: none;
}
.contact-list a:hover { color: var(--accent); }
.colophon {
  margin: 2.5rem 0 0;
  font-family: var(--f-mono);
  font-size: 0.63rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* leftover from earlier drafts — keep harmless */
.todo { background: rgba(255, 220, 120, 0.12); border-bottom: 1px dashed #c79100; color: #e0c67e; }

/* ==========================================================
   Scroll / load animation
   ========================================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-overlay { display: none; }
  .project-wipe { display: none; }
  .hero-grid { opacity: 0.55; transition: none; }
  * { transition: none !important; animation: none !important; }
}

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 860px) {
  .project { grid-template-columns: 1fr; gap: 1.5rem; }
  .project:nth-child(even) .project-media { order: 0; }
  .acc-head { flex-direction: column; gap: 0.75rem; }
  .acc-side { width: 100%; justify-content: space-between; }
}

@media (max-width: 560px) {
  .hero-foot { gap: 1rem; }
}
