@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
  --bg:           #1A1A1A;
  --surface:      #242424;
  --text:         #F5F0E8;
  --muted:        #8A8A8A;
  --accent:       #C4622D;
  --rule:         #2E2E2E;

  --font:         'DM Sans', sans-serif;

  --nav-h:        72px;
  --max-w:        1200px;
  --gutter:       clamp(24px, 5vw, 80px);

  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ─── Type Scale ─────────────────────────────────────────────── */
.t-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1;
}

.t-display {
  font-size: clamp(52px, 7vw, 88px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
}

.t-heading {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}

.t-subheading {
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text);
}

.t-body {
  font-size: clamp(15px, 1.1vw, 18px);
  font-weight: 300;
  line-height: 1.75;
  color: var(--muted);
}

.t-nav {
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
}

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

.rule {
  width: 100%;
  height: 1px;
  background: var(--rule);
}

/* ─── Navigation ─────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out);
}
.nav.scrolled { border-bottom-color: var(--rule); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav__name {
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__link {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  transition: color 0.2s;
}
.nav__link:hover { color: var(--text); }
.nav__link--cta {
  color: var(--accent);
  border: 1px solid rgba(196, 98, 45, 0.3);
  padding: 8px 18px;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}
.nav__link--cta:hover {
  background: var(--accent);
  color: var(--text);
}

/* ─── Footer ─────────────────────────────────────────────────── */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--rule);
  margin-top: 120px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.footer__name { font-size: 14px; color: var(--muted); }
.footer__email {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  transition: color 0.2s;
}
.footer__email:hover { color: var(--accent); }
.footer__copy { font-size: 12px; color: var(--muted); text-align: right; }

/* ─── Scroll Reveal ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }
.reveal-d5 { transition-delay: 0.5s; }

/* Hero lines animate in on load (no IntersectionObserver needed) */
.hero-line {
  overflow: visible;
  padding-bottom: 0.15em;
}
.hero-line span {
  display: block;
  transform: translateY(100%);
  opacity: 0;
  animation: lineReveal 0.9s var(--ease-out) forwards;
}
.hero-line:nth-child(1) span { animation-delay: 0.1s; }
.hero-line:nth-child(2) span { animation-delay: 0.25s; }
.hero-line:nth-child(3) span { animation-delay: 0.4s; }

@keyframes lineReveal {
  to { transform: translateY(0); opacity: 1; }
}

.hero-sub {
  opacity: 0;
  animation: fadeIn 0.9s var(--ease-out) 0.65s forwards;
}
.hero-cta {
  opacity: 0;
  animation: fadeIn 0.7s var(--ease-out) 0.85s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ─── Case Study Cards ───────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  cursor: pointer;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 32px rgba(196, 98, 45, 0.12);
}

.card__img {
  aspect-ratio: 16 / 9;
  background: var(--surface);
  overflow: hidden;
  position: relative;
}
.card__img img,
.card__img .img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.card__img .img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e1e1e;
  color: var(--rule);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.card:hover .card__img img,
.card:hover .card__img .img-placeholder {
  transform: scale(1.03);
}

.card__body {
  padding: 24px;
}
.card__tag { margin-bottom: 12px; }
.card__title {
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.card__desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
}
.card__year {
  font-size: 12px;
  color: var(--rule);
  font-weight: 500;
  letter-spacing: 1px;
}

/* ─── Case Study Hero ────────────────────────────────────────── */
.cs-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 80px;
  background: var(--surface);
  overflow: hidden;
  margin-top: var(--nav-h);
}
.cs-hero__img {
  position: absolute;
  inset: 0;
  background: #111;
}
.cs-hero__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.cs-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,26,26,0.85) 0%, rgba(26,26,26,0.2) 60%);
}
.cs-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.cs-hero__label { margin-bottom: 16px; }
.cs-hero__title { margin-bottom: 20px; max-width: 800px; }
.cs-hero__subtitle { max-width: 600px; }

/* ─── Stat Strip ─────────────────────────────────────────────── */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--rule);
}
.stat {
  padding: 48px var(--gutter);
  border-right: 1px solid var(--rule);
}
.stat:last-child { border-right: none; }
.stat__label { margin-bottom: 12px; }
.stat__number {
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}

/* ─── Two-Column Section ─────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 80px;
  align-items: start;
}
.two-col--reverse {
  grid-template-columns: 2fr 3fr;
}
.two-col__left {}
.two-col__right {}

/* ─── Section ────────────────────────────────────────────────── */
.section {
  padding: 100px 0;
}
.section--tight {
  padding: 60px 0;
}
.section__header {
  margin-bottom: 16px;
}
.section__title {
  margin-bottom: 24px;
}
.section__rule {
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin-bottom: 24px;
}

