/* ============================================
   ROTEM GOTLIEB — PORTFOLIO
   v7: Rebuilt intro animation from scratch
   ============================================ */

@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700,900&display=swap');

/* --- Variables --- */
:root {
  --bg-primary: #FAFAF8;
  --bg-secondary: #F2F1EE;
  --text-primary: #1A1A1A;
  --text-body: #333333;
  --text-secondary: #555555;
  --text-muted: #888888;
  --text-faint: #999999;
  --nav-link: #666666;
  --border-light: #E8E8E6;
  --hover-shadow: rgba(0,0,0,0.06);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --card-radius: 12px;
}

/* ============================================
   DARK MODE TOKEN OVERRIDES
   ============================================ */
[data-theme="dark"] {
  --bg-primary:    #141413;
  --bg-secondary:  #1E1E1C;
  --text-primary:  #F0F0EC;
  --text-body:     #CCCCC6;
  --text-secondary:#AAAAAA;
  --text-muted:    #777777;
  --text-faint:    #555555;
  --nav-link:      #999999;
  --border-light:  #2A2A28;
  --hover-shadow:  rgba(255,255,255,0.04);
}

[data-theme="dark"] nav        { background: rgba(20, 20, 19, 0.85); }
[data-theme="dark"] nav.scrolled { background: rgba(20, 20, 19, 0.92); }
[data-theme="dark"] .bento-card { background: #222220; border-color: #3A3A38; }
[data-theme="dark"] .bento-card:hover { box-shadow: 0 16px 48px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.2); }
[data-theme="dark"] .thumb-lexisnexis  { background: #2A3440; }
[data-theme="dark"] .thumb-pulse       { background: #1A2030; }
[data-theme="dark"] .thumb-ghost       { background: #201A30; }
[data-theme="dark"] .thumb-gotefigure  { background: #3E3A30; }
[data-theme="dark"] .page-transition { background: var(--bg-primary); }
[data-theme="dark"] .outcome-section { background: var(--bg-secondary); }
[data-theme="dark"] .about-photo     { background: var(--bg-secondary); }
[data-theme="dark"] .custom-cursor             { border-color: #F0F0EC; }
[data-theme="dark"] .custom-cursor.cursor-hover { background: rgba(240,240,236,0.06); }


/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: 'Satoshi', sans-serif; background: var(--bg-primary); color: var(--text-primary); line-height: 1.5; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: opacity 0.3s ease; }
a:hover { opacity: 0.7; }
img { display: block; max-width: 100%; }


/* ============================================
   NAME INTRO ANIMATION — v8: Clean rebuild
   Beat 1: Name reveal (T+0 to T+570ms)
   Beat 2: Icons burst (T+600ms to T+850ms)
   Beat 3: Mouse glide + click (T+900ms to T+2050ms) — JS rAF
   Beat 4: Circle wipe (T+2150ms to T+2650ms)

   Total: ~3.2 seconds. No dead air.
   ============================================ */

/* Intro always uses light bg regardless of theme */
.name-intro {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FAFAF8 !important;
  z-index: 10000;
  pointer-events: none;
  overflow: hidden;
}

.name-intro-inner {
  text-align: center;
  position: relative;
  transition: opacity 0.05s ease;
}

/* --- Beat 1: Character-by-character name reveal --- */
.name-line {
  overflow: hidden;
  display: flex;
  justify-content: center;
  gap: 0;
}

.name-line-first { margin-bottom: 4px; }

.name-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  animation: charReveal 0.4s var(--ease-out-expo) forwards;
}

.name-line-first .name-char {
  font-size: 128px;
  font-weight: 900;
  color: #1A1A1A;
  letter-spacing: -0.04em;
  line-height: 1;
}

.name-line-last .name-char {
  font-size: 34px;
  font-weight: 400;
  color: #888888;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* ROTEM: 50ms stagger starting at T+0 */
.name-line-first .name-char:nth-child(1) { animation-delay: 0s; }
.name-line-first .name-char:nth-child(2) { animation-delay: 0.05s; }
.name-line-first .name-char:nth-child(3) { animation-delay: 0.10s; }
.name-line-first .name-char:nth-child(4) { animation-delay: 0.15s; }
.name-line-first .name-char:nth-child(5) { animation-delay: 0.20s; }

/* GOTLIEB: 35ms stagger starting at T+300ms */
.name-line-last .name-char:nth-child(1) { animation-delay: 0.30s; }
.name-line-last .name-char:nth-child(2) { animation-delay: 0.335s; }
.name-line-last .name-char:nth-child(3) { animation-delay: 0.370s; }
.name-line-last .name-char:nth-child(4) { animation-delay: 0.405s; }
.name-line-last .name-char:nth-child(5) { animation-delay: 0.440s; }
.name-line-last .name-char:nth-child(6) { animation-delay: 0.475s; }
.name-line-last .name-char:nth-child(7) { animation-delay: 0.510s; }

@keyframes charReveal {
  to { opacity: 1; transform: translateY(0); }
}


/* --- Beat 2: Tool icons burst outward + float --- */
.intro-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

.intro-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  --icon-size: 40px;
  width: var(--icon-size);
  height: var(--icon-size);
  margin-left: calc(var(--icon-size) / -2);
  margin-top: calc(var(--icon-size) / -2);
  opacity: 0;
  transform: translate(0, 0) scale(0.5);
  will-change: transform, opacity;
}

.intro-icon svg {
  width: 100%;
  height: 100%;
}

/* Combined burst+float: burst in first 7% (~250ms of ~3.5s avg),
   then seamless infinite float. Per-keyframe easing prevents stutter. */
@keyframes iconBurstAndFloat {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.5);
         animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  7%   { opacity: 0.55; transform: translate(var(--ix), var(--iy)) scale(1);
         animation-timing-function: ease-in-out; }
  30%  { opacity: 0.55; transform: translate(calc(var(--ix) + 6px), calc(var(--iy) - 8px)) scale(1); }
  55%  { opacity: 0.55; transform: translate(calc(var(--ix) - 5px), calc(var(--iy) + 7px)) scale(1); }
  80%  { opacity: 0.55; transform: translate(calc(var(--ix) + 7px), calc(var(--iy) + 4px)) scale(1); }
  100% { opacity: 0.55; transform: translate(var(--ix), var(--iy)) scale(1); }
}

/* Cursor variant — full opacity */
@keyframes iconBurstAndFloatCursor {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.5);
         animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  7%   { opacity: 1; transform: translate(var(--ix), var(--iy)) scale(1);
         animation-timing-function: ease-in-out; }
  30%  { opacity: 1; transform: translate(calc(var(--ix) + 6px), calc(var(--iy) - 8px)) scale(1); }
  55%  { opacity: 1; transform: translate(calc(var(--ix) - 5px), calc(var(--iy) + 7px)) scale(1); }
  80%  { opacity: 1; transform: translate(calc(var(--ix) + 7px), calc(var(--iy) + 4px)) scale(1); }
  100% { opacity: 1; transform: translate(var(--ix), var(--iy)) scale(1); }
}

/* Icon positions — even ring, no gaps. Icons 2+8 fill top-center.
   All burst simultaneously at T+600ms. Unique durations prevent sync. */
.icon-code    { --ix: 460px;  --iy: 0px;    animation: iconBurstAndFloat 4.5s ease-out 0.60s infinite; }
.icon-figma   { --ix: 325px;  --iy: -184px; animation: iconBurstAndFloat 3.5s ease-out 0.60s infinite; }
.icon-pen     { --ix: 0px;    --iy: -260px; animation: iconBurstAndFloat 4.2s ease-out 0.60s infinite; }
.icon-type    { --ix: -325px; --iy: -184px; animation: iconBurstAndFloat 3.6s ease-out 0.60s infinite; }
.icon-layers  { --ix: -460px; --iy: 0px;    animation: iconBurstAndFloat 3.8s ease-out 0.60s infinite; }
.icon-droplet { --ix: 0px;    --iy: 260px;  animation: iconBurstAndFloat 3.3s ease-out 0.60s infinite; }
.icon-grid    { --ix: 325px;  --iy: 184px;  animation: iconBurstAndFloat 4.0s ease-out 0.60s infinite; }

/* Cursor icon — full opacity, JS takes over for glide at T+900ms */
.icon-cursor  { --ix: -325px; --iy: 184px;  animation: iconBurstAndFloatCursor 3.6s ease-out 0.60s infinite; z-index: 11; }


/* --- Beat 3: Click burst — spark lines from click point --- */
.intro-click-burst {
  position: absolute;
  width: 80px;
  height: 80px;
  opacity: 0;
  pointer-events: none;
  z-index: 12;
  transform: translate(-50%, -50%) scale(0.3);
}

.intro-click-burst svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke-width: 2;
}

