/* ==========================================================================
   Design tokens
   ========================================================================== */

:root {
  /* Surfaces — kept close to the neutral studio grey of the photography */
  --paper: #f4f3f0;
  --paper-sunken: #eae7e2;
  --ink: #1f201c;
  --ink-soft: #46473f;
  --muted: #6f6d66;
  --line: #ddd9d2;
  --line-strong: #c4bfb6;
  --accent: #8c5c48;
  --accent-light: #c2917b;

  /* Dark surfaces */
  --night: #22241f;
  --night-soft: #30332d;
  --night-line: #4b4e46;
  --night-text: #f1efe9;
  --night-muted: #b4b3aa;

  --display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', 'Noto Sans JP', sans-serif;
  --mono: 'DM Mono', monospace;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);

  --header-h: 72px;
  --gutter: clamp(18px, 4.5vw, 64px);
}

/* ==========================================================================
   Base
   ========================================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

body.lightbox-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  width: min(1280px, calc(100% - (2 * var(--gutter))));
  margin-inline: auto;
}

/* Small uppercase labels used throughout the site */
.eyebrow,
.kicker {
  font: 500 11px var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ==========================================================================
   Scroll reveal — applied by site.js, disabled for reduced motion
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity .9s var(--ease-soft) var(--reveal-delay, 0s),
    transform 1s var(--ease) var(--reveal-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease-soft), background .4s var(--ease-soft);
}

/* The sticky bar only gains a surface once the page scrolls away from the top */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 calc(-1 * var(--gutter));
  z-index: -1;
  background: rgba(244, 243, 240, .82);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity .4s var(--ease-soft);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.site-header.is-scrolled::before {
  opacity: 1;
}

.wordmark {
  width: 94px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.wordmark img {
  display: block;
  width: 94px;
  height: 31px;
  object-fit: contain;
  opacity: .86;
  transition: opacity .3s var(--ease-soft), transform .5s var(--ease);
}

.wordmark:hover img {
  opacity: .62;
  transform: translateX(2px);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-contact {
  font: 10px var(--mono);
  letter-spacing: .14em;
  position: relative;
  padding-bottom: 3px;
}

.header-contact::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
}

.header-contact:hover::after {
  transform: scaleX(1);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: none;
  display: grid;
  place-content: center;
  gap: 5px;
  cursor: pointer;
  transition: border-color .3s var(--ease-soft), background .3s var(--ease-soft);
}

.menu-toggle:hover {
  border-color: var(--ink);
  background: rgba(31, 32, 28, .04);
}

.menu-toggle span {
  display: block;
  width: 15px;
  height: 1px;
  background: var(--ink);
  transition: transform .4s var(--ease);
}

.menu-toggle[aria-expanded=true] span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.menu-toggle[aria-expanded=true] span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

/* ==========================================================================
   Navigation drawer
   ========================================================================== */

.menu-layer {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

.menu-layer[hidden] {
  display: none;
}

.menu-layer.is-open {
  pointer-events: auto;
}

.menu-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(24, 25, 22, .45);
  cursor: pointer;
  opacity: 0;
  backdrop-filter: blur(0);
  transition: opacity .5s var(--ease-soft), backdrop-filter .7s var(--ease-soft);
}

.menu-layer.is-open .menu-backdrop {
  opacity: 1;
  backdrop-filter: blur(6px);
}

.menu-card {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(460px, 100%);
  background: var(--paper);
  border-left: 1px solid var(--line);
  padding: 26px clamp(26px, 5.5vw, 54px) 34px;
  display: flex;
  flex-direction: column;
  box-shadow: -24px 0 60px rgba(0, 0, 0, .14);
  transform: translate3d(100%, 0, 0);
  transition: transform .72s var(--ease);
  will-change: transform;
  overflow-y: auto;
}

.menu-layer.is-open .menu-card {
  transform: translate3d(0, 0, 0);
}

.menu-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
  font: 11px var(--mono);
  letter-spacing: .16em;
}

.menu-close {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: none;
  font: 300 22px/1 var(--sans);
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition:
    color .25s var(--ease-soft),
    border-color .25s var(--ease-soft),
    transform .4s var(--ease);
}

.menu-close:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: rotate(90deg);
}

