@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@300;400;500;600&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&display=swap');

/* ==========================================================================
   FIELD SURVEY THEME — Archaeological Locus Sheet / USGS Cartographic
   ========================================================================== */
:root {
  --bg: #f2f3ed;
  --bg-translucent: rgba(242, 243, 237, 0.94);
  --fg: #14221a;
  --card: #e7e9e0;
  --card-translucent: rgba(231, 233, 224, 0.94);
  --border: #1b3b2b;
  --border-subtle: #99a69d;
  --primary: #1b3b2b;
  --primary-soft: rgba(27, 59, 43, 0.1);
  --primary-border: #1b3b2b;
  --muted: #dadcd0;
  --muted-fg: #3b4d43;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --font-mono: 'IBM Plex Mono', Menlo, monospace;
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, rgba(27, 59, 43, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(27, 59, 43, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--primary-soft);
  color: var(--fg);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--fg);
  line-height: 1.2;
}

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

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

.icon {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.icon-sm {
  width: 0.9rem;
  height: 0.9rem;
}

.icon-lg {
  width: 1.5rem;
  height: 1.5rem;
}

/* ==========================================================================
   Layout & Containers
   ========================================================================== */
.container {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   Top Navbar
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg-translucent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
}

.navbar {
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-fg);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.menu-toggle {
  background: none;
  border: none;
  color: var(--fg);
  padding: 0.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 0.75rem 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

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

.mobile-nav a {
  padding: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg);
}

.mobile-nav a:hover {
  background: var(--muted);
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
  .menu-toggle,
  .mobile-nav {
    display: none !important;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 82dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 7rem 1.5rem 4rem;
  text-align: left;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 61rem;
  margin: 0 auto;
  border-top: 3px solid var(--fg);
  padding-top: 2.5rem;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.75rem, 6.5vw, 5rem);
  line-height: 1.06;
  margin-bottom: 1.75rem;
  letter-spacing: -0.015em;
}

.hero p {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted-fg);
  max-width: 44rem;
  margin: 0;
  font-weight: 400;
  line-height: 1.65;
}

.hero-cta {
  margin-top: 3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--border);
  background: var(--card);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.hero-cta:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ==========================================================================
   Sections & Sticky Section Headers
   ========================================================================== */
.section,
.section-alt {
  scroll-margin-top: 5rem;
  padding: 4.5rem 0;
  background: transparent;
  border-top: 1.5px solid var(--border);
}

@media (min-width: 768px) {
  .section,
  .section-alt {
    padding: 6rem 0;
  }
}

.section-header {
  position: sticky;
  top: 5rem;
  z-index: 30;
  margin: 0 -1.5rem 1.25rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-translucent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.15rem);
}

.section-header::after {
  content: '';
  display: block;
  width: 3rem;
  height: 2px;
  background: var(--primary);
}

.section-subtitle {
  color: var(--muted-fg);
  font-size: 1.025rem;
  max-width: 44rem;
  margin-bottom: 2.75rem;
}

/* ==========================================================================
   Grids, Stacks & Cards
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }
}

.card-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  box-shadow: 3px 3px 0px #1b3b2b;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 768px) {
  .card {
    padding: 1.85rem;
  }
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .card h3 {
    font-size: 1.425rem;
  }
}

.card p {
  color: var(--muted-fg);
  font-size: 0.95rem;
  line-height: 1.65;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.card-title-row h3 {
  margin-bottom: 0;
}

.grow {
  flex-grow: 1;
}

/* ==========================================================================
   Badges, Icons & Links
   ========================================================================== */
.icon-box,
.icon-circle {
  display: none;
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 0.18rem 0.6rem;
  border: 1px solid var(--primary-border);
}

.pill-outline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-fg);
  background: var(--bg);
  padding: 0.22rem 0.65rem;
  border: 1px solid var(--border);
}

.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted-fg);
  background: var(--bg);
  padding: 0.22rem 0.6rem;
  border: 1px solid var(--border-subtle);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 1rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: auto;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.btn-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 1rem;
  margin-top: 1.5rem;
  background: var(--muted);
  color: var(--fg);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-block:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-border);
}

/* ==========================================================================
   Digs Layout
   ========================================================================== */
.dig-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .dig-card {
    flex-direction: row;
    align-items: stretch;
    gap: 1.5rem;
  }
}

.dig-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.dig-title-bar {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .dig-title-bar {
    flex-direction: row;
    align-items: flex-start;
  }
}

.dig-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted-fg);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .dig-meta {
    align-items: flex-end;
  }
}

.dig-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   Awards Layout
   ========================================================================== */
.award-card {
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .award-card {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }
}

.award-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

@media (min-width: 768px) {
  .award-header {
    flex-direction: row;
    align-items: center;
  }
}

.award-header h3 {
  font-size: 1.25rem;
  margin-bottom: 0;
}

.award-year {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  flex-shrink: 0;
}

.award-thumb {
  width: 100%;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--muted);
}

.award-thumb img {
  width: 100%;
  height: 8rem;
  object-fit: contain;
}

@media (min-width: 768px) {
  .award-thumb {
    width: 10rem;
  }
  .award-thumb img {
    height: 7rem;
  }
}

/* ==========================================================================
   Academic Timeline
   ========================================================================== */
.timeline {
  position: relative;
  border-left: 2px solid var(--border);
  margin-left: 0.75rem;
  padding-left: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

@media (min-width: 768px) {
  .timeline {
    margin-left: 1.25rem;
    padding-left: 2.75rem;
  }
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: 0.35rem;
  width: 1rem;
  height: 1rem;
  background: var(--bg);
  border: 3px solid var(--primary);
}

@media (min-width: 768px) {
  .timeline-item::before {
    left: -3.35rem;
  }
}

.academic-top {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .academic-top {
    flex-direction: row;
    align-items: flex-start;
  }
}

.academic-program {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.academic-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .academic-meta {
    align-items: flex-end;
  }
}

.academic-period {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Art & Writing
   ========================================================================== */
.art-card {
  padding: 0 !important;
  overflow: hidden;
}

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

.award-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  padding: 0.5rem 0.75rem;
}

details.writing-piece {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

details.writing-piece summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
}

details.writing-piece summary::-webkit-details-marker {
  display: none;
}

details.writing-piece summary:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

details.writing-piece[open] summary .summary-closed {
  display: none;
}

details.writing-piece:not([open]) summary .summary-open {
  display: none;
}

details.writing-piece[open] summary svg {
  transform: rotate(180deg);
}

.writing-full-text {
  margin-top: 1rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--fg);
}

/* ==========================================================================
   Native Touch Scroll-Snap Carousel
   ========================================================================== */
.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--muted);
  overflow: hidden;
  user-select: none;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}

@media (min-width: 768px) {
  .dig-card .carousel {
    width: 19rem;
    aspect-ratio: auto;
    min-height: 215px;
  }
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.carousel-counter {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 5;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.18rem 0.55rem;
  pointer-events: none;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  background: var(--bg-translucent);
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  opacity: 0.9;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.carousel-btn.prev {
  left: 0.5rem;
}

.carousel-btn.next {
  right: 0.5rem;
}

@media (min-width: 768px) {
  .carousel-btn {
    opacity: 0;
  }
  .carousel:hover .carousel-btn {
    opacity: 1;
  }
}

.carousel-dots {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 0.375rem;
}

.carousel-dot {
  width: 0.45rem;
  height: 0.45rem;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.carousel-dot.active {
  background: #fff;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    text-align: left;
  }
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
}

.footer-sub {
  font-size: 0.875rem;
  color: var(--muted-fg);
  margin-top: 0.25rem;
}
