/* ==========================================================
   style.css — personal site
   Plain CSS, zero dependencies (one Google Font import).
   Astro migration: this file moves to src/styles/global.css
   and is imported in your Layout component.
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

/* ----------------------------------------------------------
   Design tokens
   ---------------------------------------------------------- */
:root {
  --bg:          #f6f4ef;       /* warm off-white */
  --text:        #1c1a18;       /* near-black */
  --muted:       #8a8680;       /* secondary text */
  --rule:        rgba(28, 26, 24, 0.12);

  --serif:       'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --mono:        'Courier New', 'Lucida Console', Courier, monospace;

  --col:         620px;         /* main text column */
  --pad-h:       clamp(1.5rem, 9vw, 8rem);   /* wide side margins */
  --pad-v:       clamp(3rem, 7vh, 5.5rem);   /* top/bottom breathing */
  --gap:         1.75rem;       /* vertical rhythm unit */
}

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

/* ----------------------------------------------------------
   Base
   ---------------------------------------------------------- */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.8;
  padding: var(--pad-v) var(--pad-h);
}

/* ----------------------------------------------------------
   Layout — single narrow column, centered
   ---------------------------------------------------------- */
.site-wrap {
  max-width: var(--col);
  margin: 0 auto;
}

/* ----------------------------------------------------------
   Navigation
   ---------------------------------------------------------- */
.site-nav {
  margin-bottom: calc(var(--gap) * 2.5);
}

.site-name {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 0.9rem;
}

.site-name:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.6rem;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  transition: color 0.12s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

/* ----------------------------------------------------------
   Typography
   ---------------------------------------------------------- */
h1 {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: var(--gap);
}

h2 {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  margin: calc(var(--gap) * 1.5) 0 0.5rem;
}

/* Section label — monospace small caps treatment */
.label {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.2rem;
}

p:last-child {
  margin-bottom: 0;
}

/* ----------------------------------------------------------
   Links (body text)
   ---------------------------------------------------------- */
a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* ----------------------------------------------------------
   Horizontal rule
   ---------------------------------------------------------- */
.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: calc(var(--gap) * 1.5) 0;
}

/* ----------------------------------------------------------
   Entry list — used on index (recent) and essays
   ---------------------------------------------------------- */
.entries {
  list-style: none;
}

.entry {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  column-gap: 1.2rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-top: 1px solid var(--rule);
}

.entry:last-child {
  border-bottom: 1px solid var(--rule);
}

.entry-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  padding-top: 0.15rem;
  white-space: nowrap;
}

.entry-body {}

.entry-title {
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1.5;
}

.entry-title a {
  text-decoration: none;
  color: var(--text);
}

.entry-title a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-note {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

/* ----------------------------------------------------------
   About page — bio blocks
   ---------------------------------------------------------- */
.bio-block {
  margin-bottom: calc(var(--gap) * 1.2);
}

/* ----------------------------------------------------------
   Footer
   ---------------------------------------------------------- */
.site-footer {
  margin-top: calc(var(--gap) * 3);
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.6;
}

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

.site-footer a:hover {
  color: var(--text);
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 540px) {
  :root {
    --pad-h: 1.25rem;
    --pad-v: 2.5rem;
  }

  .entry {
    grid-template-columns: 1fr;
    row-gap: 0.1rem;
  }

  .entry-meta {
    font-size: 0.68rem;
  }
}
