:root {
  --bg: #f4efe6;
  --surface: #fffdf9;
  --ink: #1d2433;
  --muted: #5b6474;
  --accent: #1f3a5f;
  --accent-ink: #f4efe6;
  --accent-soft: #c9a86a;
  --line: #e3dccf;
  --shadow: 0 20px 50px -34px rgba(20, 30, 50, 0.45);
  --radius: 14px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161f;
    --surface: #1a202c;
    --ink: #eef0f4;
    --muted: #a3abba;
    --accent: #9fb9dd;
    --accent-ink: #12161f;
    --accent-soft: #d6b77c;
    --line: #2c3443;
    --shadow: 0 20px 50px -34px rgba(0, 0, 0, 0.8);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

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

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand {
  font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.15rem;
  color: var(--ink); text-decoration: none; margin-right: auto; white-space: nowrap;
}
.nav { display: flex; gap: 22px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--ink); }
.lang {
  font-size: 13px; font-weight: 500; letter-spacing: 0.06em;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.lang:hover { border-color: var(--accent); }
@media (max-width: 760px) { .nav { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px; font-weight: 500; font-size: 16px;
  text-decoration: none; border: 1px solid var(--accent); transition: transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { color: var(--accent); background: transparent; }

/* Sections */
section { padding: 88px 0; }
section + section { border-top: 1px solid var(--line); }
.eyebrow {
  display: inline-block; margin: 0 0 14px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.5rem); color: var(--accent); margin-bottom: 14px; max-width: 22ch; }
.section-lead { color: var(--muted); max-width: 62ch; margin: 0 0 40px; }

/* Hero */
.hero { padding: 96px 0 72px; }
.hero h1 { font-size: clamp(2.4rem, 6.5vw, 4rem); color: var(--accent); max-width: 18ch; margin-bottom: 22px; }
.hero .lead { font-size: 1.2rem; max-width: 58ch; margin: 0 0 32px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero .meta { font-size: 14px; color: var(--muted); margin: 0; }

.proof {
  list-style: none; padding: 0; margin: 56px 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.proof li { background: var(--surface); padding: 20px 22px; }
.proof strong {
  display: block; font-family: "Fraunces", Georgia, serif; font-weight: 600;
  font-size: 1.6rem; color: var(--accent); line-height: 1.2;
}
.proof span { font-size: 14px; color: var(--muted); }

/* Cards */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.card p { margin: 0; color: var(--muted); }
.card .deliverable { margin-top: 14px; font-size: 15px; color: var(--ink); }
.card .deliverable b { font-weight: 500; color: var(--accent); }
.card-num { font-family: "Fraunces", Georgia, serif; color: var(--accent-soft); font-size: 1rem; margin-bottom: 8px; display: block; }

/* Projects */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -16px 0 28px; }
.chip {
  font: inherit; font-size: 14px; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.project-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform .15s ease, border-color .15s ease;
}
.project-card:hover { transform: translateY(-2px); border-color: var(--accent-soft); }
.project-card img { width: calc(100% + 56px); margin: -28px -28px 20px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.project-meta { font-size: 13px; color: var(--muted); letter-spacing: 0.04em; margin-bottom: 8px; }
.project-card h3 { color: var(--ink); }
.project-card .metric { margin-top: auto; padding-top: 18px; font-size: 15px; color: var(--ink); }
.project-card .metric strong { font-family: "Fraunces", Georgia, serif; color: var(--accent); font-size: 1.2rem; margin-right: 6px; }
.project-card .more { margin-top: 14px; font-size: 15px; font-weight: 500; color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding: 0; list-style: none; }
.tags li { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }

/* Steps */
.steps { counter-reset: step; }
.steps .card h3::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font-size: 1rem; color: var(--accent-soft); margin-bottom: 8px;
}

/* About */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.about p { margin: 0 0 18px; }
.creds { list-style: none; padding: 0; margin: 0; }
.creds li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.creds li:last-child { border-bottom: 0; }
.creds small { display: block; color: var(--muted); font-size: 13px; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; gap: 24px; } }

/* Contact */
.contact { text-align: center; }
.contact .section-title, .contact .section-lead { margin-left: auto; margin-right: auto; }
.contact .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.site-footer a { color: var(--muted); }

/* Project detail */
.detail { padding: 56px 0 88px; }
.detail .back { display: inline-block; margin-bottom: 28px; font-size: 15px; text-decoration: none; }
.detail h1 { font-size: clamp(2rem, 5vw, 3rem); color: var(--accent); max-width: 22ch; margin-bottom: 16px; }
.detail .summary { font-size: 1.15rem; color: var(--muted); max-width: 62ch; margin: 0 0 32px; }
.detail .hero-img { width: 100%; border-radius: var(--radius); margin-bottom: 40px; border: 1px solid var(--line); }
.facts { display: flex; flex-wrap: wrap; gap: 10px 32px; padding: 18px 0; margin: 0 0 40px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts div { font-size: 15px; }
.facts dt { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; }
.detail-body { max-width: 720px; }
.detail-body h2 { font-size: 1.5rem; color: var(--accent); margin: 40px 0 12px; }
.detail-body ul { padding-left: 20px; }
.detail-body li { margin-bottom: 8px; }
.metrics { margin: 40px 0 0; }
.cta-box { margin-top: 56px; }
.cta-box p { margin: 0 0 18px; }

@media (max-width: 520px) {
  .container { padding: 0 16px; }
  section { padding: 64px 0; }
  .hero { padding: 64px 0 48px; }
  .card { padding: 22px; }
  .project-card img { width: calc(100% + 44px); margin: -22px -22px 18px; }
}

.detail-body ul.proof { padding: 0; max-width: 320px; }
