@charset "UTF-8";
/* ============================================================
   Stefan Paronikyan — Architecture Portfolio
   ============================================================ */

:root {
  --bg:        #f3efe8;          /* warm paper */
  --bg-2:      #ece7dd;
  --ink:       #14110f;          /* near-black */
  --ink-2:     #2b2622;
  --muted:     #7a716a;
  --rule:      #d9d2c5;
  --accent:    #8a3a1f;          /* deep terracotta */
  --accent-2:  #b8643d;
  --max:       1480px;
  --gutter:    clamp(20px, 4vw, 56px);
  --serif:     "Fraunces", "Cormorant Garamond", Georgia, serif;
  --sans:      "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;

  /* default project accent (overridden per project) */
  --proj: #8a3a1f;
}

/* per-project signature colors */
.p-1 { --proj: #2c5f5d; }   /* basalt teal — Iceland */
.p-2 { --proj: #b8643d; }   /* terracotta — Continuum */
.p-3 { --proj: #5b7a3f; }   /* moss green — housing/garden */
.p-4 { --proj: #4a5b6e; }   /* steel blue — Norway */
.p-5 { --proj: #c46a3a; }   /* warm orange — Capitol */
.p-6 { --proj: #a04a2a; }   /* terracotta-clay — EAS */
.p-7 { --proj: #6b5840; }   /* stone — Duruja */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease, opacity 160ms ease;
}
a:hover { color: var(--accent); }

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

/* ============================================================
   Top bar
   ============================================================ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  background: rgba(243, 239, 232, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, padding 200ms ease;
}
.topbar.scrolled {
  border-bottom-color: var(--rule);
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  letter-spacing: 0.01em;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  font-size: 26px;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  transition: opacity 0.3s ease;
}
.brand:hover .brand-mark { opacity: 0.7; }
.brand-meta {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  line-height: 1.25;
}
.brand-meta span:first-child {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.005em;
}
.muted { color: var(--muted); font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; }

.topnav {
  display: flex;
  gap: 28px;
  font-size: 13.5px;
  letter-spacing: 0.04em;
}
.topnav a {
  position: relative;
  padding: 4px 0;
  text-transform: uppercase;
  font-weight: 500;
}
.topnav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--ink);
  transition: right 220ms ease;
}
.topnav a:hover::after { right: 0; }
.topnav a.pdf {
  border: 1px solid var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
}
.topnav a.pdf::after { display: none; }
.topnav a.pdf:hover { background: var(--ink); color: var(--bg); }

.menu-btn {
  display: none;
  width: 40px; height: 40px;
  background: none;
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
}
.menu-btn span {
  position: absolute;
  left: 10px; right: 10px; height: 1px; background: var(--ink);
  transition: transform 200ms ease, opacity 200ms ease, top 200ms ease;
}
.menu-btn span:nth-child(1) { top: 16px; }
.menu-btn span:nth-child(2) { top: 22px; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { top: 19px; transform: rotate(-45deg); }

/* ============================================================
   Side rail (project numerals)
   ============================================================ */
.rail {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transition: opacity 280ms ease;
}
.rail.visible { opacity: 1; pointer-events: auto; }
.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rail a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 0;
}
.rail a::before {
  content: attr(data-num);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 12px;
  width: 22px;
  letter-spacing: 0;
  color: var(--ink-2);
}
.rail a {
  font-size: 0;       /* hide the link text */
  line-height: 0;
  position: relative;
}
.rail a::before, .rail a::after { font-size: 12px; line-height: 1; }
.rail a[aria-label]::before { content: attr(data-num); }

/* hover tooltip showing the project title */
.rail li {
  position: relative;
}
.rail li::before {
  content: attr(data-title);
  position: absolute;
  left: 70px;
  top: 50%;
  transform: translate(-6px, -50%);
  white-space: nowrap;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--bg);
  padding: 4px 8px;
  border: 1px solid var(--rule);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms ease;
}
.rail li:hover::before {
  opacity: 1;
  transform: translate(0, -50%);
}
.rail a::after {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: var(--rule);
  transition: width 220ms ease, background 220ms ease;
}
.rail a:hover, .rail li.active a { color: var(--ink); }
.rail li.active a::after { width: 56px; background: var(--ink); }

/* ============================================================
   Layout helpers
   ============================================================ */
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
  font-weight: 500;
}
.kicker {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--ink-2);
  margin: 10px 0 0;
  max-width: 60ch;
  line-height: 1.4;
}

.section-head {
  padding: 0 var(--gutter);
  max-width: var(--max);
  margin: 0 auto 48px;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  margin: 0;
  letter-spacing: -0.01em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  font-weight: 500;
  border: 1px solid var(--ink);
}
.btn:hover { background: transparent; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 0;
  padding: 96px var(--gutter) 56px;
  align-items: end;
  overflow: hidden;
}
.hero-img {
  order: 2;
  align-self: stretch;
  position: relative;
  margin-top: 24px;
  height: calc(100vh - 152px);
  min-height: 520px;
  overflow: hidden;
}
.hero-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.92) contrast(1.04) saturate(1.05);
  transform: scale(1.02);
  animation: heroIn 1400ms cubic-bezier(.2,.7,.2,1) both;
}
@keyframes heroIn {
  from { transform: scale(1.08); opacity: 0; }
  to   { transform: scale(1.02); opacity: 1; }
}

