@font-face {
  font-family: 'Tusker Grotesk 2500';
  src: url('/static/fonts/TuskerGrotesk-2500Medium.woff2') format('woff2'),
       url('/static/fonts/TuskerGrotesk-2500Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ─── Palette (matching portfolio.spencerflagg.com) ─── */
:root {
  --c-bkg: #fff8f1;
  --c-text: #613100;
  --c-text-light: #997d63;
  --c-offset: #f0e8df;
  --c-offset-light: #f7f1eb;
  --c-bkg-pattern: #faf3eb;
  --shadow: 0px 0.5rem 0 var(--c-offset);
  --shadow-sm: 0px 0.1rem 0 var(--c-offset);
  --border: 0.12rem solid var(--c-text);
  --border-light: 0.12rem solid var(--c-text-light);
  --radius: 0.4em;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  background-color: var(--c-bkg);
}

body {
  font-family: 'Cutive Mono', 'Courier New', Courier, monospace;
  color: var(--c-text);
  background-color: var(--c-bkg);
  line-height: 1.6;
  min-height: 100vh;
  letter-spacing: 0.01em;
}

a {
  color: var(--c-text);
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

a:hover {
  color: var(--c-text-light);
}

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

/* ─── Typography ─── */
h1, h2, h3 {
  font-weight: 500;
  line-height: 1.2;
  color: var(--c-text);
  text-shadow: var(--shadow-sm);
}

h1 {
  font-family: 'Tusker Grotesk 2500';
  font-size: 2.2rem;
  text-transform: uppercase;
}
h2 { font-size: 1.4rem; }

/* ─── Labels (matching Work Sans uppercase pattern) ─── */
.label {
  font-family: 'Work Sans', sans-serif;
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--c-text-light);
  line-height: 1;
}

/* ─── Landing ─── */
.landing-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 50vh;
  padding: 6rem 2rem 3rem;
}

.site-title {
  font-family: 'Tusker Grotesk 2500';
  font-size: 2.8rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--c-text);
  text-shadow: var(--shadow);
}

.site-subtitle {
  font-family: 'Cutive Mono', 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--c-text-light);
  margin-top: 0.5rem;
  letter-spacing: 0.04em;
}

.proofs-landing {
  min-height: 80vh;
}

.proofs-message {
  margin-top: 2rem;
  color: var(--c-text-light);
  font-size: 0.85rem;
}

.landing-grid {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* ─── Page Header ─── */
.page-header {
  padding: 3rem 2rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.page-header h1 {
  margin-top: 0.5rem;
}

/* ─── Breadcrumbs ─── */
.breadcrumbs {
  font-family: 'Work Sans', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-text-light);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.breadcrumb-link {
  color: var(--c-text-light);
  text-decoration: underline;
  text-decoration-color: rgba(97, 48, 0, 0.18);
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.2em;
  transition: all 0.2s ease-in-out;
}
.breadcrumb-link:hover {
  color: var(--c-text);
}

.breadcrumb-sep {
  color: var(--c-text-light);
  opacity: 0.4;
  margin: 0 0.15rem;
}

.breadcrumb-current {
  color: var(--c-text-light);
}

/* ─── Folder Grid ─── */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

.folder-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 1.5rem;
  background: var(--c-offset-light);
  border: var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease-in-out;
  color: var(--c-text);
  text-decoration: none;
}

.folder-card:hover {
  background-color: var(--c-offset);
  box-shadow: var(--shadow);
  transform: scale(1.02);
  color: var(--c-text);
}

.folder-icon {
  width: 36px;
  height: 36px;
  color: var(--c-text-light);
}

.folder-icon svg {
  width: 100%;
  height: 100%;
}

.folder-name {
  font-family: 'Cutive Mono', monospace;
  font-size: 1rem;
  text-align: center;
}

/* ─── Gallery Grid ─── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--c-text);
  background: var(--c-offset-light);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  color: var(--c-text);
}

.gallery-item:hover {
  box-shadow: var(--shadow);
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-label {
  display: block;
  padding: 0.5rem 0.7rem;
  font-size: 0.75rem;
  color: var(--c-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Work Sans', sans-serif;
}

/* ─── Proofs variant ─── */
body.proofs .breadcrumb-link {
  color: var(--c-text-light);
}
body.proofs .breadcrumb-link:hover {
  color: var(--c-text);
}

/* ─── PhotoSwipe overrides ─── */
.pswp {
  --pswp-bg: #1a1410;
}

.pswp__button {
  color: var(--c-text-light);
}

.pswp__counter {
  font-family: 'Cutive Mono', monospace;
  font-size: 0.8rem;
  color: var(--c-text-light);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .landing-header { padding: 4rem 1.5rem 2rem; }
  .site-title { font-size: 2.2rem; }
  .page-header { padding: 2rem 1.5rem 1.5rem; }
  h1 { font-size: 1.6rem; }

  .folder-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding: 0 1.5rem 2rem;
  }

  .folder-card { padding: 1.5rem 1rem; }
  .folder-icon { width: 28px; height: 28px; }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    padding: 0 1rem 3rem;
  }

  .gallery-label { font-size: 0.7rem; padding: 0.4rem 0.6rem; }
}

@media (max-width: 480px) {
  .site-title { font-size: 1.8rem; }

  .folder-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding: 0 1rem 2rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0 0.75rem 2rem;
  }
}
