/* ============================================================
   Iridescent Blue — personal site design system
   Cobalt-blue spectrum · light + dark themes · rounded · Lexend
   ============================================================ */

:root {
  color-scheme: dark;

  /* surfaces */
  --bg:        #14161f;
  --bg-2:      #1b1e2a;
  --surface:   rgba(255,255,255,0.045);
  --surface-2: rgba(255,255,255,0.085);
  --hairline:  rgba(255,255,255,0.09);
  --hairline-strong: rgba(255,255,255,0.17);

  /* text */
  --text:   #f4f6fb;
  --dim:    #9aa0b2;
  --faint:  #61667a;

  /* glass / chrome */
  --glass:   rgba(16,18,26,0.55);
  --glass-2: rgba(22,24,34,0.6);
  --tip-bg:  rgba(20,22,32,0.94);
  --scrim:   rgba(4,5,9,0.7);
  --close-bg: rgba(0,0,0,0.45);

  /* solid (inverse) button */
  --solid-bg: #f4f6fb;
  --solid-fg: #0a0c12;

  /* iridescent spectrum — all blue */
  --a1: #2f6bff;  /* cobalt */
  --a2: #4f9dff;  /* azure  */
  --a3: #86c4ff;  /* sky    */
  --spectrum: conic-gradient(from 210deg,
      var(--a1), var(--a2), var(--a3), #b9d6ff, var(--a2), var(--a1));

  /* atmosphere */
  --atmos:
    radial-gradient(58% 48% at 50% -8%, rgba(47,107,255,.18), transparent 70%),
    radial-gradient(44% 40% at 88% 14%, rgba(79,157,255,.13), transparent 70%),
    radial-gradient(50% 45% at 5% 90%, rgba(47,107,255,.12), transparent 70%),
    var(--bg);
  --glow-soft: rgba(79,157,255,.06);
  --glow-strong: rgba(96,168,255,.16);

  --shadow-soft: 0 24px 60px -20px rgba(0,0,0,0.7);
  --shadow-card: 0 30px 70px -24px rgba(0,0,0,0.85);

  /* radii — rounder */
  --r-sm: 16px;
  --r-md: 26px;
  --r-lg: 32px;
  --r-pill: 999px;

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);

  --font-display: "Outfit", system-ui, sans-serif;
  --font-mono: "Outfit", system-ui, sans-serif;
  --font-body: "Outfit", system-ui, -apple-system, sans-serif;
}

[data-theme="light"] {
  color-scheme: light;

  --bg:        #eaeef8;
  --bg-2:      #ffffff;
  --surface:   rgba(28,52,112,0.05);
  --surface-2: rgba(28,52,112,0.09);
  --hairline:  rgba(28,52,112,0.13);
  --hairline-strong: rgba(28,52,112,0.22);

  --text:   #111726;
  --dim:    #555d72;
  --faint:  #8b93a8;

  --glass:   rgba(255,255,255,0.6);
  --glass-2: rgba(255,255,255,0.72);
  --tip-bg:  rgba(255,255,255,0.94);
  --scrim:   rgba(20,32,66,0.4);
  --close-bg: rgba(255,255,255,0.7);

  --solid-bg: #111726;
  --solid-fg: #f6f8ff;

  --atmos:
    radial-gradient(58% 48% at 50% -10%, rgba(79,157,255,.20), transparent 70%),
    radial-gradient(44% 40% at 90% 12%, rgba(47,107,255,.12), transparent 70%),
    radial-gradient(52% 46% at 4% 92%, rgba(120,180,255,.18), transparent 70%),
    var(--bg);
  --glow-soft: rgba(47,107,255,.05);
  --glow-strong: rgba(47,107,255,.12);

  --shadow-soft: 0 24px 54px -22px rgba(40,70,150,0.28);
  --shadow-card: 0 34px 70px -26px rgba(40,70,150,0.34);
}

