/* ==========================================================================
   Danny Fathi — personal site
   "showcasy" white design: near-black grotesque type on white, gray-emphasis
   headline words, pill buttons, light-gray work cards. Font: Inter only.

   Motion policy: animations are authored unconditionally; a single
   prefers-reduced-motion block at the end stills everything. Appending
   ?motion=force to the URL (html.force-motion) bypasses that for testing.
   ========================================================================== */

/* ---------- Fonts (self-hosted; system stack covers any load failure) ---- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/inter-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/inter-latin-800-normal.woff2") format("woff2");
}

/* ---------- Design tokens ------------------------------------------------ */
:root {
  color-scheme: light;
  --bg: #fafafa;
  --bg-tint: #f1f1f3;
  --card: #efeff1;
  --card-hover: #eaeaee;
  --ink: #0e0e10;
  --ink-hover: #26262b;
  --soft: #b3b3ba;      /* gray headline emphasis */
  --muted: #6d6d76;     /* body secondary */
  --line: #e4e4e8;
  --line-dark: #d5d5da;
  --nav-bg: rgba(250, 250, 250, 0.85);
  --blob: rgba(14, 14, 16, 0.05);
  --outline-stroke: #d7d7dc;  /* giant outlined marquee text */
  --outline-fill: #ececef;
  --phone-bezel: #101013;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --r-card: 28px;
  --container: 1160px;
  --nav-h: 84px;

  --ease-out: cubic-bezier(0.22, 0.65, 0.26, 1);
}

/* Dark mode (html.dark, toggled from the nav, persisted in localStorage) */
html.dark {
  color-scheme: dark;
  --bg: #0d0d0f;
  --bg-tint: #131316;
  --card: #17171b;
  --card-hover: #1d1d23;
  --ink: #f2f2f4;
  --ink-hover: #dcdce1;
  --soft: #55555f;
  --muted: #9a9aa3;
  --line: #222228;
  --line-dark: #30303a;
  --nav-bg: rgba(13, 13, 15, 0.85);
  --blob: rgba(255, 255, 255, 0.07);
  --outline-stroke: #2e2e36;
  --outline-fill: #1b1b20;
  --phone-bezel: #26262c;
}

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

html { scroll-padding-top: calc(var(--nav-h) + 8px); scroll-behavior: smooth; }
html.motion-off { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0 0 0.5em; line-height: 1.05; letter-spacing: -0.03em; }
p { margin: 0 0 1em; }
a { color: var(--ink); text-decoration: none; }
ul[role="list"], ol[role="list"] { list-style: none; margin: 0; padding: 0; }
svg { display: block; }
strong { font-weight: 700; color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 28px;
}

/* ---------- Shared bits -------------------------------------------------- */
.soft { color: var(--soft); }

.h-display {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.55em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.6em;
}
.eyebrow::before {
  content: "";
  height: 1px;
  width: 36px;
  background: var(--ink);
  transform-origin: left;
}

.section { padding: 130px 0; }
.section-tint {
  background: var(--bg-tint);
}
.section-note {
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 560px;
  margin-bottom: 3rem;
}

/* Pills / buttons */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1;
  padding: 17px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  background: none;
  color: var(--ink);
  white-space: nowrap;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.pill svg { width: 17px; height: 17px; transition: transform 0.3s var(--ease-out); }
.pill:hover svg { transform: translateX(4px); }

.pill-outline { border-color: var(--line-dark); background: var(--bg); }
.pill-outline:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.pill-dark { background: var(--ink); color: var(--bg); padding: 20px 34px; font-size: 1.02rem; }
.pill-dark:hover { background: var(--ink-hover); }

/* Underline links */
.underline-link {
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: background-size 0.4s var(--ease-out);
  padding-bottom: 3px;
}
.underline-link:hover { background-size: 100% 2px; }

/* Scroll progress */
.progress-bar {
  position: fixed;
  inset: 0 auto auto 0;
  height: 3px;
  width: 0;
  background: var(--ink);
  z-index: 200;
}

/* ---------- Ambient animation primitives --------------------------------- */
/* Scroll-reveal (JS adds .visible; without JS everything stays visible) */
.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  filter: blur(6px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out),
              filter 0.7s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js .reveal.visible { opacity: 1; transform: none; filter: none; }

