/* ============================================
   RIZOMA — Minimal Light Theme
   ============================================ */

:root {
  /* Palette: warm stone + botanical green accent */
  --color-bg: #faf8f5;
  --color-surface: #ffffff;
  --color-text: #2c2c2c;
  --color-text-light: #6b6b6b;
  --color-accent: #3a6b4c;
  --color-accent-light: #e8f0eb;
  --color-border: #e5e1dc;
  --color-border-light: #f0ede9;

  /* Typography */
  --font-body: 'Iosevka Term', monospace;
  --font-display: 'Josefin Sans', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;

  /* Layout */
  --max-width: 72rem;
  --content-width: 48rem;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.4;
  overflow-x: hidden;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--color-text); }

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

h1 {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 100;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-text);
  flex-shrink: 0;
}

.logo-mark {
  font-size: 1.75rem;
  color: var(--color-accent);
  line-height: 1;
}

.logo-text strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  display: block;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.logo-text small {
  font-size: 0.7rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-item { position: relative; }

.nav-item > a,
.nav-label {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-light);
  text-decoration: none;
  cursor: pointer;
  border-radius: 0.375rem;
  transition: background 0.15s, color 0.15s;
}

.nav-item > a:hover,
.nav-label:hover,
.nav-item > a[aria-current="page"] {
  color: var(--color-text);
  background: var(--color-border-light);
}

/* Dropdown */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 0.375rem;
  min-width: 12rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  z-index: 200;
}

.has-children:hover .nav-dropdown { display: block; }

.nav-dropdown a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.825rem;
  color: var(--color-text-light);
  border-radius: 0.375rem;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown a:hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 4px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

@media (max-width: 800px) {
  .header-inner {
    padding: 0.5rem 1rem;
    gap: 1rem;
  }

  .logo-text small {
    display: none;
  }

  .menu-toggle {
    display: flex;
    order: -1;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  }

  .site-nav.is-open { display: flex; }

  .nav-dropdown {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0 0 0 1rem;
  }

  .has-children.is-open .nav-dropdown { display: block; }
}

/* ---- Hero (homepage) with fixed slideshow ---- */

/* Fixed slideshow background */
.hero-slideshow {
  position: fixed;
  inset: 0;
  z-index: -1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  animation: heroFade 40s infinite;
}

/* 5 slides: each visible ~8s, total cycle 40s */
.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 8s; }
.hero-slide:nth-child(3) { animation-delay: 16s; }
.hero-slide:nth-child(4) { animation-delay: 24s; }
.hero-slide:nth-child(5) { animation-delay: 32s; }

@keyframes heroFade {
  0%    { opacity: 0; }
  5%    { opacity: 1; }
  20%   { opacity: 1; }
  25%   { opacity: 0; }
  100%  { opacity: 0; }
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) 1.5rem;
  text-align: center;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--content-width);
  margin: 0 auto;
  background: rgba(250, 248, 245, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 2.5rem 3rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(229, 225, 220, 0.4);
}

.hero-credit {
  position: absolute;
  bottom: 0.75rem;
  right: 1rem;
  z-index: 2;
  font-size: 0.65rem;
  color: var(--color-text-light);
  opacity: 0.5;
}

.hero-credit a {
  color: var(--color-text-light);
  text-decoration: underline;
}

/* On homepage, make header translucent */
body:has(.hero) .site-header {
  background: rgba(250, 248, 245, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-md);
}

.hero-description {
  font-size: 1.05rem;
  color: var(--color-text-light);
  max-width: 38rem;
  margin: 0 auto;
  line-height: 1.4;
}

/* ---- Main ---- */
.site-main {
  min-height: 60vh;
}

/* ---- Home sections ---- */
.home-section {
  padding: var(--space-lg) 1.5rem;
}

.home-section + .home-section {
  border-top: 1px solid var(--color-border-light);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-inner h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  letter-spacing: -0.01em;
}

/* ---- News grid ---- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 1.25rem;
}

.news-card {
  display: block;
  padding: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.news-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 2px 12px rgba(58,107,76,0.08);
}

.news-card time {
  font-size: 0.75rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.news-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 0.375rem;
  line-height: 1.35;
}

.news-card p {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-top: 0.5rem;
  line-height: 1.35;
}

.section-more {
  margin-top: var(--space-md);
  font-size: 0.875rem;
  font-weight: 500;
}

/* ---- Residency grid ---- */
.residency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.residency-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.residency-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 2px 12px rgba(58,107,76,0.08);
}

.residency-card img {
  width: 100%;
  height: 12rem;
  object-fit: cover;
}

