:root {
  --bg: #f7f4ee;
  --panel: #ffffff;
  --panel-2: #f2eee5;
  --text: #16181c;
  --text-soft: #2b2f35;
  --text-softer: #3a3f46;
  --muted: #656d77;
  --line: #e3ddd0;
  --accent: #a97c2f;
  --accent-knife: #8a3d34;
  --accent-diamond: #a97c2f;
  --accent-kidney: #2f6690;
  --accent-cbgs: #2f7d68;
  --max: 1240px;
  --radius: 22px;
  --shadow: 0 14px 40px rgba(30, 24, 10, 0.10);

  --bg-grad-radial: rgba(169,124,47,.08);
  --bg-grad-top: #faf8f3;
  --bg-grad-bottom: #f1ede3;
  --header-bg: rgba(255, 255, 255, 0.78);
  --media-bg: #ece7db;
  --media-overlay-1: rgba(0,0,0,.02);
  --media-overlay-2: rgba(0,0,0,.16);
  --hero-grad-1: rgba(20,16,8,.035);
  --hero-grad-2: rgba(20,16,8,.012);
  --card-grad-1: rgba(20,16,8,.035);
  --card-grad-2: rgba(20,16,8,.01);
  --card-overlay-1: rgba(0,0,0,.05);
  --card-overlay-2: rgba(0,0,0,.5);
  --tag-bg: rgba(255,255,255,.78);
  --btn-bg: rgba(20,16,8,.045);
  --btn-primary-1: rgba(169,124,47,.18);
  --btn-primary-2: rgba(169,124,47,.09);
  --btn-primary-border: rgba(169,124,47,.4);
  --list-item-bg: rgba(20,16,8,.03);
  --placeholder-1: rgba(169,124,47,.18);
  --placeholder-2: rgba(20,16,8,.05);
  --placeholder-3a: #f4f0e7;
  --placeholder-3b: #ece7db;
  --placeholder-3c: #f0ebe0;
}

:root[data-theme="dark"] {
  --bg: #0b0d10;
  --panel: #13171c;
  --panel-2: #171c22;
  --text: #f3f5f7;
  --text-soft: #dfe5ea;
  --text-softer: #dbe2e8;
  --muted: #a3acb7;
  --line: #2a3139;
  --accent: #d6b56d;
  --accent-knife: #8a3d34;
  --accent-diamond: #d6b56d;
  --accent-kidney: #4a7ea8;
  --accent-cbgs: #3f8f7a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);

  --bg-grad-radial: rgba(214,181,109,.07);
  --bg-grad-top: #0a0c0f;
  --bg-grad-bottom: #0d1014;
  --header-bg: rgba(11, 13, 16, 0.74);
  --media-bg: #11161b;
  --media-overlay-1: rgba(0,0,0,.08);
  --media-overlay-2: rgba(0,0,0,.35);
  --hero-grad-1: rgba(255,255,255,.05);
  --hero-grad-2: rgba(255,255,255,.02);
  --card-grad-1: rgba(255,255,255,.045);
  --card-grad-2: rgba(255,255,255,.02);
  --card-overlay-1: rgba(0,0,0,.12);
  --card-overlay-2: rgba(0,0,0,.65);
  --tag-bg: rgba(255,255,255,.1);
  --btn-bg: rgba(255,255,255,.04);
  --btn-primary-1: rgba(214,181,109,.22);
  --btn-primary-2: rgba(214,181,109,.12);
  --btn-primary-border: rgba(214,181,109,.35);
  --list-item-bg: rgba(255,255,255,.03);
  --placeholder-1: rgba(214,181,109,.22);
  --placeholder-2: rgba(255,255,255,.08);
  --placeholder-3a: #171c22;
  --placeholder-3b: #0f1318;
  --placeholder-3c: #12161c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, var(--bg-grad-radial), transparent 30%),
    linear-gradient(180deg, var(--bg-grad-top) 0%, var(--bg-grad-bottom) 100%);
  color: var(--text);
  line-height: 1.5;
  transition: background-color .2s ease, color .2s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 0px solid rgba(255,255,255,0.06);
  transition: background-color .2s ease;
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(214,181,109,.25), rgba(255,255,255,.06));
  border: 0px solid rgba(255,255,255,.08);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.nav-cluster {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.nav-toggle {
  order: 1;
  display: inline-flex;
  background: transparent;
  color: var(--text);
  border: 0px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.theme-toggle {
  order: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 0;
  border-radius: 16px;
  background: var(--btn-bg);
}

.theme-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  transition: background-color .2s ease, color .2s ease;
}

.theme-option:hover { color: var(--text); }

.theme-option[aria-pressed="true"] {
  background: var(--card-grad-1);
  color: var(--accent);
}

.site-nav {
  order: 3;
  flex-basis: 100%;
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 0 0 18px;
}

.site-nav.open { display: flex; }

.site-nav a {
  color: var(--muted);
  padding: 10px 0;
  border-bottom: 0px solid rgba(255,255,255,.06);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
}

.page {
  min-height: calc(100vh - 72px);
  padding: 22px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: .94rem;
  margin: 4px 0 20px;
}

.breadcrumb a:hover { color: var(--text); }
.breadcrumb .current { color: var(--text); }

.hero {
  border: 0px solid rgba(255,255,255,.08);
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--hero-grad-1), var(--hero-grad-2));
  box-shadow: var(--shadow);
  transition: background-color .2s ease, box-shadow .2s ease;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 344px;
}