/* small uppercase labels (formerly mono) — weight + spacing for crisp rhythm in Lexend */
.eyebrow, .pill-btn, .cta, .tile-tag, .nav-tip, .social, .stat .lbl, .footer-line, .scroll-hint, .ac-label {
  font-weight: 500;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(79,157,255,.18) transparent;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(79,157,255,.22);
  border-radius: var(--r-pill);
}
::-webkit-scrollbar-thumb:hover { background: rgba(79,157,255,.38); }

@media (max-width: 900px) {
  html { scrollbar-width: none; }
  ::-webkit-scrollbar { display: none; }
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* during a theme swap, kill transitions so var-based colors update instantly
   (Chromium leaves transitioned var() backgrounds stuck on the old value) */
.theme-switching, .theme-switching *,
.theme-switching *::before, .theme-switching *::after {
  transition: none !important;
}

/* atmospheric background glows */
.bg-atmos {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: var(--atmos);
}
.bg-grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}
[data-theme="light"] .bg-grain { opacity: .28; }

/* cursor-follow iridescent spotlight */
.cursor-glow {
  position: fixed; z-index: 2; pointer-events: none;
  width: 340px; height: 340px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--glow-strong), var(--glow-soft) 42%, transparent 70%);
  opacity: 0; transition: opacity .5s var(--ease);
  filter: blur(12px);
  mix-blend-mode: screen;
}
[data-theme="light"] .cursor-glow { mix-blend-mode: normal; }

#root { position: relative; z-index: 3; }
.page { position: relative; z-index: 1; }

/* ============================================================
   Reusable iridescent ring
   ============================================================ */
.irid-ring {
  position: absolute; inset: -3px; border-radius: inherit;
  background: var(--spectrum);
  padding: 2px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .45s var(--ease);
  animation: spin 6s linear infinite;
}
.irid-glow {
  position: absolute; inset: -10px; border-radius: inherit;
  background: var(--spectrum);
  filter: blur(16px); opacity: 0;
  transition: opacity .45s var(--ease);
  animation: spin 6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Side navigation
   ============================================================ */
.sidenav {
  position: fixed; left: 26px; top: 50%; transform: translateY(-50%);
  z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 11px;
  background: var(--glass);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,.06);
}
.nav-logo {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--surface-2), var(--surface));
  border: 1px solid var(--hairline-strong);
  margin-bottom: 6px; position: relative;
  color: var(--text);
  order: -1;
}
.nav-logo .irid-ring { opacity: .9; }
.nav-logo svg { width: 20px; height: 20px; }

.nav-item {
  position: relative;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--faint);
  cursor: pointer;
  transition: color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}
.nav-item svg { width: 20px; height: 20px; position: relative; z-index: 2; }
.nav-item:hover { color: var(--text); background: var(--surface); transform: scale(1.04); }
.nav-item.active { color: var(--text); }
.nav-disc {
  position: absolute; inset: 4px; border-radius: 50%;
  background: var(--solid-bg);
  opacity: 0; transform: scale(.5);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  z-index: 1;
}
.nav-item.active .irid-glow { opacity: .9; }
.nav-item.active .irid-ring { opacity: 1; }

.nav-tip {
  position: absolute; left: 64px; top: 50%; transform: translateY(-50%) translateX(-6px);
  background: var(--tip-bg);
  border: 1px solid var(--hairline);
  color: var(--text);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 11px; border-radius: 11px; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  box-shadow: var(--shadow-soft);
}
.nav-item:hover .nav-tip { opacity: 1; transform: translateY(-50%) translateX(0); }

/* top-right utility */
.topnav {
  position: fixed; top: 24px; right: 30px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
}
.pill-btn {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase;
  padding: 10px 18px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--hairline);
  color: var(--text); cursor: pointer; text-decoration: none;
  backdrop-filter: blur(14px);
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .25s var(--ease);
}
.pill-btn:hover { background: var(--surface-2); border-color: var(--hairline-strong); transform: translateY(-1px); }
.pill-btn.solid { background: var(--solid-bg); color: var(--solid-fg); border-color: transparent; }
.pill-btn.solid:hover { opacity: .9; }

