/* katherineelkins.com — Shared Styles */
/* Design: Editorial literary minimalism. Warm, authoritative, distinctive. */

/* Font loaded via <link> in HTML for better performance */

:root {
  --color-bg: #FAF9F6;
  --color-surface: #FFFFFF;
  --color-text: #1C1C1C;
  --color-text-secondary: #555555;
  --color-text-tertiary: #8A8A8A;
  --color-accent: #7B2D3B;
  --color-accent-hover: #5E2130;
  --color-accent-light: rgba(123,45,59,0.07);
  --color-border: #E8E4DF;
  --color-border-light: #F0ECE7;
  --color-warm: #F5F2ED;
  --serif: 'Cormorant Garamond', 'Georgia', serif;
  --sans: 'Libre Franklin', -apple-system, sans-serif;
  --max-width: 1080px;
  --narrow: 720px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-accent-hover); }
em { font-style: italic; }
strong { font-weight: 600; }

/* ── LAYOUT ── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; }
.narrow { max-width: var(--narrow); margin: 0 auto; padding: 0 2rem; }
.section { padding: 5rem 0; }
.section--warm { background: var(--color-warm); }

/* ── NAV ── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(250,249,246,0.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border-light);
  transition: box-shadow 0.3s;
}
.site-nav.scrolled { box-shadow: 0 1px 16px rgba(0,0,0,0.05); }
.site-nav .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav-name {
  font-family: var(--serif); font-size: 1.2rem; font-weight: 600;
  color: var(--color-text); text-decoration: none; letter-spacing: -0.01em;
}
.nav-links { display: flex; gap: 1.75rem; list-style: none; }
.nav-links a {
  font-size: 0.82rem; font-weight: 500; color: var(--color-text-secondary);
  text-decoration: none; letter-spacing: 0.02em; transition: color 0.2s;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--color-accent); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1.5px; background: var(--color-accent);
}
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger svg { width: 22px; height: 22px; stroke: var(--color-text); }

/* ── PAGE HEADER ── */
.page-header {
  padding: 8rem 0 3rem;
  border-bottom: 1px solid var(--color-border);
}
.page-header .page-label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--color-accent); margin-bottom: 0.75rem;
}
.page-header h1 {
  font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600; line-height: 1.15; letter-spacing: -0.02em;
}
.page-header .page-subtitle {
  font-size: 1.05rem; color: var(--color-text-secondary);
  line-height: 1.7; max-width: 640px; margin-top: 1rem;
}

/* ── PROSE ── */
.prose { max-width: var(--narrow); }
.prose p { margin-bottom: 1.25rem; line-height: 1.75; color: var(--color-text-secondary); }
.prose p:last-child { margin-bottom: 0; }
.prose h2 {
  font-family: var(--serif); font-size: 1.6rem; font-weight: 600;
  color: var(--color-text); margin: 3rem 0 1rem; line-height: 1.25;
}
.prose h3 {
  font-family: var(--serif); font-size: 1.25rem; font-weight: 600;
  color: var(--color-text); margin: 2.5rem 0 0.75rem; line-height: 1.3;
}
.prose ul, .prose ol { margin: 0 0 1.25rem 1.5rem; color: var(--color-text-secondary); }
.prose li { margin-bottom: 0.4rem; line-height: 1.65; }
.prose a { border-bottom: 1px solid rgba(123,45,59,0.3); }
.prose a:hover { border-color: var(--color-accent); }

/* ── SECTION HEADERS ── */
.section-label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--color-accent); margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; margin-bottom: 1rem;
}
.section-intro {
  font-size: 1rem; color: var(--color-text-secondary);
  max-width: 600px; line-height: 1.7; margin-bottom: 3rem;
}

/* ── CARDS ── */
.card-grid { display: grid; gap: 1.5rem; }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px; padding: 2rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 24px rgba(123,45,59,0.05);
}
.card-tag {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--color-accent); margin-bottom: 0.6rem;
}
.card h3 {
  font-family: var(--serif); font-size: 1.2rem; font-weight: 600;
  line-height: 1.3; margin-bottom: 0.75rem;
}
.card p {
  font-size: 0.88rem; color: var(--color-text-secondary); line-height: 1.65;
}

/* ── LINK LIST (for publications, talks) ── */
.link-list { border-top: 1px solid var(--color-border); }
.link-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border-light);
}
.link-item-meta {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--color-text-tertiary); margin-bottom: 0.35rem;
}
.link-item h3 {
  font-family: var(--serif); font-size: 1.05rem; font-weight: 600;
  line-height: 1.35; margin-bottom: 0.3rem;
}
.link-item h3 a { color: var(--color-text); border-bottom: 1px solid transparent; }
.link-item h3 a:hover { color: var(--color-accent); border-color: var(--color-accent); }
.link-item p {
  font-size: 0.85rem; color: var(--color-text-secondary); line-height: 1.6;
}

/* ── FOOTER ── */
.site-footer {
  padding: 3.5rem 0; border-top: 1px solid var(--color-border);
  font-size: 0.8rem; color: var(--color-text-tertiary);
}
.footer-grid {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 2rem;
}
.footer-left { max-width: 320px; }
.footer-left .footer-name {
  font-family: var(--serif); font-size: 1rem; font-weight: 600;
  color: var(--color-text); margin-bottom: 0.5rem;
}
.footer-left p { line-height: 1.55; }
.footer-cols { display: flex; gap: 3rem; }
.footer-col h4 {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--color-text-secondary);
  margin-bottom: 0.7rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.35rem; }
.footer-col a { color: var(--color-text-tertiary); transition: color 0.2s; }
.footer-col a:hover { color: var(--color-accent); }

/* ── REVEAL (crawler-safe) ── */
.reveal { opacity: 1; transform: none; }
.reveal.will-animate {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.will-animate.visible { opacity: 1; transform: none; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .card-grid--2, .card-grid--3 { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 60px; left: 0; right: 0;
    background: var(--color-bg); border-bottom: 1px solid var(--color-border);
    padding: 1.25rem 2rem; gap: 1rem;
  }
  .hamburger { display: block; }
  .page-header { padding: 7rem 0 2.5rem; }
  .section { padding: 3.5rem 0; }
  .footer-cols { flex-direction: column; gap: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal.will-animate { opacity: 1; transform: none; transition: none; }
}

/* ── SKIP LINK ── */
.skip-link {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: fixed; top: 0; left: 0; right: 0;
  width: auto; height: auto; padding: 1rem; z-index: 1000;
  background: var(--color-bg); color: var(--color-accent);
  text-align: center; font-weight: 600;
}

/* ── PRINT ── */
@media print {
  .site-nav, .hamburger, .site-footer, .hero-links { display: none; }
  .hero, .section--warm { background: none; }
  body { color: #000; font-size: 12pt; }
  a { color: #000; text-decoration: underline; }
  .page-header { padding-top: 1rem; }
}
