/* Studio 421 — shared styles
   Palette, type, and chrome pulled from the class Figma file.
   Michroma everywhere, with size-driven hierarchy. */

@import url('https://fonts.googleapis.com/css2?family=Michroma&display=swap');

:root {
  --coral:    rgb(231, 111, 81);
  --orange:   rgb(244, 162, 97);
  --sand:     rgb(244, 226, 181);
  --teal:     rgb(38, 70, 83);
  --mint:     rgb(42, 157, 143);
  --yellow:   rgb(233, 196, 106);
  --white:    #ffffff;
  --ink:      var(--teal);
  --bg:       var(--sand);
  --panel:    var(--teal);
  --panel-ink:var(--white);

  --shadow-card: 0 2px 0 rgba(38,70,83,0.18), 0 18px 30px -14px rgba(38,70,83,0.35);
  --shadow-tilt: 0 6px 0 rgba(38,70,83,0.22), 0 30px 40px -18px rgba(38,70,83,0.45);

  --page-w: 1500px;
}

/* Dark mode is bio-page-scoped; toggled by adding .dark to <body>. */
body.dark {
  --bg: var(--teal);
  --ink: var(--yellow);
  --panel: var(--yellow);
  --panel-ink: var(--teal);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Michroma', 'Courier New', monospace;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }

/* ─── Header ─── */
.s421-header {
  position: relative;
  background: var(--coral);
  padding: 66px 0 0;
  height: 258px;
  text-align: center;
}
.s421-wordmark {
  font-size: clamp(56px, 7vw, 128px);
  line-height: 1;
  color: var(--teal);
  margin: 0;
  letter-spacing: -0.01em;
  font-weight: 400;
}
.s421-navband {
  background: var(--orange);
  height: 60px;
  display: flex;
  align-items: center;
}
.s421-nav {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 0 115px;
  display: flex;
  gap: 60px;
  width: 100%;
}
.s421-nav a {
  font-size: 28px;
  color: var(--teal);
  position: relative;
  padding: 4px 0;
  transition: transform 0.15s ease;
}
.s421-nav a:hover { transform: translateY(-2px); }
.s421-nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 3px;
  background: var(--teal);
}

.s421-darktoggle {
  margin-left: auto;
  border: 2px solid var(--teal);
  background: transparent;
  color: var(--teal);
  font-family: inherit;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.s421-darktoggle:hover { background: var(--teal); color: var(--orange); }
body.dark .s421-darktoggle { border-color: var(--teal); color: var(--teal); }
body.dark .s421-darktoggle:hover { background: var(--teal); color: var(--yellow); }

/* ─── Page shell ─── */
.s421-page {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 88px 30px 140px;
}
@media (min-width: 1200px) { .s421-page { padding: 88px 114px 140px; } }

.s421-h1 {
  font-size: clamp(48px, 6vw, 82px);
  line-height: 1;
  margin: 0 0 48px;
  color: var(--ink);
  font-weight: 400;
}
.s421-h2 {
  font-size: 40px;
  line-height: 1;
  margin: 60px 0 24px;
  color: var(--ink);
  font-weight: 400;
}

/* ─── Footer ─── */
.s421-footer {
  background: var(--mint);
  height: 129px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  color: var(--teal);
  font-size: 14px;
  position: relative;
  overflow: hidden;
}
.s421-footer .mascot {
  width: 111px;
  height: 96px;
  background: url('assets/mascot.png') center/contain no-repeat;
  transform: scaleX(-1);
}
.s421-footer .footer-meta { text-align: left; }

/* ─── Cards & tiles ─── */
.s421-tile {
  display: block;
  position: relative;
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1), box-shadow 0.35s ease;
  will-change: transform;
  cursor: pointer;
}
.s421-tile .thumb {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--teal) center/cover no-repeat;
  border-radius: 6px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
}
.s421-tile .thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(38,70,83,0.15));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.s421-tile .label {
  display: block;
  font-size: 16px;
  margin-top: 14px;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.s421-tile:hover {
  transform: translateY(-6px) rotate(-0.4deg);
}
.s421-tile:hover .thumb {
  box-shadow: var(--shadow-tilt);
}
.s421-tile:hover .thumb::after { opacity: 1; }

.s421-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 50px;
}
@media (max-width: 1100px) { .s421-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .s421-grid { grid-template-columns: repeat(2, 1fr); } }

.s421-tile.tall .thumb { aspect-ratio: 4/5; }

/* ─── Big feature cards (Final Projects) ─── */
.s421-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-bottom: 40px;
}
.s421-feature {
  position: relative;
  aspect-ratio: 673/470;
  background: var(--teal) center/cover no-repeat;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1), box-shadow 0.4s ease;
}
.s421-feature:hover {
  transform: translateY(-8px) rotate(-0.3deg);
  box-shadow: var(--shadow-tilt);
}
.s421-feature .title {
  position: absolute;
  left: 30px; right: 30px; bottom: 28px;
  font-size: 28px;
  color: var(--white);
  text-shadow: 0 2px 16px rgba(0,0,0,0.65);
  line-height: 1.1;
}
.s421-feature .title small {
  display: block;
  font-size: 13px;
  opacity: 0.85;
  margin-top: 6px;
  letter-spacing: 0.08em;
}
.s421-feature::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(38,70,83,0.85));
}

