/* ============================================================
   MORGAN GARDNER — morgangardner.com
   Noir design system — Baskerville, dark-first
   ============================================================ */

/* --- CSS CUSTOM PROPERTIES (DARK DEFAULT) --- */
:root {
  --bg: #0A0A0A;
  --bg-elevated: #111111;
  --bg-card: #141414;
  --text: #F5F0E8;
  --text-secondary: #A8A29E;
  --text-muted: #6B6560;
  --accent: #C9A96E;
  --accent-hover: #DFC089;
  --border: #222222;
  --border-light: #1A1A1A;
  --nav-bg: rgba(10, 10, 10, 0.92);
  --hero-overlay: rgba(10, 10, 10, 0.45);
  --card-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  --toggle-icon: "\2600";
}

[data-theme="light"] {
  --bg: #FAF8F5;
  --bg-elevated: #FFFFFF;
  --bg-card: #FFFFFF;
  --text: #1A1A1A;
  --text-secondary: #4A4A4A;
  --text-muted: #888888;
  --accent: #C9A96E;
  --accent-hover: #B8963E;
  --border: #E0DDD8;
  --border-light: #EDEBE8;
  --nav-bg: rgba(250, 248, 245, 0.92);
  --hero-overlay: rgba(250, 248, 245, 0.55);
  --card-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  --toggle-icon: "\263E";
}


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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Libre Baskerville', 'Baskerville', 'Georgia', serif;
  font-weight: 400;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.7;
  transition: background-color 0.4s ease, color 0.4s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

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


/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
  font-family: 'Libre Baskerville', 'Baskerville', 'Georgia', serif;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: 0.01em;
}

h1 { font-size: 3rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1.2rem;
  max-width: 680px;
}

.small-caps {
  font-variant: small-caps;
  letter-spacing: 0.1em;
}

.accent-text {
  color: var(--accent);
}

blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-secondary);
  max-width: 620px;
}


/* --- LAYOUT --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container--narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
}

.section--sm {
  padding: 3rem 0;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

.divider--accent {
  border-top: 1px solid var(--accent);
  width: 60px;
  margin: 2rem 0;
}


/* --- NAVIGATION --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.4s ease;
}

.nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  font-family: 'Libre Baskerville', 'Baskerville', 'Georgia', serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.nav__logo:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  font-family: 'Libre Baskerville', 'Baskerville', 'Georgia', serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  font-variant: small-caps;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--accent);
  text-decoration: none;
}

.nav__toggle-theme {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s;
}

.nav__toggle-theme:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav__hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1.5rem;
}


/* --- HERO --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: 64px;
  padding-bottom: 4vh;
  background-color: #0A0A0A;
}

.hero__bg {
  position: absolute;
  inset: 0;
  top: 64px;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
  transition: background 0.4s ease;
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 2rem;
}

.hero__name {
  font-family: 'Libre Baskerville', 'Baskerville', 'Georgia', serif;
  font-size: 4.5rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.hero__tagline {
  font-family: 'Libre Baskerville', 'Baskerville', 'Georgia', serif;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.hero__divider {
  width: 60px;
  height: 1px;
  background: var(--accent);
  margin: 0 auto 2.5rem;
}

.hero__intro {
  font-family: 'Libre Baskerville', 'Baskerville', 'Georgia', serif;
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.9;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}


/* --- CARDS --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2.5rem 2rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: var(--card-shadow);
  transform: translateY(-2px);
  text-decoration: none;
}

.card__label {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  font-variant: small-caps;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.card__title {
  font-family: 'Libre Baskerville', 'Baskerville', 'Georgia', serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.card__desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 100%;
}

.card__meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 1rem;
}


/* --- WRITING PAGE --- */
.writing-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.writing-card {
  display: block;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.2s;
}

.writing-card:first-child {
  border-top: 1px solid var(--border);
}

.writing-card:hover {
  text-decoration: none;
  padding-left: 1rem;
}

