/* ── Reset & Base ─────────────────────────────────────────── */

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

:root {
  /* Design system */
  --strong:      #ffffff;   /* strong text            */
  --body:        #a0a0a0;   /* body text              */
  --muted:       #777575;   /* muted text             */
  --bg:          #151515;   /* page background        */
  --bg-accent:   #202020;   /* lighter accent panels  */
  --bg-footer:   #101010;   /* footer / contact dark  */
  --bg-about:    #252626;   /* about section bg       */
  --border:      #353535;   /* primary border         */
  --border-light:#464646;   /* lighter divider        */
  --bg-darkest:  #0d0d0d;   /* deepest panel (header) */
  --bg-main:     #191919;   /* project body bg        */
  --purple:      #7E57FF;   /* purple accent          */
  --pink:        #FF00E5;   /* pink accent            */

  --font-body:   'Golos Text', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:   'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --gutter:      clamp(1.5rem, 6vw, 90px);

  /* Legacy aliases (used by project detail page + gate) */
  --text:        var(--strong);
  --text-muted:  var(--body);
  --accent:      var(--purple);
  --accent-dim:  #2a2342;
  --bg-subtle:   #1a1a1a;
  --bg-card:     var(--bg-accent);
  --max-w:       1200px;
  --font-sans:   var(--font-body);
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--body);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.accent-purple { color: var(--purple); }
.accent-pink   { color: var(--pink); }

/* ── Navigation ───────────────────────────────────────────── */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 100px;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s;
}

nav.scrolled {
  background: rgba(21, 21, 21, 0.85);
  backdrop-filter: blur(12px);
 
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 300;
  font-style: italic;
  font-size: 0.9rem;
  letter-spacing: clamp(0.3em, 1vw, 1em);
  text-transform: uppercase;
  color: var(--strong);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: clamp(1.5rem, 3.6vw, 66px);
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--strong);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--purple);
}

.nav-links a.is-active {
  color: var(--pink);
}

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 160px var(--gutter) clamp(4rem, 12vh, 200px);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bg);
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  mix-blend-mode: soft-light;
}

.hero-message {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(2.75rem, 7.6vw, 132px);
  line-height: 0.93;
  letter-spacing: -0.01em;
  color: var(--strong);
  max-width: 1447px;
}

/* ── Section title bars ───────────────────────────────────── */

.section-head {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 40px var(--gutter) 40px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.section-head--ruled {
  border-top: 1px solid var(--border);
}

.section-label {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 0.78rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--strong);
  white-space: nowrap;
}

.arrows {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.arrows .arrow {
  width: 20px;
  height: 20px;
  fill: var(--purple);
  transform: rotate(90deg);
}

.arrows .o60 { opacity: 0.6; }
.arrows .o30 { opacity: 0.3; }

/* ── Recent Work ──────────────────────────────────────────── */

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

.work-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(2.5rem, 5vw, 80px);
  background: var(--bg-accent);
  border-bottom: 1px solid var(--border);
  color: inherit;
  transition: background-color 0.25s ease;
}

.work-company {
  display: block;
  font-family: var(--font-mono);
  font-weight: 300;
  font-style: italic;
  font-size: 0.85rem;
  letter-spacing: 0.9em;
  text-transform: uppercase;
  color: var(--pink);
  transition: color 0.25s ease;
}

.work-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(2.25rem, 5vw, 77px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: #fff5f5;
  margin-top: 0.15em;
}

.work-row-desc {
  flex-shrink: 0;
  width: 610px;
  max-width: 45%;
  min-height: 91px;
  display: flex;
  align-items: center;
  padding-left: 30px;
  border-left: 3px solid var(--border);
  transition: border-color 0.25s ease;
}

.work-row-desc p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.6vw, 27px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 460px;
  transition: color 0.25s ease;
}

/* Hover state (matches "Agent Vision" row in the design) */
.work-row:hover,
.work-row:focus-visible {
  background: var(--purple);
  outline: none;
}

.work-row:hover .work-company,
.work-row:focus-visible .work-company {
  color: #191919;
}

.work-row:hover .work-row-desc,
.work-row:focus-visible .work-row-desc {
  border-left-color: #370231;
}

.work-row:hover .work-row-desc p,
.work-row:focus-visible .work-row-desc p {
  color: #ffffff;
}

/* ── About ────────────────────────────────────────────────── */

.about {
  background: var(--bg-about);
}

.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 602fr) minmax(0, 669fr);
  gap: clamp(1.67rem, 5.33vw, 80px);
  align-items: start;
  padding: clamp(3rem, 8vw, 120px) var(--gutter);
  max-width: 1571px;
}

