/* ============================================================
   ROB PETTIT — Personal Site
   Editorial-meets-Cartographic Design System
   ============================================================ */

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

/* ── TOKENS ── */
:root {
  --ink:       #1a1612;
  --ink-2:     #2e2820;
  --parchment: #f5f0e8;
  --parchment-2: #ede7d9;
  --cream:     #faf7f2;
  --gold:      #7c5e10;
  --gold-light:#b8952a;
  --rust:      #7a3d1f;
  --sage:      #4a5c4e;
  --muted:     #2f324e;
  --line:      rgba(26,22,18,0.12);
  --line-gold: rgba(139,105,20,0.25);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'EB Garamond', Georgia, serif;
  --font-label:   'Montserrat', sans-serif;

  --nav-h: 64px;
  --max-w: 1100px;
  --col-content: 680px;
}

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

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.75;
  overflow-x: hidden;
}

/* ── TEXTURE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ── NAVIGATION ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  border-bottom: 2px solid var(--gold);
  height: var(--nav-h);
  display: flex;
  align-items: center;
}

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

.nav-wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--parchment);
  text-decoration: none;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.nav-wordmark em {
  font-style: italic;
  color: var(--gold-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-label);
  font-weight: 300;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.65);
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--parchment);
  border-color: var(--line-gold);
}

.nav-links a.active {
  color: var(--gold-light);
}

/* ── PAGE HERO ── */
.page-hero {
  background: var(--ink);
  padding: 4.5rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 39px,
      rgba(139,105,20,0.06) 39px,
      rgba(139,105,20,0.06) 40px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 39px,
      rgba(139,105,20,0.06) 39px,
      rgba(139,105,20,0.06) 40px
    );
  pointer-events: none;
}

.page-hero-eyebrow {
  font-family: var(--font-label);
  font-weight: 300;
  font-size: 0.6rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.25rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: var(--parchment);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.page-hero h1 em {
  font-style: italic;
  color: var(--gold-light);
}

.page-hero-sub {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.1rem;
  color: rgba(245,240,232,0.5);
  max-width: 540px;
  margin: 0 auto;
}

/* ── COORDINATE DECORATION ── */
.coord-strip {
  background: var(--parchment-2);
  border-top: 1px solid var(--line-gold);
  border-bottom: 1px solid var(--line-gold);
  padding: 0.6rem 2rem;
  display: flex;
  justify-content: center;
  gap: 3rem;
}

.coord-strip span {
  font-family: var(--font-label);
  font-weight: 300;
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.coord-strip span strong {
  color: var(--gold);
  font-weight: 400;
}

/* ── MAIN LAYOUT ── */
.site-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  position: relative;
  z-index: 1;
}

/* Two-column layout */
.layout-cols {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 5rem;
  align-items: start;
}

/* ── PROSE ── */
.prose h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.9rem;
  color: var(--ink);
  margin-bottom: 1.2rem;
  margin-top: 2.5rem;
}

.prose h2:first-child { margin-top: 0; }

.prose p {
  margin-bottom: 1.4rem;
  color: var(--ink-2);
}

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

.prose a {
  color: var(--rust);
  text-decoration: underline;
  text-decoration-color: rgba(122,61,31,0.3);
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.prose a:hover {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

/* Drop cap for lead paragraph */
.prose .lead::first-letter {
  font-family: var(--font-display);
  font-size: 4.2em;
  font-weight: 500;
  float: left;
  line-height: 0.72;
  margin: 0.08em 0.1em 0 0;
  color: var(--gold);
}

/* ── SIDEBAR ── */
.sidebar {
  padding-top: 0.25rem;
}

.sidebar-box {
  background: var(--parchment);
  border: 1px solid var(--line-gold);
  padding: 1.75rem 1.75rem;
  margin-bottom: 2rem;
}
.sidebar-box .footer-contact-links a {
  color: var(--ink-2);
  border-color: var(--line-gold);
}

.sidebar-box .footer-contact-links a:hover {
  color: var(--rust);
  border-color: var(--rust);
}

.sidebar-box:last-child { margin-bottom: 0; }

.sidebar-label {
  font-family: var(--font-label);
  font-weight: 400;
  font-size: 0.58rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line-gold);
}

.sidebar-links {
  list-style: none;
}

.sidebar-links li {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0;
}

.sidebar-links li:last-child { border-bottom: none; }

.sidebar-links a {
  font-family: var(--font-label);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  line-height: 1.45;
  color: var(--ink-2);
  text-decoration: none;
  display: block;
  transition: color 0.2s, padding-left 0.2s;
}

.sidebar-links a:hover {
  color: var(--rust);
  padding-left: 0.4rem;
}

.sidebar-links .new-badge {
  display: inline-block;
  font-size: 0.52rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--rust);
  padding: 0.1rem 0.4rem;
  margin-left: 0.4rem;
  vertical-align: middle;
  font-family: var(--font-label);
}

