/* ==========================================================================
   Pritesh Patel — Architecture & Visualization Portfolio
   Design system: dark, editorial, gallery-first. Warm terracotta accent
   pulled from the clay/sandstone facades in the actual project renders.
   ========================================================================== */

:root {
  --bg: #0a0a0b;
  --bg-raised: #111214;
  --bg-card: #17181b;
  --line: rgba(245, 244, 242, 0.09);
  --line-strong: rgba(245, 244, 242, 0.16);
  --ink: #f5f4f2;
  --ink-dim: #b9b7b3;
  --ink-faint: #7d7b78;
  --accent: #e08d5e;
  --accent-dim: #a9683f;
  --accent-tint: rgba(224, 141, 94, 0.12);
  --focus: #e08d5e;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-s: 0.4s;
  --dur-m: 0.7s;
  --dur-l: 1.1s;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #0a0a0b;
    --bg-raised: #111214;
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* The hidden attribute must always win, even over a component's own
   `display` rule (e.g. `.project-empty { display: flex }` would otherwise
   silently defeat `el.hidden = true` since both have equal specificity and
   author rules beat the UA stylesheet regardless of source order). */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }
img, picture { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #14100c; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #14100c;
  padding: 12px 20px;
  z-index: 1000;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(40px, 6vw, 76px);
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.section-head p {
  margin-top: 16px;
  color: var(--ink-dim);
  font-size: 1.05rem;
  max-width: 54ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform var(--dur-s) var(--ease), background var(--dur-s) var(--ease), border-color var(--dur-s) var(--ease), color var(--dur-s) var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #14100c;
}
.btn-primary:hover { background: #eaa172; transform: translateY(-2px); }
.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.02s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.09s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.23s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.30s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.37s; }

/* ==========================================================================
   Nav
   ========================================================================== */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--dur-s) var(--ease), border-color var(--dur-s) var(--ease), padding var(--dur-s) var(--ease);
  border-bottom: 1px solid transparent;
}
.site-nav.is-scrolled {
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
  padding-block: 14px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.brand .mark {
  color: var(--accent);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--ink-dim);
  position: relative;
  padding: 4px 0;
  transition: color var(--dur-s) var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right var(--dur-s) var(--ease);
}
.nav-links a:hover::after { right: 0; }
.nav-links a.is-active { color: var(--ink); }
.nav-links a.is-active::after { right: 0; }
.nav-cta { display: flex; align-items: center; gap: 16px; }