.hero-text {
  order: 1;
  padding-right: clamp(20px, 4vw, 64px);
  max-width: 640px;
}
.hero-text h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(54px, 9vw, 132px);
  line-height: 0.92;
  margin: 14px 0 28px;
  letter-spacing: -0.02em;
}
.hero-text h1 .line {
  display: block;
  overflow: hidden;
}
.hero-text h1 .line.italic { font-style: italic; font-weight: 300; }
.hero-text .lede {
  font-size: clamp(15px, 1.3vw, 17px);
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0 0 28px;
  line-height: 1.55;
}
.hero-meta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-foot {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  order: 3;
}
.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   Index list
   ============================================================ */
.index {
  padding: 120px 0 60px;
  border-top: 1px solid var(--rule);
  margin-top: 24px;
}
.index-list {
  list-style: none;
  margin: 0 auto;
  padding: 0 var(--gutter);
  max-width: var(--max);
  border-top: 1px solid var(--rule);
}
.index-list li { border-bottom: 1px solid var(--rule); }
.index-list a {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 28px 4px;
  position: relative;
  transition: padding 240ms ease, color 200ms ease;
}
.index-list a::after {
  content: "\2192";
  position: absolute;
  right: 4px; top: 50%;
  transform: translate(20px, -50%);
  opacity: 0;
  transition: transform 280ms ease, opacity 280ms ease;
}
.index-list a:hover { padding-left: 24px; }
.index-list a:hover::after { transform: translate(0, -50%); opacity: 1; }
.index-list .n {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  color: var(--muted);
}
.index-list .t {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 36px);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.index-list .m {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ============================================================
   Project article
   ============================================================ */
.project {
  padding: 120px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid var(--rule);
  position: relative;
  overflow: clip;
}
.project + .project { padding-top: 120px; }

.proj-head {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  margin-bottom: 56px;
  align-items: start;
}
.proj-num {
  font-family: var(--serif);
  font-size: clamp(64px, 9vw, 132px);
  line-height: 0.85;
  font-weight: 300;
  color: var(--proj);
  letter-spacing: -0.02em;
  transition: color 240ms ease;
}
.proj-meta h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1;
  margin: 6px 0 0;
  letter-spacing: -0.015em;
}

.proj-body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 80px);
  margin-bottom: 56px;
  align-items: start;
}
.proj-body.alt { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.proj-body.alt .col-text { order: 2; }
.proj-body.alt .col-image { order: 1; }

.col-text p {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 16px;
  max-width: 60ch;
}
.col-text h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.col-text em { font-style: italic; }
.col-text strong { font-weight: 600; color: var(--ink); }

.facts {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 14px;
}
.facts > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  font-size: 13px;
}
.facts dt {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-size: 11px;
  padding-top: 2px;
}
.facts dd {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.5;
}

