/* =============================================================================
   atastaai — editorial luxury portfolio
   Dark-first · monochrome · Space Grotesk / Archivo
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@300;400;500;600&display=swap");

/* ---------------------------------------------------------------- tokens */
:root {
  --bg: #0a0a0b;
  --bg-2: #0e0e11;
  --surface: #141417;
  --surface-2: #1b1b1f;

  --text: #f0efed;
  --text-2: #a6a6a2;
  /* muted body */
  --text-3: #76766f;
  /* labels / meta */

  --line: rgba(255, 255, 255, 0.13);
  --line-soft: rgba(255, 255, 255, 0.07);

  --inverse-bg: #f4f3f0;
  --inverse-text: #0c0c0d;

  --font-display: "Archivo", "Helvetica Neue", system-ui, sans-serif;
  --font-body: "Archivo", "Helvetica Neue", system-ui, -apple-system, sans-serif;

  --radius: 18px;
  --radius-sm: 10px;

  --container: 100%;
  --gutter: clamp(18px, 1.6vw, 32px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --header-h: 92px;
}

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

* {
  margin: 0;
}

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

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

body.page-ready {
  opacity: 1;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
}

ul {
  list-style: none;
  padding: 0;
}

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

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

/* --------------------------------------------------------------- layout */
.container {
  width: 100%;
  max-width: none;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
}

.u-link {
  position: relative;
  transition: color 0.3s var(--ease);
}

.u-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}

.u-link:hover {
  color: var(--text);
}

.u-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ------------------------------------------------------------- reveals */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0ms);
}

[data-reveal].in-view {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ================================================================ HEADER */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: grid;
  /* logo | nav col 1 (~40%) | nav col 2 (~60%) — matches reference 1.jpg */
  grid-template-columns: 39.5% 19.5% 1fr;
  align-items: start;
  padding: 26px var(--gutter);
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}

.site-header.is-scrolled {
  padding-block: 14px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.7rem, 2.6vw, 2.5rem);
  letter-spacing: -0.02em;
}

.logo-mark {
  width: clamp(34px, 3vw, 46px);
  height: clamp(34px, 3vw, 46px);
  color: var(--text);
}

.logo-mark svg {
  width: 100%;
  height: 100%;
}

.logo-text {
  line-height: 1;
}

/* nav groups land directly in the header grid columns */
.nav-bar {
  display: contents;
}

.nav-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-top: 6px;
}

.nav-link {
  position: relative;
  font-size: 1.02rem;
  color: var(--text);
  letter-spacing: 0.01em;
  transition: color 0.3s var(--ease), opacity 0.3s var(--ease);
  padding-block: 2px;
}

.nav-link:not(:hover):not(.is-active) {
  opacity: 0.92;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-toggle {
  display: none;
}

/* ============================================================ BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 100px;
  background: var(--inverse-bg);
  color: var(--inverse-text);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform 0.4s var(--ease-out), background 0.3s var(--ease), opacity 0.3s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  background: #fff;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* ================================================================== HERO */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: 48px;
}

.hero-grid {
  display: grid;
  /* text ~39.5% | image to the right edge — matches reference 1.jpg */
  grid-template-columns: 39.5% 1fr;
  gap: 0;
  align-items: end;
  width: 100%;
}

/* left text column */
.hero-copy {
  max-width: 440px;
  padding-right: clamp(24px, 3vw, 56px);
}

.philosophy-label,
.featured-project .eyebrow {
  margin-bottom: 22px;
}

.philosophy-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.28rem;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
  color: var(--text);
}

.philosophy-body p {
  color: var(--text-2);
  font-size: 1.02rem;
  margin-bottom: 18px;
  max-width: 42ch;
}

.philosophy-body strong {
  color: var(--text);
  font-weight: 500;
}

.hero-divider {
  height: 1px;
  background: var(--line-soft);
  margin: clamp(30px, 4vw, 48px) 0;
}

.featured-project .eyebrow {
  display: block;
}

.fp-name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 8px 0 18px;
}

.fp-desc {
  color: var(--text-2);
  font-size: 1.05rem;
  max-width: 34ch;
}

.fp-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.fp-cta .u-link {
  color: var(--text-2);
}