.nav-search-btn {
  display: flex;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink-dim);
  transition: border-color var(--dur-s) var(--ease), color var(--dur-s) var(--ease);
}
.nav-search-btn:hover { border-color: var(--accent); color: var(--accent); }
.nav-search-btn svg { width: 16px; height: 16px; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after { display: none; }
.nav-toggle svg { width: 18px; height: 18px; transition: transform 0.35s var(--ease); }
.nav-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 199;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0 var(--gutter);
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease);
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu-links { display: flex; flex-direction: column; }
.mobile-menu-links a {
  font-family: var(--font-display);
  font-size: 2rem;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.mobile-menu-actions {
  margin-top: 28px;
}
.mobile-menu-actions .btn {
  width: 100%;
  justify-content: center;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-bg svg { width: 100%; height: 100%; }
/* Quiet architectural linework — a sparse structural grid and a faint plan
   fragment, standing in for the old dense diagonal pattern and orange
   axonometric wireframe. Kept low-contrast on purpose: this is atmosphere,
   not content. */
.hero-bg .arch-grid path { stroke: rgba(245,244,242,0.045); stroke-width: 1; }
.hero-bg .arch-plan rect,
.hero-bg .arch-plan path {
  fill: none;
  stroke: rgba(245,244,242,0.1);
  stroke-width: 1;
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}
.hero-intro {
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  line-height: 1.6;
  color: var(--ink-dim);
  max-width: 42ch;
  margin-bottom: 32px;
}
.hero-name {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.3vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 14px;
}
.hero-kicker {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-kicker .dot-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(224,141,94,0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(224,141,94,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(224,141,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(224,141,94,0); }
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.hero-title {
  display: flex;
  flex-direction: column;
  text-transform: uppercase;
}
/* All-caps display serif reads cramped at the tight tracking `.hero h1`
   sets for mixed-case headings; the extra class beats it on specificity
   without touching `.hero h1` itself. */
.hero .hero-title {
  letter-spacing: 0;
}
.hero-title .is-accent {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.hero-sub {
  margin-top: 28px;
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  color: var(--ink-dim);
  max-width: 46ch;
}
.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
/* A quiet text-and-arrow CTA for the homepage cover — scoped to the hero
   so the site's regular pill `.btn` (Resume, Contact, etc.) is untouched. */
.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 3px;
  transition: color var(--dur-s) var(--ease);
}
.hero-link svg { width: 15px; height: 15px; transition: transform var(--dur-s) var(--ease); }
.hero-link:hover { color: var(--accent); }
.hero-link:hover svg { transform: translateX(4px); }
.hero-stats {
  margin-top: 88px;
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: clamp(24px, 4vw, 64px);
  max-width: 720px;
}
.hero-stats .stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  color: var(--ink);
  font-weight: 500;
}
.hero-stats .stat span {
  font-size: 0.8rem;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
}
@media (max-width: 700px) {
  .hero-stats { grid-template-columns: repeat(2, auto); }
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: var(--gutter);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 2;
}
.scroll-cue .line {
  width: 1px; height: 34px;
  background: linear-gradient(var(--ink-faint), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-cue .line::after {
  content: "";
  position: absolute;
  top: -100%; left: 0; right: 0; height: 100%;
  background: var(--accent);
  animation: scrollcue 1.8s var(--ease) infinite;
}
@keyframes scrollcue {
  0% { top: -100%; }
  60%, 100% { top: 100%; }
}
@media (max-width: 700px) { .scroll-cue { display: none; } }

/* ---------- Marquee strip ---------- */
.marquee-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
  background: var(--bg-raised);
}
.marquee-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-inline: var(--gutter);
  margin-bottom: 16px;
}
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 56px;
  animation: marquee 34s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink-faint);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 56px;
}
.marquee-track span::after {
  content: "•";
  color: var(--accent-dim);
  margin-left: 56px;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   About
   ========================================================================== */
.about {
  padding-block: clamp(90px, 12vw, 160px);
}
/* Centered title zone — kept typographically identical to the Resume and
   Contact title zones (same eyebrow, same h2 rule) so the three pages read
   as one consistent hierarchy before their own content diverges below. */
.about-intro {
  text-align: center;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.about-intro .eyebrow { justify-content: center; }
.about-intro .eyebrow::before { display: none; }
.about-intro h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-top: 10px;
  letter-spacing: -0.01em;
}
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
.about-media {
  position: sticky;
  top: 120px;
}
.about-copy p { color: var(--ink-dim); font-size: 1.06rem; margin-bottom: 22px; }
.about-copy p:first-child {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  line-height: 1.4;
  font-weight: 400;
}
.about-copy strong { color: var(--ink); font-weight: 600; }

.about-facts {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.about-facts .fact {
  background: var(--bg-raised);
  padding: 18px 22px;
}
.about-facts .fact dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.about-facts .fact dd {
  font-size: 0.98rem;
  color: var(--ink);
  margin: 0;
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-media { position: static; max-width: 320px; }
}

/* ==========================================================================
   Featured Projects
   ========================================================================== */
.work { padding-block: clamp(90px, 12vw, 160px); }
.work-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
/* ---------- Flagship case study (City Square) ---------- */
.flagship {
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: clamp(28px, 4vw, 56px);
  margin-bottom: clamp(56px, 8vw, 96px);
  background: linear-gradient(180deg, var(--bg-raised), var(--bg));
}
.flagship-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 18px;
}
.flagship-tag svg { width: 14px; height: 14px; }
.flagship-head { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: end; margin-bottom: 30px; }
.flagship-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.flagship-head p { color: var(--ink-dim); font-size: 1.02rem; }
@media (max-width: 860px) { .flagship-head { grid-template-columns: 1fr; } }

.flagship-figure {
  position: relative;
  border-radius: var(--radius-m);
  overflow: hidden;
  aspect-ratio: 16/9;
  cursor: pointer;
  margin-bottom: 34px;
  background: var(--bg-card);
}
.flagship-figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.flagship-figure:hover img { transform: scale(1.03); }
.flagship-figure .figure-veil { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.6) 100%); opacity: 0; transition: opacity var(--dur-s) var(--ease); }
.flagship-figure:hover .figure-veil { opacity: 1; }
.flagship-figure .expand-cue { position: absolute; bottom: 18px; left: 18px; display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: #fff; opacity: 0; transform: translateY(8px); transition: all var(--dur-s) var(--ease); }
.flagship-figure:hover .expand-cue { opacity: 1; transform: translateY(0); }
.flagship-figure .expand-cue svg { width: 15px; height: 15px; }
.flagship-figure .count-badge { position: absolute; top: 16px; right: 16px; background: rgba(10,10,11,0.6); backdrop-filter: blur(6px); border: 1px solid rgba(245,244,242,0.18); color: var(--ink); font-size: 0.75rem; padding: 5px 11px; border-radius: 999px; }

.flagship-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  margin-bottom: 44px;
}
.flagship-stat { background: var(--bg-raised); padding: 20px 16px; }
.flagship-stat b { display: block; font-family: var(--font-display); font-size: clamp(1.2rem, 1.8vw, 1.6rem); color: var(--ink); font-weight: 500; }
.flagship-stat span { font-size: 0.74rem; color: var(--ink-faint); line-height: 1.4; display: block; margin-top: 4px; }
@media (max-width: 900px) { .flagship-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .flagship-stats { grid-template-columns: repeat(2, 1fr); } }

.flagship-sub {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 16px;
}

.flagship-grid2 {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(28px, 4vw, 56px);
}
@media (max-width: 860px) { .flagship-grid2 { grid-template-columns: 1fr; } }

.program-list { border-top: 1px solid var(--line); }
.program-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.program-row .pr-name { color: var(--ink); }
.program-row .pr-detail { color: var(--ink-faint); font-size: 0.82rem; text-align: right; }

.ft-timeline { position: relative; padding-top: 4px; }
.ft-track { position: relative; height: 2px; background: var(--line-strong); margin: 26px 4px 0; border-radius: 2px; }
.ft-track::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-dim)); border-radius: 2px; opacity: 0.9; }
.ft-stages { display: flex; justify-content: space-between; margin-top: -7px; }
.ft-stage { display: flex; flex-direction: column; align-items: center; text-align: center; width: 20%; }
.ft-stage .node { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg-raised); box-shadow: 0 0 0 1px var(--accent); margin-bottom: 12px; }
.ft-stage span { font-size: 0.76rem; color: var(--ink-dim); line-height: 1.35; }
@media (max-width: 700px) {
  .ft-stages { flex-wrap: wrap; row-gap: 22px; }
  .ft-stage { width: 33%; }
  .ft-track { display: none; }
}