.col-image {
  margin: 0;
}
.col-image img {
  width: 100%;
  height: auto;
  background: var(--bg-2);
}
.col-image.hero-shot img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
figcaption {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 12px;
  text-transform: none;
}

/* Galleries */
.gallery {
  display: grid;
  gap: 18px;
  margin: 8px 0 0;
}
.gallery.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery figure { margin: 0; }
.gallery figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--bg-2);
  transition: transform 600ms cubic-bezier(.2,.7,.2,1), filter 400ms ease;
}
.gallery figure:hover img {
  transform: scale(1.015);
  filter: brightness(1.04);
}
.gallery.dense figure img { aspect-ratio: 16 / 9; }

.image-wide {
  margin: 18px 0 0;
}
.image-wide img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  background: var(--bg-2);
}

/* ============================================================
   About + Contact
   ============================================================ */
.about, .contact {
  padding: 120px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid var(--rule);
}
.about-body {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.bio .lede {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.3;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}
.bio p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 16px;
  max-width: 64ch;
}
.cv h3 {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 500;
}
.cv h3:not(:first-child) { margin-top: 28px; }
.cv ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.cv li { border-bottom: 1px solid var(--rule); padding: 6px 0; }

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.contact-list li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  font-size: clamp(18px, 2vw, 26px);
  font-family: var(--serif);
  font-weight: 400;
  align-items: baseline;
}
.contact-list li > span:first-child {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-list a:hover { color: var(--accent); }

/* ============================================================
   Footer
   ============================================================ */
.foot {
  padding: 36px var(--gutter);
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms cubic-bezier(.2,.7,.2,1), transform 800ms cubic-bezier(.2,.7,.2,1);
}
[data-reveal].in {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 980px) {
  .rail { display: none; }
  .topnav { display: none; }
  .menu-btn { display: inline-block; }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 100px;
    min-height: auto;
  }
  .hero-img {
    order: 2;
    margin-top: 28px;
    height: 60vh;
    min-height: 360px;
  }
  .hero-text { order: 1; padding-right: 0; }
  .hero-foot {
    position: static;
    margin-top: 18px;
    grid-column: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .proj-head {
    grid-template-columns: 80px 1fr;
    gap: 18px;
  }
  .proj-num { font-size: 56px; }

  .proj-body, .proj-body.alt { grid-template-columns: 1fr; }
  .proj-body.alt .col-text { order: 2; }
  .proj-body.alt .col-image { order: 1; }

  .gallery.g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery.dense.g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .about-body { grid-template-columns: 1fr; }
  .contact-list li { grid-template-columns: 100px 1fr; }
  .index-list a { grid-template-columns: 50px 1fr; }
  .index-list .m { display: none; }

  .brand-meta .muted { display: none; }
  .brand-meta { font-size: 14px; }

  /* mobile nav drawer */
  .topnav.open {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    background: var(--bg);
    padding: 20px var(--gutter) 32px;
    border-bottom: 1px solid var(--rule);
  }
  .topnav.open a {
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
    font-size: 16px;
    text-transform: none;
    letter-spacing: 0;
  }
  .topnav.open a.pdf { border: 1px solid var(--ink); margin-top: 12px; align-self: start; }
}

@media (max-width: 560px) {
  .gallery.g-2, .gallery.g-3 { grid-template-columns: 1fr; }
  .image-wide img { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Scroll progress bar
   ============================================================ */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 60;
  background: transparent;
  pointer-events: none;
}
.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ink);
  transition: width 80ms linear;
}

/* ============================================================
   Project nav (prev / next)
   ============================================================ */