.hero-media {
  min-height: 192px;
  position: relative;
  overflow: hidden;
  background: var(--media-bg);
}

.media-img,
.card-image {
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
  display: block;
}

/* Project-card images have no baked-in caption text (the card's own HTML
   heading sits on top of them instead), so they can crop cleanly without
   losing anything — unlike the hero images above, which carry their own
   title text and need to stay unstretched-but-uncropped via fill. */
.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--media-overlay-1), var(--media-overlay-2));
  pointer-events: none;
}

.hero-copy {
  padding: 22px 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .78rem;
  font-weight: 700;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.hero h1 { font-size: clamp(1.7rem, 5.2vw, 3.6rem); }
h1 { font-size: clamp(2rem, 7vw, 4.8rem); }
h2 { font-size: clamp(1.55rem, 4vw, 2.7rem); }
h3 { font-size: 1.2rem; }

.hero p.lead { font-size: clamp(.9rem, 1.6vw, 1rem); line-height: 1.35; }
p.lead {
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  color: var(--text-soft);
  max-width: 62ch;
  margin: 0;
}

.muted { color: var(--muted); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 0px solid rgba(255,255,255,.1);
  background: var(--btn-bg);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--btn-primary-1), var(--btn-primary-2));
  border-color: var(--btn-primary-border);
}

.section {
  padding-top: 34px;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 10px;
  margin-bottom: 16px;
}

.project-grid,
.card-grid,
.library-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card {
  background: linear-gradient(180deg, var(--card-grad-1), var(--card-grad-2));
  border: 0px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: background-color .2s ease, box-shadow .2s ease;
}

.project-card {
  min-height: 420px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 22px;
  isolation: isolate;
}

.project-card .media-img {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--card-overlay-1), var(--card-overlay-2));
  z-index: -1;
}

.project-card .tag {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(6px);
}

.project-card p { color: #f3f5f7; }

.list-block { padding: 22px; }
.list-block ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
}

.list-block li {
  padding: 14px 14px;
  background: var(--list-item-bg);
  border: 0px solid rgba(255,255,255,.06);
  border-radius: 14px;
  color: var(--text-softer);
  transition: background-color .2s ease;
}

.split {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.panel {
  padding: 22px;
  background: linear-gradient(180deg, var(--card-grad-1), var(--card-grad-2));
  border: 0px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: background-color .2s ease, box-shadow .2s ease;
}

.panel p:last-child { margin-bottom: 0; }

.library-item { padding: 20px; }
.library-item .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: .92rem;
}

.footer {
  border-top: 0px solid rgba(255,255,255,.06);
  padding: 24px 0 34px;
  color: var(--muted);
}

.placeholder-art {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(circle at 30% 25%, var(--placeholder-1), transparent 22%),
    radial-gradient(circle at 75% 30%, var(--placeholder-2), transparent 18%),
    linear-gradient(145deg, var(--placeholder-3a), var(--placeholder-3b) 55%, var(--placeholder-3c));
}

.placeholder-art span {
  color: var(--text-softer);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .92rem;
}

.accent-knife { color: #d59188; }
.accent-diamond { color: #e5cb8e; }
.accent-kidney { color: #8bb8da; }
.accent-cbgs { color: #86d3b8; }

@media (min-width: 760px) {
  .nav-toggle { display: none; }
  .site-nav {
    order: 1;
    flex-basis: auto;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 22px;
    padding: 0;
  }

  .theme-toggle { order: 2; }

  .site-nav a { border: 0; padding: 0; }
  .page { padding-top: 26px; }
  .section-header {
    flex-direction: row;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
  }
  .hero-copy { padding: 38px 34px 40px; }
  .project-grid,
  .card-grid,
  .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1.1fr .9fr; }
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.1fr .9fr;
    height: 560px;
  }

  .hero-media { min-height: auto; }
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page { padding-bottom: 100px; }
}
