/* rousseau.tv — Personal site
 * Palette: warm off-white, charcoal, soft gray, muted slate accent
 * Typography: system sans + system serif
 * Direction: quiet, editorial, minimal
 */

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  --bg:      #F8F6F2;
  --surface: #F2EFE9;
  --text:    #1C1A18;
  --muted:   #78766F;
  --accent:  #596872;
  --border:  #E2DED8;

  --serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-w: 700px;
  --pad-x: clamp(20px, 5vw, 40px);
}

/* ==========================================================================
   Reset / Base
   ========================================================================== */

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

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

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.2;
  margin-top: 0;
}

p { margin-top: 0; }

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.skip-link {
  position: absolute;
  left: -9999px;
  top: -9999px;
}
.skip-link:focus {
  left: var(--pad-x);
  top: 12px;
  z-index: 100;
  background: var(--accent);
  color: var(--bg);
  padding: 6px 12px;
  font-size: 0.875rem;
  font-family: var(--sans);
  outline: none;
}

/* Focus visible — unobtrusive but clear */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.site-header {
  padding: 28px 0 0;
}

.site-header .container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

/* Brand mark */
.brand {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.brand:hover { color: var(--accent); }

/* Nav links */
.site-nav {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 3vw, 28px);
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.12s;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* External nav links get a subtle indicator */
.site-nav a[target="_blank"]::after {
  content: '\2197'; /* ↗ */
  font-size: 0.65em;
  margin-left: 2px;
  vertical-align: super;
  opacity: 0.5;
}

/* ==========================================================================
   Hero — Home page
   ========================================================================== */

.hero {
  padding: clamp(60px, 10vw, 100px) 0 clamp(40px, 6vw, 64px);
}

.hero__name {
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.hero__sub {
  font-size: clamp(1rem, 2vw, 1.175rem);
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 2rem;
}

.hero__cta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-block;
  padding: 10px 22px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.14s, color 0.14s;
}
.btn:hover {
  background: var(--accent);
  color: var(--bg);
}

.btn-ghost {
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.12s;
}
.btn-ghost:hover { color: var(--text); }
.btn-ghost::after { content: ' →'; }

.hero__intro {
  max-width: 480px;
  font-size: 0.9375rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.hero__notes {
  font-size: 0.8125rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  margin-top: 0;
}
.hero__notes a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.12s, color 0.12s;
}
.hero__notes a:hover {
  text-decoration-color: var(--accent);
  color: var(--text);
}

/* ==========================================================================
   About page
   ========================================================================== */

.page-body {
  padding: clamp(52px, 8vw, 88px) 0 clamp(40px, 6vw, 64px);
}

.page-body h1 {
  font-size: clamp(1.625rem, 3.5vw, 2.25rem);
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.page-body p {
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--text);
  max-width: 580px;
  margin-bottom: 1.25rem;
}

.page-body p a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.12s;
}
.page-body p a:hover {
  text-decoration-color: var(--accent);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding: 2.5rem 0 2.75rem;
  margin-top: auto;
}

.site-footer .container {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 24px;
  row-gap: 0.25rem;
  align-items: start;
}

.footer-id {
  font-family: var(--serif);
  font-size: 0.9375rem;
  color: var(--text);
}

.footer-location {
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 300;
  grid-column: 1;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  grid-row: 1 / 3;
  grid-column: 2;
}

.footer-nav a {
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.12s;
}
.footer-nav a:hover { color: var(--text); }

.footer-copy {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 300;
  margin-top: 1.5rem;
  grid-column: 1 / 3;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 480px) {
  .site-header .container {
    flex-direction: column;
    gap: 12px;
  }

  .site-nav {
    gap: 14px;
  }

  .site-footer .container {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .footer-nav {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    grid-row: auto;
    grid-column: 1;
    margin-top: 0.5rem;
    gap: 12px;
  }
}