.proj-nav {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.proj-nav a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 0;
  transition: transform 220ms ease, color 200ms ease;
}
.proj-nav a.next { text-align: right; align-items: flex-end; }
.proj-nav .dir {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.proj-nav .title {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.proj-nav a.prev:hover { transform: translateX(-4px); color: var(--accent); }
.proj-nav a.next:hover { transform: translateX(4px); color: var(--accent); }
.proj-nav a:only-child {
  grid-column: 1 / -1;
}
.proj-nav a.next:only-child { text-align: right; align-items: flex-end; }

/* ============================================================
   Back-to-top
   ============================================================ */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 45;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 220ms ease, transform 220ms ease, background 180ms ease, color 180ms ease;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 12px rgba(20, 17, 15, 0.08);
}
.to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.to-top:hover { background: var(--ink); color: var(--bg); }

/* ============================================================
   Lightbox
   ============================================================ */
.figure-zoom {
  cursor: zoom-in;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 17, 15, 0.92);
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 56px clamp(16px, 4vw, 64px) 48px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}
.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox[hidden] { display: none; }
.lb-stage {
  margin: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 14px;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
}
.lb-stage img {
  max-width: min(96vw, 1600px);
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #0a0908;
  display: block;
  margin: 0 auto;
}
.lb-stage figcaption {
  text-align: center;
  color: rgba(243, 239, 232, 0.85);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  margin: 0;
  padding: 0 8px;
}
.lightbox button {
  position: absolute;
  background: rgba(243, 239, 232, 0.08);
  border: 1px solid rgba(243, 239, 232, 0.22);
  color: var(--bg);
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
  font-family: var(--serif);
  font-weight: 400;
}
.lightbox button:hover {
  background: rgba(243, 239, 232, 0.18);
  border-color: rgba(243, 239, 232, 0.45);
}
.lb-close {
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 26px;
  line-height: 1;
}
.lb-prev, .lb-next {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 30px;
  line-height: 1;
}
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-prev:hover { transform: translate(-2px, -50%); }
.lb-next:hover { transform: translate(2px, -50%); }
.lb-counter {
  color: rgba(243, 239, 232, 0.6);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 12px;
}

/* ============================================================
   Email copy toast
   ============================================================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  z-index: 110;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease, transform 240ms ease;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============================================================
   Mobile additions
   ============================================================ */
@media (max-width: 980px) {
  .proj-nav {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .proj-nav a.next { text-align: left; align-items: flex-start; }
  .to-top { right: 14px; bottom: 14px; width: 40px; height: 40px; }
  .lb-prev, .lb-next { width: 42px; height: 42px; font-size: 24px; }
}

/* ============================================================
   Custom cursor (mouse-only, hidden on touch)
   ============================================================ */
.cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 200;
  display: none;
  mix-blend-mode: difference;
}
@media (hover: hover) and (pointer: fine) {
  body.cursor-on { cursor: none; }
  body.cursor-on a, body.cursor-on button, body.cursor-on .figure-zoom, body.cursor-on .figure-zoom img,
  body.cursor-on .menu-btn, body.cursor-on input, body.cursor-on label { cursor: none; }
  body.cursor-on .cursor { display: block; }
}
.cursor-dot, .cursor-ring {
  position: absolute;
  top: 0; left: 0;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  will-change: transform, width, height, opacity;
}
.cursor-dot {
  width: 6px;
  height: 6px;
  background: #fdfaf3;
  transition: width 180ms ease, height 180ms ease, opacity 180ms ease;
}
.cursor-ring {
  width: 32px;
  height: 32px;
  border: 1px solid #fdfaf3;
  transition: width 260ms cubic-bezier(.2,.7,.2,1), height 260ms cubic-bezier(.2,.7,.2,1), opacity 200ms ease, background 200ms ease;
}
body.cursor-hover .cursor-dot { width: 0; height: 0; opacity: 0; }
body.cursor-hover .cursor-ring { width: 56px; height: 56px; background: rgba(253, 250, 243, 0.18); }
body.cursor-zoom .cursor-ring { width: 80px; height: 80px; }
body.cursor-zoom .cursor-dot { opacity: 0; }
.cursor-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: #fdfaf3;
  font-weight: 500;
  opacity: 0;
  transition: opacity 160ms ease;
}
body.cursor-zoom .cursor-ring::after {
  content: "VIEW";
  opacity: 1;
}

/* ============================================================
   Marquee
   ============================================================ */