/* text fade on slide change */
@keyframes fpIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.featured-project.fp-animate .fp-name,
.featured-project.fp-animate .fp-desc {
  animation: fpIn 0.7s var(--ease-out) both;
}

.featured-project.fp-animate .fp-desc {
  animation-delay: 0.06s;
}

/* --------------------------------------------------------- carousel */
.carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  outline: none;
}

.carousel-track {
  position: relative;
  height: clamp(440px, 74vh, 940px);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1s var(--ease), transform 1.4s var(--ease-out);
  pointer-events: none;
}

.carousel-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.carousel-slide .ph-svg,
.carousel-slide .ph-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-tag {
  position: absolute;
  left: 22px;
  top: 22px;
  z-index: 3;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(10, 10, 11, 0.5);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line-soft);
  padding: 7px 14px;
  border-radius: 100px;
}

.carousel-nav {
  position: absolute;
  bottom: 22px;
  right: 22px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.c-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(10, 10, 11, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  color: var(--text);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease-out);
}

.c-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: scale(1.06);
}

.c-btn svg {
  width: 18px;
  height: 18px;
}

.carousel-dots {
  position: absolute;
  left: 22px;
  bottom: 26px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  transition: background 0.4s var(--ease), width 0.4s var(--ease);
}

.carousel-dot.is-active {
  background: var(--text);
  width: 44px;
}

/* ===================================================== INTRO (ref 2.png) */
.intro {
  position: relative;
  margin-top: clamp(40px, 8vw, 120px);
}

.intro-stage {
  position: relative;
  min-height: clamp(520px, 78vh, 860px);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.intro-stage .ph-svg,
.intro-stage .ph-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}

.intro-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(8, 8, 9, 0.72), rgba(8, 8, 9, 0.25) 55%, rgba(8, 8, 9, 0.6));
}

.intro-corner {
  position: absolute;
  z-index: 3;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.85);
}

.intro-corner.tr {
  top: 30px;
  right: 32px;
}

.intro-corner.bl {
  left: 32px;
  bottom: 30px;
}

.intro-corner.br {
  right: 32px;
  bottom: 30px;
}

.intro-block {
  position: absolute;
  z-index: 3;
  max-width: 300px;
  color: #fff;
}

.intro-block .ib-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 10px;
}

.intro-block p {
  font-size: 0.98rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}

.intro-block.b1 {
  top: 16%;
  left: 8%;
}

.intro-block.b2 {
  top: 40%;
  left: 30%;
}

.intro-block.b3 {
  top: 58%;
  left: 12%;
  max-width: 340px;
}

.intro-name {
  position: absolute;
  z-index: 3;
  right: 7%;
  top: 24%;
  text-align: right;
}

.intro-name .in-roles {
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.intro-name h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-top: 8px;
}

/* readable fallback list under stage on small screens */
.intro-readable {
  display: none;
}

/* ============================================================== SECTION HEAD */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-block: clamp(60px, 9vw, 130px) clamp(28px, 4vw, 52px);
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

.section-head .eyebrow {
  margin-bottom: 16px;
}

.section-head p {
  color: var(--text-2);
  max-width: 40ch;
}

/* ================================================================== FOOTER */
.site-footer {
  margin-top: clamp(40px, 5vw, 80px);
  padding: clamp(48px, 7vw, 96px) 0 36px;
  border-top: 1px solid var(--line-soft);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.2fr;
  gap: clamp(28px, 5vw, 64px);
  padding-inline: var(--gutter);
  max-width: var(--container);
  margin-inline: auto;
}

.f-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 18px;
}

.f-email {
  font-size: 1.05rem;
  display: inline-block;
  margin-bottom: 22px;
}

.f-social {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-2);
}

.f-nav ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-2);
}

.f-note p:not(.f-label) {
  color: var(--text-2);
  max-width: 40ch;
  font-size: 0.96rem;
}

.footer-mark {
  position: relative;
  margin-top: clamp(40px, 6vw, 80px);
  padding-inline: var(--gutter);
  max-width: var(--container);
  margin-inline: auto;
}

.footer-wordmark {
  display: block;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3.4rem, 15vw, 12.5rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: var(--text);
  white-space: nowrap;
}

.footer-photo {
  position: absolute;
  right: clamp(14%, 16vw, 20%);
  bottom: 6%;
  width: clamp(80px, 10vw, 130px);
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  overflow: hidden;
  filter: grayscale(1);
}

