/* =========================================================================
   Oscar Ordoñez — portfolio
   Design tokens first, then layout, then components, then responsive.
   No build step: this file is served as-is by GitHub Pages.
   ========================================================================= */

:root {
  /* Ground and elevated surfaces. Three steps is enough to build depth
     without the page turning into a stack of grey boxes. */
  --bg:            #07080c;
  --surface-1:     #0c0e14;
  --surface-2:     #11141c;
  --surface-3:     #171b25;

  --line:          rgba(255, 255, 255, 0.07);
  --line-strong:   rgba(255, 255, 255, 0.14);

  /* Text tiers, all AA or better against --bg. */
  --text:          #e9edf4;
  --text-soft:     #aab4c4;
  --text-dim:      #7b8698;

  --accent:        #8b6dff;
  --accent-soft:   #a08bff;
  --accent-2:      #35d6c1;
  --accent-3:      #ffb454;

  --grad: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;

  /* A single 4px-based spacing rhythm. */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  --shell: 1180px;
  --nav-h: 68px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

::selection { background: rgba(124, 92, 255, 0.35); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
  /* A dark inner ring, so the outline stays visible even on the accent-2 half
     of a gradient button. */
  box-shadow: 0 0 0 2px var(--bg);
}

/* Screen-reader-only, and the skip link that becomes visible on focus. */
.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: fixed; top: 10px; left: 50%; transform: translateX(-50%) translateY(-200%);
  z-index: 200; background: var(--accent); color: #fff; padding: 10px 18px;
  border-radius: 999px; font-weight: 600; transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translateX(-50%) translateY(0); }

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 var(--s5); }

/* =========================================================== scroll meter */

.progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 120;
  background: var(--grad); transform: scaleX(0); transform-origin: 0 50%;
  will-change: transform;
}

/* ================================================================ header */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(7, 8, 12, 0.78);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom-color: var(--line);
}
.nav .shell { display: flex; align-items: center; gap: var(--s5); }

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand span { font-size: 15px; }
.brand em { color: var(--text-dim); font-style: normal; font-weight: 400; }

.nav-links { display: flex; gap: var(--s1); margin-left: auto; }
.nav-links a {
  position: relative; padding: 8px 12px; border-radius: 999px;
  font-size: 14px; color: var(--text-soft);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav-links a.is-active { color: var(--text); }
.nav-links a.is-active::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--grad);
}

.nav-tools { display: flex; align-items: center; gap: var(--s2); }

.lang {
  display: flex; padding: 3px; gap: 2px; border: 1px solid var(--line);
  border-radius: 999px; background: rgba(255,255,255,.03);
}
.lang button {
  border: 0; background: transparent; cursor: pointer; padding: 4px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--text-dim); transition: color .2s, background .2s;
}
.lang button[aria-pressed='true'] { background: rgba(255,255,255,.10); color: var(--text); }
.lang button:hover { color: var(--text); }

.icon-btn {
  display: grid; place-items: center; width: 34px; height: 34px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.03);
  color: var(--text-soft); transition: color .2s, border-color .2s, background .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255,255,255,.07); }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn .i-play { display: none; }
.icon-btn[aria-pressed='true'] .i-pause { display: none; }
.icon-btn[aria-pressed='true'] .i-play { display: block; }
.icon-btn[aria-pressed='true'] { color: var(--accent-2); border-color: rgba(53,214,193,.4); }

/* With motion off, the decorative pulses stop too, not just the canvases. */
.motion-off .badge .dot::after,
.motion-off .scroll-cue i::after { animation: none; }

.burger { display: none; }

/* ================================================================ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 14.5px; letter-spacing: -0.005em; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .3s var(--ease),
              background .25s var(--ease), border-color .25s var(--ease), color .2s;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary {
  background: var(--grad); color: #06070a;
  box-shadow: 0 8px 30px -12px rgba(124,92,255,.9);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -14px rgba(124,92,255,1); }
.btn-ghost { border-color: var(--line-strong); background: rgba(255,255,255,.03); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.24); transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

/* ================================================================== hero */

.hero { position: relative; padding: calc(var(--nav-h) + var(--s9)) 0 var(--s9); overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto -10%; height: 720px; z-index: 0;
  background:
    radial-gradient(58% 52% at 22% 8%, rgba(124,92,255,.22), transparent 62%),
    radial-gradient(46% 46% at 82% 22%, rgba(53,214,193,.14), transparent 64%);
  filter: blur(6px); pointer-events: none;
}
/* A faint voxel lattice, drawn in CSS so it costs nothing to load. */
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 78%);
}
.hero > .shell { position: relative; z-index: 2; }
.hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1;
  opacity: .85; pointer-events: none;
}