.intro-click-burst.active {
  animation: burst-expand 400ms var(--ease-out-expo) forwards;
}

@keyframes burst-expand {
  0%   { opacity: 0.9; transform: translate(-50%, -50%) scale(0.2); }
  30%  { opacity: 0.8; transform: translate(-50%, -50%) scale(1.3); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.5); }
}

/* Click flash — white circle at click point */
.intro-click-flash {
  position: fixed;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  z-index: 13;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
}

.intro-click-flash.active {
  animation: click-flash 250ms ease-out forwards;
}

@keyframes click-flash {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 0.6; }
  50%  { transform: translate(-50%, -50%) scale(1.2); opacity: 0.3; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}


/* --- Beat 4: Circle wipe reveal --- */
.intro-reveal {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 10001;
  pointer-events: none;
  opacity: 0;
}

.intro-reveal.active {
  opacity: 1;
  animation: reveal-wipe 400ms var(--ease-out-expo) forwards;
}

@keyframes reveal-wipe {
  from { clip-path: circle(0% at var(--reveal-x) var(--reveal-y)); }
  to   { clip-path: circle(200vmax at var(--reveal-x) var(--reveal-y)); }
}

.intro-reveal.fade-out {
  animation: reveal-fade 300ms ease-out forwards;
}

@keyframes reveal-fade {
  from { opacity: 1; clip-path: circle(200vmax at var(--reveal-x) var(--reveal-y)); }
  to   { opacity: 0; clip-path: circle(200vmax at var(--reveal-x) var(--reveal-y)); visibility: hidden; }
}