.footer-photo .ph-svg,
.footer-photo .ph-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer-legal {
  position: absolute;
  right: var(--gutter);
  bottom: 10%;
  text-align: right;
}

.footer-legal ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-2);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.footer-legal .copyright {
  color: var(--text-3);
  font-size: 0.85rem;
}

/* ============================================================== WORKS PAGE */
.page-hero {
  padding-top: calc(var(--header-h) + clamp(36px, 8vw, 96px));
  padding-bottom: clamp(24px, 4vw, 48px);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.6rem, 9vw, 6.5rem);
  letter-spacing: -0.04em;
  line-height: 0.92;
}

.page-hero .lede {
  color: var(--text-2);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  max-width: 52ch;
  margin-top: 22px;
}

.works-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-block: 8px 40px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: clamp(40px, 5vw, 64px);
}

.filter-btn {
  padding: 9px 18px;
  border-radius: 100px;
  border: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--text-2);
  transition: all 0.3s var(--ease);
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--text-2);
}

.filter-btn.is-active {
  background: var(--inverse-bg);
  color: var(--inverse-text);
  border-color: var(--inverse-bg);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 44px) clamp(20px, 2.5vw, 36px);
}

.work-card {
  display: flex;
  flex-direction: column;
}

.work-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}

.work-media .ph-svg,
.work-media .ph-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out), filter 0.6s var(--ease);
}

.work-card:hover .ph-svg,
.work-card:hover .ph-img {
  transform: scale(1.05);
}

.work-index {
  position: absolute;
  top: 16px;
  right: 18px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  z-index: 2;
}

.work-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.work-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  transition: color 0.3s var(--ease);
}

.work-cat {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}

.work-tagline {
  color: var(--text-2);
  font-size: 0.95rem;
  margin-top: 8px;
  max-width: 34ch;
}

.work-card:hover .work-name {
  color: #fff;
}

/* Works page: compact 3×2 grid that fits one screen on desktop */
body[data-page="works"] .page-hero {
  padding-top: calc(var(--header-h) + clamp(16px, 2vw, 28px));
  padding-bottom: 12px;
}

body[data-page="works"] .page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

body[data-page="works"] .page-hero .lede {
  display: none;
}

body[data-page="works"] .works-filter {
  padding-block: 6px 16px;
  margin-bottom: clamp(18px, 2vw, 28px);
}

body[data-page="works"] .works-grid {
  gap: clamp(20px, 2.4vw, 40px) clamp(20px, 2.5vw, 36px);
}

body[data-page="works"] .work-meta {
  margin-top: 14px;
}

body[data-page="works"] .work-tagline {
  display: none;
}

/* ============================================================ PROJECT PAGE */
.project-hero {
  padding-top: calc(var(--header-h) + clamp(28px, 6vw, 72px));
  padding-bottom: clamp(12px, 1.5vw, 20px);
}

.back-link {
  font-size: 0.9rem;
  color: var(--text-2);
  display: inline-block;
  margin-bottom: clamp(28px, 5vw, 56px);
}

.project-hero .eyebrow {
  margin-bottom: 18px;
}

.project-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.5rem, 8vw, 6rem);
  letter-spacing: -0.045em;
  line-height: 0.9;
}

.project-lede {
  color: var(--text-2);
  font-size: clamp(0.9rem, 2vw, 1.3rem);
  max-width: 48ch;
  margin-top: 24px;
}

.project-media {
  margin-block: clamp(16px, 2vw, 28px) clamp(36px, 5vw, 64px);
}

.project-media-inner {
  height: clamp(280px, 56vh, 600px);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.project-media-inner .ph-svg,
.project-media-inner .ph-img,
.project-media-inner .ph-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-body {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(36px, 6vw, 96px);
  padding-bottom: clamp(48px, 7vw, 100px);
}

/* with a case video: facts | text | sticky video window */
.project-body.has-video {
  grid-template-columns: 300px minmax(0, 1fr) minmax(0, 42%);
  gap: clamp(28px, 4vw, 64px);
}

.project-body.has-video .project-facts { grid-column: 1; grid-row: 1; }
.project-body.has-video .project-case { grid-column: 2; grid-row: 1; }
.project-body.has-video .project-case-video { grid-column: 3; grid-row: 1; }

/* the video follows the scroll (sticky) until the text column ends */
.project-case-video {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  align-self: start;
}

.project-case-video .ph-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface);
}

