/* ==========================================================================
   Sohrab Ansari — Portfolio
   ========================================================================== */

:root {
  --paper: #fbf6ee;
  --cream: #f3e9da;
  --cream-deep: #e8d9c3;
  --ink: #2b2019;
  --ink-soft: #6a584a;
  --espresso: #17110d;
  --espresso-2: #211812;
  --espresso-3: #2e2219;
  --on-dark: #f5ecdf;
  --on-dark-soft: #bfae99;
  --crust: #a4561f;
  --crust-bright: #c8742f;
  --gold: #e0a862;
  --gold-light: #f0bf80;
  --line: rgba(43, 32, 25, .14);
  --line-dark: rgba(245, 236, 223, .13);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 20px;
  --shadow: 0 34px 60px -32px rgba(43, 32, 25, .5);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Base ------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}

/* Subtle flour-dust grain over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

::selection { background: var(--gold); color: var(--espresso); }

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

.icon {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--espresso);
  color: var(--on-dark);
  font-weight: 700;
  transition: top .3s;
}
.skip-link:focus { top: 16px; }

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform .35s var(--ease), background-color .3s, color .3s, border-color .3s, box-shadow .35s;
}
.btn .icon { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn-dl:hover .icon { transform: translateY(2px); }

.btn-primary {
  background: var(--espresso);
  color: var(--on-dark);
  box-shadow: 0 16px 30px -16px rgba(23, 17, 13, .75);
}
.btn-primary:hover { background: var(--crust); transform: translateY(-2px); }

.btn-ghost { border: 1.5px solid rgba(43, 32, 25, .28); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: rgba(43, 32, 25, .04); transform: translateY(-2px); }

.btn-gold { background: var(--gold); color: var(--espresso); }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); }

.btn-outline-light { border: 1.5px solid rgba(245, 236, 223, .28); color: var(--on-dark); }
.btn-outline-light:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

.btn-sm { padding: 11px 20px; font-size: 14px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--gold);
  border-bottom: 1px solid rgba(224, 168, 98, .4);
  padding-bottom: 4px;
  width: fit-content;
  transition: gap .3s var(--ease), border-color .3s;
}
.text-link:hover { gap: 14px; border-color: var(--gold); }

/* Header ----------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding-block: 22px;
  transition: padding .4s var(--ease), background-color .4s, box-shadow .4s;
}
.site-header.is-scrolled {
  padding-block: 12px;
  background: rgba(251, 246, 238, .86);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--espresso);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: .06em;
  transition: background-color .3s, color .3s;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  line-height: 1;
}
.brand-name small {
  display: block;
  margin-top: 5px;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.nav-menu { display: flex; align-items: center; gap: 18px; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color .25s, background-color .25s;
}
.nav-links a:hover,
.nav-links a.is-active { color: var(--ink); background: rgba(43, 32, 25, .07); }

.nav-toggle {
  display: none;
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(251, 246, 238, .7);
}
.nav-toggle span {
  position: absolute;
  left: 14px;
  right: 14px;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .35s var(--ease), top .35s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 19px; }
.nav-toggle span:nth-child(2) { top: 25px; }

/* Hero ------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(128px, 17vh, 176px);
  padding-bottom: clamp(72px, 10vh, 120px);
  background:
    radial-gradient(900px 560px at 88% 18%, rgba(224, 168, 98, .22), transparent 62%),
    radial-gradient(700px 500px at -5% 100%, rgba(200, 116, 47, .1), transparent 60%),
    linear-gradient(180deg, var(--paper), var(--cream));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(48px, 7vw, 100px);
  align-items: center;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 16px 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .55);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3f9d5b;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(63, 157, 91, .55); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(63, 157, 91, 0); }
}

.hero-title {
  margin: 26px 0 0;
  font-family: var(--font-display);
  font-size: clamp(72px, 10vw, 138px);
  font-style: italic;
  font-weight: 300;
  line-height: .95;
  letter-spacing: -.02em;
}
.hero-title .name-first {
  display: block;
  margin-left: -.04em;
  color: var(--ink);
}
.hero-title .name-last {
  display: block;
  padding-left: clamp(40px, 7vw, 110px);
  color: var(--crust);
}

.hero-role {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--crust);
}
.hero-role::before { content: ""; width: 44px; height: 1.5px; background: currentColor; }

.hero-lead {
  max-width: 35rem;
  margin: 20px 0 0;
  font-size: clamp(17px, 1.35vw, 19px);
  color: var(--ink-soft);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px clamp(28px, 4vw, 52px);
  list-style: none;
  margin: 46px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
}
.hero-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}
.hero-stats span { display: block; margin-top: 6px; font-size: 13.5px; color: var(--ink-soft); }

/* Portrait */
.hero-visual {
  position: relative;
  justify-self: center;
  width: min(100%, 440px);
}
/* Outline sits an even 16px outside the portrait; radii grow by 16px so the arch stays concentric */
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -16px;
  border: 1.5px solid var(--crust-bright);
  border-radius: 50% 50% 46px 46px / calc(40% + 3.2px) calc(40% + 3.2px) 46px 46px;
  opacity: .5;
}
.portrait-frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 50% 50% 30px 30px / 40% 40% 30px 30px;
  background: linear-gradient(180deg, #f7eee2, #efe0cc);
  box-shadow: var(--shadow);
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  mix-blend-mode: multiply; /* melts the white studio background into the warm frame */
}