.menu-links {
  display: grid;
  margin: auto 0;
}

.menu-links a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font: 300 clamp(32px, 6vw, 46px)/1.55 var(--display);
  letter-spacing: -.01em;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity .5s var(--ease-soft),
    transform .7s var(--ease),
    color .3s var(--ease-soft);
}

.menu-links a:hover {
  color: var(--accent);
}

.menu-links a[aria-current="page"] {
  color: var(--accent);
}

.menu-layer.is-open .menu-links a {
  opacity: 1;
  transform: translateY(0);
}

.menu-layer.is-open .menu-links a:nth-child(1) { transition-delay: .2s; }
.menu-layer.is-open .menu-links a:nth-child(2) { transition-delay: .26s; }
.menu-layer.is-open .menu-links a:nth-child(3) { transition-delay: .32s; }
.menu-layer.is-open .menu-links a:nth-child(4) { transition-delay: .38s; }
.menu-layer.is-open .menu-links a:nth-child(5) { transition-delay: .44s; }
.menu-layer.is-open .menu-links a:nth-child(6) { transition-delay: .5s; }

.menu-links a span {
  font: 10px var(--mono);
  letter-spacing: .16em;
  color: var(--muted);
  margin-left: 16px;
}

.menu-social-label {
  font: 10px var(--mono);
  letter-spacing: .16em;
  color: var(--muted);
  margin-bottom: 12px;
}

.social-links {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.social-links a {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 17px;
  transition: background .3s var(--ease-soft), color .3s var(--ease-soft);
}

.social-links a:hover {
  background: var(--ink);
  color: var(--paper);
}

.social-links svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-footer {
  margin-top: 22px;
  color: var(--muted);
  font: 10px var(--mono);
  letter-spacing: .14em;
}

/* ==========================================================================
   Home — hero
   ========================================================================== */

.hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
  padding: clamp(48px, 7vw, 92px) 0 clamp(56px, 8vw, 104px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero h1 {
  font: 300 clamp(58px, 7.6vw, 112px)/1 var(--display);
  letter-spacing: -.015em;
  margin: 20px 0 0;
}

.hero-jp {
  font-size: 13px;
  letter-spacing: .22em;
  color: var(--ink-soft);
  margin-top: 16px;
}

.hero-meta {
  font: 10px var(--mono);
  letter-spacing: .18em;
  color: var(--muted);
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  width: 100%;
  max-width: 300px;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* Feature portrait beside the name.
   A consistent ratio keeps CMS-selected images from shifting the layout. */
.hero-figure {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--paper-sunken);
  aspect-ratio: 1080 / 1375;
}

.hero-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.hero-figure:hover img {
  transform: scale(1.03);
}

.hero-figure-meta {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding: 40px 18px 16px;
  color: #fff;
  font: 10px var(--mono);
  letter-spacing: .16em;
  background: linear-gradient(to top, rgba(26, 27, 24, .62), transparent);
}

/* ==========================================================================
   Buttons and inline links
   ========================================================================== */

.button {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 15px 20px;
  background: var(--ink);
  color: var(--paper);
  font: 11px var(--sans);
  letter-spacing: .04em;
  transition: background .3s var(--ease-soft), color .3s var(--ease-soft);
}

.button span {
  transition: transform .45s var(--ease);
}

.button:hover {
  background: var(--accent);
}

.button:hover span {
  transform: translate(3px, -3px);
}

.button.light {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.button.light:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--ink);
  padding: 10px 0;
  font: 10px var(--mono);
  letter-spacing: .16em;
  margin-top: 28px;
  transition: color .3s var(--ease-soft), border-color .3s var(--ease-soft);
}

.more-link span {
  transition: transform .45s var(--ease);
}

.more-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.more-link:hover span {
  transform: translate(3px, -3px);
}

.text-link {
  font: 11px var(--mono);
  letter-spacing: .1em;
  white-space: nowrap;
  transition: color .25s var(--ease-soft);
}

.text-link:hover {
  color: var(--accent);
}

/* ==========================================================================
   Section headings
   ========================================================================== */

.section {
  padding: clamp(64px, 9vw, 112px) 0;
}

/* Follows a .page-intro, which already supplies the upper spacing */
.section-tight {
  padding-top: 12px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding-bottom: 22px;
  margin-bottom: clamp(26px, 3.5vw, 42px);
  border-bottom: 1px solid var(--line);
}

.section-head h2,
.page-title {
  font: 300 clamp(44px, 5.6vw, 72px)/1.05 var(--display);
  letter-spacing: -.015em;
  margin: 10px 0 0;
}

.section-head p {
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 0 0 6px;
}

/* ==========================================================================
   Image grid
   ========================================================================== */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 18px);
}