.flagship-materials { margin-top: 40px; }
.flagship-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 36px; padding-top: 26px; border-top: 1px solid var(--line); }
.flagship-foot .fm-note { font-size: 0.85rem; color: var(--ink-faint); max-width: 46ch; }

/* ---------- Site-utilization bars ---------- */
.bar-list { display: flex; flex-direction: column; gap: 16px; }
.bar-row .bar-row-head { display: flex; justify-content: space-between; font-size: 0.86rem; margin-bottom: 7px; }
.bar-row .bar-row-head span:first-child { color: var(--ink); }
.bar-row .bar-row-head span:last-child { color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.bar-track { height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); width: 0%; transition: width 1.1s var(--ease); }
.bar-row.is-visible .bar-fill { width: var(--pct); }

/* ---------- Four-site network comparison ---------- */
.network-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  margin-top: 18px;
}
.network-card { background: var(--bg-raised); padding: 20px 18px; }
.network-card.is-current { background: var(--accent-tint); }
.network-card h5 { font-family: var(--font-display); font-size: 1.02rem; font-weight: 500; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.network-card .here-badge { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.06em; background: var(--accent); color: #14100c; padding: 2px 7px; border-radius: 999px; font-weight: 700; }
.network-card dl { display: flex; flex-direction: column; gap: 8px; }
.network-card dl div { display: flex; justify-content: space-between; font-size: 0.8rem; }
.network-card dt { color: var(--ink-faint); }
.network-card dd { color: var(--ink); margin: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .network-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Project count (next to the "Projects" eyebrow) ---------- */
.wlh-count {
  font-size: 0.85rem;
  color: var(--ink-faint);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------- Compact search modal (opened from the header icon) ---------- */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  justify-content: center;
  padding: 84px var(--gutter) 40px;
}
.search-modal[hidden] { display: none; }
.search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 7, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--dur-s) var(--ease);
}
.search-modal.is-open .search-modal-backdrop { opacity: 1; }
.search-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  height: fit-content;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-l);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  padding: 20px;
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity var(--dur-s) var(--ease), transform var(--dur-s) var(--ease);
}
.search-modal.is-open .search-modal-panel { opacity: 1; transform: translateY(0); }
.search-modal .search-field { flex: 1 1 auto; min-width: 0; margin-bottom: 16px; }
.search-modal .search-modal-close {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint);
  border-radius: 50%;
  transition: color var(--dur-s) var(--ease), background var(--dur-s) var(--ease);
}
.search-modal .search-modal-close:hover { color: var(--ink); background: var(--line); }
.search-modal .search-modal-close svg { width: 15px; height: 15px; }
.search-modal .filter-row + .filter-row { margin-top: 14px; }
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.filter-row-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  flex-shrink: 0;
  width: 80px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  min-width: 240px;
  flex: 0 1 320px;
  transition: border-color var(--dur-s) var(--ease);
}
.search-field:focus-within { border-color: var(--accent); }
.search-field svg { width: 16px; height: 16px; color: var(--ink-faint); flex-shrink: 0; }
.search-field input {
  border: none;
  background: none;
  outline: none;
  color: var(--ink);
  font-size: 0.92rem;
  width: 100%;
}
.search-field input::placeholder { color: var(--ink-faint); }
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}
.chip {
  font-size: 0.82rem;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-dim);
  transition: border-color var(--dur-s) var(--ease), color var(--dur-s) var(--ease), background var(--dur-s) var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip.is-active {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent);
}
.project.is-filtered-out { display: none; }
.more-card.is-filtered-out { display: none; }
.flagship.is-filtered-out { display: none; }
.project-card.is-filtered-out { display: none; }
.project-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  padding: clamp(48px, 8vw, 80px) 20px;
  color: var(--ink-dim);
}
.project-empty p { font-size: 1.05rem; }

