:root {
  --paper: #F5F0E8;
  --ink: #1A1715;
  --ink-muted: #6B6560;
  --accent: #E37E92;
  --rule: #E3DCD0;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 17px;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  padding: 0 64px;
}

/* ── Navigation ── */

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 96px;
}

.nav-name {
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
}

.nav-links a.active {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

/* ── Type scale ── */

.display {
  font-size: 64px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
}

.display-xl {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(56px, 8.5vw, 104px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
  color: var(--ink);
}

@media (max-width: 768px) {
  .display-xl {
    font-size: clamp(48px, 11vw, 72px);
    line-height: 1.0;
  }
}


h1 {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--ink);
}

h2 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.3;
  color: var(--ink);
}

p {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
}

.meta {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ── Spacing ── */

.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-40 { margin-bottom: 40px; }
.mb-64 { margin-bottom: 64px; }
.mb-96 { margin-bottom: 96px; }
.mb-160 { margin-bottom: 160px; }

.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mt-64 { margin-top: 64px; }
.mt-96 { margin-top: 96px; }

/* ── Content containers ── */

.content {
  max-width: 720px;
  margin: 0 auto;
}

.content-wide {
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Homepage: hero ── */

.hero {
  padding-bottom: 96px;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}

.hero-greeting,
.hero-name,
.hero-sub {
  padding-left: 0;
  margin-left: 0;
}

.hero-greeting {
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 0;
}

.hero-name {
  font-size: clamp(96px, 38vw, 560px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.88;
  color: var(--ink);
  margin-left: -0.055em;
  margin-bottom: 40px;
}

.hero-sub p {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-muted);
  line-height: 1.6;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--ink);
}

/* ── Homepage: case study list ── */

.case-study-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 48px;
}

.case-study-item:nth-child(1) { grid-column: span 6; }
.case-study-item:nth-child(2) { grid-column: span 4; }
.case-study-item:nth-child(3) { grid-column: span 4; }
.case-study-item:nth-child(4) { grid-column: span 6; }

.case-study-item {
  border-bottom: none;
}

.case-study-item a {
  display: block;
  padding: 0;
  text-decoration: none;
  color: var(--ink);
}

.cs-item-info {
  margin-top: 16px;
  margin-bottom: 4px;
}

@media (max-width: 768px) {
  .case-study-list {
    grid-template-columns: 1fr;
  }

  .case-study-item:nth-child(1),
  .case-study-item:nth-child(2),
  .case-study-item:nth-child(3),
  .case-study-item:nth-child(4) { grid-column: span 1; }
}

.case-study-image {
  width: 100%;
  height: 400px;
  background: var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  margin-bottom: 0;
  overflow: hidden;
  border-radius: 6px;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.case-study-item a:hover .case-study-image {
  transform: scale(1.02);
  opacity: 0.85;
}


.case-study-number {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 16px;
  margin-bottom: 8px;
  transition: color 0.25s;
}

.case-study-item a:hover .case-study-number {
  color: var(--accent);
}

.case-study-title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-bottom: 8px;
  transition: color 0.25s;
}

.case-study-item a:hover .case-study-title {
  color: var(--ink);
}

.case-study-meta-line {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-muted);
  transition: color 0.25s;
}

.case-study-item a:hover .case-study-meta-line {
  color: var(--ink-muted);
}



/* ── Homepage: selected work ── */

.selected-work-list {
  list-style: none;
  border-top: 1px solid var(--rule);
}

.selected-work-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}

.work-thumb {
  background: var(--rule);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
}


.work-name {
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}

.work-desc {
  font-size: 17px;
  font-weight: 400;
  color: var(--ink-muted);
  line-height: 1.55;
}

/* ── Case study page ── */

.cs-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.cs-metadata-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 24px;
}

.hero-placeholder {
  width: 100%;
  background: var(--rule);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 64px 0;
  border-radius: 4px;
  overflow: hidden;
}

