/* ============================================
   Nguyen Xuan An — E-Portfolio v2
   Editorial system inspired by Coffee Ground Zero
   ============================================ */

:root {
  /* Brand palette */
  --gold: #FFDE3D;
  --red: #ED3237;
  --coffee-red: #B02822;
  --espresso: #56271A;
  --leaf-green: #47593B;
  --deep-teal: #215561;
  --cream: #E3D6C9;
  --beige: #BFB6A8;
  --near-black: #1F2221;

  /* Type */
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;

  /* Scale */
  --fs-base: 1rem;
  --fs-display: clamp(3.5rem, 11vw, 9.5rem);
  --fs-mega: clamp(4.5rem, 16vw, 15rem);
  --fs-2xl: clamp(2.5rem, 6vw, 4.75rem);

  /* Layout */
  --page-pad: clamp(1.25rem, 4vw, 3rem);
  --radius-pill: 999px;
  --radius-lg: 20px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

* { box-sizing: border-box; }
*::selection { background: var(--red); color: var(--gold); }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  color: var(--near-black);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none;
}
@media (hover: none), (pointer: coarse) { body { cursor: auto; } }
body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
}

.u-red { color: var(--red); }

/* ========== SCROLL PROGRESS ========== */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  z-index: 200;
  pointer-events: none;
}
.progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--red), var(--gold));
  transition: width 0.08s linear;
}

/* ========== CUSTOM CURSOR ========== */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--red);
  pointer-events: none;
  z-index: 300;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.18s var(--ease-out), background 0.2s, width 0.2s, height 0.2s;
  mix-blend-mode: multiply;
}
.cursor.is-hover {
  width: 58px; height: 58px;
  background: var(--gold);
  mix-blend-mode: normal;
  border: 1px solid var(--near-black);
}
.cursor.is-dark {
  background: var(--gold);
  mix-blend-mode: screen;
}
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ========== NAV ========== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--page-pad);
  background: rgba(227, 214, 201, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(31, 34, 33, 0.08);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.nav.is-dark {
  background: rgba(31, 34, 33, 0.9);
  color: var(--cream);
  border-bottom-color: rgba(227, 214, 201, 0.15);
}
.nav.is-dark .nav__name,
.nav.is-dark .nav__links a { color: var(--cream); }
.nav.is-dark .nav__links a.is-active { color: var(--gold); }
.nav.is-dark .btn--pill { background: var(--gold); color: var(--near-black); }

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-serif);
  font-weight: 600;
}
.nav__mark {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  background: var(--red);
  color: var(--gold);
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-sans);
  transition: transform 0.4s var(--ease-out);
}
.nav__logo:hover .nav__mark { transform: rotate(-20deg) scale(1.08); }
.nav__name { font-size: 0.95rem; letter-spacing: -0.01em; }

.nav__links {
  display: flex;
  gap: clamp(1rem, 2.2vw, 2rem);
  font-size: 0.88rem;
  font-weight: 500;
}
.nav__links a {
  position: relative;
  padding: 0.25rem 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}
.nav__num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.7rem;
  color: var(--red);
  opacity: 0.8;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--red);
  transition: right 0.35s var(--ease-out);
}
.nav__links a.is-active {
  color: var(--coffee-red);
}
.nav__links a.is-active::after,
.nav__links a:hover::after { right: 0; }
@media (max-width: 860px) { .nav__links { display: none; } }

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(31, 34, 33, 0.12);
  border-radius: 50%;
  background: rgba(227, 214, 201, 0.88);
  color: var(--near-black);
  font: inherit;
  cursor: none;
  transition: transform 0.3s var(--ease-out), background 0.25s, color 0.25s;
}
.nav__toggle:hover { transform: translateY(-2px); }
.nav__toggle .nav__toggle-lines {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.nav__toggle .nav__toggle-lines::before,
.nav__toggle .nav__toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease-out), top 0.3s var(--ease-out), bottom 0.3s var(--ease-out), opacity 0.2s;
}
.nav__toggle .nav__toggle-lines::before { top: -6px; }
.nav__toggle .nav__toggle-lines::after { bottom: -6px; }
.nav__toggle.is-open .nav__toggle-lines { background: transparent; }
.nav__toggle.is-open .nav__toggle-lines::before { top: 0; transform: rotate(45deg); }
.nav__toggle.is-open .nav__toggle-lines::after { bottom: 0; transform: rotate(-45deg); }