/* Staggered children inside a revealed block */
.js .reveal [data-stagger] > *,
.js [data-stagger].reveal > * {
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js .reveal.visible [data-stagger] > *,
.js [data-stagger].reveal.visible > * {
  opacity: 1;
  transform: none;
}

/* Philosophy quote: word-by-word rise (words wrapped by JS) */
.js .q-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.7em);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js .reveal.visible .q-word { opacity: 1; transform: none; }

/* Eyebrow tick line draws itself */
.js .eyebrow.reveal::before {
  transform: scaleX(0);
  transition: transform 0.8s var(--ease-out) 0.25s;
}
.js .eyebrow.reveal.visible::before { transform: scaleX(1); }

/* Gentle levitation for the app mockups */
.bob { animation: bob 7s ease-in-out infinite; }
.work-card:nth-child(2) .bob { animation-duration: 8.5s; animation-delay: 0.8s; }

/* Logo period softly blinks */
.logo-dot { display: inline-block; animation: dot-blink 2.6s ease-in-out infinite; }

/* Back-to-top arrow bobs */
.back-top svg { animation: arrow-bob 1.8s ease-in-out infinite; }

/* Hero load-in */
.js .anim {
  opacity: 0;
  transform: translateY(34px);
  animation: rise 0.9s var(--ease-out) forwards;
}
.js .anim-1 { animation-delay: 0.05s; }
.js .anim-2 { animation-delay: 0.15s; }
.js .anim-3 { animation-delay: 0.25s; }
.js .anim-4 { animation-delay: 0.35s; }
.js .anim-5 { animation-delay: 0.55s; }

@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes dot-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes arrow-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.55); opacity: 0; }
}
@keyframes shimmer {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(220%); }
}
@keyframes bar-fill {
  0%, 12% { width: 12%; }
  55%, 100% { width: var(--w, 60%); }
}
@keyframes blink { 50% { opacity: 0; } }

/* Typing caret */
.caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: var(--ink);
  margin-left: 4px;
  vertical-align: -0.15em;
  animation: blink 1.1s steps(1) infinite;
}

/* Drifting background blobs — barely-there gray depth on white */
.blob {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  background: var(--blob);
  pointer-events: none;
}
.blob-1 {
  width: 560px; height: 560px;
  top: -140px; right: -160px;
  animation: drift-a 26s ease-in-out infinite alternate;
}
.blob-2 {
  width: 460px; height: 460px;
  bottom: -180px; left: -120px;
  animation: drift-b 32s ease-in-out infinite alternate;
}
.blob-3 {
  width: 620px; height: 620px;
  top: 50%; left: 50%;
  margin: -310px 0 0 -310px;
  opacity: 0.8;
  animation: drift-a 30s ease-in-out infinite alternate;
}
@keyframes drift-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-70px, 50px) scale(1.15); }
}
@keyframes drift-b {
  from { transform: translate(0, 0) scale(1.1); }
  to   { transform: translate(60px, -40px) scale(0.95); }
}

/* Hero scroll hint — a bar endlessly sweeping along a rail */
.scroll-hint {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 9vh;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--soft);
}
.scroll-hint-line {
  width: 52px;
  height: 2px;
  border-radius: 2px;
  background: var(--line-dark);
  overflow: hidden;
}
.scroll-hint-line::after {
  content: "";
  display: block;
  width: 40%;
  height: 100%;
  background: var(--ink);
  animation: slide-x 1.9s ease-in-out infinite;
}
@keyframes slide-x {
  from { transform: translateX(-120%); }
  to   { transform: translateX(320%); }
}

/* ---------- Nav ----------------------------------------------------------- */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, height 0.3s var(--ease-out);
}
.site-nav.scrolled { border-bottom-color: var(--line); }

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.logo-soft { color: var(--soft); }
.logo-ink { color: var(--ink); }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-talk { padding: 14px 24px; }

.theme-toggle { width: 48px; height: 48px; padding: 0; }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle:hover svg { transform: none; }
.theme-toggle .ic-sun { display: none; }
html.dark .theme-toggle .ic-sun { display: block; }
html.dark .theme-toggle .ic-moon { display: none; }

.burger {
  width: 58px;
  height: 48px;
  padding: 0;
  flex-direction: column;
  gap: 5px;
}
.burger-bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease-out);
}
.burger[aria-expanded="true"] .burger-bar:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded="true"] .burger-bar:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Menu overlay ---------------------------------------------------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  padding-top: var(--nav-h);
  display: flex;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}