.gallery-card {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--paper-sunken);
  aspect-ratio: 3 / 4;
}

.gallery-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}

.gallery-card:hover img {
  transform: scale(1.04);
}

/* Legible on the high-key photography without hiding the image */
.gallery-card .gallery-caption {
  position: absolute;
  inset: auto 0 0;
  padding: 44px 14px 13px;
  color: #fff;
  font: 10px var(--mono);
  letter-spacing: .14em;
  background: linear-gradient(to top, rgba(26, 27, 24, .58), transparent);
}

.gallery-card .ig-cue {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(244, 243, 240, .92);
  font: 10px var(--mono);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .35s var(--ease-soft), transform .45s var(--ease);
}

.gallery-card:hover .ig-cue,
.gallery-card:focus-visible .ig-cue {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-grid {
  gap: clamp(10px, 1.4vw, 20px);
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.works-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 clamp(24px, 3.5vw, 40px);
  padding-bottom: 0;
}

.works-filter {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 10px var(--mono);
  letter-spacing: .09em;
  cursor: pointer;
  transition:
    background .25s var(--ease-soft),
    border-color .25s var(--ease-soft),
    color .25s var(--ease-soft);
}

.works-filter:hover,
.works-filter:focus-visible,
.works-filter.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.works-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(34px, 5vw, 58px);
}

.works-pagination[hidden] {
  display: none;
}

.works-page-number,
.works-page-step {
  min-width: 40px;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 10px var(--mono);
  letter-spacing: .08em;
  cursor: pointer;
  transition:
    background .25s var(--ease-soft),
    color .25s var(--ease-soft),
    border-color .25s var(--ease-soft);
}

.works-page-number:hover,
.works-page-number:focus-visible,
.works-page-number[aria-current="page"],
.works-page-step:hover:not(:disabled),
.works-page-step:focus-visible:not(:disabled) {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.works-page-step:disabled {
  color: var(--muted);
  cursor: default;
  opacity: .45;
}

/* Portfolio detail overlay. The original link remains as a no-JS fallback. */
.portfolio-lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: clamp(18px, 4vw, 48px);
  border: 0;
  background: rgba(23, 24, 21, .94);
  color: var(--night-text);
}

.portfolio-lightbox::backdrop {
  background: rgba(23, 24, 21, .76);
  backdrop-filter: blur(8px);
}

.portfolio-lightbox-panel {
  position: relative;
  width: min(920px, 100%);
  height: 100%;
  margin: auto;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  gap: 16px;
}

.portfolio-lightbox-image {
  display: block;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.portfolio-lightbox-close {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 50%;
  background: rgba(23, 24, 21, .62);
  color: #fff;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.portfolio-lightbox-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font: 11px var(--mono);
  letter-spacing: .12em;
}

.portfolio-lightbox-caption {
  color: var(--night-muted);
}

.portfolio-lightbox-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid currentColor;
  white-space: nowrap;
}

/* ==========================================================================
   Data-driven work lists

   The grids are empty in the markup until content/works.json arrives, so
   they hold the height they are about to need. The ratios assume
   three-up cards at 3/4: two rows for the home teaser, three for the
   full portfolio.
   ========================================================================== */

.gallery[data-works]:empty {
  aspect-ratio: 9 / 8;
}

.portfolio-grid[data-works]:empty {
  aspect-ratio: 3 / 4;
}