/* ─── Placeholder striped block when we don't have art ─── */
.placeholder {
  background-image:
    repeating-linear-gradient(45deg,
      rgba(38,70,83,0.10) 0,
      rgba(38,70,83,0.10) 14px,
      rgba(38,70,83,0.04) 14px,
      rgba(38,70,83,0.04) 28px);
  background-color: var(--sand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-align: center;
  padding: 20px;
}

/* ─── Scroll reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal.stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.reveal.stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal.stagger.in > *:nth-child(1){ transition-delay: 0s; }
.reveal.stagger.in > *:nth-child(2){ transition-delay: .06s; }
.reveal.stagger.in > *:nth-child(3){ transition-delay: .12s; }
.reveal.stagger.in > *:nth-child(4){ transition-delay: .18s; }
.reveal.stagger.in > *:nth-child(5){ transition-delay: .24s; }
.reveal.stagger.in > *:nth-child(6){ transition-delay: .30s; }
.reveal.stagger.in > *:nth-child(7){ transition-delay: .36s; }
.reveal.stagger.in > *:nth-child(8){ transition-delay: .42s; }

/* ─── Bio cards ─── */
.bio-row {
  display: grid;
  grid-template-columns: 667px 1fr;
  gap: 140px;
  align-items: start;
  margin: 40px 0 80px;
}
@media (max-width: 1100px) {
  .bio-row { grid-template-columns: 1fr; gap: 40px; }
}
.bio-portrait {
  position: relative;
  aspect-ratio: 667/582;
  border-radius: 25px;
  background: var(--teal);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}
body.dark .bio-portrait { background: var(--yellow); }
.bio-portrait:hover { transform: translateY(-6px) rotate(-0.4deg); }
.bio-portrait .bubble {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 72%;
  aspect-ratio: 1;
  background: var(--white) center/cover no-repeat;
  border-radius: 50%;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.bio-portrait .bubble-sm {
  position: absolute;
  top: 18%;
  left: 38%;
  width: 40%;
  aspect-ratio: 1;
  background: var(--white);
  border-radius: 50%;
  opacity: 0.92;
}

.bio-body h3 {
  font-size: 48px;
  margin: 0 0 24px;
  color: var(--ink);
  font-weight: 400;
  line-height: 1;
}
.bio-body p {
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink);
  margin: 0 0 22px;
}
.bio-body .links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.bio-body .links a {
  border: 2px solid var(--ink);
  padding: 10px 18px;
  font-size: 13px;
  letter-spacing: 0.1em;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}
.bio-body .links a:hover {
  background: var(--ink);
  color: var(--bg);
}

.bio-stub {
  border: 2px dashed rgba(38,70,83,0.35);
  border-radius: 18px;
  padding: 40px;
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: rgba(38,70,83,0.7);
  background: rgba(255,255,255,0.25);
}
body.dark .bio-stub {
  border-color: rgba(233,196,106,0.3);
  background: rgba(255,255,255,0.04);
  color: rgba(233,196,106,0.7);
}

/* ─── Gallery hero ─── */
.gallery-hero {
  position: relative;
  aspect-ratio: 1636/654;
  background: var(--teal) center/cover no-repeat;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 70px;
}
.gallery-hero .caption {
  position: absolute;
  left: 40px; bottom: 32px; right: 40px;
  color: var(--white);
  font-size: 16px;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.7);
}
.gallery-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.55));
}

.gallery-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 50px;
}
@media (max-width: 900px) { .gallery-row { grid-template-columns: repeat(2, 1fr); } }
.gallery-row .cell {
  aspect-ratio: 1;
  background: var(--teal);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease;
}
.gallery-row .cell:hover { transform: scale(1.02) rotate(-0.5deg); }

/* ─── Project meta strip ─── */
.project-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 30px 40px;
  background: rgba(38,70,83,0.06);
  border-radius: 18px;
  margin-bottom: 60px;
}
@media (max-width: 900px) { .project-meta { grid-template-columns: repeat(2, 1fr); } }
.project-meta .cell small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  opacity: 0.7;
  margin-bottom: 8px;
}
.project-meta .cell { font-size: 15px; line-height: 1.5; }

/* ─── Back link ─── */
.back {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.15em;
  margin-bottom: 30px;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}
.back:hover { border-color: var(--ink); }

/* ─── Final Projects split for home ─── */
.final-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-bottom: 100px;
}
@media (max-width: 900px) { .final-split { grid-template-columns: 1fr; } }