.menu-overlay.open { opacity: 1; visibility: visible; }

.menu-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 6vh;
  padding-bottom: 40px;
  overflow-y: auto;
}

.menu-links li { overflow: hidden; }
.menu-links a {
  display: inline-flex;
  align-items: baseline;
  gap: 18px;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.18;
  padding: 0.06em 0;
  color: var(--ink);
  transform: translateY(110%);
  opacity: 0;
}
.menu-overlay.open .menu-links a {
  transform: none;
  opacity: 1;
  transition: transform 0.6s var(--ease-out), opacity 0.5s ease, color 0.3s var(--ease-out);
}
.menu-overlay.open .menu-links li:nth-child(1) a { transition-delay: 0.08s; }
.menu-overlay.open .menu-links li:nth-child(2) a { transition-delay: 0.14s; }
.menu-overlay.open .menu-links li:nth-child(3) a { transition-delay: 0.2s; }
.menu-overlay.open .menu-links li:nth-child(4) a { transition-delay: 0.26s; }
.menu-overlay.open .menu-links a:hover { color: var(--soft); transform: translateX(14px); }
.menu-overlay.open .menu-links li:nth-child(5) a { transition-delay: 0.32s; }
.menu-overlay.open .menu-links li:nth-child(6) a { transition-delay: 0.38s; }
.menu-num {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--soft);
}

.menu-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.menu-mail { font-weight: 600; font-size: 1.05rem; color: var(--muted); }
.menu-mail:hover { color: var(--ink); }

/* ---------- Hero ----------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-h) + 9vh) 0 90px;
}
.hero-hello {
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  font-weight: 500;
  margin-bottom: 1.6rem;
  min-height: 1.65em;
}
.hero-title {
  font-size: clamp(3rem, 9.4vw, 6.6rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.0;
  margin-bottom: 4.5rem;
}
.hero-title > span { display: block; }

.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.hero-note {
  max-width: 380px;
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0;
}

/* ---------- Marquee (JS-driven scroll; speeds up on hover) ----------------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track { display: inline-flex; will-change: transform; }
.marquee-group {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.marquee-group i { font-style: normal; color: var(--soft); }
.marquee-group span { transition: color 0.3s var(--ease-out); }
.marquee:hover .marquee-group span { color: var(--muted); }
.marquee:hover .marquee-group span:hover { color: var(--ink); }

/* ---------- Selected works ------------------------------------------------------ */
.works { display: grid; gap: 28px; }

.work-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
  background: var(--card);
  border-radius: var(--r-card);
  padding: 56px 60px;
  transition: background 0.4s var(--ease-out);
}
.work-card:hover { background: var(--card-hover); }

.work-info h3 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5em;
}
.work-info > p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 420px;
  margin-bottom: 1.6em;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 2.2em;
}
.work-tags li {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
}

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 2px;
  padding-bottom: 4px;
  transition: gap 0.3s var(--ease-out);
}
.work-link:hover { gap: 12px; }
.work-link svg { width: 16px; height: 16px; }
.work-link.is-soon {
  color: var(--soft);
  background-image: linear-gradient(to right, var(--soft) 55%, transparent 45%);
  background-size: 8px 2px;
  background-repeat: repeat-x;
  cursor: default;
}

.work-visual { display: flex; justify-content: center; will-change: transform; }

