@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=DM+Sans:wght@300;400;500&display=swap');

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

:root {
  --serif: 'EB Garamond', Georgia, serif;
  --sans: 'DM Sans', sans-serif;
  --ink: #1a1a18;
  --ink-mid: #5a5a56;
  --ink-soft: #9a9a94;
  --ink-ghost: #c8c8c2;
  --paper: #fafaf7;
  --paper-warm: #f4f3ee;
  --blue: #1a4a7a;
  --blue-light: #e8f0f8;
  --blue-mid: #6a9ac4;
  --rule: rgba(26,26,24,0.1);
  --max: 820px;
}

html { font-size: 16px; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* NAV */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
  border-bottom: 0.5px solid var(--rule);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 100;
}

.nav-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-mid);
  letter-spacing: 0.04em;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 1px; }

/* PAGE WRAPPER */
.page { max-width: var(--max); margin: 0 auto; padding: 0 40px 80px; }

/* FOOTER */
footer {
  border-top: 0.5px solid var(--rule);
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 100%;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer .copy { font-size: 11px; color: var(--ink-soft); }
footer .social { display: flex; gap: 16px; }
footer .social a { font-size: 11px; color: var(--ink-soft); transition: color 0.15s; }
footer .social a:hover { color: var(--ink); }

/* SECTION LABEL */
.section-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 0.5px solid var(--rule);
}

/* PILLS */
.pill {
  display: inline-block;
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 20px;
  border: 0.5px solid var(--ink-ghost);
  color: var(--ink-mid);
  background: transparent;
  transition: border-color 0.15s, color 0.15s;
}
.pill:hover { border-color: var(--ink-mid); color: var(--ink); }
.pill.accent { background: var(--blue-light); border-color: var(--blue-mid); color: var(--blue); }
.pill.accent:hover { background: #d4e4f4; }

/* PAPER ENTRY */
.paper-entry { padding: 16px 0; border-bottom: 0.5px solid var(--rule); }
.paper-entry:last-child { border-bottom: none; }
.paper-title { font-family: var(--serif); font-size: 16px; font-weight: 400; color: var(--ink); line-height: 1.5; margin-bottom: 4px; }
.paper-meta { font-size: 12px; color: var(--ink-mid); line-height: 1.5; margin-bottom: 8px; }
.paper-meta em { font-style: italic; }
.paper-year { font-size: 11px; color: var(--ink-soft); float: right; margin-top: 3px; }
.paper-links { display: flex; gap: 8px; flex-wrap: wrap; }
.paper-link {
  font-size: 11px;
  color: var(--blue);
  background: var(--blue-light);
  border: 0.5px solid var(--blue-mid);
  padding: 2px 9px;
  border-radius: 10px;
  transition: background 0.15s;
}
.paper-link:hover { background: #d4e4f4; }

/* MEDIA CARD */
.media-card {
  border: 0.5px solid var(--rule);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 12px;
  transition: border-color 0.15s;
}
.media-card:hover { border-color: var(--ink-ghost); }
.media-card .card-meta { font-size: 12px; font-weight: 500; color: var(--ink-mid); margin-bottom: 5px; }
.media-card .card-meta .date { font-weight: 400; color: var(--ink-soft); }
.media-card .card-title { font-family: var(--serif); font-size: 16px; color: var(--blue); line-height: 1.5; margin-bottom: 5px; display: block; }
.media-card .card-title:hover { color: #0e3260; }
.media-card .card-desc { font-size: 12px; color: var(--ink-mid); line-height: 1.6; }

/* COLLAPSE */
.older-section { overflow: hidden; max-height: 0; transition: max-height 0.4s ease; }
.older-section.open { max-height: 4000px; }
.toggle-btn {
  margin-top: 14px;
  font-size: 12px;
  font-family: var(--sans);
  color: var(--blue);
  background: var(--blue-light);
  border: 0.5px solid var(--blue-mid);
  border-radius: 20px;
  padding: 5px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}
.toggle-btn:hover { background: #d4e4f4; }
.chevron { display: inline-block; transition: transform 0.3s; font-style: normal; font-size: 10px; }
.chevron.open { transform: rotate(180deg); }

/* RESPONSIVE */
@media (max-width: 640px) {
  nav { padding: 16px 20px; }
  .nav-name { font-size: 15px; }
  .nav-links { gap: 18px; }
  .page { padding: 0 20px 60px; }
  footer { padding: 16px 20px; }
}
