/* ============================================================
   PORTFOLIO — style.css
   Single theme: "Steel / Commissioner" (round 7, variant 2).
   One type family, all weights. Gunmetal · silver · red.
   ============================================================ */

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

:root {
  /* layout */
  --maxw: 1080px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 0px;
  --bw: 1px;
  --gap: clamp(16px, 2.4vw, 28px);

  /* palette */
  --bg: #101215;
  --surface: #171A1E;
  --text: #EDEFF2;
  --dim: #868D96;
  --line: #262A30;
  --accent: #FF2E4D;
  --accent-dim: #B32138;
  --on-accent: #FFFFFF;

  /* type — one family, all weights */
  --display: "Commissioner", ui-sans-serif, system-ui, sans-serif;
  --body: "Commissioner", ui-sans-serif, system-ui, sans-serif;
  --ui: "Commissioner", ui-sans-serif, system-ui, sans-serif;
  --display-w: 800;
  --display-ls: -.045em;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16.5px;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.hidden { display: none !important; }

.page { position: relative; overflow: hidden; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

/* ── NAV ────────────────────────────────────────────────────── */
#nav, .nav {
  position: relative; z-index: 5;
  display: flex; align-items: center; gap: 24px;
  padding-block: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.brand-mark {
  width: 40px; height: 40px; display: block;
}
.brand-mark img { width: 100%; height: 100%; display: block; }
.brand-name { font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 14px; font-weight: 500; }
.nav-links a { color: var(--dim); transition: color .18s ease; }
.nav-links a:hover { color: var(--accent); }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 24px; border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent);
  border: var(--bw) solid var(--accent);
  font-family: var(--ui); font-size: 12.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.btn-sm { padding: 9px 16px; font-size: 11.5px; }

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  padding-block: clamp(60px, 11vw, 132px) clamp(36px, 6vw, 64px);
  position: relative; z-index: 2;
}
.eyebrow {
  font-family: var(--ui); font-size: 12px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 22px;
}
.hero-title {
  font-family: var(--display);
  font-size: clamp(44px, 8.4vw, 96px);
  line-height: .94;
  letter-spacing: var(--display-ls);
  font-weight: var(--display-w);
  margin: 0 0 26px;
  max-width: 13ch;
}
.hero-title em { font-style: normal; font-weight: 200; color: var(--accent); letter-spacing: -.02em; }
.hero-lede {
  font-size: clamp(16px, 1.5vw, 19px); font-weight: 300; color: var(--dim);
  max-width: 52ch; margin: 0 0 34px;
  border-top: var(--bw) solid var(--line); padding-top: 22px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── STACK STRIP (tools & tech) ─────────────────────────────── */
.stack {
  display: flex; flex-wrap: wrap; gap: clamp(18px, 3vw, 38px);
  padding-block: clamp(24px, 3.4vw, 36px);
  border-top: var(--bw) solid var(--line);
  position: relative; z-index: 2;
}
.stack-item {
  display: flex; align-items: center; gap: 10px;
  color: var(--dim); transition: color .18s ease;
}
.stack-item img {
  width: 20px; height: 20px; flex: 0 0 auto;
  opacity: .72; transition: opacity .18s ease, transform .18s ease;
}
.stack-item:hover { color: var(--text); }
.stack-item:hover img { opacity: 1; transform: translateY(-2px); }
.stack-item span {
  font-family: var(--ui); font-size: 11.5px; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase; white-space: nowrap;
}

/* ── SECTIONS ───────────────────────────────────────────────── */
.section { padding-block: clamp(52px, 7.5vw, 104px); position: relative; z-index: 2; }
.sec-head {
  margin-bottom: clamp(26px, 3.6vw, 42px);
  border-bottom: var(--bw) solid var(--line);
  padding-bottom: 20px;
}
.sec-title {
  font-family: var(--display); font-size: clamp(30px, 4.8vw, 54px); line-height: 1.02;
  letter-spacing: var(--display-ls); font-weight: var(--display-w);
  margin: 0 0 10px;
}
.sec-note { color: var(--dim); margin: 0; }

/* ── WORK TABS ──────────────────────────────────────────────── */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(22px, 3vw, 34px); }
.tab {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 18px; border-radius: var(--radius);
  background: transparent; color: var(--dim);
  border: var(--bw) solid var(--line);
  font-family: var(--ui); font-size: 12.5px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.tab:hover { color: var(--text); border-color: var(--accent); }
.tab[aria-selected="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.tab-n { font-size: 11px; opacity: .65; font-weight: 400; }

/* ── CARDS ──────────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: var(--gap);
  transition: opacity .3s ease, transform .3s ease;
}
.card {
  background: var(--surface);
  border: var(--bw) solid var(--line);
  border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  cursor: pointer;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
  animation: cardIn .34s ease both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 20px 50px rgba(0,0,0,.6); }

.card-media {
  height: 175px; position: relative; overflow: hidden;
  display: flex; align-items: flex-end; padding: 14px;
  background: #0B0D10;
  border-bottom: var(--bw) solid var(--line);
}
.card-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.card:hover .card-media img { transform: scale(1.04); }
.card-media::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 38%, rgba(0,0,0,.78) 100%);
}
.card-media::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  height: 2px; background: var(--accent);
  transform: scaleX(.18); transform-origin: left;
  transition: transform .32s ease;
}
.card:hover .card-media::after { transform: scaleX(1); }
.card-media-label {
  position: relative; z-index: 2;
  font-family: var(--ui); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: #FFFFFF; text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

.img-placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--ui); font-size: 11px; font-weight: 500;
  letter-spacing: .16em; color: var(--dim);
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 6px, transparent 6px 14px),
    #14171B;
}

.card-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title {
  font-family: var(--display); font-size: 20px; font-weight: 600;
  letter-spacing: -.03em; margin: 0;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--ui); font-size: 10.5px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--dim);
  border: var(--bw) solid var(--line);
  padding: 3px 8px;
}
.card-text { margin: 0; font-size: 14.5px; color: var(--dim); flex: 1; }
.card-footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.card-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border: var(--bw) solid var(--line);
  font-family: var(--ui); font-size: 11px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--dim);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.card-btn:hover { color: var(--accent); border-color: var(--accent); background: rgba(255,46,77,.06); }
.card-btn.primary { color: var(--text); border-color: var(--accent-dim); }

/* ── IMPORTANT LINKS ────────────────────────────────────────
   Set `important: true` on a project link (see resolveLink in projects.js)
   and its button breathes in the accent colour to pull the eye to it. */
@keyframes link-pulse {
  0%, 100% {
    color: var(--text);
    border-color: var(--accent-dim);
    box-shadow: 0 0 0 0 rgba(255, 46, 77, 0);
  }
  50% {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 46, 77, .13);
  }
}
.card-btn.important,
.detail-link.important {
  animation: link-pulse 1.9s ease-in-out infinite;
}
/* Hand control back to the hover rule while the pointer is on the button. */
.card-btn.important:hover,
.detail-link.important:hover { animation: none; }

/* Steam glyph — masked so it inherits the button's current text colour,
   the way the ▶ / ▣ / ⬟ character icons do. Used by .card-btn and .detail-link. */
.icon-steam {
  display: inline-block;
  width: 1.15em; height: 1.15em;
  vertical-align: -.22em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M11.979%200C5.678%200%20.511%204.86.022%2011.037l6.432%202.658c.545-.371%201.203-.59%201.912-.59.063%200%20.125.004.188.006l2.861-4.142V8.91c0-2.495%202.028-4.524%204.524-4.524%202.494%200%204.524%202.031%204.524%204.527s-2.03%204.525-4.524%204.525h-.105l-4.076%202.911c0%20.052.004.105.004.159%200%201.875-1.515%203.396-3.39%203.396-1.635%200-3.016-1.173-3.331-2.727L.436%2015.27C1.862%2020.307%206.486%2024%2011.979%2024c6.627%200%2011.999-5.373%2011.999-12S18.605%200%2011.979%200zM7.54%2018.21l-1.473-.61c.262.543.714.999%201.314%201.25%201.297.539%202.793-.076%203.332-1.375.263-.63.264-1.319.005-1.949s-.75-1.121-1.377-1.383c-.624-.26-1.29-.249-1.878-.03l1.523.63c.956.4%201.409%201.5%201.009%202.455-.397.957-1.497%201.41-2.454%201.012H7.54zm11.415-9.303c0-1.662-1.353-3.015-3.015-3.015-1.665%200-3.015%201.353-3.015%203.015%200%201.665%201.35%203.015%203.015%203.015%201.663%200%203.015-1.35%203.015-3.015zm-5.273-.005c0-1.252%201.013-2.266%202.265-2.266%201.249%200%202.266%201.014%202.266%202.266%200%201.251-1.017%202.265-2.266%202.265-1.253%200-2.265-1.014-2.265-2.265z%22%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M11.979%200C5.678%200%20.511%204.86.022%2011.037l6.432%202.658c.545-.371%201.203-.59%201.912-.59.063%200%20.125.004.188.006l2.861-4.142V8.91c0-2.495%202.028-4.524%204.524-4.524%202.494%200%204.524%202.031%204.524%204.527s-2.03%204.525-4.524%204.525h-.105l-4.076%202.911c0%20.052.004.105.004.159%200%201.875-1.515%203.396-3.39%203.396-1.635%200-3.016-1.173-3.331-2.727L.436%2015.27C1.862%2020.307%206.486%2024%2011.979%2024c6.627%200%2011.999-5.373%2011.999-12S18.605%200%2011.979%200zM7.54%2018.21l-1.473-.61c.262.543.714.999%201.314%201.25%201.297.539%202.793-.076%203.332-1.375.263-.63.264-1.319.005-1.949s-.75-1.121-1.377-1.383c-.624-.26-1.29-.249-1.878-.03l1.523.63c.956.4%201.409%201.5%201.009%202.455-.397.957-1.497%201.41-2.454%201.012H7.54zm11.415-9.303c0-1.662-1.353-3.015-3.015-3.015-1.665%200-3.015%201.353-3.015%203.015%200%201.665%201.35%203.015%203.015%203.015%201.663%200%203.015-1.35%203.015-3.015zm-5.273-.005c0-1.252%201.013-2.266%202.265-2.266%201.249%200%202.266%201.014%202.266%202.266%200%201.251-1.017%202.265-2.266%202.265-1.253%200-2.265-1.014-2.265-2.265z%22%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
}
.icon-github {
  display: inline-block;
  width: 1.15em; height: 1.15em;
  vertical-align: -.22em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12%20.297c-6.63%200-12%205.373-12%2012%200%205.303%203.438%209.8%208.205%2011.385.6.113.82-.258.82-.577%200-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422%2018.07%203.633%2017.7%203.633%2017.7c-1.087-.744.084-.729.084-.729%201.205.084%201.838%201.236%201.838%201.236%201.07%201.835%202.809%201.305%203.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93%200-1.31.465-2.38%201.235-3.22-.135-.303-.54-1.523.105-3.176%200%200%201.005-.322%203.3%201.23.96-.267%201.98-.399%203-.405%201.02.006%202.04.138%203%20.405%202.28-1.552%203.285-1.23%203.285-1.23.645%201.653.24%202.873.12%203.176.765.84%201.23%201.91%201.23%203.22%200%204.61-2.805%205.625-5.475%205.92.42.36.81%201.096.81%202.22%200%201.606-.015%202.896-.015%203.286%200%20.315.21.69.825.57C20.565%2022.092%2024%2017.592%2024%2012.297c0-6.627-5.373-12-12-12%22%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12%20.297c-6.63%200-12%205.373-12%2012%200%205.303%203.438%209.8%208.205%2011.385.6.113.82-.258.82-.577%200-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422%2018.07%203.633%2017.7%203.633%2017.7c-1.087-.744.084-.729.084-.729%201.205.084%201.838%201.236%201.838%201.236%201.07%201.835%202.809%201.305%203.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93%200-1.31.465-2.38%201.235-3.22-.135-.303-.54-1.523.105-3.176%200%200%201.005-.322%203.3%201.23.96-.267%201.98-.399%203-.405%201.02.006%202.04.138%203%20.405%202.28-1.552%203.285-1.23%203.285-1.23.645%201.653.24%202.873.12%203.176.765.84%201.23%201.91%201.23%203.22%200%204.61-2.805%205.625-5.475%205.92.42.36.81%201.096.81%202.22%200%201.606-.015%202.896-.015%203.286%200%20.315.21.69.825.57C20.565%2022.092%2024%2017.592%2024%2012.297c0-6.627-5.373-12-12-12%22%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
}
.icon-itch {
  display: inline-block;
  width: 1.15em; height: 1.15em;
  vertical-align: -.22em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M3.13%201.338C2.08%201.96.02%204.328%200%204.95v1.03c0%201.303%201.22%202.45%202.325%202.45%201.33%200%202.436-1.102%202.436-2.41%200%201.308%201.07%202.41%202.4%202.41%201.328%200%202.362-1.102%202.362-2.41%200%201.308%201.137%202.41%202.466%202.41h.024c1.33%200%202.466-1.102%202.466-2.41%200%201.308%201.034%202.41%202.363%202.41%201.33%200%202.4-1.102%202.4-2.41%200%201.308%201.106%202.41%202.435%202.41C22.78%208.43%2024%207.282%2024%205.98V4.95c-.02-.62-2.082-2.99-3.13-3.612-3.253-.114-5.508-.134-8.87-.133-3.362%200-7.945.053-8.87.133zm6.376%206.477a2.74%202.74%200%200%201-.468.602c-.5.49-1.19.795-1.947.795a2.786%202.786%200%200%201-1.95-.795c-.182-.178-.32-.37-.446-.59-.127.222-.303.412-.486.59a2.788%202.788%200%200%201-1.95.795c-.092%200-.187-.025-.264-.052-.107%201.113-.152%202.176-.168%202.95v.005l-.006%201.167c.02%202.334-.23%207.564%201.03%208.85%201.952.454%205.545.662%209.15.663%203.605%200%207.198-.21%209.15-.664%201.26-1.284%201.01-6.514%201.03-8.848l-.006-1.167v-.004c-.016-.775-.06-1.838-.168-2.95-.077.026-.172.052-.263.052a2.788%202.788%200%200%201-1.95-.795c-.184-.178-.36-.368-.486-.59-.127.22-.265.412-.447.59a2.786%202.786%200%200%201-1.95.794c-.76%200-1.446-.303-1.948-.793a2.74%202.74%200%200%201-.468-.602%202.738%202.738%200%200%201-.463.602%202.787%202.787%200%200%201-1.95.794h-.16a2.787%202.787%200%200%201-1.95-.793%202.738%202.738%200%200%201-.464-.602zm-2.004%202.59v.002c.795.002%201.5%200%202.373.953.687-.072%201.406-.108%202.125-.107.72%200%201.438.035%202.125.107.873-.953%201.578-.95%202.372-.953.376%200%201.876%200%202.92%202.934l1.123%204.028c.832%202.995-.266%203.068-1.636%203.07-2.03-.075-3.156-1.55-3.156-3.025-1.124.184-2.436.276-3.748.277-1.312%200-2.624-.093-3.748-.277%200%201.475-1.125%202.95-3.156%203.026-1.37-.004-2.468-.077-1.636-3.072l1.122-4.027c1.045-2.934%202.545-2.934%202.92-2.934zM12%2012.714c-.002.002-2.14%201.964-2.523%202.662l1.4-.056v1.22c0%20.056.56.033%201.123.007.562.026%201.124.05%201.124-.008v-1.22l1.4.055C14.138%2014.677%2012%2012.713%2012%2012.713z%22%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M3.13%201.338C2.08%201.96.02%204.328%200%204.95v1.03c0%201.303%201.22%202.45%202.325%202.45%201.33%200%202.436-1.102%202.436-2.41%200%201.308%201.07%202.41%202.4%202.41%201.328%200%202.362-1.102%202.362-2.41%200%201.308%201.137%202.41%202.466%202.41h.024c1.33%200%202.466-1.102%202.466-2.41%200%201.308%201.034%202.41%202.363%202.41%201.33%200%202.4-1.102%202.4-2.41%200%201.308%201.106%202.41%202.435%202.41C22.78%208.43%2024%207.282%2024%205.98V4.95c-.02-.62-2.082-2.99-3.13-3.612-3.253-.114-5.508-.134-8.87-.133-3.362%200-7.945.053-8.87.133zm6.376%206.477a2.74%202.74%200%200%201-.468.602c-.5.49-1.19.795-1.947.795a2.786%202.786%200%200%201-1.95-.795c-.182-.178-.32-.37-.446-.59-.127.222-.303.412-.486.59a2.788%202.788%200%200%201-1.95.795c-.092%200-.187-.025-.264-.052-.107%201.113-.152%202.176-.168%202.95v.005l-.006%201.167c.02%202.334-.23%207.564%201.03%208.85%201.952.454%205.545.662%209.15.663%203.605%200%207.198-.21%209.15-.664%201.26-1.284%201.01-6.514%201.03-8.848l-.006-1.167v-.004c-.016-.775-.06-1.838-.168-2.95-.077.026-.172.052-.263.052a2.788%202.788%200%200%201-1.95-.795c-.184-.178-.36-.368-.486-.59-.127.22-.265.412-.447.59a2.786%202.786%200%200%201-1.95.794c-.76%200-1.446-.303-1.948-.793a2.74%202.74%200%200%201-.468-.602%202.738%202.738%200%200%201-.463.602%202.787%202.787%200%200%201-1.95.794h-.16a2.787%202.787%200%200%201-1.95-.793%202.738%202.738%200%200%201-.464-.602zm-2.004%202.59v.002c.795.002%201.5%200%202.373.953.687-.072%201.406-.108%202.125-.107.72%200%201.438.035%202.125.107.873-.953%201.578-.95%202.372-.953.376%200%201.876%200%202.92%202.934l1.123%204.028c.832%202.995-.266%203.068-1.636%203.07-2.03-.075-3.156-1.55-3.156-3.025-1.124.184-2.436.276-3.748.277-1.312%200-2.624-.093-3.748-.277%200%201.475-1.125%202.95-3.156%203.026-1.37-.004-2.468-.077-1.636-3.072l1.122-4.027c1.045-2.934%202.545-2.934%202.92-2.934zM12%2012.714c-.002.002-2.14%201.964-2.523%202.662l1.4-.056v1.22c0%20.056.56.033%201.123.007.562.026%201.124.05%201.124-.008v-1.22l1.4.055C14.138%2014.677%2012%2012.713%2012%2012.713z%22%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
}
.icon-youtube {
  display: inline-block;
  width: 1.15em; height: 1.15em;
  vertical-align: -.22em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M23.498%206.186a3.016%203.016%200%200%200-2.122-2.136C19.505%203.545%2012%203.545%2012%203.545s-7.505%200-9.377.505A3.017%203.017%200%200%200%20.502%206.186C0%208.07%200%2012%200%2012s0%203.93.502%205.814a3.016%203.016%200%200%200%202.122%202.136c1.871.505%209.376.505%209.376.505s7.505%200%209.377-.505a3.015%203.015%200%200%200%202.122-2.136C24%2015.93%2024%2012%2024%2012s0-3.93-.502-5.814zM9.545%2015.568V8.432L15.818%2012l-6.273%203.568z%22%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M23.498%206.186a3.016%203.016%200%200%200-2.122-2.136C19.505%203.545%2012%203.545%2012%203.545s-7.505%200-9.377.505A3.017%203.017%200%200%200%20.502%206.186C0%208.07%200%2012%200%2012s0%203.93.502%205.814a3.016%203.016%200%200%200%202.122%202.136c1.871.505%209.376.505%209.376.505s7.505%200%209.377-.505a3.015%203.015%200%200%200%202.122-2.136C24%2015.93%2024%2012%2024%2012s0-3.93-.502-5.814zM9.545%2015.568V8.432L15.818%2012l-6.273%203.568z%22%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
}
.card-link {
  font-family: var(--ui); font-size: 13px; font-weight: 600;
  color: var(--accent); margin-top: 6px;
}
.card-link::after { content: " →"; }

.no-cards {
  grid-column: 1 / -1;
  font-family: var(--ui); font-size: 12.5px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--dim); padding: 40px 0;
}