/* ==========================================================================
   Project card — the single standard component used for every project,
   in both the Featured strip and the full All Projects grid. One layout,
   one boundary treatment, no per-project variation.
   ========================================================================== */
.project-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(28px, 3vw, 40px);
}
@media (max-width: 760px) {
  .project-list { grid-template-columns: 1fr; }
}

.project-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--bg-raised);
  transition: border-color var(--dur-s) var(--ease);
}
.project-card:hover { border-color: var(--line-strong); }

.project-card-figure {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: var(--bg-card);
}
.project-card-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease), opacity var(--dur-s) var(--ease);
}
.project-card-figure:hover img { transform: scale(1.05); }
.pcf-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.55) 100%);
  opacity: 0;
  transition: opacity var(--dur-s) var(--ease);
}
.project-card-figure:hover .pcf-veil { opacity: 1; }
.pcf-cue {
  position: absolute;
  bottom: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: all var(--dur-s) var(--ease);
}
.project-card-figure:hover .pcf-cue { opacity: 1; transform: translateY(0); }
.pcf-cue svg { width: 14px; height: 14px; }
.pcf-index {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10,10,11,0.6);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(245,244,242,0.18);
  color: var(--ink);
}
.pcf-video-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10,10,11,0.6);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(245,244,242,0.18);
  color: var(--ink);
}
.pcf-video-badge svg { width: 11px; height: 11px; }

.project-card-body {
  padding: clamp(20px, 2.4vw, 28px);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.project-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.project-card-meta .sep { color: var(--ink-faint); }
.project-card-meta .pcm-loc { color: var(--ink-faint); text-transform: none; letter-spacing: 0; }
/* Only rendered when a project's real Site Area is on file — never a
   placeholder — so it stays as quiet, optional metadata. */
.pcm-area {
  font-size: 0.74rem;
  color: var(--ink-faint);
  margin: -4px 0 10px;
}
.project-card-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
/* Kept in the DOM (the lightbox detail's Overview reads it directly) but
   not shown on the compact card — the card stays to name / type / role. */
.project-card-desc { display: none; }
.project-card-contribution {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-left: 2px solid var(--accent);
  background: var(--accent-tint);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
}
.pcc-label {
  display: block;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 4px;
}
.pcc-role { display: block; font-family: var(--font-display); font-size: 0.92rem; color: var(--ink); }
/* Kept in the DOM (the lightbox detail's Tools line reads it directly) but
   not shown on the compact card. */
.project-card-tools { display: none; }
.project-card-tools span {
  font-size: 0.7rem;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-dim);
}
.project-card-body .project-docs { margin-bottom: 16px; }
.project-card-link {
  margin-top: auto;
  padding-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}
.project-card-link svg { width: 14px; height: 14px; transition: transform var(--dur-s) var(--ease); }
.project-card:hover .project-card-link svg { transform: translateX(4px); }

.project {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  padding-block: clamp(56px, 8vw, 100px);
  border-top: 1px solid var(--line);
}
.project:first-of-type { border-top: none; }
.project.is-reversed { direction: rtl; }
.project.is-reversed > * { direction: ltr; }