.writing-card:hover .writing-card__title {
  color: var(--accent);
}

.writing-card__pub {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  font-variant: small-caps;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.writing-card__title {
  font-family: 'Libre Baskerville', 'Baskerville', 'Georgia', serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.5rem;
  transition: color 0.2s;
  line-height: 1.3;
}

.writing-card__subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.writing-card__date {
  font-size: 0.78rem;
  color: var(--text-muted);
}


/* --- PHOTO GALLERY --- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.photo-grid__item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-elevated);
}

.photo-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.photo-grid__item:hover img {
  transform: scale(1.03);
  opacity: 0.85;
}

.photo-grid__item .photo-grid__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.7);
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
  text-align: center;
}

.photo-grid__item:hover .photo-grid__overlay {
  opacity: 1;
}

.photo-grid__overlay h3 {
  font-family: 'Libre Baskerville', 'Baskerville', 'Georgia', serif;
  font-size: 1.3rem;
  color: #F5F0E8;
  margin-bottom: 0.25rem;
}

.photo-grid__overlay span {
  font-size: 0.72rem;
  color: #A8A29E;
  letter-spacing: 0.08em;
  font-variant: small-caps;
}

.photo-series {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.photo-series__item {
  width: 100%;
}

.photo-series__item img {
  width: 100%;
}

.photo-series__caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-style: italic;
}


/* --- FIELD NOTES (Photography Page) --- */
.field-notes__section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.field-notes__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.field-notes__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.45);
}

.field-notes__section--plain {
  background-color: #0A0A0A;
}