/* Intro screen hidden state */
.name-intro.hidden {
  opacity: 0;
  visibility: hidden;
}

body.intro-active { overflow: hidden; }


/* --- Narrow viewports: name-only intro (no icons, no burst, no wipe) --- */
@media (max-width: 1000px) {
  .intro-icons { display: none !important; }
  .intro-click-burst { display: none !important; }
  .intro-reveal { display: none !important; }
  .name-line-first .name-char { font-size: clamp(56px, 17vw, 128px); }
}


/* ============================================
   CUSTOM CURSOR (desktop)
   ============================================ */
@media (pointer: fine) {
  body.cursor-active { cursor: none; }
  body.cursor-active a,
  body.cursor-active button,
  body.cursor-active .bento-card { cursor: none; }

  .custom-cursor {
    position: fixed;
    top: 0; left: 0;
    width: 8px; height: 8px;
    border: 1.5px solid var(--text-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: width 0.3s ease, height 0.3s ease, background 0.3s ease, margin 0.3s ease;
    margin-left: -4px; margin-top: -4px;
    background: transparent;
  }

  .custom-cursor.cursor-hover {
    width: 40px; height: 40px;
    margin-left: -20px; margin-top: -20px;
    background: rgba(26,26,26,0.06);
  }
}


/* ============================================
   PAGE TRANSITION
   ============================================ */
.page-transition {
  position: fixed; inset: 0;
  background: var(--bg-primary);
  z-index: 9998;
  opacity: 0; pointer-events: none;
  transition: opacity 200ms ease;
}
.page-transition.active { opacity: 1; pointer-events: all; }


/* ============================================
   NAV
   ============================================ */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  z-index: 1000;
  background: rgba(250, 250, 248, 0.85);
  transition: backdrop-filter 300ms ease, border-bottom 300ms ease, background 300ms ease;
}

