/* Homepage refinements. Loaded only by /index.html after its original styles. */
:root {
  --text-dim: #736b5d;
  --accent: #946621;
  --border: rgba(24, 20, 14, .11);
  --border-light: rgba(24, 20, 14, .18);
}

:root.dark {
  --text-dim: #aaa292;
  --accent: #d4a84b;
  --border: rgba(232, 228, 216, .12);
  --border-light: rgba(232, 228, 216, .22);
}

html { scroll-padding-top: 104px; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
.container { width: 100%; }

/* A quieter masthead with comfortable click targets. */
nav { padding: 14px 0; }
nav.scrolled { box-shadow: 0 4px 24px rgba(0, 0, 0, .04); }
nav .logo { font-size: 1.25rem; }
nav ul { align-items: center; gap: clamp(16px, 2.2vw, 30px); }
nav ul a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .75rem;
  letter-spacing: .03em;
  white-space: nowrap;
}
nav .theme-toggle {
  flex-shrink: 0;
  width: 44px !important;
  height: 44px !important;
  margin-left: 20px !important;
  border: 1px solid var(--border) !important;
  border-radius: 50%;
}
nav .theme-toggle:hover { background: var(--accent-glow) !important; }

/* Preserve the portrait + introduction composition with more balanced spacing. */
.hero { min-height: 720px; min-height: max(720px, 92svh); padding: 140px 0 100px; }
.hero-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 80px); }
.hero-reel { font-family: var(--mono); font-size: .65rem; letter-spacing: .08em; margin-bottom: 30px; }
.hero h1 { font-size: clamp(3.5rem, 7.5vw, 6rem); letter-spacing: -.045em; margin-bottom: 26px; }
.hero h1 .en { font-size: clamp(2.2rem, 4.8vw, 3.8rem); font-weight: 600; margin-top: 12px; }
.hero-meta { font-size: .82rem; line-height: 1.9; gap: 12px; margin-bottom: 28px; }
.hero-meta span { background: var(--bg-card); padding: 4px 12px; }
.hero-quote { margin-bottom: 32px; }
.hero-quote blockquote { font-size: 1rem; line-height: 1.85; padding-left: 18px; }
.hero-quote cite { font-size: .75rem; margin-top: 12px; }
.hero-actions { gap: 12px; }
.hero-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: .82rem;
}
.hero-actions .btn:hover { background: var(--accent-glow); border-color: var(--accent); }
.hero-avatar-wrap {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(24, 20, 14, .08);
}
.hero-avatar-wrap img { object-position: center 42%; }
.hero-scroll { bottom: 20px; font-size: .6rem; }
.hero-scroll .line { height: 28px; }