.residency-card-content {
  padding: 1rem 1.25rem 1.25rem;
}

.residency-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.35;
  margin: 0;
}

.residency-card .residency-date {
  font-size: 0.75rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0.25rem 0 0.5rem;
}

.residency-card p {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.35;
  margin: 0;
}

/* ---- Support logos ---- */
.support-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.support-logos a {
  display: block;
}

.support-logos img {
  height: 3rem;
  width: auto;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.support-logos img:hover {
  opacity: 1;
}

/* ---- Page layout ---- */
.page {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-lg) 1.5rem var(--space-xl);
}

.page--wide {
  max-width: var(--max-width);
}

.page-header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
}

.page-subtitle {
  margin-top: 0.5rem;
  font-size: 1.05rem;
  color: var(--color-text-light);
}

/* ---- Page body prose ---- */
.page-body h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.page-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
}

.page-body p {
  margin-bottom: var(--space-sm);
}

.page-body ul, .page-body ol {
  margin-bottom: var(--space-sm);
  padding-left: 1.25rem;
}

.page-body li + li {
  margin-top: 0.25rem;
}

.page-body img {
  border-radius: 0.5rem;
  margin: var(--space-md) 0;
}

.page-body blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 0.75rem 1.25rem;
  margin: var(--space-md) 0;
  color: var(--color-text-light);
  font-style: italic;
  background: var(--color-accent-light);
  border-radius: 0 0.375rem 0.375rem 0;
}

.page-body a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-body hr {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-lg) 0;
}

/* ---- People grid ---- */
.people {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.person {
  text-align: center;
}

.person strong {
  display: block;
  font-family: var(--font-display);
}

.person small {
  color: var(--color-text-light);
  font-size: 0.85rem;
}

/* ---- Facilities grid (homepage) ---- */
.facilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.25rem;
  margin-top: var(--space-md);
}

.facility-card {
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
}

.facility-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.facility-card p {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.35;
}

/* ---- News listing page ---- */
.news-list {
  list-style: none;
  padding: 0;
}

.news-list li {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.news-list li:first-child {
  padding-top: 0;
}

.news-list time {
  font-size: 0.75rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.news-list h3 {
  font-family: var(--font-display);
  margin-top: 0.25rem;
}

.news-list h3 a {
  color: var(--color-text);
  text-decoration: none;
}

.news-list h3 a:hover {
  color: var(--color-accent);
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 1.5rem;
  font-size: 0.825rem;
  color: var(--color-text-light);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-info p { line-height: 1.4; }
.footer-license { text-align: right; }
.footer-license p + p { margin-top: 0.375rem; }

.built-with {
  font-size: 0.75rem;
  opacity: 0.6;
}

@media (max-width: 600px) {
  .footer-inner { flex-direction: column; }
  .footer-license { text-align: left; }
}

/* ---- On-Site page with slideshow background ---- */
.onsite-slideshow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.onsite-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  filter: blur(8px) brightness(1.1);
  transform: scale(1.1);
  animation: onsiteFade 100s infinite;
}

/* 10 slides: each visible ~10s, total cycle 100s */
.onsite-slide:nth-child(1) { animation-delay: 0s; }
.onsite-slide:nth-child(2) { animation-delay: 10s; }
.onsite-slide:nth-child(3) { animation-delay: 20s; }
.onsite-slide:nth-child(4) { animation-delay: 30s; }
.onsite-slide:nth-child(5) { animation-delay: 40s; }
.onsite-slide:nth-child(6) { animation-delay: 50s; }
.onsite-slide:nth-child(7) { animation-delay: 60s; }
.onsite-slide:nth-child(8) { animation-delay: 70s; }
.onsite-slide:nth-child(9) { animation-delay: 80s; }
.onsite-slide:nth-child(10) { animation-delay: 90s; }

@keyframes onsiteFade {
  0%    { opacity: 0; }
  2%    { opacity: 0.3; }
  8%    { opacity: 0.3; }
  10%   { opacity: 0; }
  100%  { opacity: 0; }
}

/* Semi-transparent overlay for readability */
.page--onsite {
  position: relative;
  background: rgba(250, 248, 245, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  margin: var(--space-lg) 1.5rem;
  padding: var(--space-lg);
  border-radius: 0.75rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.page--onsite .page-header {
  border-bottom-color: rgba(229, 225, 220, 0.6);
}

/* On-site page header styling */
body:has(.onsite-slideshow) .site-header {
  background: rgba(250, 248, 245, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

body:has(.onsite-slideshow) .site-footer {
  background: rgba(250, 248, 245, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* On-site grid with images */
.onsite-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1.5rem;
  margin-top: var(--space-md);
  margin-bottom: var(--space-lg);
}

.onsite-card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(229, 225, 220, 0.5);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.onsite-card:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--color-accent);
  box-shadow: 0 4px 16px rgba(58,107,76,0.1);
}

.onsite-card img {
  width: 100%;
  height: 12rem;
  object-fit: cover;
}

.onsite-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1rem 1.25rem 0.5rem;
  margin: 0;
}

.onsite-card p {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.35;
  padding: 0 1.25rem 1.25rem;
  margin: 0;
}

/* Section headers on onsite page */
.page--onsite .page-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--color-accent);
  letter-spacing: -0.01em;
}

.page--onsite .page-body h2:first-child {
  margin-top: 0;
}

.page--onsite .page-body > p:first-of-type {
  font-size: 1.05rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
}

/* ---- People page ---- */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 2rem;
  margin-top: var(--space-md);
}

.person-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  overflow: hidden;
  padding-bottom: 1.5rem;
}

