/* =============================================
   SAUMYA SETH PORTFOLIO · SHARED STYLES
   Design system: Indie Zine
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&family=Space+Mono:wght@400;700&family=Archivo+Black&family=Caveat:wght@600;700&family=Lora:wght@600;700&display=swap');

:root {
  color-scheme: light;
  --cream: #F6F1E7;
  --paper: #FFFDF8;
  --ink: #18160F;
  --grey: #4A4640;
  --grey-2: #7A7468;
  --line: #DDD6C6;
  --lavender: #B7A6DE;
  --lavender-deep: #5B4B8A;
  --lavender-tint: #EFEAF9;
  --teal: #2F6F68;
  --teal-deep: #1F4B46;
  --teal-tint: #E3EFEC;
  --display: 'Lora', serif;
  --stamp: 'Archivo Black', sans-serif;
  --body: 'DM Sans', sans-serif;
  --mono: 'Space Mono', monospace;
  --hand: 'Caveat', cursive;
}

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, p { margin: 0; }

a { color: inherit; }

img { max-width: 100%; display: block; }

/* ── Layout ── */
.wrap { max-width: 1060px; margin-inline: auto; padding-inline: 28px; }
.wrap-narrow { max-width: 760px; margin-inline: auto; padding-inline: 28px; }

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246,241,231,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--ink);
}
nav .inner {
  max-width: 1060px;
  margin-inline: auto;
  padding-inline: 28px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  color: var(--ink);
}
.nav-logo span { color: var(--teal); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--grey);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--teal-deep); }
.menu-toggle {
  display: none;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.nav-links .btn-nav {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  transition: transform 0.15s;
}
.nav-links .btn-nav:hover { transform: translateY(-2px) rotate(-1deg); }

/* ── Buttons ── */
.btn {
  font-family: var(--body);
  font-size: 15px;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: 1.5px solid var(--ink);
  transition: transform 0.15s ease;
}
.btn:hover { transform: translateY(-3px) rotate(-1deg); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-secondary { background: transparent; color: var(--ink); }

/* ── Tags / Pills ── */
.tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1.5px solid transparent;
  display: inline-block;
}
.tag-lav { background: var(--lavender-tint); color: var(--lavender-deep); border-color: var(--lavender); }
.tag-teal { background: var(--teal-tint); color: var(--teal-deep); border-color: var(--teal); }
.tag-ink { background: transparent; color: var(--ink); border-color: var(--ink); }

/* ── Cards ── */
.card {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  padding: 24px;
}
.card-shadow { box-shadow: 5px 5px 0 var(--ink); }
.card-shadow-lav { box-shadow: 6px 6px 0 var(--lavender-deep); }

/* ── Sticker ── */
.sticker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--ink);
  color: var(--cream);
  padding: 5px 12px;
  border-radius: 3px;
  display: inline-block;
  transform: rotate(-2deg);
}

/* ── Halftone & tape textures ── */
.halftone {
  position: absolute;
  background-image: radial-gradient(var(--ink) 1.5px, transparent 1.5px);
  background-size: 10px 10px;
  opacity: 0.1;
  pointer-events: none;
}
.tape {
  position: absolute;
  height: 22px;
  border: 1px solid rgba(0,0,0,0.12);
  opacity: 0.85;
  pointer-events: none;
}

/* ── Section utilities ── */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--grey-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  display: inline-block;
  flex-shrink: 0;
}

/* ── Sticky note ── */
.sticky-note {
  background: var(--cream);
  border: 1.5px dashed var(--ink);
  border-radius: 12px;
  padding: 18px 22px;
  transform: rotate(-0.8deg);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
}
.sticky-note b { display: block; font-size: 10.5px; letter-spacing: 0.05em; margin-bottom: 5px; color: var(--grey-2); }

/* ── Flow diagram ── */
.flow-wrap { overflow-x: auto; padding-block: 4px; }
.flow { display: flex; min-width: max-content; align-items: center; gap: 0; }
.fnode {
  width: 130px;
  padding: 14px 12px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  text-align: center;
  flex-shrink: 0;
}
.fnode.accent { background: var(--lavender); font-weight: 700; }
.fnode.teal-node { background: var(--teal-tint); }
.fnode .fi { font-family: var(--mono); font-size: 10px; color: var(--grey-2); text-transform: uppercase; letter-spacing: 0.06em; }
.fnode .ft { font-size: 13px; font-weight: 700; margin-top: 5px; font-family: var(--display); line-height: 1.3; }
.farrow { width: 28px; flex: 0 0 28px; display: flex; align-items: center; justify-content: center; color: var(--ink); font-size: 16px; font-weight: 700; }