.badge {
  display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px 6px 10px;
  border: 1px solid rgba(53,214,193,.30); border-radius: 999px;
  background: rgba(53,214,193,.07); color: var(--accent-2);
  font-size: 13px; font-weight: 500; letter-spacing: .01em;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); position: relative; }
.badge .dot::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--accent-2); opacity: .55; animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(.6); opacity: .7 } 70%,100% { transform: scale(1.6); opacity: 0 } }

.hero h1 {
  margin: var(--s5) 0 0;
  font-size: clamp(2.5rem, 5.6vw, 4.4rem);
  letter-spacing: -0.035em; line-height: 1.03;
  max-width: 24ch; hyphens: manual;
}
.hero h1 .grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero .kicker {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--text-dim); margin-top: var(--s6);
}
.hero .lede {
  margin-top: var(--s5); max-width: 58ch; font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-soft);
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s6); }
.quiet-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 6px;
  font-family: var(--font-mono); font-size: 13px; color: var(--text-dim);
  transition: color .2s var(--ease);
}
.quiet-link svg { width: 16px; height: 16px; }
.quiet-link:hover { color: var(--text); }

.facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s3); margin-top: var(--s8); max-width: 900px;
}
.fact {
  padding: var(--s4) var(--s4) var(--s4);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.fact:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.fact b { display: block; font-family: var(--font-display); font-size: 1.28rem; letter-spacing: -.02em; text-wrap: balance; }
.fact span { display: block; font-size: 12.5px; color: var(--text-dim); margin-top: 2px; line-height: 1.4; }

.scroll-cue {
  margin-top: var(--s8); display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px; color: var(--text-dim); font-family: var(--font-mono);
  letter-spacing: .1em; text-transform: uppercase;
}
.scroll-cue i {
  width: 22px; height: 34px; border: 1px solid var(--line-strong); border-radius: 999px;
  position: relative; flex: none;
}
.scroll-cue i::after {
  content: ''; position: absolute; left: 50%; top: 7px; width: 3px; height: 6px;
  margin-left: -1.5px; border-radius: 2px; background: var(--accent-2);
  animation: cue 2s var(--ease) infinite;
}
@keyframes cue { 0%,100% { transform: translateY(0); opacity: 1 } 60% { transform: translateY(11px); opacity: 0 } }

/* ============================================================== sections */

section { position: relative; padding: var(--s10) 0; }
.section-head { max-width: 62ch; margin-bottom: var(--s8); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent-2); margin-bottom: var(--s4);
}
.eyebrow::before {
  content: ''; width: 9px; height: 9px; flex: none;
  background: var(--accent-2);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.section-head h2 { font-size: clamp(1.9rem, 3.7vw, 2.85rem); }
.section-head p { margin-top: var(--s4); color: var(--text-soft); font-size: 1.03rem; }

.rule { height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }

/* ========================================================= flagship work */

.flagship { display: grid; gap: var(--s8); }

.project {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--s7); align-items: stretch;
  padding: var(--s7); border: 1px solid var(--line); border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(124,92,255,.09), transparent 60%),
    linear-gradient(180deg, var(--surface-1), var(--surface-2));
  position: relative; overflow: hidden;
}
.project--alt { grid-template-columns: 1fr 1.05fr; }
.project--alt .project-media { order: -1; }
.project--teal {
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(53,214,193,.10), transparent 60%),
    linear-gradient(180deg, var(--surface-1), var(--surface-2));
}
/* One tint per project, taken from the scene inside it: coral for the paper
   arena, ochre for the yellow rooms. The wash sits on the side the copy is on
   so it never fights the canvas for attention. */
.project--paper {
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(224,101,90,.10), transparent 60%),
    linear-gradient(180deg, var(--surface-1), var(--surface-2));
}
.project--amber {
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(255,180,84,.10), transparent 60%),
    linear-gradient(180deg, var(--surface-1), var(--surface-2));
}

.project-status {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px;
  font-family: var(--font-mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-2);
}
.project-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 4px rgba(53,214,193,.14); }
.project h3 { font-size: clamp(1.65rem, 3vw, 2.2rem); margin-top: var(--s3); }
.project .hook { margin-top: var(--s2); color: var(--accent-soft); font-weight: 500; }
.project .body { margin-top: var(--s4); color: var(--text-soft); }

.challenges { list-style: none; margin: var(--s6) 0 0; padding: 0; display: grid; gap: var(--s4); }
.challenges li { display: grid; grid-template-columns: auto 1fr; gap: var(--s3); align-items: start; }
.challenges .num {
  width: 26px; height: 26px; display: grid; place-items: center; flex: none;
  border-radius: 8px; background: rgba(255,255,255,.05); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--accent-2);
}
.challenges b { display: block; font-size: 14.5px; font-weight: 600; }
.challenges p { font-size: 14px; color: var(--text-dim); margin-top: 1px; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: var(--s6); }
.tag {
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.03); font-family: var(--font-mono);
  font-size: 11.5px; color: var(--text-soft); letter-spacing: .02em;
}

