/* === Dilain.ai — Redesign === */

:root {
  --bg: #0e1822;
  --bg-2: #0e1822;        /* surfaces match bg for neumorphism */
  --bg-3: #11202d;
  --line: rgba(255, 255, 255, 0.04);
  --line-2: rgba(255, 255, 255, 0.06);
  --ink: #e6ecef;
  --ink-2: #b8c2c6;
  --ink-3: #7a868c;
  --ink-4: #4d5860;

  /* neumorphic shadows (dark) */
  --hi:  rgba(255, 255, 255, 0.045);
  --lo:  rgba(0, 0, 0, 0.55);
  --hi-soft: rgba(255, 255, 255, 0.025);
  --lo-soft: rgba(0, 0, 0, 0.35);

  --neu-out:
    -6px -6px 14px var(--hi),
     10px 10px 22px var(--lo);
  --neu-out-sm:
    -3px -3px 8px var(--hi-soft),
     5px  5px 12px var(--lo-soft);
  --neu-in:
    inset  4px  4px 10px var(--lo),
    inset -3px -3px 8px var(--hi);
  --neu-in-sm:
    inset  2px  2px 6px var(--lo-soft),
    inset -2px -2px 4px var(--hi-soft);

  /* accent — switchable via tweaks */
  --accent: #7c6bff;       /* indigo primary */
  --accent-2: #5d4dff;     /* deeper indigo */
  --accent-grad: linear-gradient(135deg, #8b7cff 0%, #5d4dff 100%);
  --accent-soft: rgba(124, 107, 255, 0.14);
  /* dedicated darker-teal highlight for in-text emphasis (name "AI", "art & technology", "Age of AI") */
  --accent-deep: #1f7a6e;
  --sage: #9eb6b1;         /* kept as secondary highlight */

  /* type */
  --f-sans: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-serif: "Instrument Serif", "Times New Roman", serif;
  --f-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

  /* rhythm */
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(72px, 9vw, 128px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(124, 107, 255, 0.05), transparent 60%),
    radial-gradient(900px 500px at 10% 30%, rgba(45, 88, 104, 0.05), transparent 70%),
    var(--bg);
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* faint grid background */
.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
  opacity: 0.35;
  z-index: 0;
}

main, header, footer { position: relative; z-index: 1; }

/* === Type scale === */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; }

.h-display {
  font-size: clamp(48px, 7.2vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 500;
}
.h-display em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.01em;
}
.h-section {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.h-section em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.h-card { font-size: 22px; line-height: 1.2; letter-spacing: -0.015em; }

p { margin: 0; color: var(--ink-2); }
.lead { font-size: 18px; line-height: 1.55; color: var(--ink-2); max-width: 60ch; }

/* === Header === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(14, 24, 34, 0.7);
}
.site-header .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: grid;
  /* 3-col: empty spacer | nav (centered) | actions (right) — matched outer cols keep nav truly centered */
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.site-header .nav { grid-column: 2; justify-self: center; }
.site-header .header-actions { grid-column: 3; justify-self: end; }
.brand {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand .dot { color: var(--accent); }
.nav {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 6px 12px;
  background: var(--bg);
  border-radius: 999px;
  box-shadow: var(--neu-in-sm);
  position: relative;
}
/* single green highlight that slides between links.
   Geometry (transform/width/height/opacity) is written directly onto this
   element from JS — this preview renderer doesn't re-evaluate var()-based
   declarations when a custom prop changes post-mount, so we avoid var() here. */
.nav-pill {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 40px;
  opacity: 0;
  border-radius: 999px;
  background: var(--accent-grad);
  box-shadow:
    -3px -3px 8px var(--hi-soft),
     5px  5px 12px var(--lo-soft),
     inset 1px 1px 0 rgba(255,255,255,0.08);
  z-index: 0;
  pointer-events: none;
  /* spring-ish slide that matches the soft 3D feel */
  transition:
    transform .52s cubic-bezier(.34,1.42,.5,1),
    width .52s cubic-bezier(.34,1.42,.5,1),
    height .3s ease,
    opacity .3s ease;
}
.nav a {
  font-size: 13px;
  color: var(--ink-2);
  padding: 10px 22px;
  border-radius: 999px;
  background: transparent;
  transition: color .3s ease;
  position: relative;
  z-index: 1;
}
.nav a:hover { color: var(--accent); }
.nav a.active,
.nav a.active:hover {
  color: var(--ink);
}
.header-actions { display: flex; gap: 10px; align-items: center; }
.icon-btn {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-2);
  box-shadow: var(--neu-out-sm);
  transition: all .25s ease;
}
.icon-btn:hover {
  color: var(--accent);
}
.icon-btn:active {
  box-shadow: var(--neu-in-sm);
  color: var(--accent);
}

/* === Side rails === */
.side-rail {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-4);
  text-transform: uppercase;
  z-index: 10;
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: 16px;
}
.side-rail.left { left: 18px; }
.side-rail.right { right: 18px; }
.side-rail .bar {
  width: 1px; height: 40px;
  background: var(--line-2);
}
@media (max-width: 1100px) { .side-rail { display: none; } }