.hero-placeholder span {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.cs-intro {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 96px;
  padding-bottom: 96px;
  border-bottom: 1px solid var(--rule);
}

.cs-section {
  margin-bottom: 96px;
}

.cs-section h2 {
  margin-bottom: 24px;
}

.cs-section p {
  margin-bottom: 0;
}

.cs-section p + p {
  margin-top: 24px;
}

/* ── What I killed ── */

.killed-list {
  list-style: none;
  border-top: 1px solid var(--rule);
  margin-top: 24px;
}

.killed-list li {
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 17px;
  line-height: 1.55;
}

.killed-name {
  color: var(--ink);
}

.killed-reason {
  color: var(--ink-muted);
}

/* ── Body links ── */

.cs-section a,
.cs-intro a,
.outcome-list a,
.work-desc a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.cs-section a:hover,
.cs-intro a:hover,
.outcome-list a:hover,
.work-desc a:hover {
  color: var(--ink-muted);
}

/* ── Outcome list ── */

.outcome-list {
  list-style: none;
  border-top: 1px solid var(--rule);
  margin-top: 24px;
}

.outcome-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
}

/* ── Case study images ── */

.cs-hero-image {
  width: 100%;
  display: block;
  margin: 64px 0;
}

.cs-inline-image {
  width: 100%;
  display: block;
  border-radius: 4px;
}

/* ── Before/after image pair ── */

.cs-image-pair {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ── Brand code view ── */

.brand-code-view {
  background: #1e1b19;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
}

.bcv-header {
  background: #2a2420;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.bcv-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.bcv-filename {
  font-size: 11px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  color: #847770;
  margin-left: 8px;
  letter-spacing: 0.04em;
}

.bcv-body {
  padding: 20px 24px;
  overflow: hidden;
  flex: 1;
}

.bcv-body pre {
  margin: 0;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-wrap;
  color: #ad9e95;
}

.bcv-body code { font-family: inherit; }

.bcv-h1  { color: #f4ebe8; font-weight: 600; }
.bcv-h2  { color: #ff8967; }
.bcv-comment { color: #4c443f; }
.bcv-key { color: #f4ebe8; }
.bcv-token { color: #e7d2f6; }
.bcv-hex {
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
}
.bcv-code { color: #847770; }

/* ── Scope grid ── */

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

.scope-placeholder {
  background: var(--rule);
  aspect-ratio: 4 / 3;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  border-radius: 4px;
  overflow: hidden;
}

.scope-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 8px;
}

.cs-image-pair .scope-label {
  margin-bottom: 6px;
}

@media (max-width: 768px) {
  .scope-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Video embed ── */

.cs-video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 4px;
  overflow: hidden;
}

.cs-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ── Back link ── */

.back-link {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  margin-bottom: 64px;
}

.back-link:hover {
  color: var(--ink);
}

/* ── Accent text ── */

.text-accent { color: var(--accent); }

/* ── Social icons ── */

.social-icons {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 64px 0 160px;
  border-top: 1px solid var(--rule);
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  text-decoration: none;
  min-height: 44px;
  min-width: 44px;
}

.social-icons a:hover {
  color: var(--ink);
}

.social-icons svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ── External link ── */

.work-name a {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.work-name a:hover {
  color: var(--ink-muted);
}

.work-name a svg {
  color: var(--ink-muted);
  flex-shrink: 0;
}

/* ── Contact ── */

.contact-links {
  list-style: none;
  border-top: 1px solid var(--rule);
  margin-top: 40px;
}

.contact-links li {
  border-bottom: 1px solid var(--rule);
}

.contact-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
}

.contact-link-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-link-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  width: 96px;
}

.contact-link-value {
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
}

.contact-link-icon {
  color: var(--ink-muted);
  flex-shrink: 0;
}

.contact-links a:hover .contact-link-value {
  color: var(--ink-muted);
}

/* ── Writing placeholder ── */

.writing-empty {
  padding: 96px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* ── Responsive ── */

@media (max-width: 1024px) {
  body {
    padding: 0 64px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 0 24px;
  }

  nav {
    margin-bottom: 64px;
  }

  .display {
    font-size: 40px;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 20px;
  }

  p {
    font-size: 16px;
  }

  .cs-intro {
    font-size: 16px;
  }

  .nav-links {
    gap: 24px;
  }

  .cs-metadata-row {
    gap: 16px;
  }


  .hero-placeholder {
    margin: 40px 0;
  }

  .case-study-item a {
    padding: 32px 0;
  }

  .mb-96 { margin-bottom: 64px; }
  .mb-160 { margin-bottom: 96px; }
  .mt-96 { margin-top: 64px; }
}