nav.scrolled {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  background: rgba(250, 250, 248, 0.92);
}

.nav-name {
  font-size: 14px; font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav-links {
  display: flex; gap: 32px; list-style: none;
}

.nav-links a {
  font-size: 13px; font-weight: 400;
  color: var(--nav-link);
  letter-spacing: 0.02em;
}


/* ============================================
   THEME TOGGLE + TOKEN TOOLTIP
   ============================================ */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  margin-left: 24px;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  transform: rotate(15deg);
}

.theme-icon { width: 16px; height: 16px; }

.theme-icon-dark  { display: block; }
.theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark  { display: none; }
[data-theme="dark"] .theme-icon-light { display: block; }

.token-tooltip {
  position: fixed;
  top: 68px;
  right: 28px;
  background: var(--text-primary);
  color: var(--bg-primary);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 1002;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  max-width: 280px;
}

.token-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.token-tooltip::before {
  content: '';
  position: absolute;
  top: -5px;
  right: 16px;
  width: 10px;
  height: 10px;
  background: var(--text-primary);
  transform: rotate(45deg);
}


/* ============================================
   FADE-IN & SCROLL REVEAL
   ============================================ */
.fade-in {
  opacity: 0; transform: translateY(12px);
  transition: opacity 600ms var(--ease-smooth), transform 600ms var(--ease-smooth);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 600ms var(--ease-smooth), transform 600ms var(--ease-smooth);
}
.reveal.revealed { opacity: 1; transform: translateY(0); }


/* ============================================
   CONTAINER
   ============================================ */
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 28px;
}


/* ============================================
   HERO
   ============================================ */
.hero {
  padding-top: 100px;
  margin-bottom: 48px;
}

.section-label-home {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 32px;
}

.hero-text {
  font-size: 40px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  max-width: 700px;
  margin: 0;
}

.hero-subtitle {
  font-size: 24px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 680px;
  margin: 18px 0 0;
  letter-spacing: -0.01em;
}


/* ============================================
   BENTO PROJECT GRID
   ============================================ */
.projects-bento {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 120px;
}

.bento-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--card-radius);
  overflow: hidden;
  transition: transform 450ms var(--ease-smooth), box-shadow 450ms var(--ease-smooth);
  color: inherit;
}

.bento-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  opacity: 1;
}

.bento-card-text {
  padding: 18px 22px 22px;
}

.bento-card-thumb {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  transition: transform 500ms var(--ease-smooth);
}

.bento-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 600ms var(--ease-smooth);
}

.bento-card:hover .bento-card-thumb img {
  transform: scale(1.03);
}

.bento-card-thumb .thumb-label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(0,0,0,0.15);
  letter-spacing: 0.03em;
  transition: transform 500ms var(--ease-smooth);
}

.bento-card:hover .thumb-label {
  transform: scale(1.05);
}