/* --- Caloriyab phone: recreation of the app's green welcome screen --- */
.phone {
  width: min(230px, 60vw);
  aspect-ratio: 9 / 18.5;
  background: var(--phone-bezel);
  border-radius: 38px;
  padding: 10px;
  box-shadow: 0 30px 60px -25px rgba(14, 14, 16, 0.4);
  position: relative;
  transition: transform 0.5s var(--ease-out);
  transform: rotate(-3deg);
}
.work-card:hover .phone { transform: rotate(0deg) translateY(-6px); }
.phone::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 74px;
  height: 20px;
  background: var(--phone-bezel);
  border-radius: 999px;
  z-index: 2;
}
.phone-screen {
  height: 100%;
  border-radius: 29px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 40px 16px 16px;
}
.phone-cal .phone-screen {
  /* hero-coral gradient from the real app */
  background:
    radial-gradient(140% 80% at 85% -5%, rgba(255, 255, 255, 0.18), transparent 50%),
    radial-gradient(100% 120% at 0% 100%, rgba(160, 40, 20, 0.45), transparent 60%),
    linear-gradient(155deg, #3E9068 0%, #347B58 45%, #285E43 100%);
  color: #fff;
}
.cal-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}
.cal-icon {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  animation: float-y 3.2s ease-in-out infinite;
}
.cal-icon svg { width: 32px; height: 32px; }
.cal-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(255, 255, 255, 0.35);
  animation: pulse-ring 2s ease-out infinite;
}
.cal-title {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.cal-sub {
  font-size: 0.7rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.8);
  max-width: 176px;
}
.cal-btn {
  background: #fff;
  color: #285E43;
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
  padding: 11px 0;
  border-radius: 999px;
  box-shadow: 0 8px 32px -10px rgba(22, 32, 46, 0.35);
}

/* --- MediaTracker browser: recreation of the web app's UI --- */
.browser {
  width: min(460px, 100%);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 60px -25px rgba(14, 14, 16, 0.35);
  transition: transform 0.5s var(--ease-out);
  transform: rotate(2deg);
}
.work-card:hover .browser { transform: rotate(0deg) translateY(-6px); }
.browser-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
}
.browser-dots { display: flex; gap: 5px; }
.browser-dots i { width: 9px; height: 9px; border-radius: 50%; }
.browser-dots i:nth-child(1) { background: #ff5f57; }
.browser-dots i:nth-child(2) { background: #febc2e; }
.browser-dots i:nth-child(3) { background: #28c840; }
.browser-url {
  flex: 1;
  max-width: 220px;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  padding: 5px 12px;
}
.mt-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border-bottom: 1px solid #e2e8f0;
}
.mt-logo {
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: #6366f1;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15);
}
.mt-logo svg { width: 15px; height: 15px; }
.mt-name {
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: -0.01em;
  color: #0f172a;
}
.mt-seg {
  margin-left: auto;
  display: flex;
  gap: 2px;
  background: #e2e8f0;
  border-radius: 8px;
  padding: 2px;
  font-size: 0.55rem;
  font-weight: 700;
}
.mt-seg b, .mt-seg em {
  font-style: normal;
  padding: 3px 7px;
  border-radius: 6px;
  color: #64748b;
}
.mt-seg b { background: #fff; color: #0f172a; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1); }
.mt-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  padding: 14px;
}
.mt-card {
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 30px -16px rgba(15, 23, 42, 0.14);
}
.mt-poster {
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  background: linear-gradient(160deg, #eef2ff, #c7d2fe);
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}
.mt-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 55%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  animation: shimmer 2.8s ease-in-out infinite;
}
.mt-card:nth-child(2) .mt-poster::after { animation-delay: 0.5s; }
.mt-card:nth-child(3) .mt-poster::after { animation-delay: 1s; }
.mt-line {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  margin-bottom: 5px;
}
.mt-line.short { width: 60%; }
.mt-bar {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: #eef2ff;
  overflow: hidden;
  margin-top: 7px;
}
.mt-bar i {
  display: block;
  height: 100%;
  width: var(--w, 60%);
  border-radius: inherit;
  background: #6366f1;
  animation: bar-fill 4.2s var(--ease-out) infinite;
}
.mt-card:nth-child(2) .mt-bar i { animation-delay: 0.4s; }
.mt-card:nth-child(3) .mt-bar i { animation-delay: 0.8s; }

/* ---------- About ----------------------------------------------------------- */
.about-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.about-big {
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.015em;
  color: var(--muted);
  margin: 0;
}

/* ---------- Focus ----------------------------------------------------------- */
.focus-rows { border-top: 1px solid var(--line-dark); }
.focus-row {
  position: relative;
  display: grid;
  grid-template-columns: 90px 1.1fr 1fr;
  align-items: baseline;
  gap: 28px;
  padding: 38px 0;
  border-bottom: 1px solid var(--line-dark);
  transition: padding-left 0.4s var(--ease-out);
}
.focus-row:hover { padding-left: 18px; }
/* the row's bottom border draws itself on reveal */
.js .focus-row { border-bottom-color: transparent; }
.js .focus-row::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--line-dark);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease-out) 0.25s;
}
.js .focus-row.visible::after { transform: scaleX(1); }
.focus-num {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--soft);
}
.focus-row h3 {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
}
.focus-row p { color: var(--muted); margin: 0; }

