/* ============================================================
   ProfHakawati.com — Writing archive & essay pages
   Shared, static stylesheet. No build step, no framework.
   Mirrors the homepage design system (dark editorial tone).
   ============================================================ */

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

:root {
  --gold: #E1BD73;
  --gold-light: #F4D99A;
  --gold-dim: #B8924C;
  --black: #0A0A0A;
  --dark: #111010;
  --dark2: #1A1915;
  --stone: #2C2B27;
  --text: #E8E4DA;
  --text-muted: #9E9A8E;
  --text-dim: #6B6760;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--black);
  color: var(--text);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 20px;
  line-height: 1.75;
  overflow-x: hidden;
}

/* Skip link — keyboard users reach content without tabbing the whole nav */
.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 200;
  background: var(--gold);
  color: var(--black);
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  padding: 12px 20px;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus { top: 16px; }

/* Visible focus for keyboard navigation across all interactive elements */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ── NAV (shared with homepage) ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 56px;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(184,150,62,0.12);
}

.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }

.logo-monogram {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--dark);
  box-shadow: 0 0 12px rgba(184, 150, 62, 0.15);
  transition: border-color 0.3s cubic-bezier(0.25, 1, 0.5, 1), transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.logo-monogram img { width: 100%; height: 100%; object-fit: cover; display: block; }

.logo:hover .logo-monogram {
  border-color: var(--gold-light);
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(212, 175, 106, 0.25);
}

.logo-text { display: flex; flex-direction: column; gap: 1px; }

.logo-professor {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  font-weight: 400;
}

.logo-name {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  letter-spacing: 0.15em;
  color: var(--text);
  font-weight: 500;
}

.nav-links { display: flex; gap: 36px; list-style: none; }

.nav-links a {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--gold); }

.gold-rule { width: 40px; height: 2px; background: var(--gold); margin: 18px 0; }

/* ── ARCHIVE PAGE ── */
.archive-wrap { max-width: 980px; margin: 0 auto; padding: 160px 32px 80px; }

.archive-head { margin-bottom: 56px; }

.section-label {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 8px;
}

.archive-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(40px, 5.4vw, 64px);
  font-weight: 400;
  line-height: 1.12;
  color: var(--text);
  margin-top: 12px;
}

.archive-lede {
  color: var(--text-muted);
  font-style: italic;
  font-size: 20px;
  line-height: 1.7;
  margin-top: 18px;
  max-width: 720px;
}

.essay-cards { display: flex; flex-direction: column; gap: 1px; background: rgba(184,150,62,0.1); }

.essay-card {
  background: var(--dark);
  padding: 40px 40px;
  transition: background 0.3s;
}

.essay-card:hover { background: var(--dark2); }

.essay-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 14px;
}

.essay-card-meta .dot { color: var(--text-dim); }
.essay-card-meta time { color: var(--text-muted); }

.essay-card h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 500;
  line-height: 1.18;
  color: var(--text);
  margin-bottom: 10px;
}

.essay-card h2 a { color: inherit; text-decoration: none; transition: color 0.2s; }
.essay-card h2 a:hover { color: var(--gold-light); }

.essay-card-deck { font-style: italic; color: var(--text-muted); font-size: 19px; margin-bottom: 14px; }

.essay-card-excerpt { color: var(--text-muted); font-size: 19px; line-height: 1.7; margin-bottom: 22px; }

.essay-card-links { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }

.read-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: gap 0.2s;
}

.read-link:hover { gap: 14px; }

.source-link {
  font-size: 16px;
  color: var(--text-dim);
}

.source-link a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.source-link a:hover { color: var(--gold); }

/* ── ESSAY (article) PAGE ── */
.essay-wrap { max-width: 760px; margin: 0 auto; padding: 160px 32px 40px; }

.back {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 44px;
}

.back:hover { color: var(--gold-light); }

.essay-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 22px;
}

.essay-meta .dot { color: var(--text-dim); }
.essay-meta time { color: var(--text-muted); }

.essay-series {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--gold-light);
  margin-bottom: 6px;
}

.essay-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.14;
  color: var(--text);
  margin-bottom: 16px;
}