.about-photo > img {
  width: 100%;
  aspect-ratio: 602 / 518;
  object-fit: cover;
  border-radius: 12px;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.about-heading {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 24px;
  border-left: 4px solid var(--purple);
}

.about-eyebrow {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 0.85rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--pink);
}

.about-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.2vw, 36px);  /* floor ~27px on phones, cap 36px on desktop */
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #fff5f5;
}

.about-body p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--body);
}

.about-body p + p {
  margin-top: 1.6em;
}

.about-body strong {
  font-weight: 600;
  color: var(--strong);
}

.about-body a {
  font-weight: 600;
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.about-body a:hover {
  color: var(--strong);
}

/* ── Contact ──────────────────────────────────────────────── */

.contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
  padding: clamp(3rem, 5vw, 80px) var(--gutter);
  background: var(--bg-footer);
}

.contact-link {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 60px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--strong);
  transition: color 0.2s;
}

a.contact-link:hover {
  color: var(--purple);
}

.contact-kidding {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-link--struck {
  color: var(--muted);
  text-decoration: line-through;
}

.contact-jk {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 0.78rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--pink);
}

.contact-made {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-made p {
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.3;
  color: var(--font-body);
}

p.contact-footnote {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 10px;
}

/* ── Project Detail Page ──────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Shared centered column for project-detail blocks */
.pd-col {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Header (title, subtitle, meta) ── */

.pd-top {
  background: var(--bg-darkest);
  padding-top: 100px;          /* clear fixed nav */
}

.pd-header {
  padding: clamp(2.5rem, 6vw, 80px) 0;
}

.pd-header-inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.pd-title-group {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pd-back {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 0.85rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--purple);
  transition: opacity 0.2s;
}

.pd-back:hover {
  opacity: 0.7;
}

.pd-back svg {
  width: 1.15em;
  height: 1.15em;
  fill: currentColor;
  flex: none;
}

.pd-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(2.5rem, 6vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: #fff5f5;
}

.pd-subtitle {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.1rem, 2.2vw, 27px);
  line-height: 1.5;
  color: #6b6b6b;
  max-width: 923px;
}

.pd-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
}

.pd-meta-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px 20px;
  border-left: 1px solid var(--border-light);
}

.pd-meta-label {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--pink);
}

.pd-meta-value {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--body);
}

/* ── Project images ── */

.pd-shots img {
  width: 100%;
  display: block;
}

/* Support image 2 is a single, narrower screen — keep it left-aligned. */
.pd-shots--single img {
  width: 66%;
}

/* ── Main content (body sections) ── */

.pd-main {
  background: var(--bg-main);
  padding: 40px 0 80px;
  display: flex;
  flex-direction: column;
  gap: 60px;
  align-items: center;
}

.pd-rule {
  display: flex;
  align-items: center;
  gap: 30px;
  padding-top: 50px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--border);
}

.pd-section {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.pd-h2 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 64px);
  line-height: 1.0;
  letter-spacing: -0.01em;
  color: var(--strong);
}

.pd-body {
  display: flex;
  flex-direction: column;
  gap: 1.4em;
  max-width: 940px;
}

.pd-body p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.8vw, 21px);
  line-height: 1.5;
  color: #969696;
}

/* ── Password Gate ────────────────────────────────────────── */

#gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
}

.gate-card {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.gate-title {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--strong);
}

.gate-text {
  margin-bottom: 0.5rem;
  color: var(--body);
}

#gate-form {
  display: flex;
  gap: 0.75rem;
}

#gate-input {
  flex: 1;
  background: var(--bg-accent);
  border: 1px solid var(--border);
  color: var(--strong);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s;
}

#gate-input:focus {
  border-color: var(--purple);
}

#gate-form button {
  background: var(--purple);
  color: #ffffff;
  border: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
}

#gate-form button:hover {
  opacity: 0.85;
}

.gate-error {
  color: var(--pink);
  font-size: 0.85rem;
  min-height: 1.2em;
  margin: 0;
}

/* ── Responsive ───────────────────────────────────────────── */

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

  .about-photo {
    max-width: 480px;
  }

  .pd-meta {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding-top: 120px;
    padding-bottom: clamp(3rem, 10vh, 6rem);
  }

  .work-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .work-row-desc {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    padding-left: 1.25rem;
  }

  .nav-links {
    gap: 1.25rem;
  }

  .pd-meta {
    grid-template-columns: 1fr;
  }

  /* Let the narrower single image fill the column on small screens */
  .pd-shots--single img {
    width: 100%;
  }
}

/* Past the 1200px max-width, the gutter just shrinks content — drop it. */
@media (min-width: 1240px) {
  .pd-col {
    padding-left: 0;
    padding-right: 0;
  }
}

/* On very narrow screens the nav links crowd the logo — hide them. */
@media (max-width: 500px) {
  .nav-links {
    display: none;
  }
}
