/* ==============================================
   CRISTINA PACCIANI — cristinapacciani.nl
   Single stylesheet for all pages.

   Sections:
     1. Design tokens
     2. Reset & base
     3. Shared elements (eyebrow, headings, buttons)
     4. Navigation (desktop + mobile hamburger)
     5. Homepage sections (hero, bio preview, highlights)
     6. Gallery (filter bar, grid, tiles)
     7. Bio / CV page
     8. Footer
     9. Responsive (breakpoint: 768px)
   ============================================== */

/* ============================================
   1. DESIGN TOKENS
   ============================================ */
:root {
  --bg:        #F4EFE6;
  --bg-alt:    #FDFAF5;
  --dark:      #1C1008;
  --text:      #3D2B1F;
  --muted:     #7A6254;
  --accent:    #B85C38;
  --accent-l:  #CE7E5E;
  --border:    #D5CCB8;
  --white:     #FDFAF5;
  --font-head: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Jost', sans-serif;
}

/* ============================================
   2. RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

/* ============================================
   3. SHARED ELEMENTS
   ============================================ */
.eyebrow,
.section-eyebrow {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 300;
  color: var(--dark);
  line-height: 1.2;
  margin: 0 0 1rem;
}

.section-title {
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--dark);
  margin: 0 0 2rem;
  line-height: 1.2;
}

/* Outline button */
.btn-outline {
  display: inline-block;
  padding: 0.85rem 2.25rem;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--white);
}

/* Terracotta text link */
.text-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}

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

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

/* ============================================
   4. NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: transparent;
  transition: background 0.3s, padding 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

/* Frosted state added by JS past 50px */
.nav.scrolled {
  background: rgba(253, 250, 245, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
}

.nav-brand {
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 300;
  font-size: 1.5rem;
  color: var(--dark);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Current-page link gets a fine underline */
.nav-links a.active {
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--dark);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(8.25px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-8.25px) rotate(-45deg);
}

/* ============================================
   5. HOMEPAGE SECTIONS
   ============================================ */

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg);
  padding: 6rem 2rem 4rem;
}

.hero h1 {
  font-size: clamp(3rem, 9vw, 6.5rem);
  margin: 0.5rem 0 0.75rem;
}

.hero-subtitle {
  font-family: var(--font-head);
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  color: var(--muted);
  margin: 0 0 1.75rem;
}

/* Thin terracotta accent rule under the hero subtitle */
.hero-rule {
  width: 52px;
  height: 1px;
  background: var(--accent);
  margin: 0 0 2.5rem;
  opacity: 0.85;
}

/* Subtle animated scroll cue at the base of the hero */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.hero-scroll::after {
  content: "";
  width: 1px;
  height: 32px;
  background: linear-gradient(var(--muted), transparent);
  animation: scrollcue 2s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scrollcue {
  0%   { transform: scaleY(0); opacity: 0; }
  40%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(8px); opacity: 0; }
}

.hero {
  position: relative;
}

/* --- Bio preview --- */
.bio-preview {
  background: var(--bg-alt);
  padding: 6rem 0;
}

.bio-preview-grid {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 4rem;
  align-items: center;
}

/* Artist photo — a <picture> holding the optimized portrait. */
.bio-photo {
  display: block;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg);
}

.bio-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.bio-preview-text h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}

.bio-preview-text p {
  color: var(--text);
  margin: 0 0 1.5rem;
}

/* --- Gallery highlights --- */
.highlights {
  background: var(--bg);
  padding: 6rem 0;
}

.highlights .btn-wrap {
  text-align: center;
  margin-top: 3rem;
}

/* ============================================
   6. GALLERY — filter bar, grid, tiles
   (tile style matched from gallery-section.html)
   ============================================ */
.portfolio-section {
  background: var(--bg);
  padding: 9rem 0 6rem;   /* extra top padding clears fixed nav */
}

/* Filter buttons */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.375rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