/* ---------- Beyond business (mind) -------------------------------------------- */
.mind-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.mind-card {
  background: var(--card);
  border-radius: var(--r-card);
  padding: 38px 32px;
  transition: background 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.mind-card:hover { background: var(--card-hover); transform: translateY(-6px); }
.mind-card svg {
  width: 30px;
  height: 30px;
  color: var(--ink);
  margin-bottom: 20px;
  animation: float-y 4.5s ease-in-out infinite;
}
.mind-card:nth-child(2) svg { animation-delay: 0.8s; }
.mind-card:nth-child(3) svg { animation-delay: 1.6s; }
.mind-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.55em;
}
.mind-card p { color: var(--muted); font-size: 0.97rem; margin-bottom: 1.5em; }
.mind-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.mind-tags li {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: 6px 12px;
}

/* ---------- Photography preview (homepage) ------------------------------------- */
.photo-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 2.8rem;
}
.photo-note { margin-bottom: 0; max-width: 480px; }

.photo-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.photo-tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  overflow: hidden;
  background: var(--card);
}
.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s var(--ease-out);
}
.photo-tile:hover img { transform: scale(1.06); }
.photo-cap {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 44px 18px 16px;
  background: linear-gradient(transparent, rgba(14, 14, 16, 0.6));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.photo-tile:hover .photo-cap { opacity: 1; transform: none; }
.photo-date { color: rgba(255, 255, 255, 0.75); font-weight: 500; white-space: nowrap; }

/* ---------- Photo journal feed (photography.html) ------------------------------- */
.feed-hero { padding: calc(var(--nav-h) + 8vh) 0 20px; }

.feed-item {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  margin: 0;
}
.feed-item img {
  max-width: min(1000px, 92vw);
  max-height: 74vh;
  width: auto;
  height: auto;
  border-radius: 22px;
  box-shadow: 0 40px 80px -40px rgba(14, 14, 16, 0.45);
}
/* photos swell into place as they reveal */
.js .feed-item img {
  transform: scale(0.94);
  transition: transform 1.1s var(--ease-out);
}
.js .feed-item.visible img { transform: scale(1); }

.feed-caption {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.feed-num { font-weight: 800; font-size: 0.85rem; letter-spacing: 0.08em; color: var(--soft); }
.feed-title { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.feed-date { color: var(--muted); font-size: 0.85rem; font-weight: 500; }

.feed-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
  padding: 30px 0 130px;
}
.feed-end-mark { font-weight: 700; letter-spacing: 0.3em; margin: 0; }

/* ---------- Experience ------------------------------------------------------- */
.exp-rows { border-top: 1px solid var(--line-dark); margin-bottom: 3.4rem; }
.exp-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line-dark);
  transition: padding-left 0.4s var(--ease-out);
}
.exp-row:hover { padding-left: 14px; }
.exp-status {
  justify-self: start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.exp-status.now { background: var(--ink); color: var(--bg); }
.exp-status.past { border: 1px solid var(--line-dark); color: var(--muted); }
.exp-row h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.edu-card {
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--card);
  border-radius: var(--r-card);
  padding: 36px 38px;
  transition: background 0.35s var(--ease-out);
}
.edu-card:hover { background: var(--card-hover); }
.edu-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  flex-shrink: 0;
}
.edu-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.4em;
}
.edu-card p { color: var(--muted); margin-bottom: 1.1em; max-width: 580px; }

/* ---------- Philosophy ------------------------------------------------------- */
.philosophy { position: relative; overflow: hidden; padding: 150px 0; }
.philosophy blockquote { margin: 0; text-align: center; }
.philosophy blockquote p {
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
  max-width: 900px;
  margin: 0 auto 1.4em;
}
.philosophy blockquote footer {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--soft);
}

