/* ============ COLORS & TYPE (edit here) ============ */
:root {
  --bg: #f7f4ee;          /* cream */
  --panel: #ebe5da;       /* image panels */
  --text: #1c1b19;        /* near-black */
  --body: #3a3833;        /* paragraph text */
  --muted: #736d63;       /* secondary text */
  --line: #e2dbcf;        /* dividers */
  --accent: #2f5aa8;      /* the one blue */
  --accent-soft: #e6ebf3;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1120px;
  --gutter: 40px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; font-weight: 400; }
em { font-style: italic; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color .2s ease, color .2s ease;
}
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 10;
  background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 6px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Two columns: a narrow label column and a reading column, like a magazine spread */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px 56px;
}
.split > :last-child { max-width: 660px; }

.label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.serif { font-family: var(--serif); }

/* ============ TOP BAR ============ */
.topbar {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  padding-top: 28px;
  font-size: 0.85rem;
}
.topbar-name { color: var(--text); text-decoration: none; line-height: 1.4; }
.topbar-name strong { font-weight: 500; display: block; }
.topbar-name span { color: var(--muted); }
.topbar nav ul { list-style: none; display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; }
.topbar nav a { color: var(--text); text-decoration: none; }
.topbar nav a:hover { color: var(--accent); }

/* ============ HERO ============ */
.hero { padding-block: 96px 112px; }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(3.1rem, 8.4vw, 7rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}
.hero-name {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  color: var(--muted);
  margin-bottom: 64px;
}
.hero-body p { color: var(--body); font-size: 1.06rem; }
.hero-body p:first-child { font-size: 1.2rem; color: var(--text); line-height: 1.55; }

.links {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 8px 26px;
  margin-top: 28px;
  font-size: 0.95rem;
}

/* ============ SECTIONS ============ */
.section { padding-top: 88px; padding-bottom: 88px; border-top: 1px solid var(--line); }
.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.section-title em { color: var(--muted); }
.section-head { margin-bottom: 56px; }
.section-head p { color: var(--body); margin-top: 12px; }

/* ============ THE PATH (timeline) ============ */
.path { list-style: none; }
.path li {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 4px 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.path li:first-child { border-top: 1px solid var(--line); }
.path-year { font-family: var(--serif); font-size: 1.35rem; line-height: 1.3; }
.path-year small { font-family: var(--sans); font-size: 0.78rem; color: var(--muted); margin-left: 6px; }
.path-text { color: var(--body); }
.path-text strong { font-weight: 500; color: var(--text); }

/* ============ FEATURED WORK ============ */
.feature { padding: 0 0 104px; }
.feature + .feature { padding-top: 104px; border-top: 1px solid var(--line); }

.feature-id { display: flex; flex-direction: column; gap: 6px; }
.feature-name {
  font-family: var(--serif); font-style: italic;
  font-size: 1.9rem; line-height: 1.1;
}
.feature-meta { color: var(--muted); font-size: 0.9rem; }
.feature-num {
  font-family: var(--serif); color: var(--muted); font-size: 1rem; margin-bottom: 6px;
}

.statement {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}
.statement .quiet { color: var(--muted); }
.feature-body p { color: var(--body); }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 26px; }
.tags li {
  font-size: 0.8rem; color: var(--body);
  border: 1px solid #d6cdbf; border-radius: 99px; padding: 4px 12px;
}

.more-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500; text-decoration: none; font-size: 0.95rem;
}
.more-link span { transition: transform .2s var(--ease); }
.more-link:hover span { transform: translateX(4px); }

/* Big numbers */
.stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px; margin: 8px 0 28px;
  border-top: 1px solid var(--line); padding-top: 22px;
}
.stat-num { font-family: var(--serif); font-size: clamp(2.1rem, 4vw, 3rem); line-height: 1; letter-spacing: -0.02em; }
.stat-label { color: var(--muted); font-size: 0.85rem; margin-top: 8px; }