.works-fallback {
  margin: 28px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ==========================================================================
   Credits list
   ========================================================================== */

/* The section heading already provides the opening rule on Home. */
.home-works .credits {
  border-top: 0;
}

.credits {
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.credit {
  display: grid;
  grid-template-columns: 52px minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
  transition: border-color .3s var(--ease-soft);
}

.credit:hover {
  border-bottom-color: var(--line-strong);
}

.credit-num {
  font: 10px var(--mono);
  color: var(--accent);
}

.credit-title {
  font-size: 14px;
  line-height: 1.6;
}

.credit-type {
  font: 10px var(--mono);
  letter-spacing: .13em;
  color: var(--muted);
}

.credit-links {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.credit-link {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition:
    background .3s var(--ease-soft),
    color .3s var(--ease-soft),
    border-color .3s var(--ease-soft);
}

.credit-link:hover,
.credit-link:focus-visible {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.credit-link svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   Interior page intros
   ========================================================================== */

.page-intro {
  padding: clamp(52px, 7vw, 96px) 0 clamp(28px, 3.5vw, 44px);
}

.page-intro .page-title {
  margin-top: 14px;
}

.page-intro p {
  max-width: 580px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.95;
  margin: 22px 0 0;
}

/* ==========================================================================
   Works — split cards
   ========================================================================== */

.split-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: clamp(28px, 4vw, 48px);
}

.split-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  padding: clamp(26px, 3vw, 38px);
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color .4s var(--ease-soft), color .4s var(--ease-soft);
}

/* Wipes a dark surface up from the base rather than flashing a flat colour */
.split-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateY(100%);
  transition: transform .6s var(--ease);
}

.split-card:hover {
  color: var(--paper);
  border-color: var(--ink);
}

.split-card:hover::before {
  transform: translateY(0);
}

.split-card strong,
.split-card span {
  position: relative;
}

.split-card strong {
  font: 300 clamp(32px, 3.4vw, 42px)/1.1 var(--display);
}

.split-card span {
  font: 10px var(--mono);
  letter-spacing: .14em;
  color: var(--muted);
  transition: color .4s var(--ease-soft);
}

.split-card:hover span {
  color: var(--night-muted);
}

/* ==========================================================================
   Profile
   ========================================================================== */

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding-bottom: clamp(64px, 9vw, 112px);
}

/* Stands in for the portrait until a photo is supplied */
.portrait-placeholder {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background:
    linear-gradient(150deg, #e7e3dc, #f1efea 48%, #ddd7cd);
  display: grid;
  place-items: center;
}

.portrait-placeholder::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(31, 32, 28, .1);
}

.placeholder-label {
  position: absolute;
  bottom: 20px;
  left: 20px;
  color: var(--muted);
  font: 10px var(--mono);
  letter-spacing: .18em;
}

.profile-copy .page-title {
  margin: 12px 0 24px;
}

.profile-copy p {
  font-size: 14px;
  line-height: 2.05;
  color: var(--ink-soft);
  max-width: 560px;
}

.placeholder-note {
  font: 10px var(--mono);
  letter-spacing: .14em;
  color: var(--accent);
  margin-top: 28px;
}

/* ==========================================================================
   Calendar
   ========================================================================== */

/* Holds the Google Calendar iframe, or the standby copy before one is set */
.calendar-embed {
  position: relative;
  height: clamp(460px, 66vh, 700px);
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.calendar-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.calendar-fallback {
  margin: 0;
  padding: 0 24px;
  text-align: center;
  font-size: 13px;
  line-height: 2;
  color: var(--muted);
}

.calendar-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 18px;
  font: 10px var(--mono);
  letter-spacing: .1em;
  color: var(--muted);
}

.calendar-note .more-link {
  margin-top: 0;
  color: var(--ink);
}

.calendar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.calendar-action {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 14px 19px;
  border: 1px solid var(--line-strong);
  font-size: 11px;
  letter-spacing: .04em;
  transition:
    background .3s var(--ease-soft),
    color .3s var(--ease-soft),
    border-color .3s var(--ease-soft);
}

.calendar-action svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-action-glyph {
  font-size: 15px;
  line-height: 1;
  width: 16px;
  text-align: center;
}

.calendar-action span:last-child {
  transition: transform .45s var(--ease);
}

.calendar-action:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.calendar-action:hover span:last-child {
  transform: translate(3px, -3px);
}

/* ==========================================================================
   Contact
   ========================================================================== */

/* Fills the remaining viewport height so the page reads as one dark field */
.contact-panel {
  flex: 1 0 auto;
  display: grid;
  align-content: center;
  background: var(--night);
  color: var(--night-text);
  padding: clamp(64px, 9vw, 112px) 0;
}

