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

/* ── Tokens ── */
:root {
  --bg:            #FCFCFC;
  --surface:       #ffffff;
  --card:          #ffffff;
  --border:        #e0e0e0;
  --text:          #202020;
  --muted:         #424242;
  --dot:           #e8e8e8;
  --container-max: 800px;
  --padding-global: 20px;
  --connector:     rgba(0, 0, 0, 0.3);
  --nav-glass:     rgba(252, 252, 252, 0.82);
}

[data-theme="dark"] {
  --bg:        #101010;
  --surface:   #0B0B0B;
  --card:      #0B0B0B;
  --border:    #1e1e1e;
  --text:      #eeeeee;
  --muted:     #dbdbdb;
  --dot:       #1a1a1a;
  --connector: #eeeeee;
  --nav-glass: rgba(11, 11, 11, 0.82);
}

@media (min-width: 640px) {
  :root { --padding-global: 32px; }
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
}

.padding-global {
  padding: 0 5%;
}

.container-large {
  max-width: 800px;
  margin: 0 auto;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Hanken Grotesk', sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: color 0.2s;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Instrument Sans', sans-serif;
}

.page-bg {
  background-color: var(--bg);
  transition: background-color 0.2s;
  min-height: 100vh;
}

/* ── Site Header (inline, scrolls with page) ── */
header {
  position: sticky;
  top: 12px;
  z-index: 1000;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
  transition: padding 0.4s ease;
}

@media (min-width: 640px) {
  header.is-floating {
    padding: 0 16px;
  }
}

.site-header {
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid transparent;
  border-radius: 50px;
  background: transparent;
  overflow: hidden;
  transition:
    background    0.4s ease,
    border-color  0.4s ease,
    box-shadow    0.4s ease;
}