/* === Section shell === */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
  position: relative;
}
.section.tight { padding-top: 32px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
}
.section-head .label {
  display: flex; align-items: center; gap: 16px;
}
.section-head .label::before {
  content: "";
  width: 32px; height: 1px;
  background: var(--accent);
}
.section-head .link {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color .25s ease, gap .25s ease;
}
.section-head .link:hover { color: var(--accent); gap: 10px; }

/* === Hero === */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(20px, 2.5vw, 40px) var(--gutter) clamp(32px, 4vw, 56px);
  /* center the hero composition in the first viewport (nav ≈ 76px) so the
     whitespace above and below is balanced instead of a fixed top gap */
  min-height: calc(100svh - 76px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-grid { width: 100%; }
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px 9px 14px;
  border: 0;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--bg);
  box-shadow: var(--neu-out-sm);
  margin-bottom: 28px;
}
.hero-status .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-copy { max-width: 640px; }
/* Centered headline row above the two-column grid */
.hero-headline {
  text-transform: uppercase;
  text-align: center;
  margin-bottom: clamp(36px, 4.5vw, 64px);
  font-size: clamp(48px, 7.2vw, 104px);
}
.hero-break { display: none; }
.hero-welcome {
  margin-top: 0;
  font-size: 30px;
  line-height: 1.35;
  color: var(--ink);
  max-width: 32ch;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.hero-sub {
  margin-top: 18px;
  font-size: 18.5px;
  line-height: 1.62;
  color: #cfd8dc;
  max-width: 46ch;
  letter-spacing: 0.002em;
}
.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  border: 0;
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--neu-out);
  transition: all .3s cubic-bezier(.2,.7,.2,1);
}
.btn:hover {
  color: var(--accent);
}
.btn:active {
  box-shadow: var(--neu-in);
  transform: translateY(0);
}
.btn .arrow { transition: transform .3s ease; }
.btn-primary:hover .arrow { transform: translateX(3px); }
.btn:not(.btn-primary):hover .arrow { transform: translate(2px, -2px); }
.btn-primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow:
    -6px -6px 14px var(--hi),
     10px 10px 22px var(--lo),
     inset 1px 1px 0 rgba(255,255,255,0.08);
}
.btn-primary:hover {
  color: #fff;
  filter: brightness(1.08);
}
.btn-primary:active {
  box-shadow:
    inset  3px  3px 8px rgba(0,0,0,0.35),
    inset -2px -2px 6px rgba(255,255,255,0.12);
  filter: brightness(0.95);
}

/* hero right column — portrait + identity card */
.hero-aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.portrait-frame {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--neu-out);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.portrait-frame:hover {
  transform: translateY(-4px);
}
.portrait-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.92);
  transition: filter .5s ease, transform .8s cubic-bezier(.2,.7,.2,1);
}
.portrait-frame:hover img {
  filter: saturate(1) brightness(1);
  transform: scale(1.03);
}
.portrait-meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 20px;
  background: linear-gradient(to top, rgba(14,24,34,.95), transparent);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.portrait-meta strong { color: var(--ink); font-weight: 500; }

.portrait-caption {
  position: absolute;
  inset: auto 0 0 0;
  margin: 0;
  padding: 28px 18px 14px;
  font-family: var(--f-serif);
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,0.92);
  text-align: center;
  text-wrap: pretty;
  background: linear-gradient(to top, rgba(8,12,20,0.62), rgba(8,12,20,0.28) 60%, rgba(8,12,20,0));
}

.id-card {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 40px;
  padding: 14px;
  background: var(--bg);
  border-radius: 20px;
  box-shadow: var(--neu-in);
}
.id-cell {
  padding: 14px 16px;
  background: var(--bg);
  border-radius: 12px;
  box-shadow: var(--neu-out-sm);
}
.id-cell .k {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.id-cell .v { font-size: 14px; color: var(--ink); }

/* hero footer ticker */
.hero-ticker {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  padding: 18px 22px;
  border-radius: 16px;
  background: var(--bg);
  box-shadow: var(--neu-in-sm);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.hero-ticker .item { display: flex; align-items: center; gap: 10px; padding-right: 14px; }
.hero-ticker .item:not(:last-child) { border-right: 1px solid var(--hi); }
.hero-ticker .item::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0;
}

/* === About strip === */
.about-strip {
  background: linear-gradient(to bottom, rgba(14,24,34,0), rgba(0,0,0,0.18), rgba(14,24,34,0));
}
.about-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px var(--gutter);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 800px) {
  .about-inner { grid-template-columns: 1fr; gap: 24px; }
}
.about-body p + p { margin-top: 16px; }
.about-body .sig {
  margin-top: 28px;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 27px;
  line-height: 1.35;
  color: var(--accent);
}