.badge-spin {
  position: absolute;
  z-index: 2;
  top: 9%;
  left: -58px;
  display: grid;
  place-items: center;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: var(--espresso);
  color: var(--gold);
  box-shadow: 0 24px 40px -20px rgba(23, 17, 13, .8);
}
.badge-spin .ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 24s linear infinite;
}
.badge-spin text {
  fill: var(--gold);
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
}
.badge-spin .wheat { width: 40px; height: 40px; stroke-width: 1.3; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-card {
  position: absolute;
  z-index: 2;
  right: -30px;
  bottom: 11%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px 11px 11px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 22px 44px -22px rgba(43, 32, 25, .55);
  animation: float 6s ease-in-out infinite;
}
.hero-card-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--gold);
  color: var(--espresso);
}
.hero-card-icon .icon { width: 24px; height: 24px; }
.hero-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.2;
}
.hero-card small { display: block; font-size: 12.5px; color: var(--ink-soft); }
@keyframes float { 50% { transform: translateY(-8px); } }

/* Marquee ---------------------------------------------------------------- */

.marquee {
  overflow: hidden;
  padding-block: 24px;
  background: var(--espresso);
  color: var(--on-dark);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 45s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group {
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 0;
  padding: 0 34px 0 0;
  list-style: none;
  flex-shrink: 0;
}
.marquee-group li {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 36px);
  font-style: italic;
  font-weight: 300;
  white-space: nowrap;
  line-height: 1.2;
}
.marquee-group .icon { display: block; width: 18px; height: 18px; color: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Sections --------------------------------------------------------------- */

.section { position: relative; padding-block: clamp(84px, 11vw, 140px); }
.section-dark { background: var(--espresso); color: var(--on-dark); }
.section-cream { background: var(--cream); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--crust);
}
.eyebrow .num {
  font-family: var(--font-display);
  font-size: 16px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}
.eyebrow::after { content: ""; width: 40px; height: 1px; background: currentColor; opacity: .6; }
.section-dark .eyebrow { color: var(--gold); }

.section-title {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -.02em;
}
.section-title em { font-style: italic; color: var(--crust); }
.section-dark .section-title em { color: var(--gold); }

.section-intro {
  max-width: 34rem;
  margin: 20px 0 0;
  font-size: 18px;
  color: var(--ink-soft);
}
.section-dark .section-intro { color: var(--on-dark-soft); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px 48px;
  margin-bottom: clamp(44px, 6vw, 72px);
}
.section-head > .section-intro { margin: 0; max-width: 26rem; }

/* About ------------------------------------------------------------------ */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(56px, 8vw, 120px);
  align-items: center;
}

.about-media { position: relative; padding: 0 14% 16% 0; }
.about-media .img-main,
.about-media .img-float {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  background: var(--cream-deep);
  box-shadow: var(--shadow);
}
.about-media .img-float {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 46%;
  border: 8px solid var(--paper);
}
.about-media img { width: 100%; height: 100%; object-fit: cover; }