.field-notes__section--cover {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.field-notes__section--cover .field-notes__content {
  justify-content: center;
  padding-top: 0;
}

.field-notes__section--close {
  align-items: center;
  justify-content: center;
}

.field-notes__section--close .field-notes__content {
  justify-content: flex-end;
  padding-top: 0;
  padding-bottom: 6vh;
}

.field-notes__section--close .field-notes__text {
  flex: 0;
  padding-bottom: 0;
}

.field-notes__section--low .field-notes__header {
  margin-top: 10vh;
}

.field-notes__section--low .field-notes__text {
  flex: 1;
  padding-top: 15vh;
  padding-bottom: 4vh;
  justify-content: flex-end;
}

.field-notes__content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  width: 100%;
  min-height: 100vh;
  padding: 0 2rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.field-notes__section--cover .field-notes__content {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.field-notes__section--close .field-notes__content {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  max-width: 680px;
}

.field-notes__cover-label {
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.field-notes__cover-title {
  font-family: 'Libre Baskerville', 'Baskerville', 'Georgia', serif;
  font-size: 2.8rem;
  font-weight: 400;
  color: #F5F0E8;
  line-height: 1.25;
  letter-spacing: 0.04em;
  margin-bottom: 3rem;
}

.field-notes__cover-handle {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.field-notes__header {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #999999;
  margin-top: 10vh;
  margin-bottom: 0;
  padding-bottom: 1.5rem;
  flex-shrink: 0;
}

.field-notes__header::after {
  content: '';
  display: block;
  width: 3rem;
  height: 1px;
  background: #999999;
  margin: 1.2rem auto 0;
}

.field-notes__text {
  font-family: 'Libre Baskerville', 'Baskerville', 'Georgia', serif;
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 2;
  color: #F0F0F0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 8vh;
}

.field-notes__text p {
  margin-bottom: 2.2rem;
  max-width: 100%;
}

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

.field-notes__text--italic {
  font-style: italic;
}

.field-notes__close-line {
  font-family: 'Libre Baskerville', 'Baskerville', 'Georgia', serif;
  font-size: 1.5rem;
  font-weight: 400;
  font-style: italic;
  color: #F5F0E8;
  line-height: 1.6;
  margin-bottom: 3rem;
}

.field-notes__close-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.8;
}


/* --- LIGHTBOX --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #F5F0E8;
  font-size: 2rem;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #F5F0E8;
  font-size: 2.5rem;
  cursor: pointer;
  padding: 1rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.lightbox__nav:hover {
  opacity: 1;
}

.lightbox__nav--prev { left: 1rem; }
.lightbox__nav--next { right: 1rem; }


/* --- CV PAGE --- */
.cv-section {
  margin-bottom: 3rem;
}

.cv-section__title {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  font-variant: small-caps;
  color: var(--accent);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.cv-entry {
  margin-bottom: 2rem;
}

.cv-entry__company {
  font-family: 'Libre Baskerville', 'Baskerville', 'Georgia', serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
}

.cv-entry__role {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 0.25rem;
}

.cv-entry__dates {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.cv-entry__bullets {
  list-style: none;
  padding: 0;
}

.cv-entry__bullets li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.cv-entry__bullets li::before {
  content: '\2013';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.cv-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  font-variant: small-caps;
  text-decoration: none;
  transition: all 0.2s;
}

.cv-download:hover {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
}


/* --- WRITING CATEGORIES --- */
.writing-category {
  margin-bottom: 3.5rem;
}

.writing-category__header {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  font-variant: small-caps;
  color: var(--accent);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.writing-category__note {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.8;
  max-width: 680px;
}

.research-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

.research-item:last-child {
  border-bottom: none;
}

.research-item__desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 680px;
}


/* --- BOOKING --- */
.booking-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.booking-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.booking-card {
  padding: 2rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.booking-card__title {
  font-family: 'Libre Baskerville', 'Baskerville', 'Georgia', serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.booking-card__desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 100%;
}

.booking-note {
  margin-top: 2rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

.booking-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  font-variant: small-caps;
  text-decoration: none;
  transition: all 0.2s;
}

.booking-cta:hover {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
}


/* --- CONTACT --- */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.05rem;
}

.contact-link__label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  font-variant: small-caps;
  color: var(--text-muted);
  min-width: 80px;
}


/* --- PAGE HEADER (non-hero pages) --- */
.page-header {
  padding: 8rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.page-header h1 {
  font-size: 2.8rem;
  margin-bottom: 0.75rem;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}


/* --- FOOTER --- */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__text {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

.footer__links a {
  font-size: 0.78rem;
  color: var(--text-muted);
}

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


/* --- MOBILE NAV OVERLAY --- */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  font-family: 'Libre Baskerville', 'Baskerville', 'Georgia', serif;
  font-size: 1.8rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.06em;
}

.mobile-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}


/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  h1 { font-size: 2.2rem; }
  .hero__name { font-size: 3rem; }

  .field-notes__cover-title {
    font-size: 2.2rem;
  }

  .field-notes__content {
    margin-left: 2rem;
  }
}

@media (max-width: 640px) {
  .nav__links {
    display: none;
  }

  .nav__hamburger {
    display: block;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .booking-grid {
    grid-template-columns: 1fr;
  }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }

  .hero__name {
    font-size: 2.2rem;
    letter-spacing: 0.08em;
  }

  .hero__tagline {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  .section {
    padding: 4rem 0;
  }

  .page-header {
    padding: 6rem 0 2rem;
  }

  .footer__inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .container, .container--narrow {
    padding: 0 1.25rem;
  }

  /* Field Notes mobile */
  .field-notes__content {
    margin-left: 1.25rem;
    margin-right: 1.25rem;
    padding: 3rem 0;
  }

  .field-notes__cover-title {
    font-size: 1.8rem;
  }

  .field-notes__text {
    font-size: 1rem;
    line-height: 1.9;
  }

  .field-notes__close-line {
    font-size: 1.2rem;
  }
}

@media (max-width: 400px) {
  .hero__name {
    font-size: 1.8rem;
  }

  .photo-grid {
    grid-template-columns: 1fr;
  }

  .field-notes__cover-title {
    font-size: 1.5rem;
  }
}