.project-label {
  font-size: 12px; font-weight: 400;
  color: var(--text-muted);
  text-transform: lowercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.project-title {
  font-size: 18px; font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 4px;
}

.project-description {
  font-size: 13px; font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
}

.thumb-lexisnexis { background: #E8EDF2; }
.thumb-pulse      { background: #E8ECF2; }
.thumb-ghost      { background: #EDE8F0; }
.thumb-gotefigure { background: #F0EDE8; }


/* ============================================
   BENTO ROWS
   ============================================ */
.bento-row-top {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
}

.bento-row-bottom {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 18px;
}

.bento-card-a .bento-card-thumb { aspect-ratio: 16 / 9; }
.bento-card-b .bento-card-thumb { aspect-ratio: 16 / 9; }
.bento-card-c .bento-card-thumb { aspect-ratio: 16 / 9; }
.bento-card-d .bento-card-thumb { aspect-ratio: 16 / 9; }


/* ============================================
   SCROLL PROGRESS BAR (case study pages)
   ============================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 1001;
  transition: width 50ms linear;
}


/* ============================================
   FOOTER
   ============================================ */
footer {
  text-align: center;
}

/* Footer on case study pages: match case-content-inner width */
.case-layout ~ footer {
  padding-left: 160px;
}

.case-layout ~ footer .footer-game {
  max-width: none;
  margin: 0;
  padding: 48px 0 0;
}

.case-layout ~ footer .footer-game .bike-game-canvas {
  border-radius: 0;
}

.case-layout ~ footer .footer-content {
  max-width: 1040px;
  margin: 0 auto;
  padding: 44px 48px 40px;
}

.footer-game {
  padding-top: 48px;
}

.bike-game-canvas {
  display: block;
  width: 100%;
  height: 200px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  cursor: pointer;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.game-prompt {
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  margin: 12px 0 0;
  letter-spacing: 0.04em;
  min-height: 18px;
}

.game-score {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  margin: 4px 0 0;
  min-height: 18px;
  font-variant-numeric: tabular-nums;
}

.game-mute {
  background: none;
  border: none;
  font-size: 13px;
  color: var(--text-faint);
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.6;
  transition: opacity 0.2s;
  display: block;
  margin: 4px auto 0;
}
.game-mute:hover { opacity: 1; }
.game-mute.muted { text-decoration: line-through; opacity: 0.4; }

.footer-content {
  padding: 44px 28px 40px;
}

.footer-quote {
  font-size: 14px; font-weight: 400;
  color: var(--text-muted);
  font-style: italic; line-height: 1.7;
  max-width: 400px;
  margin: 0 auto 32px;
}

.footer-location {
  font-size: 13px; font-weight: 400;
  color: var(--text-faint);
  margin-bottom: 20px;
}

.footer-social {
  display: flex; justify-content: center; gap: 24px;
  margin-bottom: 24px;
}

.footer-social a {
  font-size: 12px; font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-nav {
  display: flex; justify-content: center; gap: 24px;
  margin-bottom: 24px;
}

.footer-nav a {
  font-size: 13px; font-weight: 400;
  color: var(--nav-link);
  letter-spacing: 0.02em;
}


/* ============================================
   CASE STUDY LAYOUT — Sidebar + Content
   ============================================ */
.case-layout {
  display: grid;
  grid-template-columns: 160px 1fr;
  min-height: 100vh;
}

.case-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 80px 24px 32px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-light);
  z-index: 100;
  background: var(--bg-primary);
}

.sidebar-home {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 40px;
  display: block;
}
.sidebar-home:hover { opacity: 0.7; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.sidebar-link {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  transition: color 0.3s ease;
}
.sidebar-link:hover { color: var(--text-secondary); opacity: 1; }
.sidebar-link.active { color: var(--text-primary); font-weight: 700; }

.sidebar-top {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: auto;
}

.case-content {
  max-width: none;
  width: 100%;
  padding: 0;
}

.case-hero-image {
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 500;
  color: rgba(0,0,0,0.25);
}

.case-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.case-content-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 48px;
}

.case-title {
  font-size: 36px; font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 24px;
  padding-top: 48px;
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-light);
}

.metadata-item { display: flex; flex-direction: column; gap: 6px; }

.metadata-label {
  font-size: 12px; font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metadata-value {
  font-size: 15px; font-weight: 400;
  color: var(--text-body);
}

.section-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.case-body {
  max-width: none;
  margin: 0;
}

.case-section { margin-bottom: 56px; }

.case-section h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 16px;
}

.case-section p {
  font-size: 17px; font-weight: 400;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: none;
}
.case-section p:last-child { margin-bottom: 0; }

.case-image {
  width: 100%;
  margin-left: 0;
  aspect-ratio: 16 / 10;
  border-radius: 8px; overflow: hidden;
  margin-top: 32px; margin-bottom: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 500;
  color: rgba(0,0,0,0.25);
}

.case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}


.outcome-section {
  background: var(--bg-secondary);
  padding: 48px 48px;
  margin-left: 0;
  width: 100%;
  margin-top: 48px;
  margin-bottom: 48px;
  border-radius: 8px;
}

.outcome-section .section-label { margin-bottom: 12px; }

.outcome-section h2 {
  font-size: 24px; font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em; line-height: 1.3;
  margin-bottom: 16px;
}

.outcome-section p {
  font-size: 17px; font-weight: 400;
  color: var(--text-body); line-height: 1.7;
}

.case-layout--airy .case-section { margin-bottom: 72px; }
.case-layout--visual .case-image { aspect-ratio: 3 / 2; }

.case-image-trio {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 32px;
  margin-bottom: 32px;
}

.case-image-sm {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: rgba(0,0,0,0.25);
  letter-spacing: 0.03em;
}

.case-image-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.other-work { padding-top: 64px; padding-bottom: 32px; }

.other-work-heading {
  font-size: 14px; font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 32px;
}

.other-work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-bottom: 16px;
}

.other-work-card {
  transition: transform 400ms ease, box-shadow 400ms ease;
  border-radius: 4px;
  display: block;
}

.other-work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--hover-shadow);
  opacity: 1;
}

