/* ==========================================================================
   Hosein Dibaji — main stylesheet
   Layout concept: the site reads like one of his posts — crumpled white paper,
   near-black ink, one gold chess queen — then unrolls into a track record
   laid out like moves on a board.
   ========================================================================== */

/* All fonts are self-hosted so the site loads fully inside Iran. */
/* Abar Mid (Persian only): every Persian line on the site. Vazirmatn stays as the fallback for stray Latin letters. */
@font-face { font-family: "Abar"; font-weight: 400; font-display: swap; src: url("../fonts/Abar-Regular.woff2") format("woff2"); }
@font-face { font-family: "Abar"; font-weight: 600; font-display: swap; src: url("../fonts/Abar-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Abar"; font-weight: 700; font-display: swap; src: url("../fonts/Abar-Bold.woff2") format("woff2"); }
@font-face { font-family: "Abar"; font-weight: 800; font-display: swap; src: url("../fonts/Abar-ExtraBold.woff2") format("woff2"); }
@font-face { font-family: "Abar"; font-weight: 900; font-display: swap; src: url("../fonts/Abar-Black.woff2") format("woff2"); }
@font-face { font-family: "Vazirmatn"; font-weight: 400; font-display: swap; src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2"); }
@font-face { font-family: "Vazirmatn"; font-weight: 500; font-display: swap; src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2"); }
@font-face { font-family: "Vazirmatn"; font-weight: 700; font-display: swap; src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2"); }
@font-face { font-family: "Vazirmatn"; font-weight: 800; font-display: swap; src: url("../fonts/Vazirmatn-ExtraBold.woff2") format("woff2"); }
@font-face { font-family: "Vazirmatn"; font-weight: 900; font-display: swap; src: url("../fonts/Vazirmatn-Black.woff2") format("woff2"); }
@font-face { font-family: "Cormorant"; font-weight: 500 700; font-display: swap; src: url("../fonts/Cormorant.woff2") format("woff2"); }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 500 700; font-display: swap; src: url("../fonts/Cormorant-Italic.woff2") format("woff2"); }

:root {
  color-scheme: light;
  /* Color book from the posts: 70 paper / 25 ink / 5 gold */
  --paper: #F2F0EB;
  --paper-2: #FAF9F6;
  --ink: #151413;
  --ink-2: #24221F;
  --gold: #B48A45;
  --gold-ink: #8C6A2F;     /* gold dark enough for small text on paper */
  --gold-lt: #D9BC7C;      /* gold for text on ink */
  --champagne: #E6DDC9;    /* soft light text on ink */
  --slate: #57534D;
  --sand: #D2CABA;
  --line: #DDD8CE;
  --gold-grad: linear-gradient(118deg, #8C6A2F 0%, #E2C88E 40%, #A57D3C 66%, #D9BC7C 100%);
  --shadow: 0 1px 2px rgba(21,20,19,.05), 0 14px 34px -14px rgba(21,20,19,.22);

  --latin: "Cormorant", Georgia, serif;
  --fa: "Abar", "Vazirmatn", Tahoma, sans-serif;

  --ease: cubic-bezier(.2,.7,.1,1);
  --ease-io: cubic-bezier(.7,0,.2,1);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --max: 1240px;
  --header-h: 64px;

  /* crumpled paper relief, the background of every post */
  --paper-tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='700'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .009' numOctaves='4' seed='8' stitchTiles='stitch'/%3E%3CfeDiffuseLighting lighting-color='%23fff' surfaceScale='2.6'%3E%3CfeDistantLight azimuth='225' elevation='58'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)'/%3E%3C/svg%3E");
  --fibre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .28 0 0 0 0 .25 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background-color: var(--paper); background-image: var(--fibre); color: var(--ink);
  font-family: var(--fa); font-size: 17px; line-height: 1.9;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; line-height: 1.4; font-family: var(--fa); font-weight: 800; }
p { margin: 0; }
::selection { background: var(--gold-lt); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.stack { display: grid; gap: 14px; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.latin { font-family: var(--latin); }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }
.on-ink { background: var(--ink); color: var(--paper); }

/* ---------- Eyebrows & headings ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--slate); }
.eyebrow::before { content: "◆"; font-size: 9px; color: var(--gold); }
.eyebrow::after { content: ""; width: 28px; height: 1px; background: var(--gold); }
.on-ink .eyebrow { color: var(--champagne); }
.h-xl { font-weight: 900; font-size: clamp(32px, 5vw, 64px); line-height: 1.25; letter-spacing: -.01em; }
.h-lg { font-weight: 900; font-size: clamp(28px, 3.8vw, 48px); line-height: 1.35; }
.accent { color: var(--gold-ink); }
.on-ink .accent { color: var(--gold-lt); }
.lede { color: var(--slate); max-width: 60ch; font-size: clamp(16px, 1.4vw, 18px); }
.on-ink .lede { color: var(--champagne); }

/* word-split helper (Persian is split by words only, never letters) */
.w { display: inline-block; }
.mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.mask > .w { will-change: transform; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--paper);
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--bg); color: var(--fg); font-weight: 700; font-size: 15.5px; line-height: 1.2;
  overflow: hidden; isolation: isolate; transition: color .4s var(--ease);
}
.btn::before { /* gold rises from the bottom on hover */
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--gold-grad);
  transform: translateY(101%); border-radius: inherit; transition: transform .5s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover, .btn:focus-visible { color: var(--ink); }
.btn .arrow { width: 18px; height: 18px; flex: none; transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(-4px); }
.btn-ghost { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.magnetic { will-change: transform; }

/* ---------- Paper light: crumpled relief + a soft sheen ---------- */
.paper-light { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.paper-light::before { content: ""; position: absolute; inset: 0; background: var(--paper-tex); background-size: 700px; opacity: .32; mix-blend-mode: multiply; }
.paper-light::after { content: ""; position: absolute; inset: -20%; background: radial-gradient(50% 40% at 80% 12%, rgba(255,253,247,.9), transparent 70%), radial-gradient(40% 40% at 10% 90%, rgba(217,188,124,.12), transparent 70%); animation: sheen 16s var(--ease-io) infinite alternate; }
@keyframes sheen { from { transform: translate(-2%, 0); } to { transform: translate(3%, 2%); } }

/* ---------- Preloader ---------- */
.preloader { position: fixed; inset: 0; z-index: 90; background: var(--ink); color: var(--paper); display: grid; place-items: center; clip-path: inset(0 0 0 0); }
.preloader canvas { position: absolute; width: min(460px, 86vw); height: min(560px, 70vh); }
.preloader .count { position: relative; font-family: var(--latin); font-weight: 600; font-size: clamp(56px, 10vw, 120px); line-height: 1; font-variant-numeric: tabular-nums; direction: ltr; mix-blend-mode: difference; }
.preloader .tag { position: absolute; bottom: calc(32px + env(safe-area-inset-bottom, 0px)); font-size: 14px; color: var(--champagne); padding-inline: 16px; text-align: center; }
html:not(.js) .preloader, .reduced .preloader { display: none; }

/* ---------- Cursor ---------- */
.cursor { position: fixed; top: 0; left: 0; z-index: 80; pointer-events: none; display: none; }
.cursor .dot { position: absolute; top: 0; left: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px; }
.cursor .dot::before { content: ""; position: absolute; inset: 0; background: var(--gold); transform: rotate(45deg); }
.cursor .ring { top: 0; left: 0; }
.cursor .ring {
  position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  border: 1px solid rgba(21,20,19,.35); display: grid; place-items: center;
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s, border-color .35s;
  font-size: 12px; font-weight: 700; color: var(--ink);
}
.cursor .ring span { opacity: 0; transition: opacity .2s; }
.cursor.is-link .ring { width: 72px; height: 72px; margin: -36px 0 0 -36px; background: var(--gold-lt); border-color: var(--gold-lt); }
.cursor.is-link .ring span { opacity: 1; }
.cursor.on-dark .ring { border-color: rgba(242,240,235,.45); }
@media (hover: hover) and (pointer: fine) { .has-cursor .cursor { display: block; } }

/* ---------- Header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--paper); }
.header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(12px) saturate(1.1); -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid transparent; transition: border-color .3s, transform .45s var(--ease);
}
.header.scrolled { border-bottom-color: var(--line); }
.header.hide { transform: translateY(-100%); }
.header .wrap { height: var(--header-h); display: flex; align-items: center; gap: 20px; }
.wordmark { font-family: var(--latin); font-weight: 700; font-size: 20px; letter-spacing: .22em; text-decoration: none; direction: ltr; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.wordmark i { font-style: normal; font-size: 9px; color: var(--gold); letter-spacing: 0; }
.rail { flex: 1; min-width: 0; display: flex; justify-content: center; }
.rail ol { list-style: none; margin: 0; padding: 4px; display: flex; gap: 2px; border-radius: 999px; background: rgba(21,20,19,.05); overflow-x: auto; scrollbar-width: none; }
.rail ol::-webkit-scrollbar { display: none; }
.rail a { display: block; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--slate); white-space: nowrap; transition: background .35s var(--ease), color .35s; }
.rail a:hover { color: var(--ink); }
.rail a.active { background: var(--ink); color: var(--gold-lt); }
@media (max-width: 760px) {
  .header .wrap { gap: 10px; }
  .header .btn { display: none; }
  .wordmark { font-size: 16px; letter-spacing: .14em; }
  .rail { justify-content: flex-end; }
  .rail a { padding: 6px 10px; font-size: 13px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(30px, 5vw, 64px) clamp(56px, 8vw, 110px); }
.hero canvas.gq { position: absolute; z-index: 0; top: -2%; left: -4%; width: min(760px, 100vw); height: 108%; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 56px); align-items: end; }
.hero-name {
  grid-column: 1 / -1; font-family: var(--latin); font-weight: 600; direction: ltr; text-align: left;
  font-size: clamp(76px, 16vw, 236px); line-height: .82; letter-spacing: -.02em; margin-bottom: clamp(8px, 2vw, 20px);
}
.hero-name .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero-name .line > span { display: inline-block; }
.hero-name em { font-style: italic; font-weight: 500; padding-inline-end: .06em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy { display: grid; gap: 20px; align-content: start; }
.hero-copy h1 { font-weight: 900; font-size: clamp(30px, 4.2vw, 54px); line-height: 1.4; }
.hero-copy .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero-card {
  justify-self: start; width: min(100%, 420px); background: rgba(250,249,246,.86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 26px; padding: 22px; display: grid; gap: 18px; box-shadow: var(--shadow); position: relative;
}
.hero-card::after { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(180,138,69,.35); border-radius: 20px; pointer-events: none; }
.hero-card .who { display: flex; align-items: center; gap: 14px; }
.hero-card .avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 3px var(--paper-2), 0 0 0 4.5px var(--gold); }
.hero-card .who b { display: block; font-size: 16px; line-height: 1.6; }
.hero-card .who span { font-size: 15px; color: var(--slate); }
.hero-card .bio { font-weight: 700; font-size: 15px; line-height: 1.9; }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; border-top: 1px dashed var(--sand); padding-top: 16px; }
.hero-stats div { display: grid; gap: 2px; align-content: start; }
.hero-stats b { font-family: var(--latin); font-weight: 700; font-size: clamp(28px, 2.8vw, 36px); line-height: 1; direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }
.hero-stats span { font-size: 12.5px; color: var(--slate); line-height: 1.6; }
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--slate); text-decoration: none; margin-top: 8px; }
.scroll-cue i { width: 22px; height: 34px; border: 1.5px solid var(--slate); border-radius: 12px; position: relative; }
.scroll-cue i::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--gold); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1 } 70% { transform: translateY(10px); opacity: 0 } 100% { opacity: 0 } }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero canvas.gq { left: -34%; width: 120vw; opacity: .42; }
}

/* ---------- Marquee ---------- */
.marquee { background: var(--ink); color: var(--paper); overflow: hidden; padding-block: 22px; position: relative; direction: ltr; }
.marquee-track { display: flex; width: max-content; direction: ltr; }
.marquee-group { display: flex; align-items: center; flex: none; direction: rtl; }
.marquee-group span { font-weight: 900; font-size: clamp(22px, 3.2vw, 40px); white-space: nowrap; padding-inline: 28px; }
.marquee-group span.l { font-family: var(--latin); font-style: italic; font-weight: 600; color: var(--gold-lt); direction: ltr; font-size: clamp(26px, 3.8vw, 48px); }
.marquee-group i { font-style: normal; font-size: 12px; color: var(--gold); flex: none; }

/* ---------- Manifesto (ink-in) ---------- */
.manifesto { position: relative; padding-block: clamp(80px, 12vw, 170px); overflow: hidden; }
.manifesto .wrap { position: relative; z-index: 1; display: grid; gap: 26px; }
.manifesto p.big { font-weight: 900; font-size: clamp(28px, 4.4vw, 58px); line-height: 1.55; max-width: 22ch; }
.manifesto p.big .w { color: var(--ink); }
.js-motion .manifesto p.big .w { color: var(--sand); transition: color .25s linear; }
.js-motion .manifesto p.big .w.inked { color: var(--ink); }
.js-motion .manifesto p.big .w.inked.accent, .manifesto p.big .w.accent { color: var(--gold); }
.manifesto .sign { font-size: 15px; color: var(--slate); }
.manifesto .sign b { color: var(--ink); }
.manifesto .corner-q { position: absolute; width: 300px; height: 420px; left: -20px; bottom: -40px; opacity: .95; }

/* ---------- Timeline ---------- */
.journey { position: relative; padding-block: clamp(60px, 9vw, 120px) clamp(60px, 8vw, 110px); }
.journey-head { display: grid; gap: 16px; margin-bottom: clamp(40px, 6vw, 80px); }
.journey-title { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.brands-count { font-family: var(--latin); font-weight: 600; font-size: clamp(80px, 12vw, 160px); line-height: .85; direction: ltr; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.timeline { position: relative; }
.t-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--line); border-radius: 2px; }
.t-line .fill { position: absolute; inset: 0 0 auto; height: 100%; background: linear-gradient(var(--gold-lt), var(--gold-ink)); transform-origin: top; transform: scaleY(1); border-radius: 2px; box-shadow: 0 0 16px rgba(180,138,69,.5); }
.js-motion .t-line .fill { transform: scaleY(0); }
.t-list { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(48px, 7vw, 110px); }
.t-item { position: relative; display: grid; gap: 12px; padding-block: 10px; min-width: 0; align-self: start; }
.t-item:nth-child(odd) { grid-column: 1; justify-items: end; }
.t-item:nth-child(even) { grid-column: 2; margin-top: clamp(40px, 6vw, 90px); margin-bottom: calc(-1 * clamp(40px, 6vw, 90px)); }
.t-item::before { /* a small diamond on the line */
  content: ""; position: absolute; top: 40px; width: 12px; height: 12px; rotate: 45deg;
  background: var(--paper); border: 1.5px solid var(--sand); transition: border-color .4s, background .4s, box-shadow .4s;
}
.t-item:nth-child(odd)::before { inset-inline-end: calc(-1 * clamp(48px, 7vw, 110px) / 2 - 6px); }
.t-item:nth-child(even)::before { inset-inline-start: calc(-1 * clamp(48px, 7vw, 110px) / 2 - 6px); }
.t-item.reached::before { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 6px rgba(180,138,69,.18); }
.t-card {
  width: 100%; max-width: 480px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 22px;
  padding: 22px; display: grid; gap: 14px; align-content: start; text-align: right; box-shadow: var(--shadow);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.t-card .top { display: flex; align-items: center; gap: 14px; }
.t-card h3 { font-size: 21px; font-weight: 900; line-height: 1.5; }
.t-card .role { font-size: 14px; font-weight: 700; color: var(--gold-ink); display: block; }
.t-card .cat { font-size: 13px; color: var(--slate); }
.t-card p { color: var(--slate); font-size: 15.5px; line-height: 1.9; }
.t-card .rank { margin-inline-start: auto; align-self: start; font-family: var(--latin); font-size: 24px; line-height: 1; color: var(--sand); font-weight: 700; direction: ltr; }
.t-card .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 12.5px; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--gold); color: var(--gold-ink); font-weight: 500; }
.t-card.moment { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.t-card.moment p, .t-card.moment .cat { color: var(--champagne); }
.t-card.moment .role { color: var(--gold-lt); }
.t-card.moment .rank { color: var(--gold); }
.t-card.moment .chip { color: var(--gold-lt); border-color: rgba(217,188,124,.5); }
.moment-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--gold-lt); }
.moment-tag::before { content: ""; width: 8px; height: 8px; rotate: 45deg; background: var(--gold-lt); box-shadow: 0 0 0 4px rgba(217,188,124,.2); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(217,188,124,0); } }

/* logo tile: a real logo, or a gold monogram seal */
.logo-mark {
  --size: 58px; width: var(--size); height: var(--size); flex: none; border-radius: 16px; overflow: hidden;
  display: grid; place-items: center; background: var(--paper-2); border: 1px solid var(--line); position: relative;
}
.logo-mark img { width: 100%; height: 100%; object-fit: contain; padding: 7px; background: #fff; }
.logo-mark .mono {
  position: relative; z-index: 1; font-weight: 900; font-size: calc(var(--size) * .4); line-height: 1;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo-mark:not(.has-img)::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1px solid rgba(180,138,69,.55); box-shadow: inset 0 0 0 3px var(--paper-2), inset 0 0 0 4px rgba(180,138,69,.3); }
.t-card.moment .logo-mark { border-color: transparent; background: var(--ink-2); }
.t-card.moment .logo-mark:not(.has-img)::before { box-shadow: inset 0 0 0 3px var(--ink-2), inset 0 0 0 4px rgba(217,188,124,.3); }

@media (max-width: 820px) {
  .t-line { left: auto; right: 6px; margin-left: 0; }
  .t-list { grid-template-columns: 1fr; padding-right: 34px; }
  .t-item:nth-child(odd), .t-item:nth-child(even) { grid-column: 1; margin-top: 0; margin-bottom: 0; justify-items: stretch; }
  .t-item:nth-child(odd)::before, .t-item:nth-child(even)::before { inset-inline-start: auto; inset-inline-end: auto; left: auto; right: -34px; }
  .t-card { max-width: none; }
}

/* ---------- Academic: an ascending staircase of degrees ---------- */
.academic { position: relative; padding-block: clamp(60px, 9vw, 120px) 0; overflow: hidden; border-top: 1px solid var(--line); }
.academic .wrap { position: relative; z-index: 1; }
.brands-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(30px, 5vw, 60px); }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 0; }
.rung { position: relative; display: grid; gap: 6px; align-content: end; min-width: 0; }
.rung .r-body { display: grid; gap: 6px; padding: 0 22px 22px; }
.rung .r-year { font-family: var(--latin); font-weight: 600; font-size: clamp(48px, 5.6vw, 84px); line-height: .9; direction: ltr; text-align: right; font-variant-numeric: tabular-nums;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rung .r-level { font-size: 12.5px; font-weight: 700; color: var(--gold-ink); letter-spacing: .02em; }
.rung h3 { font-size: clamp(19px, 1.7vw, 23px); font-weight: 900; line-height: 1.5; }
.rung .r-place { font-size: 14.5px; color: var(--slate); font-weight: 500; }
.rung .r-note { font-size: 13.5px; color: var(--slate); line-height: 1.8; }
.rung .r-step { /* the stair under each degree, one step higher each time */
  position: relative; display: block; height: calc(70px + var(--i) * 64px); background: var(--paper-2);
  border-top: 1px solid var(--ink); border-inline-start: 1px solid var(--line); transform-origin: bottom;
  background-image: linear-gradient(rgba(180,138,69,.07), transparent 60%);
}
.rung:first-child .r-step { border-inline-start: 0; }
.rung.top .r-step { background: var(--ink); border-top-color: var(--gold); }
.rung.top .r-step::after { content: "PhD"; position: absolute; bottom: 16px; right: 22px; font-family: var(--latin); font-style: italic; font-size: 32px; color: var(--gold-lt); direction: ltr; }
.rung .r-num { position: absolute; bottom: 14px; left: 18px; font-family: var(--latin); font-size: 15px; color: var(--sand); direction: ltr; }
.rung.top .r-num { color: var(--gold); }
@media (max-width: 860px) {
  .academic { padding-bottom: clamp(50px, 9vw, 90px); }
  .ladder { grid-template-columns: 1fr; border-top: 1px solid var(--ink); }
  .rung { grid-template-columns: auto 1fr; align-items: start; gap: 0 18px; padding-block: 20px; border-bottom: 1px solid var(--line); }
  .rung .r-body { padding: 0; grid-column: 2; }
  .rung .r-step { grid-column: 1; grid-row: 1; width: 8px; height: calc(30px + var(--i) * 22px); border: 0; background: var(--sand); border-radius: 4px; align-self: end; }
  .rung.top .r-step { background: var(--gold-grad); }
  .rung.top .r-step::after, .rung .r-num { display: none; }
}

/* ---------- Highlights / stories ---------- */
.highlights { padding-block: clamp(60px, 9vw, 120px); position: relative; overflow: hidden; }
.highlights .wrap { position: relative; z-index: 1; }
.hl-head { display: grid; gap: 14px; margin-bottom: 40px; }
.hl-list { display: flex; gap: clamp(16px, 3vw, 34px); flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.hl-btn { background: none; border: 0; padding: 0; cursor: pointer; display: grid; justify-items: center; gap: 10px; width: 96px; text-align: center; font-size: 14px; line-height: 1.5; color: var(--paper); }
.hl-ring { position: relative; width: 92px; height: 92px; border-radius: 50%; padding: 3px; display: block;
  background: conic-gradient(from 200deg, #8C6A2F, #EAD7A4, #B48A45, #F4E6C2, #8C6A2F); transition: transform .5s var(--ease); }
.hl-ring img { width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--ink); object-fit: cover; }
.hl-btn:hover .hl-ring { transform: scale(1.07) rotate(-4deg); }
.hl-btn.seen .hl-ring { background: rgba(242,240,235,.25); }
.hl-hint { margin-top: 26px; font-size: 13.5px; color: var(--champagne); }

.story {
  position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
  background: rgba(12,11,10,.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.story[hidden] { display: none !important; }
.story-frame {
  position: relative; width: min(420px, 100%); aspect-ratio: 9 / 16; max-height: 100%; border-radius: 22px; overflow: hidden;
  background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.45); display: flex; flex-direction: column;
}
.story-bars { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 3; direction: ltr; }
.story-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(21,20,19,.16); overflow: hidden; }
.story-bars i b { display: block; height: 100%; width: 0; background: var(--gold); }
.story-top { position: absolute; top: 24px; left: 14px; right: 14px; display: flex; align-items: center; gap: 10px; z-index: 3; }
.story-top img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.story-top b { font-size: 14px; }
.story-top .close { margin-inline-start: auto; background: none; border: 0; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.story-top .close:hover { background: rgba(21,20,19,.08); }
.story-slide { position: relative; flex: 1; display: grid; align-content: center; gap: 16px; padding: 86px 26px 40px; overflow: hidden; text-align: center; justify-items: center; }
.story-slide .paper-light { z-index: 0; }
.story-slide > *:not(.paper-light) { position: relative; z-index: 1; }
.story-slide .s-head { display: grid; justify-items: center; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid var(--sand); width: 80%; }
.story-slide .s-head img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; }
.story-slide .s-head b { font-size: 14px; margin-top: 6px; }
.story-slide .s-head small { font-size: 11px; color: var(--slate); }
.story-slide h4 { font-size: clamp(22px, 6vw, 28px); font-weight: 900; line-height: 1.6; }
.story-slide p { color: var(--slate); font-size: 15.5px; }
.story-slide .eyebrow::after { display: none; }
.story-slide .big-num { font-family: var(--latin); font-weight: 700; font-size: clamp(80px, 24vw, 120px); line-height: .9; direction: ltr; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.story-slide ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.story-slide li { font-size: 17px; font-weight: 700; }
.story-slide .s-queen { width: 18px; height: 29px; fill: url(#gold); }
.story-nav { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; z-index: 2; }
.story-nav button { background: none; border: 0; cursor: pointer; }
.story-slide a, .story-slide .btn { position: relative; z-index: 4; }
.story-arrows { direction: ltr; position: absolute; top: 50%; left: -64px; right: -64px; display: flex; justify-content: space-between; pointer-events: none; transform: translateY(-50%); }
.story-arrows button { pointer-events: auto; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(242,240,235,.14); color: var(--paper); cursor: pointer; display: grid; place-items: center; }
.story-arrows button:hover { background: var(--gold-lt); color: var(--ink); }
@media (max-width: 560px) { .story-arrows { display: none; } }

/* ---------- Principles (horizontal pinned) ---------- */
.method { position: relative; padding-block: clamp(60px, 9vw, 120px); overflow: hidden; }
.method-head { display: grid; gap: 14px; margin-bottom: 40px; }
.method-track { display: flex; gap: 16px; width: max-content; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.step {
  width: min(380px, 78vw); flex: none; background: var(--paper-2); border: 1px solid var(--line); border-radius: 26px;
  padding: 28px; display: grid; gap: 14px; align-content: start; min-height: 330px; position: relative; overflow: hidden;
}
.step .n { font-family: var(--latin); font-weight: 600; font-size: 96px; line-height: .8; color: transparent; -webkit-text-stroke: 1px var(--gold); direction: ltr; text-align: left; }
.step h3 { font-size: 23px; font-weight: 900; }
.step p { color: var(--slate); font-size: 15.5px; }
.step.dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.step.dark p { color: var(--champagne); }
.step.dark .n { color: var(--gold-lt); -webkit-text-stroke: 0; }
.method-scroller { overflow-x: auto; scrollbar-width: none; }
.method-scroller::-webkit-scrollbar { display: none; }
.js-pin .method-scroller { overflow: visible; }

/* ---------- Notes (posts) ---------- */
.notes { padding-block: clamp(60px, 9vw, 120px); }
.notes-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.notes-rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 18px; cursor: grab; scrollbar-width: thin; scrollbar-color: var(--sand) transparent; }
.notes-rail.dragging { cursor: grabbing; scroll-snap-type: none; }
.note { flex: none; width: min(300px, 72vw); scroll-snap-align: start; text-decoration: none; display: grid; gap: 12px; align-content: start; }
.note .img { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--paper-2); border: 1px solid var(--line); }
.note img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); user-select: none; -webkit-user-drag: none; }
.note:hover img { transform: scale(1.05); }
.note .badge { position: absolute; top: 10px; right: 10px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: var(--gold-lt); }
.note p { font-size: 15px; font-weight: 700; line-height: 1.8; }

/* ---------- Numbers ---------- */
.numbers { padding-block: clamp(60px, 9vw, 120px); position: relative; overflow: hidden; }
.numbers .wrap { position: relative; z-index: 1; }
.numbers h2 { margin-top: 12px; }
.num-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-top: 40px; border-top: 1px solid rgba(242,240,235,.16); }
.num { padding: 26px 18px 10px 0; border-inline-start: 1px solid rgba(242,240,235,.16); display: grid; gap: 8px; align-content: start; }
.num:first-child { border-inline-start: 0; }
.num b { font-family: var(--latin); font-weight: 600; font-size: clamp(44px, 5.4vw, 74px); line-height: 1; direction: ltr; text-align: right; font-variant-numeric: tabular-nums; color: var(--gold-lt); }
.num span { font-size: 14px; color: var(--champagne); }
.numbers canvas.gq { position: absolute; left: -6%; top: -10%; width: 560px; max-width: 70%; height: 120%; opacity: .55; }
@media (max-width: 900px) { .num-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .num { border-inline-start: 0; border-top: 1px solid rgba(242,240,235,.16); padding-inline: 0; } .numbers canvas.gq { max-width: 100%; opacity: .35; } }

/* ---------- Contact ---------- */
.contact { position: relative; padding-block: clamp(70px, 10vw, 140px); overflow: hidden; }
.contact .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.contact h2 { font-weight: 900; font-size: clamp(36px, 6vw, 80px); line-height: 1.3; margin-top: 14px; }
.contact .lede { margin-top: 18px; }
.contact .links { display: grid; gap: 10px; margin-top: 28px; }
.contact .links a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 700; font-size: 17px; transition: padding .4s var(--ease), color .3s; }
.contact .links a:hover { padding-inline: 10px; color: var(--gold-ink); }
.contact .links small { font-family: var(--latin); font-weight: 600; color: var(--slate); font-size: 17px; direction: ltr; }
form.brief { background: var(--paper-2); border: 1px solid var(--line); border-radius: 26px; padding: clamp(20px, 3vw, 32px); display: grid; gap: 16px; box-shadow: var(--shadow); position: relative; }
form.brief::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(180,138,69,.35); border-radius: 20px; pointer-events: none; }
form.brief > * { position: relative; z-index: 1; }
.field { display: grid; gap: 6px; }
.field label, .field-label { font-size: 14px; font-weight: 700; }
.field input, .field textarea {
  font: inherit; font-size: 15.5px; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; width: 100%;
  transition: border-color .3s, box-shadow .3s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(180,138,69,.18); }
.field .err { font-size: 13px; color: #9A3B2B; min-height: 1em; line-height: 1.4; }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label { cursor: pointer; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 14px; font-weight: 500; transition: all .3s var(--ease); }
.choice input:checked + label { background: var(--ink); color: var(--gold-lt); border-color: var(--ink); }
.choice input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: 2px; }
.form-done { display: grid; gap: 12px; text-align: center; justify-items: center; padding-block: 20px; }
.form-done svg { width: 34px; height: 54px; fill: url(#gold); }
.form-done h3 { font-size: 24px; font-weight: 900; }
.form-done textarea { width: 100%; font: inherit; font-size: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-height: 120px; color: var(--ink); }
.form-done .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 900px) { .contact .wrap { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { padding-block: 60px calc(30px + env(safe-area-inset-bottom, 0px)); overflow: hidden; }
.footer .big { font-family: var(--latin); font-weight: 600; font-size: clamp(64px, 17vw, 240px); line-height: .85; direction: ltr; text-align: left; letter-spacing: .02em;
  color: transparent; -webkit-text-stroke: 1px rgba(217,188,124,.5); display: flex; align-items: center; gap: .1em; }
.footer .big i { font-style: normal; font-size: .18em; color: var(--gold-lt); -webkit-text-stroke: 0; }
.footer .row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 30px; font-size: 14px; color: var(--champagne); }
.footer .row a { color: var(--paper); text-decoration: none; }
.footer .row a:hover { color: var(--gold-lt); }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Toast ---------- */
.toast { position: fixed; z-index: 99; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 220%); visibility: hidden; background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 500; transition: transform .5s var(--ease), visibility 0s .5s; box-shadow: var(--shadow); }
.toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform .5s var(--ease); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
