/* ==========================================================================
   Portfolio – global styles
   Dark, game-industry aesthetic. System fonts only so the site renders
   identically offline on the Showcase computer.
   ========================================================================== */

@font-face {
  font-family: "Oswald";
  src: url("../assets/fonts/oswald-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Oswald";
  src: url("../assets/fonts/oswald-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #0b0d12;
  --bg-raised: #141821;
  --bg-sunken: #07080b;
  --line: #262c38;
  --text: #e9ecf2;
  --text-muted: #9aa3b2;
  --accent: #4ade80;
  --accent-soft: rgba(74, 222, 128, 0.14);
  --tag-school: #4fb3ff;
  --tag-personal: #f5b74a;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --header-h: 92px;
  --max-w: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  padding-top: var(--header-h);
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1, h2 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.05; }
h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(56px, 9vw, 110px) 0; }
.section + .section { border-top: 1px solid var(--line); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9em;
}

.muted { color: var(--text-muted); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--accent); color: #000; padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* Placeholder marker – search for "TODO" in the HTML to find every gap */
.todo {
  background: var(--accent-soft);
  border: 1px dashed var(--accent);
  border-radius: 4px;
  padding: 0 0.35em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.8em 1.4em;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #0b0d12;
  font-family: var(--font-display); font-weight: 500; font-size: 1.1rem;
  letter-spacing: 0.02em; text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); background: #fff; border-color: #fff; color: #0b0d12; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { background: var(--bg-raised); color: #fff; border-color: var(--text-muted); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.45s ease, box-shadow 0.45s ease, border-color 0.45s ease;
}
/* Toggled in main.js once the page scrolls: header shrinks into a solid banner */
.site-header.is-scrolled {
  background: rgba(24, 27, 33, 0.94);
  border-bottom-color: rgba(255, 255, 255, 0.04);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  max-width: 1600px; min-height: var(--header-h); margin: 0 auto; padding: 0 var(--gutter);
  transition: min-height 0.45s ease;
}
.is-scrolled .header-inner { min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand__name {
  display: flex; flex-direction: column;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
  line-height: 0.95; letter-spacing: 0.02em; text-transform: uppercase;
  transition: font-size 0.45s ease;
}
.is-scrolled .brand__name { font-size: 1.1rem; }
.brand__name span:last-child { color: var(--accent); }

.site-nav { display: contents; }
.site-nav ul { display: flex; gap: clamp(12px, 3vw, 48px); list-style: none; margin: 0; padding: 0; }
.site-nav ul a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 2px 7px;
  border-bottom: 3px solid transparent;
  font-family: var(--font-display); font-weight: 500; font-size: 1.25rem;
  letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--text-muted); text-decoration: none;
  transition: font-size 0.45s ease, color 0.2s ease, border-color 0.2s ease;
}
.is-scrolled .site-nav ul a { font-size: 1.1rem; }
.site-nav ul a svg { width: 18px; height: 18px; flex: none; }
.site-nav ul a:hover { color: var(--text); }
/* Underline grows out from the centre on hover and sits under the current page */
.site-nav ul a { position: relative; }
.site-nav ul a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
  background: var(--accent); transform: scaleX(0); transition: transform 0.3s ease;
}
.site-nav ul a:hover::after { transform: scaleX(0.6); }
.site-nav ul a[aria-current="page"] { color: var(--text); }
.site-nav ul a[aria-current="page"]::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 10px; justify-self: end; }

