/* ==========================================================================
   Jasminko Halilovic — Cinematic Paper & Ink
   Archivo Black display · Hind body · high contrast editorial
   ========================================================================== */

:root {
  --paper: #f5f3ee;
  --paper-soft: #ebe7df;
  --paper-line: rgba(13, 13, 13, 0.10);
  --paper-line-strong: rgba(13, 13, 13, 0.22);
  --ink: #0d0d0d;
  --ink-soft: #2d2d2d;
  --ink-muted: #5a5a5a;
  --accent: #c4441f;            /* archival oxblood — used very sparingly */
  --container: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: 'Archivo Black', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Hind', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
*::selection { background: var(--ink); color: var(--paper); }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.2s var(--ease), opacity 0.2s var(--ease); }
a:hover { color: var(--ink); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

em { font-style: italic; font-family: 'Hind', serif; color: var(--accent); font-weight: 500; }
.hero em, .section-title em { font-style: italic; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 243, 238, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--paper-line); }

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand-mark {
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.brand-name {
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.nav ul {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}
.nav a .num {
  font-family: var(--display);
  font-size: 0.625rem;
  color: var(--ink-muted);
  letter-spacing: 0;
}
.nav a:hover { color: var(--accent); }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  width: 40px;
  height: 40px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  align-items: center;
}
.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-family: var(--body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 0;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-ink { background: var(--paper); color: var(--ink); border-color: var(--paper); margin-top: 8px; }
.btn-ink:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 80px 0 40px;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; background: var(--accent); border-radius: 50%; display: inline-block;
}
.hero-title {
  font-family: var(--display);
  font-size: clamp(4rem, 16vw, 16rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
  margin: 0;
  font-weight: 400;
  color: var(--ink);
  text-transform: uppercase;
}
.hero-title .line { display: block; }
.hero-title .period { color: var(--accent); }

.hero-meta {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: end;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--paper-line);
}
.hero-role {
  font-family: var(--display);
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0;
}
.hero-role span { color: var(--accent); font-weight: 400; margin: 0 6px; }
.hero-lede {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 24px;
  max-width: 52ch;
  font-weight: 400;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-portrait {
  position: absolute;
  top: 80px;
  right: 32px;
  width: clamp(180px, 22vw, 320px);
  z-index: 2;
}
.hero-portrait img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.05);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.35);
}
.hero-portrait-tag {
  display: block;
  margin-top: 10px;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  text-align: right;
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 22px 0;
  background: var(--paper);
}
.marquee-track {
  display: inline-flex;
  gap: 32px;
  white-space: nowrap;
  font-family: var(--display);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  animation: marquee 48s linear infinite;
  will-change: transform;
}
.marquee-track span:nth-child(even) { color: var(--accent); }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Sections ---------- */
.section { padding: 140px 0; position: relative; }
.section-alt { background: var(--paper-soft); }
.section-ink { background: var(--ink); color: var(--paper); }
.section-ink .section-num { color: var(--paper); -webkit-text-stroke: 1px var(--paper); }
.section-ink .section-kicker { color: var(--paper); opacity: 0.5; }
.section-ink .section-title { color: var(--paper); }
.section-ink em { color: #ff7a4d; }

.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 32px;
  align-items: start;
  margin-bottom: 96px;
  max-width: 1100px;
}
.section-num {
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink);
  grid-row: 1 / span 2;
}
.section-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: var(--ink-muted);
  padding-top: 12px;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.035em;
  margin: 12px 0 0;
  text-transform: uppercase;
  font-weight: 400;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
  align-items: start;
}
.about-meta dl { margin: 0; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 96px; }
.about-meta dl > div { border-top: 1px solid var(--ink); padding-top: 12px; }
.about-meta dt {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.about-meta dd {
  margin: 0;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-transform: uppercase;
}

.prose p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 1.25em;
  max-width: 60ch;
}
.prose p:first-of-type {
  font-size: 1.4rem;
  line-height: 1.45;
  color: var(--ink);
  font-weight: 500;
}
.prose-ink p { color: rgba(245, 243, 238, 0.7); }
.prose-ink p:first-of-type { color: var(--paper); }

/* ---------- Books ---------- */
.books {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--ink);
}
.books li {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 40px;
  align-items: baseline;
  padding: 32px 0;
  border-bottom: 1px solid var(--paper-line-strong);
  transition: padding 0.4s var(--ease), background 0.4s var(--ease);
}
.books li:hover { padding-left: 16px; padding-right: 16px; background: var(--paper); }
.book-year {
  font-family: var(--display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
.books li:hover .book-year { color: var(--accent); }
.book-body h3 {
  font-family: var(--display);
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  line-height: 1.2;
  text-transform: uppercase;
  font-weight: 400;
}
.book-body h3[lang="ja"] { text-transform: none; font-family: var(--display); }
.book-body p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
  max-width: 60ch;
}
.book-tag {
  font-family: var(--display);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  border: 1px solid var(--ink);
  color: var(--ink);
}

/* ---------- Museum ---------- */
.museum-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: start;
}
.museum-image { margin: 0; }
.museum-image img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  filter: grayscale(0.4) contrast(1.05);
}
.museum-image figcaption {
  margin-top: 14px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(245, 243, 238, 0.5);
}