/* === Principles === */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 880px) {
  .principles-grid { grid-template-columns: 1fr; }
}
.principle {
  position: relative;
  padding: 32px 28px 28px;
  border: 0;
  border-radius: 20px;
  /* sit a touch deeper than the page so the inset shadow reads */
  background: rgba(0, 0, 0, 0.18);
  /* same "carved in" treatment as .excite — clearly not a button */
  box-shadow:
    inset 6px 6px 14px var(--lo),
    inset -4px -4px 10px var(--hi);
  cursor: default;
}
.principle::before { content: none; }
/* Fully non-interactive — no transform, no shadow change on hover/active */
.principle:hover,
.principle:active {
  transform: none;
  box-shadow:
    inset 6px 6px 14px var(--lo),
    inset -4px -4px 10px var(--hi);
}
.principle .num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  margin-bottom: 56px;
  display: block;
  position: relative;
}
.principle .num::after {
  content: "";
  display: block;
  width: 24px; height: 1px;
  background: var(--accent);
  margin-top: 8px;
  transition: width .4s cubic-bezier(.2,.7,.2,1);
}
.principle h3 { font-size: 24px; letter-spacing: -0.02em; }
.principle .copy { margin-top: 12px; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }

/* === Projects bento === */
.work-block {
  margin-top: 56px;
  scroll-margin-top: 90px;
}
.work-block:first-of-type { margin-top: 0; }
.block-head {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  align-items: end;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--hi);
}
@media (max-width: 800px) {
  .block-head { grid-template-columns: 1fr; gap: 16px; }
}
.block-num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.block-title {
  font-size: clamp(28px, 3.2vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 500;
}
.block-sub {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
  max-width: 56ch;
}

.subgroup {
  margin-top: 28px;
}
.subgroup + .subgroup { margin-top: 32px; }
.subhead {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.sub-marker {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: var(--neu-out-sm);
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0;
}

.projects-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 980px) { .projects-row { grid-template-columns: 1fr; } }
.projects-row .proj { min-height: 200px; }

.projects-bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(140px, auto);
  gap: 14px;
}
@media (max-width: 980px) {
  .projects-bento { grid-template-columns: repeat(2, 1fr); }
}

/* placeholder cards */
.proj.placeholder {
  box-shadow: var(--neu-in-sm);
  background: transparent;
  color: var(--ink-3);
  opacity: 0.7;
}
.proj.placeholder:hover { transform: none; box-shadow: var(--neu-in); opacity: 0.85; }
.proj.placeholder .arrow { color: var(--ink-3); }
.proj.placeholder h3, .proj.placeholder .desc { color: var(--ink-3); }

/* SERENDISCO feature-hero card */
.proj.feature-hero {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
  min-height: 480px;
}
@media (max-width: 900px) {
  .proj.feature-hero { grid-template-columns: 1fr; min-height: auto; }
}
.feature-hero-img {
  position: relative;
  background: var(--bg);
  overflow: hidden;
}
.feature-hero-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.proj.feature-hero:hover .feature-hero-img img { transform: scale(1.04); }
.feature-hero-body {
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: space-between;
}
@media (max-width: 900px) {
  .feature-hero-img { aspect-ratio: 16/10; }
  .feature-hero-body { padding: 28px; }
}

/* stats row inside serendisco card */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 14px;
  background: var(--bg);
  border-radius: 16px;
  box-shadow: var(--neu-in-sm);
  margin-top: 8px;
}
@media (max-width: 560px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat {
  padding: 12px 10px;
  text-align: center;
}
.stat-n {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 28px;
  line-height: 1;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}
.stat-k {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.proj {
  position: relative;
  border: 0;
  border-radius: 22px;
  background: var(--bg);
  padding: 28px;
  overflow: hidden;
  box-shadow: var(--neu-out);
  transition: all .35s cubic-bezier(.2,.7,.2,1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-height: 200px;
  cursor: pointer;
}
.proj:hover {
  transform: translateY(-2px);
  box-shadow:
    -8px -8px 18px var(--hi),
     14px 14px 28px var(--lo);
}
.proj:active {
  box-shadow: var(--neu-in);
  transform: translateY(0);
}
.proj .head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}
.proj .kicker {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.proj h3 {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-top: 8px;
}
.proj .desc { color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.proj .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.proj .arrow {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: var(--neu-out-sm);
  display: grid; place-items: center;
  color: var(--ink-3);
  transition: all .35s ease;
  flex-shrink: 0;
}
.proj:hover .arrow {
  color: var(--accent);
  transform: rotate(-45deg);
}

/* bento sizing */
.proj.feature { grid-column: span 4; grid-row: span 2; min-height: 380px; }
.proj.tall { grid-column: span 2; grid-row: span 2; min-height: 380px; }
.proj.wide { grid-column: span 3; min-height: 200px; }
.proj.normal { grid-column: span 2; min-height: 200px; }
.proj.full { grid-column: 1 / -1; min-height: 168px; }
.proj.half { grid-column: span 3; min-height: 188px; }
@media (max-width: 980px) {
  .proj.half { grid-column: span 2; }
}
@media (max-width: 980px) {
  .proj.feature, .proj.tall, .proj.wide, .proj.normal { grid-column: span 2; grid-row: auto; min-height: 220px; }
}

/* visual / placeholder inside proj */
.proj-visual {
  position: relative;
  flex: 1;
  border-radius: 14px;
  background: var(--bg);
  box-shadow: var(--neu-in-sm);
  display: grid; place-items: center;
  overflow: hidden;
  min-height: 100px;
}
.proj-visual::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.015) 0 10px, transparent 10px 20px);
  pointer-events: none;
}
.proj-visual.img { box-shadow: none; padding: 0; }
.proj-visual.img::before { display: none; }
.proj-visual.img img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.proj-visual .ph-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* Tag pills — neumorphic */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  background: var(--bg);
  border: 0;
  border-radius: 999px;
  box-shadow: var(--neu-out-sm);
  transition: all .25s ease;
  cursor: default;
}
.tag:hover {
  color: var(--accent);
  transform: translateY(-1px);
}
.tag:active {
  box-shadow: var(--neu-in-sm);
  transform: translateY(0);
}