.pill {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 26px;
  border: 2px solid #363c48; border-radius: 999px;
  background: rgba(28, 32, 40, 0.75);
  color: var(--text); text-decoration: none;
  font-family: var(--font-display); font-weight: 500; font-size: 1.15rem;
  letter-spacing: 0.02em; text-transform: uppercase;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.pill:hover { border-color: var(--accent); background: rgba(38, 42, 52, 0.9); color: #fff; transform: translateY(-1px); }
.pill svg { width: 20px; height: 20px; flex: none; }
.pill--lg { padding: 14px 34px; font-size: 1.35rem; }

.icon-btn {
  display: grid; place-items: center; width: 50px; height: 50px; flex: none;
  border: 2px solid #363c48; border-radius: 50%;
  background: rgba(28, 32, 40, 0.75); color: var(--text);
  transition: width 0.45s ease, height 0.45s ease, border-color 0.2s ease, color 0.2s ease;
}
.is-scrolled .icon-btn { width: 42px; height: 42px; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; }

.nav-toggle {
  display: none; justify-self: end;
  background: none; border: 1px solid var(--line); border-radius: 6px;
  color: var(--text); padding: 8px 14px; cursor: pointer;
  font-family: var(--font-display); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em;
}

@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .header-inner { grid-template-columns: 1fr auto; }
  .is-scrolled .header-inner { min-height: 58px; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    padding: 4px var(--gutter) 20px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .site-nav ul a[aria-current="page"] { color: var(--accent); }
  .site-nav ul a::after { display: none; }
  .header-actions { padding-top: 16px; }
}

/* ---------- Hero (home: full screen, centred) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; place-items: center; text-align: center;
  min-height: 100vh; min-height: 100svh;
  padding: 120px var(--gutter) 150px;
}
/* Home: fixed background layer – key art, watermark and hatch stay still while the page scrolls */
body.has-hero { padding-top: 0; }
.page-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
/* Image is already greyscale + blurred in the file (cheaper than a live CSS filter on an animated layer) */
.page-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; transform: scale(1.04); }
.page-bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(11, 13, 18, 0.35) 0%, rgba(11, 13, 18, 0.85) 65%, var(--bg) 100%);
}
.hero__name {
  margin: 0;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(3.2rem, 9vw, 7rem);
  line-height: 1; letter-spacing: 0.01em; text-transform: uppercase;
}
.hero__name .accent { color: var(--accent); }
.hero__role {
  min-height: 1.25em; margin: 8px 0 38px;
  font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 3.6vw, 2.8rem);
  text-transform: uppercase; color: #6f7684;
}
@keyframes blink { 50% { opacity: 0; } }
.btn-row--center { justify-content: center; }
.hero__scroll { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); font-size: 1.05rem; padding: 10px 24px; }
.hero__scroll:hover { transform: translateX(-50%) translateY(-1px); }
.hero__scroll svg { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(3px); } }
.hero__intro { max-width: 60ch; color: var(--text-muted); font-size: 1.1rem; margin-bottom: 1.8em; }

@media (max-width: 960px) {
}

/* ---------- Home intro ---------- */
.intro { display: grid; gap: 48px; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); align-items: center; }
@media (max-width: 760px) { .intro { grid-template-columns: 1fr; gap: 28px; } .intro .portrait { max-width: 240px; } }

/* ---------- Image placeholders (swap for <picture> once assets exist) ---------- */
.placeholder {
  display: grid; place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(255,255,255,0.025) 14px 28px),
    var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: center;
  padding: 16px;
}
.placeholder--poster { aspect-ratio: 2 / 3; }
.placeholder--square { aspect-ratio: 1 / 1; }

/* ---------- Project grid ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.filter-btn {
  font: inherit; font-size: 0.9rem; font-weight: 600;
  padding: 7px 16px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--text-muted); border: 1px solid var(--line);
}
.filter-btn:hover { color: var(--text); border-color: var(--text-muted); }
.filter-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

.project-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}
.project-card {
  display: flex; flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text); text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.project-card:hover { transform: translateY(-4px); border-color: var(--accent); color: var(--text); }
.project-card[hidden] { display: none; }
.project-card .placeholder, .project-card img { border-radius: 0; border: 0; aspect-ratio: 16 / 9; object-fit: cover; }
.project-card__body { padding: 20px 22px 24px; }
.project-card__body p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

.tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 4px; margin: 0 6px 10px 0;
  border: 1px solid currentColor;
}
.tag--school { color: var(--tag-school); }
.tag--personal { color: var(--tag-personal); }
.tag--role { color: var(--text-muted); }

/* ---------- Project page ---------- */
.project-hero { padding: 56px 0 40px; }
.project-hero__grid {
  display: grid; gap: 40px; align-items: start;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
}
@media (max-width: 820px) { .project-hero__grid { grid-template-columns: 1fr; } .project-hero__grid > :first-child { max-width: 360px; } }

.credits { margin: -0.6em 0 0; color: var(--text); font-weight: 600; }
.credits span { display: block; margin-bottom: 2px; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.facts { display: grid; gap: 14px 28px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 24px 0 0; }
.facts dt { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; }

.case-block { display: grid; gap: 32px; grid-template-columns: 220px minmax(0, 1fr); }
@media (max-width: 820px) { .case-block { grid-template-columns: 1fr; gap: 8px; } }
.case-block h2 { font-size: 1.4rem; }
.prose { max-width: 70ch; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chip-list li {
  padding: 6px 14px; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
  background: var(--bg-raised); border: 1px solid var(--line);
}

.process-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.process-grid figure { margin: 0; }
.process-zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); }
.process-grid figcaption { font-size: 0.88rem; color: var(--text-muted); margin-top: 8px; }

