/* Main page foundation, hero, sections, and shared story styles. */

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

:root {
  --bg: #fafaf8;
  --fg: #111;
  --c1: #ff4d4d; /* red */
  --c2: #0066ff; /* blue */
  --c3: #ffb800; /* yellow */
  --c4: #00c853; /* green */
  --c5: #9c27b0; /* purple */
  --c6: #ff6d00; /* orange */
  --line: #e0dcd5;
  --muted: #999;
}

body {
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

.progress { position: fixed; top: 0; left: 0; height: 2px; z-index: 999; width: 0; will-change: width; }

nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 0 48px;
  background: rgba(250,250,248,0.88); backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--fg);
  transition: transform .3s ease;
}
nav.hidden { transform: translateY(-100%); }
nav .inner {
  max-width: 1200px; margin: 0 auto; display: flex; align-items: center;
  justify-content: space-between; height: 56px;
}
nav .logo { font-family: 'Lora', 'Inter', 'Noto Serif SC', serif; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; text-decoration: none; color: var(--fg); flex-shrink: 0; }
nav .links { display: flex; gap: 32px; min-width: 0; }
nav .links a {
  font-family: 'Lora', 'Inter', 'Noto Serif SC', serif;
  font-size: 13px; color: #666; text-decoration: none; letter-spacing: 0.04em;
  font-weight: 600; transition: color .2s; position: relative;
}
nav .links a:hover, nav .links a.active { color: var(--fg); }
nav .links a::after {
  content: ''; position: absolute; bottom: -6px; left: 0; width: 100%; height: 2px;
  background: var(--fg); transform: scaleX(0); transition: transform .25s;
}
nav .links a.active::after { transform: scaleX(1); }
nav .theme-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: none;
  font-size: 16px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background .2s, border-color .2s;
  padding: 0; line-height: 1; color: inherit;
  flex-shrink: 0;
}
nav .theme-btn:hover { background: var(--line); }
html.dark .theme-btn { border-color: #666; color: #ffd43b; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 48px; position: relative; z-index: 1; }

/* Hero */
.hero {
  height: 100vh; height: 100dvh;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px;
  margin: 0 -48px; padding: 0 48px;
}
.hero h1 {
  font-family: 'Lora', 'Inter', sans-serif;
  font-size: clamp(56px, 8vw, 112px); font-weight: 900;
  line-height: 0.95;
}
.hero h1 mark {
  background: var(--c3); color: var(--fg); padding: 0 8px;
}
.hero .meta {
  display: flex; flex-wrap: wrap; gap: 40px; margin-top: 36px; padding-top: 0;
}
.hero .meta span { font-family: 'Lora', 'Inter', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; }
.cover-img { width: 100%; height: 100%; object-fit: cover; }
.portrait {
  width: 260px; height: 260px; border-radius: 50%; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  user-select: none; position: relative; overflow: hidden;
}
.portrait::after {
  content: ''; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid var(--line);
}

/* Sections */
section { padding: 120px 0; position: relative; }
section[id] { border-bottom: 1px solid var(--line); }
section[id]:last-of-type { border-bottom: none; }
#about { padding: 60px 0 20px; }
.about-text { font-family: 'Lora', 'Inter', 'Noto Serif SC', serif; font-size: 17px; line-height: 2; color: var(--muted); max-width: 600px; }
.about-para { display: block; }
.about-para + .about-para { margin-top: 0.8em; }
.about-lead { font-weight: 700; color: var(--fg); font-size: 18px; }
#work  { padding: 140px 0 120px; }
#photos { padding: 100px 0; }
.photo-stories { display: flex; gap: 22px; overflow-x: auto; padding: 2px 0 28px; margin: -10px 0 14px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.photo-stories::-webkit-scrollbar { height: 4px; }
.photo-stories::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.story-card {
  flex: 0 0 224px;
  cursor: pointer;
  text-align: left;
  border: 0;
  border-radius: 0;
  padding: 0 0 13px;
  background: transparent;
  color: var(--fg);
  transition: transform .18s ease, opacity .18s ease, filter .18s ease;
  scroll-snap-align: start;
  font: inherit;
  position: relative;
  opacity: .74;
}
.story-card::after {
  content: '';
  position: absolute;
  left: 0;
  right: 68%;
  bottom: 0;
  height: 1px;
  background: transparent;
  transition: background .18s ease, right .18s ease;
}
.story-card:hover { transform: translateY(-2px); opacity: 1; }
.story-card.active { opacity: 1; }
.story-card.active::after { right: 0; background: var(--fg); }
.story-cover {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: var(--line);
  aspect-ratio: 16 / 10;
}
.story-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 42%, rgba(0,0,0,.32) 100%);
  opacity: .72;
  pointer-events: none;
}
.story-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(.9) contrast(.98);
  transition: transform .22s ease, opacity .22s ease, filter .22s ease;
}
.story-card:hover img, .story-card.active img { transform: scale(1.025); filter: saturate(1.02) contrast(1.02); }
.story-count {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.44);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  z-index: 1;
}
.story-info { padding: 11px 0 0; }
.story-name {
  font-family: 'Lora', 'Inter', 'Noto Serif SC', serif;
  font-size: 16px;
  font-weight: 700;
  display: block;
  letter-spacing: 0;
}
.story-caption {
  font-family: 'Lora', 'Inter', 'Noto Serif SC', serif;
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  margin-top: 6px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-meta { font-size: 11px; color: var(--muted); display: block; margin-top: 7px; font-family: 'Lora', 'Inter', 'Noto Serif SC', serif; }
.story-loc { font-size: 11px; color: var(--muted); display: block; }
.photo-story-note {
  align-items: baseline;
  gap: 10px;
  margin: -2px 0 18px;
  padding-left: 14px;
  border-left: 1px solid var(--fg);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.photo-story-note strong {
  color: var(--fg);
  font-family: 'Lora', 'Inter', 'Noto Serif SC', serif;
  font-size: 15px;
}
.photo-story-note span {
  font-family: 'Lora', 'Inter', 'Noto Serif SC', serif;
}
.photo-story-note em {
  font-style: normal;
  font-family: 'Lora', 'Inter', 'Noto Serif SC', serif;
  font-size: 11px;
  white-space: nowrap;
}
.story-note-kicker {
  color: var(--fg);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.photo-story-note button {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
}
.photo-story-note button:hover { color: var(--fg); }
.photo-empty {
  display: block;
  width: 100%;
  break-inside: avoid;
  padding: 42px 0;
  color: var(--muted);
  font-family: 'Lora', 'Inter', 'Noto Serif SC', serif;
  font-size: 13px;
  text-align: center;
}
#music { padding: 160px 0 120px; }
#essays { padding: 100px 0 120px; }
#contact { padding: 100px 0 120px; }
.section-tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: 'Lora', 'Inter', 'Noto Serif SC', serif;
  border-left: 2px solid; padding-left: 10px; margin-bottom: 48px;
}
.section-tag.red { color: var(--c1); border-color: var(--c1); }
.section-tag.blue { color: var(--c2); border-color: var(--c2); }
.section-tag.green { color: var(--c4); border-color: var(--c4); }
.section-tag.yellow { color: var(--c3); border-color: var(--c3); }
.section-tag.purple { color: var(--c5); border-color: var(--c5); }
.section-tag.orange { color: var(--c6); border-color: var(--c6); }
.section-note {
  font-family: 'Lora', 'Inter', 'Noto Serif SC', serif;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 560px;
  margin: -28px 0 28px;
}
