/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ---------- Tokens ---------- */
:root {
  --bg: #efeeea;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border: #e8e6e0;
  --text: #17160f;
  --text-muted: #66655d;
  --text-faint: #9a988f;
  --accent: #ff5a36;
  --accent-soft: #ff5a3614;
  --available: #22c55e;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 5rem;
  --space-7: 8rem;

  --radius: 4px;
  --radius-sm: 3px;

  --max-width: 1200px;
  --shadow-card: 0 1px 2px rgba(20, 18, 10, 0.03);
  --shadow-card-hover: 0 8px 20px rgba(20, 18, 10, 0.08);
}

html {
  color-scheme: light;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin-inline: auto;
  width: 100%;
  padding: var(--space-3);
  box-sizing: border-box;
}

.site-header .mark {
  font-size: 0.9rem;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

/* ---------- Header icon chips ---------- */
.icon-chips {
  display: flex;
  gap: 8px;
}

.icon-chip {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.icon-chip:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.icon-chip svg {
  width: 17px;
  height: 17px;
  color: var(--text);
}

.icon-chip.linkedin svg { color: #0a66c2; }

.icon-chip.email img {
  width: 18px;
  height: 18px;
}

/* ---------- Availability pill ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border-radius: 999px;
  padding: 6px 14px 6px 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  width: fit-content;
}

.pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--available);
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--available);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0);
    opacity: 0.7;
  }
}

/* ---------- Bento grid ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(140px, auto);
  gap: var(--space-2);
  padding-block: var(--space-4);
}

.tile {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  padding: var(--space-4);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

a.tile:hover, .tile.interactive:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

/* ---------- Photo hero (inset frame) ---------- */
.hero-full {
  max-width: var(--max-width);
  margin-inline: auto;
  width: 100%;
  box-sizing: border-box;
  padding: 0 var(--space-3) var(--space-4);
}

.hero-frame {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 380px;
  max-height: 620px;
  overflow: hidden;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCI+PHRleHQgeD0iMCIgeT0iMzgiIGZvbnQtc2l6ZT0iNDAiPvCfkYs8L3RleHQ+PC9zdmc+") 16 16, auto;
}

.hero-frame .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.15) 30%,
    rgba(0, 0, 0, 0.05) 55%,
    rgba(0, 0, 0, 0.1) 75%,
    rgba(0, 0, 0, 0.55) 100%
  );
  z-index: 1;
}