.video-embed { position: relative; aspect-ratio: 16 / 9; background: var(--bg-sunken); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Click-to-play YouTube ---------- */
.video-lite__btn { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.video-lite__btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease, opacity 0.3s ease; }
.video-lite__btn:hover img { transform: scale(1.03); }
.video-lite__play {
  position: absolute; left: 50%; top: 80%; width: 80px; height: 80px; translate: -50% -50%;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--accent); color: #0b0d12;
  box-shadow: 0 0 0 10px rgba(74, 222, 128, 0.18), 0 12px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.video-lite__play svg { width: 38px; height: 38px; margin-left: 5px; }
.video-lite__btn:hover .video-lite__play, .video-lite__btn:focus-visible .video-lite__play { transform: scale(1.08); box-shadow: 0 0 0 16px rgba(74, 222, 128, 0.22), 0 12px 40px rgba(0, 0, 0, 0.5); }
.video-link { margin: 14px 0 0; font-size: 0.95rem; }
@media (max-width: 600px) {
  .video-lite__play { top: 84%; width: 50px; height: 50px; box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.18), 0 8px 24px rgba(0, 0, 0, 0.5); }
  .video-lite__play svg { width: 24px; height: 24px; margin-left: 3px; }
}

/* ---------- Screenshot gallery (project pages) ---------- */
.gallery { display: grid; gap: 14px; margin-bottom: 32px; }
.gallery__main {
  position: relative; display: block; width: 100%; padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--bg-sunken); cursor: zoom-in;
}
.gallery__main img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  transition: opacity 0.25s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.gallery__main:hover img { transform: scale(1.02); }
.gallery__main img.is-swapping { opacity: 0; }
.gallery__hint {
  position: absolute; right: 14px; bottom: 14px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(11, 13, 18, 0.8); border: 1px solid var(--line);
  font-family: var(--font-display); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text);
  opacity: 0; transform: translateY(6px); transition: opacity 0.25s ease, transform 0.25s ease;
}
.gallery__main:hover .gallery__hint, .gallery__main:focus-visible .gallery__hint { opacity: 1; transform: none; }
.gallery__thumbs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.gallery__thumb {
  padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden;
  background: var(--bg-sunken); cursor: pointer; opacity: 0.5;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.gallery__thumb:hover { opacity: 0.9; transform: translateY(-2px); }
.gallery__thumb[aria-pressed="true"] { opacity: 1; border-color: var(--accent); }
.gallery__thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* Full-screen viewer (a <dialog> created by main.js) */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: transparent; color: var(--text); overflow: hidden;
}
.lightbox[open] { display: grid; place-items: center; animation: fade-in 0.25s ease; }
.lightbox::backdrop { background: rgba(5, 6, 9, 0.93); backdrop-filter: blur(6px); }
.lightbox__img {
  max-width: min(92vw, 1600px); max-height: 80vh; width: auto; height: auto;
  border-radius: 8px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: lightbox-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.lightbox__img.is-swapping { opacity: 0; transition: opacity 0.18s ease; }
.lightbox__btn { position: absolute; }
.lightbox__btn[hidden] { display: none; }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__prev { left: 18px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 18px; top: 50%; translate: 0 -50%; }
.lightbox__count {
  position: absolute; bottom: 18px; left: 50%; translate: -50% 0;
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted);
}
@keyframes lightbox-in { from { opacity: 0; transform: scale(0.94); } }
@media (max-width: 600px) {
  .lightbox__prev, .lightbox__next { top: auto; bottom: 10px; translate: none; }
}