/* === What Excites Me — 2×2 static "carved in" tiles, clearly non-interactive === */
.excites-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 720px) { .excites-grid { grid-template-columns: 1fr; } }
.excite {
  padding: 32px 28px;
  border: 0;
  border-radius: 20px;
  /* sit a touch deeper than the page so the neu-inset shadow reads */
  background: rgba(0, 0, 0, 0.18);
  /* inset (carved-in) neumorphism — opposite of raised clickable tiles */
  box-shadow:
    inset 6px 6px 14px var(--lo),
    inset -4px -4px 10px var(--hi);
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 260px;
}
/* header: button reset; on desktop it stacks (numeral over title) like before */
.excite-head {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  cursor: default;
}
.excite-chev { display: none; }            /* desktop: no toggle affordance */
.excite-body-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.excite .index {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 44px;
  line-height: 1;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.excite .marker {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}
.excite h3 { font-size: 22px; }
.excite .copy { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }

/* Mobile: turn the four tiles into a tap-to-expand accordion so the section
   reads as a compact list instead of a long wall of text. */
@media (max-width: 720px) {
  .excite {
    min-height: 0;
    padding: 0;
    gap: 0;
    overflow: hidden;
  }
  .excite-head {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    cursor: pointer;
  }
  .excite-head .index { font-size: 30px; }
  .excite-head h3 { flex: 1; font-size: 18px; line-height: 1.25; }
  .excite-chev {
    display: flex;
    flex: none;
    color: var(--ink-3);
    transition: transform .35s cubic-bezier(.2,.7,.2,1), color .25s ease;
  }
  .excite.open .excite-chev { transform: rotate(180deg); color: var(--accent); }
  /* collapsible region: animate via grid-template-rows 0fr → 1fr.
     The clip layer (.excite-body-clip) carries NO padding so the grid track
     can resolve to 0; padding lives on .excite-body-inner inside the clip,
     so it collapses with the track (no phantom sliver). */
  .excite-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .4s cubic-bezier(.2,.7,.2,1);
  }
  .excite.open .excite-body { grid-template-rows: 1fr; }
  .excite-body-clip {
    min-height: 0;
    overflow: hidden;
  }
  .excite-body-inner {
    padding: 0 22px 22px;
    gap: 12px;
  }
}

/* === Passions — curved square tiles === */
.passions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 980px) { .passions { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .passions { grid-template-columns: repeat(2, 1fr); } }

.passion {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border: 0;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.2;
  color: var(--ink-2);
  background: var(--bg);
  box-shadow: var(--neu-out);
  transition: all .35s cubic-bezier(.2,.7,.2,1);
  cursor: pointer;
  text-align: left;
  min-height: 100px;
}
.passion:hover {
  color: var(--ink);
  transform: translateY(-3px);
  box-shadow:
    -8px -8px 18px var(--hi),
     14px 14px 28px var(--lo);
}
.passion:hover .ico { color: var(--accent); transform: scale(1.08); }
.passion:active {
  box-shadow: var(--neu-in);
  transform: translateY(0);
  color: var(--accent);
}
.passion .ico {
  width: 38px; height: 38px;
  color: var(--ink-2);
  flex-shrink: 0;
  transition: color .3s ease, transform .35s cubic-bezier(.2,.7,.2,1);
}
.passion .label {
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.passion .ico {
  width: 14px; height: 14px;
  color: var(--accent);
}

/* === Footer === */
.site-footer {
  margin-top: 80px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.25));
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px var(--gutter) 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
.footer-col h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
  font-weight: 500;
}
.footer-col a {
  display: block;
  color: var(--ink-2);
  font-size: 14px;
  padding: 6px 0;
  transition: color .25s ease, transform .25s ease;
}
.footer-col a:hover { color: var(--accent); transform: translateX(4px); }
.footer-meta {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--gutter) 32px;
  display: flex; justify-content: space-between; gap: 16px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  flex-wrap: wrap;
}

