/* ============================================================
   portfolio.css
   Homepage-only styles for game-portfolio-v2.html.
   Loaded after tokens.css and base.css. The homepage does NOT
   load components.css or case-study.css, so its own .nav, .hero,
   .section, and .section-title here are free of collisions.

   Color tokens come from tokens.css. Reset, selection, scrollbar,
   .mono, .meta, and .meta-thin come from base.css.
   ============================================================ */

/* Homepage uses OpenType figures + a wider content container */
body { font-feature-settings: 'ss01', 'cv11'; }
.wrap { max-width: 1800px; }

  .grid12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
  @media (max-width: 768px) { .grid12 { gap: 16px; } }

  .nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    color: var(--ink);
    padding: 18px 24px;
    transition: backdrop-filter 0.3s, background 0.3s;
  }
  html[data-theme="light"] .nav { mix-blend-mode: difference; color: var(--paper); }

  .nav.scrolled {
    mix-blend-mode: normal;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: var(--glass-bg);
    border-bottom: 0.5px solid var(--glass-border);
    color: var(--ink);
    padding-top: 14px;
    padding-bottom: 14px;
    box-shadow: 0 1px 0 0 var(--glass-highlight) inset;
  }
  @media (min-width: 768px) { .nav { padding: 20px 40px; } }
  .nav-inner { max-width: 1800px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
  .nav-logo { font-weight: 700; font-size: 17px; letter-spacing: -0.04em; color: inherit; text-decoration: none; }
  .nav-logo span { color: var(--heat); }
  .nav-menu { display: none; gap: 28px; }
  @media (min-width: 768px) { .nav-menu { display: flex; } }
  .nav-menu a { color: inherit; text-decoration: none; font-family: 'Geist Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em; position: relative; }
  .nav-menu a::after { content: ''; position: absolute; left: 0; bottom: -3px; width: 0; height: 1px; background: currentColor; transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
  .nav-menu a:hover::after { width: 100%; }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 32px; height: 32px;
    padding: 0 6px;
    background: transparent;
    border: 0.5px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
  }
  .nav-toggle span {
    display: block;
    width: 100%; height: 1px;
    background: var(--ink);
    transition: transform 0.3s ease, opacity 0.2s ease;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
  @media (min-width: 768px) { .nav-toggle { display: none; } }

  @media (max-width: 767px) {
    .nav-menu.open {
      display: flex;
      flex-direction: column;
      gap: 24px;
      position: fixed;
      top: 64px; right: 16px; left: 16px;
      padding: 32px 28px;
      background: var(--glass-bg-strong);
      backdrop-filter: blur(20px) saturate(180%);
      -webkit-backdrop-filter: blur(20px) saturate(180%);
      border: 0.5px solid var(--glass-border);
      border-radius: 16px;
      box-shadow: var(--glass-shadow);
      z-index: 100;
    }
    .nav-menu.open a { font-size: 14px; padding: 4px 0; }
  }
  
  @media (max-width: 414px) { .nav-time { display: none; } }
  .nav-time { display: flex; align-items: center; gap: 8px; font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: 0.1em; }
  .nav-right { display: flex; align-items: center; gap: 14px; }

  .theme-toggle {
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 999px;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: inherit;
    padding: 0;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .theme-toggle:hover { transform: scale(1.08); }
  .theme-toggle svg {
    position: absolute;
    transition: opacity 0.3s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  html[data-theme="light"] .theme-toggle .icon-sun { opacity: 1; transform: rotate(0); }
  html[data-theme="light"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(45deg) scale(0.6); }
  html[data-theme="dark"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(-45deg) scale(0.6); }
  html[data-theme="dark"] .theme-toggle .icon-moon { opacity: 1; transform: rotate(0); }
  .nav-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--heat); animation: blink 1.4s steps(1) infinite; }
  @keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0.2; } }

  .hero { position: relative; min-height: 100vh; padding: 120px 0 64px; }
  .hero-grid {
    position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(to right, var(--line-soft) 1px, transparent 1px);
    background-size: calc(100% / 12) 100%;
  }

  .hero-travelers {
    position: absolute; inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
  }
  .traveler {
    position: absolute;
    width: 1.5px;
    height: 120px;
    background: linear-gradient(to bottom,
      transparent 0%,
      rgba(83, 74, 183, 0.5) 30%,
      var(--heat) 50%,
      var(--heat) 65%,
      transparent 100%);
    opacity: 0;
    will-change: transform, opacity;
  }
  .traveler::after {
    content: '';
    position: absolute;
    bottom: 50%; left: 50%;
    width: 7px; height: 7px;
    background: var(--heat);
    border-radius: 50%;
    transform: translate(-50%, 50%);
    box-shadow:
      0 0 10px var(--heat),
      0 0 22px rgba(83, 74, 183, 0.7),
      0 0 40px rgba(83, 74, 183, 0.3);
  }
  @keyframes traveler-fall {
    0%   { transform: translateY(-160px); opacity: 0; }
    5%   { opacity: 1; }
    65%  { opacity: 1; }
    80%  { opacity: 0.45; }
    100% { transform: translateY(120vh); opacity: 0; }
  }
  @keyframes traveler-twinkle {
    0%, 100% { filter: brightness(1); }
    25%      { filter: brightness(1.35); }
    50%      { filter: brightness(0.85); }
    75%      { filter: brightness(1.2); }
  }
  
  .traveler { animation-timing-function: cubic-bezier(0.4, 0.0, 0.6, 1) !important; }
  .traveler.t1 { left: calc(100% / 12 * 1);   animation: traveler-fall 7s   infinite, traveler-twinkle 2.1s ease-in-out infinite; animation-delay: -1.0s, -0.3s; }
  .traveler.t2 { left: calc(100% / 12 * 2.5); animation: traveler-fall 9s   infinite, traveler-twinkle 2.6s ease-in-out infinite; animation-delay: -4.2s, -1.1s; height: 90px;  opacity: 0.75; }
  .traveler.t3 { left: calc(100% / 12 * 4);   animation: traveler-fall 6.5s infinite, traveler-twinkle 1.9s ease-in-out infinite; animation-delay: -2.8s, -0.6s; }
  .traveler.t4 { left: calc(100% / 12 * 5);   animation: traveler-fall 8.5s infinite, traveler-twinkle 2.4s ease-in-out infinite; animation-delay: -5.8s, -1.4s; height: 100px; opacity: 0.85; }
  .traveler.t5 { left: calc(100% / 12 * 6.5); animation: traveler-fall 7.5s infinite, traveler-twinkle 2.2s ease-in-out infinite; animation-delay: -3.5s, -0.9s; }
  .traveler.t6 { left: calc(100% / 12 * 8);   animation: traveler-fall 10s  infinite, traveler-twinkle 2.8s ease-in-out infinite; animation-delay: -6.5s, -1.7s; }
  .traveler.t7 { left: calc(100% / 12 * 9.5); animation: traveler-fall 6.8s infinite, traveler-twinkle 2.0s ease-in-out infinite; animation-delay: -1.5s, -0.4s; height: 90px;  opacity: 0.75; }
  .traveler.t8 { left: calc(100% / 12 * 10.5);animation: traveler-fall 8s   infinite, traveler-twinkle 2.3s ease-in-out infinite; animation-delay: -4.7s, -1.2s; }
  .traveler.t9 { left: calc(100% / 12 * 11.3);animation: traveler-fall 9.5s infinite, traveler-twinkle 2.5s ease-in-out infinite; animation-delay: -7.0s, -1.6s; height: 80px;  opacity: 0.7; }

  html[data-theme="dark"] .traveler {
    background: linear-gradient(to bottom,
      transparent 0%,
      rgba(127, 119, 221, 0.55) 30%,
      var(--heat) 50%,
      var(--heat) 65%,
      transparent 100%);
  }
  html[data-theme="dark"] .traveler::after {
    box-shadow:
      0 0 12px var(--heat),
      0 0 28px rgba(127, 119, 221, 0.75),
      0 0 50px rgba(127, 119, 221, 0.4);
  }

  .cursor-halo {
    position: fixed;
    width: 380px; height: 380px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(circle,
      rgba(83, 74, 183, 0.10) 0%,
      rgba(83, 74, 183, 0.04) 35%,
      transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.6s ease, background 0.3s;
    mix-blend-mode: multiply;
    will-change: transform, opacity;
  }
  html[data-theme="dark"] .cursor-halo {
    mix-blend-mode: screen;
    background: radial-gradient(circle,
      rgba(127, 119, 221, 0.18) 0%,
      rgba(127, 119, 221, 0.06) 35%,
      transparent 70%);
  }
  .cursor-halo.active { opacity: 1; }
  .cursor-halo.near-prompt {
    background: radial-gradient(circle,
      rgba(83, 74, 183, 0.20) 0%,
      rgba(83, 74, 183, 0.08) 35%,
      transparent 70%);
  }
  html[data-theme="dark"] .cursor-halo.near-prompt {
    background: radial-gradient(circle,
      rgba(127, 119, 221, 0.30) 0%,
      rgba(127, 119, 221, 0.10) 35%,
      transparent 70%);
  }
  @media (hover: none), (max-width: 768px) {
    .cursor-halo { display: none; }
  }

  @keyframes heat-breathe {
    0%, 100% {
      filter: brightness(1) saturate(1);
      transform: rotate(-1.5deg) scale(1);
    }
    50% {
      filter: brightness(1.06) saturate(1.1);
      transform: rotate(-1.5deg) scale(1.012);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .traveler, .heat-tag, .cursor-halo { animation: none !important; }
    .cursor-halo { display: none; }
  }
  .hero-meta {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 48px;
  }
  @media (min-width: 768px) { .hero-meta { margin-bottom: 80px; } }
  .hero-meta-mid { display: none; }
  @media (min-width: 600px) { .hero-meta-mid { display: inline; } }

  .hero-overture {
    margin-bottom: clamp(20px, 3vw, 36px);
    opacity: 0;
    transform: translateY(20px);
  }
  .hero-overture.run {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .hero-name {
    font-weight: 500;
    font-size: clamp(28px, 4.5vw, 64px);
    letter-spacing: -0.035em;
    line-height: 1;
    color: var(--ink);
    margin-bottom: 6px;
  }
  .hero-name .heat { color: var(--heat); }
  .hero-role {
    font-family: 'Geist Mono', monospace;
    font-size: clamp(11px, 1vw, 14px);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--ink-soft);
  }
  .hero-role .dot {
    display: inline-block;
    width: 5px; height: 5px;
    background: var(--heat);
    border-radius: 50%;
    margin: 0 10px 2px;
    vertical-align: middle;
  }

  .hero-title {
    font-weight: 400;
    letter-spacing: -0.045em;
    line-height: 0.92;
    font-size: clamp(36px, 9vw, 156px);
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
  @media (max-width: 374px) {
    .hero-title { font-size: 34px; line-height: 1; }
  }
  .hero-title .line { overflow: hidden; }
  .hero-title .line > span { display: inline-block; transform: translateY(110%); }
  .hero-title.run .line > span { transform: translateY(0); transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
  .hero-title.run .line:nth-child(1) > span { transition-delay: 0.05s; }
  .hero-title.run .line:nth-child(2) > span { transition-delay: 0.18s; }
  .hero-title.run .line:nth-child(3) > span { transition-delay: 0.31s; }
  .hero-title.run .line:nth-child(4) > span { transition-delay: 0.44s; }

  .hero-title .heat-tag {
    background: var(--heat); color: var(--paper);
    padding: 0 0.18em; transform-origin: center;
    display: inline-block;
    transform: scale(0) rotate(0deg);
  }
  @keyframes heat-enter {
    0% { transform: scale(0) rotate(0deg); }
    100% { transform: scale(1) rotate(-1.5deg); }
  }
  .hero-title.run .heat-tag {
    animation:
      heat-enter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.85s forwards,
      heat-breathe 4.5s ease-in-out 1.8s infinite;
  }

  .hero-title .light {
    font-weight: 200;
    font-style: normal;
  }

  .hero-body { margin-top: 64px; }
  @media (min-width: 768px) { .hero-body { margin-top: 96px; } }
  .hero-body .grid12 { row-gap: 32px; }
  .hero-col-l { grid-column: span 12; }
  .hero-col-r { grid-column: span 12; }
  @media (min-width: 768px) {
    .hero-col-l { grid-column: span 4; }
    .hero-col-r { grid-column: 6 / span 7; }
  }
  .hero-context-p { font-size: 16px; line-height: 1.55; color: var(--ink); }
  .hero-context-p strong { font-weight: 500; }

  .terminal {
    background: var(--terminal-bg);
    color: var(--terminal-text);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 0.5px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
  }
  
  .terminal::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg,
      transparent 0%,
      var(--glass-highlight) 30%,
      var(--glass-highlight) 70%,
      transparent 100%);
    z-index: 1;
    pointer-events: none;
  }
  html[data-theme="light"] .terminal { background: rgba(10, 8, 32, 0.88); }
  html[data-theme="dark"] .terminal { background: rgba(26, 24, 21, 0.65); }
  .terminal-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--terminal-border);
  }
  .terminal-dot { width: 8px; height: 8px; border-radius: 50%; }
  .terminal-dot.r { background: var(--terminal-border); }
  .terminal-dot.g { background: var(--heat); }
  .terminal-title { font-family: 'Geist Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--terminal-muted); margin-left: 6px; }

  .terminal-input { padding: 18px 16px 8px; }
  .terminal-input-row { display: flex; align-items: center; gap: 10px; font-family: 'Geist Mono', monospace; font-size: 14px; }
  .terminal-input-row .arrow { color: var(--heat); }
  .terminal-input-row input {
    flex: 1; background: transparent; border: none; outline: none;
    color: var(--terminal-text); font-family: inherit; font-size: 14px;
  }
  .terminal-input-row input::placeholder { color: var(--terminal-muted); }
  .terminal-input-row .enter-hint {
    background: transparent; border: none; cursor: pointer;
    font-family: inherit; font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em;
    color: var(--terminal-muted);
    transition: color 0.2s;
  }
  .terminal-input-row .enter-hint:hover { color: var(--heat); }

  .terminal-body { padding: 4px 16px 16px; min-height: 80px; }
  .chips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; }
  .chip {
    font-family: 'Geist Mono', monospace; font-size: 11px;
    color: var(--terminal-text); opacity: 0.6;
    background: transparent;
    border: 1px solid var(--terminal-border);
    padding: 6px 10px; border-radius: 2px;
    cursor: pointer; text-align: left;
    transition: all 0.2s;
  }
  .chip:hover { color: var(--heat); opacity: 1; border-color: var(--heat); }

  .response { padding-top: 8px; font-family: 'Geist Mono', monospace; font-size: 13px; line-height: 1.65; color: var(--terminal-text); opacity: 0.92; }
  .response .res-line { opacity: 0; transform: translateY(6px); animation: rise 0.4s forwards; }
  @keyframes rise { to { opacity: 1; transform: translateY(0); } }

  .contact-card {
    margin-top: 12px;
    border: 1px solid var(--terminal-border);
    border-radius: 4px;
    padding: 14px 16px;
    background: rgba(245, 244, 249, 0.03);
    opacity: 0; transform: translateY(8px);
    animation: rise 0.5s 0.15s forwards;
  }
  .contact-card-label { font-family: 'Geist Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--heat); margin-bottom: 8px; }
  .contact-card-rows { display: grid; gap: 6px; }
  .contact-card-row { display: flex; gap: 12px; font-family: 'Geist Mono', monospace; font-size: 12px; }
  .contact-card-row .k { color: var(--terminal-muted); min-width: 70px; }
  .contact-card-row .v { color: var(--terminal-text); }
  .contact-card-row .v a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--terminal-border); }
  .contact-card-row .v a:hover { color: var(--heat); border-color: var(--heat); }

  .loading-dots { display: flex; gap: 5px; padding: 14px 0 6px; }
  .loading-dots span { width: 5px; height: 5px; border-radius: 50%; background: var(--heat); animation: pulse-dot 1.4s infinite both; }
  .loading-dots span:nth-child(2) { animation-delay: 0.16s; }
  .loading-dots span:nth-child(3) { animation-delay: 0.32s; }
  @keyframes pulse-dot { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }

  .hero-bottom {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
    margin-top: 80px; padding-top: 24px;
    border-top: 1px solid var(--line);
  }
  .scroll-cue { display: flex; align-items: center; gap: 8px; }
  .scroll-cue .arrow {
    display: inline-block;
    animation: bob 1.8s ease-in-out infinite;
  }
  @keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

  .marquee {
    position: relative; background: var(--terminal-bg); color: var(--terminal-text);
    padding: 28px 0; overflow: hidden;
    border-top: 1px solid var(--terminal-border);
    border-bottom: 1px solid var(--terminal-border);
  }
  .marquee-track { display: flex; white-space: nowrap; animation: marquee 30s linear infinite; }
  @keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
  @media (prefers-reduced-motion: reduce) {
    .marquee-track { animation: none; }
  }
  .marquee-item { display: flex; align-items: baseline; gap: 14px; padding: 0 28px; }
  .marquee-num { font-weight: 700; font-size: 36px; letter-spacing: -0.04em; color: var(--heat); }
  .marquee-label { font-family: 'Geist Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--terminal-text); opacity: 0.8; }
  .marquee-sep { color: var(--terminal-text); opacity: 0.2; margin-left: 14px; font-size: 18px; }

  .section { position: relative; padding: 96px 0; }
  @media (min-width: 768px) { .section { padding: 128px 0; } }
  .section-meta {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 28px;
  }
  .section-title {
    font-weight: 500;
    letter-spacing: -0.045em; line-height: 0.92;
    font-size: clamp(44px, 8vw, 128px);
  }
  .section-title .light { font-weight: 200; }
  .section-title-row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; margin-bottom: 48px; }
  .section-title-row h2 { grid-column: span 12; }
  .section-title-row p { grid-column: span 12; padding-top: 0; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
  @media (min-width: 768px) {
    .section-title-row h2 { grid-column: span 8; }
    .section-title-row p { grid-column: span 4; padding-top: 20px; }
  }

  .filter-label { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
  .spark { display: inline-block; width: 12px; height: 12px; }
  .filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 56px; }
  .filter-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    font-family: 'Geist Mono', monospace; font-size: 13px;
    background: var(--glass-bg);
    color: var(--ink);
    border: 0.5px solid var(--glass-border);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
  }
  .filter-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 8px; right: 8px;
    height: 1px;
    background: var(--glass-highlight);
    border-radius: 999px;
    opacity: 0.7;
  }
  .filter-btn:hover {
    border-color: var(--ink);
    background: var(--glass-bg-strong);
    transform: translateY(-1px);
  }
  .filter-btn.active {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .filter-btn.active::before { display: none; }
  .filter-btn .ct { font-size: 10px; color: var(--muted); }
  .filter-btn.active .ct { color: var(--heat); }

  .work-list { position: relative; display: grid; gap: 24px; }
  @media (min-width: 768px) { .work-list { gap: 32px; } }

  .work-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 16px;
    overflow: hidden;
    border: 0.5px solid var(--line);
    background: var(--paper-2);
    text-decoration: none;
    color: inherit;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.4s;
  }
  @media (min-width: 768px) {
    .work-card { grid-template-columns: 280px 1fr; }
  }
  a.work-card--clickable { cursor: pointer; }
  
  .work-card:hover {
    transform: translateY(-3px);
    border-color: var(--heat);
    box-shadow: 0 12px 32px rgba(83, 74, 183, 0.18);
  }
  
  a.work-card--clickable:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(83, 74, 183, 0.24);
  }

  .work-brand {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    position: relative;
  }
  @media (min-width: 768px) {
    .work-brand { min-height: 240px; padding: 32px 28px; }
  }
  .work-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.08), transparent 60%);
    pointer-events: none;
  }
  .work-brand-num {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.22em;
    font-weight: 500;
    z-index: 1;
  }
  .work-brand-logo {
    display: flex; align-items: center; justify-content: center;
    flex: 1;
    padding: 16px 0;
    z-index: 1;
  }
  .work-brand-logo img {
    width: 96px; height: 96px;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @media (min-width: 768px) {
    .work-brand-logo img { width: 112px; height: 112px; }
  }
  a.work-card--clickable:hover .work-brand-logo img { transform: scale(1.08); }
  
  .work-card:hover .work-brand-logo img { transform: scale(1.05); }
  .work-brand-fallback {
    width: 96px; height: 96px;
    border-radius: 18px;
    background: rgba(250, 248, 242, 0.95);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Geist Mono', monospace;
    font-weight: 600; font-size: 14px;
    letter-spacing: 0.1em;
    text-align: center;
    padding: 8px;
    color: inherit;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @media (min-width: 768px) {
    .work-brand-fallback { width: 112px; height: 112px; font-size: 15px; }
  }
  a.work-card--clickable:hover .work-brand-fallback { transform: scale(1.08); }
  .work-card:hover .work-brand-fallback { transform: scale(1.05); }
  .work-brand-client {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-align: center;
    z-index: 1;
  }

  .work-content {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
  }
  @media (min-width: 768px) {
    .work-content { padding: 32px 36px; }
  }
  .work-tags {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 500;
  }
  .work-title {
    font-weight: 500;
    letter-spacing: -0.025em;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.15;
    margin: 0;
    color: var(--ink);
  }
  .work-summary {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: 0;
  }
  .work-metrics {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 0;
    margin: 4px 0 0;
  }
  .work-metrics li {
    display: flex; align-items: baseline; gap: 6px;
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    color: var(--ink);
  }
  .work-metric-arrow { font-weight: 600; }
  .work-footer {
    display: flex; justify-content: space-between; align-items: center;
    gap: 16px;
    padding-top: 12px;
    margin-top: 4px;
    border-top: 0.5px solid var(--line);
  }
  .work-meta-line {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .work-arrow {
    width: 36px; height: 36px; border-radius: 50%;
    border: 0.5px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-soft);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
  }
  .work-arrow svg { transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
  a.work-card--clickable:hover .work-arrow {
    border-color: var(--heat);
    color: var(--heat);
  }
  a.work-card--clickable:hover .work-arrow svg { transform: translateX(3px); }

  /* ---- In-progress / case-study-coming cards (Bitkub, Ever, CDG) ---- */
  /* Badge sits top-right on the brand panel. Glass pill over the gradient. */
  .work-wip-badge {
    position: absolute;
    top: 16px; right: 16px;
    z-index: 2;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 11px;
    border-radius: 99px;
    font-family: 'Geist Mono', monospace;
    font-size: 9.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #FAF8F2;
    background: rgba(10, 8, 32, 0.28);
    border: 0.5px solid rgba(250, 248, 242, 0.30);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
  }
  @media (min-width: 768px) {
    .work-wip-badge { top: 20px; right: 20px; }
  }

  /* Pulsing dot, shared by the badge and the footer pill. */
  .work-wip-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
    position: relative;
  }
  .work-wip-dot::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: 50%;
    background: currentColor;
    animation: wipPulse 2s ease-out infinite;
  }
  @keyframes wipPulse {
    0%   { transform: scale(1);   opacity: 0.7; }
    70%  { transform: scale(3.2); opacity: 0; }
    100% { transform: scale(3.2); opacity: 0; }
  }
  @media (prefers-reduced-motion: reduce) {
    .work-wip-dot::after { animation: none; }
  }

  /* Footer pill replaces the circular arrow on WIP cards. */
  .work-status-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px;
    border-radius: 99px;
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--heat);
    background: var(--heat-soft, rgba(83, 74, 183, 0.10));
    border: 0.5px solid var(--heat);
    flex-shrink: 0;
  }

  /* The card itself: same frame, calmer hover. It is not clickable, so the
     hover should hint "not yet" rather than invite a click. */
  .work-card--wip:hover {
    transform: translateY(-3px);
    border-color: var(--heat);
    box-shadow: 0 12px 32px rgba(83, 74, 183, 0.14);
  }
  .work-card--wip .work-brand-logo img,
  .work-card--wip .work-brand-fallback { opacity: 0.96; }

  .resume-section { background: var(--resume-bg); color: var(--resume-text); position: relative; }
  .resume-section ::selection { background: var(--resume-text); color: var(--resume-bg); }
  .resume-section .meta, .resume-section .meta-thin { color: var(--resume-muted); }
  .resume-section .section-meta { color: var(--resume-muted); }
  .resume-section .section-title-row p { color: var(--resume-muted); }

  .resume-intro {
    grid-column: span 12;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 0;
  }
  .resume-intro p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--resume-muted);
    margin: 0;
    padding-top: 14px;
    border-top: 0.5px solid rgba(245, 244, 249, 0.1);
  }
  @media (min-width: 768px) {
    .resume-intro { grid-column: span 4; padding-top: 12px; }
  }

  .resume-byline {
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .resume-photo {
    width: 56px; height: 56px;
    border-radius: 50%;
    overflow: hidden;
    border: 0.5px solid rgba(245, 244, 249, 0.15);
    background: rgba(245, 244, 249, 0.05);
    flex-shrink: 0;
    position: relative;
  }
  @media (min-width: 768px) { .resume-photo { width: 64px; height: 64px; } }
  .resume-photo img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
  }
  .resume-photo-fallback {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Geist Mono', monospace;
    font-size: 18px; font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--resume-text);
    opacity: 0.6;
  }
  .resume-byline-text {
    display: flex; flex-direction: column;
    gap: 3px;
    min-width: 0;
  }
  .resume-byline-name {
    font-size: 15px; font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--resume-text);
    line-height: 1.2;
  }
  .resume-byline-role {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--resume-muted);
    line-height: 1.4;
  }

  .resume-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px; }

  .resume-side { grid-column: span 12; }
  .resume-main { grid-column: span 12; }
  @media (min-width: 1024px) {
    .resume-side { grid-column: span 4; }
    .resume-main { grid-column: span 8; }
  }

  .resume-side-block { margin-bottom: 36px; }
  .resume-side-label { font-family: 'Geist Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--resume-muted); margin-bottom: 12px; }
  .resume-side-list { list-style: none; display: grid; gap: 4px; }
  .resume-side-list li { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--resume-text); opacity: 0.85; }

  .cert-group { margin-bottom: 18px; }
  .cert-group:last-child { margin-bottom: 0; }
  .cert-provider {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--heat);
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--resume-line);
  }
  .cert-items {
    list-style: none;
    display: grid;
    gap: 3px;
  }
  .cert-items li {
    font-family: 'Geist Mono', monospace;
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--resume-text);
    opacity: 0.85;
    padding-left: 8px;
    position: relative;
  }
  .cert-items li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--heat);
    opacity: 0.8;
  }
  .resume-side-detail { font-size: 14px; line-height: 1.55; color: var(--resume-text); opacity: 0.85; }

  .resume-download {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--heat); color: #F5F2EA;
    text-decoration: none;
    padding: 14px 20px;
    border-radius: 2px;
    font-family: 'Geist Mono', monospace; font-size: 13px;
    text-transform: uppercase; letter-spacing: 0.12em;
    transition: transform 0.3s;
  }
  .resume-download:hover { transform: translateY(-2px); }

  .timeline { position: relative; padding-left: 24px; }
  .timeline::before {
    content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px;
    width: 1px; background: var(--resume-line);
  }
  .tl-item { position: relative; padding-bottom: 36px; }
  .tl-item:last-child { padding-bottom: 0; }
  .tl-dot {
    position: absolute; left: -24px; top: 6px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--resume-bg); border: 2px solid var(--resume-muted);
  }
  .tl-item.current .tl-dot {
    background: var(--heat); border-color: var(--heat);
    box-shadow: 0 0 0 4px rgba(127, 119, 221, 0.2);
    animation: pin-glow 2.4s ease-in-out infinite;
  }
  
  .tl-item.current .tl-dot::before,
  .tl-item.current .tl-dot::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--heat);
    opacity: 0;
    pointer-events: none;
  }
  .tl-item.current .tl-dot::before {
    animation: pin-pulse 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  }
  .tl-item.current .tl-dot::after {
    animation: pin-pulse 2.4s cubic-bezier(0.4, 0, 0.2, 1) 1.2s infinite;
  }
  @keyframes pin-glow {
    0%, 100% { box-shadow: 0 0 0 4px rgba(127, 119, 221, 0.18); }
    50%      { box-shadow: 0 0 0 6px rgba(127, 119, 221, 0.32), 0 0 12px rgba(127, 119, 221, 0.5); }
  }
  @keyframes pin-pulse {
    0%   { transform: scale(1);   opacity: 0.7; }
    70%  { transform: scale(2.6); opacity: 0; }
    100% { transform: scale(2.6); opacity: 0; }
  }
  @media (prefers-reduced-motion: reduce) {
    .tl-item.current .tl-dot { animation: none; }
    .tl-item.current .tl-dot::before,
    .tl-item.current .tl-dot::after { display: none; }
  }
  .tl-period { font-family: 'Geist Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--resume-muted); margin-bottom: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .tl-period .now-tag { background: var(--heat); color: #F5F2EA; padding: 2px 7px; border-radius: 2px; font-size: 9px; letter-spacing: 0.15em; }
  .tl-role { font-weight: 500; font-size: 20px; letter-spacing: -0.02em; margin-bottom: 2px; }
  .tl-company { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--resume-text); opacity: 0.6; margin-bottom: 10px; word-wrap: break-word; overflow-wrap: break-word; }
  .tl-points { list-style: none; display: grid; gap: 6px; }
  .tl-points li { display: flex; gap: 10px; font-size: 14px; line-height: 1.55; color: var(--resume-text); opacity: 0.78; word-wrap: break-word; }
  .tl-points li::before { content: '→'; color: var(--heat); opacity: 0.7; flex-shrink: 0; font-family: 'Geist Mono', monospace; }
  @media (max-width: 600px) {
    .tl-role { font-size: 18px; }
    .tl-company { font-size: 11px; }
    .tl-points li { font-size: 13px; }
  }

  .contact-section { padding: 96px 0 64px; }
  .contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
    margin-bottom: 48px;
  }
  @media (min-width: 768px) {
    .contact-grid { grid-template-columns: 1.4fr 1fr; gap: 64px; margin-bottom: 64px; }
  }
  .contact-headline {
    font-weight: 300;
    letter-spacing: -0.035em;
    line-height: 1;
    font-size: clamp(36px, 5.5vw, 76px);
    color: var(--ink);
  }
  .contact-headline .heat { font-weight: 500; color: var(--heat); }
  .contact-headline .light { font-weight: 200; color: var(--ink-soft); }
  .contact-intent {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-soft);
    max-width: 360px;
    padding-top: 8px;
  }
  @media (min-width: 768px) { .contact-intent { padding-top: 16px; } }

  .contact-rows { margin-top: 0; }
  .contact-row {
    display: grid; grid-template-columns: 48px 1fr auto;
    gap: 20px; align-items: center;
    padding: 16px 0;
    border-top: 0.5px solid var(--line);
    text-decoration: none; color: var(--ink);
    transition: padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .contact-row:last-child { border-bottom: 0.5px solid var(--line); }
  .contact-row:hover { padding-left: 12px; }
  .contact-row-num { font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--muted); letter-spacing: 0.15em; }
  .contact-row-label { font-weight: 400; font-size: clamp(15px, 1.5vw, 18px); letter-spacing: -0.01em; color: var(--ink); }
  .contact-row-action { font-family: 'Geist Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--ink-soft); }
  .contact-row:hover .contact-row-action { color: var(--heat); }
  .contact-row:hover .contact-row-label { color: var(--heat); }

  .footer {
    padding: 32px 0;
    border-top: 1px solid var(--line);
    font-family: 'Geist Mono', monospace; font-size: 10px;
    text-transform: uppercase; letter-spacing: 0.2em;
    color: var(--muted);
  }
  .footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
