/* ============================================================
   Marisol Vega — radio producer
   Composition: desaturated 70s photo print / magazine folio /
   hand-drawn scribble annotations / gentle fade-rise / grain.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg:        #efe6d0;
  --bg-deep:   #e5d9bd;
  --surface:   #f6efdd;
  --ink:       #3a2f1a;
  --ink-soft:  #6b5c3c;
  --rule:      #c9b98f;
  --a:         #a67c00;   /* mustard */
  --b:         #6b7a3a;   /* avocado */
  --c:         #c04e1a;   /* burnt sienna */
  --grain-opacity: 0.055;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --mono:  "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --measure: 68ch;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --maxw: 1180px;
}

html[data-theme="dark"] {
  --bg:        #1c1811;
  --bg-deep:   #14110b;
  --surface:   #241f16;
  --ink:       #ece0c4;
  --ink-soft:  #b3a483;
  --rule:      #4a4030;
  --a:         #d9a72e;
  --b:         #9aae5c;
  --c:         #e2703a;
  --grain-opacity: 0.075;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-variation-settings: "SOFT" 30, "WONK" 1;
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.125rem);
  line-height: 1.62;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 320ms ease, color 320ms ease;
}

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

a { color: var(--c); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--a); }

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

/* ---------- grain overlay ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  mix-blend-mode: multiply;
}
html[data-theme="dark"] body::before { mix-blend-mode: screen; }

/* ---------- folio strip ---------- */
.folio-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem var(--gutter);
  border-bottom: 1px solid var(--rule);
  background: var(--bg-deep);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.folio-sep { color: var(--a); }

/* ---------- masthead ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--rule);
}
.masthead-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.85rem var(--gutter);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.site-nav {
  display: flex;
  gap: 1.15rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.55rem 0.15rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}
.site-nav a:hover { color: var(--c); border-bottom-color: var(--c); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.4rem 0.85rem;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease;
}
.theme-toggle:hover { border-color: var(--c); color: var(--c); }
.theme-toggle-icon {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--a);
  box-shadow: inset -3px -2px 0 0 var(--bg);
  transition: box-shadow 220ms ease, background-color 220ms ease;
}
html[data-theme="dark"] .theme-toggle-icon {
  background: var(--a);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--a) 35%, transparent);
}

/* ---------- layout shell ---------- */
main { display: block; }

.hero-inner,
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- hero ---------- */
.hero {
  padding-block: clamp(3rem, 9vw, 6.5rem) clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
}
.hero-kicker {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--b);
  margin: 0 0 1rem;
}
.hero-name {
  font-size: clamp(3rem, 12vw, 8.5rem);
  line-height: 0.92;
  font-weight: 600;
  font-variation-settings: "SOFT" 20, "WONK" 1, "opsz" 144;
  letter-spacing: -0.025em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}

/* ---------- visualizer ---------- */
.viz {
  margin: 0 0 2rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding-block: 0.75rem;
}
#viz-canvas {
  width: 100%;
  height: 72px;
  display: block;
}

.hero-standfirst {
  max-width: 46ch;
  font-size: clamp(1.05rem, 0.98rem + 0.5vw, 1.35rem);
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 2.5rem;
  text-wrap: pretty;
}

/* ---------- byline ---------- */
.byline {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
  max-width: 46rem;
}
.byline-row {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}
.byline dt {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 0.25rem;
}
.byline dd { margin: 0; }

/* ---------- sections ---------- */
.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--rule);
}
.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--ink);
}
.section-head h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.35rem);
  font-weight: 600;
  font-variation-settings: "SOFT" 25, "WONK" 1;
  letter-spacing: -0.015em;
  margin: 0;
  margin-right: auto;
}
.section-note {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- three-column body ---------- */
.columns {
  display: grid;
  gap: 1.75rem 2.5rem;
  max-width: 100%;
}
.columns p { margin: 0 0 1.1rem; }
.columns p:last-child { margin-bottom: 0; }

@media (min-width: 900px) {
  .columns {
    grid-template-columns: repeat(3, 1fr);
    column-rule: 1px solid var(--rule);
  }
  .columns p { margin-bottom: 0; }
}

.dropcap::first-letter {
  float: left;
  font-size: 4.1em;
  line-height: 0.78;
  font-weight: 600;
  font-variation-settings: "SOFT" 10, "WONK" 1, "opsz" 144;
  padding: 0.06em 0.1em 0 0;
  color: var(--c);
}

/* ---------- scribble marks ---------- */
mark.scribble {
  background: none;
  color: inherit;
  position: relative;
  padding: 0 0.06em;
  white-space: nowrap;
}
mark.scribble::after {
  content: "";
  position: absolute;
  left: -0.06em;
  right: -0.06em;
  bottom: -0.12em;
  height: 0.42em;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'><path d='M2 13 C 30 4, 52 17, 80 9 S 132 3, 158 12 S 186 8, 198 11' fill='none' stroke='%23c04e1a' stroke-width='3.2' stroke-linecap='round'/></svg>");
  pointer-events: none;
}
html[data-theme="dark"] mark.scribble::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'><path d='M2 13 C 30 4, 52 17, 80 9 S 132 3, 158 12 S 186 8, 198 11' fill='none' stroke='%23e2703a' stroke-width='3.2' stroke-linecap='round'/></svg>");
}

