/* ============================================================
   Broadsheet — editorial portfolio
   Palette and type imported from the Claude Design "broadsheet"
   system, retoned to the rust/paper overrides in Portfolio.dc.html.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;0,8..60,700;0,8..60,900;1,8..60,400&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Frank+Ruhl+Libre:wght@400;500;700;900&display=swap");

:root {
  --paper: #ddd6c2;
  --ink: #262624;
  --rule: rgba(38, 38, 36, 0.16);
  --accent: #c35020;
  --accent-600: #ad431a;
  --accent-700: #8c3413;

  /* Latin resolves to Source Serif 4, Hebrew falls through to Frank Ruhl
     Libre — both serifs, so mixed-script lines stay in one voice. */
  --font: "Source Serif 4", "Frank Ruhl Libre", Georgia, serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-lg: 0 12px 32px rgba(45, 43, 43, 0.22);
  --measure: 1320px;
  --gutter: clamp(20px, 5vw, 72px);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: var(--accent-700); text-decoration: none; }
a:hover { color: var(--accent); }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 11px 26px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease),
    border-color 0.4s var(--ease);
}
.btn-primary { background: var(--accent); color: var(--paper); }
.btn-primary:hover { background: var(--accent-600); color: var(--paper); }
.btn-primary:active { background: var(--accent-700); }
.btn-ghost {
  background: transparent;
  color: var(--accent-700);
  border-color: var(--rule);
}
.btn-ghost:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* ---------- tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 10px;
  border-radius: 1.5px;
  white-space: nowrap;
}
.tag-featured { background: rgba(38, 38, 36, 0.1); color: var(--ink); }
.tag-video { background: rgba(195, 80, 32, 0.14); color: var(--accent-700); }

/* ---------- header ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.masthead-brand { display: flex; align-items: center; }
.masthead-brand img { height: clamp(38px, 5vw, 52px); width: auto; }
.masthead-wordmark {
  font-size: clamp(19px, 2.4vw, 25px);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.masthead nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 34px); }
.navlink {
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.45s var(--ease);
}
.navlink:hover { color: var(--ink); }
.masthead .btn { min-height: 34px; padding: 6px 16px; font-size: 13px; letter-spacing: 0.04em; }

/* ---------- layout ---------- */
main { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }

.section-title {
  font-size: clamp(32px, 5.5vw, 64px);
  font-weight: 800;
}

/* ---------- hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(56px, 10vh, 120px) 0 clamp(40px, 6vh, 80px);
}
.hero-logo { width: min(1040px, 100%); height: auto; }
.hero-wordmark {
  font-size: clamp(56px, 15vw, 190px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.92;
  max-width: 16ch;
}
.hero-role {
  margin: clamp(14px, 2vh, 22px) 0 0;
  font-size: clamp(15px, 1.9vw, 21px);
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--ink) 66%, transparent);
}
.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: clamp(20px, 3vh, 36px);
}

/* ---------- dateline ---------- */
.dateline { padding: 0 0 clamp(56px, 9vh, 110px); }
.dateline-rule-top {
  height: 5px;
  border: 0;
  margin: 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.dateline-rule-bottom { height: 0; border: 0; border-top: 1px solid var(--ink); margin: 0; }
.dateline-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 28px;
  padding: 14px 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 66%, transparent);
}

/* ---------- work ---------- */
.work { padding: 0 0 clamp(64px, 10vh, 120px); scroll-margin-top: 90px; }
.work-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(28px, 5vh, 52px);
}
.filters { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.filter {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 4px 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
  transition: color 0.45s var(--ease);
}
.filter:hover { color: var(--ink); }
.filter.active {
  font-weight: 800;
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.grid-pan { transition: transform 0.5s var(--ease), opacity 0.5s var(--ease); }
.grid-pan.instant { transition: none; }
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3.5vw, 52px);
}

.tile { cursor: pointer; }
.tile.featured { grid-column: 1 / -1; }
.tile-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  border: 1px solid var(--rule);
}
.tile.featured .tile-media { aspect-ratio: 16 / 9; }
.tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
  will-change: transform;
}
.tile:hover .tile-media img { transform: scale(1.045); }