.project-figure {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-card);
  cursor: pointer;
  isolation: isolate;
}
.project-figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}
.project-figure:hover img { transform: scale(1.045); }
.project-figure .figure-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.55) 100%);
  opacity: 0;
  transition: opacity var(--dur-s) var(--ease);
}
.project-figure:hover .figure-veil { opacity: 1; }
.project-figure .expand-cue {
  position: absolute;
  bottom: 18px; left: 18px;
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--dur-s) var(--ease);
}
.project-figure:hover .expand-cue { opacity: 1; transform: translateY(0); }
.project-figure .expand-cue svg { width: 15px; height: 15px; }
.project-figure .count-badge {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(10,10,11,0.6);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(245,244,242,0.18);
  color: var(--ink);
  font-size: 0.75rem;
  padding: 5px 11px;
  border-radius: 999px;
}

.project-index {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink-faint);
}
.project-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 14px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.project-meta .sep { color: var(--ink-faint); }
.project-meta .loc { color: var(--ink-faint); text-transform: none; letter-spacing: 0; }

.project-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.project-body p {
  color: var(--ink-dim);
  font-size: 1.02rem;
  max-width: 50ch;
}
.project-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.project-tools span {
  font-size: 0.76rem;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-dim);
}

/* ---------- Project documents ---------- */
.project-docs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}
.doc-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  color: var(--ink-dim);
  font-size: 0.86rem;
  transition: border-color var(--dur-s) var(--ease), color var(--dur-s) var(--ease);
}
.doc-chip:hover { border-color: var(--accent); color: var(--ink); }
.doc-chip svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--accent); }
.doc-chip .doc-label { flex: 1; }
.doc-chip .doc-size { font-size: 0.76rem; color: var(--ink-faint); }

/* ---------- My Contribution component ---------- */
.contribution {
  margin: 22px 0;
  padding: 16px 20px;
  border-left: 2px solid var(--accent);
  background: var(--accent-tint);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
}
.contribution-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}
.contribution-role {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 6px;
}
.contribution p {
  color: var(--ink-dim);
  font-size: 0.9rem;
  max-width: 48ch;
  margin: 0;
}
.flagship .contribution { margin-top: 8px; margin-bottom: 30px; }
.more-card .contribution {
  margin: 14px 0 0;
  padding: 12px 16px;
  border-left-width: 2px;
}
.more-card .contribution-role { font-size: 0.96rem; }
.more-card .contribution p { font-size: 0.84rem; }
.project-link {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}
.project-link svg { width: 14px; height: 14px; transition: transform var(--dur-s) var(--ease); }
.project-figure:hover ~ .project-body .project-link svg,
.project:hover .project-link svg { transform: translateX(4px); }

@media (max-width: 860px) {
  .project, .project.is-reversed { grid-template-columns: 1fr; direction: ltr; }
}
@media (max-width: 560px) {
  .search-field { flex-basis: 100%; }
}

/* ---------- Secondary works grid ---------- */
.more-work {
  margin-top: clamp(60px, 8vw, 100px);
}
.more-work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
}
.more-card {
  background: var(--bg-raised);
  padding: 26px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}
.more-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transition: transform 0.9s var(--ease), opacity var(--dur-s) var(--ease);
}
.more-card:hover img { transform: scale(1.06); opacity: 0.72; }
.more-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,11,0.1), rgba(10,10,11,0.92));
}
.more-card .mc-content { position: relative; z-index: 1; }
.more-card .mc-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
}
.more-card h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
}
.more-card p { font-size: 0.85rem; color: var(--ink-dim); margin-top: 6px; }

/* ---------- Pipeline list ---------- */
.pipeline {
  margin-top: clamp(60px, 8vw, 100px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: clamp(28px, 4vw, 44px);
  background: var(--bg-raised);
}
.pipeline-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.pipeline-head h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; }
.pipeline-head span { color: var(--ink-faint); font-size: 0.85rem; }
.pipeline-list { display: grid; grid-template-columns: repeat(2, 1fr); }
.pipeline-list li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.pipeline-list li:nth-child(-n+2) { border-top: none; }
.pipeline-list .p-name { color: var(--ink); }
.pipeline-list .p-role {
  display: block;
  font-size: 0.78rem;
  color: var(--accent);
  margin-top: 3px;
}
.pipeline-list .p-loc { color: var(--ink-faint); text-align: right; white-space: nowrap; font-size: 0.85rem; }
@media (max-width: 700px) {
  .pipeline-list { grid-template-columns: 1fr; }
  .pipeline-list li:nth-child(2) { border-top: 1px solid var(--line); }
}