/* === Cursor spotlight === */
.spotlight {
  position: fixed;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity .4s ease;
  opacity: 0;
  mix-blend-mode: screen;
  filter: blur(14px);
}
body:hover .spotlight { opacity: 1; }

/* === Reveal — disabled to avoid iframe animation-timeline freezes === */
.reveal { opacity: 1; transform: none; }

/* === Passion tiles are now buttons === */
.passion { cursor: pointer; }
.passion:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* === Passion modal === */
.passion-backdrop {
  position: fixed;
  inset: 0;
  /* same hue as page background, just translucent — no blur (blur lightens it) */
  background: rgba(14, 24, 34, 0.86);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  opacity: 0;
  animation: backdropIn .25s ease forwards;
}
@keyframes backdropIn { to { opacity: 1; } }

.passion-modal {
  position: relative;
  width: min(720px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  /* solid, distinctly lighter than the page so it reads as elevated */
  background: #1a2b3a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 28px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 30px 60px -10px rgba(0, 0, 0, 0.8),
    0 18px 40px -20px rgba(0, 0, 0, 0.9);
  padding: clamp(28px, 4vw, 44px);
  transform: scale(.94) translateY(12px);
  opacity: 0;
  animation: modalIn .35s cubic-bezier(.2,.8,.2,1) forwards;
  z-index: 1001;
}
@keyframes modalIn { to { transform: scale(1) translateY(0); opacity: 1; } }

.passion-modal-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-2);
}
.passion-modal-head .ico {
  width: 32px;
  height: 32px;
  color: var(--accent);
  flex-shrink: 0;
}
.passion-modal-head h3 {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 34px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  flex: 1;
}
.passion-modal-head .sub {
  display: block;
  font-family: var(--f-mono);
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 6px;
}

.passion-modal .close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}
.passion-modal .close:hover { color: var(--accent); transform: rotate(90deg); background: rgba(255, 255, 255, 0.08); }

.passion-modal .body p {
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.65;
  margin: 0 0 14px;
}
.passion-modal .body p em {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--ink);
}

.passion-modal .list-label {
  margin-top: 22px;
  margin-bottom: 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.passion-modal ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.passion-modal ol li {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: baseline;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px dashed var(--line-2);
  color: var(--ink);
  font-size: 14.5px;
}
.passion-modal ol li:last-child { border-bottom: 0; }
.passion-modal ol.bullets li {
  grid-template-columns: 18px 1fr;
  align-items: baseline;
  border-bottom: 0;
  padding: 8px 4px;
}
.passion-modal ol.bullets li .bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 9px;
  display: inline-block;
}
.passion-modal ol li.single {
  grid-template-columns: 32px 1fr;
}
.passion-modal ol li .n {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.passion-modal ol li .place { color: var(--ink-3); font-size: 12.5px; }

.passion-modal .soon {
  margin-top: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
  font-style: italic;
}

/* === Project modal header (used by ProjectModal) === */
.project-modal-head {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-2);
}
.project-modal-head .kicker {
  display: block;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.project-modal-head h3 {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  line-height: 1.1;
}

/* === Video embed inside modal === */
.m-video { margin: 22px 0; }
.m-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 14px 32px -16px rgba(0, 0, 0, 0.7);
}

/* === Case study header (heading + brand logo, right-aligned) === */
.m-case-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-2);
}
.m-case-logo {
  max-height: 28px;
  max-width: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.95;
}
.m-case-logo-ph {
  padding: 6px 12px;
  border: 1px dashed var(--line-2);
  border-radius: 6px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* === Inline photo grid (1 / 2 / 3-up) === */
.m-photos {
  display: grid;
  gap: 14px;
  margin: 18px 0 22px;
  align-items: stretch;
}
.m-photos.count-1 { grid-template-columns: 1fr; }
.m-photos.count-2 { grid-template-columns: 1fr 1fr; }
/* 3 photos = first (portrait) on the left spans 2 rows; other 2 stack on the right */
.m-photos.count-3 {
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: auto;
}
.m-photos.count-3 figure:first-child {
  grid-row: span 2;
  height: 100%;
}
@media (max-width: 540px) {
  .m-photos.count-2, .m-photos.count-3 { grid-template-columns: 1fr; }
  .m-photos.count-3 figure:first-child { grid-row: auto; height: auto; }
  .m-photos.count-3 figure:first-child img { flex: none; height: auto; aspect-ratio: 9/10; }
}
.m-photos figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.m-photos img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 14px;
  background: var(--bg-3);
  box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.55);
  object-fit: cover;
  object-position: center;
}
/* portrait fills the full span-2 row height (no fixed aspect — let the right column drive height) */
.m-photos.count-3 figure:first-child img {
  flex: 1;
  min-height: 0;
  aspect-ratio: auto;
}
.m-photos.count-3 figure:not(:first-child) img { aspect-ratio: 16/9; }
.m-photos.count-2 img { aspect-ratio: 4/3; }
.m-photos.count-1 img { aspect-ratio: 16/9; }
.m-photos figcaption {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
  padding: 0 4px;
}
.m-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.m-video figcaption {
  margin-top: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* === Reference / press-release card === */
/* MESA-style logo card in modal body */
.m-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 16px 20px;
  margin: 4px 0 10px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--neu-out-sm);
  width: fit-content;
  transition: transform .25s ease, box-shadow .25s ease;
}
.m-logo:hover { transform: translateY(-2px); box-shadow: var(--neu-out); }
.m-logo img { width: 150px; max-width: 100%; height: auto; display: block; }