/* theme toggle */
.theme-toggle {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--hairline);
  color: var(--text); cursor: pointer;
  backdrop-filter: blur(14px);
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.theme-toggle:hover { background: var(--surface-2); border-color: var(--hairline-strong); transform: translateY(-1px) rotate(-18deg); }
.theme-toggle svg { width: 19px; height: 19px; }

/* ============================================================
   Layout shell
   ============================================================ */
.page { padding-left: 110px; }
.section { max-width: 1180px; margin: 0 auto; padding: 0 48px; }

.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--faint);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--hairline-strong); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  /* Span full viewport width so the name centers against the viewport, not the content column */
  width: calc(100% + 110px);
  margin-left: -110px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: clamp(120px, 20vh, 200px) 48px 100px;
}

.hero-copy {
  position: relative; z-index: 60;
  width: min(96%, 1500px); text-align: center;
}
.hero-mark {
  width: 46px; height: 46px; margin: 0 auto 16px;
  border-radius: 16px; position: relative;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--hairline);
}
.hero-mark .irid-glow { opacity: .55; }
.hero-mark svg { width: 24px; height: 24px; color: var(--text); position: relative; z-index: 2; }

.hero-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(52px, 10vw, 148px); line-height: .93;
  letter-spacing: -.03em; margin-bottom: 20px;
  white-space: nowrap; /* stay on one line when width allows */
}
.grad {
  background: linear-gradient(100deg, var(--a1), var(--a2), var(--a3), #c8e0ff, var(--a2), var(--a1), var(--a2), var(--a3));
  background-size: 350% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: iridFlow 5s linear infinite;
  /* three-layer glow traces letter shapes via drop-shadow */
  filter:
    drop-shadow(0 0 3px rgba(79,157,255,.55))
    drop-shadow(0 0 10px rgba(47,107,255,.18));
}
[data-theme="light"] .grad {
  filter:
    drop-shadow(0 0 3px rgba(47,107,255,.35))
    drop-shadow(0 0 8px rgba(79,157,255,.14));
}
@keyframes iridFlow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
.hero-sub {
  font-size: clamp(15px, 1.6vw, 20px); color: var(--dim);
  line-height: 1.55; max-width: 680px; margin: 0 auto 32px; text-wrap: balance;
}
.hero-cta { display: inline-flex; gap: 10px; align-items: stretch; }

.cta {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em;
  text-transform: uppercase;
  padding: 15px 15px 15px 26px; border-radius: var(--r-pill);
  background: var(--solid-bg); color: var(--solid-fg); border: none; cursor: pointer;
  text-decoration: none;
  transition: transform .3s var(--ease), box-shadow .4s var(--ease);
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -14px rgba(79,157,255,.55); }
.cta .cta-arrow {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--solid-fg); color: var(--solid-bg); display: grid; place-items: center;
  transition: transform .35s var(--ease);
}
.cta:hover .cta-arrow { transform: translateX(3px) rotate(0deg); }
.cta.ghost { background: transparent; color: var(--text); border: 1px solid var(--hairline-strong); padding: 15px 26px; }
.cta.ghost:hover { background: var(--surface); box-shadow: none; }