.project-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }

/* The canvas sits in a browser-chrome frame so it reads as a running app. */
.project-media { display: flex; flex-direction: column; justify-content: center; }

.frame {
  display: flex; flex-direction: column; flex: 1 1 auto;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface-3); overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.02) inset;
}
.frame-bar {
  display: flex; align-items: center; gap: 7px; padding: 10px 14px;
  border-bottom: 1px solid var(--line); background: rgba(255,255,255,.025);
}
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.16); }
.frame-bar span {
  margin-left: 8px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.frame canvas { width: 100%; flex: 1 1 auto; min-height: 320px; background: #090b10; }
.media-note { margin-top: var(--s3); font-size: 12.5px; color: var(--text-dim); }

.mid-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s4); margin-top: var(--s8);
  padding: var(--s5) var(--s6); border-radius: var(--radius);
  border: 1px dashed var(--line-strong); background: rgba(255,255,255,.02);
}
.mid-cta p { color: var(--text-soft); font-size: 15px; }

/* ======================================================== secondary grid */

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }

.card {
  position: relative; display: flex; flex-direction: column;
  padding: var(--s6); border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-1), rgba(12,14,20,.6));
  transition: transform .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
  overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(60% 60% at 50% 0%, rgba(124,92,255,.14), transparent 70%);
  transition: opacity .35s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.card:hover::before { opacity: 1; }
.card-icon {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); margin-bottom: var(--s4);
}
.card-icon svg { width: 20px; height: 20px; color: var(--accent-2); }
.card-kind {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-dim);
  min-height: 3.3em; /* two lines, so titles line up across the row */
}
.card h3 { font-size: 1.18rem; margin-top: 6px; min-height: 2.2em; }
.card p { margin-top: var(--s3); font-size: 14.5px; color: var(--text-soft); flex: 1; }
.card .link {
  margin-top: var(--s5); display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--accent-soft);
}
.card .link svg { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.card:hover .link svg { transform: translate(3px, -3px); }

/* ============================================================== skills */

.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }
.skill {
  padding: var(--s6); border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.008));
}
.skill h3 { font-size: 1.05rem; display: flex; align-items: center; gap: 10px; }
.skill h3::before {
  content: ''; width: 10px; height: 10px; flex: none; background: var(--grad);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.skill p { margin-top: var(--s3); font-size: 14px; color: var(--text-dim); }
.skill .tags { margin-top: var(--s4); }

/* ============================================================ trajectory */

.timeline { position: relative; padding-left: var(--s7); }
.timeline::before {
  content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), transparent);
  opacity: .5;
}
.tl-item { position: relative; padding-bottom: var(--s7); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: calc(var(--s7) * -1 + 5px); top: 6px;
  width: 13px; height: 13px; background: var(--accent-2);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
@media (min-width: 900px) {
  .tl-item { display: grid; grid-template-columns: 165px minmax(0, 1fr); column-gap: var(--s5); row-gap: 0; }
  .tl-item .when { grid-row: 1 / span 5; padding-top: 3px; }
}

.tl-item .when {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-dim);
}
.tl-item h3 { font-size: 1.12rem; margin-top: 5px; }
.tl-item .where {
  margin-top: 4px; font-size: 13.5px; color: var(--accent-soft); font-weight: 500;
}
.tl-item .tags { margin-top: var(--s4); }
.tl-item i { font-style: italic; color: var(--text); }

.cv-line {
  margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line);
  font-size: 14.5px; color: var(--text-dim);
}
.cv-line a {
  color: var(--accent-soft); font-weight: 600; margin-left: 6px;
  border-bottom: 1px solid rgba(160,139,255,.35);
}
.cv-line a:hover { color: var(--text); border-bottom-color: var(--accent-2); }
.tl-item p { margin-top: var(--s2); color: var(--text-soft); font-size: 14.5px; max-width: 62ch; }

/* =============================================================== contact */

.contact-panel {
  position: relative; overflow: hidden; text-align: center;
  padding: var(--s9) var(--s6); border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(70% 120% at 50% 0%, rgba(124,92,255,.20), transparent 62%),
    linear-gradient(180deg, var(--surface-2), var(--surface-1));
}
.contact-panel h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
.contact-panel p { margin: var(--s5) auto 0; max-width: 54ch; color: var(--text-soft); }
.contact-actions { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: center; margin-top: var(--s7); }
.contact-note { margin-top: var(--s5); font-size: 13px; color: var(--text-dim); }