/* ── DIVIDER ── */
.section-rule {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 3rem 0;
}

.section-rule::before,
.section-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-gold);
}

.section-rule span {
  font-family: var(--font-label);
  font-size: 0.58rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

/* ── PULL QUOTE ── */
.pull-quote {
  background: var(--ink);
  color: var(--parchment);
  padding: 3rem 2rem;
  text-align: center;
  margin: 4rem 0 0;
}

.pull-quote blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--parchment-2);
  max-width: 680px;
  margin: 0 auto 1rem;
}

.pull-quote cite {
  font-family: var(--font-label);
  font-style: normal;
  font-weight: 200;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-light);
}

/* ── FOOTER ── */
.site-footer {
  background: var(--ink-2);
  border-top: 2px solid var(--gold);
  padding: 3rem 2rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-col h3 {
  font-family: var(--font-label);
  font-weight: 400;
  font-size: 0.58rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.footer-col p,
.footer-col address {
  font-family: var(--font-label);
  font-style: normal;
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: rgba(245,240,232,0.5);
  line-height: 1.8;
}

.footer-col a {
  color: rgba(245,240,232,0.5);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-contact-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-contact-links a {
  font-family: var(--font-label);
  font-weight: 300;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.5);
  text-decoration: none;
  border: 1px solid rgba(245,240,232,0.15);
  padding: 0.4rem 0.9rem;
  transition: color 0.2s, border-color 0.2s;
}

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

.footer-bottom {
  max-width: var(--max-w);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(245,240,232,0.08);
  text-align: center;
  font-family: var(--font-label);
  font-weight: 200;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.25);
}

/* ── COURSE CARDS ── */
.course-card {
  background: var(--parchment);
  border-left: 3px solid var(--gold);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}

.course-card:last-child { margin-bottom: 0; }

.course-number {
  font-family: var(--font-label);
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.course-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: 0.6rem;
}

.course-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  font-family: var(--font-label);
  font-weight: 300;
}

/* ── ART INDEX CARDS ── */
.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.art-card {
  background: var(--ink);
  text-decoration: none;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(139,105,20,0.2);
  transition: border-color 0.3s, transform 0.3s;
}

.art-card:hover {
  border-color: var(--gold-light);
  transform: translateY(-3px);
}

.art-card-thumb {
  aspect-ratio: 4/3;
  background: var(--ink-2);
  overflow: hidden;
  position: relative;
}

.art-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85);
  transition: transform 0.6s ease, filter 0.3s;
}

.art-card:hover .art-card-thumb img {
  transform: scale(1.04);
  filter: brightness(1);
}

.art-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-2);
}

.art-card-body {
  padding: 1.5rem;
}

.art-card-series {
  font-family: var(--font-label);
  font-weight: 300;
  font-size: 0.58rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.art-card-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
  color: var(--parchment);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.art-card-desc {
  font-family: var(--font-label);
  font-weight: 300;
  font-size: 0.72rem;
  color: rgba(245,240,232,0.45);
  line-height: 1.55;
}

/* coming soon card */
.art-card.coming-soon {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}

.fade-in-1 { animation-delay: 0.1s; }
.fade-in-2 { animation-delay: 0.25s; }
.fade-in-3 { animation-delay: 0.4s; }

/* ── RESPONSIVE ── */
@media (max-width: 820px) {
  .layout-cols {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 2rem;
  }

  .coord-strip {
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .nav-links a {
    padding: 0.4rem 0.5rem;
    font-size: 0.58rem;
  }
}

@media (max-width: 600px) {
  .page-hero { padding: 3rem 1.5rem; }
  .site-main { padding: 2.5rem 1.25rem 4rem; }
  
  .nav-wordmark { font-size: 0.9rem; }
}