/* ─── Role Cards (2x2 grid) ──────────────────────────────────── */
.role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}
.role-card {
  background: var(--surface);
  padding: 40px;
  border: 1px solid var(--rule);
}
.role-card__label { margin-bottom: 14px; }
.role-card__title {
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.role-card__body { font-size: 14px; color: var(--muted); line-height: 1.65; }

/* ─── Gallery Grid ───────────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}
.gallery__item {
  aspect-ratio: 4 / 3;
  background: var(--surface);
  overflow: hidden;
  position: relative;
}
.gallery__item--tall { aspect-ratio: 3 / 4; }
.gallery__item .img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rule);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: #1e1e1e;
  transition: transform 0.5s var(--ease-out);
}
.gallery__item:hover .img-placeholder { transform: scale(1.02); }
.gallery__item img {
  transition: transform 0.5s var(--ease-out);
}
.gallery__item:hover img { transform: scale(1.02); }

/* ─── Next Project Link ──────────────────────────────────────── */
.next-project {
  padding: 60px 0;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.next-project__label { }
.next-project__link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(20px, 2.5vw, 32px);
  font-weight: 300;
  color: var(--text);
  letter-spacing: -0.02em;
  transition: color 0.2s;
}
.next-project__link:hover { color: var(--accent); }
.next-project__arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease-out);
}
.next-project__link:hover .next-project__arrow { transform: translateX(8px); }

/* ─── Three-Column Layout ────────────────────────────────────── */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.three-col__item {}
.three-col__title {
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.three-col__body { font-size: 14px; color: var(--muted); line-height: 1.65; }
.three-col__bullets {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.three-col__bullet {
  font-size: 13px;
  color: var(--muted);
  padding-left: 14px;
  position: relative;
}
.three-col__bullet::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 10px;
  top: 3px;
}

/* ─── Screenshot Pair ────────────────────────────────────────── */
.screenshot-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.screenshot {
  border: 1px solid var(--surface);
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--surface);
}
.screenshot .img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ─── Photo Grid ─────────────────────────────────────────────── */
.photo-grid {
  columns: 4;
  column-gap: 8px;
}
.photo-grid__item {
  break-inside: avoid;
  margin-bottom: 8px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  background: var(--surface);
}
.photo-grid__item .img-placeholder {
  width: 100%;
  display: block;
  background: #1e1e1e;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rule);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: transform 0.4s var(--ease-out);
}
.photo-grid__item:hover .img-placeholder { transform: scale(1.03); }
.photo-grid__item img { transition: transform 0.4s var(--ease-out); }
.photo-grid__item:hover img { transform: scale(1.03); }

/* ─── Lightbox ───────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10, 10, 10, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.lightbox.active { opacity: 1; pointer-events: all; }
.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 2px;
}
.lightbox__close {
  position: absolute;
  top: 32px;
  right: 40px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.lightbox__close:hover { color: var(--text); }

/* ─── About Page ─────────────────────────────────────────────── */
.about-bio {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 80px;
  align-items: start;
}
.headshot {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--rule);
}
.headshot .img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ─── Contact Card ───────────────────────────────────────────── */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 64px;
  text-align: center;
}
.contact-card__title { margin-bottom: 16px; }
.contact-card__body { margin-bottom: 40px; max-width: 480px; margin-left: auto; margin-right: auto; }
.contact-card__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.contact-card__link {
  font-size: 16px;
  color: var(--muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.contact-card__link:hover { color: var(--accent); }
.contact-card__link-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

/* ─── Outcome Section ────────────────────────────────────────── */
.outcome-stats {
  display: flex;
  gap: 48px;
  margin-bottom: 36px;
}
.outcome-stat__number {
  font-size: 40px;
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--text);
}
.outcome-stat__label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* ─── CTA Arrow ──────────────────────────────────────────────── */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  transition: color 0.2s;
}
.cta:hover { color: var(--accent); }
.cta__arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease-out);
}
.cta:hover .cta__arrow { transform: translateX(6px); }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr; }
  .two-col,
  .two-col--reverse { grid-template-columns: 1fr; gap: 40px; }
  .three-col { grid-template-columns: 1fr; gap: 32px; }
  .role-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--rule); }
  .stat:last-child { border-bottom: none; }
  .screenshot-pair { grid-template-columns: 1fr; }
  .photo-grid { columns: 2; }
  .about-bio { grid-template-columns: 1fr; }
  .headshot { max-width: 280px; }
  .contact-card { padding: 40px 24px; }
  .footer__inner { grid-template-columns: 1fr; text-align: center; gap: 8px; }
  .footer__copy { text-align: center; }
}

@media (max-width: 640px) {
  .gallery { grid-template-columns: 1fr; }
  .photo-grid { columns: 1; }
  .nav__links { gap: 16px; }
  .nav__link--cta { display: none; }
  .next-project { flex-direction: column; align-items: flex-start; gap: 16px; }
  .outcome-stats { flex-direction: column; gap: 24px; }
  .cs-hero { min-height: 50vh; padding-bottom: 48px; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat { padding: 28px 20px; }
  .section { padding: 60px 0; }
}

/* ─── Page Padding ───────────────────────────────────────────── */
.page-top { padding-top: calc(var(--nav-h) + 80px); }