/* Retain every section and its order, with a more consistent reading rhythm. */
.section-gap { padding-top: 112px; }
.hero + .section-gap { padding-top: 56px; }
.sec-hd { margin-bottom: 36px; }
.sec-hd .tag { font-family: var(--mono); color: var(--accent-dim); font-size: .7rem; letter-spacing: .08em; margin-bottom: 12px; }
.sec-hd h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
.sec-hd .sub { max-width: 640px; line-height: 1.85; }
.epigraph { padding: 32px 0 36px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.epigraph .sec-hd { margin-bottom: 24px; }
.epigraph blockquote { white-space: normal; max-width: 900px; padding: 0; line-height: 1.85; text-wrap: pretty; }

/* Editorial rows retain the original numbering, badges and destinations. */
.work-item { padding: 32px 20px; border-radius: 8px; transition: background .25s, border-color .25s; }
.work-item:hover, .work-item:focus-visible { background: var(--bg-card); border-color: var(--border-light); }
.work-item .work-inner { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 24px; }
.work-item .work-num { font-family: var(--mono); font-size: .8rem; font-weight: 400; }
.work-item .work-body h3 { font-size: 1.2rem; line-height: 1.5; margin-bottom: 10px; }
.work-item .work-body p { max-width: 630px; font-size: .9rem; line-height: 1.9; }
.work-item .work-meta { opacity: 1; font-size: .72rem; }
.work-item .work-meta s { opacity: .7; }
.work-badge { font-size: .6rem; letter-spacing: .06em; background: var(--accent-glow); border-color: var(--border); margin-right: 20px; }
.work-badge.alt { background: transparent; border-color: var(--border-light); }
.work-item .work-arrow { right: 16px; opacity: .55; }
.work-item:hover .work-arrow { transform: translateY(-50%) translateX(3px); }

.moments-grid { gap: 16px; }
.moment-item, .travel-item, .cat-card { border-radius: 12px; }
.moment-item:hover, .travel-item:hover { transform: translateY(-4px); }
.moment-item .moment-overlay { opacity: 1; background: linear-gradient(to top, rgba(0, 0, 0, .65), transparent 45%); }
.moment-item .moment-overlay span { color: #fff; font-size: .75rem; letter-spacing: .02em; }
.travel-item .play-btn { background: rgba(250, 248, 242, .9); }
.cat-card .cat-info { padding: 22px 24px; }
.cat-card .cat-info p { font-size: .78rem; }
.location-label { background: rgba(250, 248, 242, .88); }
.history-box { padding: 36px; border-radius: 12px; }
.compare-col h4 { border-color: var(--border); }
.compare-col p { color: var(--text); }
.contact-link { min-height: 48px; border-radius: 8px; font-size: .8rem; overflow-wrap: anywhere; }
footer { margin-top: 100px; padding-top: 32px; }
footer p { font-size: .72rem; }

/* Collapse navigation before the labels can crowd each other on tablets. */
@media (max-width: 900px) {
  nav { z-index: 10000; backdrop-filter: none; -webkit-backdrop-filter: none; }
  nav .container { gap: 12px; }
  nav .logo { margin-right: auto; }
  .nav-toggle { display: flex; order: 3; z-index: 10001; align-items: center; }
  nav .theme-toggle { position: relative; z-index: 10001; order: 2; margin-left: 0 !important; }
  nav ul {
    position: fixed;
    inset: 0;
    margin: 0;
    padding: 88px 24px 32px;
    background: var(--bg);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s, visibility .25s;
  }
  nav ul.open { opacity: 1; visibility: visible; pointer-events: auto; }
  nav ul a { font-size: 1rem; }
}

@media (max-width: 768px) {
  .hero { min-height: auto; padding: 120px 0 56px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero-avatar-wrap { width: 176px; height: auto; aspect-ratio: 1; border-radius: 16px; }
  .hero-avatar-wrap img { object-position: center; }
  .hero-reel { margin-bottom: 22px; font-size: .6rem; }
  .hero h1 { font-size: 3.6rem; }
  .hero h1 .en { font-size: 2.5rem; margin-top: 8px; }
  .hero-scroll { display: none; }
  .section-gap { padding-top: 80px; }
  .hero + .section-gap { padding-top: 24px; }
  .work-item { padding: 28px 12px; }
  .work-item .work-inner { grid-template-columns: 28px minmax(0, 1fr); gap: 12px 16px; }
  .work-item .work-badge { grid-column: 2; justify-self: start; margin: 0; }
  .work-item .work-arrow { display: none; }
  .history-box { padding: 28px; }
}

@media (max-width: 480px) {
  .container { padding-inline: 22px; }
  .hero { padding-top: 112px; }
  .hero-avatar-wrap { width: 148px; }
  .hero-meta { gap: 10px; font-size: .76rem; }
  .hero-actions .btn { padding-inline: 20px; }
  .section-gap { padding-top: 64px; }
  .sec-hd { margin-bottom: 28px; }
  .sec-hd .sub { font-size: .88rem; }
  .epigraph blockquote { font-size: 1.15rem; }
  .work-item { padding: 26px 0; }
  .work-item .work-inner { gap: 10px 12px; }
  .work-item .work-body h3 { font-size: 1.08rem; }
  .work-item .work-body p { font-size: .85rem; }
  .moments-grid { gap: 10px; }
  .moment-item { aspect-ratio: 3 / 4; }
  .moment-item .moment-overlay { padding: 10px; }
  .moment-item .moment-overlay span { font-size: .65rem; }
  .history-box { padding: 24px 20px; }
  .location-label { left: 12px; bottom: 32px; padding: 9px 13px; }
  footer { margin-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
