/* ============================================================
   Eilise — artist portfolio
   Warm paper palette · serif display · gallery masonry grid
   ============================================================ */

:root {
  --paper: #f6f2ea;
  --paper-deep: #ece5d8;
  --ink: #23201b;
  --ink-soft: #5c564c;
  --line: #d9d1c2;
  --accent: #a34e2a;
  --accent-deep: #7f3a1e;
  --white: #fffdf9;

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap-max: 1200px;
  --radius: 6px;
  --shadow-soft: 0 1px 2px rgba(35, 32, 27, 0.06), 0 12px 32px -12px rgba(35, 32, 27, 0.28);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  /* faint paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Typography helpers ---------- */

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.7rem, 6vw, 4.4rem); }
h1 em { font-style: italic; color: var(--accent-deep); }

h2 { font-size: clamp(2rem, 4vw, 3rem); }

.lede {
  max-width: 52ch;
  margin: 22px 0 0;
  font-size: 1.06rem;
  color: var(--ink-soft);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 14px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark .dot { color: var(--accent); }

.site-nav { display: flex; gap: clamp(14px, 3vw, 30px); }

.site-nav a {
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-block: 4px;
  transition: color 0.2s ease;
}
.site-nav a:hover { color: var(--accent); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 8px 20px -10px rgba(163, 78, 42, 0.7);
}
.btn-primary:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Hero ---------- */

.hero { padding-block: clamp(56px, 9vw, 110px) clamp(48px, 7vw, 90px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-art { margin: 0; }

.mat {
  background: var(--white);
  padding: clamp(10px, 1.6vw, 18px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transform: rotate(-1.4deg);
  transition: transform 0.5s ease;
}
.mat:hover { transform: rotate(0deg) scale(1.01); }

.mat img { border-radius: 2px; aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }

.hero-art figcaption {
  margin-top: 16px;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(64px, 9vw, 120px); }

.section-head { max-width: 640px; margin-bottom: 34px; }
.section-lede { margin-top: 14px; color: var(--ink-soft); }

/* ---------- Filters ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.filter-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.filter-btn:hover { border-color: var(--ink-soft); color: var(--ink); }

.filter-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ---------- Masonry gallery ---------- */

.masonry {
  columns: 3;
  column-gap: 28px;
}

.work {
  break-inside: avoid;
  margin: 0 0 28px;
}

.work[hidden] { display: none; }

.work-link {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-deep);
  box-shadow: 0 1px 3px rgba(35, 32, 27, 0.1);
}

.work-link img {
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.work:hover .work-link img { transform: scale(1.035); }
.work:hover .work-link { box-shadow: var(--shadow-soft); }

.work figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
}

.work .title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
}

.work .cat {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ---------- About ---------- */

.about-section { background: var(--paper-deep); border-block: 1px solid var(--line); }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.about-copy p { margin-top: 0; }
.about-copy p + p { margin-top: 18px; color: var(--ink-soft); }

.about-copy blockquote {
  margin: 34px 0 0;
  padding-left: 22px;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  line-height: 1.35;
  color: var(--ink);
}

/* ---------- Contact ---------- */

.contact-inner { max-width: 640px; text-align: center; margin-inline: auto; }
.contact-inner .lede { margin-inline: auto; }
.contact-inner .btn { margin-top: 30px; font-size: 1rem; padding: 15px 34px; }

.socials {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 0.9rem;
}
.socials a { color: var(--ink-soft); text-decoration-color: var(--line); text-underline-offset: 4px; }
.socials a:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding-block: 28px; }

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer p { margin: 0; font-size: 0.8rem; color: var(--ink-soft); }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 24px);
  background: rgba(24, 21, 17, 0.93);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: clamp(16px, 3vw, 40px);
}

.lightbox[hidden] { display: none; }

.lb-figure {
  margin: 0;
  max-width: min(1500px, calc(100vw - 120px));
  text-align: center;
}

.lb-figure img {
  max-height: 78vh;
  max-width: 100%;
  margin-inline: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
}

.lb-figure figcaption {
  margin-top: 16px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  color: var(--paper);
}

#lb-title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; }
#lb-cat {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(246, 242, 234, 0.65);
}

.lb-btn {
  appearance: none;
  border: 1px solid rgba(246, 242, 234, 0.35);
  background: rgba(246, 242, 234, 0.08);
  color: var(--paper);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  flex: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.lb-btn:hover { background: rgba(246, 242, 234, 0.2); transform: scale(1.05); }

.lb-close { position: absolute; top: clamp(14px, 2.5vw, 28px); right: clamp(14px, 2.5vw, 28px); font-size: 1.1rem; }
.lb-prev, .lb-next { align-self: center; }

.lb-counter {
  position: absolute;
  bottom: clamp(14px, 2.5vw, 26px);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: rgba(246, 242, 234, 0.6);
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .masonry { columns: 2; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 460px; margin-inline: auto; order: -1; }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .masonry { columns: 1; column-gap: 0; }
  .lb-prev, .lb-next { display: none; }
  .lb-figure { max-width: calc(100vw - 32px); }
  .footer-inner { justify-content: center; text-align: center; }
}

/* ---------- Gallery fallback note ---------- */

.gallery-note {
  margin: 8px 0 0;
  padding: 16px 20px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
}

/* ---------- Footer admin link ---------- */

.footer-admin {
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.footer-admin:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