.since-badge {
  position: absolute;
  left: -22px;
  top: 12%;
  display: grid;
  place-items: center;
  align-content: center;
  width: 128px;
  height: 128px;
  padding: 14px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--espresso);
  text-align: center;
  box-shadow: 0 22px 40px -20px rgba(43, 32, 25, .6);
}
.since-badge span { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3; }
.since-badge strong { font-family: var(--font-display); font-size: 34px; font-weight: 500; line-height: 1; margin-top: 4px; }

.about-copy p { margin: 0 0 16px; color: var(--ink-soft); }
.about-copy .section-title { margin-bottom: 28px; }
.about-copy .lead {
  font-family: var(--font-display);
  font-size: clamp(21px, 1.9vw, 25px);
  line-height: 1.45;
  color: var(--ink);
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 34px 0 0;
  border-top: 1px solid var(--line);
}
.fact { padding: 16px 0; border-bottom: 1px solid var(--line); }
.fact:nth-child(odd) { padding-right: 20px; }
.fact dt { font-size: 11.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--crust); }
.fact dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 19px; color: var(--ink); line-height: 1.35; }

.about-copy .signature {
  margin: 28px 0 0;
  font-family: var(--font-display);
  font-size: 34px;
  font-style: italic;
  font-weight: 300;
  letter-spacing: -.01em;
  line-height: 1;
  color: var(--crust);
}

/* Experience ------------------------------------------------------------- */

.ladder {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ladder li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--on-dark-soft);
}
.ladder li:not(:last-child)::after {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--line-dark), var(--gold));
}
.ladder li.is-now {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--espresso);
}

.timeline { border-top: 1px solid var(--line-dark); }

.role {
  position: relative;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 40px;
  padding-block: clamp(36px, 4.5vw, 52px);
  border-bottom: 1px solid var(--line-dark);
}
.role::after {
  content: attr(data-index);
  position: absolute;
  right: 0;
  top: clamp(28px, 4vw, 44px);
  font-family: var(--font-display);
  font-size: clamp(64px, 8vw, 110px);
  font-weight: 300;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(245, 236, 223, .14);
  pointer-events: none;
  transition: -webkit-text-stroke-color .5s;
}
.role:hover::after { -webkit-text-stroke-color: rgba(224, 168, 98, .45); }

.role-when { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.role-years { font-family: var(--font-display); font-size: 22px; line-height: 1.3; }
.role-tag {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
}
.role-tag.is-current {
  border-color: rgba(224, 168, 98, .45);
  background: rgba(224, 168, 98, .13);
  color: var(--gold);
}

.role-body { padding-right: clamp(0px, 10vw, 140px); }
.role h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 400;
  line-height: 1.1;
}
.role-org {
  margin: 10px 0 0;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
}
.role-org span { font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--on-dark-soft); }

.role-points {
  display: grid;
  gap: 10px;
  max-width: 44rem;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.role-points li { position: relative; padding-left: 28px; color: var(--on-dark-soft); }
.role-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(.85em - 1px);
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: rgba(224, 168, 98, .8);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.chips li {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  background: rgba(245, 236, 223, .05);
  font-size: 13px;
  font-weight: 500;
}

/* Craft ------------------------------------------------------------------ */

.skills-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

.skill {
  position: relative;
  padding: 34px 30px 32px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s;
}
.skill:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: 0 34px 56px -34px rgba(43, 32, 25, .45);
}
.skill-num {
  position: absolute;
  top: 28px;
  right: 30px;
  font-family: var(--font-display);
  font-size: 16px;
  font-style: italic;
  color: var(--crust);
}
.skill-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 26px;
  border-radius: 18px;
  background: var(--espresso);
  color: var(--gold);
  transition: background-color .4s, color .4s, transform .5s var(--ease);
}
.skill-icon .icon { width: 32px; height: 32px; stroke-width: 1.4; }
.skill:hover .skill-icon { background: var(--gold); color: var(--espresso); transform: rotate(-6deg); }
.skill h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 24px; font-weight: 500; line-height: 1.2; }
.skill p { margin: 0; font-size: 15.5px; line-height: 1.65; color: var(--ink-soft); }