/* ── ABOUT / PROSE ──────────────────────────────────────────── */
/* One column until a photo is present, two once it is. `.prose p` keeps its
   62ch cap in both states, so the paragraph never outgrows its reading
   measure no matter how wide the track it sits in gets. */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.about-grid:has(.about-figure) {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}
.about-figure { margin: 0; }
.about-figure img {
  width: 100%; max-width: 440px;
  aspect-ratio: 4 / 5; object-fit: cover;
  border: var(--bw) solid var(--line);
}
.about-figure figcaption {
  font-family: var(--ui); font-size: 11px; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--dim); margin-top: 12px;
}

.prose p { margin: 0 0 18px; color: var(--dim); max-width: 62ch; font-size: 17px; }
.prose p:last-child { margin-bottom: 0; }
.prose p strong { color: var(--text); font-weight: 600; }
.bio-hi { color: var(--text); font-weight: 600; }
.hl { color: var(--text); font-weight: 500; }
.hl-tech { color: var(--accent); font-weight: 500; }

/* ── CONTACT ────────────────────────────────────────────────── */
.contact-grid {
  display: grid; grid-template-columns: 1.25fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: flex; flex-direction: column; gap: 7px; }
.form-row label {
  font-family: var(--ui); font-size: 11px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--dim);
}
.form-row input,
.form-row textarea {
  background: var(--surface);
  border: var(--bw) solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--body); font-size: 15px; font-weight: 300;
  padding: 12px 14px;
  transition: border-color .18s ease;
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus { outline: none; border-color: var(--accent); }
.form-row input::placeholder,
.form-row textarea::placeholder { color: #5A616B; }

.btn-submit {
  align-self: flex-start;
  padding: 14px 26px;
  background: var(--accent); color: var(--on-accent);
  border: var(--bw) solid var(--accent); border-radius: var(--radius);
  font-family: var(--ui); font-size: 12.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer;
  transition: filter .18s ease, transform .18s ease;
}
.btn-submit:hover { filter: brightness(1.1); transform: translateY(-2px); }
.btn-submit:disabled { opacity: .5; cursor: default; transform: none; }

.form-status { font-size: 13.5px; color: var(--dim); min-height: 1.2em; }
.form-status.ok { color: #4FD69C; }
.form-status.err { color: var(--accent); }

.contact-links { display: flex; flex-direction: column; gap: 10px; }
.contact-links-label {
  font-family: var(--ui); font-size: 11px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--dim);
  margin-bottom: 4px;
}
.clink {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: var(--bw) solid var(--line); border-radius: var(--radius);
  font-family: var(--ui); font-size: 12.5px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--dim);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.clink:hover { color: var(--text); border-color: var(--accent); background: var(--surface); }
.clink-icon {
  display: grid; place-items: center;
  width: 26px; height: 26px; flex: 0 0 auto;
  border: var(--bw) solid var(--line);
  font-size: 10.5px; font-weight: 600; letter-spacing: .04em; color: var(--accent);
}
.clink-arrow { margin-left: auto; color: var(--dim); }
.clink:hover .clink-arrow { color: var(--accent); }

/* ── FOOTER ─────────────────────────────────────────────────── */
footer, .foot {
  border-top: var(--bw) solid var(--line);
  padding-block: 26px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--ui); font-size: 12px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--dim);
}
.foot a { transition: color .18s ease; }
.foot a:hover { color: var(--accent); }