.project-facts {
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: calc(var(--header-h) + 20px);
  align-self: start;
  height: max-content;
  border-top: 1px solid var(--line-soft);
  padding-top: 28px;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fact-label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}

.fact-val {
  font-size: 1.02rem;
  color: var(--text);
}

.fact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.fact-tags li {
  font-size: 0.8rem;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--text-2);
}

.case-section {
  margin-bottom: clamp(36px, 5vw, 60px);
  max-width: 60ch;
}

.case-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.case-text {
  color: var(--text-2);
  font-size: 1.08rem;
  line-height: 1.75;
}

/* project gallery — 8 placeholder images, 2 rows × 4 */
.project-gallery {
  margin: clamp(24px, 4vw, 56px) 0 clamp(40px, 6vw, 72px);
}

.gallery-label {
  margin-bottom: clamp(16px, 2vw, 24px);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 1vw, 18px);
}

.gallery-item {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}

.gallery-item .ph-svg,
.gallery-item .ph-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out);
}

.gallery-item:hover .ph-svg,
.gallery-item:hover .ph-img {
  transform: scale(1.05);
}

.project-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: clamp(8px, 2vw, 24px);
  border-top: 1px solid var(--line-soft);
  padding-bottom: clamp(12px, 2vw, 24px);
}

.pn-item {
  padding: clamp(20px, 3vw, 36px) 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 0.3s var(--ease);
}

.pn-next {
  text-align: right;
  align-items: flex-end;
}

.pn-dir {
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}

.pn-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  transition: color 0.3s var(--ease);
}

.pn-item:hover .pn-name {
  color: #fff;
}

.project-missing {
  padding-top: calc(var(--header-h) + 80px);
  text-align: center;
}

.project-missing h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.4rem, 8vw, 5rem);
  letter-spacing: -0.03em;
  margin: 12px 0 18px;
}

.project-missing .lede {
  color: var(--text-2);
  margin-bottom: 32px;
}

/* ================================================================= CV PAGE */
.cv-hero .roles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 24px;
}

.cv-hero .roles span {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-2);
}

.cv-hero .roles span:not(:last-child)::after {
  content: "·";
  margin-left: 18px;
  color: var(--text-3);
}

.cv-bio {
  color: var(--text-2);
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  line-height: 1.65;
  max-width: 62ch;
  margin-top: 28px;
}

.cv-section {
  padding-block: clamp(48px, 7vw, 96px);
  border-top: 1px solid var(--line-soft);
}

/* the last CV section (the CTA) sits right above the footer — keep it tight */
body[data-page="cv"] .cv-section:last-of-type {
  padding-bottom: clamp(20px, 2.5vw, 36px);
}

.cv-section-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(28px, 5vw, 72px);
}

.cv-section h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

.cv-section h2 .eyebrow {
  display: block;
  margin-bottom: 14px;
}

/* experience timeline */
.exp-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line-soft);
}

.exp-item:last-child {
  border-bottom: 0;
}

.exp-year {
  color: var(--text-3);
  font-family: var(--font-display);
  font-size: 0.95rem;
  padding-top: 3px;
}

.exp-role {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.exp-co {
  color: var(--text-2);
  font-size: 0.92rem;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.exp-desc {
  color: var(--text-2);
  max-width: 56ch;
}

/* skills + focus cards */
.skill-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.skill-cols ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-cols h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.skill-cols li {
  color: var(--text-2);
  font-size: 0.96rem;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.focus-card {
  background: var(--bg);
  padding: clamp(28px, 4vw, 44px);
  transition: background 0.4s var(--ease);
}

.focus-card:hover {
  background: var(--surface);
}

.focus-card .num {
  font-family: var(--font-display);
  color: var(--text-3);
  font-size: 0.85rem;
}

.focus-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.02em;
  margin: 14px 0 14px;
}

.focus-card p {
  color: var(--text-2);
  max-width: 42ch;
}

/* ============================================================ CONTACT PAGE */
.contact-page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(var(--header-h) + 40px) var(--gutter) 60px;
  overflow: hidden;
}

.contact-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.contact-bg .ph-svg,
.contact-bg .ph-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}