.marquee {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  background: var(--bg);
  padding: 18px 0;
  margin-top: 0;
}
.marquee-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee-group {
  display: inline-flex;
  align-items: center;
  gap: 36px;
  padding-right: 36px;
  font-family: var(--serif);
  font-size: clamp(24px, 4vw, 48px);
  font-weight: 400;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--ink);
}
.marquee-group .italic { font-style: italic; color: var(--accent); }
.marquee-group .dot {
  font-size: 0.5em;
  color: var(--accent);
  display: inline-block;
  transform: translateY(-0.15em);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ============================================================
   Sticky giant project stamps
   ============================================================ */
.proj-stamp {
  position: absolute;
  right: clamp(-40px, -1vw, 8px);
  top: 0;
  bottom: 0;
  width: 0;
  pointer-events: none;
  z-index: 0;
}
.proj-stamp span {
  position: sticky;
  top: 12vh;
  display: block;
  font-family: var(--serif);
  font-size: clamp(180px, 32vw, 460px);
  line-height: 0.85;
  font-weight: 300;
  color: var(--proj);
  opacity: 0.06;
  letter-spacing: -0.04em;
  transform: translateX(-100%);
  white-space: nowrap;
  user-select: none;
}
.project > * { position: relative; z-index: 1; }
.project > .proj-stamp { z-index: 0; }

@media (max-width: 980px) {
  .proj-stamp span { font-size: clamp(140px, 50vw, 280px); opacity: 0.05; }
}

/* ============================================================
   Hero scribble underline on italic name
   ============================================================ */
.hero-text h1 .italic { position: relative; display: inline-block; }
.hero-text h1 .scribble {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.05em;
  width: 100%;
  height: 0.18em;
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: scribbleIn 1600ms cubic-bezier(.6,.05,.2,1) 700ms forwards;
}
@keyframes scribbleIn {
  to { stroke-dashoffset: 0; }
}

/* ============================================================
   Confetti
   ============================================================ */
.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 150;
  overflow: hidden;
}
.confetti-bit {
  position: absolute;
  top: -20px;
  width: 14px;
  height: 14px;
  opacity: 0.95;
  animation: confettiFall var(--d, 3s) cubic-bezier(.4,.1,.4,1) forwards;
  transform: translate3d(0,0,0) rotate(0);
}
.confetti-bit.sq { background: var(--c, var(--accent)); }
.confetti-bit.ci { background: var(--c, var(--accent)); border-radius: 999px; }
.confetti-bit.tr {
  width: 0; height: 0;
  background: transparent;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 14px solid var(--c, var(--accent));
}
@keyframes confettiFall {
  0%   { transform: translate3d(0, -10vh, 0) rotate(0); opacity: 0.95; }
  85%  { opacity: 0.95; }
  100% { transform: translate3d(var(--x, 40px), 110vh, 0) rotate(var(--r, 720deg)); opacity: 0; }
}

/* Active rail link borrows the project accent */
.rail li.active a::after { background: var(--proj, var(--ink)); }

/* ============================================================
   Reduced-motion overrides for new animations
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .hero-text h1 .scribble { stroke-dashoffset: 0; animation: none; }
  .confetti { display: none; }
}

/* ============================================================
   Print
   ============================================================ */
@media print {
  :root { --bg: #fff; --bg-2: #fff; --ink: #000; --ink-2: #111; --muted: #555; --rule: #ccc; }
  .topbar, .rail, .menu-btn, .progress, .to-top, .lightbox, .toast,
  .hero-foot, .scroll-hint, .proj-nav, .topnav, .hero-meta,
  .cursor, .marquee, .proj-stamp, .confetti { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; line-height: 1.45; }
  a { color: #000; text-decoration: none; }
  .hero { min-height: auto; padding: 0; grid-template-columns: 1fr; }
  .hero-img { height: auto; min-height: 0; }
  .hero-img img { animation: none !important; transform: none !important; height: auto; max-height: 60vh; }
  .project, .about, .contact, .index { padding: 24px 16px; max-width: 100%; }
  .project { page-break-before: always; break-before: page; }
  .proj-body, .proj-body.alt { display: block; }
  .col-text, .col-image { max-width: 100%; }
  .gallery { gap: 8px; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  figure { break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }
}
