/* -----------------------------------------------------------------------------
   Site styling for the portfolio. Tasteful, serif headings, warm cream palette.
-------------------------------------------------------------------------------- */

:root {
  --paper:      #faf6ef;
  --paper-2:    #f1ead9;
  --ink:        #1f1d1a;
  --ink-soft:   #4a463f;
  --muted:      #8a8478;
  --accent:     #b35728;
  --accent-2:   #2e5e4e;
  --line:       #e0d8c4;
  --radius:     14px;
  --shadow-sm:  0 1px 2px rgba(31, 29, 26, 0.06), 0 2px 6px rgba(31, 29, 26, 0.04);
  --shadow-md:  0 6px 24px rgba(31, 29, 26, 0.10);
  --shadow-lg:  0 18px 48px rgba(31, 29, 26, 0.16);
  --serif:      "Fraunces", Georgia, "Times New Roman", serif;
  --sans:       "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-feature-settings: "ss01" on, "ss02" on;
}

h1, h2, h3, .display-3, .section-title {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); line-height: 1.05; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.1; }

.kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.lead { color: var(--ink-soft); font-size: 1.125rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(6px);
  background: rgba(250, 246, 239, 0.82);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none !important;
  color: var(--ink) !important;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
}
.brand-text {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.95rem;
}
.site-nav a,
.site-nav .link-btn {
  color: var(--ink-soft) !important;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav .link-btn:hover {
  color: var(--ink) !important;
}
.link-btn {
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

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

.hero {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border-bottom: 1px solid var(--line);
}
.hero .display-3 { margin-bottom: 0; }

/* ---------- Section tiles ------------------------------------------------ */

.section-tiles { padding: 4rem 0; }

.section-tile {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  height: 100%;
  text-decoration: none !important;
  color: var(--ink) !important;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  position: relative;
  overflow: hidden;
}
.section-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--ink);
}
.section-tile.alt { background: var(--ink); color: var(--paper) !important; border-color: var(--ink); }
.section-tile.alt h2, .section-tile.alt .tile-meta { color: var(--paper); }
.section-tile.alt p { color: rgba(250, 246, 239, 0.78); }

.tile-kicker {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.section-tile.alt .tile-kicker { color: #f1c191; }
.section-tile h2 { margin-bottom: 0.5rem; }
.section-tile p { color: var(--ink-soft); margin-bottom: 1.25rem; }
.tile-meta {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- Featured strip ---------------------------------------------- */

.featured { padding: 1rem 0 5rem; }
.section-title { font-size: 1.6rem; }
.link-arrow {
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.link-arrow:hover { color: var(--accent); text-decoration: none; }

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

.featured-tile {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 1 / 1;
  background: var(--paper-2);
}
.featured-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 280ms ease; }
.featured-tile:hover img { transform: scale(1.04); }
.featured-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.75rem 0.9rem;
  font-size: 0.85rem;
  color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 100%);
}

/* ---------- Page header (gallery / arts index) -------------------------- */

.page-header {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}
.page-header h1 { margin-bottom: 0.5rem; }

/* ---------- Level cards (Arts index) ------------------------------------ */

.level-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-decoration: none !important;
  color: var(--ink) !important;
  height: 100%;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.level-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--ink);
}
.level-card-image {
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
}
.level-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.level-card-placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: var(--muted);
  font-style: italic;
}
.level-card-body { padding: 1.25rem 1.5rem 1.5rem; }
.level-card-body h2 { margin-bottom: 0.25rem; font-size: 1.5rem; }
.level-card-body p { color: var(--ink-soft); margin-bottom: 0.5rem; }

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

.masonry {
  column-count: 1;
  column-gap: 16px;
}
@media (min-width: 576px) { .masonry { column-count: 2; } }
@media (min-width: 992px) { .masonry { column-count: 3; } }
@media (min-width: 1400px) { .masonry { column-count: 4; } }

.masonry-item {
  display: block;
  break-inside: avoid;
  margin-bottom: 16px;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.masonry-item img { width: 100%; height: auto; display: block; }
.masonry-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.masonry-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.65) 100%);
  opacity: 0;
  transition: opacity 180ms ease;
}
.masonry-item:hover .masonry-caption,
.masonry-item:focus .masonry-caption { opacity: 1; }
.masonry-caption strong { font-weight: 600; }
.masonry-caption span:last-child { font-size: 0.82rem; color: rgba(255,255,255,0.85); }

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
}

/* ---------- Detail page ------------------------------------------------- */

.detail-image-frame {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}
.detail-image-frame img { width: 100%; height: auto; display: block; border-radius: 8px; }

.detail-meta {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 1.2rem;
  row-gap: 0.4rem;
  font-size: 0.95rem;
}
.detail-meta dt { color: var(--muted); font-weight: 500; }
.detail-meta dd { margin: 0; color: var(--ink); }
.detail-description {
  margin-top: 1.5rem;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
}

/* ---------- PhotoSwipe caption ----------------------------------------- */

.pswp__caption {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  max-width: 90vw;
  text-align: center;
  pointer-events: none;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--ink-soft);
  background: var(--paper);
}

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

.btn-dark { background: var(--ink); border-color: var(--ink); }
.btn-dark:hover { background: #000; border-color: #000; }
.btn-outline-dark { color: var(--ink); border-color: var(--ink); }
.btn-outline-dark:hover { background: var(--ink); color: var(--paper); }