/* ==========================================================================
   Skills
   ========================================================================== */
.skills { padding-block: clamp(90px, 12vw, 160px); background: var(--bg-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
}
.skill-card {
  background: var(--bg);
  padding: clamp(24px, 3vw, 34px);
}
.skill-card .sk-icon {
  width: 38px; height: 38px;
  color: var(--accent);
  margin-bottom: 18px;
}
.skill-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 14px;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tags span {
  font-size: 0.82rem;
  color: var(--ink-dim);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  transition: border-color var(--dur-s) var(--ease), color var(--dur-s) var(--ease);
}
.skill-tags span:hover { border-color: var(--accent); color: var(--ink); }
@media (max-width: 900px) { .skills-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Experience timeline
   ========================================================================== */
.experience { padding-block: clamp(90px, 12vw, 160px); }
.timeline { position: relative; max-width: 820px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--line-strong);
}
.timeline-item {
  position: relative;
  padding-left: 42px;
  padding-bottom: 44px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: 0; top: 5px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.timeline-item.is-edu::before { border-color: var(--ink-faint); }
.t-date {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
}
.timeline-item.is-edu .t-date { color: var(--ink-faint); }
.timeline-item h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
}
.timeline-item .t-org { color: var(--ink-dim); margin-top: 4px; font-size: 0.98rem; }
.timeline-item p.t-desc { color: var(--ink-dim); margin-top: 10px; max-width: 56ch; font-size: 0.96rem; }
.exp-projects {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.exp-projects-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.exp-projects ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.exp-projects li {
  font-size: 0.86rem;
}
.exp-projects a {
  color: var(--ink-dim);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
  transition: color var(--dur-s) var(--ease), border-color var(--dur-s) var(--ease);
}
.exp-projects a:hover { color: var(--accent); border-color: var(--accent); }
.exp-projects span.plain { color: var(--ink-faint); }

.recognition {
  margin-top: clamp(56px, 7vw, 90px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 60px);
}
.recognition h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 18px;
}
.recognition ul li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 0.94rem;
  color: var(--ink-dim);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.recognition ul li strong { color: var(--ink); font-weight: 500; }
.recognition ul li span { color: var(--ink-faint); white-space: nowrap; font-size: 0.85rem; }
@media (max-width: 760px) { .recognition { grid-template-columns: 1fr; } }

/* ==========================================================================
   Featured
   ========================================================================== */
.featured { padding-block: clamp(70px, 9vw, 120px); }
.featured .featured-grid { margin-top: 8px; }

/* ==========================================================================
   Resume
   ========================================================================== */
.resume { padding-block: clamp(70px, 10vw, 130px); text-align: center; }
.resume .eyebrow { justify-content: center; }
.resume .eyebrow::before { display: none; }
.resume h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-top: 10px;
  letter-spacing: -0.01em;
}
.resume p { color: var(--ink-dim); max-width: 46ch; margin: 14px auto 0; }
.resume-actions { margin-top: 30px; display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact {
  padding-block: clamp(90px, 14vw, 190px);
  position: relative;
  overflow: hidden;
}
.contact-inner { position: relative; z-index: 1; text-align: center; }
.contact .eyebrow { justify-content: center; }
.contact .eyebrow::before { display: none; }
.contact h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-top: 10px;
  letter-spacing: -0.01em;
}
.contact-email {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 8px;
  transition: border-color var(--dur-s) var(--ease), color var(--dur-s) var(--ease);
}
.contact-email:hover { color: var(--accent); border-color: var(--accent); }
.contact-email svg { width: 22px; height: 22px; }
.contact-meta {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  color: var(--ink-faint);
  font-size: 0.92rem;
}
.contact-meta a:hover { color: var(--ink); }
.contact-actions {
  margin-top: 46px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.contact-bg { position: absolute; inset: 0; z-index: 0; opacity: 0.5; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px var(--gutter) 32px;
  color: var(--ink-faint);
  font-size: 0.85rem;
}
.footer-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px;
  padding-bottom: 32px;
}
.footer-identity {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
}
.footer-tagline {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.footer-links a:hover { color: var(--ink); }
.footer-email { color: var(--ink-dim); transition: color var(--dur-s) var(--ease); }
.footer-email:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}
.to-top {
  display: flex; align-items: center; gap: 8px;
  color: var(--ink-faint);
  transition: color var(--dur-s) var(--ease);
}
.to-top:hover { color: var(--accent); }
.to-top svg { width: 14px; height: 14px; }