.site-header.is-floating {
  background: var(--nav-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
}

.site-header-inner {
  height: 52px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding 0.4s ease;
}

header .padding-global {
  transition: padding 0.4s ease;
}

@media (min-width: 640px) {
  .site-header.is-floating .padding-global {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (min-width: 1024px) {
  header .padding-global {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (min-width: 640px) {
  .site-header.is-floating .site-header-inner {
    padding: 0 16px;
  }
}

.nav-logo-link { display: flex; align-items: center; }

.nav-logo {
  height: 28px;
  width: auto;
  display: block;
}

.nav-logo--dark { display: none; }

[data-theme="dark"] .nav-logo--light { display: none; }
[data-theme="dark"] .nav-logo--dark  { display: block; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-resume-label {
  display: inline;
}

.btn-secondary.btn-resume {
  padding: 0 10px;
}

@media (min-width: 480px) {
  .btn-secondary.btn-resume { padding: 0 12px; }
}

/* mobile: icon hidden; 480px+ icon hidden by default, reveals on hover */
.btn-resume .btn-resume-arrow {
  display: none;
}

@media (min-width: 480px) {
  .btn-resume .btn-resume-arrow {
    display: inline-flex;
    width: 0;
    margin-left: 0;
    opacity: 0;
    overflow: hidden;
    transition: width 0.25s ease, opacity 0.25s ease, margin-left 0.25s ease;
  }
  a:hover .btn-resume .btn-resume-arrow,
  .btn-resume:hover .btn-resume-arrow {
    width: 14px;
    margin-left: 6px;
    opacity: 1;
  }
}

/* Primary button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 50px;
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  font-weight: 500;
  font-family: 'Instrument Sans', sans-serif;
  text-decoration: none;
  letter-spacing: 0;
  transition: opacity 0.15s;
}

.btn-primary:hover { opacity: 0.75; }

.footer-btn {
  font-size: 14px;
}

#hero-cta {
  font-size: 14px;
  width: auto;
}

/* Secondary button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 50px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  font-family: 'Instrument Sans', sans-serif;
  text-decoration: none;
  letter-spacing: 0;
  transition: background 0.15s, border-color 0.15s;
}

.btn-secondary:hover {
  background: #ebebeb;
}

[data-theme="dark"] .btn-secondary:hover {
  background: #1a1a1a;
}

.btn-resume-arrow {
  display: inline-flex;
  align-items: center;
}

.btn-resume-arrow svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

[data-theme="dark"] .btn-secondary {
  background: #0B0B0B;
}

.page-hero .btn-secondary:hover {
  background: transparent;
  border-color: transparent;
  opacity: 0.65;
}

/* Theme switch — 3-state segmented control */
.theme-switch {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px;
  gap: 2px;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.theme-option {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

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

.theme-option.is-active {
  background: var(--border);
  color: var(--text);
}

/* ── Hero ── */
.hero {
  padding-top: 80px;
  padding-bottom: 80px;
}

.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

.hero h1 {
  font-family: 'Diphylleia', serif;
  font-size: 52px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: 12px;
}

.hero-sub {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 52px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.1;
  letter-spacing: 0;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
}

.hero-tag {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--surface);
}

/* ── Carousel ── */
.carousel-section {
  display: none;
}

.carousel-viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  gap: 20px;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  width: min(624px, calc(90vw - 100px));
  aspect-ratio: 624 / 360;
  height: auto;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-slide--lottie lottie-player {
  width: 100%;
  height: 100%;
  display: block;
}

.carousel-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 90px;
  pointer-events: none;
  z-index: 1;
}

.carousel-fade-left {
  left: 0;
  background: linear-gradient(to right, var(--bg) 0%, transparent 100%);
}

.carousel-fade-right {
  right: 0;
  background: linear-gradient(to left, var(--bg) 0%, transparent 100%);
}

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.carousel-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
}

.carousel-btn:hover { background: var(--card); }
.carousel-btn:active { transform: scale(0.88); background: var(--card); }

.carousel-btn:disabled {
  opacity: 0.35;
  cursor: default;
}


/* ── Section ── */
.section {
  padding-top: 72px;
  padding-bottom: 72px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}

.section-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  white-space: nowrap;
}

.section-divider {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Cards ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  row-gap: 32px;
  column-gap: 32px;
}

.card {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  transform: translateZ(0);
}

.card-thumb img.card-thumb-dark { display: none; }
[data-theme="dark"] .card-thumb img.card-thumb-light { display: none; }
[data-theme="dark"] .card-thumb img.card-thumb-dark { display: block; }

.card-body {
  padding: 0;
}

.tagline-block {
  padding-bottom: 40px;
}

.section-title {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.2;
}

h3.section-title { font-size: 20px; }

.card-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
}

.card-meta-item {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.card-meta-item:first-child {
  color: var(--text);
}

.card-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0;
  margin-bottom: 0;
  line-height: 1.3;
}

/* ── Page header (inner pages) ── */
.page-hero {
  padding-top: 80px;
  padding-bottom: 40px;
}

.page-hero h1 {
  font-size: 48px;
  font-weight: 500;
  letter-spacing: 0;
  margin-bottom: 16px;
  line-height: 1.15;
}


/* ── Footer ── */
footer {
  overflow: hidden;
  padding: 80px 0 28px;
}

.footer-contact {
  margin-bottom: 0;
}

.footer-contact-heading {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.2;
}

.footer-contact-sub {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-name {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  line-height: 0.88;
  letter-spacing: 0;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
  user-select: none;
}


/* ── Responsive ── */
@media (max-width: 810px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
  :root { --menu-w: min(300px, 85vw); }
  .cards-grid { grid-template-columns: 1fr; gap: 16px; }
  .footer-inner { flex-direction: column; gap: 12px; align-items: flex-start; }
  .menu-panel-inner { padding: 40px 28px 40px 40px; }
  .carousel-slide { width: min(624px, calc(90vw - 24px)); aspect-ratio: 4 / 3; }

  /* Section spacing */
  .section { padding-top: 48px; padding-bottom: 48px; }

  /* Footer */
  footer { padding: 56px 0 24px; }
  .footer-contact-heading { font-size: 26px; }

  /* Writing list — prevent clipping */
  .writing-title { white-space: normal; }
  .writing-row { gap: 12px; }
  .writing-thumb { display: none; }
}

/* ── Design-Tool Hero ── */
.hero--dt {
  padding: 0;
  overflow: hidden;
}

.hero-dt-stage {
  padding: 120px 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.hero-dt-stage.is-ready {
  opacity: 1;
}

/* annotation chip — light mode first */
.dt-annot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-family: 'Geist Mono', monospace;
  color: rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
}

[data-theme="dark"] .dt-annot {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

.dt-annot code {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  padding: 0;
}

.dt-color-chip { margin-bottom: 28px; }

.dt-swatch {
  width: 13px;
  height: 13px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  flex-shrink: 0;
}

.hero-dt-body { margin-bottom: 0; }

/* Top annotation row: color chip left, lottie right */
.hero-dt-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.hero-dt-top-row .dt-color-chip {
  margin-bottom: 0;
}

.hero-lottie {
  display: none;
}

.hero-dt-text-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.hero--dt { font-family: 'Instrument Sans', sans-serif; }

/* reset inherited .hero h1 — now targets just the hd-l1 heading */
.hero--dt h1 {
  margin: 0;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 48px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: 0;
}

.hero-dt-display {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-dt-display p { margin: 0; }

.hero-dt-line {
  display: block;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0;
}

/* Line 1 — borders span text width */
.hd-l1 {
  border-top: 1px solid #3b7ef4;
  border-bottom: 1px solid #3b7ef4;
}

.hd-l1-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
}

/* Line 2 — Hanken Grotesk, muted subtitle */
.hd-l2 {
  font-size: 48px;
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

.accent {
  font-family: 'Diphylleia', serif;
  font-style: italic;
}

/* "alive" — Diphylleia accent, light blue fill, Figma selection box */
.hd-alive {
  font-family: 'Diphylleia', serif;
  font-style: italic;
  position: relative;
  display: inline-block;
  background: rgba(59, 126, 244, 0.1);
  padding: 2px 4px 6px 6px;
  border-radius: 2px;
}

.dt-sel-box {
  position: absolute;
  inset: 0;
  border: 1.5px solid #3b7ef4;
  border-radius: 2px;
  pointer-events: none;
}

.dt-h {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--bg);
  border: 1.5px solid #3b7ef4;
  border-radius: 1px;
  display: block;
}

.dt-h.tl { top: -3px;    left: -3px;  }
.dt-h.tr { top: -3px;    right: -3px; }
.dt-h.bl { bottom: -3px; left: -3px;  }
.dt-h.br { bottom: -3px; right: -3px; }

/* x-height annotation */
.dt-xheight-col {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.dt-xh-bar {
  flex-shrink: 0;
  overflow: visible;
}

.dt-xh-bar circle,
.dt-xh-bar line {
  stroke: var(--connector);
  transition: stroke 0.2s;
}

.dt-font-row {
  display: flex;
  justify-content: flex-end;
  padding-right: 8px;
  margin-top: 10px;
}

/* Inline font annotation next to .hd-alive */
.dt-alive-group {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  gap: 0;
}

.dt-alive-connector {
  display: block;
  width: 24px;
  height: 8px;
  flex-shrink: 0;
  position: relative;
}

.dt-alive-connector::before {
  content: '';
  position: absolute;
  left: 8px;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 0;
  border-top: 1px dashed var(--connector);
}

.dt-alive-connector::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--connector);
}

/* meta row */
.hero-dt-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dt-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: block;
}

.hero-dt-byline {
  font-size: 14px;
  color: var(--muted);
}

/* Button-width measurement indicator */
.dt-spacing-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dt-spacing-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  height: 12px;
  width: 144px; /* overridden by JS */
  position: relative;
}

.dt-spacing-row::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 1px;
  right: 1px;
  height: 1px;
  transform: translateY(-50%);
  background: rgba(246, 51, 154, 0.4);
  pointer-events: none;
}

.dt-sp-tick {
  display: block;
  width: 1px;
  height: 100%;
  background: #f6339a;
  border-radius: 1px;
}

.dt-sp-val {
  font-size: 12px;
  font-family: 'Geist Mono', monospace;
  color: #f6339a;
  font-weight: 600;
  line-height: 1;
}

/* CTA row */
.hero-dt-cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-dt-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 256px;
  min-width: 256px;
  height: 48px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  padding: 0 32px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Instrument Sans', sans-serif;
  letter-spacing: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.hero-dt-cta:hover { opacity: 0.75; }

.dt-cta-label {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

/* ── Experience ── */
.section--experience { padding-top: 0; }

.exp-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.exp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.exp-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  overflow: hidden;
}

.exp-company {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
}

.exp-meta {
  font-size: 14px;
  color: var(--muted);
}

/* ── Writing accordion ── */
.section--writing { padding-bottom: 40px; }

.writing-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.writing-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 8px;
  margin: 0 -8px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.writing-row:hover {
  background: var(--surface);
}

.writing-thumb {
  width: 44px;
  height: 52px;
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px 7px;
}

.wt-line {
  display: block;
  height: 3px;
  border-radius: 100px;
  background: var(--border);
}

.wt-line:nth-child(1) { width: 50%; }
.wt-line:nth-child(2) { width: 100%; }
.wt-line:nth-child(3) { width: 75%; }
.wt-line:nth-child(4) { width: 62%; }
.wt-line:nth-child(5) { width: 38%; }

.writing-info {
  flex: 1;
  min-width: 0;
}

.writing-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Instrument Sans', sans-serif;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.writing-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.writing-date {
  font-size: 12px;
  color: var(--muted);
  font-family: 'Hanken Grotesk', sans-serif;
}