/* ── Stat bar ── */
.stat-bar {
  display: grid;
  gap: 1.5px;
  background: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
}
.stat-cell { background: var(--paper); padding: 22px 24px 24px; }
.stat-cell.featured { background: var(--ink); color: var(--cream); }
.stat-n { font-family: var(--stamp); font-size: 36px; line-height: 1; }
.stat-cell.featured .stat-n { color: var(--cream); }
.stat-l { font-size: 13px; color: var(--grey); margin-top: 6px; line-height: 1.4; }
.stat-cell.featured .stat-l { color: #D8D2C2; }

/* ── Project card ── */
.proj-card {
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.16s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}
.proj-card:hover { transform: translateY(-4px) rotate(0.3deg); }
.proj-art {
  min-height: 140px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lavender-tint);
}
.proj-art.teal-bg { background: var(--teal-tint); }
.proj-art.ink-bg { background: var(--ink); color: var(--cream); }
.proj-art.lav-bg { background: var(--lavender); }
.proj-stamp {
  font-family: var(--stamp);
  font-size: 22px;
  line-height: 1.15;
  text-align: center;
  letter-spacing: -0.02em;
  transform: rotate(-3deg);
}
.proj-label {
  position: absolute;
  top: 12px;
  left: 14px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.proj-info { padding: 18px 20px 22px; }
.proj-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--grey-2);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.proj-info h3 { font-family: var(--display); font-weight: 700; font-size: 16px; }
.proj-info p { font-size: 14.5px; color: var(--grey); margin-top: 6px; line-height: 1.55; }
.proj-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 2px solid var(--teal);
  padding-bottom: 2px;
  text-decoration: none;
  color: var(--ink);
}

/* ── Timeline ── */
.tl { display: flex; flex-direction: column; }
.tl-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1.5px solid var(--line);
}
.tl-item:last-child { border-bottom: none; }
.tl-day { font-family: var(--mono); font-size: 12.5px; color: var(--teal-deep); font-weight: 700; padding-top: 3px; }
.tl-t { font-weight: 700; font-size: 16px; font-family: var(--display); }
.tl-b { font-size: 15px; color: var(--grey); margin-top: 5px; line-height: 1.6; }

/* ── Footer ── */
footer {
  border-top: 1.5px solid var(--line);
  padding: 36px 28px;
  text-align: center;
}
footer p { font-family: var(--mono); font-size: 12px; color: var(--grey-2); }

/* ── Case study header ── */
.cs-hero {
  padding: 56px 0 44px;
  border-bottom: 1.5px solid var(--line);
}
.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--grey-2);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 24px;
  transition: color 0.15s;
}
.cs-back:hover { color: var(--teal-deep); }
.cs-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cs-title { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 4vw, 46px); letter-spacing: -0.02em; line-height: 1.1; }
.cs-title .hl { background: var(--lavender); padding: 0.02em 0.12em; border-radius: 2px; display: inline; }
.cs-title u { text-decoration: none; border-bottom: 4px solid var(--teal); }
.cs-dek { margin-top: 14px; font-size: 18px; color: var(--grey); max-width: 64ch; line-height: 1.7; }

/* ── Section within case study ── */
.cs-section { padding: 52px 0; border-bottom: 1.5px solid var(--line); }
.cs-section:last-of-type { border-bottom: none; }
.sec-label { font-family: var(--mono); font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; color: var(--teal); margin-bottom: 12px; }
.sec-h2 { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 3vw, 32px); letter-spacing: -0.01em; }
.sec-sub { color: var(--grey); margin-top: 10px; max-width: 64ch; font-size: 16.5px; line-height: 1.7; }

/* ── Grid helpers ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5px; background: var(--ink); border: 1.5px solid var(--ink); border-radius: 14px; overflow: hidden; }
.grid-4 > * { background: var(--paper); }

/* ── Funnel bar ── */
.funnel-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.funnel-label { width: 130px; flex-shrink: 0; font-family: var(--mono); font-size: 11.5px; color: var(--grey); }
.funnel-track { flex: 1; height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 5px; background: var(--grey-2); transition: width 0.8s ease; }
.funnel-fill.hi { background: var(--teal); }
.funnel-fill.lav { background: var(--lavender-deep); }
.funnel-val { width: 50px; text-align: right; font-family: var(--mono); font-size: 12px; font-weight: 700; }

/* ── Responsive ── */
@media (max-width: 780px) {
  .wrap, .wrap-narrow { padding-inline: 18px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: fixed; top: 62px; left: 0; right: 0; background: var(--cream); border-bottom: 1.5px solid var(--ink); padding: 20px 28px; gap: 16px; }
  .menu-toggle { display: inline-block; }
  .stat-bar { grid-template-columns: 1fr 1fr !important; }
  .flow { flex-direction: column; min-width: unset; }
  .fnode { width: 100%; }
  .farrow { transform: rotate(90deg); }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .stat-bar { grid-template-columns: 1fr !important; }
}