.scroll-hint {
  position: absolute; bottom: 88px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--dim);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-weight: 500;
}
.scroll-hint .scroll-arrow {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.scroll-hint .scroll-arrow::before,
.scroll-hint .scroll-arrow::after {
  content: "";
  display: block;
  width: 11px; height: 11px;
  border-right: 1.5px solid var(--dim);
  border-bottom: 1.5px solid var(--dim);
  border-radius: 1px;
  transform: rotate(45deg);
}
.scroll-hint .scroll-arrow::before { animation: chevronFlow 2s var(--ease) infinite; }
.scroll-hint .scroll-arrow::after  { animation: chevronFlow 2s var(--ease) .28s infinite; }
@keyframes chevronFlow {
  0%   { opacity: 0; transform: rotate(45deg) translate(-3px, -3px); }
  35%  { opacity: 1; transform: rotate(45deg) translate(0, 0); }
  70%  { opacity: .15; transform: rotate(45deg) translate(3px, 3px); }
  100% { opacity: 0; transform: rotate(45deg) translate(3px, 3px); }
}

/* ============================================================
   WORK GRID
   ============================================================ */
.work { padding: 128px 48px; }
.work-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 56px; gap: 24px; flex-wrap: wrap;
}
.sec-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 4.2vw, 52px); letter-spacing: -.02em; line-height: 1;
}
.sec-note { color: var(--dim); font-size: 15px; max-width: 320px; line-height: 1.6; }

.grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px;
}
.tile {
  position: relative; border-radius: 40px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--hairline);
  cursor: pointer; transform-style: preserve-3d;
  transition: transform .35s var(--ease-out), box-shadow .5s var(--ease), border-color .4s;
  will-change: transform;
}
.tile:hover { box-shadow: var(--shadow-card); border-color: var(--hairline-strong); }
.tile .tile-media { position: relative; width: 100%; height: 100%; }
.tile image-slot, .tile .ph { display: block; width: 100%; height: 100%; }
.tile .tile-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 38%);
}
.brand-icon { width: 85%; height: 90%; object-fit: contain; }
@media (max-width: 900px) { .brand-icon { width: 72%; height: 78%; } }
@media (max-width: 600px) { .brand-icon { width: 58%; height: 64%; } }
@media (max-width: 400px) { .brand-icon { width: 46%; height: 52%; } }

.tile .tile-meta {
  position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 3;
  transform: translateZ(40px);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.tile h3 { font-family: var(--font-display); font-weight: 500; font-size: 24px; letter-spacing: -.01em; color: #fff; }
.tile .tile-tag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.7); margin-top: 5px;
}
.tile .tile-plus {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3);
  backdrop-filter: blur(10px);
  display: grid; place-items: center; color: #fff;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.tile:hover .tile-plus { background: #fff; color: #0a0c12; transform: rotate(90deg); }
.tile .tile-num {
  position: absolute; bottom: 18px; right: 20px; z-index: 3;
  font-family: var(--font-mono); font-size: 12px; color: rgba(255,255,255,.7);
  transform: translateZ(40px);
}

.col-7 { grid-column: span 7; } .col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; } .col-4 { grid-column: span 4; }
.col-8 { grid-column: span 8; }
.h-lg { height: 420px; } .h-md { height: 340px; } .h-sm { height: 300px; }

/* ============================================================
   PROJECT MODAL
   ============================================================ */
.modal-scrim {
  position: fixed; inset: 0; z-index: 200;
  background: var(--scrim); backdrop-filter: blur(10px);
  display: grid; place-items: center; padding: 40px;
  opacity: 0; pointer-events: none; transition: opacity .4s var(--ease);
}
.modal-scrim.open { opacity: 1; pointer-events: auto; }
.modal {
  position: relative; width: min(960px, 96vw); max-height: 88vh; overflow: hidden;
  border-radius: var(--r-lg); background: var(--bg-2);
  border: 1px solid var(--hairline); box-shadow: var(--shadow-card);
  display: grid; grid-template-columns: 1.1fr 1fr;
  transform: scale(.94) translateY(14px); opacity: 0;
  transition: transform .5s var(--ease-out), opacity .4s var(--ease);
}
.modal-scrim.open .modal { transform: none; opacity: 1; }
.modal-media { position: relative; min-height: 420px; }
.modal-media image-slot, .modal-media .ph { width: 100%; height: 100%; display: block; }
.modal-body { padding: 48px 40px; overflow-y: auto; }
.modal-body .eyebrow { margin-bottom: 16px; }
.modal-body h2 { font-family: var(--font-display); font-weight: 700; font-size: 32px; letter-spacing: -.02em; margin-bottom: 16px; }
.modal-body p { color: var(--dim); line-height: 1.7; font-size: 15px; margin-bottom: 18px; text-align: justify; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  padding: 7px 13px; border-radius: var(--r-pill); color: var(--dim);
  background: var(--surface); border: 1px solid var(--hairline);
}
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--glass); border: 1px solid var(--hairline);
  color: var(--faint); cursor: pointer; display: grid; place-items: center;
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  transition: color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}
.modal-close svg { width: 14px; height: 14px; }
.modal-close:hover { color: var(--text); background: var(--surface); transform: rotate(90deg); }