.nav__sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 34, 33, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 140;
}
.nav__sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.nav__sheet {
  position: fixed;
  top: 0;
  right: 0;
  width: min(92vw, 420px);
  height: 100dvh;
  padding: 6rem 1.5rem 2rem;
  background: var(--near-black);
  color: var(--cream);
  transform: translateX(100%);
  transition: transform 0.32s var(--ease-out);
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.22);
}
.nav__sheet.is-open { transform: translateX(0); }
.nav__sheet-links {
  display: grid;
  gap: 0.35rem;
}
.nav__sheet-links a,
.nav__sheet-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(227, 214, 201, 0.12);
  color: inherit;
}
.nav__sheet-links a {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  line-height: 1.1;
}
.nav__sheet-links small {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--beige);
}
.nav__sheet-cta {
  margin-top: auto;
  border: 1px solid rgba(227, 214, 201, 0.16);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  background: rgba(227, 214, 201, 0.06);
  font-weight: 600;
}
.nav__sheet-copy {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--beige);
}

@media (max-width: 860px) {
  .nav { gap: 1rem; }
  .nav .btn--pill { display: none; }
  .nav__toggle { display: inline-flex; }
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: none;
  transition: transform 0.3s var(--ease-out), background 0.25s, color 0.25s, border-color 0.25s;
  position: relative;
  overflow: hidden;
}
.btn:hover { transform: translateY(-3px); }
.btn__arrow { transition: transform 0.3s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--pill { background: var(--near-black); color: var(--cream); }
.btn--pill:hover { background: var(--red); color: var(--gold); }
.btn--primary { background: var(--red); color: var(--gold); }
.btn--primary:hover { background: var(--coffee-red); }
.btn--ghost { background: transparent; border-color: var(--near-black); color: var(--near-black); }
.btn--ghost:hover { background: var(--near-black); color: var(--gold); }
.btn--sm { padding: 0.65rem 1.1rem; font-size: 0.82rem; }
.btn--lg { padding: 1.15rem 1.9rem; font-size: 1rem; }

/* ========== EYEBROW ========== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 2.4s ease-in-out infinite;
}
.dot--dark { background: var(--near-black); }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  margin-right: 0.5rem;
  animation: pulse 2s ease-in-out infinite;
  vertical-align: middle;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 7rem var(--page-pad) 6rem;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.9;
  z-index: 0;
}
.hero__media-inner {
  position: absolute;
  inset: -5%;
  background:
    radial-gradient(700px 500px at 82% 18%, rgba(237, 50, 55, 0.22), transparent 62%),
    radial-gradient(900px 600px at 10% 88%, rgba(255, 222, 61, 0.55), transparent 55%),
    radial-gradient(500px 400px at 50% 50%, rgba(86, 39, 26, 0.08), transparent 70%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream) 100%);
  animation: drift 22s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes drift {
  from { transform: translate3d(-1.5%, -1.5%, 0) scale(1.02); }
  to { transform: translate3d(1.5%, 1%, 0) scale(1.05); }
}
.hero__media-grain {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: radial-gradient(var(--near-black) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: multiply;
}

.hero__dateline {
  position: absolute;
  top: 5.5rem;
  left: var(--page-pad);
  right: var(--page-pad);
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--espresso);
  z-index: 2;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(31, 34, 33, 0.2);
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 1500px;
  margin-top: auto;
  width: 100%;
}

.hero__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--fs-display);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0 0 2.5rem;
  color: var(--near-black);
}
.hero__title .line {
  display: block;
  overflow: hidden;
}
.hero__title em { color: var(--espresso); }

.hero__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.5rem 2rem;
  padding: 1.75rem 0;
  border-top: 1px solid rgba(31, 34, 33, 0.2);
  border-bottom: 1px solid rgba(31, 34, 33, 0.2);
  margin-bottom: 2rem;
}
.label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--espresso);
  margin: 0 0 0.35rem;
  font-weight: 600;
}
.value {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin: 0;
  font-weight: 500;
}

.hero__cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero__collab {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(31, 34, 33, 0.25);
}
.hero__collab-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--espresso);
  font-weight: 600;
}
.hero__collab-list {
  list-style: none;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 0; margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--espresso);
  font-size: 1.05rem;
}
.hero__collab-list li {
  transition: color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.hero__collab-list li:hover { color: var(--red); transform: translateY(-2px); }

.hero__scroll {
  position: absolute;
  right: var(--page-pad);
  bottom: 5.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--espresso);
  z-index: 3;
}
.hero__line {
  width: 1px; height: 64px;
  background: var(--near-black);
  animation: drop 2.2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes drop {
  0%, 100% { transform: scaleY(0.3); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

.hero__ticker {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  overflow: hidden;
  border-top: 1px solid rgba(31, 34, 33, 0.2);
  border-bottom: 1px solid rgba(31, 34, 33, 0.2);
  background: var(--gold);
  padding: 0.8rem 0;
  z-index: 2;
}

.hero--page {
  min-height: auto;
  padding-bottom: 4.5rem;
}
.hero--page .hero__inner {
  display: grid;
  gap: 2rem;
  max-width: 1200px;
}
.hero__lede {
  max-width: 40ch;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.38;
  color: var(--espresso);
}
.hero__support {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(31, 34, 33, 0.18);
}
.hero__support-card {
  display: grid;
  gap: 0.3rem;
}
.hero__support-card strong {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
}
.hero__support-card span {
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--espresso);
  font-weight: 600;
}
.ticker {
  display: inline-flex;
  gap: 2.25rem;
  align-items: center;
  white-space: nowrap;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  animation: marquee 32s linear infinite;
}
.ticker__dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--near-black);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ========== SECTIONS ========== */
.section {
  padding: clamp(4rem, 10vw, 9rem) var(--page-pad);
  position: relative;
}
.section--cream { background: var(--cream); }
.section--beige { background: var(--beige); }
.section--dark { background: var(--near-black); color: var(--cream); }
.section--gold { background: var(--gold); }

.section__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1rem, 4vw, 3rem);
  align-items: end;
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(31, 34, 33, 0.2);
}
.section__head--light { border-bottom-color: rgba(227, 214, 201, 0.18); }
.num {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  color: var(--red);
  line-height: 1;
}
.num--gold { color: var(--gold); }
.section__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--fs-2xl);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0;
}
.section__title em { color: var(--red); }
.section--dark .section__title em { color: var(--gold); }

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}
.page-grid--equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.page-stack {
  display: grid;
  gap: 1.2rem;
}
.page-stack p {
  margin: 0;
  line-height: 1.7;
}
.page-lead {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.38;
  color: var(--espresso);
}
.page-panel {
  padding: 1.5rem;
  background: rgba(31, 34, 33, 0.05);
  border: 1px solid rgba(31, 34, 33, 0.12);
  border-radius: var(--radius-lg);
}
.section--dark .page-panel {
  background: rgba(227, 214, 201, 0.05);
  border-color: rgba(227, 214, 201, 0.12);
}
.page-panel h3,
.page-card h3,
.story h3,
.resume__section h3 {
  margin: 0 0 0.9rem;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.page-panel p:last-child { margin-bottom: 0; }
.page-list,
.page-meta,
.page-links,
.resume__list,
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.page-list {
  display: grid;
  gap: 0.8rem;
}
.page-list li,
.resume__list li {
  padding-left: 1rem;
  position: relative;
}
.page-list li::before,
.resume__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}
.page-links {
  display: grid;
  gap: 0.75rem;
}
.page-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(31, 34, 33, 0.14);
  font-family: var(--font-serif);
  font-size: 1.2rem;
}

