/* ============================================================
   WHITE PAPERS GALLERY — DESIGN SYSTEM
   Editorial gallery of unproduced concepts, speculative visions,
   and strategic blueprints by Matias Jaramillo.
   ============================================================ */

:root {
  --bg-color: #fcfcfc;
  --text-main: #2a2a2a;
  --text-muted: #666666;
  --text-subtle: #8a8a8a;
  --border-light: #e5e5e5;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --card-bg: #ffffff;
  --accent-red: #d13232;
  --accent-blue: #3b609e;
  --accent-slate: #4a6da7;
  
  --font-sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-serif: 'Literata', Georgia, serif;
  --font-hand: 'Caveat', cursive;
  --font-mono: 'Space Mono', 'IBM Plex Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  background-image:
    radial-gradient(circle, rgba(0, 0, 0, 0.11) 1.5px, transparent 1.5px),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.06'/%3E%3C/svg%3E");
  background-size: 24px 24px, auto;
  background-position: top left, top left;
  color: var(--text-main);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-sans { font-family: var(--font-sans); }
.font-serif { font-family: var(--font-serif); }
.font-mono { font-family: var(--font-mono); }

/* ---------- Gallery Container ---------- */
.gallery-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 90px 48px 60px;
  position: relative;
}

/* ---------- Handwritten Notes ---------- */
.handwritten-note {
  font-family: var(--font-hand);
  position: absolute;
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1.1;
  opacity: 0.92;
  pointer-events: none;
  z-index: 10;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
}

.note-1 {
  top: 55px;
  right: 28%;
  transform: rotate(3.5deg);
  max-width: 220px;
  color: var(--accent-slate);
}

.note-2 {
  top: 42%;
  left: 1.5%;
  transform: rotate(-5deg);
  max-width: 190px;
  color: var(--accent-slate);
}

/* ---------- Header ---------- */
.gallery-header {
  margin-bottom: 7rem;
  max-width: 820px;
  position: relative;
}

.header-kicker {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-kicker::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: var(--accent-red);
  border-radius: 50%;
}

.gallery-header h1 {
  font-size: clamp(4.5rem, 8.5vw, 9.5rem);
  margin: 0 0 2.5rem;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 0.95;
  background-image: linear-gradient(
    179deg,
    #aee0ae,
    #bbceb6,
    #c5bbbc,
    #cda7c2,
    #d392c7 0%,
    #d0a5d0,
    #cbb7d9,
    #c5c9e2,
    #bddbeb
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  -webkit-text-stroke: 1px rgba(122, 117, 117, 0.18);
  filter: drop-shadow(1px 2px 4px rgba(235, 245, 255, 0.75))
          drop-shadow(2px 6px 16px rgba(190, 215, 255, 0.55));
}

.intro-text {
  font-size: 1.15rem;
  line-height: 1.68;
  max-width: 640px;
  color: #1a1a1a;
  margin: 0 0 1.4rem;
}

/* ---------- Papers Grid ---------- */
.papers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4.5rem 2.5rem;
  margin-bottom: 6rem;
}

/* ---------- Paper Card ---------- */
.paper-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.paper-card:hover {
  transform: translateY(-5px);
}

/* Card Image Thumbnail */
.card-image-placeholder {
  background-color: #f0f0f0;
  border-radius: 6px;
  aspect-ratio: 4 / 3;
  width: 100%;
  margin-bottom: 1.15rem;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.paper-card:hover .card-image-placeholder img {
  transform: scale(1.035);
}

/* Card Metadata Badge Row */
.card-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.card-meta .series-badge {
  color: var(--text-main);
  background: #ebebeb;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.card-meta .meta-dot {
  opacity: 0.4;
}

/* Card Title */
.paper-card h2 {
  font-size: 1.55rem;
  line-height: 1.22;
  margin: 0 0 0.85rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.18s ease;
}

.paper-card:hover h2 {
  color: #000;
}

/* Card Synopsis */
.paper-card p {
  font-size: 0.98rem;
  line-height: 1.58;
  margin: 0 0 1.25rem;
  color: #333333;
  flex-grow: 1;
}

/* Card Action / Read Link */
.card-action {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: uppercase;
  margin-top: auto;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border-subtle);
}

.card-action .arrow {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.paper-card:hover .card-action .arrow {
  transform: translateX(4px);
}

/* ---------- WIP Cards ---------- */
.paper-card.wip-card {
  cursor: default;
}

.paper-card.wip-card:hover {
  transform: none;
}

.wip-container {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    #f4f3f0,
    #f4f3f0 10px,
    #eeebe5 10px,
    #eeebe5 20px
  );
  position: relative;
}

.wip-stamp {
  font-family: var(--font-sans);
  color: var(--accent-red);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background-color: #ffffff;
  padding: 0.6rem 1.2rem;
  border-radius: 2px;
  border: 1.5px solid rgba(209, 50, 50, 0.35);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transform: rotate(-3.5deg);
  z-index: 2;
}

.blurred-content {
  filter: blur(4.5px);
  opacity: 0.55;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* ---------- Site Footer ---------- */
.site-footer {
  border-top: 1.5px solid #2a2a2a;
  margin-top: 5rem;
  padding: 4rem 0 2rem;
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3.5rem;
  align-items: flex-end;
}

.footer-col.context-col h3 {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 0.85rem;
  color: #111;
  font-weight: 700;
}

.footer-col.context-col p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  color: #555;
  max-width: 540px;
}

.footer-signature {
  font-size: 0.82rem;
  line-height: 1.65;
  color: #666;
  margin: 0;
  text-align: right;
}

.footer-signature a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}

.footer-signature a:hover {
  color: #000;
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 1080px) {
  .gallery-container {
    padding: 70px 32px 40px;
  }
  .papers-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3.5rem 2rem;
  }
  .note-1 {
    right: 15%;
    font-size: 1.6rem;
  }
  .note-2 {
    left: -10px;
    font-size: 1.6rem;
  }
}

@media (max-width: 800px) {
  .handwritten-note {
    display: none;
  }
  .gallery-header {
    margin-bottom: 4.5rem;
  }
  .gallery-header h1 {
    font-size: clamp(3.75rem, 12vw, 5.5rem);
    letter-spacing: -1px;
    margin-bottom: 2rem;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: flex-start;
  }
  .footer-signature {
    text-align: left;
  }
}

@media (max-width: 620px) {
  .gallery-container {
    padding: 50px 20px 30px;
  }
  .papers-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .gallery-header h1 {
    font-size: 3.5rem;
    line-height: 1;
  }
  .intro-text {
    font-size: 1.05rem;
  }
}