/* ============================================================
   ABOUT
   ============================================================ */
.about { padding: 96px 48px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-portrait {
  position: relative; border-radius: 40px; overflow: hidden; aspect-ratio: 4/5;
  border: 1px solid var(--hairline); box-shadow: var(--shadow-card);
}
.about-portrait image-slot, .about-portrait .ph { width: 100%; height: 100%; display: block; }
.about-portrait .irid-glow { opacity: .4; inset: -20px; }
.about-lead {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(24px, 3vw, 36px); line-height: 1.25; letter-spacing: -.01em;
  margin: 24px 0 24px; text-wrap: balance;
}
.about-lead em { font-style: normal; color: transparent;
  background: linear-gradient(100deg, var(--a1), var(--a2), var(--a3));
  -webkit-background-clip: text; background-clip: text; }
.about-body { color: var(--dim); line-height: 1.7; font-size: 15.5px; margin-bottom: 24px; }
.skills { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 32px; }

.stats { display: flex; gap: 32px; margin-top: 40px; }
.stat .num { font-family: var(--font-display); font-weight: 700; font-size: 34px; }
.stat .lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-top: 4px; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  position: relative; padding: 120px 48px 120px; text-align: center;
}
.contact-ring {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 520px; height: 520px; border-radius: 50%;
  background: var(--spectrum); filter: blur(120px); opacity: .18;
  animation: spin 16s linear infinite; pointer-events: none;
}
[data-theme="light"] .contact-ring { opacity: .3; filter: blur(110px); }

.contact-inner { position: relative; z-index: 2; }
.contact .cta {
  font-size: clamp(13px, 1.1vw, 17px);
  padding: clamp(14px, 1.2vw, 20px) clamp(14px, 1.2vw, 20px) clamp(14px, 1.2vw, 20px) clamp(24px, 2vw, 34px);
}
.contact .cta .cta-arrow { width: clamp(30px, 2.4vw, 40px); height: clamp(30px, 2.4vw, 40px); }
.contact h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(44px, 8vw, 112px); letter-spacing: -.02em; line-height: .96; margin-bottom: 32px;
}
.contact p { color: var(--dim); font-size: clamp(16px, 1.4vw, 20px); margin-bottom: 40px; }
.socials { display: flex; gap: clamp(8px, .8vw, 14px); justify-content: center; margin-top: 48px; }
.social {
  font-family: var(--font-mono); font-size: clamp(11px, .9vw, 14px); letter-spacing: .08em; text-transform: uppercase;
  color: var(--dim); text-decoration: none;
  padding: clamp(9px, .8vw, 13px) clamp(16px, 1.4vw, 24px); border-radius: var(--r-pill); border: 1px solid var(--hairline);
  background: var(--surface);
  transition: color .3s, border-color .3s, background .3s, transform .25s;
}
.social:hover { color: var(--text); border-color: var(--hairline-strong); transform: translateY(-2px); }

.footer-line {
  margin-top: clamp(80px, 24vh, 210px); padding-top: 24px; border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: clamp(11px, .9vw, 14px); letter-spacing: .04em; color: var(--faint);
}

