/* ============================================================
   Morgan Gregory — Personal Website
   Light, minimal editorial design
   Type: AUTHENTIC Sans (self-hosted, WTFPL)
   ============================================================ */

@font-face {
  font-family: "Authentic Sans";
  src: url("../fonts/authentic-sans-60.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Authentic Sans";
  src: url("../fonts/authentic-sans-90.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Authentic Sans";
  src: url("../fonts/authentic-sans-130.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Authentic Sans";
  src: url("../fonts/authentic-sans-150.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-alt: #f2efe8;
  --surface: #ffffff;
  --text: #191919;
  --text-soft: #55524c;
  --text-muted: #949188;
  --line: rgba(20, 20, 20, 0.12);
  --accent: #a33d28;
  --accent-soft: rgba(163, 61, 40, 0.10);
  --font: "Authentic Sans", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  --pad: clamp(20px, 4vw, 64px);
  --measure: 66ch;
  --content-top: 72px;
  --header-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--pad);
}

::selection {
  background: var(--accent);
  color: #fff;
}

a {
  color: var(--text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  padding: 36px 28px;
}

.site-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.site-nav a {
  font-size: 1rem;
  color: var(--text-soft);
  text-decoration: none;
  padding: 3px 0;
  transition: color 0.2s ease;
}

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

.site-nav a.active {
  color: var(--accent);
  font-weight: 600;
}

.site-nav .nav-name {
  color: var(--text);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

/* ============================================================
   Main content — clears the left nav and starts below the name
   ============================================================ */

main {
  margin-left: 240px;
  padding-top: var(--content-top);
}

/* ============================================================
   Page hero
   ============================================================ */

.page-hero {
  padding: 84px 0 44px;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ============================================================
   Biography
   ============================================================ */

.bio-section {
  padding: 8px 0 120px;
}

.bio-body {
  max-width: var(--measure);
  margin: 0 auto;
}

.bio-body p {
  font-size: 1.06rem;
  font-weight: 400;
  line-height: 1.8;
  margin-bottom: 1.55em;
  color: var(--text);
}

/* ============================================================
   Gallery — Carousel
   ============================================================ */

.carousel-section {
  padding: 8px 0 110px;
}

/* Vertically center the slideshow on the home (images-only) page */
.home-center {
  min-height: calc(100vh - var(--content-top));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
}

.carousel {
  position: relative;
  outline: none;
}

.carousel-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 45vh;
  min-height: 360px;
  overflow: hidden;
}

.carousel-slide {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
}

.carousel-slide.is-active {
  display: flex;
}

.carousel-slide img {
  max-width: 100%;
  max-height: calc(100% - 2.2rem);
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Caption below the image, centered, small */
.carousel-slide figcaption {
  margin-top: 6px;
  font-size: 0.57rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  text-align: center;
}

/* ============================================================
   Contact
   ============================================================ */

.contact-section {
  min-height: calc(100vh - var(--content-top));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.contact-lede {
  color: var(--text);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.contact-item {
  margin-bottom: 14px;
}

.contact-item a {
  font-size: 1.05rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-item a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  letter-spacing: 0.04em;
}

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

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

@media (max-width: 860px) {
  .site-header {
    position: sticky;
    top: 0;
    left: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    align-items: center;
    padding: 0;
    background: var(--bg);
  }

  .site-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
    width: 100%;
    padding: 16px 20px;
  }

  main {
    margin-left: 0;
    padding-top: 0;
  }

  .home-center,
  .contact-section {
    min-height: 100vh;
  }
}

@media (max-width: 640px) {
  .site-nav {
    gap: 18px;
  }

  .hero {
    padding: 56px 0 40px;
  }

  .carousel-stage,
  .carousel-slide {
    height: 47vh;
    min-height: 330px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}