.page-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.page-card {
  display: grid;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--cream);
  border: 1px solid rgba(31, 34, 33, 0.12);
  border-radius: var(--radius-lg);
}
.page-card span {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--espresso);
  font-weight: 600;
}
.page-card p { margin: 0; }

.case {
  display: grid;
  gap: 2rem;
}
.case__meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(31, 34, 33, 0.16);
}
.case__meta strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--espresso);
}
.case__meta span {
  font-family: var(--font-serif);
  font-size: 1.05rem;
}
.case__results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.kpi {
  padding: 1.3rem;
  border-radius: 18px;
  background: rgba(31, 34, 33, 0.05);
}
.section--dark .kpi {
  background: rgba(227, 214, 201, 0.06);
}
.kpi strong {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1;
  color: var(--coffee-red);
}
.section--dark .kpi strong { color: var(--gold); }
.kpi span {
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--espresso);
}
.section--dark .kpi span { color: var(--beige); }

.story-grid {
  display: grid;
  gap: 1.25rem;
}
.story {
  padding: clamp(1.35rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
  background: var(--cream);
  border: 1px solid rgba(31, 34, 33, 0.12);
}
.story__eyebrow {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--espresso);
  font-weight: 600;
}
.story__quote {
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid rgba(31, 34, 33, 0.12);
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--coffee-red);
}

