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

:root {
  --bg: #f5f5f5;
  --text: #1a1a1a;
  --tag: #888;
  --drawer-bg: #f7f7f7;
  --border: #e0e0e0;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.7;
  padding: clamp(2rem, 6vw, 5rem) clamp(1.5rem, 7vw, 6rem);
  max-width: 800px;
}

/* ── Header ── */
.site-header {
  margin-bottom: 2.5rem;
}

.site-name {
  font-size: 1em;
  font-weight: 400;
}

.site-meta {
  color: var(--tag);
  font-style: italic;
  font-size: 0.9em;
}

.header-links {
  margin-top: 0.25rem;
  font-size: 0.9em;
}

.header-links a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  margin-right: 1em;
  cursor: pointer;
}

.header-links a:hover { opacity: 0.5; }

/* ── Drawer (CV, Statement, inline expandable) ── */
.drawer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease;
  opacity: 0;
}

.drawer.open {
  max-height: 2000px;
  opacity: 1;
}

.drawer-inner {
  background: var(--drawer-bg);
  border-left: 2px solid var(--border);
  padding: 1rem 1.25rem;
  margin: 0.4rem 0 0.8rem 0;
  font-size: 0.92em;
}

.drawer-inner p + p { margin-top: 0.75em; }

/* ── Works List ── */
.works-list {
  list-style: none;
}

.works-list li {
  border-bottom: 1px solid var(--border);
}

.works-list li:first-child {
  border-top: 1px solid var(--border);
}

.work-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
}

.work-title {
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.work-title:hover { opacity: 0.5; }

/* External links get a subtle indicator */
.work-title.external::after {
  content: ' ↗';
  font-size: 0.75em;
  opacity: 0.4;
}

.work-tag {
  font-style: italic;
  color: var(--tag);
  font-size: 0.82em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Footer / contact ── */
.site-footer {
  margin-top: 2.5rem;
  font-size: 0.85em;
  color: var(--tag);
}

.site-footer a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.site-footer a:hover { opacity: 0.5; }