/* ============ IMAGE PANELS ============ */
.panel {
  background: var(--panel);
  border-radius: 6px;
  margin-top: 56px;
  padding: clamp(28px, 5vw, 64px);
  overflow: hidden;
}
.phones {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 40px);
  max-width: 900px; margin: 0 auto;
}
.phone {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(40, 32, 20, .08), 0 12px 32px -12px rgba(40, 32, 20, .22);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.phone:nth-child(2) { transform: translateY(28px); }
.panel:hover .phone { transform: translateY(-6px); }
.panel:hover .phone:nth-child(2) { transform: translateY(20px); }

.shot {
  margin: 0;
  border-radius: 8px; overflow: hidden; background: #fff;
  box-shadow: 0 1px 2px rgba(40, 32, 20, .08), 0 16px 40px -16px rgba(40, 32, 20, .25);
  transition: transform .35s var(--ease);
}
.panel:hover .shot { transform: translateY(-4px); }

.panel-caption { color: var(--muted); font-size: 0.85rem; margin-top: 14px; }

.duo { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 32px); align-items: start; }

/* Placeholders: clearly marked spots for photos still to come */
.ph {
  margin: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  gap: 6px;
  aspect-ratio: var(--ratio, 16 / 10);
  width: 100%;
  padding: 24px;
  border: 1px dashed #bfb4a2;
  border-radius: 8px;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(115, 109, 99, .06) 14px 15px),
    #f1ece3;
  color: var(--muted);
}
.ph-tag {
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: #8a6d3b; background: #f5e9cf; border-radius: 99px; padding: 3px 10px;
}
.ph-what { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--body); }
.ph-file { font-size: 0.75rem; font-family: ui-monospace, Menlo, monospace; color: var(--muted); }
.panel .ph { background-color: #f3eee5; }

/* ============ ROWS (more projects, experience) ============ */
.rows { list-style: none; border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1.1fr) minmax(0, 1.4fr) 1.5rem;
  gap: 4px 24px; align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  color: inherit; text-decoration: none;
}
.row-year { color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.row-name { font-family: var(--serif); font-style: italic; font-size: 1.45rem; line-height: 1.25; color: var(--text); }
.row-note { color: var(--body); font-size: 0.95rem; }
.row-arrow { color: var(--accent); justify-self: end; transition: transform .2s var(--ease); }

a.row { transition: background-color .2s ease, box-shadow .2s ease; }
a.row:hover, a.row:focus-visible {
  background: var(--accent-soft);
  box-shadow: -16px 0 0 var(--accent-soft), 16px 0 0 var(--accent-soft);
  outline: none;
}
a.row:focus-visible { box-shadow: -16px 0 0 var(--accent-soft), 16px 0 0 var(--accent-soft), 0 0 0 2px var(--accent); }
a.row:hover .row-arrow { transform: translateX(4px); }

.rows-compact .row { grid-template-columns: 6.5rem minmax(0, 1.1fr) minmax(0, 1.4fr) 1.5rem; padding: 14px 0; }
.rows-compact .row-name { font-size: 1.2rem; }

/* Group titles inside the work section, and the Buzzle screenshots row */
.rows-title { margin: 64px 0 14px; }
.row-media { border-bottom: 1px solid var(--line); padding: 4px 0 28px; }
.row-media .panel { display: block; margin-top: 0; text-decoration: none; }
.row-media .phones { display: grid; }
.row-media img.phone { width: 100%; height: auto; }

/* ============ ABOUT ============ */
.about-photos { display: grid; gap: 16px; align-content: start; }
.about-photos .ph { min-height: 0; }
.story p { color: var(--body); font-size: 1.04rem; }
.story h3 {
  font-family: var(--serif); font-style: italic; font-size: 1.35rem;
  margin: 34px 0 6px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.story h3:first-child { margin-top: 0; }
.story h3 small { font-family: var(--sans); font-style: normal; font-size: 0.8rem; color: var(--muted); }
.languages { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }

/* ============ CONTACT ============ */
.contact-line {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4.4vw, 3.25rem);
  overflow-wrap: anywhere;
  line-height: 1.05; letter-spacing: -0.02em;
  margin-bottom: 28px;
}
.contact-line a { color: var(--text); text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.contact-line a:hover { color: var(--accent); }

.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding-block: 28px 48px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.85rem;
}

/* ============ CASE STUDIES ============ */
.case-hero { padding-block: 88px 56px; }
.case-kicker { margin-bottom: 18px; }
.case-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 1; letter-spacing: -0.025em;
  margin-bottom: 22px;
}
.case-hero .statement { max-width: 820px; }

.facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 32px;
  padding: 22px 0; margin-top: 40px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.facts dt { margin-bottom: 4px; }
.facts dd { margin: 0; color: var(--text); font-size: 0.95rem; }
.facts dd a { display: inline-block; margin-right: 12px; }

.case-panel { margin-top: 0; }

.chapter { padding-block: 64px; border-top: 1px solid var(--line); }
.chapter:first-of-type { border-top: 0; }
.chapter-label { display: flex; gap: 12px; align-items: baseline; }
.chapter-num { font-family: var(--serif); color: var(--muted); }
.chapter-title { font-family: var(--serif); font-style: italic; font-size: 1.6rem; line-height: 1.2; }
.chapter p, .chapter li { color: var(--body); font-size: 1.04rem; }
.chapter ul { padding-left: 1.1em; }
.chapter li { margin-bottom: 6px; }
.chapter li::marker { color: var(--muted); }
.chapter .stats { border-top: 0; padding-top: 0; }

.chapter .lesson {
  font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 1.75rem); line-height: 1.35;
  color: var(--text); margin: 0;
}

.todo {
  border: 1px dashed #bfb4a2; border-radius: 8px; background: #f1ece3;
  padding: 16px 18px; color: var(--muted) !important; font-size: 0.95rem !important;
}
.todo strong { color: #8a6d3b; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; font-size: .72rem; display: block; margin-bottom: 4px; }

.case-next {
  display: block; padding: 56px 0 64px; border-top: 1px solid var(--line);
  text-decoration: none; color: var(--text);
}
.case-next .label { display: block; margin-bottom: 10px; }
.case-next-title { font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.05; letter-spacing: -0.02em; }
.case-next-title span { color: var(--accent); display: inline-block; transition: transform .25s var(--ease); }
.case-next:hover .case-next-title span { transform: translateX(8px); }

/* Case pages: facts on the left, the story on the right */
.case-lead {
  font-family: var(--serif); font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.3;
  color: var(--muted); max-width: 760px; margin: 0;
}
.case-body { padding-block: 64px 24px; }
.facts-stack { margin: 0; display: grid; gap: 18px; align-content: start; }
.facts-stack dt { margin-bottom: 2px; }
.facts-stack dd { margin: 0; font-size: 0.95rem; color: var(--text); }
.prose p { color: var(--body); font-size: 1.06rem; line-height: 1.7; }
.prose .todo { margin-top: 28px; }

/* ============ SMALL SCREENS ============ */
@media (max-width: 900px) {
  :root { --gutter: 28px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .hero { padding-block: 72px 88px; }
  .hero-name { margin-bottom: 36px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 20px; border-bottom: 1px solid var(--line); }
  .case-body { padding-top: 40px; }
  .row, .rows-compact .row { grid-template-columns: minmax(0, 1fr) auto; }
  .row-year { grid-column: 1; grid-row: 1; }
  .row-arrow { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .row-name { grid-column: 1; }
  .row-note { grid-column: 1; }
  .about-photos { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  :root { --gutter: 20px; }
  body { font-size: 15.5px; }
  .topbar { flex-direction: column; gap: 10px; }
  .topbar nav ul { justify-content: flex-start; gap: 18px; }
  .section { padding-block: 64px; }
  .feature { padding-bottom: 72px; }
  .feature + .feature { padding-top: 72px; }
  .path li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .stat-label { font-size: 0.78rem; }
  .stat-num { font-size: 1.6rem; }
  .duo { grid-template-columns: minmax(0, 1fr); }
  .ph { aspect-ratio: auto; min-height: 180px; }

  /* Phones scroll sideways inside the panel instead of shrinking too small */
  .panel { padding: 24px 0 36px; }
  .phones {
    grid-template-columns: repeat(3, 62%);
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 0 20px 28px; gap: 14px;
    scrollbar-width: none;
  }
  .phones::-webkit-scrollbar { display: none; }
  .phone { scroll-snap-align: center; }
  .phone:nth-child(2), .panel:hover .phone:nth-child(2) { transform: none; }
  .panel > .shot, .panel > .ph, .panel > .duo, .panel > .panel-caption { margin-left: 20px; margin-right: 20px; }
  .about-photos { grid-template-columns: minmax(0, 1fr); }
  .chapter { padding-block: 48px; }
}

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