/* Gallery grid — masonry via CSS columns.
   Each work keeps its natural aspect ratio (no cropping); tiles flow
   into as many ~300px columns as fit. width/height attrs on each <img>
   reserve space so there is no layout shift while images load. */
.gallery-grid {
  column-width: 300px;
  column-gap: 12px;
}

/* Gallery tile */
.gallery-item {
  display: block;
  position: relative;
  width: 100%;
  margin: 0 0 12px;          /* vertical gap between stacked tiles */
  -webkit-column-break-inside: avoid;
  break-inside: avoid;       /* keep a tile from splitting across columns */
  overflow: hidden;
  border-radius: 3px;
  text-decoration: none;
  background: var(--dark);   /* Shows while image loads */
  cursor: pointer;
}

.gallery-item.hidden {
  display: none;
}

.gallery-item img {
  width: 100%;
  height: auto;              /* natural ratio — no crop */
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Hover overlay */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 16, 8, 0);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  transition: background 0.3s;
}

.gallery-item:hover .gallery-overlay {
  background: rgba(28, 16, 8, 0.55);
}

.gallery-cat {
  display: block;
  font-family: var(--font-body);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-l);
  margin-bottom: 0.2rem;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
}

.gallery-title {
  display: block;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--white);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s 0.04s, transform 0.25s 0.04s;
}

.gallery-item:hover .gallery-cat,
.gallery-item:hover .gallery-title {
  opacity: 1;
  transform: translateY(0);
}

/* Empty state */
.gallery-empty {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--muted);
  text-align: center;
  padding: 3rem 0;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

/* ============================================
   7. BIO / CV PAGE
   ============================================ */
.page-header {
  background: var(--bg);
  padding: 11rem 0 4rem;   /* clears fixed nav */
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  margin: 0;
}

.prose {
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.prose h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-top: 3rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 1.5rem;
}

/* CV definition list — year-based entries */
.cv-list {
  margin: 0 0 1rem;
}

.cv-entry {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.cv-year {
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--accent);
}

.cv-detail {
  color: var(--text);
}

.cv-detail strong {
  font-weight: 400;
}

.prose .closing {
  margin-top: 3rem;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--dark);
}

/* ============================================
   8. FOOTER
   ============================================ */
.footer {
  background: var(--dark);
  color: var(--white);
  text-align: center;
  padding: 4rem 2rem;
}

.footer-brand {
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 300;
  font-size: 1.75rem;
  color: var(--white);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.footer-nav a,
.footer-email {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(253, 250, 245, 0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover,
.footer-email:hover {
  color: var(--accent-l);
}

.footer-email {
  display: inline-block;
  margin-bottom: 1.5rem;
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
}

.footer-location {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(253, 250, 245, 0.4);
  margin: 0 0 0.75rem;
}

.footer-copy {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: rgba(253, 250, 245, 0.35);
  margin: 0;
}

/* ============================================
   9. SCROLL REVEAL
   Elements fade/rise in as they enter the viewport. The hidden state is
   applied only when JS adds `reveal-ready` to <html>, so the site degrades
   gracefully without JS. Disabled entirely under reduced-motion.
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
  html.reveal-ready .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
  }

  html.reveal-ready .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ============================================
   10. RESPONSIVE — primary breakpoint 768px
   ============================================ */
@media (max-width: 768px) {
  /* Mobile nav */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(75vw, 320px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2.5rem;
    padding: 3rem;
    background: var(--bg-alt);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.35s ease;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1rem;
  }

  /* Bio preview stacks */
  .bio-preview-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .bio-preview {
    padding: 4rem 0;
  }

  .highlights,
  .portfolio-section {
    padding-top: 6rem;
    padding-bottom: 4rem;
  }

  /* Gallery grid — two columns on small screens */
  .gallery-grid {
    column-width: auto;
    column-count: 2;
    column-gap: 8px;
  }

  .gallery-item {
    margin-bottom: 8px;
  }

  /* CV entries stack the year above detail */
  .cv-entry {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
