/* Page-specific CSS shared across all three pages */

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 76vh;
  min-height: 540px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-photo {
  position: absolute;
  inset: 0;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 22%;
  filter: grayscale(0.15) contrast(1.02);
}
.hero-photo-tint {
  display: none;
}
html[data-palette="ink"] .hero-photo img { filter: grayscale(0.2) brightness(0.85) contrast(1.05); }
html[data-palette="slate"] .hero-photo img { filter: saturate(0.7) contrast(1.05); }

.hero-grid {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0;
  padding-left: max(var(--pad-x), 80px);
}
.hero-grid .hero-meta--tl {
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
  isolation: isolate;
}
.hero-grid .hero-meta--tl::before {
  content: "";
  position: absolute;
  inset: -100px -80px -100px -80px;
  background: radial-gradient(
    ellipse closest-side at center,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.35) 55%,
    rgba(0, 0, 0, 0) 100%
  );
  z-index: 0;
  pointer-events: none;
}
.hero-links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 240px;
}
.hero-link {
  display: block;
  text-align: center;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 6px;
  color: #ffffff;
  font-size: 15px;
  letter-spacing: 0.02em;
  background: rgba(0, 0, 0, 0.05);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.hero-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
}
.hero-meta { color: var(--ink); }
.hero-meta .eyebrow {
  display: inline-block;
  background: color-mix(in oklab, var(--bg) 84%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 6px 10px;
  border: 1px solid var(--line-soft);
  color: var(--ink);
}
.hero-meta--tl { grid-column: 1; grid-row: 1; }
.hero-meta--tr { grid-column: 2; grid-row: 1; text-align: right; }
.hero-meta--bl { grid-column: 1; grid-row: 3; }
.hero-meta--br { grid-column: 2; grid-row: 3; text-align: right; }

.hero-title {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: start;
  font-size: clamp(48px, 8vw, 124px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  font-weight: 400;
  mix-blend-mode: normal;
  color: var(--ink);
}
html[data-palette="slate"] .hero-title { color: #ffffff; }
.hero-mark {
  color: var(--accent);
  margin-left: 0.05em;
  font-size: 0.55em;
  vertical-align: 0.35em;
}
.hero-cta { display: inline-flex; gap: 8px; align-items: center; }
.hero-cta:hover { color: var(--accent); }

/* ---------- bio ---------- */
.bio { padding-block: 64px 80px; }
.bio-side {
  grid-column: 1 / span 3;
  position: sticky;
  top: 80px;
  align-self: start;
}
.bio-body {
  grid-column: 3 / span 8;
  display: flex; flex-direction: column; gap: 22px;
  text-align: center;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.bio-body em { font-style: italic; color: var(--ink); }
.bio-body q::before { content: "“"; }
.bio-body q::after  { content: "”"; }
.bio-body p:first-child { color: var(--ink); }

/* ---------- section heads ---------- */
.section-head {
  align-items: end;
  padding-bottom: 28px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.section-head-eye { grid-column: 1 / span 3; }
.section-head-title {
  grid-column: 1 / span 12;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 500;
  text-wrap: balance;
}

/* ---------- listen / links ---------- */
.listen { padding-block: 8px 40px; }
.links-list {
  list-style: none;
  margin: 0; padding: 0;
}
.link-row { border-bottom: 1px solid var(--line); }
.link-row:first-child { border-top: 1px solid var(--line); }
.link-row a {
  display: grid;
  grid-template-columns: 1fr 1fr 30px;
  align-items: center;
  gap: 24px;
  padding: 18px 8px 18px 0;
  font-size: 17px;
  transition: padding var(--t-fast), background var(--t-fast);
  position: relative;
}
.link-row a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg-soft);
  opacity: 0;
  transition: opacity var(--t-fast);
  z-index: -1;
}
.link-row a:hover { padding-left: 24px; }
.link-row a:hover::before { opacity: 1; }
.link-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.link-name {
  font-size: clamp(22px, 2.6vw, 36px);
  letter-spacing: -0.025em;
  font-weight: 500;
}
.link-tm { font-size: 0.4em; vertical-align: 0.8em; color: var(--muted); margin-left: 4px; }
.link-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
  text-align: right;
}
.link-arrow {
  font-size: 22px;
  color: var(--muted);
  transition: color var(--t-fast), transform var(--t-fast);
}
.link-row a:hover .link-arrow { color: var(--accent); transform: translate(2px, -2px); }
.link-row--accent .link-name { color: var(--accent); }

/* ---------- latest record ---------- */
.latest { padding-block: 80px 40px; }
.record { align-items: start; padding-top: 32px; }
.record-cover {
  grid-column: 1 / span 6;
  display: flex; flex-direction: column; gap: 14px;
}
.cover-art {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  color: var(--muted);
}
.cover-stripes {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  color: var(--ink);
  opacity: 0.18;
}
.cover-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  background: var(--bg);
  padding: 8px 14px;
  border: 1px solid var(--line);
}
.cover-corner {
  position: absolute;
  top: 14px; left: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink);
  background: var(--bg);
  padding: 4px 8px;
  border: 1px solid var(--line);
}
.record-listen {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  align-self: flex-end;
  transition: color var(--t-fast), gap var(--t-fast);
}
.record-cover:hover .record-listen { color: var(--accent); }