.essay-deck {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.4;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.essay-body { margin-top: 8px; }
.essay-body p { color: var(--text-muted); margin-bottom: 22px; font-size: 20px; line-height: 1.8; }
.essay-body p strong { color: var(--text); font-weight: 500; }
.essay-body .lead { color: var(--text); font-size: 22px; }

.canonical-note {
  margin: 40px 0;
  padding: 24px 28px;
  background: var(--dark);
  border-left: 2px solid var(--gold);
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.7;
}

.canonical-note strong { color: var(--text); font-weight: 500; }

.essay-source {
  font-size: 17px;
  color: var(--text-dim);
  margin-top: 12px;
}

.essay-source a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.essay-source a:hover { color: var(--gold); }

.essay-footer-nav {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid rgba(184,150,62,0.16);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}

/* ── FOOTER (shared with homepage) ── */
footer {
  background: var(--black);
  padding: 40px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(184,150,62,0.1);
}

.footer-left { display: flex; align-items: center; gap: 12px; }

.footer-monogram {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(184, 150, 62, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--dark);
  transition: border-color 0.3s ease;
}

.footer-monogram img { width: 100%; height: 100%; object-fit: cover; display: block; }
.footer-left:hover .footer-monogram { border-color: var(--gold); }
.footer-identity { display: flex; flex-direction: column; gap: 4px; }

.footer-name {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.footer-tagline {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--text-dim);
}

.footer-copy { font-size: 15px; color: var(--text-muted); }

.footer-links { display: flex; gap: 28px; }

.footer-links a {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--gold); }

/* ── ESSAY END MATTER (author, series, related, cross-links) ── */
.essay-end { margin-top: 56px; }

.essay-prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(184,150,62,0.14);
  border: 1px solid rgba(184,150,62,0.14);
  margin-bottom: 44px;
}

.prevnext {
  background: var(--dark);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  transition: background 0.25s;
}

.prevnext:hover { background: var(--dark2); }
.prevnext.next { text-align: right; align-items: flex-end; }
.prevnext.placeholder { visibility: hidden; }

.pn-label {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.pn-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: var(--text-muted);
  line-height: 1.3;
}

.prevnext:hover .pn-title { color: var(--text); }

.about-author {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 28px;
  background: var(--dark);
  border-left: 2px solid var(--gold);
  margin-bottom: 44px;
}

.author-portrait {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(184,150,62,0.4);
  flex: 0 0 auto;
}

.author-kicker,
.related-kicker {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 10px;
}

.author-bio { color: var(--text-muted); font-size: 18px; line-height: 1.7; }
.author-bio strong { color: var(--text); font-weight: 500; }

.author-bio a,
.related-desc a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(184,150,62,0.3);
  transition: color 0.2s;
}

.author-bio a:hover,
.related-desc a:hover { color: var(--gold-light); }

.essay-related {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 44px;
}

.related-desc { color: var(--text-muted); font-size: 18px; line-height: 1.65; }

.related-essays { margin-bottom: 44px; }
.related-essays ul { list-style: none; }
.related-essays li { border-bottom: 1px solid rgba(184,150,62,0.10); }

.related-essays a {
  display: block;
  padding: 12px 2px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
}

.related-essays a:hover { color: var(--gold); padding-left: 8px; }

.essay-crosslinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 24px 0;
  margin-bottom: 8px;
  border-top: 1px solid rgba(184,150,62,0.14);
}

.essay-crosslinks a {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.essay-crosslinks a:hover { color: var(--gold); }

/* Brighter champagne-gold typography with a restrained metallic sheen. */
.section-label,
.essay-card-meta,
.read-link,
.back,
.essay-meta,
.essay-series,
.pn-label,
.author-kicker,
.related-kicker,
.author-bio a,
.related-desc a,
.nav-links a.active,
.essay-crosslinks a:hover,
.footer-links a:hover {
  text-shadow: 0 0 8px rgba(244,217,154,0.2), 0 1px 0 rgba(255,245,215,0.12);
}

@media (max-width: 600px) {
  .essay-prevnext, .essay-related { grid-template-columns: 1fr; }
  .prevnext.next { text-align: left; align-items: flex-start; }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav {
    padding: 16px 24px;
    flex-direction: column;
    gap: 16px;
    text-align: center;
    background: var(--black);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .logo-professor { color: #B8B3A7; }
  .logo-name { color: #F3EFE5; }
  .nav-links a { color: #C8C3B8; }
  .nav-links { gap: 20px; flex-wrap: wrap; justify-content: center; }
  .archive-wrap { padding-top: 200px; }
  .essay-wrap { padding-top: 200px; }
  .essay-card { padding: 32px 26px; }
  footer {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    padding: 40px 24px;
  }
  .footer-links { justify-content: center; flex-wrap: wrap; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
}