/* ============================================================
   PROJECT DETAIL PAGE
   ============================================================ */
.detail-page { padding-block: clamp(28px, 5vw, 56px) clamp(48px, 7vw, 88px); }

.detail-back {
  display: inline-flex; align-items: center;
  font-family: var(--ui); font-size: 11.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--dim);
  border: var(--bw) solid var(--line);
  padding: 9px 16px; margin-bottom: clamp(30px, 5vw, 54px);
  transition: color .18s ease, border-color .18s ease;
}
.detail-back:hover { color: var(--accent); border-color: var(--accent); }

.detail-hero {
  margin-bottom: clamp(28px, 4vw, 44px);
  border-bottom: var(--bw) solid var(--line);
  padding-bottom: clamp(22px, 3vw, 32px);
}
.detail-eyebrow {
  font-family: var(--ui); font-size: 12px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.detail-title {
  font-family: var(--display);
  font-size: clamp(34px, 6vw, 62px); line-height: .98;
  letter-spacing: var(--display-ls); font-weight: var(--display-w);
  margin: 0 0 20px;
}
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-hero-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.detail-link {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 18px;
  border: var(--bw) solid var(--line);
  font-family: var(--ui); font-size: 11.5px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--dim);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.detail-link:hover { color: var(--accent); border-color: var(--accent); background: rgba(255,46,77,.06); }
.detail-link.primary { color: var(--text); border-color: var(--accent-dim); }

.detail-cover {
  width: 100%; max-height: 520px; object-fit: cover;
  border: var(--bw) solid var(--line);
  margin-bottom: clamp(24px, 4vw, 40px);
}
.detail-cover-placeholder {
  display: grid; place-items: center;
  height: 240px; margin-bottom: clamp(24px, 4vw, 40px);
  border: var(--bw) solid var(--line);
  font-family: var(--ui); font-size: 11.5px; font-weight: 500;
  letter-spacing: .16em; color: var(--dim);
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 6px, transparent 6px 14px),
    #14171B;
}