.tile-caption { display: flex; align-items: baseline; gap: 14px; margin-top: 16px; }
.tile-num {
  font-weight: 900;
  font-size: clamp(15px, 1.6vw, 19px);
  color: var(--accent-700);
  font-feature-settings: "tnum" 1;
}
.tile-body { flex: 1; min-width: 0; }
.tile-titlerow { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tile-title {
  font-size: clamp(21px, 2.6vw, 34px);
  font-weight: 800;
  transition: color 0.45s var(--ease);
}
.tile:hover .tile-title { color: var(--accent-700); }
.tile-meta {
  margin: 6px 0 0;
  font-size: 15px;
  color: color-mix(in srgb, var(--ink) 68%, transparent);
}
.tile-cat { color: var(--accent-700); font-weight: 600; }

.grid-empty {
  padding: 48px 0;
  color: color-mix(in srgb, var(--ink) 60%, transparent);
}

/* ---------- about ---------- */
.about { padding: clamp(40px, 8vh, 90px) 0; scroll-margin-top: 90px; }
.about .section-title { margin-bottom: clamp(24px, 4vh, 40px); }
.about-body { display: flex; gap: clamp(28px, 5vw, 64px); align-items: flex-start; flex-wrap: wrap; }
.about-img { flex: 0 0 clamp(200px, 26vw, 320px); border: 1px solid var(--rule); }
.about-text {
  flex: 1 1 340px;
  font-size: clamp(21px, 2.6vw, 32px);
  line-height: 1.6;
  max-width: 48ch;
  margin: 0;
}

/* ---------- contact ---------- */
.contact { padding: clamp(48px, 9vh, 110px) 0; scroll-margin-top: 90px; }
.contact-kicker {
  font-size: clamp(16px, 2vw, 22px);
  color: color-mix(in srgb, var(--ink) 66%, transparent);
  margin: 0 0 18px;
}
.contact-email {
  display: inline-block;
  direction: ltr;
  font-weight: 800;
  font-size: clamp(32px, 7vw, 88px);
  letter-spacing: -0.03em;
  color: var(--ink);
  border-bottom: 4px solid var(--accent);
  padding-bottom: 6px;
}
.contact-email:hover { color: var(--accent-700); }
.socials { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 34px; }
.socials a {
  font-size: 15px;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--ink) 66%, transparent);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 3px;
  transition: color 0.45s var(--ease), border-color 0.45s var(--ease);
}
.socials a:hover { color: var(--accent-700); border-bottom-color: var(--accent); }

/* ---------- footer ---------- */
.footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 26px var(--gutter);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: color-mix(in srgb, var(--ink) 60%, transparent);
}

/* ---------- grain ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: multiply;
  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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: color-mix(in srgb, var(--ink) 42%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal.open { display: flex; }
.modal-panel {
  position: relative;
  width: min(820px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow-lg);
  padding: clamp(24px, 4vw, 44px);
  animation: modalIn 0.3s ease both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(18px); } }

.modal-close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  z-index: 2;
  min-height: 34px;
  padding: 4px 12px;
  font-size: 14px;
}
.modal-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin: 0 0 24px;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  border: 1px solid var(--rule);
}
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-video { position: relative; aspect-ratio: 16 / 9; background: #000; margin: 0 0 24px; }
.modal-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal-cat {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-700);
  margin: 0 0 10px;
}
.modal-titlerow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.modal-title { font-size: clamp(28px, 4.5vw, 48px); font-weight: 800; }
.modal-year { font-size: 16px; color: color-mix(in srgb, var(--ink) 66%, transparent); }
.modal-desc {
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.7;
  color: color-mix(in srgb, var(--ink) 82%, transparent);
}
.modal-gallery { display: grid; gap: 4px; margin-top: 26px; }
body.modal-open { overflow: hidden; }

/* ---------- reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  will-change: opacity, transform;
}
[data-reveal][data-in] { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .tile.featured .tile-media { aspect-ratio: 4 / 3; }
  .masthead nav { gap: 14px; }
  .navlink { font-size: 14px; }
}

@media (max-width: 520px) {
  .masthead .navlink { display: none; }
  .dateline-items { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .tile-media img { transition: none; }
  .tile:hover .tile-media img { transform: none; }
  .grid-pan { transition: none !important; }
  .modal-panel { animation: none; }
}
