/* Michèle Widmer — site styles */

:root {
  --bg: #ff4d8d;         /* hot risograph pink */
  --bg-deep: #ff2e7a;
  --ink: #000000;        /* max contrast on pink */
  --ink-soft: #141414;   /* body/secondary text — still softer than ink, higher contrast */
  --accent: #c8ff00;     /* acid green */
  --accent-deep: #b8eb00;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;       /* deep black */
    --bg-deep: #1a1a1a;
    --ink: #fafafa;      /* near-white */
    --ink-soft: #d4d4d4; /* secondary text on dark */
    --accent: #c8ff00;   /* acid green still pops */
    --accent-deep: #b8eb00;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  color-scheme: light dark;
}

html, body { height: 100%; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

main {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 3rem) clamp(1.5rem, 5vw, 3rem) clamp(2rem, 6vw, 4rem);
  max-width: 1100px;
  margin: 0 auto;
}

/* When podcast section makes content taller than viewport, top-align */
@media (max-height: 900px), (max-width: 720px) {
  main { justify-content: flex-start; padding-top: clamp(2rem, 8vw, 4rem); }
}

.content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 8vh, 5rem) 0;
}

.site-header {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: clamp(1.5rem, 5vw, 3.25rem);
  row-gap: 0;
  align-items: end;
  margin-bottom: 0.25rem;
}

/* Risograph-style portrait: misregistered colour layers */
.portrait-frame {
  position: relative;
  width: clamp(132px, 34vw, 228px);
  flex-shrink: 0;
  grid-row: 1 / -1;
  align-self: center;
  opacity: 0;
  animation: portraitIn 1s 0.05s ease-out forwards;
}
/* Offset colour layer sits behind the photo (no blend — avoids black multiply artefact) */
.portrait-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--accent);
  transform: translate(11px, 13px) rotate(3deg);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  animation: shadowDrift 1.1s 0.15s ease-out forwards;
  opacity: 0;
}

.portrait {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 22%;
  border: 3px solid var(--ink);
  background: var(--bg);
  transform: rotate(-2.25deg);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  filter: contrast(1.12) saturate(1.05);
}
.portrait-frame:hover .portrait {
  transform: rotate(0deg);
}
.portrait-frame:hover::before {
  transform: translate(8px, 10px) rotate(2deg);
}

@media (prefers-color-scheme: dark) {
  .portrait {
    filter: contrast(1.08) saturate(0.95);
  }
}

.intro {
  min-width: 0;
  padding-bottom: 0.15rem;
}

@media (max-width: 560px) {
  .site-header {
    grid-template-columns: 1fr;
    row-gap: 1.75rem;
  }
  .portrait-frame {
    grid-row: auto;
    width: min(72vw, 200px);
    margin-left: -0.25rem;
  }
  .portrait-frame::before {
    transform: translate(9px, 11px) rotate(2.5deg);
  }
}

@keyframes portraitIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes shadowDrift {
  from { opacity: 0; transform: translate(4px, 6px) rotate(1deg); }
  to   { opacity: 1; transform: translate(11px, 13px) rotate(3deg); }
}

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  opacity: 0;
  animation: fadeUp 0.9s 0.1s ease-out forwards;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--accent);
}

h1 {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-variation-settings: "opsz" 144;
  font-size: clamp(2.4rem, 11vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 1s 0.25s ease-out forwards;
}
h1 .h1-accent {
  color: var(--accent);
}
h1 em {
  font-style: italic;
  font-weight: 400;
}

.role {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  color: var(--ink-soft);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 1s 0.4s ease-out forwards;
}
.role a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.25s;
}
.role a:hover { color: var(--accent); }

.bio {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(1.05rem, 1.9vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 36ch;
  margin-bottom: 2.8rem;
  opacity: 0;
  animation: fadeUp 1s 0.55s ease-out forwards;
}

@media (min-width: 561px) {
  .bio {
    margin-top: clamp(1.75rem, 4vw, 2.5rem);
    max-width: none;
    width: 100%;
  }
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  opacity: 0;
  animation: fadeUp 1s 0.7s ease-out forwards;
}

.links a {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.15rem 0;
  position: relative;
  transition: color 0.25s;
}
.links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.35s ease, background 0.25s;
}
.links a:hover { color: var(--accent); }
.links a:hover::after {
  transform: scaleX(1);
  background: var(--accent);
}

/* Podcast section */
.podcast {
  margin-top: 3rem;
  opacity: 0;
  animation: fadeUp 1s 0.85s ease-out forwards;
}

.episodes {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.episodes li {
  border-radius: 12px;
  transition: background 0.25s;
}
.episodes li:hover {
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}

.episodes a {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.25s;
}
.episodes a:hover { color: var(--ink); }
.episodes a:hover .ep-title { color: var(--accent); }
.episodes a:hover .ep-play {
  background: var(--accent);
  color: var(--bg);
  transform: scale(1.05);
}

.ep-cover {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ep-info {
  min-width: 0; /* allows text-overflow to work in grid */
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ep-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  line-height: 1.3;
  color: var(--ink);
  transition: color 0.25s;
  /* clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ep-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ep-guests {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.ep-duration {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.ep-meta .dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.ep-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink);
  display: grid;
  place-items: center;
  transition: background 0.25s, color 0.25s, transform 0.25s;
  flex-shrink: 0;
}
.ep-play svg {
  width: 12px;
  height: 12px;
  margin-left: 2px; /* visual centering of play triangle */
}

.pod-all {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: color 0.25s;
}
.pod-all:hover { color: var(--accent); }

/* Keyboard focus — :focus-visible only (no ring on mouse click) */
a:focus {
  outline: none;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.episodes a:focus-visible {
  outline-offset: 4px;
  border-radius: 10px;
}
.episodes li:has(> a:focus-visible) {
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}
.episodes a:focus-visible .ep-title {
  color: var(--accent);
}
.episodes a:focus-visible .ep-play {
  background: var(--accent);
  color: var(--bg);
}

@media (max-width: 540px) {
  .episodes a {
    grid-template-columns: 64px 1fr auto;
    gap: 0.85rem;
    padding: 0.6rem;
  }
  .ep-cover { width: 64px; height: 64px; }
  .ep-play { width: 32px; height: 32px; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