/* ==========================================================================
   Video Player (custom, premium, minimal)
   ========================================================================== */
.media-player {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  background: #000;
  isolation: isolate;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.media-player:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.media-player video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000;
  cursor: pointer;
}
.media-player:fullscreen { border-radius: 0; }
.media-player:fullscreen video { object-fit: contain; }

.mp-badge {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 3;
  display: flex; align-items: center; gap: 7px;
  background: rgba(10,10,11,0.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(245,244,242,0.16);
  color: var(--ink);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  padding: 6px 12px 6px 9px;
  border-radius: 999px;
  transition: opacity 0.3s var(--ease);
}
.mp-badge svg { width: 13px; height: 13px; color: var(--accent); }
.media-player.is-active .mp-badge { opacity: 0; }

/* center play button */
.mp-bigplay {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(1);
  z-index: 4;
  width: clamp(56px, 9vw, 78px);
  height: clamp(56px, 9vw, 78px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 10, 11, 0.45);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(245, 244, 242, 0.55);
  color: #fff;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.mp-bigplay svg { width: 38%; height: 38%; margin-left: 3px; }
.media-player:hover .mp-bigplay { background: rgba(224,141,94,0.85); border-color: var(--accent); transform: translate(-50%, -50%) scale(1.06); }
.media-player.is-active .mp-bigplay,
.media-player.is-playing .mp-bigplay { opacity: 0; transform: translate(-50%, -50%) scale(0.8); pointer-events: none; }

.mp-spinner {
  position: absolute; top: 50%; left: 50%;
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  border: 2.5px solid rgba(245,244,242,0.2);
  border-top-color: var(--accent);
  z-index: 4;
  opacity: 0;
  animation: mp-spin 0.85s linear infinite;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}
.media-player.is-buffering .mp-spinner { opacity: 1; }
@keyframes mp-spin { to { transform: rotate(360deg); } }

/* controls bar */
.mp-controls {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  padding: 34px 14px 12px;
  background: linear-gradient(180deg, transparent, rgba(4,4,5,0.86) 65%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.media-player.is-active .mp-controls { opacity: 1; transform: translateY(0); }
.media-player.is-active.is-idle .mp-controls { opacity: 0; transform: translateY(6px); }
.media-player:not(.is-active) .mp-controls { opacity: 0; }

.mp-progress {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(245,244,242,0.22);
  cursor: pointer;
  touch-action: none;
  transition: height 0.15s var(--ease);
}
.mp-progress:hover, .mp-progress:focus-visible { height: 7px; }
.mp-progress-buffered {
  position: absolute; top: 0; left: 0; height: 100%;
  border-radius: 999px;
  background: rgba(245,244,242,0.32);
  width: 0%;
}
.mp-progress-played {
  position: absolute; top: 0; left: 0; height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  width: 0%;
}
.mp-progress-handle {
  position: absolute; top: 50%; left: 0%;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(224,141,94,0.25);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.15s var(--ease);
}
.mp-progress:hover .mp-progress-handle, .mp-progress:focus-visible .mp-progress-handle { transform: translate(-50%, -50%) scale(1); }

.mp-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mp-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 8px;
  color: #fff;
  flex-shrink: 0;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.mp-btn:hover { background: rgba(245,244,242,0.12); color: var(--accent); }
.mp-btn svg { width: 19px; height: 19px; }
.mp-btn .icon-alt { display: none; }
.mp-btn.is-on .icon-default { display: none; }
.mp-btn.is-on .icon-alt { display: block; }

.mp-time {
  font-size: 0.76rem;
  color: rgba(245,244,242,0.85);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding: 0 2px;
}
.mp-spacer { flex: 1; }

.mp-volume { display: flex; align-items: center; gap: 2px; }
.mp-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 70px;
  height: 3px;
  border-radius: 999px;
  background: rgba(245,244,242,0.28);
  cursor: pointer;
}
.mp-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}
.mp-volume-slider::-moz-range-thumb {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}
@media (max-width: 560px) {
  .mp-volume-slider { display: none; }
  .mp-controls { padding: 26px 8px 8px; }
  .mp-btn { width: 30px; height: 30px; }
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(6, 6, 7, 0.94);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-s) var(--ease);
  padding: 5vh 5vw;
  overflow-y: auto;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox-frame { position: relative; max-width: 1100px; width: 100%; margin: 0 auto; }
.lightbox-frame img {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-m);
  background: var(--bg-card);
}
.lightbox-cap {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  color: var(--ink-dim);
  font-size: 0.9rem;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  background: rgba(10,10,11,0.5);
  transition: border-color var(--dur-s) var(--ease), color var(--dur-s) var(--ease);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { border-color: var(--accent); color: var(--accent); }
.lightbox-close { top: -60px; right: 0; }
.lightbox-prev { top: 50%; left: -60px; transform: translateY(-50%); }
.lightbox-next { top: 50%; right: -60px; transform: translateY(-50%); }
.lightbox-close svg, .lightbox-prev svg, .lightbox-next svg { width: 18px; height: 18px; }
@media (max-width: 900px) {
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
  .lightbox-close { top: 6px; right: 6px; background: rgba(10,10,11,0.7); }
}

/* ---------- Lightbox: video slot & project detail panel ---------- */
.lightbox-video-slot { border-radius: var(--radius-m); overflow: hidden; margin-bottom: 16px; }
.lightbox-video-slot[hidden] { display: none; }
.lightbox-video-slot .media-player,
.lightbox-video-slot .project-figure,
.lightbox-video-slot .flagship-figure { margin: 0; border-radius: var(--radius-m); }

.lightbox-detail {
  max-width: 1100px;
  width: 100%;
  margin: 20px auto 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.lightbox-detail-inner { max-width: 68ch; }
.ld-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.ld-meta .ld-loc { color: var(--ink-faint); text-transform: none; letter-spacing: 0; }
.ld-meta .sep { color: var(--ink-faint); }
.lightbox-detail h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  margin-bottom: 12px;
}
.ld-desc { color: var(--ink-dim); font-size: 0.96rem; margin-bottom: 18px; }
.ld-contribution {
  display: inline-block;
  padding: 12px 18px;
  border-left: 2px solid var(--accent);
  background: var(--accent-tint);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  margin-bottom: 18px;
}
.ld-contribution[hidden] { display: none; }
.ld-contrib-label { display: block; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 4px; }
.ld-contrib-role { display: block; font-family: var(--font-display); font-size: 0.98rem; color: var(--ink); }
.ld-tools { margin-bottom: 18px; font-size: 0.88rem; }
.ld-tools-label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.68rem; color: var(--ink-faint); margin-right: 10px; }
.ld-tools #ldToolsList { color: var(--ink-dim); }
.ld-video-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  margin-bottom: 24px;
  transition: border-color var(--dur-s) var(--ease), color var(--dur-s) var(--ease);
}
.ld-video-toggle:hover { border-color: var(--accent); color: var(--accent); }
.ld-video-toggle[hidden] { display: none; }
.ld-extra { max-width: none; }
.ld-extra:empty { display: none; }
.ld-extra .flagship-stats,
.ld-extra .flagship-grid2 { margin-bottom: 32px; }
@media (max-width: 700px) {
  .lightbox-detail-inner { max-width: none; }
}