.hero-polaroids {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.polaroid {
  position: absolute;
  margin: 0;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  width: 16%;
  transform: rotate(var(--rot)) translateY(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.polaroid:hover {
  transform: rotate(var(--rot)) translateY(-10px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.35);
}

.polaroid img {
  width: 100%;
  display: block;
  border-radius: 3px;
}

.polaroid-1 { left: 6%; bottom: 30%; width: 15%; --rot: -7deg; z-index: 3; }
.polaroid-2 { left: 19%; bottom: 40%; width: 14%; --rot: 5deg; z-index: 2; }
.polaroid-3 { right: 17%; bottom: 42%; width: 13%; --rot: -4deg; z-index: 2; }
.polaroid-4 { right: 5%; bottom: 30%; width: 14%; --rot: 7deg; z-index: 3; }

.hero-text {
  position: relative;
  z-index: 2;
  padding: var(--space-4);
  color: #fff;
  width: 100%;
  text-align: center;
}

.hero-text .greeting {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.hero-text .tagline {
  font-size: 1.05rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}

.hero-text .tagline strong {
  color: #fff;
  font-weight: 700;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-2);
}

.tags span {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
}

/* ---------- Selected work (case study rows) ---------- */
.selected-work {
  padding-block: var(--space-6) var(--space-4);
}

.selected-work-header {
  margin-bottom: var(--space-5);
}

.selected-work-header h2 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.02em;
  margin: 0;
}

.work-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: center;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
}

.work-visual {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}

.work-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.work-visual img.bottom {
  object-position: left bottom;
}

.work-visual.contain-frame {
  background: var(--bg);
}

.work-visual.contain-frame img {
  object-fit: contain;
  padding: var(--space-4);
  box-sizing: border-box;
}

.work-content {
  padding: var(--space-3);
}

.work-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.work-number {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
}

.work-eyebrow-text {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.work-heading {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-2);
}

.work-description {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 46ch;
  margin: 0;
}

.work-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 16px 32px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.work-cta:hover {
  background: #d9481f;
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

/* ---------- Work cluster (multi-image bento, single project) ---------- */
.work-cluster {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
}

.work-cluster-header {
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.work-cluster-header .work-description {
  max-width: 60ch;
}

.work-cluster-grid img {
  width: 100%;
  border-radius: var(--radius-sm);
}

.mobile-only {
  display: none;
}

@media (max-width: 860px) {
  .desktop-only {
    display: none;
  }
  .mobile-only {
    display: block;
  }
  .work-row {
    grid-template-columns: 1fr;
  }
  .work-visual {
    order: -1;
  }
  .work-cluster-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- About bento (tagline + testimonial) ---------- */
.about-bento {
  grid-auto-rows: minmax(150px, auto);
}

.tile-about,
.tile-testimonial {
  grid-column: span 3;
  grid-row: span 1;
  justify-content: flex-start;
  gap: 6px;
  padding: var(--space-3);
}

.about-years {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin: 0;
}

.about-text {
  color: var(--text);
  font-size: 0.9rem;
  margin: 0;
}

.about-status {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 4px 0 0;
}

.quote-mark {
  font-family: Georgia, serif;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--border);
}

.quote-text {
  font-size: 0.9rem;
  color: var(--text);
  max-width: 60ch;
  line-height: 1.5;
  margin: 0;
}

.quote-person {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: auto;
}

.quote-person img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.quote-person strong {
  display: block;
  font-size: 0.85rem;
}

.quote-person span {
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ---------- Current tools ---------- */
.tools-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.tool-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.tool-logo:hover {
  opacity: 1;
}

/* ---------- More work (logo tiles) ---------- */
.tile-more-work {
  grid-column: span 2;
  grid-row: span 2;
  padding: 0;
  background: #101012;
  overflow: hidden;
}

.tile-more-work img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.tile-more-work.top img {
  object-position: top;
}

.tile-more-work.bottom img {
  object-position: left bottom;
}

@media (max-width: 860px) {
  .bento {
    grid-template-columns: repeat(4, 1fr);
  }
  .site-header nav { gap: var(--space-2); flex-wrap: wrap; justify-content: flex-end; }
  .case-content-inner { padding: var(--space-4); }
  .case-hero-img { height: 220px; }
}

@media (max-width: 480px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile-about, .tile-testimonial {
    grid-column: span 2;
  }
  .polaroid { display: none; }
  .polaroid-1, .polaroid-4 { display: block; width: 34%; }
  .site-header nav { gap: 10px; }
  .site-header nav a { font-size: 0.8rem; }
  .icon-chips { gap: 5px; }
  .icon-chip { width: 28px; height: 28px; }
  .icon-chip svg { width: 14px; height: 14px; }
  .icon-chip.email img { width: 15px; height: 15px; }
}

/* ---------- Case study article ---------- */
.case-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  max-width: 820px;
  margin: 0 auto var(--space-6);
  overflow: hidden;
}

.case-hero-img {
  display: block;
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.case-content-inner {
  padding: var(--space-5) var(--space-6);
}

.case-header {
  padding-block: 0 var(--space-4);
  max-width: 72ch;
  margin-inline: auto;
}

.case-header .eyebrow {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.case-header h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: var(--space-2) 0;
}

.case-header .stakes {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  max-width: 68ch;
  margin-inline: auto;
  padding-block: var(--space-4);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-6);
}

.case-meta dt {
  font-size: 0.75rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.case-meta dd {
  margin: 0;
  font-size: 1rem;
}

article.case-body {
  max-width: 68ch;
  margin-inline: auto;
}

.case-body section {
  margin-bottom: var(--space-6);
}

.case-body h2 {
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.case-body p {
  color: var(--text-muted);
  margin: 0 0 var(--space-3);
  font-size: 1.05rem;
}

.case-body p strong {
  color: var(--text);
}

.case-body figure {
  margin: var(--space-4) 0;
}

.case-body figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-card-hover);
}

.case-body figcaption {
  margin-top: var(--space-1);
  font-size: 0.85rem;
  color: var(--text-faint);
}

.case-body .pull-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  background: var(--bg);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin: var(--space-4) 0;
}

.case-body .pull-metrics div strong {
  display: block;
  font-size: 2rem;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.case-body .pull-metrics div span {
  font-size: 0.85rem;
  color: var(--text-faint);
}

.case-body blockquote {
  border-left: 2px solid var(--accent);
  padding-left: var(--space-3);
  margin: var(--space-4) 0;
  font-size: 1.15rem;
  color: var(--text);
  font-style: italic;
}

.back-link {
  display: block;
  max-width: 820px;
  margin: 0 auto var(--space-5);
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

footer.site-footer {
  padding-block: var(--space-5);
  color: var(--text-faint);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