/* placeholder media (striped) */
.ph {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 12px, rgba(255,255,255,.015) 12px 24px),
    linear-gradient(140deg, var(--ph-a, #15151c), var(--ph-b, #0e0e14));
  position: relative;
}
.ph::after {
  content: attr(data-ph);
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.32);
}

/* ============================================================
   Reveal animations
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

/* page load */
@keyframes floatUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.load-stagger > * { opacity: 0; animation: floatUp .9s var(--ease-out) forwards; }

/* hero entrance — transition-based so it settles to a visible state */
.hero-copy > * { opacity: 0; transform: translateY(22px); transition: opacity .85s var(--ease-out), transform .85s var(--ease-out); }
.hero-copy.shown > * { opacity: 1; transform: none; }

/* ============================================================
   Responsive — full overhaul
   Breakpoints: 1200 · 1100 · 960 · 900 · 768 · 680 · 480 · 380
   ============================================================ */

/* ============================================================
   1200px — wide laptop / near-desktop
   ============================================================ */
@media (max-width: 1200px) {
  .section { padding: 0 36px; }
  .hero    { padding: clamp(100px, 18vh, 180px) 36px 88px; }
  .work    { padding: 108px 36px; }
  .about   { padding: 88px 36px; }
  .contact { padding: 100px 36px 88px; }
}

/* ============================================================
   1100px — landscape tablet / 13" laptop
   ============================================================ */
@media (max-width: 1100px) {
  .section    { padding: 0 28px; }
  .hero       { padding: clamp(88px, 16vh, 140px) 28px 80px; }
  .hero-title { font-size: clamp(52px, 9.5vw, 130px); }
  .work       { padding: 96px 28px; }
  .about      { padding: 80px 28px; }
  .contact    { padding: 96px 28px 80px; }
  .h-lg { height: 400px; }
  .h-md { height: 320px; }
}

/* ============================================================
   960px — iPad landscape / small laptop
   ============================================================ */
@media (max-width: 960px) {
  .section    { padding: 0 24px; }
  .hero       { padding: clamp(80px, 14vh, 120px) 24px 72px; }
  .hero-title { font-size: clamp(52px, 9vw, 116px); }
  .work       { padding: 80px 24px; }
  .about      { padding: 72px 24px; }
  .contact    { padding: 80px 24px 72px; }
  .h-lg { height: 370px; }
  .h-md { height: 300px; }
  .h-sm { height: 280px; }
  .modal-body { padding: 40px 32px; }
}

/* ============================================================
   900px — nav flips to bottom bar.
   Hero resets to full natural width (no viewport-centering needed).
   ============================================================ */