/* ---------- work grid ---------- */
.work-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
  .work-grid { grid-template-columns: repeat(4, 1fr); }
}

.work-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 1.4rem 1.3rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: border-color 200ms ease, translate 200ms ease;
}
.work-card:hover { border-color: var(--a); translate: 0 -3px; }
.work-num {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--a);
  margin: 0;
}
.work-card h3 {
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.01em;
}
.work-card p { margin: 0; font-size: 0.95rem; color: var(--ink); }
.work-meta {
  margin-top: auto !important;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--rule);
  font-family: var(--mono);
  font-size: 0.64rem !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft) !important;
}

/* ---------- reel ---------- */
.reel {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: reel;
}
.reel-item {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  gap: 0.5rem;
}
.reel-item:first-child { border-top: 1px solid var(--rule); }
.reel-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.reel-head h3 {
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.5rem);
  font-weight: 600;
  margin: 0;
  margin-right: auto;
  letter-spacing: -0.012em;
}
.reel-dur {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--c);
  white-space: nowrap;
}
.reel-venue {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}
.reel-item > p:last-child {
  margin: 0;
  max-width: 62ch;
  color: var(--ink);
}

/* ---------- now ---------- */
.now-block {
  max-width: var(--measure);
  display: grid;
  gap: 1.1rem;
}
.now-block p { margin: 0; }
.now-block p:first-child::first-letter {
  font-size: 2.6em;
  float: left;
  line-height: 0.85;
  padding: 0.05em 0.09em 0 0;
  color: var(--b);
  font-weight: 600;
}

/* ---------- contact ---------- */
.section-contact { border-bottom: none; }

.contact-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
}

.contact-lede {
  font-size: 1.1rem;
  max-width: 40ch;
  margin: 0 0 1.75rem;
  text-wrap: pretty;
}

.contact-list {
  margin: 0;
  border-top: 1px solid var(--rule);
}
.contact-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--rule);
}
.contact-row dt {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 0.3rem;
}
.contact-row dd { margin: 0; }

.muted { color: var(--ink-soft); font-size: 0.88em; }

/* ---------- form ---------- */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 1.6rem 1.5rem 1.75rem;
  display: grid;
  gap: 1.1rem;
  align-content: start;
}
.form-title {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--a);
  margin: 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}
.field { display: grid; gap: 0.4rem; }
.field-label {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field input,
.field textarea {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.7rem 0.75rem;
  width: 100%;
  transition: border-color 180ms ease;
}
.field textarea { resize: vertical; min-height: 7rem; }
.field input:focus,
.field textarea:focus {
  border-color: var(--c);
  outline: 2px solid color-mix(in srgb, var(--c) 40%, transparent);
  outline-offset: 1px;
}

.send-btn {
  justify-self: start;
  min-height: 44px;
  padding: 0.75rem 1.6rem;
  background: var(--c);
  color: var(--bg);
  border: 1px solid var(--c);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}
.send-btn:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.send-btn:disabled { opacity: 0.55; cursor: wait; }

.form-status {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--b);
}
.form-status[data-state="error"] { color: var(--c); }

/* ---------- footer ---------- */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem var(--gutter) 3.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
}
.footer-line {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.attribution {
  position: static;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  opacity: 0.6;
}
.attribution a { color: inherit; }

/* ---------- motion: fade + rise on scroll enter ---------- */
@keyframes fadeRise {
  from { opacity: 0; translate: 0 14px; }
  to   { opacity: 1; translate: 0 0; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .section,
    .hero-inner > * {
      animation: fadeRise 420ms cubic-bezier(.2,.7,.1,1) both;
      animation-timeline: view();
      animation-range: entry 0% cover 22%;
    }
    .hero-inner > * {
      animation-timeline: none;
      animation-delay: 0ms;
      animation-duration: 520ms;
    }
    .hero-inner > *:nth-child(1) { animation-delay: 0ms; }
    .hero-inner > *:nth-child(2) { animation-delay: 70ms; }
    .hero-inner > *:nth-child(3) { animation-delay: 140ms; }
    .hero-inner > *:nth-child(4) { animation-delay: 210ms; }
    .hero-inner > *:nth-child(5) { animation-delay: 280ms; }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .work-card:hover { translate: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 560px) {
  .byline-row,
  .contact-row { grid-template-columns: 1fr; gap: 0.2rem; }
  .byline dt, .contact-row dt { padding-top: 0; }
  .site-nav { gap: 0.9rem; }
  .masthead-inner { gap: 0.75rem; }
}