.also {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 20px 24px;
  border-radius: 24px;
  border: 1px dashed rgba(43, 32, 25, .26);
}
.also-label {
  margin-right: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--crust);
}
.chip-light {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 14px;
  font-weight: 500;
}

/* Gallery ---------------------------------------------------------------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.shot {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: var(--espresso-3);
  text-align: left;
  isolation: isolate;
}
.shot--feature { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.shot:hover img,
.shot:focus-visible img { transform: scale(1.06); }

.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15, 10, 7, .88));
  pointer-events: none;
}

.shot-cap {
  position: absolute;
  z-index: 1;
  left: 18px;
  right: 18px;
  bottom: 16px;
  color: #fff;
}
.shot-cap strong {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.2;
}
.shot--feature .shot-cap { left: 26px; bottom: 24px; }
.shot--feature .shot-cap strong { font-size: clamp(24px, 2.6vw, 32px); }
.shot-cap span {
  display: block;
  max-height: 0;
  margin-top: 4px;
  overflow: hidden;
  opacity: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, .78);
  transition: max-height .5s var(--ease), opacity .5s;
}
.shot:hover .shot-cap span,
.shot:focus-visible .shot-cap span,
.shot--feature .shot-cap span { max-height: 60px; opacity: 1; }

.shot-zoom {
  position: absolute;
  z-index: 1;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(23, 17, 13, .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  opacity: 0;
  transform: scale(.8);
  transition: opacity .4s, transform .4s var(--ease);
}
.shot-zoom .icon { width: 18px; height: 18px; }
.shot:hover .shot-zoom,
.shot:focus-visible .shot-zoom { opacity: 1; transform: none; }

.quote-tile {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: clamp(26px, 3vw, 42px);
  border-radius: 18px;
  border: 1px solid var(--line-dark);
  background:
    radial-gradient(400px 220px at 100% 0%, rgba(224, 168, 98, .16), transparent 70%),
    var(--espresso-2);
}
.quote-mark { width: 38px; height: 38px; color: var(--gold); stroke-width: 1.3; }
.quote-tile blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.3vw, 31px);
  font-style: italic;
  font-weight: 300;
  line-height: 1.28;
}

/* Lightbox */
.lightbox {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--on-dark);
  overflow: hidden;
}
.lightbox::backdrop {
  background: rgba(12, 8, 6, .94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lightbox[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  animation: lb-in .35s var(--ease);
}
@keyframes lb-in { from { opacity: 0; } }

.lb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}
.lb-count { font-family: var(--font-display); font-style: italic; font-size: 17px; color: var(--on-dark-soft); }

.lb-stage {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 0;
  padding-inline: 20px;
}
.lb-img {
  justify-self: center;
  max-width: 100%;
  max-height: calc(100vh - 190px);
  max-height: calc(100dvh - 190px);
  width: auto;
  height: auto;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 40px 80px -30px #000;
}

.lb-btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line-dark);
  background: rgba(33, 24, 18, .7);
  color: var(--on-dark);
  transition: background-color .3s, color .3s, border-color .3s;
}
.lb-btn:hover { background: var(--gold); border-color: var(--gold); color: var(--espresso); }
.lb-btn .icon { width: 22px; height: 22px; }

.lb-caption { padding: 16px 20px 26px; text-align: center; }
.lb-title { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 500; }
.lb-desc { display: block; margin-top: 2px; font-size: 14.5px; color: var(--on-dark-soft); }

/* Education -------------------------------------------------------------- */

.edu-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; }
.edu-list { display: grid; gap: 20px; }

.edu-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  align-content: center;
  padding: clamp(26px, 3vw, 38px);
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--cream);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.edu-card:hover { transform: translateY(-4px); box-shadow: 0 30px 50px -34px rgba(43, 32, 25, .45); }

.edu-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--crust);
}
.edu-icon .icon { width: 28px; height: 28px; stroke-width: 1.5; }
.edu-icon.on-dark { background: rgba(224, 168, 98, .12); border-color: rgba(224, 168, 98, .3); color: var(--gold); }