.other-work-card .project-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.other-work-card .project-thumbnail .thumb-inner {
  font-size: 14px; font-weight: 500;
  color: rgba(0,0,0,0.25);
  letter-spacing: 0.02em;
  transition: transform 400ms ease;
}

.other-work-card:hover .thumb-inner { transform: scale(1.03); }

.other-work-card .project-label { margin-bottom: 4px; padding: 0 4px; }
.other-work-card .project-title { font-size: 18px; margin-bottom: 0; padding: 0 4px; }


/* ============================================
   ABOUT PAGE
   ============================================ */
.about-header {
  padding-top: 100px;
  margin-bottom: 48px;
}

.about-title {
  font-size: 36px; font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 40px;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 80px;
}

.about-photo {
  width: 100%;
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
}

.about-photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.about-text p {
  font-size: 17px; font-weight: 400;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 20px;
}

.about-text p:last-child { margin-bottom: 0; }

.experience-section { margin-bottom: 80px; }

.experience-heading {
  font-size: 14px; font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 32px;
}

.experience-item {
  padding: 24px 0;
  border-top: 1px solid var(--border-light);
}
.experience-item:last-child { border-bottom: 1px solid var(--border-light); }

.experience-company { font-size: 17px; font-weight: 500; color: var(--text-primary); margin-bottom: 4px; }
.experience-role { font-size: 15px; font-weight: 400; color: var(--text-secondary); margin-bottom: 4px; }
.experience-dates { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.experience-description { font-size: 14px; font-weight: 400; color: var(--text-body); line-height: 1.65; margin-top: 8px; }

/* About Page — Extended Sections */
.about-intro {
  font-size: 20px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
}

.about-section-heading {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.currently-building { margin-top: 72px; }

.building-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.building-card {
  border-radius: 12px;
  border: 1px solid var(--border-light);
  overflow: hidden;
  background: var(--bg-primary);
}

.building-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.building-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.building-card-image--placeholder {
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.building-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  padding: 16px 20px 0;
}

.building-card-description {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-body);
  line-height: 1.6;
  padding: 8px 20px 20px;
}

.about-aside { margin-top: 72px; }

.about-aside p {
  font-size: 17px;
  font-weight: 400;
  color: var(--text-body);
  line-height: 1.7;
  max-width: 640px;
}

.reach-me { margin-top: 72px; margin-bottom: 80px; }

.reach-me p {
  font-size: 17px;
  font-weight: 400;
  color: var(--text-body);
  line-height: 1.7;
  max-width: 640px;
}

.reach-me a {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-light);
  transition: text-decoration-color 0.2s var(--ease-smooth);
}

.reach-me a:hover {
  text-decoration-color: var(--text-primary);
}


/* ============================================
   RESPONSIVE — Tablet
   ============================================ */
