@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,400;0,500;0,700;1,400&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f9f9f9;
  --surface: #ffffff;
  --surface-2: #f3f3f4;
  --ink: #1a1c1c;
  --ink-2: #444748;
  --muted: #5e5e5e;
  --hairline: #e2e2e2;
  --hairline-soft: #ececec;
  --accent: #1b42ff;
  --accent-ink: #ffffff;
  --serif: 'Noto Serif', 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --max: 1440px;
  --pad-x: clamp(20px, 4vw, 64px);
  --gap: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, picture, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

/* ---- Typography ---- */
.font-serif { font-family: var(--serif); font-weight: 400; }
.font-serif-i { font-family: var(--serif); font-style: italic; font-weight: 400; }
.font-sans { font-family: var(--sans); }

.t-display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.t-h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.t-h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.25;
}
.t-h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
}
.t-body-lg {
  font-size: 18px;
  line-height: 1.65;
  font-weight: 400;
}
.t-body {
  font-size: 16px;
  line-height: 1.65;
}
.t-small {
  font-size: 14px;
  line-height: 1.55;
}
.t-label {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.t-mono {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.accent { color: var(--accent); }
.accent-bg { background: var(--accent); color: var(--accent-ink); }

/* ---- Layout ---- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}
.section-gap { padding-top: clamp(80px, 12vw, 160px); padding-bottom: clamp(80px, 12vw, 160px); }
.section-half { padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(48px, 8vw, 96px); }

.hairline { border-bottom: 1px solid var(--hairline); }
.hairline-t { border-top: 1px solid var(--hairline); }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249, 249, 249, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--hairline-soft);
}
.site-header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
}
.brand {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-links a {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--muted);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active {
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}

/* Mobile nav */
.menu-btn {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 24px var(--pad-x) 32px;
    gap: 18px;
    border-bottom: 1px solid var(--hairline);
  }
  .menu-btn { display: inline-block; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  width: 100%;
  height: clamp(520px, 88vh, 880px);
  overflow: hidden;
  background: #1b42ff;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
}
.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--pad-x);
  padding-bottom: clamp(48px, 8vw, 96px);
  color: white;
}
.hero-content .wrap { padding: 0; }
.hero-kicker {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin: 0 0 28px;
}
.hero-rule {
  width: 80px;
  height: 1px;
  background: white;
  margin-bottom: 28px;
  opacity: 0.7;
}
.hero-sub {
  max-width: 44ch;
  color: rgba(255,255,255,0.85);
  font-size: 18px;
  line-height: 1.65;
}

/* ---- Project cards ---- */
.project-card { display: block; group: ; }
.project-card .img-wrap {
  overflow: hidden;
  background: var(--surface-2);
  margin-bottom: 22px;
}
.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.project-card:hover img { transform: scale(1.04); }
.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hairline-soft);
}
.project-title {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 6px;
}
.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.tag {
  display: inline-block;
  border: 1px solid var(--hairline);
  padding: 4px 10px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-radius: 0;
}
.project-arrow {
  display: inline-block;
  font-family: var(--serif);
  font-size: 24px;
  color: var(--hairline);
  transition: color 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
}
.project-card:hover .project-arrow {
  color: var(--accent);
  transform: translate(4px, -4px);
}

/* uniform grid */
.grid-uniform {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(48px, 5vw, 72px) var(--gap);
  align-items: start;
}
@media (max-width: 900px) {
  .grid-uniform { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-uniform { grid-template-columns: 1fr; }
}

/* aspect-ratio helpers */
.ar-4-3 { aspect-ratio: 4 / 3; }
.ar-3-4 { aspect-ratio: 3 / 4; }
.ar-16-9 { aspect-ratio: 16 / 9; }
.ar-21-9 { aspect-ratio: 21 / 9; }
.ar-square { aspect-ratio: 1 / 1; }

/* ---- Page header ---- */
.page-header {
  padding-top: clamp(64px, 10vw, 128px);
  padding-bottom: clamp(40px, 6vw, 80px);
}
.page-eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

/* ---- Project page detail ---- */
.project-cover {
  width: 100%;
  background: var(--surface-2);
  margin-bottom: clamp(48px, 6vw, 96px);
}
.project-cover img { width: 100%; height: auto; display: block; }
.project-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 80px;
  padding: 32px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: clamp(48px, 6vw, 80px);
}
.project-info-grid dt {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.project-info-grid dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
}
@media (max-width: 720px) {
  .project-info-grid { grid-template-columns: 1fr; gap: 24px; }
}

.project-prose {
  max-width: 78ch;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
}
.project-prose p + p { margin-top: 1.2em; }

.project-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 5vw, 80px);
  margin: clamp(48px, 6vw, 96px) 0;
}
.project-gallery figure { margin: 0; }
.project-gallery img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--surface-2);
}
.project-gallery figcaption {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 12px;
}

/* ---- Project nav (prev/next) ---- */
.project-nav {
  border-top: 1px solid var(--hairline);
  padding: 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.project-nav a {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--muted);
  transition: color 0.2s ease;
}
.project-nav a:hover { color: var(--accent); }
.project-nav .label {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.project-nav .next { text-align: right; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--hairline);
  background: var(--surface-2);
  padding: clamp(48px, 8vw, 96px) 0 32px;
  margin-top: clamp(80px, 12vw, 160px);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 64px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
.footer-grid h5 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 12px; }
.footer-grid a {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--muted);
  transition: color 0.2s ease;
}
.footer-grid a:hover { color: var(--ink); }
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---- About page ---- */
.about-portrait {
  width: 100%;
  height: auto;
  display: block;
  background: var(--surface-2);
}

/* ---- Buttons / Links ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: var(--ink);
  color: white;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn:hover { background: var(--accent); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-outline:hover { background: var(--ink); color: white; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
  transition: color 0.2s ease;
}
.link-arrow:hover { color: var(--accent); }

/* ---- Util ---- */
.col-12 { grid-column: span 12; }
.col-11 { grid-column: span 11; }
.col-10 { grid-column: span 10; }
.col-9 { grid-column: span 9; }
.col-8 { grid-column: span 8; }
.col-7 { grid-column: span 7; }
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }
.col-2 { grid-column: span 2; }
.col-start-2 { grid-column-start: 2; }
.col-start-3 { grid-column-start: 3; }
.col-start-7 { grid-column-start: 7; }
@media (max-width: 880px) {
  .col-md-12, .col-12, .col-11, .col-10, .col-9, .col-8, .col-7, .col-6, .col-5, .col-4, .col-3, .col-2 {
    grid-column: span 12 !important;
  }
  .col-start-2, .col-start-3, .col-start-7 { grid-column-start: 1 !important; }
}

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