.edu-year { display: block; font-family: var(--font-display); font-size: 16px; font-style: italic; color: var(--crust); }
.edu-card h3 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: clamp(23px, 2.3vw, 30px);
  font-weight: 500;
  line-height: 1.2;
}
.edu-card p { margin: 6px 0 0; color: var(--ink-soft); }

.lang-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;
  padding: clamp(26px, 3vw, 38px);
  border-radius: 24px;
  background:
    radial-gradient(360px 240px at 100% 0%, rgba(224, 168, 98, .18), transparent 70%),
    var(--espresso);
  color: var(--on-dark);
}
.lang-card h3 { margin: 22px 0 0; font-family: var(--font-display); font-size: clamp(26px, 2.5vw, 32px); font-weight: 500; line-height: 1.2; }
.lang-card p { margin: 6px 0 0; color: var(--on-dark-soft); font-size: 15.5px; }

.langs { display: grid; margin: 0; padding: 0; list-style: none; }
.langs li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
  border-top: 1px solid var(--line-dark);
  font-family: var(--font-display);
  font-size: 24px;
}
.langs li span:last-child { font-family: var(--font-body); font-size: 17px; color: var(--gold); }

/* Contact ---------------------------------------------------------------- */

.contact { overflow: hidden; }
.contact-bg { position: absolute; inset: 0; z-index: 0; }
.contact-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .2; filter: saturate(.85); }
.contact-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--espresso) 20%, rgba(23, 17, 13, .82) 60%, rgba(23, 17, 13, .9)),
    linear-gradient(0deg, var(--espresso), transparent 40%);
}

.contact-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(48px, 7vw, 100px);
  align-items: end;
}
.contact-title {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: clamp(46px, 6.6vw, 94px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -.03em;
}
.contact-title em { font-style: italic; color: var(--gold); }

.contact-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-dark); }
.contact-list a,
.contact-list .ci-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line-dark);
  transition: padding .4s var(--ease), color .3s;
}
.contact-list a:hover { padding-left: 14px; color: var(--gold); }
.ci-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--line-dark);
  color: var(--gold);
  transition: background-color .3s, color .3s;
}
.ci-icon .icon { width: 21px; height: 21px; }
.contact-list a:hover .ci-icon { background: var(--gold); color: var(--espresso); }
.ci-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
}
.ci-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.ci-arrow { width: 20px; height: 20px; color: var(--on-dark-soft); transition: transform .4s var(--ease), color .3s; }
.contact-list a:hover .ci-arrow { transform: translate(3px, -3px); color: var(--gold); }

/* Footer ----------------------------------------------------------------- */

.site-footer {
  padding-block: 30px;
  border-top: 1px solid var(--line-dark);
  background: var(--espresso);
  color: var(--on-dark-soft);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  font-size: 14px;
}
.footer-inner p { margin: 0; }
.footer-sig { font-family: var(--font-display); font-size: 26px; font-style: italic; font-weight: 300; line-height: 1; color: var(--on-dark); }
.footer-sig em { color: var(--gold); }
.to-top { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; transition: color .3s; }
.to-top:hover { color: var(--gold); }
.to-top .icon { width: 16px; height: 16px; }

/* Missing image placeholder (shown until real photos are added) --------- */

.img-missing {
  background:
    repeating-linear-gradient(135deg, rgba(164, 86, 31, .09) 0 12px, transparent 12px 24px),
    var(--cream-deep) !important;
}
.img-missing > img { opacity: 0; }
.img-missing::before {
  content: "Add photo: " attr(data-missing);
  position: absolute;
  z-index: 2;
  left: 12px;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  pointer-events: none;
}
.section-dark .img-missing {
  background:
    repeating-linear-gradient(135deg, rgba(224, 168, 98, .07) 0 12px, transparent 12px 24px),
    var(--espresso-3) !important;
}
.section-dark .img-missing::before { color: var(--on-dark-soft); }
.contact-bg.img-missing { background: none !important; }
.contact-bg.img-missing::before { content: none; }

/* Reveal on scroll ------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Responsive ------------------------------------------------------------- */

