/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --bg:          #eeebe3;
  --bg-surface:  #e4e0d7;
  --bg-dark:     #1c1a16;
  --text:        #1c1a16;
  --text-muted:  #7d7669;
  --accent:      #c0532a;   /* terracotta — decorative accents */
  --link:        #516818;   /* vivid olive — links */
  --link-hover:  #2d3c0a;   /* dark olive — link hover */
  --olive-light: #8aaa3a;   /* lighter olive — borders/strokes */
  --border:      #cdc7bc;
  --nav-text:    #eeebe3;
  --radius:      2px;
  --max-w:       960px;
  --font-mono:   'IBM Plex Mono', 'Courier New', monospace;
  --font-body:   'IBM Plex Sans', system-ui, sans-serif;
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* Prose links (CV notes, about text, etc.) */
.about-text a, .cv-note a {
  color: var(--link);
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.about-text a:hover, .cv-note a:hover { color: var(--link-hover); }
a   { color: inherit; }

/* ── Navigation ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg-dark);
}

.nav-inner {
  display: flex;
  align-items: center;
  position: relative;
  max-width: calc(var(--max-w) + 4rem);
  margin: 0 auto;
  padding: 0.75rem 2rem;
}

.nav-left {
  flex: 1;
}

.nav-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
}

.site-name {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: lowercase;
  color: var(--nav-text);
  text-decoration: none;
  white-space: nowrap;
}

.site-logo-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  line-height: 0;
  text-decoration: none;
}

.site-logo {
  height: 44px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: var(--nav-text);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active { opacity: 1; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--nav-text);
  transition: transform 0.25s, opacity 0.25s;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: var(--nav-text);
  text-decoration: none;
  padding: 0.9rem 2rem;
  opacity: 0.8;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: opacity 0.15s;
}
.mobile-menu a:hover { opacity: 1; }

@media (max-width: 700px) {
  .nav-links  { display: none; }
  .hamburger  { display: flex; }
  .nav-inner  { flex-wrap: wrap; padding: 0.6rem 1.25rem 0.5rem; }
  .nav-left   { order: 2; flex: 1; display: flex; align-items: center; }
  .nav-right  { order: 3; flex: 0; }
  .site-logo-center {
    order: 1;
    position: static;
    transform: none;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0.2rem 0 0.5rem;
  }
  .site-logo  { height: 36px; }
  .hero       { height: 65svh; }
}

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: calc(100svh - 52px);
  min-height: 400px;
  overflow: hidden;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
  padding: 2.5rem;
}
.hero-slide.active { opacity: 1; }

.hero-slide img {
  max-height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Home intro tag */
.home-intro {
  padding: 1.4rem 2rem;
  border-bottom: 1px solid var(--border);
}
.home-intro p {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: var(--text-muted);
  max-width: calc(var(--max-w) + 4rem);
  margin: 0 auto;
}

/* ── Page wrap ──────────────────────────────────────────────────────────────── */
.page-wrap {
  max-width: calc(var(--max-w) + 4rem);
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
}

.page-title {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}

/* ── Breadcrumb ─────────────────────────────────────────────────────────────── */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}
.breadcrumb a { text-decoration: none; transition: color 0.15s; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .bc-sep { opacity: 0.4; }
.breadcrumb .bc-current { color: var(--text); }

/* ── Work header ────────────────────────────────────────────────────────────── */
.work-header { margin-bottom: 2.5rem; }

.work-title {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.3rem;
}

.work-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* ── Gallery (individual work page) ────────────────────────────────────────── */
.gallery {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.gallery img {
  width: 100%;
  height: auto;
}

/* ── Work grid (index pages) ────────────────────────────────────────────────── */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.75rem 1.5rem;
  margin-bottom: 1rem;
}

.work-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.work-card-thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg);
  margin-bottom: 0.6rem;
}
.work-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}
.work-card:hover .work-card-thumb img { transform: scale(1.04); }

.work-card-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
  line-height: 1.4;
}
.work-card-year {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
}

/* ── Section blocks (used on overview pages) ────────────────────────────────── */
.section-block { margin-bottom: 4rem; }

.section-label {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── Department "view all" link ─────────────────────────────────────────────── */
.dept-more {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.dept-more:hover { color: var(--text); border-color: var(--text); }

/* ── Pill navigation (department switcher) ───────────────────────────────────── */
.pill-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 2.5rem;
}
.pill {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius);
  transition: all 0.15s;
}
.pill:hover,
.pill.active {
  background: var(--bg-dark);
  color: var(--nav-text);
  border-color: var(--bg-dark);
}

/* ── About ──────────────────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.about-text p { margin-bottom: 1rem; font-size: 0.88rem; line-height: 1.8; }
.about-text p:last-child { margin-bottom: 0; }

.about-col > .section-label:first-child { margin-top: 0; }
.about-col > .section-label { margin-top: 2.5rem; }

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.contact-list a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-decoration: none;
  color: var(--link);
  border-bottom: 1px solid var(--link);
  display: inline;
  transition: color 0.15s, border-color 0.15s;
}
.contact-list a:hover { color: var(--link-hover); border-color: var(--link-hover); }

/* CV */
.cv-block { margin-bottom: 2rem; }
.cv-category {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 400;
}
.cv-entry {
  font-size: 0.82rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
  padding-left: 0;
}
.cv-year {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  margin-right: 0.75rem;
}
.cv-note { font-size: 0.82rem; color: var(--text-muted); }
.cv-note a { text-decoration: underline; }
.cv-role {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-style: italic;
  color: var(--text-muted);
  margin: 0.65rem 0 0.2rem;
}
.cv-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .page-wrap       { padding: 2.5rem 1.25rem 4rem; }
  .hero-slide      { padding: 1.25rem; }
  .about-grid      { grid-template-columns: 1fr; gap: 0; }
  .about-col       { padding-top: 2rem; border-top: 1px solid var(--border); }
  .about-col:first-child { padding-top: 0; border-top: none; }
  .work-grid       { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
}

@media (max-width: 480px) {
  .nav-inner       { padding: 0.8rem 1.25rem; }
  .home-intro      { padding: 1.1rem 1.25rem; }
  .work-grid       { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
}