/* Inline links inside modal body paragraphs */
.passion-modal .body p a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--accent) 45%, transparent);
  transition: border-color .2s ease, opacity .2s ease;
}
.passion-modal .body p a:hover { opacity: 0.8; border-bottom-color: var(--accent); }

.m-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 8px;
}
.m-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  border-radius: 13px;
  background: var(--bg);
  box-shadow: var(--neu-out-sm);
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.m-link svg { color: var(--accent); flex: none; transition: transform .3s ease; }
.m-link:hover {
  color: var(--accent);
  box-shadow: var(--neu-in-sm);
}
.m-link:hover svg { transform: translate(2px, -2px); }

/* === Reference / press-release card === */
  margin: 22px 0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all .3s cubic-bezier(.2,.7,.2,1);
  cursor: pointer;
}
.m-ref::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  z-index: 2;
}
.m-ref:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.7);
}
.m-ref:hover .m-ref-thumb img { transform: scale(1.025); }
.m-ref:hover .m-ref-thumb-badge {
  background: var(--accent);
  color: var(--bg);
  transform: translate(2px, -2px);
}

/* Thumbnail (full-width on top — kept compact, banner-style) */
.m-ref-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 32/9;
  overflow: hidden;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.015) 0 14px, transparent 14px 28px),
    var(--bg-3);
}
.m-ref-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.m-ref-thumb-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(14, 24, 34, 0.85);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: all .25s ease;
  z-index: 1;
}

.m-ref-inner {
  flex: 1;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.m-ref-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.m-ref-kicker .dot {
  width: 3px; height: 3px;
  background: var(--ink-4);
  border-radius: 50%;
}
.m-ref-kicker > span:last-child { color: var(--ink-3); }
.m-ref-title {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 24px;
  line-height: 1.2;
  color: var(--ink);
  margin: 4px 0 2px;
  letter-spacing: -0.01em;
}
.m-ref-excerpt {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}
.m-ref-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* === PRD Writing Agent cover art (replaces placeholder proj-visual) === */
.prd-art {
  position: relative;
  overflow: hidden;
  padding: 0 !important;
  background:
    radial-gradient(circle at 12% 50%, rgba(255,255,255,0.025), transparent 50%),
    rgba(0, 0, 0, 0.15);
  color: var(--accent);
}
.prd-art-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.prd-art-spark {
  transform-origin: center;
  animation: prdSparkPulse 2.6s ease-in-out infinite;
}
@keyframes prdSparkPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.78); }
}
.prd-art-particle { animation: prdParticleDrift 3.2s ease-in-out infinite; }
.prd-art-particle.p1 { animation-delay: 0s; }
.prd-art-particle.p2 { animation-delay: 0.4s; }
.prd-art-particle.p3 { animation-delay: 0.8s; }
@keyframes prdParticleDrift {
  0%, 100% { transform: translateX(-6px); opacity: 0.15; }
  40%      { opacity: 0.9; }
  100%     { transform: translateX(36px); opacity: 0.15; }
}
@media (prefers-reduced-motion: reduce) {
  .prd-art-spark, .prd-art-particle { animation: none; }
}

/* === Proposal Automation cover art === */
.prop-art {
  position: relative;
  overflow: hidden;
  color: var(--accent);
}
/* Fill the tall tile and let preserveAspectRatio center the 240×300 artwork
   in BOTH axes (deterministic — no auto-height top-left pinning). */