.timeline {
  display: grid;
  gap: 1.25rem;
}
.timeline__item {
  padding: 1.2rem 0 0;
  border-top: 1px solid rgba(31, 34, 33, 0.14);
}
.timeline__item:first-child { padding-top: 0; border-top: none; }
.timeline__item strong {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--font-serif);
  font-size: 1.18rem;
}
.timeline__item span {
  display: inline-block;
  margin-bottom: 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--espresso);
  font-weight: 600;
}

.resume {
  display: grid;
  gap: 1.5rem;
}
.resume__section {
  padding: 1.5rem;
  background: rgba(227, 214, 201, 0.58);
  border: 1px solid rgba(31, 34, 33, 0.12);
  border-radius: var(--radius-lg);
}
.resume__section p { margin: 0 0 1rem; }
.resume__section p:last-child { margin-bottom: 0; }

.cta-panel {
  display: grid;
  gap: 1rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 24px;
  background: var(--near-black);
  color: var(--cream);
}
.cta-panel h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.06;
  color: var(--gold);
}
.cta-panel p {
  margin: 0;
  max-width: 44ch;
  color: var(--beige);
}
.cta-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 2rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
}
.backlink:hover { color: var(--coffee-red); }

/* ========== ABOUT ========== */
.about {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  max-width: 1400px;
}
.about__lead p {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.01em;
}
.about__lead strong {
  font-weight: 600;
  color: var(--coffee-red);
  font-style: italic;
}
.about__body p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--espresso);
  max-width: 42ch;
  margin: 0 0 2rem;
}
.about__facts {
  list-style: none;
  padding: 1.5rem 0 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  border-top: 1px solid rgba(86, 39, 26, 0.25);
}
.about__facts li { display: flex; flex-direction: column; gap: 0.25rem; }
@media (max-width: 840px) { .about { grid-template-columns: 1fr; } }

/* ========== WORK ========== */
.work {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.project {
  background: var(--project-bg, var(--espresso));
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.project:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px -20px rgba(31, 34, 33, 0.3);
}
.project__inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--cream);
}
.project__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.project__tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  opacity: 0.9;
}
.project__arrow {
  display: inline-grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--near-black);
  font-size: 1.15rem;
  transition: transform 0.4s var(--ease-out);
}
.project:hover .project__arrow { transform: rotate(45deg) scale(1.08); }
.project__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 1.5rem 0 0.75rem;
  color: var(--gold);
}
.project__desc {
  font-size: 0.98rem;
  line-height: 1.55;
  margin: 0 0 1.5rem;
  max-width: 38ch;
  opacity: 0.95;
}
.project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.project__tags span {
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(227, 214, 201, 0.4);
  border-radius: var(--radius-pill);
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.work__more {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 2.5rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--near-black);
  transition: gap 0.3s var(--ease-out);
}
.work__more:hover { gap: 1.1rem; color: var(--coffee-red); }
@media (max-width: 720px) {
  .work { grid-template-columns: 1fr; }
  .project { aspect-ratio: auto; min-height: 380px; }
}

