:root {
  color-scheme: light;
  --ink: #161511;
  --muted: #6b655b;
  --paper: #f7f1e7;
  --surface: rgba(255, 251, 243, 0.72);
  --surface-strong: rgba(255, 251, 243, 0.92);
  --line: rgba(22, 21, 17, 0.14);
  --green: #1d775f;
  --gold: #c09532;
  --rust: #b8533f;
  --quiet: #514b42;
  --shadow: 0 26px 80px rgba(44, 34, 22, 0.14);
  --body-bg:
    radial-gradient(circle at 18% 18%, rgba(184, 83, 63, 0.1), transparent 28rem),
    radial-gradient(circle at 86% 16%, rgba(29, 119, 95, 0.1), transparent 26rem),
    linear-gradient(135deg, #fbf7ef 0%, #f3ecdf 52%, #e9dfcf 100%);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f0eadf;
  --muted: #aaa195;
  --paper: #14130f;
  --surface: rgba(34, 31, 26, 0.72);
  --surface-strong: rgba(42, 38, 32, 0.92);
  --line: rgba(240, 234, 223, 0.15);
  --green: #67c3a0;
  --gold: #dfb95c;
  --rust: #dc7b67;
  --quiet: #c7beb0;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.32);
  --body-bg:
    radial-gradient(circle at 18% 18%, rgba(220, 123, 103, 0.12), transparent 28rem),
    radial-gradient(circle at 86% 16%, rgba(103, 195, 160, 0.1), transparent 26rem),
    linear-gradient(135deg, #11100d 0%, #181611 54%, #211d18 100%);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--body-bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main,
section,
article,
aside,
div {
  min-width: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(color-mix(in srgb, var(--ink) 4%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 3%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 88%);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

#field {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.34;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px clamp(18px, 4vw, 54px);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--paper) 92%, transparent), transparent);
  backdrop-filter: blur(14px);
}

.brand,
.header-actions,
.nav,
.hero-actions,
.contact-actions,
.case-meta,
.next-case,
.button {
  display: flex;
  align-items: center;
}

.brand {
  min-width: 0;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff8e9;
  background: #161511;
  border: 2px solid rgba(255, 248, 233, 0.75);
  border-radius: 50%;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(22, 21, 17, 0.18);
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 0.96rem;
}

.brand-copy small,
.eyebrow,
.brief-card span,
.signals span,
.case-tab span,
.case-meta span,
.case-matrix span,
.experience-title span,
.note span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-actions {
  margin-left: auto;
  gap: clamp(12px, 3vw, 30px);
}

.nav {
  gap: clamp(12px, 3vw, 30px);
}

.nav a {
  position: relative;
  font-size: 0.92rem;
  font-weight: 700;
}

.nav a::after {
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.theme-toggle {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: 50%;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-2px);
}

.theme-toggle svg,
.button svg,
.next-case svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.theme-toggle .sun-icon {
  display: none;
}

html[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}

html[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.74fr);
  align-items: center;
  min-height: 100vh;
  gap: clamp(34px, 6vw, 86px);
  padding: 120px clamp(18px, 5vw, 74px) 58px;
}

.hero-copy {
  max-width: 820px;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--green);
}

h1,
h2,
h3,
p {
  margin-top: 0;
  overflow-wrap: break-word;
}

h1 {
  max-width: 850px;
  margin-bottom: 24px;
  font-size: clamp(3.4rem, 6.1vw, 7rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.96;
}

h1 span {
  display: block;
}

h2 {
  margin-bottom: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.8rem, 5.6vw, 5.8rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.98;
}

.intro {
  max-width: 660px;
  color: var(--quiet);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  line-height: 1.65;
}

.hero-actions,
.contact-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  gap: 10px;
  transition:
    transform 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.button.primary {
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 16px 34px rgba(22, 21, 17, 0.18);
}

.button.ghost {
  background: var(--surface);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.brief-card {
  min-width: 0;
  overflow: hidden;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.brief-top {
  padding: 6px 6px 20px;
  border-bottom: 1px solid var(--line);
}

.brief-top strong {
  display: block;
  max-width: 380px;
  margin-top: 8px;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.02;
}

.brief-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  padding-top: 14px;
}

.brief-grid div {
  min-width: 0;
  min-height: 142px;
  padding: 16px;
  background: color-mix(in srgb, var(--surface-strong) 72%, transparent);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.brief-grid p {
  margin: 12px 0 0;
  color: var(--quiet);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.signals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: calc(1120px + 10vw);
  margin: 0 auto;
  padding: 0 clamp(18px, 5vw, 74px) clamp(56px, 8vw, 90px);
}

.signals span {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  color: var(--quiet);
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
}

.signals span:last-child {
  border-right: 1px solid var(--line);
}

.section {
  padding: clamp(74px, 11vw, 140px) clamp(18px, 5vw, 74px);
}

.section-heading {
  max-width: 1120px;
  margin: 0 auto 34px;
}

.section-heading h2 {
  max-width: 820px;
}

.case-board {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 0.58fr);
  max-width: 1120px;
  margin: 0 auto;
  gap: 16px;
}

.case-rail,
.case-file,
.experience-card,
.note,
.contact-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.case-rail {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.case-tab {
  display: grid;
  grid-template-columns: auto 1fr;
  min-height: 118px;
  padding: 18px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.case-tab:hover,
.case-tab:focus-visible {
  transform: translateY(-2px);
}

.case-tab.active {
  color: var(--paper);
  background: var(--ink);
}

.case-tab span {
  display: grid;
  grid-row: span 2;
  width: 34px;
  height: 34px;
  margin-right: 14px;
  place-items: center;
  color: currentColor;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.case-tab strong {
  align-self: end;
  font-size: 1.05rem;
}

.case-tab small {
  margin-top: 6px;
  color: currentColor;
  line-height: 1.4;
  opacity: 0.72;
}

.case-file {
  min-height: 470px;
  padding: clamp(22px, 4vw, 38px);
}

.case-meta {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.case-meta a,
.next-case {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface-strong) 86%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
}

.case-file h3 {
  margin-bottom: 16px;
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 0.95;
}

.case-file > p {
  max-width: 650px;
  color: var(--quiet);
  font-size: clamp(1.04rem, 1.8vw, 1.24rem);
  line-height: 1.65;
}

.case-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 28px 0 24px;
}

.case-matrix div {
  min-height: 150px;
  padding: 16px;
  background: color-mix(in srgb, var(--surface-strong) 76%, transparent);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.case-matrix p {
  margin: 12px 0 0;
  color: var(--quiet);
  line-height: 1.55;
}

.next-case {
  gap: 8px;
  cursor: pointer;
}

.experience-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.38fr) minmax(0, 0.62fr);
  max-width: 1120px;
  margin: 0 auto;
  overflow: hidden;
}

.experience-title {
  padding: clamp(22px, 4vw, 34px);
  border-right: 1px solid var(--line);
}

.experience-title h3 {
  margin: 16px 0 0;
  font-size: clamp(1.55rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.experience-list {
  display: grid;
  gap: 1px;
}

.experience-list p {
  margin: 0;
  padding: 22px;
  color: var(--quiet);
  background: color-mix(in srgb, var(--surface-strong) 74%, transparent);
  border-bottom: 1px solid var(--line);
  line-height: 1.65;
}

.experience-list p:last-child {
  border-bottom: 0;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1120px;
  margin: 0 auto;
  gap: 16px;
}

.note {
  min-height: 260px;
  padding: 24px;
}

.note h3 {
  margin: 42px 0 14px;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1.1;
}

.note p,
.contact-panel p {
  color: var(--quiet);
  line-height: 1.65;
}

.contact {
  padding-bottom: clamp(42px, 8vw, 92px);
}

.contact-panel {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 58px);
}

.contact-panel h2 {
  max-width: 840px;
  margin-bottom: 20px;
}

.contact-panel p {
  max-width: 650px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1040px) {
  .hero,
  .case-board,
  .experience-card {
    grid-template-columns: 1fr;
  }

  .signals,
  .brief-grid {
    grid-template-columns: 1fr 1fr;
  }

  .experience-title {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 14px 16px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 0.88rem;
  }

  .brand-copy strong {
    font-size: 0.84rem;
  }

  .brand-copy small,
  .nav {
    display: none;
  }

  .theme-toggle {
    position: fixed;
    top: 14px;
    right: auto;
    left: 154px;
    z-index: 30;
    width: 38px;
    height: 38px;
    color: var(--paper);
    background: var(--ink);
    border-color: var(--ink);
  }

  .hero {
    min-height: auto;
    padding-top: 104px;
  }

  .hero-copy,
  .brief-card {
    width: 100%;
    max-width: 100%;
  }

  h1 {
    font-size: clamp(2.55rem, 11vw, 3.15rem);
    line-height: 1;
  }

  h2 {
    font-size: clamp(2.35rem, 10vw, 3.5rem);
    overflow-wrap: anywhere;
  }

  .intro {
    max-width: 32ch;
    font-size: 1rem;
  }

  .brief-top strong {
    font-size: clamp(2rem, 10vw, 2.7rem);
  }

  .signals,
  .brief-grid,
  .case-matrix,
  .note-grid {
    grid-template-columns: 1fr;
  }

  .signals {
    padding-bottom: 40px;
  }

  .signals span {
    padding-inline: 0;
    border-right: 0;
    border-left: 0;
  }

  .signals span:last-child {
    border-right: 0;
  }

  .brief-grid div,
  .case-tab,
  .case-matrix div {
    min-height: auto;
  }

  .case-file h3 {
    font-size: clamp(2.15rem, 11vw, 3.2rem);
  }

  .case-file > p {
    font-size: 1rem;
  }

  .experience-list p {
    overflow-wrap: anywhere;
  }

  .case-meta {
    align-items: flex-start;
    flex-direction: column;
  }
}
