/* ================================================================
   LYNN HERRICK — style.css
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Jost:wght@300;400;500;600&display=swap');

/* ----------------------------------------------------------------
   Custom Properties
   ---------------------------------------------------------------- */
:root {
  --bg:         #F4EFE6;
  --bg-nav:     #1C1714;
  --text:       #1C1714;
  --muted:      #7A6F64;
  --accent:     #B85C38;
  --border:     #D5CBBC;
  --nav-text:   #F4EFE6;

  --ff-display: 'Cormorant Garamond', Georgia, serif;
  --ff-body:    'Jost', system-ui, sans-serif;

  --sp-xs: 0.5rem;
  --sp-sm: 1rem;
  --sp-md: 2rem;
  --sp-lg: 4rem;
  --sp-xl: 7rem;

  --max-w: 1080px;
  --ease:  180ms ease;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

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

a { color: var(--accent); text-decoration: none; transition: opacity var(--ease); }
a:hover { opacity: 0.65; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ----------------------------------------------------------------
   Layout
   ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--sp-md);
}

/* ----------------------------------------------------------------
   Navigation
   ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg-nav);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem var(--sp-md);
  max-width: var(--max-w);
  margin-inline: auto;
}

.nav-brand {
  font-family: var(--ff-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--nav-text);
  letter-spacing: 0.08em;
}
.nav-brand:hover { opacity: 0.75; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.5);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease), opacity var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--nav-text);
  border-bottom-color: var(--accent);
  opacity: 1;
}

@media (max-width: 480px) {
  .site-nav { padding: 1rem; }
  .nav-links { gap: var(--sp-sm); }
  .nav-links a { font-size: 0.65rem; }
  .nav-brand { font-size: 1.2rem; }
}

/* ----------------------------------------------------------------
   Footer
   ---------------------------------------------------------------- */
.site-footer {
  padding: var(--sp-lg) var(--sp-md);
  border-top: 1px solid var(--border);
  margin-top: var(--sp-xl);
}

.site-footer p {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-align: center;
}

/* ================================================================
   HOME
   ================================================================ */
.page-home .home-main {
  min-height: calc(100svh - 58px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Ambient warmth blob */
.page-home .home-main::before {
  content: '';
  position: absolute;
  top: -15%;
  right: -5%;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(184, 92, 56, 0.08) 0%,
    transparent 65%);
  pointer-events: none;
}

.home-intro {
  padding-block: var(--sp-xl);
}

.home-greeting {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

.home-name {
  font-family: var(--ff-display);
  font-size: clamp(4.5rem, 13vw, 11rem);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--sp-md);
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.home-rule {
  width: 3.5rem;
  height: 2px;
  background: var(--accent);
  border: none;
  margin-bottom: var(--sp-md);
  transform-origin: left;
  animation: expand 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.home-tagline {
  font-size: clamp(0.95rem, 2.2vw, 1.2rem);
  font-weight: 300;
  color: var(--text);
  letter-spacing: 0.01em;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.dot-sep {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  margin-inline: 0.75rem;
  flex-shrink: 0;
  position: relative;
  top: 1px;
}

.home-location {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

/* ================================================================
   ABOUT
   ================================================================ */
.about-main {
  padding-block: var(--sp-xl) var(--sp-lg);
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-title {
  font-family: var(--ff-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-sm);
}

.about-rule {
  width: 3rem;
  height: 2px;
  background: var(--accent);
  border: none;
  margin-bottom: var(--sp-lg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-lg);
}

@media (min-width: 680px) {
  .about-grid {
    grid-template-columns: 3fr 2fr;
    gap: clamp(2rem, 6vw, 5rem);
    align-items: start;
  }
}

.about-body p {
  font-size: 1.05rem;
  line-height: 1.88;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.about-body p:last-child { margin-bottom: 0; }

.about-meta {
  padding-left: var(--sp-md);
  border-left: 2px solid var(--border);
}

@media (max-width: 679px) {
  .about-meta {
    padding-left: 0;
    border-left: none;
    border-top: 2px solid var(--border);
    padding-top: var(--sp-md);
  }
}

.about-meta-section { margin-bottom: var(--sp-md); }
.about-meta-section:last-child { margin-bottom: 0; }

.about-meta-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.edu-item { margin-bottom: 0.75rem; }
.edu-item:last-child { margin-bottom: 0; }

.edu-degree {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.4;
}

.edu-school {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.about-meta ul { list-style: none; }
.about-meta ul li { line-height: 2.3; }

.about-meta ul li a {
  font-size: 0.95rem;
  color: var(--text);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color var(--ease), border-color var(--ease);
}
.about-meta ul li a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  opacity: 1;
}

/* ================================================================
   BLOG
   ================================================================ */
.blog-main {
  padding-block: var(--sp-lg);
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.blog-header {
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-md);
  border-bottom: 1px solid var(--border);
}

.blog-title-main {
  font-family: var(--ff-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
}

.blog-description {
  font-family: var(--ff-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--muted);
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-lg);
}

@media (min-width: 680px) {
  .blog-layout {
    grid-template-columns: 1fr 220px;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
  }
}

/* Post */
.blog-post { padding-bottom: var(--sp-xl); }

.post-title {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 5.5vw, 3.8rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.post-meta {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: var(--sp-md);
  margin-bottom: var(--sp-md);
  border-bottom: 1px solid var(--border);
}

.post-body p {
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 1.3rem;
  color: var(--text);
}

/* Drop cap on first paragraph */
.post-body > p:first-child::first-letter {
  font-family: var(--ff-display);
  font-size: 4em;
  font-weight: 600;
  line-height: 0.72;
  float: left;
  margin-right: 0.06em;
  margin-top: 0.08em;
  color: var(--accent);
}

.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(184, 92, 56, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--ease);
}
.post-body a:hover {
  text-decoration-color: var(--accent);
  opacity: 1;
}

.post-body ul {
  margin: 0.5rem 0 1.3rem 1.6rem;
}
.post-body ul li {
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 0.3rem;
}

.post-signature {
  font-family: var(--ff-display);
  font-size: 1.3rem;
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
  margin-top: var(--sp-md);
}

/* Sidebar */
.blog-sidebar { font-size: 0.9rem; }

@media (min-width: 680px) {
  .blog-sidebar {
    position: sticky;
    top: 80px;
  }
}

.sidebar-section {
  margin-bottom: var(--sp-md);
  padding-bottom: var(--sp-md);
  border-bottom: 1px solid var(--border);
}
.sidebar-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar-heading {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.sidebar-section p {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text);
}

.sidebar-section ul { list-style: none; }
.sidebar-section ul li { line-height: 2.1; }

.sidebar-section ul li a {
  font-size: 0.88rem;
  color: var(--text);
  transition: color var(--ease);
}
.sidebar-section ul li a:hover {
  color: var(--accent);
  opacity: 1;
}

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

@keyframes expand {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