@media (max-width: 1199px) {
  nav { padding: 0 24px; }

  .hero-text { font-size: 32px; }

  .case-layout { grid-template-columns: 1fr; }
  .case-sidebar { display: none; }
  .case-content { padding: 0; max-width: none; }
  .case-content-inner { max-width: 1040px; margin: 0 auto; padding: 0 48px; }
  .case-hero-image { width: 100%; margin: 0; }
  .case-image { width: 100%; margin-left: 0; }
  .outcome-section { margin-left: 0; width: 100%; padding: 48px 28px; }
  .case-image-trio { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

  .case-layout ~ footer { padding-left: 0; }
  .case-layout ~ footer .footer-game { max-width: none; margin: 0; padding: 48px 0 0; }
  .case-layout ~ footer .footer-game .bike-game-canvas { border-radius: 0; }
  .case-layout ~ footer .footer-content { max-width: 1040px; margin: 0 auto; padding: 44px 48px 40px; }

  .metadata-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .about-content { gap: 32px; }
  .building-grid { grid-template-columns: repeat(2, 1fr); }
  .currently-building { margin-top: 56px; }
  .about-aside { margin-top: 56px; }
  .reach-me { margin-top: 56px; }
}

/* ============================================
   RESPONSIVE — Mobile
   ============================================ */
@media (max-width: 767px) {
  .container { padding: 0 20px; }
  nav { padding: 0 20px; }
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 12px; }

  .hero { padding-top: 100px; margin-bottom: 48px; }
  .hero-text { font-size: 26px; line-height: 1.25; }
  .hero-subtitle { font-size: 17px; max-width: none; margin-top: 12px; }

  .projects-bento { gap: 16px; margin-bottom: 80px; }

  .bento-row-top,
  .bento-row-bottom {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .bento-card-a .bento-card-thumb { aspect-ratio: 16 / 10; }
  .bento-card-b .bento-card-thumb { aspect-ratio: 3 / 2; }
  .bento-card-c .bento-card-thumb { aspect-ratio: 16 / 10; }
  .bento-card-d .bento-card-thumb { aspect-ratio: 4 / 3; }

  .project-title { font-size: 17px; }
  .project-description { font-size: 13px; }

  .case-layout { grid-template-columns: 1fr; }
  .case-sidebar { display: none; }
  .case-content { padding: 0; max-width: none; }
  .case-content-inner { max-width: none; padding: 0 20px; }
  .case-hero-image { width: 100%; margin: 0; }
  .case-title { font-size: 28px; padding-top: 32px; }
  .case-section h2 { font-size: 20px; }
  .case-section p { font-size: 16px; max-width: none; }
  .case-image { width: 100%; margin-left: 0; border-radius: 6px; }
  .outcome-section { margin-left: 0; width: 100%; padding: 32px 20px; }
  .metadata-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .case-image-trio { grid-template-columns: 1fr; gap: 10px; }
  .case-image-sm { aspect-ratio: 16 / 10; }

  .other-work-grid { grid-template-columns: 1fr; gap: 40px; }

  .case-layout ~ footer .footer-game { max-width: none; margin: 0; padding: 48px 0 0; }
  .case-layout ~ footer .footer-game .bike-game-canvas { border-radius: 0; }
  .case-layout ~ footer .footer-content { max-width: none; margin: 0 auto; padding: 40px 20px 28px; }

  .about-header { padding-top: 80px; }
  .about-title { font-size: 28px; }
  .about-intro { font-size: 17px; }
  .about-section-heading { font-size: 22px; }
  .about-content { grid-template-columns: 1fr; gap: 32px; }
  .about-photo { max-width: 300px; }
  .about-text p { font-size: 16px; }
  .building-grid { grid-template-columns: 1fr; }
  .currently-building { margin-top: 48px; }
  .about-aside { margin-top: 48px; }
  .about-aside p { font-size: 16px; }
  .reach-me { margin-top: 48px; margin-bottom: 64px; }
  .reach-me p { font-size: 16px; }

  .outcome-full { padding: 40px 0; }

  .bike-game-canvas { height: 160px; }
  .footer-content { padding: 40px 20px 28px; }
}

@media (max-width: 375px) {
  .hero-text { font-size: 24px; }
  .case-title { font-size: 24px; }
  .nav-links { gap: 16px; }
}