/* ---------- Breadcrumb ---------- */
.lightbox-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-bottom: 20px;
}
.lightbox-breadcrumb:empty { display: none; }
.lightbox-breadcrumb button {
  color: var(--ink-faint);
  transition: color var(--dur-s) var(--ease);
}
.lightbox-breadcrumb button:hover { color: var(--accent); }
.lightbox-breadcrumb .bc-current { color: var(--ink); }
.lightbox-breadcrumb .bc-sep { color: var(--ink-faint); opacity: 0.6; }

/* ---------- Project Work: section cards ---------- */
.ld-sections { margin: 4px 0 28px; max-width: none; }
.ld-sections h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 14px;
}
.ld-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.ld-section-card {
  display: block;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--bg-card);
  transition: border-color var(--dur-s) var(--ease);
}
.ld-section-card:hover { border-color: var(--accent); }
.ld-section-card .lsc-figure { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--bg-raised); }
.ld-section-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.ld-section-card:hover img { transform: scale(1.06); }
.ld-section-card .lsc-body { padding: 12px 14px; }
.ld-section-card h5 { font-family: var(--font-display); font-size: 0.94rem; font-weight: 500; color: var(--ink); }
.ld-section-card .lsc-count { display: block; font-size: 0.74rem; color: var(--ink-faint); margin-top: 3px; }

/* ---------- Prev/next section nav ---------- */
.ld-section-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  margin-bottom: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
}
.ld-section-nav button {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-dim);
  transition: color var(--dur-s) var(--ease);
}
.ld-section-nav button:hover { color: var(--accent); }
.ld-section-nav button:disabled { visibility: hidden; }
.ld-section-nav .lsn-next { margin-left: auto; }

/* ==========================================================================
   Utility
   ========================================================================== */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