.copy-mail {
  display: inline-flex; align-items: center; gap: 10px; margin-top: var(--s5);
  padding: 9px 14px; border-radius: 999px; border: 1px dashed var(--line-strong);
  background: transparent; cursor: pointer; font-family: var(--font-mono);
  font-size: 13px; color: var(--text-soft); transition: border-color .25s, color .25s, background .25s;
}
.copy-mail:hover { color: var(--text); border-color: var(--accent-2); background: rgba(53,214,193,.06); }

/* ================================================================ footer */

footer { border-top: 1px solid var(--line); padding: var(--s7) 0; }
.legal {
  margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--line);
  font-size: 12px; line-height: 1.6; color: var(--text-dim); max-width: 92ch;
}
.foot { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; justify-content: space-between; }
.foot p { font-size: 13.5px; color: var(--text-dim); }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--s5); }

/* Store listings under the OdobGames card: three verifiable links, not prose. */
.stores { list-style: none; margin: var(--s4) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.stores a {
  display: inline-block; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.03);
  font-size: 12.5px; color: var(--text-soft);
  transition: border-color .2s, color .2s, background .2s;
}
.stores a:hover { color: var(--text); border-color: var(--accent-2); background: rgba(53,214,193,.07); }

.project-status .sep, .project-status .scope { color: var(--text-dim); }
.foot-links a { font-size: 13.5px; color: var(--text-soft); transition: color .2s; }
.foot-links a:hover { color: var(--accent-2); }

.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line-strong);
  background: rgba(17,20,28,.85); backdrop-filter: blur(8px); cursor: pointer;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), border-color .2s;
}
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--accent-2); }
.to-top svg { width: 18px; height: 18px; }

/* ================================================== scroll-in animation */

.js [data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ============================================================ responsive */

@media (max-width: 1024px) {
  .project, .project--alt { grid-template-columns: 1fr; gap: var(--s6); }
  .project--alt .project-media { order: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  :root { --s9: 64px; --s10: 80px; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(9,11,16,.97); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line); padding: var(--s3) var(--s5) var(--s5);
    transform: translateY(-120%); visibility: hidden;
    transition: transform .35s var(--ease), visibility .35s;
    margin-left: 0;
  }
  .nav-links.is-open { transform: none; visibility: visible; }
  .nav-links a { padding: 13px 4px; font-size: 16px; border-radius: 0; }
  .nav-links a.is-active::after { left: 4px; right: auto; width: 22px; bottom: 8px; }
  .nav .shell { gap: var(--s3); }
  .nav-tools { margin-left: auto; }
  .burger {
    display: grid; place-items: center; width: 40px; height: 40px; cursor: pointer;
    border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.03);
  }
  .burger span { display: block; width: 17px; height: 1.5px; background: var(--text); position: relative; transition: background .2s; }
  .burger span::before, .burger span::after {
    content: ''; position: absolute; left: 0; width: 17px; height: 1.5px; background: var(--text);
    transition: transform .28s var(--ease);
  }
  .burger span::before { top: -5.5px; }
  .burger span::after { top: 5.5px; }
  .burger[aria-expanded='true'] span { background: transparent; }
  .burger[aria-expanded='true'] span::before { transform: translateY(5.5px) rotate(45deg); }
  .burger[aria-expanded='true'] span::after { transform: translateY(-5.5px) rotate(-45deg); }
  .nav .btn-primary { display: none; }
  .brand em { display: none; } /* the studio suffix wraps the header on phones */
  .brand span { font-size: 14px; white-space: nowrap; }
  .brand svg { width: 22px; height: 22px; }

  .grid, .skills { grid-template-columns: 1fr; }
  .card-kind, .card h3 { min-height: 0; }
  .project { padding: var(--s5); }
  .frame canvas { height: 260px; }
  .hero { padding-top: calc(var(--nav-h) + var(--s7)); }
  .timeline { padding-left: var(--s6); }
  .tl-item::before { left: calc(var(--s6) * -1 + 4px); }
}

@media (max-width: 460px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { width: 100%; }
}

/* Forced-colors mode drops background images, which would erase a headline
   painted with background-clip: text. Hand it back a real colour. */
@media (forced-colors: active) {
  .hero h1 .grad, .lost h1 span {
    -webkit-text-fill-color: currentColor;
    background: none; color: CanvasText;
  }
  .btn-primary { border-color: ButtonText; }
}

/* Motion is decoration here: when it is unwelcome, remove it entirely rather
   than merely shortening it. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* Printing a portfolio is a real thing recruiters do. */
@media print {
  .nav, .progress, .to-top, .hero-canvas, .scroll-cue, .frame { display: none !important; }
  body { background: #fff; color: #000; }
  section { padding: 18px 0; break-inside: avoid; }
  .card, .project, .skill { border-color: #ccc; background: none; }
  a[href^='http']::after { content: ' (' attr(href) ')'; font-size: 10px; color: #555; }
}