@media (max-width: 900px) {
  /* layout shell */
  .page {
    padding-left: 0;
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  /* hero: reset viewport-centering offset */
  .hero {
    width: 100%;
    margin-left: 0;
    padding: clamp(80px, 14vh, 130px) 24px clamp(88px, 14vh, 130px);
  }
  .hero-copy  { width: min(96%, 1500px); }
  .hero-title { font-size: clamp(44px, 10.5vw, 108px); white-space: nowrap; }
  .hero-sub { font-size: clamp(14px, 3.4vw, 18px); margin-bottom: 28px; }
  .hero-cta { flex-direction: row; gap: 10px; justify-content: center; flex-wrap: wrap; }
  .hero-cta .cta,
  .hero-cta .cta.ghost { width: auto; }

  /* bottom nav pill */
  .sidenav {
    left: 50%; top: auto;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    flex-direction: row;
    border-radius: var(--r-pill);
    padding: 8px 12px;
    gap: 6px;
    width: max-content;
    max-width: calc(100vw - 32px);
  }
  .nav-item { width: 44px; height: 44px; } /* WCAG min touch target */
  .nav-item svg { width: 19px; height: 19px; }
  .nav-tip { display: none; }

  /* sections */
  .section { padding: 0 24px; }
  .work    { padding: 72px 24px; }
  .about   { padding: 64px 24px; }
  .contact { padding: 80px 24px 72px; }

  .work-head { margin-bottom: 40px; }

  /* work grid: 2-per-row (span 6 each) */
  .col-7, .col-8, .col-5, .col-6, .col-4 { grid-column: span 6; }
  .h-lg, .h-md { height: 300px; }
  .h-sm        { height: 280px; }
  .grid        { gap: 14px; }

  /* about */
  .about-grid     { grid-template-columns: 1fr; gap: 36px; }
  .about-portrait { max-width: 520px; margin: 0 auto; }

  /* modal: single column */
  .modal       { grid-template-columns: 1fr; max-height: 94vh; }
  .modal-media { display: none; }
  .modal-body  { padding: 36px 28px; }

  .contact-ring { width: 380px; height: 380px; }
  .footer-line  { flex-direction: column; align-items: center; text-align: center; gap: 8px; }

  /* scroll hint above bottom nav */
  .scroll-hint { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}

/* ============================================================
   768px — iPad portrait / large-phone landscape
   No arc stage. Hide scroll hint on touch-first devices.
   ============================================================ */
@media (max-width: 768px) {
  .section { padding: 0 20px; }
  .hero    { padding: clamp(64px, 11vh, 100px) 20px clamp(80px, 12vh, 112px); }
  .work    { padding: 64px 20px; }
  .about   { padding: 56px 20px; }
  .contact { padding: 64px 20px 60px; }

  /* stack words + scale to fill width — single clamp handles all sizes below this point */
  .hero-title { font-size: clamp(52px, 19vw, 148px); white-space: normal; }
  .hero-title .grad { display: block; }

  /* 2-col tiles with reduced height */
  .h-lg, .h-md, .h-sm { height: 260px; }
  .grid { gap: 12px; }

  .about-portrait { max-width: 440px; }

  .modal       { width: min(640px, 96vw); }
  .modal-body  { padding: 28px 22px; }
  .modal-body h2 { font-size: 26px; }

  .topnav { top: 14px; right: 16px; }

  /* hide scroll hint — touch devices don't need the scroll prompt */
  .scroll-hint { display: none; }
}

/* Touch device in landscape (tablets rotated, phones rotated).
   pointer: coarse = touch-primary; leaves mouse-driven laptops/desktops unaffected. */
@media (orientation: landscape) and (pointer: coarse) {
  /* hide scroll prompt — no need on touch in landscape */
  .scroll-hint { display: none; }

  /* move nav pill to bottom center, matching the ≤900px portrait behavior */
  .page {
    padding-left: 0;
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  /* reset hero viewport-centering offset (only needed with side nav) */
  .hero {
    width: 100%;
    margin-left: 0;
    padding: clamp(52px, 8vh, 80px) 24px clamp(68px, 9vh, 96px);
  }
  .hero-copy  { width: min(96%, 1500px); }
  /* landscape + touch: keep name on one line, sized to fit width */
  .hero-title { font-size: clamp(44px, 9.5vw, 110px); white-space: nowrap; }
  .hero-sub { font-size: clamp(13px, 2.6vw, 17px); margin-bottom: 22px; }
  .hero-cta { flex-direction: row; gap: 10px; justify-content: center; flex-wrap: wrap; }
  .hero-cta .cta,
  .hero-cta .cta.ghost { width: auto; }

  /* bottom nav pill */
  .sidenav {
    left: 50%; top: auto;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    flex-direction: row;
    border-radius: var(--r-pill);
    padding: 8px 12px;
    gap: 6px;
    width: max-content;
    max-width: calc(100vw - 32px);
  }
  .nav-item { width: 44px; height: 44px; }
  .nav-item svg { width: 19px; height: 19px; }
  .nav-tip { display: none; }
}

/* ============================================================
   680px — large phone
   ============================================================ */
@media (max-width: 680px) {
  .hero { padding: 72px 20px 80px; }
  .hero-title { white-space: normal; } /* font-size inherited from 768px clamp */
  .hero-sub   { font-size: clamp(14px, 3.6vw, 17px); }

  .section { padding: 0 18px; }
  .work    { padding: 60px 18px; }
  .about   { padding: 52px 18px; }
  .contact { padding: 64px 18px 56px; }

  /* single-column work grid */
  .col-7, .col-8, .col-5, .col-6, .col-4 { grid-column: span 12; }
  .h-lg, .h-md, .h-sm { height: 260px; }
  .grid { gap: 12px; }

  .about-grid     { gap: 28px; }
  .about-portrait { max-width: 100%; }

  .modal-scrim { padding: 16px; }
  .modal       { width: 92%; max-width: 480px; border-radius: var(--r-md); }
  .modal-close { width: 28px; height: 28px; top: 10px; right: 10px; }
  .modal-body  { padding: 24px 18px; }
  .modal-body h2 { font-size: 22px; }
  .modal-media { min-height: 190px; max-height: 34vh; }

  .stats        { gap: 20px; flex-wrap: wrap; }
  .socials      { gap: 8px;  flex-wrap: wrap; }
  .contact-ring { width: 240px; height: 240px; }
  .topnav       { top: 12px; right: 12px; }
}

/* ============================================================
   480px — small phone (iPhone SE, Galaxy A-series)
   ============================================================ */
@media (max-width: 480px) {
  .hero    { padding: 60px 16px 72px; }
  /* hero-title font-size: inherited from 768px clamp(52px, 19vw, 148px) */
  .hero-sub   { font-size: 13.5px; }

  .section { padding: 0 16px; }
  .work    { padding: 52px 16px; }
  .about   { padding: 44px 16px; }
  .contact { padding: 56px 16px 48px; }

  .h-lg, .h-md, .h-sm { height: 230px; }
  .grid { gap: 10px; }

  .sec-title  { font-size: clamp(24px, 7.5vw, 40px); }
  .contact h2 { font-size: clamp(36px, 11vw, 72px); }

  .cta            { font-size: 12px; padding: 12px 12px 12px 18px; }
  .cta .cta-arrow { width: 28px; height: 28px; }
  .cta.ghost      { padding: 12px 18px; }

  .modal-scrim { padding: 8px; }
  .modal-body  { padding: 18px 14px; }
  .modal-body h2 { font-size: 20px; }

  .topnav       { top: 10px; right: 10px; }
  .theme-toggle { width: 40px; height: 40px; }

  .sidenav  { padding: 6px 10px; gap: 4px; }
  .nav-item { width: 42px; height: 42px; }
  .nav-item svg { width: 18px; height: 18px; }

  .stats     { gap: 16px; }
  .stat .num { font-size: 28px; }
}

/* ============================================================
   380px — very small phone (iPhone SE 1st gen, narrow Android)
   ============================================================ */
@media (max-width: 380px) {
  .hero    { padding: 52px 14px 64px; }
  /* hero-title font-size: inherited from 768px clamp(52px, 19vw, 148px) */
  .hero-sub   { font-size: 13px; }

  .section { padding: 0 14px; }
  .work    { padding: 44px 14px; }
  .about   { padding: 40px 14px; }
  .contact { padding: 48px 14px 44px; }

  .h-lg, .h-md, .h-sm { height: 200px; }
  .grid { gap: 8px; }

  .cta            { font-size: 11px; padding: 10px 10px 10px 15px; letter-spacing: .04em; }
  .cta .cta-arrow { width: 24px; height: 24px; }
  .cta.ghost      { padding: 10px 15px; }

  .contact h2 { font-size: clamp(30px, 10vw, 50px); }

  .sidenav  { max-width: calc(100vw - 20px); padding: 5px 8px; gap: 2px; }
  .nav-item { width: 38px; height: 38px; }
  .nav-item svg { width: 17px; height: 17px; }
}
