/*
 * student.css — Individual student project pages
 * Uses per-year CSS variables from render_theme_head().
 *
 * Shared base styles + four template layouts:
 *   T1 — Showcase    T2 — Narrative    T3 — Audio/Music    T4 — Team
 */

/* ── BASE ─────────────────────────────────────────────────── */
body.student-page {
  background: var(--theme-bg, #0e0e12);
  color: var(--theme-text, #e8e8f0);
  font-family: var(--theme-font-body, 'Poppins', sans-serif);
}

body.student-page nav {
  background: color-mix(in srgb, var(--theme-bg, #0e0e12) 92%, transparent);
  border-bottom: 1px solid var(--theme-border, #2a2a35);
}

body.student-page nav .logo span { color: var(--theme-accent, #e82e92); }

/* ── HERO MEDIA ───────────────────────────────────────────── */
.student-hero-image,
.student-hero-video {
  width: 100%;
  max-height: 70vh;
  overflow: hidden;
  background: var(--theme-surface, #16161c);
}

.student-hero-image img,
.student-hero-video video {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
  display: block;
}

/* ── SHARED BODY CONTAINER ────────────────────────────────── */
.student-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* ── SHARED HEADER BLOCK ──────────────────────────────────── */
.student-back {
  display: inline-block;
  font-family: var(--theme-font-mono, 'DM Mono', monospace);
  font-size: 0.72rem;
  color: var(--theme-muted, #7a7a92);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.15s;
  letter-spacing: 0.04em;
}
.student-back:hover { color: var(--theme-accent, #e82e92); }

.student-header { margin-bottom: 2.5rem; }

.student-header h1 {
  font-family: var(--theme-font-head, 'Urbanist', sans-serif);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  color: var(--theme-text, #e8e8f0);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}

.student-project-title {
  font-size: 1.05rem;
  color: var(--theme-muted, #7a7a92);
  font-style: italic;
  margin-bottom: 1rem;
}

.student-meta-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.meta-pill {
  font-family: var(--theme-font-mono, 'DM Mono', monospace);
  font-size: 0.68rem;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  border: 1px solid;
  letter-spacing: 0.04em;
}

.meta-pill.year-pill {
  background: rgba(200,240,74,0.08);
  color: var(--theme-accent, #c8f04a);
  border-color: rgba(200,240,74,0.25);
}

/* ── SECTIONS ─────────────────────────────────────────────── */
.student-section { margin-bottom: 2.5rem; }

.student-section h2 {
  font-family: var(--theme-font-head, 'Urbanist', sans-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--theme-text, #e8e8f0);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.student-prose {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--theme-muted, #7a7a92);
}

.student-prose p {
  margin-bottom: 0.9rem;
}

.student-prose p:last-child { margin-bottom: 0; }

.student-prose h2 {
  font-family: var(--theme-font-head, 'Urbanist', sans-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--theme-text, #e8e8f0);
  margin: 1.75rem 0 0.5rem;
  letter-spacing: -0.01em;
}

.student-prose h3 {
  font-family: var(--theme-font-head, 'Urbanist', sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--theme-text, #e8e8f0);
  margin: 1.25rem 0 0.35rem;
  letter-spacing: 0;
}

.student-prose h2:first-child,
.student-prose h3:first-child { margin-top: 0; }

/* ── IMAGE GRID ───────────────────────────────────────────── */
.student-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.student-image-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 4px;
  background: var(--theme-surface, #16161c);
  display: block;
}

/* ── EXTERNAL LINKS ───────────────────────────────────────── */
.student-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--theme-border, #2a2a35);
}

.student-ext-link {
  font-family: var(--theme-font-mono, 'DM Mono', monospace);
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--theme-border, #2a2a35);
  border-radius: 4px;
  color: var(--theme-muted, #7a7a92);
  text-decoration: none;
  transition: all 0.15s;
  letter-spacing: 0.04em;
}
.student-ext-link:hover { border-color: var(--theme-accent, #e82e92); color: var(--theme-accent, #e82e92); }

/* ── EMPTY STATE ──────────────────────────────────────────── */
.student-empty { padding: 3rem 0; color: var(--theme-muted, #7a7a92); font-size: 0.9rem; line-height: 2; }
.student-empty a { color: var(--theme-accent, #e82e92); text-decoration: none; }
.student-empty a:hover { text-decoration: underline; }

/* ── FOOTER ───────────────────────────────────────────────── */
body.student-page footer { border-top-color: var(--theme-border, #2a2a35); color: var(--theme-muted, #7a7a92); }

/* ════════════════════════════════════════════════════════════
   TEMPLATE 1 — SHOWCASE
   ════════════════════════════════════════════════════════════ */

.t1-about { margin-bottom: 2.5rem; }

.t1-about--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.t1-about-image img { width: 100%; border-radius: 4px; object-fit: cover; }

@media (max-width: 768px) { .t1-about--split { grid-template-columns: 1fr; gap: 1.5rem; } }

/* ════════════════════════════════════════════════════════════
   TEMPLATE 2 — NARRATIVE
   ════════════════════════════════════════════════════════════ */

.t2-body { max-width: 720px; }

.t2-inset-image {
  float: right;
  width: 40%;
  margin: 0 0 1.5rem 2rem;
  border-radius: 4px;
  overflow: hidden;
}
.t2-inset-image img { width: 100%; display: block; }

.t2-lead h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.t2-prose { font-size: 1rem; line-height: 1.9; }

.t2-image-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
  margin: 2.5rem 0;
  clear: both;
}
.t2-image-row img { width: 100%; border-radius: 4px; object-fit: cover; aspect-ratio: 4/3; }

@media (max-width: 600px) { .t2-inset-image { float: none; width: 100%; margin: 0 0 1.5rem 0; } }

/* ════════════════════════════════════════════════════════════
   TEMPLATE 3 — AUDIO/MUSIC
   ════════════════════════════════════════════════════════════ */

.t3-hero {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 900px;
  margin: 3rem auto 0;
  padding: 0 2rem;
}

.t3-album-art {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  background: var(--theme-surface, #16161c);
}
.t3-album-art img { width: 100%; height: 100%; object-fit: cover; display: block; }

.t3-hero-text .student-header { margin-bottom: 0; }

.t3-tracklist h2 { margin-bottom: 1rem; }

.t3-tracks {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--theme-border, #2a2a35);
}

.t3-track {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--theme-border, #2a2a35);
}

.t3-track-num {
  font-family: var(--theme-font-mono, 'DM Mono', monospace);
  font-size: 0.7rem;
  color: var(--theme-muted, #7a7a92);
  letter-spacing: 0.05em;
}

.t3-track-title { font-size: 0.95rem; color: var(--theme-text, #e8e8f0); }

.t3-audio {
  height: 32px;
  width: 200px;
  accent-color: var(--theme-accent, #e82e92);
}

.t3-gallery {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin: 2.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--theme-border, #2a2a35) transparent;
}
.t3-gallery img { height: 220px; width: auto; flex-shrink: 0; border-radius: 4px; object-fit: cover; }

@media (max-width: 768px) {
  .t3-hero { grid-template-columns: 1fr; gap: 1.5rem; }
  .t3-album-art { max-width: 240px; }
  .t3-track { grid-template-columns: 2rem 1fr; }
  .t3-audio { grid-column: 1 / -1; width: 100%; }
}

/* ════════════════════════════════════════════════════════════
   TEMPLATE 4 — TEAM/COLLABORATIVE
   ════════════════════════════════════════════════════════════ */

.t4-project-header h1 { font-size: clamp(1.8rem, 5vw, 3rem); }

.t4-team { margin-bottom: 2.5rem; }
.t4-team h2 { margin-bottom: 1rem; }

.t4-team-grid { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.t4-member {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--theme-border, #2a2a35);
  border-radius: 6px;
  text-decoration: none;
  background: var(--theme-surface, #16161c);
  min-width: 160px;
  transition: border-color 0.15s, background 0.15s;
}

a.t4-member:hover {
  border-color: var(--theme-accent, #e82e92);
  background: color-mix(in srgb, var(--theme-surface, #16161c) 80%, var(--theme-accent, #e82e92) 5%);
}

.t4-member--self {
  border-color: var(--theme-accent, #e82e92);
  background: color-mix(in srgb, var(--theme-surface, #16161c) 70%, var(--theme-accent, #e82e92) 8%);
  cursor: default;
}

.t4-member-name { font-size: 0.92rem; font-weight: 600; color: var(--theme-text, #e8e8f0); }
.t4-member-role { font-size: 0.75rem; color: var(--theme-muted, #7a7a92); font-style: italic; }

.t4-individual-note {
  font-family: var(--theme-font-mono, 'DM Mono', monospace);
  font-size: 0.68rem;
  color: var(--theme-muted, #7a7a92);
  letter-spacing: 0.04em;
  padding: 1rem 0;
  border-top: 1px solid var(--theme-border, #2a2a35);
  margin-top: 2rem;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .student-body { padding: 2rem 1.25rem 4rem; }
  .student-image-grid { grid-template-columns: 1fr 1fr; }
}

/* ── INLINE IMAGES (interleaved with text) ────────────────── */

/* Single inline image — constrained width, not full bleed */
.inline-image {
  margin: 1.25rem 0;
}

.inline-image img {
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

/* Multiple consecutive images — responsive grid, images stay compact */
.inline-image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0;
  align-items: flex-start;
}

.inline-image-grid img {
  height: 200px;
  width: auto;
  max-width: 100%;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

/* On narrow screens let images stack */
@media (max-width: 600px) {
  .inline-image-grid img {
    height: 160px;
  }
}