.contact-panel .kicker {
  color: var(--accent-light);
}

.contact-title {
  font: 300 clamp(44px, 5.6vw, 72px)/1.05 var(--display);
  letter-spacing: -.015em;
  margin: 14px 0 18px;
}

.contact-panel p {
  font-size: 14px;
  color: var(--night-muted);
  line-height: 1.95;
  margin: 0;
}

.contact-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: clamp(26px, 3.5vw, 40px);
}

.contact-options a {
  border: 1px solid var(--night-line);
  padding: 15px 20px;
  font-size: 11px;
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background .3s var(--ease-soft), border-color .3s var(--ease-soft);
}

.contact-options a:hover {
  background: var(--night-soft);
  border-color: var(--night-muted);
}

.contact-options svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   Footer — pinned to the viewport base on short pages
   ========================================================================== */

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.site-footer {
  padding: 15px 0;
  background: var(--night);
  color: var(--night-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font: 10px var(--mono);
  letter-spacing: .14em;
}

.footer-inner a {
  color: var(--night-text);
  transition: color .25s var(--ease-soft);
}

.footer-inner a:hover {
  color: #fff;
}

.footer-link {
  white-space: nowrap;
}

.footer-social {
  display: flex;
  gap: 2px;
}

.footer-social a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 15px;
  transition: background .25s var(--ease-soft), color .25s var(--ease-soft);
}

.footer-social a:hover {
  background: rgba(255, 255, 255, .09);
}

.footer-social svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 40px;
  }

  .profile-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .portrait-placeholder {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 62px;
  }

  body {
    font-size: 14px;
  }

  .header-right {
    gap: 14px;
  }

  .menu-toggle {
    width: 44px;
    height: 44px;
  }

  .hero h1 {
    font-size: clamp(54px, 15vw, 82px);
  }

  .hero-meta {
    max-width: none;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  /* Two-up means three rows for six cards, four for eight */
  .gallery[data-works]:empty {
    aspect-ratio: 1 / 2;
  }

  .portfolio-grid[data-works]:empty {
    aspect-ratio: 1 / 2.67;
  }

  .gallery-card .gallery-caption {
    padding: 34px 10px 10px;
    font-size: 10px;
  }

  .gallery-card .ig-cue {
    opacity: 1;
    transform: none;
    width: 32px;
    height: 32px;
    right: 8px;
    top: 8px;
    font-size: 11px;
  }

  .works-toolbar {
    flex-wrap: nowrap;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .works-toolbar::-webkit-scrollbar {
    display: none;
  }

  .works-filter {
    flex: 0 0 auto;
    min-height: 40px;
  }

  .works-pagination {
    gap: 5px;
  }

  .works-page-number,
  .works-page-step {
    min-width: 42px;
    height: 42px;
    padding: 0 8px;
  }

  .section-head {
    display: block;
    padding-bottom: 18px;
  }

  .section-head p {
    margin: 12px 0 0;
  }

  .credit {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 6px 10px;
    padding: 16px 0;
  }

  .credit-type {
    grid-column: 2;
    font-size: 10px;
  }

  .credit-links {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .credit-link {
    width: 44px;
    height: 44px;
  }

  .split-links {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .split-card {
    min-height: 160px;
  }

  /* The month grid needs vertical room once the cells narrow */
  .calendar-embed {
    height: 540px;
  }

  .calendar-note {
    gap: 10px;
  }

  .footer-inner {
    font-size: 10px;
  }
}

@media (max-width: 560px) {
  .portfolio-lightbox-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  /* Full-width stacked buttons read better than a cramped wrapped row */
  .calendar-actions {
    display: grid;
    gap: 8px;
  }

  .calendar-action {
    justify-content: center;
  }

  /* Two deliberate rows beat letting three items wrap unevenly */
  .footer-inner {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas:
      "social link"
      "copy copy";
    align-items: center;
    row-gap: 8px;
  }

  .footer-social {
    grid-area: social;
    margin-left: -8px;
  }

  .footer-link {
    grid-area: link;
    justify-self: end;
  }

  .footer-copy {
    grid-area: copy;
  }
}

@media (max-width: 380px) {
  .gallery {
    gap: 6px;
  }

  .header-contact {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