.prop-art-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
@media (prefers-reduced-motion: no-preference) {
  .prop-chip, .prop-doc, .prop-row, .prop-price, .prop-seal { opacity: 0; }
  .prop-chip { animation: propIn 7s ease-in-out infinite; }
  .prop-chip.c1 { animation-delay: 0s; }
  .prop-chip.c2 { animation-delay: 0.22s; }
  .prop-chip.c3 { animation-delay: 0.44s; }
  .prop-feed { stroke-dasharray: 64; stroke-dashoffset: 64; animation: propDraw 7s ease-in-out infinite; }
  .prop-feed.f1 { animation-delay: 0.7s; }
  .prop-feed.f2 { animation-delay: 0.82s; }
  .prop-feed.f3 { animation-delay: 0.94s; }
  .prop-doc { animation: propIn 7s ease-in-out infinite; animation-delay: 1s; }
  .prop-row { animation: propIn 7s ease-in-out infinite; }
  .prop-row.r1 { animation-delay: 1.25s; }
  .prop-row.r2 { animation-delay: 1.4s; }
  .prop-row.r3 { animation-delay: 1.5s; }
  .prop-row.r4 { animation-delay: 1.6s; }
  .prop-row.r5 { animation-delay: 1.75s; }
  .prop-row.r6 { animation-delay: 1.88s; }
  .prop-row.r7 { animation-delay: 1.98s; }
  .prop-price { transform-box: fill-box; transform-origin: center; animation: propPop 7s ease-in-out infinite; animation-delay: 2.25s; }
  .prop-seal { transform-box: fill-box; transform-origin: center; animation: propPop 7s ease-in-out infinite; animation-delay: 2.6s; }
  .prop-check { stroke-dasharray: 26; stroke-dashoffset: 26; animation: propDraw 7s ease-in-out infinite; animation-delay: 2.85s; }
}
@keyframes propIn {
  0%      { opacity: 0; transform: translateY(7px); }
  6%      { opacity: 1; transform: translateY(0); }
  90%     { opacity: 1; transform: translateY(0); }
  97%     { opacity: 0; transform: translateY(0); }
  100%    { opacity: 0; }
}
@keyframes propDraw {
  0%      { stroke-dashoffset: 64; opacity: 0; }
  4%      { opacity: 0.7; }
  14%     { stroke-dashoffset: 0; opacity: 0.7; }
  90%     { stroke-dashoffset: 0; opacity: 0.7; }
  97%     { opacity: 0; }
  100%    { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes propPop {
  0%      { opacity: 0; transform: scale(0.6); }
  5%      { opacity: 1; transform: scale(1.08); }
  9%      { transform: scale(1); }
  90%     { opacity: 1; transform: scale(1); }
  97%     { opacity: 0; }
  100%    { opacity: 0; }
}

/* === Placeholder project tile (non-clickable, awaiting content) === */
.proj.placeholder {
  cursor: default;
  box-shadow: var(--neu-in);
  opacity: 0.7;
}
.proj.placeholder:hover {
  transform: none;
  box-shadow: var(--neu-in);
}
.proj.placeholder h3 {
  color: var(--ink-3);
}
.proj.placeholder .desc {
  color: var(--ink-3);
  font-style: italic;
}

/* === Clickable project tile (PM/AI grids use <button> now) === */
.proj.clickable {
  font-family: inherit;
  text-align: left;
  border: 0;
  width: 100%;
  cursor: pointer;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.proj.clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* === Mobile polish (consolidated) ============================================
   Patches gaps not covered by section-specific media queries above.
============================================================================ */

/* Tablet: tighten nav pill so 5 links fit between brand + actions */
@media (max-width: 880px) {
  .site-header .inner { gap: 12px; }
  .nav { gap: 4px; padding: 4px; }
  .nav a { font-size: 12px; padding: 6px 10px; }
}

/* Phone: hide the desktop nav pill, reveal the hamburger toggle */
@media (max-width: 720px) {
  .nav { display: none; }
  .site-header .inner {
    padding: 12px var(--gutter);
    grid-template-columns: 1fr auto;
  }
  .site-header .header-actions { grid-column: 2; }
}

/* The hamburger toggle only exists on phones (desktop has the full nav pill) */
.nav-toggle { display: none; }
@media (max-width: 720px) {
  .nav-toggle { display: grid; }
}

/* Touch targets: never smaller than 44px on phones */
@media (max-width: 720px) {
  .icon-btn { width: 46px; height: 46px; }
  .header-actions { gap: 12px; }
}

/* === Mobile menu overlay ==================================================== */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 8vw, 56px);
  background: rgba(10, 18, 26, 0.86);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .35s ease, transform .4s cubic-bezier(.2,.7,.2,1), visibility 0s linear .4s;
}
.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2,.7,.2,1);
}
.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mobile-menu-nav a {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  min-height: 64px;
  border-radius: 18px;
  color: var(--ink);
  background: var(--bg);
  box-shadow: var(--neu-out-sm);
  /* staggered entrance */
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .4s ease, transform .45s cubic-bezier(.2,.7,.2,1);
}
.mobile-menu.open .mobile-menu-nav a {
  opacity: 1;
  transform: translateY(0);
}
.mobile-menu-nav a:active {
  box-shadow: var(--neu-in-sm);
}
.mobile-menu-nav .mm-index {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
  width: 24px;
}
.mobile-menu-nav .mm-label {
  flex: 1;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.mobile-menu-nav .mm-arrow { color: var(--ink-3); }
.mobile-menu-foot {
  display: flex;
  gap: 14px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line-2);
}
.mobile-menu-foot a {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 999px;
  color: var(--ink-2);
  background: var(--bg);
  box-shadow: var(--neu-out-sm);
}
.mobile-menu-foot a:active {
  box-shadow: var(--neu-in-sm);
  color: var(--accent);
}
/* Safety: keep the overlay phone-only so a wide desktop never traps it open */
@media (min-width: 721px) {
  .mobile-menu { display: none; }
}