/* ========== WHEEL (circular process) ========== */
.wheel {
  display: grid;
  place-items: center;
  margin: 0 auto 5rem;
  max-width: 1100px;
}
.wheel__stage {
  position: relative;
  width: min(100%, 720px);
  aspect-ratio: 1;
}
.wheel__ring {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1px solid rgba(227, 214, 201, 0.22);
}
.wheel__dashed {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 1px dashed rgba(255, 222, 61, 0.35);
  animation: spin 60s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.wheel__core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 34%;
  aspect-ratio: 1;
  background: var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  box-shadow: 0 20px 60px -10px rgba(237, 50, 55, 0.35);
}
.wheel__core-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--near-black);
  margin: 0 0 0.35rem;
  font-weight: 600;
  grid-row: 1;
}
.wheel__core-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.25rem, 3vw, 2rem);
  line-height: 1;
  color: var(--near-black);
  margin: 0;
  letter-spacing: -0.02em;
}

.wheel__node {
  position: absolute;
  width: 30%;
  min-width: 160px;
  padding: 1.1rem 1.25rem;
  background: var(--cream);
  color: var(--near-black);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 34px -10px rgba(0,0,0,0.5);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.wheel__node:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 24px 50px -10px rgba(237, 50, 55, 0.45);
}
.wheel__num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--red);
  display: block;
  margin-bottom: 0.25rem;
}
.wheel__node h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  letter-spacing: -0.01em;
}
.wheel__node p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--espresso);
  margin: 0;
}

.wheel__node--1 { top: -2%; left: 50%; transform: translateX(-50%); }
.wheel__node--2 { top: 50%; right: -2%; transform: translateY(-50%); }
.wheel__node--3 { bottom: -2%; left: 50%; transform: translateX(-50%); }
.wheel__node--4 { top: 50%; left: -2%; transform: translateY(-50%); }

.wheel__node--1:hover { transform: translate(-50%, -8px) scale(1.03); }
.wheel__node--2:hover { transform: translate(0, calc(-50% - 6px)) scale(1.03); }
.wheel__node--3:hover { transform: translate(-50%, -8px) scale(1.03); }
.wheel__node--4:hover { transform: translate(0, calc(-50% - 6px)) scale(1.03); }

@media (max-width: 720px) {
  .wheel__stage { aspect-ratio: auto; }
  .wheel__ring, .wheel__dashed, .wheel__core { display: none; }
  .wheel__node {
    position: relative;
    top: auto !important; left: auto !important; right: auto !important; bottom: auto !important;
    transform: none !important;
    width: 100%;
    margin-bottom: 0.75rem;
  }
  .wheel__node:hover { transform: translateY(-4px) !important; }
}

.quote {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.quote blockquote { margin: 0 0 1rem; }
.quote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.3;
  margin: 0;
  color: var(--gold);
}
.quote p::before { content: "“"; margin-right: 0.1em; }
.quote p::after { content: "”"; margin-left: 0.1em; }
.quote figcaption {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--beige);
}

/* ========== NOTES HUB ========== */
.notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.note {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 2rem 1.75rem;
  background: var(--beige);
  border-radius: var(--radius-lg);
  color: var(--near-black);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), background 0.4s;
  min-height: 260px;
}
.note::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--note-accent, var(--red));
}
.note:hover {
  background: var(--near-black);
  color: var(--cream);
  transform: translateY(-6px);
}
.note:hover .note__date { color: var(--gold); }
.note__date {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: var(--espresso);
  transition: color 0.3s;
}
.note h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
}
.note p {
  font-size: 0.95rem;
  line-height: 1.55;
  opacity: 0.85;
  margin: 0 0 auto;
}
.note__cta {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  margin-top: auto;
  align-self: flex-start;
}
@media (max-width: 900px) { .notes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .notes { grid-template-columns: 1fr; } }