.person-card img {
  width: 100%;
  height: auto;
}

.person-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  padding: 1.25rem 1.5rem 0.25rem;
  margin: 0;
}

.person-card h3 a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s;
}

.person-card h3 a:hover {
  color: var(--color-accent);
}

.person-role {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 1.5rem;
  margin: 0 0 1rem;
}

.person-card p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.35;
  padding: 0 1.5rem;
  margin: 0 0 0.75rem;
}

.person-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem 0;
  border-top: 1px solid var(--color-border-light);
  margin-top: 1rem;
}

.person-links a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 0.35rem 0.75rem;
  border-radius: 1rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.person-links a:hover {
  background: var(--color-accent);
  color: white;
}

.person-more {
  padding: 0.75rem 1.5rem 0;
  margin: 0;
}

.person-more a {
  font-size: 0.875rem;
  font-weight: 500;
}

/* ---- Portfolio pages ---- */
.portfolio {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-lg) 1.5rem var(--space-xl);
}

.portfolio-header {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.portfolio-image img {
  width: 100%;
  border-radius: 0.5rem;
  aspect-ratio: 1;
  object-fit: cover;
}

/* Portfolio slideshow */
.portfolio-slideshow {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
}

/* Small thumbnail slideshow */
.portfolio-slideshow--small {
  max-width: 20rem;
  cursor: pointer;
  margin-bottom: var(--space-lg);
}

.portfolio-slideshow--small .slideshow-container {
  aspect-ratio: 4/3;
}

.portfolio-slideshow--small .slideshow-arrow {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.75rem;
}

.portfolio-slideshow--small .slideshow-dots {
  padding: 0.35rem;
  gap: 0.35rem;
}

.portfolio-slideshow--small .slideshow-dot {
  width: 0.4rem;
  height: 0.4rem;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 3.5rem;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: rgba(0,0,0,0.95);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0.25rem;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.9);
  border: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slideshow-container {
  position: relative;
  aspect-ratio: 1;
}

.slideshow-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.slideshow-slide.active {
  opacity: 1;
}

.slideshow-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slideshow-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  font-size: 0.8rem;
  margin: 0;
}

.slideshow-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

.slideshow-arrow:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.slideshow-prev { left: 0.75rem; }
.slideshow-next { right: 0.75rem; }

.slideshow-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.slideshow-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.slideshow-dot:hover {
  background: rgba(255,255,255,0.8);
}

.slideshow-dot.active {
  background: white;
  transform: scale(1.2);
}

.portfolio-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.portfolio-role {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.portfolio-tagline {
  font-size: 1.15rem;
  color: var(--color-text-light);
  line-height: 1.35;
  margin-bottom: 1.25rem;
}

.portfolio-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.portfolio-links a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 0.4rem 0.85rem;
  border-radius: 1rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.portfolio-links a:hover {
  background: var(--color-accent);
  color: white;
}

.portfolio-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.portfolio-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
  color: var(--color-accent);
}

.portfolio-body p {
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.portfolio-body ul, .portfolio-body ol {
  margin-bottom: var(--space-sm);
  padding-left: 1.25rem;
}

.portfolio-body li {
  margin-bottom: 0.25rem;
}

.portfolio-body strong {
  font-weight: 600;
}

.portfolio-body hr {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-lg) 0;
}

.portfolio-footer {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.portfolio-footer h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

@media (max-width: 700px) {
  .portfolio-header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .portfolio-image {
    max-width: 200px;
    margin: 0 auto;
  }

  .portfolio-links {
    justify-content: center;
  }
}

/* Performance grid for portfolio */
.performance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.75rem;
  margin: var(--space-sm) 0 var(--space-md);
}