@media (max-width: 1100px) {
  .hero-card { right: -12px; }
  .badge-spin { left: -30px; }
  .role { grid-template-columns: 200px minmax(0, 1fr); }
}

@media (max-width: 960px) {
  /* Mobile navigation */
  .nav-toggle { display: block; z-index: 2; }
  .site-header.menu-open {
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .nav-menu {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 34px;
    padding: 110px var(--gutter) 48px;
    background: var(--espresso);
    color: var(--on-dark);
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s var(--ease), visibility .4s;
  }
  .brand { position: relative; z-index: 2; }
  .menu-open .nav-menu { opacity: 1; visibility: visible; }
  .menu-open .brand-name,
  .menu-open .nav-toggle { color: var(--on-dark); }
  .menu-open .brand-name small { color: var(--on-dark-soft); }
  .menu-open .brand-mark { background: var(--gold); color: var(--espresso); }
  .menu-open .nav-toggle { border-color: var(--line-dark); background: transparent; }
  .menu-open .nav-toggle span:nth-child(1) { top: 22px; transform: rotate(45deg); }
  .menu-open .nav-toggle span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

  .nav-links { flex-direction: column; gap: 2px; }
  .nav-links a {
    padding: 4px 0;
    font-family: var(--font-display);
    font-size: clamp(34px, 9vw, 48px);
    font-weight: 400;
    color: var(--on-dark);
    background: none !important;
  }
  .nav-links a:hover, .nav-links a.is-active { color: var(--gold); }
  .nav-cta { background: var(--gold); color: var(--espresso); padding: 15px 26px; font-size: 15px; }
  .nav-cta:hover { background: var(--gold-light); }

  /* Layout */
  .hero-grid,
  .about-grid,
  .contact-inner,
  .edu-grid { grid-template-columns: minmax(0, 1fr); }

  .hero-visual { width: min(100% - 40px, 400px); margin-top: 12px; }
  .about-media { max-width: 520px; }
  .role { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .role-when { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .role-body { padding-right: 0; }
  .role::after { font-size: 64px; }

  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-tile { grid-column: span 2; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand-name { font-size: 17px; }
  .hero-title .name-last { padding-left: 36px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .hero-stats strong { font-size: 28px; }
  .hero-stats span { font-size: 12.5px; line-height: 1.4; }
  .badge-spin { width: 108px; height: 108px; left: -18px; top: 4%; }
  .badge-spin .wheat { width: 32px; height: 32px; }
  .hero-card { right: -14px; bottom: 7%; padding: 9px 16px 9px 9px; }
  .hero-card-icon { width: 40px; height: 40px; }

  .since-badge { width: 104px; height: 104px; left: -8px; }
  .since-badge span { font-size: 9px; }
  .since-badge strong { font-size: 28px; }
  .facts { grid-template-columns: 1fr; }
  .fact:nth-child(odd) { padding-right: 0; }

  .ladder { gap: 6px; }
  .ladder li { font-size: 12px; gap: 6px; }
  .ladder li:not(:last-child)::after { width: 10px; }
  .ladder li.is-now { padding: 6px 11px; }
  .role::after { display: none; }

  .skills-grid { grid-template-columns: 1fr; }
  .gallery { gap: 10px; }
  .shot { border-radius: 14px; }
  .shot-cap { left: 12px; right: 12px; bottom: 11px; }
  .shot-cap strong { font-size: 15px; }
  .shot:not(.shot--feature) .shot-cap span { display: none; }
  .shot--feature .shot-cap { left: 18px; bottom: 16px; }
  .shot-zoom { display: none; }

  .edu-card { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .lb-stage { grid-template-columns: minmax(0, 1fr); padding-inline: 12px; }
  .lb-img { max-height: calc(100dvh - 200px); }
  .lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; width: 44px; height: 44px; }
  .lb-prev { left: 18px; }
  .lb-next { right: 18px; }

  .contact-list a, .contact-list .ci-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; }
  .ci-icon { width: 44px; height: 44px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (hover: none) {
  .shot--feature .shot-cap span { max-height: 60px; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .marquee-track { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
}
