:root {
  --paper: #f7f3ea;
  --paper-soft: #fbf8f1;
  --ink: #23231f;
  --muted: #69675f;
  --green: #254b3d;
  --line: #d8d0c1;
  --accent: #b85c38;   /* terracotta — matches template pages */
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.75;
  overscroll-behavior-x: contain;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: clamp(32px, 4vw, 72px);
  padding-right: clamp(32px, 4vw, 72px);
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 78px;
  padding-top: 4px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: #214735;
  color: var(--paper);
  border-radius: 0;
  font-family: "Cormorant Garamond", "Libre Baskerville", Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 20px;
  color: #4A4742;
  font-family: "Source Sans 3", "Noto Sans JP", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.site-nav a {
  color: #4A4742;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  color: var(--green);
  border-bottom-color: var(--green);
}

.direction-links a:hover strong {
  color: var(--green);
}

.home-index {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: clamp(32px, 4vw, 72px);
  padding-right: clamp(32px, 4vw, 72px);
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.78fr) minmax(420px, 0.95fr);
  column-gap: clamp(28px, 4vw, 64px);
  align-items: start;
  row-gap: 0;
  /* approx one screen tall but capped so tall displays don't blow it up */
  min-height: clamp(640px, calc(100vh - 92px), 900px);
  padding: clamp(20px, 3vh, 36px) 0 28px;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-family: "Newsreader", "Noto Serif JP", serif;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
}

/* indent the whole left column so label / title / description / direction-
   links all share the same inner-left edge (boutique editorial alignment) */
.home-copy {
  margin-left: clamp(20px, 2vw, 36px);
}

.hero-labels {
  /* gap to h1: noticeably smaller than title→description gap (30px below) */
  margin-bottom: 14px;
}