/* ---------- Collaborate ------------------------------------------------------ */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 3rem;
  max-width: 880px;
}
.tag-cloud li {
  font-size: 1rem;
  font-weight: 600;
  padding: 13px 24px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  animation: float-soft 5.5s ease-in-out infinite;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out);
}
.tag-cloud li:nth-child(2n) { animation-delay: 0.9s; }
.tag-cloud li:nth-child(3n) { animation-delay: 1.7s; }
.tag-cloud li:nth-child(4n) { animation-delay: 2.6s; }
.tag-cloud li:nth-child(5n) { animation-delay: 3.4s; }
.tag-cloud li:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.collab-note { color: var(--muted); max-width: 660px; margin: 0; }

/* ---------- Contact ----------------------------------------------------------- */
.contact { padding-bottom: 150px; overflow: hidden; }
.contact-title { margin-bottom: 0.7em; }

/* Giant outlined text drifting across the top of the contact section */
.talk-marquee {
  overflow: hidden;
  white-space: nowrap;
  margin-bottom: 60px;
}
.talk-track {
  display: inline-flex;
  will-change: transform;
  animation: talk-scroll 46s linear infinite;
}
.talk-track span {
  display: inline-block;
  font-weight: 800;
  font-size: clamp(2.8rem, 7.5vw, 5.4rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: transparent;
  -webkit-text-stroke: 1px var(--outline-stroke);
}
@supports not (-webkit-text-stroke: 1px black) {
  .talk-track span { color: var(--outline-fill); }
}
@keyframes talk-scroll {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* Rotating circular badge beside the contact heading */
.contact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.spin-badge {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.spin-badge .spin-text {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 18s linear infinite;
}
.spin-badge text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  fill: var(--muted);
}
.spin-badge .spin-arrow { width: 28px; height: 28px; color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

.contact-lines { border-top: 1px solid var(--line-dark); max-width: 820px; }
.contact-line {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 30px 0;
  border-bottom: 1px solid var(--line-dark);
}
.contact-label {
  width: 90px;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--soft);
}
.contact-value {
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.copy-btn { padding: 11px 20px; font-size: 0.88rem; }
.copy-btn.copied { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.social-row { display: flex; gap: 12px; }
.social-btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.social-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  transform: translateY(-4px);
}
.social-btn svg { width: 20px; height: 20px; }

.contact-topics {
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 660px;
  margin: 3rem 0 0;
}

/* ---------- Footer ------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-note { margin: 0; color: var(--muted); font-size: 0.92rem; }
.back-top { padding: 12px 22px; font-size: 0.88rem; }

/* ---------- Responsive ----------------------------------------------------------- */
@media (max-width: 960px) {
  .work-card { grid-template-columns: 1fr; padding: 40px 34px; gap: 36px; }
  .work-visual { order: -1; }
  .about-cols { grid-template-columns: 1fr; gap: 24px; }
  .focus-row { grid-template-columns: 56px 1fr; }
  .focus-row p { grid-column: 2; }
  .mind-grid { grid-template-columns: 1fr; }
  .spin-badge { display: none; }
}

@media (max-width: 640px) {
  :root { --nav-h: 72px; }
  .section { padding: 90px 0; }
  .philosophy { padding: 100px 0; }
  .nav-talk { padding: 12px 18px; font-size: 0.9rem; }
  .burger { width: 52px; height: 44px; }
  .hero { padding-top: calc(var(--nav-h) + 6vh); }
  .hero-title { margin-bottom: 3rem; }
  .hero-row { align-items: flex-start; flex-direction: column; }
  .marquee-group { font-size: 1.1rem; }
  .contact-line { gap: 14px; }
  .contact-label { width: 100%; }
  .footer-inner { justify-content: center; text-align: center; }
  .photo-preview { grid-template-columns: 1fr; }
  .feed-item { min-height: 76vh; padding: 28px 16px; }
  .feed-item img { max-height: 62vh; border-radius: 16px; }
  .exp-row { grid-template-columns: 1fr; gap: 12px; }
  .edu-card { flex-direction: column; align-items: flex-start; padding: 28px 24px; }
}

/* ---------- Manual motion kill-switch --------------------------------------------
   The owner wants ambient motion for everyone, so the OS reduced-motion setting is
   deliberately not honored. Appending ?motion=off to the URL (html.motion-off)
   stills the whole site. */
html.motion-off *,
html.motion-off *::before,
html.motion-off *::after {
  animation: none !important;
  transition: none !important;
}
/* the hero load-in relies on animation-fill forwards; pin its end state */
html.motion-off.js .anim { opacity: 1; transform: none; }
html.motion-off .caret { display: none; }