.contact-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(8, 8, 9, 0.35), rgba(8, 8, 9, 0.78));
}

.contact-card {
  position: relative;
  z-index: 2;
  width: min(560px, 100%);
  background: var(--inverse-bg);
  color: var(--inverse-text);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 56px);
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.7);
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--inverse-text);
  color: var(--inverse-bg);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 26px;
}

.contact-card h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin-bottom: 8px;
}

.contact-card .sub {
  color: #565654;
  margin-bottom: 28px;
  max-width: 40ch;
}

.field {
  position: relative;
  margin-bottom: 4px;
  padding-block: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.16);
}

.field input,
.field textarea {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--inverse-text);
  padding: 6px 0;
  outline: none;
  resize: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #8b8b88;
}

.field.has-error {
  border-color: #b42318;
}

.field-error {
  color: #b42318;
  font-size: 0.8rem;
  min-height: 1.1em;
  margin-top: 4px;
}

/* general submit error (network / server) */
.form-error {
  color: #b42318;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-top: 16px;
  min-height: 1em;
}

/* honeypot — hidden from humans, off-screen and out of tab order */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}

.step-back {
  font-size: 0.9rem;
  color: #565654;
}

.step-back:hover {
  color: var(--inverse-text);
}

.contact-card .btn {
  background: var(--inverse-text);
  color: var(--inverse-bg);
}

.contact-card .btn:hover {
  background: #000;
}

.contact-success {
  text-align: center;
}

.contact-success .check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--inverse-text);
  color: var(--inverse-bg);
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
}

.contact-success h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.contact-success p {
  color: #565654;
  max-width: 36ch;
  margin: 0 auto;
}

.contact-form-inner.is-sent {
  display: none;
}

/* ========================================================= RESPONSIVE */
@media (max-width: 980px) {
  :root {
    --header-h: 76px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-copy {
    order: 2;
    max-width: none;
    padding-right: 0;
  }

  .carousel {
    order: 1;
  }

  .carousel-track {
    height: clamp(320px, 48vh, 560px);
  }

  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-body,
  .project-body.has-video {
    grid-template-columns: 1fr;
  }

  .project-body.has-video .project-facts,
  .project-body.has-video .project-case,
  .project-body.has-video .project-case-video {
    grid-column: auto;
    grid-row: auto;
  }

  .project-case-video {
    position: static;
  }

  .project-facts {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 28px 48px;
  }

  .cv-section-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .skill-cols {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .f-note {
    grid-column: 1 / -1;
  }

  .footer-photo {
    display: none;
  }

  .footer-legal {
    position: static;
    text-align: left;
    margin-top: 32px;
  }
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr;
    align-items: center;
  }

  .nav-bar {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--bg-2);
    padding: 8px var(--gutter) 16px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
    border-bottom: 1px solid var(--line-soft);
  }

  .nav-group {
    display: contents;
  }

  body.nav-open .nav-bar {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav-link {
    padding-block: 14px;
    font-size: 1.15rem;
    width: 100%;
    border-bottom: 1px solid var(--line-soft);
  }

  .nav-link:last-child {
    border-bottom: 0;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 16px;
    right: var(--gutter);
    z-index: 110;
  }

  .nav-toggle span {
    width: 22px;
    height: 1.5px;
    background: var(--text);
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  }

  body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }

  body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  /* INTRO becomes readable stacked layout */
  .intro-stage {
    min-height: 420px;
  }

  .intro-block,
  .intro-name,
  .intro-corner {
    display: none;
  }

  .intro-readable {
    display: block;
    padding: 36px var(--gutter) 0;
    max-width: var(--container);
    margin-inline: auto;
  }

  .intro-readable .in-roles {
    color: var(--text-3);
    font-size: 0.74rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
  }

  .intro-readable h2 {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2rem, 9vw, 3rem);
    letter-spacing: -0.03em;
    margin: 12px 0 20px;
  }

  .intro-readable p {
    color: var(--text-2);
    margin-bottom: 16px;
    max-width: 56ch;
  }

  .works-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-nav {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .pn-next {
    text-align: left;
    align-items: flex-start;
    border-top: 1px solid var(--line-soft);
  }

  .focus-grid {
    grid-template-columns: 1fr;
  }

  .exp-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}