.direction-links {
  margin-left: clamp(20px, 2vw, 36px);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 30px;
  font-family: "Noto Serif JP", serif;
  /* vw + px clamp: caps at 72px so title always fits col 1 (≈640px wide at
     1440 container), regardless of user's browser default font-size. */
  font-size: clamp(40px, 3.8vw, 72px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0;
}

.home-description {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.direction-links {
  display: grid;
  grid-column: 1;
  grid-row: 2;
  /* anchor to the bottom of the spanned image height — image dominates the
     left visual space, DL sits at the bottom edge to support it */
  align-self: end;
  gap: 0;
  max-width: 610px;
  margin-top: 0;
}

.direction-row {
  display: grid;
  grid-template-columns: 34px minmax(140px, 0.5fr) minmax(0, 1fr) 18px;
  gap: 14px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid rgba(33, 71, 53, 0.18);
  color: inherit;
  text-decoration: none;
  transition: background 180ms ease, padding-left 180ms ease;
}

.direction-row:last-child {
  border-bottom: 1px solid rgba(33, 71, 53, 0.18);
}

.direction-links span {
  color: var(--accent);
  font-family: "Newsreader", "Noto Serif JP", serif;
  font-size: 0.86rem;
  font-weight: 650;
}

.direction-links strong {
  color: var(--ink);
  font-family: "Newsreader", "Noto Serif JP", serif;
  font-size: 1.15rem;          /* was 1.55rem — was too large */
  font-weight: 650;
  line-height: 1.2;
  transition: color 160ms ease;
  white-space: nowrap;
}

.direction-links small {
  color: var(--muted);
  font-size: 0.78rem;          /* was 0.9rem */
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.direction-row .arrow {
  color: var(--accent);
  opacity: 0.55;
  transition: transform 180ms ease, opacity 180ms ease;
}

.direction-row:hover {
  background: rgba(33, 71, 53, 0.045);
  padding-left: 10px;
}

.direction-row:hover .arrow {
  opacity: 1;
  transform: translateX(4px);
}

.home-image {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;       /* fill the two spanned rows                   */
  justify-self: start;
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 0;
  position: relative;
}

.home-image img {
  /* image fills the spanned rows; figure size dictated by figure, not img */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: saturate(0.88) contrast(0.98);
  transition: filter 180ms ease;
}

.home-image figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  max-width: min(470px, calc(100% - 28px));
  margin: 0;
  padding: 8px 10px;
  background: rgba(33, 71, 53, 0.78);
  color: var(--paper);
  font-size: 0.76rem;
  line-height: 1.6;
  opacity: 0.86;
  transition: opacity 180ms ease, background 180ms ease;
}

.home-image:hover img {
  filter: saturate(0.82) contrast(0.96) brightness(0.9);
}

.home-image:hover figcaption {
  background: rgba(33, 71, 53, 0.9);
  opacity: 1;
}

/* Archive page support */
.archive-hero,
.archive-list {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
}

.archive-hero {
  padding: 82px 0 52px;
}

.archive-hero h1 {
  max-width: 980px;
}

.archive-hero p {
  max-width: 720px;
  color: var(--muted);
}

.archive-list {
  display: grid;
  gap: 12px;
  padding-bottom: 80px;
}

.archive-list article {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.archive-heading span {
  display: block;
  color: var(--green);
  font-family: "Newsreader", "Noto Serif JP", serif;
  font-size: 1.6rem;
  font-weight: 650;
}

.archive-heading strong {
  color: var(--muted);
  font-size: 0.86rem;
}

.archive-list ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.archive-list li {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(220px, 0.55fr);
  gap: 22px;
  color: var(--muted);
}

.archive-list li span {
  color: var(--ink);
  font-weight: 700;
}

.archive-list li em {
  font-style: normal;
}

/* Global site footer (unified across all pages) */
.site-footer {
  width: 100%;
  margin-top: clamp(60px, 8vh, 100px);
}
.site-footer-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px clamp(32px, 4vw, 72px) clamp(36px, 5vh, 56px);
  text-align: left;
}
.site-footer-tag,
.site-footer-copy {
  margin: 0;
  font-family: "Noto Sans", "Noto Sans JP", system-ui, sans-serif;
  font-weight: 400;
  color: var(--ink);
}
.site-footer-tag {
  font-size: 14px;
  opacity: 0.75;
  margin-bottom: 6px;
}
.site-footer-copy {
  font-size: 12px;
  opacity: 0.5;
}
.site-footer-tag .tag-mobile { display: none; }
@media (max-width: 720px) {
  .site-footer-inner {
    padding: 56px 40px 72px;
  }
  .site-footer-tag {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(51, 51, 48, 0.72);
    opacity: 1;
    max-width: 420px;
    margin-bottom: 0;
  }
  .site-footer-copy {
    margin-top: 14px;
    font-size: 12px;
    color: rgba(51, 51, 48, 0.55);
    opacity: 1;
  }
  .site-footer-tag .tag-desktop { display: none; }
  .site-footer-tag .tag-mobile { display: inline; }
}

.mail-link {
  color: var(--green);
  font-family: "Newsreader", "Noto Serif JP", serif;
  font-size: 1.05rem;
  font-weight: 650;
}

@media (max-width: 900px) {
  .home-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px 0;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .home-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 38px;
  }

  h1 {
    max-width: 680px;
    font-size: 3.35rem;
  }

  .direction-links,
  .home-image {
    grid-column: auto;
    grid-row: auto;
  }

  .home-image {
    width: 100%;
    max-width: 620px;
    padding-top: 0;
  }

  /* Stacked: image and caption flow normally instead of absolute,
     so the figure sizes to its content and nothing overlaps the title. */
  .home-image {
    position: relative;
    display: block;
  }
  .home-image img {
    position: static;
    top: auto; right: auto; bottom: auto; left: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    object-fit: contain;
  }
  .home-image figcaption {
    position: absolute;
    left: 14px;
    bottom: 14px;
  }

  .direction-links {
    max-width: 610px;
  }

  .direction-row {
    grid-template-columns: 48px minmax(210px, 0.45fr) minmax(260px, 1fr);
  }

  .archive-list article,
  .archive-list li {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header,
  .home-index,
  .archive-hero,
  .archive-list {
    width: 100%;
    padding-left: 22px;
    padding-right: 22px;
  }
  .site-footer-inner {
    padding-left: 22px;
    padding-right: 22px;
  }

  h1 {
    font-size: 2.55rem;
  }

  .hero-text-block,
  .direction-links {
    margin-left: 0;
  }

  .home-description {
    margin-bottom: 42px;
  }

  .direction-row {
    grid-template-columns: 36px minmax(0, 1fr) 24px;
    gap: 12px 16px;
  }

  .direction-links small {
    grid-column: 2;
    white-space: normal;
  }

  .direction-row .arrow {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
  }
}

/* About page */
.about-main {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: clamp(32px, 4vw, 72px);
  padding-right: clamp(32px, 4vw, 72px);
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 0.38fr);
  gap: clamp(56px, 7vw, 104px);
  align-items: center;
  min-height: calc(78vh - 78px);
  padding: clamp(66px, 9vh, 112px) 0 clamp(72px, 9vh, 104px);
}

.about-hero h1 {
  max-width: 860px;
  margin: 30px 0 0;
  font-family: "Noto Serif JP", serif;
  font-size: 2.55rem;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0;
}

.about-profile {
  margin: 0;
  justify-self: start;
  width: min(100%, 390px);
}

.about-profile img {
  width: 100%;
  height: min(56vh, 560px);
  min-height: 390px;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.9) contrast(0.98);
}