/* ========== DIRECTORY ========== */
.directory {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.directory__intro {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1.35;
  margin: 0 0 2rem;
  max-width: 44ch;
}
.directory__select {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
}
.directory__select label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: var(--espresso);
  margin-bottom: 0.4rem;
}
.select {
  position: relative;
  flex: 1;
  min-width: 260px;
}
.select select {
  appearance: none;
  width: 100%;
  padding: 0.95rem 2.5rem 0.95rem 1.2rem;
  background: var(--cream);
  border: 1px solid var(--near-black);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--near-black);
  cursor: none;
}
.select__arrow {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.directory__list {
  list-style: none;
  padding: 0; margin: 0;
  border-top: 1px solid rgba(31, 34, 33, 0.25);
}
.directory__list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.1rem 0;
  border-bottom: 1px solid rgba(31, 34, 33, 0.25);
  transition: padding 0.3s var(--ease-out), background 0.3s;
}
.directory__list li:hover {
  padding-left: 0.75rem;
  background: rgba(31, 34, 33, 0.05);
}
.directory__k {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--red);
  font-size: 1.15rem;
}
.directory__v {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.directory__t {
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--espresso);
}
@media (max-width: 900px) { .directory { grid-template-columns: 1fr; } }

/* ========== CONTACT ========== */
.contact { max-width: 1300px; }
.contact__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.5rem, 7vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0 0 2.5rem;
  color: var(--near-black);
}
.contact__title em { color: var(--espresso); }
.contact__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}
.contact__socials {
  list-style: none;
  padding: 2rem 0 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  border-top: 1px solid rgba(31, 34, 33, 0.3);
  font-weight: 600;
  font-size: 0.95rem;
}
.contact__socials a { transition: color 0.25s; }
.contact__socials a:hover { color: var(--red); }

/* ========== FOOTER ========== */
.footer {
  background: var(--near-black);
  color: var(--cream);
  padding: 4rem var(--page-pad) 2rem;
  overflow: hidden;
}
.footer__big {
  font-family: var(--font-serif);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(2.75rem, 10vw, 8rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--gold);
  margin-bottom: 2rem;
  white-space: normal;
  display: block;
  max-width: 12ch;
  text-wrap: balance;
}
.footer__sep { color: var(--red); }
.footer__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid rgba(227, 214, 201, 0.18);
  font-size: 0.82rem;
  color: var(--beige);
}
.footer__row p { margin: 0; }

/* ========== REVEAL ANIM ========== */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Line reveal for hero title */
.js .hero__title .line {
  display: block;
  transform: translateY(110%);
  transition: transform 1s var(--ease-out);
}
.js .hero__title.is-visible .line { transform: translateY(0); }
.js .hero__title .line:nth-child(1) { transition-delay: 0.1s; }
.js .hero__title .line:nth-child(2) { transition-delay: 0.25s; }
.js .hero__title .line:nth-child(3) { transition-delay: 0.4s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal], .hero__title .line { opacity: 1 !important; transform: none !important; }
}

@media (max-width: 960px) {
  .page-grid,
  .page-grid--equal,
  .case__results,
  .case__meta,
  .page-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hero {
    min-height: auto;
    justify-content: flex-start;
    padding-top: 6.5rem;
    padding-bottom: 3rem;
  }
  .hero__dateline {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    margin-bottom: 1rem;
  }
  .hero__inner { margin-top: 0; }
  .hero__title {
    font-size: clamp(3.2rem, 18vw, 5.2rem);
    line-height: 0.95;
    margin-bottom: 1.6rem;
  }
  .hero__meta {
    gap: 1rem;
    padding: 1.25rem 0;
  }
  .hero__ticker {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 2rem;
  }
  .hero__scroll { display: none; }
  .hero--page { padding-bottom: 3rem; }
  .hero__support { grid-template-columns: 1fr; }
}