.record-meta {
  grid-column: 8 / span 5;
  display: flex; flex-direction: column; gap: 14px;
  padding-top: 8px;
}
.record-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: baseline;
  padding-block: 10px;
  border-bottom: 1px solid var(--line-soft);
}
.record-row dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.record-row dd { margin: 0; font-size: 16px; }
.record-title {
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.025em;
  font-weight: 500;
  line-height: 1;
}
.record-blurb {
  font-size: 16px;
  line-height: 1.5;
  max-width: 44ch;
  margin-top: 16px;
  color: var(--ink);
  text-wrap: pretty;
}
.record-actions { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--ink);
  color: var(--bg);
  padding: 14px 22px;
  font-family: var(--font-sans);
  font-size: 15px;
  letter-spacing: 0.02em;
  border-radius: 6px;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.btn:hover { background: var(--accent); color: var(--bg); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- projects ---------- */
.page-head {
  min-height: 0;
  display: flex;
  align-items: center;
  padding-block: 32px 16px;
  scroll-margin-top: 80px;
}
.page-head .grid12 { align-items: center; width: 100%; }
.page-head-eye { grid-column: 1 / span 3; }
.page-head-title {
  grid-column: 1 / span 9;
  font-size: clamp(28px, 3.4vw, 52px);
  line-height: 1;
  letter-spacing: -0.025em;
  font-weight: 500;
  text-wrap: balance;
  margin: 0;
}
.page-head-aside {
  grid-column: 11 / span 2;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}
.page-head-aside strong { color: var(--ink); font-weight: 500; }

.toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding-block: 24px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.toolbar .filters { display: flex; gap: 18px; color: var(--muted); }
.toolbar .filters button { color: var(--muted); transition: color var(--t-fast); }
.toolbar .filters button.is-active { color: var(--ink); }
.toolbar .filters button:hover { color: var(--ink); }
.toolbar .view-toggle { display: flex; gap: 12px; color: var(--muted); }
.toolbar .view-toggle button.is-active { color: var(--ink); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 40px 24px;
  padding-block: 8px 40px;
}
.project-tile { display: flex; flex-direction: column; gap: 12px; }
.project-cover {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.project-cover--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project-cover .cover-corner { top: 10px; left: 10px; }
.project-cover .cover-stripes { opacity: 0.16; }
.project-cover.var-a { background: linear-gradient(135deg, #d6d1c4 0%, #b9b3a3 100%); }
.project-cover.var-b { background: #0f0e0c; color: #f1ede5; }
.project-cover.var-c { background: linear-gradient(180deg, #c6b89a 0%, #8e7d5c 100%); }
.project-cover.var-d { background: #1a2530; color: #d4d8db; }
.project-cover.var-e { background: linear-gradient(180deg, #efe7d6 0%, #d8c9a8 100%); }
.project-cover.var-f { background: #b85a16; color: #f1ede5; }
.project-cover.var-g { background: linear-gradient(180deg, #232323 0%, #4a4a4a 100%); color: #f1ede5; }
.project-cover.var-h { background: #d4d8db; }
.project-cover.var-i { background: linear-gradient(180deg, #5a6f7a 0%, #2a3a45 100%); color: #f1ede5; }
.project-cover.var-j { background: #efe7d6; }
.project-cover.var-k { background: #28465a; color: #f1ede5; }
.project-cover.var-l { background: linear-gradient(180deg, #f1ede5 0%, #b85a16 100%); }

.cover-glyph {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 38px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cover-glyph.serif {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 56px;
}
.cover-shape {
  position: absolute;
  width: 50%; height: 50%;
  top: 25%; left: 25%;
}
.cover-shape.circle { border-radius: 50%; border: 1px solid currentColor; }
.cover-shape.bar    { height: 1px; top: 50%; left: 18%; right: 18%; width: auto; background: currentColor; }
.cover-shape.square { border: 1px solid currentColor; }

.project-info {
  display: grid;
  grid-template-columns: 1fr;
  align-items: baseline;
  gap: 6px;
}
.project-title {
  font-size: 15px;
  letter-spacing: -0.01em;
  font-weight: 500;
}
.project-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* utility cover variants kept for legacy decorative tiles (unused on real-image grid) */

/* ---------- blog ---------- */
.blog-list {
  list-style: none; margin: 0; padding: 0;
  border-top: 1px solid var(--line);
}
.blog-entry { border-bottom: 1px solid var(--line); }
.blog-entry a {
  display: grid;
  grid-template-columns: 110px 1fr 1.4fr 60px;
  gap: 24px;
  padding: 36px 8px 36px 0;
  align-items: start;
  transition: padding var(--t-fast), background var(--t-fast);
  position: relative;
}
.blog-entry a::before {
  content: ""; position: absolute; inset: 0;
  background: var(--bg-soft); opacity: 0;
  transition: opacity var(--t-fast); z-index: -1;
}
.blog-entry a:hover { padding-left: 24px; }
.blog-entry a:hover::before { opacity: 1; }

.blog-date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  padding-top: 8px;
}
.blog-title {
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.08;
  font-weight: 500;
  text-wrap: balance;
}
.blog-excerpt {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 56ch;
  text-wrap: pretty;
}
.blog-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  padding-top: 8px;
}
.blog-tag {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  color: var(--accent);
}

.blog-pin {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 64px;
}
.blog-pin .grid12 { align-items: end; }
.blog-pin-eye { grid-column: 1 / span 3; }
.blog-pin-body {
  grid-column: 5 / span 7;
  display: flex; flex-direction: column; gap: 18px;
}
.blog-pin-title {
  font-size: clamp(32px, 4vw, 56px);
  letter-spacing: -0.025em;
  line-height: 1;
  font-weight: 500;
  text-wrap: balance;
}
.blog-pin-lead {
  font-size: 18px;
  line-height: 1.5;
  max-width: 60ch;
  color: var(--ink);
  text-wrap: pretty;
}
.blog-pin-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.blog-pin-read {
  display: inline-flex; gap: 8px; align-items: center;
  color: var(--accent);
}

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .projects-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1080px) {
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .hero { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
  .hero-title { display: none; }
  .hero-grid { display: none; }
  .bio-side { grid-column: 1 / -1; position: static; }
  .bio-body { grid-column: 1 / -1; }
  .section-head-eye, .page-head-eye { grid-column: 1 / -1; margin-bottom: 16px; }
  .section-head-title, .page-head-title { grid-column: 1 / -1; }
  .page-head-aside { grid-column: 1 / -1; text-align: left; margin-top: 16px; }
  .record-cover, .record-meta { grid-column: 1 / -1; }
  .link-row a { grid-template-columns: 1fr 32px; padding: 14px 8px 14px 0; font-size: 15px; }
  .link-meta { display: none; }
  .bio-body { font-size: 14px; line-height: 1.5; gap: 14px; }
  .bio-body .lead { font-size: 14px; line-height: 1.5; }
  .bio { padding-block: 24px 16px; }
  .latest { padding-block: 16px 32px; }
  .record { padding-top: 16px; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
  .blog-entry a { grid-template-columns: 1fr; gap: 8px; padding: 28px 8px; }
  .blog-meta { text-align: left; }
}
