/* ─── Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Inter:wght@300;400;500&display=swap');

/* ─── Reset and base ─────────────────────────────────────── */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

/* ─── Default: scrollable pages ──────────────────────────── */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
}

/* ─── Homepage: full-screen carousel, no scroll ──────────── */
html.page-home,
body.page-home {
  overflow: hidden;
  height: 100vh;
}

/* ─── Navigation bar: always sticky, always on top ────────── */
nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  width: 100%;
  background: rgba(250, 248, 244, 0.88);
  backdrop-filter: blur(12px);
}


/* ─── Warm gradient background (portfolio + project pages) ── */
.bg-warm {
  background: linear-gradient(150deg, #faf8f4 0%, #f3efe8 60%, #ede8df 100%);
}

/* ─── Carousel: fixed full-screen container ──────────────── */
#carousel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

/* ─── Carousel slides: absolute positioning for fade effect ─ */
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 700ms ease-in-out;
}

.slide.active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}

/* ─── Slide images: cover viewport, intelligent cropping ──── */
.slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 1;
}

/* ─── Hero slides (project pages) ───────────────────────── */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 700ms ease-in-out;
}
.hero-slide.active {
  opacity: 1;
}

/* ─── Gradient overlays ──────────────────────────────────── */
/* Top: keeps nav legible over any image */
.grad-top {
  background: linear-gradient(to bottom, rgba(0,0,0,0.50) 0%, transparent 100%);
  z-index: 2;
}

/* Bottom: darkens lower 55% for caption legibility */
.grad-bot {
  background: linear-gradient(to bottom, transparent 0%, rgba(10, 18, 35, 0.88) 100%);
  z-index: 2;
}


/* ─── Caption container ──────────────────────────────────── */
.slide-caption {
  z-index: 3;
}

/* ─── Dot indicator ──────────────────────────────────────── */
.dot {
  display: inline-block;
  height: 8px;
  border-radius: 9999px;
  transition: width 300ms ease, background-color 300ms ease;
  cursor: pointer;
  border: none;
  padding: 0;
  background-color: rgba(255,255,255,0.35);
  width: 8px;
}
.dot.active {
  width: 28px;
  background-color: #f59e0b; /* amber-400 */
}
.dot.inactive {
  width: 8px;
}
.dot.inactive:hover {
  background-color: rgba(255,255,255,0.65);
}

/* ─── Mobile menu ────────────────────────────────────────── */
#mobile-menu {
  transition: transform 300ms ease-in-out;
}

/* ─── Portfolio project cards ────────────────────────────── */
.project-card img {
  transition: transform 700ms ease;
}
.project-card:hover img {
  transform: scale(1.04);
}
.card-overlay {
  transition: opacity 400ms ease;
}
@media (hover: hover) {
  .card-overlay { opacity: 0; }
  .project-card:hover .card-overlay { opacity: 1; }
}

/* ─── Typography helpers ─────────────────────────────────── */
.font-serif  { font-family: 'DM Serif Display', Georgia, serif; }
.font-sans   { font-family: 'Inter', system-ui, sans-serif; }