.about-section {
  padding: clamp(78px, 10vh, 118px) 0;
  border-top: 1px solid rgba(33, 71, 53, 0.18);
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(190px, 0.24fr) minmax(0, 0.84fr);
  gap: clamp(34px, 5vw, 78px);
  align-items: start;
  margin-bottom: 46px;
}

.section-intro h2 {
  max-width: 780px;
  margin: 0;
  font-family: "Noto Serif JP", serif;
  font-size: 2.35rem;
  line-height: 1.34;
  letter-spacing: 0;
}

.section-intro p:not(.eyebrow) {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
}

.timeline-list {
  display: grid;
  max-width: 1000px;
  margin-left: auto;
  border-top: 1px solid rgba(33, 71, 53, 0.18);
}

.timeline-list article {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  padding: 26px 0;
  border-bottom: 1px solid rgba(33, 71, 53, 0.18);
}

.timeline-list span {
  color: var(--green);
  font-family: "Newsreader", "Noto Serif JP", serif;
  font-weight: 650;
}

.timeline-list h3,
.skills-grid h3 {
  margin: 0 0 8px;
  font-family: "Newsreader", "Noto Serif JP", serif;
  font-size: 1.25rem;
  line-height: 1.22;
}

.timeline-list p,
.skills-grid p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.observation-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 28px);
}

.observation-grid figure {
  grid-column: span 6;
  margin: 0;
}

.observation-grid figure.wide {
  grid-column: span 6;
}

.observation-grid figure.tall {
  grid-column: span 4;
}

.observation-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.88) contrast(0.98);
}

.observation-grid figure.tall img {
  aspect-ratio: 3 / 4;
}

.observation-grid figcaption {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.observation-grid figcaption strong {
  color: var(--green);
  font-family: "Newsreader", "Noto Serif JP", serif;
  font-size: 0.9rem;
}

.video-note {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  max-width: 980px;
  margin: clamp(34px, 5vh, 56px) 0 0 auto;
  padding: 16px 0;
  border-top: 1px solid rgba(33, 71, 53, 0.18);
  border-bottom: 1px solid rgba(33, 71, 53, 0.18);
  text-decoration: none;
}

.video-note img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(0.86);
}

.video-note span {
  display: grid;
  gap: 4px;
}

.video-note strong {
  color: var(--ink);
  font-family: "Noto Serif JP", serif;
  font-size: 1.08rem;
}

.video-note small {
  color: var(--muted);
  font-size: 0.88rem;
}

.video-note em {
  color: var(--green);
  font-family: "Newsreader", serif;
  font-style: normal;
  font-weight: 650;
  text-align: right;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 34px);
}

.skills-grid article {
  padding-top: 18px;
  border-top: 1px solid rgba(33, 71, 53, 0.18);
}

@media (max-width: 980px) {
  .about-hero,
  .section-intro {
    grid-template-columns: 1fr;
  }

  .about-hero {
    min-height: auto;
  }

  .about-profile {
    max-width: 520px;
  }

  .timeline-list {
    margin-left: 0;
  }

  .observation-grid,
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .observation-grid figure,
  .observation-grid figure.wide,
  .observation-grid figure.tall {
    grid-column: auto;
  }

  .video-note {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .video-note em {
    grid-column: 2;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .about-main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .about-hero {
    padding-top: 48px;
  }

  .about-hero h1 {
    font-size: 1.9rem;
    line-height: 1.6;
  }

  .section-intro h2 {
    font-size: 2rem;
  }

  .timeline-list article,
  .observation-grid,
  .skills-grid,
  .video-note {
    grid-template-columns: 1fr;
  }

  .observation-grid figure,
  .observation-grid figure.wide,
  .observation-grid figure.tall {
    grid-column: auto;
    grid-row: auto;
  }

  .video-note em {
    grid-column: auto;
  }
}