.link-cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.link-card {
  display: flex; gap: 20px; align-items: center;
  padding: 20px; border-radius: var(--radius);
  background: var(--bg-raised); border: 1px solid var(--line);
}
.link-card .qr { flex: 0 0 120px; }
.link-card .qr img, .link-card .qr .placeholder { width: 120px; height: 120px; background: #fff; border-radius: 6px; }
.link-card .qr .placeholder { background: var(--bg-sunken); font-size: 0.65rem; padding: 6px; }
.link-card h3 { margin-bottom: 0.3em; }
.link-card p { color: var(--text-muted); font-size: 0.92rem; word-break: break-all; }

.project-nav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 48px; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: start; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } .about-grid > :first-child { max-width: 320px; } }
.skill-columns { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 28px 24px; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.timeline .when { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }

/* ---------- Contact ---------- */
.contact { min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; }
.contact__grid { display: grid; gap: clamp(36px, 6vw, 80px); grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; }
@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; } }
.contact__lead { max-width: 52ch; color: var(--text-muted); font-size: 1.15rem; }
.contact__status {
  display: inline-flex; align-items: center; gap: 10px; margin: 4px 0 28px;
  padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-raised);
  font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.04em;
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6); animation: status-ping 2s ease-out infinite; }
@keyframes status-ping { 70% { box-shadow: 0 0 0 9px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
[data-copy].is-copied { border-color: #3ddc84; color: #3ddc84; }

/* Brand cards: each sets --brand to the platform's own colour */
.social-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.social-card--email { --brand: #ea4335; }
.social-card--linkedin { --brand: #0a66c2; }
.social-card--itch { --brand: #fa5c5c; }
.social-card--github { --brand: #6e7681; }
.social-card--instagram { --brand: #e1306c; }
.social-card--instagram .social-card__logo { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.social-card {
  position: relative; display: flex; align-items: center; gap: 16px; height: 100%;
  padding: 22px; border-radius: 14px; overflow: hidden;
  background: var(--bg-raised); border: 1px solid var(--line);
  color: var(--text); text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.social-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%);
  opacity: 0; transition: opacity 0.3s ease;
}
.social-card:hover, .social-card:focus-visible {
  color: var(--text); transform: translateY(-4px);
  border-color: var(--brand); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 26px color-mix(in srgb, var(--brand) 30%, transparent);
}
.social-card:hover::before, .social-card:focus-visible::before { opacity: 1; }
.social-card__logo {
  position: relative; flex: none; display: grid; place-items: center; width: 56px; height: 56px;
  border-radius: 14px; background: var(--brand); color: #fff;
  transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.social-card__logo svg { width: 28px; height: 28px; }
.social-card:hover .social-card__logo { transform: scale(1.08) rotate(-4deg); }
.social-card__text { position: relative; display: grid; min-width: 0; }
.social-card__name { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.2; }
.social-card__handle { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-card__arrow { position: relative; flex: none; width: 20px; height: 20px; margin-left: auto; color: var(--text-muted); transition: transform 0.25s ease, color 0.25s ease; }
.social-card:hover .social-card__arrow { transform: translate(3px, -3px); color: var(--brand); }
.social-card--github:hover .social-card__arrow { color: var(--text); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; color: var(--text-muted); font-size: 0.9rem; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }

/* ==========================================================================
   Motion
   Every hidden starting state is behind `.js` (set in <head>) or lives only
   inside a keyframe, so content is always visible without JS or animation.
   ========================================================================== */
/* Page fade in / out (out is triggered by main.js when following an internal link) */
.js body { animation: page-in 0.6s ease both; }
.js body.is-leaving { opacity: 0; transition: opacity 0.28s ease; }
@keyframes page-in { from { opacity: 0; } }

/* Scroll reveal: main.js tags elements with [data-reveal] and adds .is-visible on entry */
.js [data-reveal] {
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal="left"] { transform: translateX(-40px); }
.js [data-reveal="zoom"] { transform: scale(0.94); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Hero intro sequence */
.hero__name .word { display: inline-block; animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.5s both; }
.hero__name .word + .word { animation-delay: 0.7s; }
.hero__role { animation: fade-in 0.6s ease 1.1s both; }
.hero__content .btn-row { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 1.9s both; }
.hero__scroll { animation: fade-in 0.8s ease 2.4s both; }
.hero__content { will-change: opacity, transform; }

/* Background: slow zoom, drifting watermark, hatch fade */
.page-bg img { animation: slow-zoom 30s ease-in-out infinite alternate; }

/* Hover polish */
.project-card img { transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s ease; }
.project-card:hover img { transform: scale(1.06); filter: brightness(1.1); }
.project-card { transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
.project-card:hover { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--accent); }
.pill:hover, .icon-btn:hover { box-shadow: 0 0 0 4px var(--accent-soft), 0 0 24px rgba(74, 222, 128, 0.25); }
.btn:hover { box-shadow: 0 8px 24px rgba(74, 222, 128, 0.3); }
.chip-list li { transition: transform 0.2s ease, border-color 0.2s ease; }
.chip-list li:hover { transform: translateY(-2px); border-color: var(--accent); }
.process-grid img { transition: transform 0.5s ease; }
.process-grid figure:hover img { transform: scale(1.03); }

@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0); } }
@keyframes pulse { 50% { transform: scale(1.18); } }
@keyframes spin-pulse { 0%, 70%, 100% { transform: rotate(0) scale(1); } 85% { transform: rotate(90deg) scale(1.2); } }
@keyframes march { to { stroke-dashoffset: -12; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(48px); } }
@keyframes slow-zoom { from { transform: scale(1.04); } to { transform: scale(1.14) translate(-1%, -1%); } }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-40%); } }

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

/* ---------- Real images in placeholder slots ---------- */
.video-embed img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.process-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
img.poster, img.portrait { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }

body.has-hero .section + .section { border-top-color: transparent; }