/* YouTube thumbnail — replaces the cover when a video exists */
.detail-yt {
  position: relative; display: block; width: 100%;
  margin-bottom: clamp(24px, 4vw, 40px);
  border: var(--bw) solid var(--line);
  overflow: hidden; background: #000; cursor: pointer;
}
.detail-yt img {
  width: 100%; max-height: 500px; object-fit: cover; display: block;
  transition: filter .25s ease, transform .25s ease;
}
.detail-yt:hover img { filter: brightness(.4); transform: scale(1.02); }
.yt-play-overlay {
  position: absolute; inset: 18px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  border: 2px solid var(--accent);
  font-family: var(--ui); font-size: 12.5px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.detail-yt:hover .yt-play-overlay { opacity: 1; }

/* ── Detail sections ────────────────────────────────────────── */
.detail-sections { margin-top: 0; }
.detail-section {
  padding: clamp(22px, 3.4vw, 36px);
  margin-bottom: var(--gap);
  border: var(--bw) solid var(--line);
  background: var(--surface);
}
.detail-section:last-child { margin-bottom: 0; }

.detail-sh {
  font-family: var(--display);
  font-size: clamp(20px, 2.6vw, 27px); line-height: 1.1;
  letter-spacing: -.035em; font-weight: 600;
  color: var(--text); margin: 0 0 18px;
  padding-left: 14px; border-left: 2px solid var(--accent);
}
.detail-ssubh {
  font-family: var(--display); font-size: 17px; font-weight: 600;
  letter-spacing: -.02em; color: var(--text);
  margin: 26px 0 12px; padding-left: 14px;
  border-left: 2px solid var(--accent-dim);
}

.detail-section p { font-size: 15.5px; color: var(--dim); line-height: 1.8; margin: 0 0 16px; }
.detail-section p:last-child { margin-bottom: 0; }
.detail-section ul,
.detail-section ol { font-size: 15.5px; color: var(--dim); line-height: 1.8; padding-left: 22px; margin: 0 0 16px; }
.detail-section li { margin-bottom: 6px; }
.detail-section li::marker { color: var(--accent); }
.detail-section strong { color: var(--text); font-weight: 600; }
.detail-section a { color: var(--accent); border-bottom: 1px solid transparent; }
.detail-section a:hover { border-bottom-color: var(--accent); }
.detail-section code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: .82em;
  background: #0D0F12; border: var(--bw) solid var(--line);
  padding: .12em .42em; color: var(--text);
}