.performance-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.performance-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(58,107,76,0.1);
}

.performance-card img {
  width: 100%;
  height: 7rem;
  object-fit: cover;
}

.performance-card h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.65rem 0.15rem;
  margin: 0;
  line-height: 1.25;
}

.performance-card p {
  font-size: 0.75rem;
  color: var(--color-text-light);
  line-height: 1.3;
  padding: 0 0.65rem 0.5rem;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: calc(4 * 1.3 * 0.75rem);
}

.performance-card p em {
  display: inline;
}

.performance-card--clickable {
  cursor: pointer;
}

/* Performance lightbox */
.performance-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.95);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  flex-direction: column;
  padding: 2rem;
}

.performance-lightbox.active {
  display: flex;
}

.performance-lightbox img {
  max-width: 90vw;
  max-height: 65vh;
  object-fit: contain;
  border-radius: 0.25rem;
}

.performance-lightbox-text {
  color: #fff;
  text-align: center;
  max-width: 40rem;
  margin-top: 1.5rem;
}

.performance-lightbox-text h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.performance-lightbox-text p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.8);
}

.performance-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.9);
  border: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

.lightbox-arrow:hover {
  background: #fff;
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

/* Music player and grid */
.music-player {
  margin-bottom: var(--space-md);
}

.music-player-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.music-player-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 300;
}

.music-player-year {
  font-size: 0.7rem;
  color: var(--color-text-light);
}

.music-player audio {
  width: 100%;
  height: 2.5rem;
}

.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.5rem;
  margin-bottom: var(--space-sm);
}

.music-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.25rem;
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-family: inherit;
  overflow: hidden;
}

.music-card img {
  width: 100%;
  height: 5rem;
  object-fit: cover;
  display: block;
}

.music-card:hover {
  border-color: var(--color-accent);
}

.music-card.active {
  background: var(--color-accent-light);
  border-color: var(--color-accent);
}

.music-card h4 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 400;
  margin: 0;
  padding: 0.4rem 0.5rem 0.1rem;
  line-height: 1.25;
}

.music-card p {
  font-size: 0.7rem;
  color: var(--color-text-light);
  margin: 0;
  padding: 0 0.5rem 0.4rem;
}

/* Links grid (portfolio footer) */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.5rem;
}

.link-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.25rem;
  padding: 0;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.link-card:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.link-card h4 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 400;
  margin: 0;
  padding: 0.4rem 0.5rem 0.1rem;
  color: var(--color-text);
}

.link-card p {
  font-size: 0.7rem;
  color: var(--color-text-light);
  margin: 0;
  padding: 0 0.5rem 0.4rem;
}

.music-links {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-top: 0.5rem;
}

.legacy {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--color-text-light);
  text-transform: lowercase;
}

/* Projects grid for portfolio */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1.25rem;
  margin: var(--space-md) 0 var(--space-lg);
}

.project-card {
  display: block;
  background: var(--color-accent-light);
  border: 1px solid var(--color-accent);
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(58,107,76,0.2);
}

.project-card h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-accent);
  margin: 0 0 0.35rem;
  transition: color 0.2s;
}

.project-card:hover h4 {
  color: white;
}

.project-card p {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.35;
  margin: 0;
  transition: color 0.2s;
}

.project-card:hover p {
  color: rgba(255,255,255,0.9);
}

/* News items for portfolio */
.news-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: var(--space-md) 0;
}

.news-item {
  background: var(--color-surface);
  border-left: 2px solid var(--color-accent);
  padding: 0.5rem 0.75rem;
  border-radius: 0 0.25rem 0.25rem 0;
}

.news-date {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.news-item h4 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0.15rem 0 0.2rem;
  color: var(--color-text);
}

.news-item p {
  font-size: 0.8rem;
  color: var(--color-text-light);
  line-height: 1.3;
  margin: 0;
}

/* On-site hero slideshow */
.onsite-hero-slideshow {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto var(--space-lg);
  aspect-ratio: 16/9;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.onsite-hero-slideshow .slideshow-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.onsite-hero-slideshow .slideshow-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.onsite-hero-slideshow .slideshow-image.active {
  opacity: 1;
}

.onsite-hero-slideshow .slideshow-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 1rem 0.75rem;
  cursor: pointer;
  font-size: 1.5rem;
  z-index: 10;
  transition: background 0.2s;
}

.onsite-hero-slideshow .slideshow-arrow:hover {
  background: rgba(0,0,0,0.7);
}

.onsite-hero-slideshow .slideshow-prev {
  left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.onsite-hero-slideshow .slideshow-next {
  right: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