.writing-read {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.15s;
}

.writing-row:hover .writing-read {
  opacity: 1;
}

/* ── Hero social links ── */
.hero-social {
  margin-top: 20px;
}

.hero-social-links {
  display: flex;
  gap: 16px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.social-icon-mask {
  display: block;
  width: 24px;
  height: 24px;
  background-color: var(--text);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transition: background-color 0.15s;
}

.social-icon-mask--linkedin { -webkit-mask-image: url('../assets/social-icons/LinkedIn - Dark.svg'); mask-image: url('../assets/social-icons/LinkedIn - Dark.svg'); }
.social-icon-mask--behance  { -webkit-mask-image: url('../assets/social-icons/Behance - Dark.svg');  mask-image: url('../assets/social-icons/Behance - Dark.svg'); }
.social-icon-mask--dribbble { -webkit-mask-image: url('../assets/social-icons/Dribbble - Dark.svg'); mask-image: url('../assets/social-icons/Dribbble - Dark.svg'); }
.social-icon-mask--medium   { -webkit-mask-image: url('../assets/social-icons/Medium - Dark.svg'); mask-image: url('../assets/social-icons/Medium - Dark.svg'); }

.social-link[aria-label="LinkedIn"]:hover .social-icon-mask  { background-color: #0A66C2; }
.social-link[aria-label="Behance"]:hover .social-icon-mask   { background-color: #0057FF; }
.social-link[aria-label="Dribbble"]:hover .social-icon-mask  { background-color: #B7519A; }
.social-link[aria-label="Medium"]:hover .social-icon-mask    { background-color: #000000; }

.social-icon { display: block; }
.social-icon--dark { display: none; }
[data-theme="dark"] .social-icon--light { display: none; }
[data-theme="dark"] .social-icon--dark  { display: block; }

/* ── About section ── */
.section--about {
  padding-top: 80px;
  padding-bottom: 80px;
}

.about-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: start;
}

.about-polaroid {
  width: 204px;
  background: #fff;
  padding: 12px;
  padding-bottom: 32px;
  border-radius: 2px;
  transform: rotate(-2.5deg);
}

.about-polaroid img {
  width: 100%;
  height: auto;
  aspect-ratio: 180 / 224;
  display: block;
  object-fit: cover;
}

.about-text-col {
  font-size: 18px;
}

.body-text,
.about-eyebrow {
  font-size: 16px;
  color: #424242;
  line-height: 1.75;
  margin-bottom: 12px;
}

[data-theme="dark"] .body-text,
[data-theme="dark"] .about-eyebrow,
[data-theme="dark"] li {
  color: #dbdbdb;
}

.body-text:last-child { margin-bottom: 0; }


@media (max-width: 640px) {
  .dt-xheight-col { display: none; }
  .dt-cta-label   { display: none; }
  .dt-font-row    { justify-content: flex-start; }
  .hero-dt-stage  { padding: 80px 0; }
  .hero--dt h1.hd-l1, .hd-l2 { font-size: 32px; }
  /* Hero stage — flex column so we can reorder children */
  .hero-dt-stage  { display: flex; flex-direction: column; }
  .dt-color-chip  { order: 1; width: fit-content; }
  .hero-dt-body   { order: 2; }
  .hero-dt-cta-row { order: 3; width: 100%; flex-direction: column; align-items: stretch; margin-top: 12px; }
  .dt-spacing-wrap { order: 4; width: 100%; flex-direction: column; align-items: center; gap: 6px; margin-top: 12px; }
  .dt-spacing-row  { width: 100% !important; }
  .hero-dt-cta    { width: 100%; min-width: unset; justify-content: center; }
  .about-grid     { grid-template-columns: 1fr; }
  .about-polaroid { width: 200px; padding-bottom: 24px; }
  .section-title  { font-size: 22px; }
  h3.section-title { font-size: 18px; }
  .card-title     { font-size: 14px; }
}

/* ── Case Study ── */
.cs-eyebrow {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 16px;
}

/* Meta — inline row with · separators */
.cs-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  gap: 0;
}

.cs-meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.cs-meta-item + .cs-meta-item::before {
  content: '·';
  padding: 0 14px;
  color: var(--border);
  font-size: 16px;
}

.cs-meta--3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  gap: 24px;
  border-top: none;
}

.cs-meta--3col .cs-meta-item {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.cs-meta--3col .cs-meta-item + .cs-meta-item::before {
  display: none;
}

.cs-meta--3col .cs-meta-label,
.cs-meta--3col .cs-meta-value {
  font-size: 16px;
}

.cs-meta-label {
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

.cs-meta-value {
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
}

/* Cover */
.cs-cover-wrap { margin: 48px 0; }

.cs-cover {
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.cs-cover-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

/* Body */
.cs-body { padding-bottom: 80px; }

/* Sections — whitespace separation, no borders */
.cs-section {
  padding-top: 40px;
  padding-bottom: 40px;
  margin-bottom: 0;
}

.cs-section:first-child {
  padding-top: 40px;
}


.cs-section .section-title { margin-top: 40px; }
.cs-section .section-title:first-of-type { margin-top: 0; }

.cs-section h3:not(.section-title) {
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  margin-top: 32px;
  margin-bottom: 12px;
}

/* Caption */
.cs-note {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-family: 'Hanken Grotesk', sans-serif;
  opacity: 0.5;
  margin: 12px 0 20px;
}

/* Lists */
.cs-list {
  padding-left: 20px;
  margin-top: 12px;
  margin-bottom: 16px;
}

.cs-list li {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 10px;
}

.cs-list li strong {
  color: var(--text);
  font-weight: 500;
}

/* Persona intro — text left, image right */
.cs-persona-intro {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.cs-persona-intro p {
  flex: 1;
  margin: 0 !important;
}

.cs-persona-intro img {
  width: 150px !important;
  height: 150px !important;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: none !important;
}

/* Numbered items — clean rows, no cards */
.cs-problem-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cs-problem-item {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.cs-problem-num {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  padding-top: 4px;
  flex-shrink: 0;
  min-width: 28px;
  opacity: 0.6;
}

.cs-problem-title {
  font-size: 16px !important;
  font-weight: 500;
  color: var(--text) !important;
  margin-top: 0 !important;
  margin-bottom: 6px !important;
}

/* 3-column persona attributes grid */
.cs-problem-list--3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.cs-problem-list--3col .cs-problem-item {
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.cs-problem-list--3col .cs-problem-num {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 1;
  min-width: unset;
  padding-top: 0;
}

/* Principles — stacked rows, no cards */
.cs-principles {
  display: flex;
  flex-direction: column;
  margin-top: 24px;
  border-top: 1px solid var(--border);
}

.cs-principle {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.cs-principle-title {
  font-size: 16px !important;
  font-weight: 500;
  color: var(--text) !important;
  margin-bottom: 8px !important;
}

/* Empathy map — text left, illustration right */
.cs-empathy-map {
  display: flex;
  flex-direction: column;
  margin-top: 24px;
  gap: 8px;
}

.cs-empathy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 24px;
  border-radius: 10px;
  background: var(--surface);
}

.cs-empathy-row:nth-child(odd) {
  flex-direction: row-reverse;
}

.cs-empathy-row img {
  box-shadow: none !important;
  border-radius: 0 !important;
  width: auto !important;
}

.cs-empathy-text {
  flex: 1;
  min-width: 0;
}

.cs-empathy-text .cs-problem-title {
  margin-bottom: 12px !important;
}

/* Outcomes — stacked rows, no cards */
.cs-outcomes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.cs-outcome {
  background: #f0fdf4;
  border-radius: 12px;
  padding: 20px 24px;
  border: 1px solid #bbf7d0;
}

.cs-outcome-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.cs-outcome-header i {
  font-size: 20px;
  width: 20px;
  height: 20px;
  color: #166534;
  flex-shrink: 0;
}

.cs-outcome p {
  font-size: 16px;
  color: #424242;
  line-height: 1.7;
  margin-bottom: 0 !important;
}

[data-theme="dark"] .cs-outcome {
  background: #052e16;
}

[data-theme="dark"] .cs-outcome-header i {
  color: #fff;
}

[data-theme="dark"] .cs-outcome p {
  color: #fff;
}

/* 3-stat outcomes row (petavue website) */
.cs-outcomes--3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  flex-direction: unset;
  border-bottom: 1px solid var(--border);
}

.cs-outcomes--3 .cs-outcome {
  padding: 32px 32px 32px 0;
  border-bottom: none;
  border-right: 1px solid var(--border);
}

.cs-outcomes--3 .cs-outcome:last-child {
  border-right: none;
  padding-right: 0;
}

.cs-outcomes--3 .cs-outcome + .cs-outcome { padding-left: 32px; }

.cs-outcome-stat {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 20px !important;
  font-weight: 500;
  color: #166534 !important;
  letter-spacing: 0;
  margin-bottom: 20px !important;
  line-height: 1.1 !important;
}

[data-theme="dark"] .cs-outcome-stat {
  color: #fff !important;
}

/* Reflection — no card background */
.cs-section--reflection {
  padding-top: 48px;
  padding-bottom: 48px;
  background: transparent;
  border-radius: 0;
  border-top: 1px solid var(--border);
  border-left: none;
  border-right: none;
  border-bottom: none;
}

.cs-live-link {
  display: inline-flex;
  margin-top: 20px;
  font-size: 14px;
}

.cs-meta--website { /* inherits base cs-meta */ }

.cs-back-wrap { padding-bottom: 80px; }

@media (max-width: 720px) {
  .cs-meta { flex-direction: column; gap: 8px; }
  .cs-meta-item + .cs-meta-item::before { display: none; }
  .cs-meta--3col { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .cs-outcomes--3 {
    grid-template-columns: 1fr;
    border-bottom: none;
  }
  .cs-outcomes--3 .cs-outcome {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
  }
  .cs-outcomes--3 .cs-outcome + .cs-outcome { padding-left: 0; }
  .cs-cover-img { height: 240px; }
  .cs-section { padding-top: 32px; padding-bottom: 32px; }
  .cs-cards-grid { grid-template-columns: 1fr; }
  .page-hero { padding-top: 48px; padding-bottom: 24px; }
  .page-hero h1 { font-size: 28px !important; }
  .cs-problem-item { gap: 16px; }

  /* Persona 3-col grid → single column */
  .cs-problem-list--3col {
    grid-template-columns: 1fr;
  }
  .cs-problem-list--3col .cs-problem-item {
    border-right: none;
    border-bottom: 1px solid rgba(128,128,128,0.15);
  }
  .cs-problem-list--3col .cs-problem-item:last-child {
    border-bottom: none;
  }

  /* Empathy rows — remove zig-zag, stack content */
  .cs-empathy-row,
  .cs-empathy-row:nth-child(odd) {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  /* Persona intro — reduce image size */
  .cs-persona-intro img {
    width: 100px !important;
    height: 100px !important;
  }
}

@media (max-width: 480px) {
  /* Global */
  .section { padding-top: 40px; padding-bottom: 40px; }
  .section-title { font-size: 20px; }
  h3.section-title { font-size: 16px; }
  footer { padding: 40px 0 20px; }
  .footer-contact-heading { font-size: 22px; }

  /* Hero */
  .hero-dt-stage { padding: 60px 0; }
  .hero--dt h1.hd-l1, .hd-l2 { font-size: 24px; }
  .hero-dt-cta { min-width: unset; width: 100%; text-align: center; }

  /* About */
  .about-polaroid { width: 180px; padding-bottom: 24px; }

  /* Case study */
  .cs-meta--3col { grid-template-columns: 1fr; }
  .cs-body { padding-bottom: 48px; }
  .cs-section { padding-top: 24px; padding-bottom: 24px; }
  .cs-section .section-title { margin-top: 24px; }
  .page-hero { padding-top: 32px; padding-bottom: 16px; }
  .page-hero h1 { font-size: 24px !important; }
  .cs-outcome-stat { font-size: 20px !important; }
  .cs-section--reflection { padding-top: 32px; padding-bottom: 32px; }

  /* Persona intro — stack vertically on small screens */
  .cs-persona-intro { flex-direction: column; gap: 12px; }
  .cs-persona-intro img { width: 80px !important; height: 80px !important; }
  .cs-persona-intro p { margin: 0 !important; }

  /* Empathy images — cap width */
  .cs-empathy-row img { width: 100px !important; height: auto !important; }

  /* Slider */
  .cs-slider-label { font-size: 12px; padding: 3px 8px; }
}


/* ── Preview Cards ── */
.cs-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
}

@media (max-width: 640px) {
  .cs-cards-grid { grid-template-columns: 1fr; }
  .cs-list li { font-size: 14px; }
  .cs-card-desc { font-size: 14px; }
  .body-text { font-size: 16px; }
  .cs-meta--3col { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

.cs-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 2px 10px rgba(0,0,0,0.04);
}

[data-theme="dark"] .cs-card {
  box-shadow: 0 1px 3px rgba(0,0,0,0.25), 0 2px 10px rgba(0,0,0,0.2);
}

.cs-card-icon { color: var(--text); flex-shrink: 0; }
.cs-card-title { font-size: 16px; font-weight: 500; color: var(--text); line-height: 1.4; }
.cs-card-desc  { font-size: 16px; color: var(--muted); line-height: 1.6; }

/* ── Case Study Image Shadows ── */
.cs-section img {
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 8px 28px rgba(0,0,0,0.08);
  width: 100%;
  height: auto;
  display: block;
  margin: 16px 0;
}

[data-theme="dark"] .cs-section img {
  box-shadow: 0 1px 4px rgba(0,0,0,0.35), 0 8px 28px rgba(0,0,0,0.3);
}

/* Theme-aware images */
.cs-section img.cs-img--dark { display: none; }
[data-theme="dark"] .cs-section img.cs-img--light { display: none; }
[data-theme="dark"] .cs-section img.cs-img--dark  { display: block; }

.cs-section img.cs-img--light,
.cs-section img.cs-img--dark {
  height: auto;
  object-fit: unset;
}

/* ── Image Placeholder ── */
.cs-img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 8px;
  margin: 16px 0;
}

/* ── Image Comparison Slider ── */
.cs-slider {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 8px 28px rgba(0,0,0,0.08);
  margin: 16px 0;
  cursor: ew-resize;
  user-select: none;
}

[data-theme="dark"] .cs-slider {
  box-shadow: 0 1px 4px rgba(0,0,0,0.35), 0 8px 28px rgba(0,0,0,0.3);
}

.cs-slider img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}

.cs-slider-img--left {
  position: absolute;
  top: 0;
  left: 0;
}

.cs-slider-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: #fff;
  transform: translateX(-50%);
  pointer-events: none;
}

.cs-slider-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #111;
}

.cs-slider-label { display: none; }

.cs-slider-range {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: ew-resize;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

/* ── Motion section ── */
.motion-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.motion-title-row .section-title {
  margin-bottom: 0;
}

.motion-scene {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.motion-scene--mobile { display: none; }

@media (max-width: 768px) {
  .motion-title-row {
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .motion-scene--desktop { display: none; }
  .motion-scene--mobile  { display: block; }
}