/* Inline media inside a section */
.d-media { display: flex; flex-direction: column; gap: 14px; margin: 22px 0; }
.d-media:last-child { margin-bottom: 0; }
.d-media img,
.d-media video {
  width: 100%; height: auto; display: block;
  border: var(--bw) solid var(--line);
  max-height: 520px; object-fit: contain;
  background: #000;
}

.d-yt { position: relative; width: 100%; padding-top: 56.25%; margin: 22px 0; border: var(--bw) solid var(--line); }
.d-yt:last-child { margin-bottom: 0; }
.d-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* ── Case-study callouts ────────────────────────────────────── */
.cs-feature {
  padding: 18px 20px; margin-bottom: 12px;
  border-left: 2px solid var(--accent);
  background: rgba(255,255,255,.025);
}
.cs-feature:last-child { margin-bottom: 0; }
.cs-feature-title {
  font-family: var(--ui); font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text); margin: 0 0 8px;
}
.cs-feature p { margin: 0; }

/* ── Room generator simulator ───────────────────────────────── */
.gt-sim { margin: 24px 0; display: flex; flex-direction: column; align-items: center; }
.gt-controls {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 8px; margin-bottom: 12px; width: 100%; max-width: 600px;
}
.gt-label {
  font-family: var(--ui); font-size: 11px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--dim);
}
.gt-mode-btn {
  font-family: var(--ui); font-size: 11px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 12px;
  background: transparent; border: var(--bw) solid var(--line); color: var(--dim);
  cursor: pointer; transition: color .15s ease, border-color .15s ease;
}
.gt-mode-btn:hover { color: var(--text); border-color: var(--dim); }
.gt-mode-btn.active { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
#gt-canvas {
  display: block; width: 100%; max-width: 600px; height: auto;
  border: var(--bw) solid var(--line); cursor: pointer; background: #0B0D10;
}
.gt-hint {
  font-family: var(--ui); font-size: 11px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--dim); opacity: .7; margin-top: 10px; text-align: center;
}
.gt-count-input {
  font-family: var(--ui); font-size: 12px; padding: 5px 8px; width: 62px;
  background: transparent; border: var(--bw) solid var(--line); color: var(--text);
  text-align: center; -moz-appearance: textfield;
}
.gt-count-input:focus { outline: none; border-color: var(--accent); }
.gt-count-input::-webkit-outer-spin-button,
.gt-count-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ── SCROLL REVEAL ──────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 1600px) {
  :root { --maxw: 1280px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }

  /* Stack the photo under the intro rather than letting its column collapse. */
  .about-grid:has(.about-figure) { grid-template-columns: minmax(0, 1fr); }
  .about-figure img { max-width: 300px; }
}

@media (max-width: 820px) {
  .nav-links { gap: 16px; font-size: 13px; }
  .tab { padding: 10px 14px; font-size: 11.5px; }
  .stack { gap: 16px 22px; }
  .hero-title { max-width: 100%; }
}

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .brand-name { display: none; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .btn-submit { width: 100%; justify-content: center; }
  .foot { flex-direction: column; gap: 8px; }
}

@media (max-width: 420px) {
  .nav-links { gap: 12px; font-size: 12px; }
  .tab { padding: 9px 11px; font-size: 10.5px; letter-spacing: .08em; }
  .tab-n { display: none; }
}

/* Touch: swap hover affordances for tap feedback */
@media (hover: none) {
  .card:hover { transform: none; box-shadow: none; }
  .card:hover .card-media img { transform: none; }
  .card:active { border-color: var(--accent); }
  .card:active .card-media::after { transform: scaleX(1); }
  .detail-yt:hover img { filter: none; transform: none; }
  .yt-play-overlay { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }

  /* No pulse — mark important links with a steady accent instead. */
  .card-btn.important,
  .detail-link.important {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(255, 46, 77, .06);
  }
}