.museum-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 120px;
  border-top: 1px solid rgba(245, 243, 238, 0.2);
}
.museum-stats > div {
  padding: 48px 24px 0 0;
  border-right: 1px solid rgba(245, 243, 238, 0.15);
}
.museum-stats > div:last-child { border-right: 0; }
.stat-num {
  display: block;
  font-family: var(--display);
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--paper);
  margin-bottom: 16px;
}
.stat-label {
  display: block;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(245, 243, 238, 0.6);
  max-width: 28ch;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 28px; }
.contact-info > div { border-top: 1px solid var(--ink); padding-top: 14px; }
.info-label {
  display: block;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.contact-info p { margin: 0; font-size: 0.9375rem; line-height: 1.6; color: var(--ink-soft); }
.contact-info a {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-transform: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}
.contact-info a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.contact-form { display: flex; flex-direction: column; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
}
.field input,
.field textarea {
  font-family: var(--body);
  font-size: 1.0625rem;
  padding: 14px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  transition: border-color 0.2s var(--ease);
  resize: vertical;
  border-radius: 0;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.contact-form .btn { align-self: flex-start; margin-top: 12px; }

.form-status:empty { display: none; }
.form-status {
  padding: 14px 18px;
  font-size: 0.9375rem;
  margin-bottom: 18px;
  background: var(--paper-soft);
  border-left: 3px solid var(--ink);
}
.form-status.success { background: #e6f0e6; border-left-color: #1d6f42; color: #1d6f42; }
.form-status.error   { background: #f5e0dc; border-left-color: var(--accent); color: var(--accent); }

.form-fallback { font-size: 0.8125rem; color: var(--ink-muted); margin: 16px 0 0; }
.form-fallback a { border-bottom: 1px solid currentColor; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0 40px;
  margin-top: 0;
}
.footer-mark {
  font-family: var(--display);
  font-size: clamp(6rem, 18vw, 18rem);
  line-height: 0.85;
  letter-spacing: -0.05em;
  margin: 0 0 48px;
  color: var(--paper);
}
.footer-mark span { color: var(--accent); }
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid rgba(245,243,238,0.15);
}
.site-footer p {
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(245,243,238,0.6);
  line-height: 1.6;
}
.footer-links { display: flex; gap: 32px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.footer-links a {
  font-family: var(--display);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--paper);
}
.footer-links a:hover { color: var(--accent); }

/* ---------- Reveal ---------- */
.reveal { opacity: 1; transform: none; transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal { opacity: 0; transform: translateY(28px); }
.js .reveal.in-view { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-portrait { width: 200px; top: 60px; right: 24px; }
  .about-grid { grid-template-columns: 220px 1fr; gap: 48px; }
  .museum-grid { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 768px) {
  .container { padding: 0 22px; }
  .nav-container { height: 60px; }
  .brand-name { display: none; }
  .menu-toggle { display: flex; }
  .nav {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--paper-line);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px 22px 20px; }
  .nav li { border-bottom: 1px solid var(--paper-line); }
  .nav li:last-child { border-bottom: 0; }
  .nav a { padding: 16px 0; font-size: 1.0625rem; }

  .hero { padding: 48px 0 32px; min-height: auto; }
  .hero-portrait { position: static; width: 180px; margin: 32px 0 40px; }
  .hero-portrait-tag { text-align: left; }
  .hero-meta { grid-template-columns: 1fr; gap: 24px; margin-top: 32px; }

  .marquee { padding: 16px 0; }
  .marquee-track { font-size: 0.875rem; gap: 24px; animation-duration: 36s; }

  .section { padding: 80px 0; }
  .section-head { margin-bottom: 56px; column-gap: 20px; }
  .section-num { font-size: 3rem; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-meta dl { position: static; flex-direction: row; flex-wrap: wrap; gap: 16px; }
  .about-meta dl > div { flex: 1 1 calc(50% - 8px); }

  .books li {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 8px 20px;
    padding: 24px 0;
  }
  .books li:hover { padding-left: 0; padding-right: 0; background: transparent; }
  .book-tag { grid-column: 1; grid-row: 1; justify-self: start; align-self: center; }
  .book-year { grid-column: 2; grid-row: 1; }
  .book-body { grid-column: 1 / -1; grid-row: 2; }

  .museum-stats { grid-template-columns: 1fr; margin-top: 64px; }
  .museum-stats > div { border-right: 0; border-bottom: 1px solid rgba(245,243,238,0.15); padding: 32px 0; }
  .museum-stats > div:last-child { border-bottom: 0; }

  .contact-grid { grid-template-columns: 1fr; gap: 56px; }

  .footer-grid { flex-direction: column; align-items: flex-start; }
}

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

/* ---------- Social icons (Contact) ---------- */
.social-block { margin-top: 8px; }
.socials {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.socials li { margin: 0; }
.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--paper-line-strong);
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.social:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  transform: translateY(-2px);
}
.social svg { display: block; }
/* Hide social icons that don't yet have a link set */
.socials li:has(a.social[href=""]) { display: none; }
.social[href=""] { display: none; }