/* Hero ticker — let items wrap cleanly, drop the right-border separators (they
   look broken when items wrap to a new line) */
@media (max-width: 720px) {
  .hero-ticker { gap: 10px 16px; flex-wrap: wrap; }
  .hero-ticker .item { border-right: 0 !important; padding-right: 0; }
}

/* Hero — phone tuning: scale the welcome line, tighten rhythm, full-width CTAs */
@media (max-width: 560px) {
  .hero { padding-top: clamp(28px, 9vw, 48px); }
  .hero-status {
    font-size: 10px;
    padding: 8px 14px 8px 12px;
    margin-bottom: 22px;
    max-width: 100%;
  }
  .hero-headline {
    max-width: 100%;
    /* one line on phones too — sized to fit the full-width column (≈6.83× font),
       nowrap guards against any sub-pixel wrap */
    white-space: nowrap;
    font-size: clamp(32px, 12vw, 52px);
  }
  .hero-welcome {
    margin-top: 0;
    font-size: 23px;
    line-height: 1.32;
    max-width: 100%;
  }
  .hero-sub {
    margin-top: 16px;
    font-size: 16px;
    max-width: 100%;
  }
  .hero-cta {
    margin-top: 30px;
    gap: 12px;
  }
  .hero-cta .btn {
    flex: 1 1 100%;
    justify-content: center;
    padding: 16px 24px;
  }
  .hero-grid { gap: 36px; }
}

/* ID card collapses to 1-col on tiny phones so each pair gets full width */
@media (max-width: 480px) {
  .id-card { grid-template-columns: 1fr; }
}

/* Footer — already drops to 2-col at 760px; drop to 1-col on tiny phones */
@media (max-width: 480px) {
  .footer-inner {
    grid-template-columns: 1fr;
    padding: 56px var(--gutter) 28px;
    gap: 28px;
  }
}

/* Project tiles — tighten padding on phones so content breathes */
@media (max-width: 560px) {
  .proj { padding: 22px 20px; }
  .proj h3 { font-size: 20px; }
}

/* Feature-hero (Serendisco home-page card) — already stacks at 900px.
   On phones, drop the stat-row to 2-col and tighten body padding */
@media (max-width: 560px) {
  .feature-hero-body { padding: 22px 20px !important; }
  .feature-hero-body h3 { font-size: 24px !important; }
  .stat { padding: 10px 8px; }
  /* The photo is a tall 9:16 portrait. Show it from the top of the building
     down through the stage, crowd and light beams, trimming only the very
     bottom strip (lower building floor). Tall frame + top anchor. */
  .feature-hero-img { aspect-ratio: 3 / 5; }
  .feature-hero-img img { object-position: center top; }
}

/* Excites accordion fine-tuning on the smallest phones */
@media (max-width: 560px) {
  .excite-head { padding: 18px 18px; }
  .excite-head h3 { font-size: 17px; }
  .excite-head .index { font-size: 27px; }
  .excite-body-inner { padding: 0 18px 20px; }
}

/* Section-head: keep label on left, link on right; on phones let the right
   meta link drop below if needed */
@media (max-width: 560px) {
  .section-head { flex-wrap: wrap; gap: 8px; }
}

/* Modal — already capped at min(720px, 100%). On phones, reduce padding so
   content sits closer to the edges, and let modal nearly fill the screen */
@media (max-width: 560px) {
  .passion-backdrop { padding: 12px; }
  .passion-modal {
    border-radius: 22px;
    padding: 24px 20px;
    max-height: 92vh;
  }
  .passion-modal-head h3 { font-size: 26px; }
  .project-modal-head h3 { font-size: 26px; }
  .m-ref-title { font-size: 19px; }
  .m-ref-inner { padding: 18px 20px; }
  .m-ref-thumb { aspect-ratio: 16/9; } /* the 32/9 strip is too thin on phones */
}

/* Block-head: keep number + title left, description right.
   At narrower widths it already stacks via the 800px breakpoint above.
   This just tightens the gap on very small phones. */
@media (max-width: 480px) {
  .block-head { padding-bottom: 20px; }
  .block-num { font-size: 14px; }
  .block-title { font-size: clamp(24px, 7vw, 32px); }
}
