:root {
  --bg: #0e0e0f;
  --bg-soft: #161618;
  --panel: #161618;
  --text: #ecebe8;
  --muted: #9a9892;
  --line: #2a2a2d;
  --accent: #d9b27c;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --hl: color-mix(in srgb, var(--text) 9%, transparent);
  /* Apple-style system font stack. SF Pro on Mac/iPhone/iPad, close system equivalents elsewhere. */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

:root[data-theme="light"] {
  --bg: #fafaf8;
  --bg-soft: #f0efec;
  --panel: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6a66;
  --line: #deddd8;
  --accent: #9a6b2f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2 {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.1;
}

.entry-no { color: var(--accent); font-size: 0.8rem; letter-spacing: .1em; }

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font);
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  font-weight: 600;
  white-space: nowrap;
}

.tools { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button {
  background: none; border: 0; color: var(--muted);
  font: inherit; font-size: 0.75rem; padding: 5px 11px; cursor: pointer;
}
.lang button.active { background: var(--text); color: var(--bg); }
.theme-btn {
  background: none; border: 1px solid var(--line); color: var(--text);
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 0.95rem;
}

/* Dropdown menu, collapsed until hovered (mouse) or tapped (touch) */
.dd-menu { position: relative; }
.dd-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--text);
  border: 1px solid var(--line); border-radius: 999px;
  font: inherit; font-size: 0.85rem; font-weight: 500;
  padding: 6px 14px; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.dd-trigger:hover, .dd-menu.open .dd-trigger { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.dd-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chev {
  width: 7px; height: 7px; margin-top: -3px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg); transition: transform .25s, margin .25s;
}
.dd-menu.open .chev { transform: rotate(-135deg); margin-top: 3px; }

.dd-panel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  width: min(400px, calc(100vw - 2 * var(--gutter)));
  display: none; flex-direction: column; gap: 2px;
  padding: 8px 8px 84px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(0,0,0,.35);
}
/* invisible bridge so the panel does not close while the mouse crosses the small gap */
.dd-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.dd-menu.open .dd-panel { display: flex; animation: ddIn .22s ease; }
@keyframes ddIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.dd-item {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start;
  padding: 10px 14px; border-radius: 12px; transition: background .2s;
}
.dd-item:hover, .dd-item:focus-visible { background: var(--hl); outline: none; }
.dd-item .entry-no { padding-top: 2px; }
.dd-text strong { display: block; font-weight: 600; font-size: 0.98rem; letter-spacing: -0.01em; }
.dd-text small {
  position: absolute; left: 22px; right: 22px; bottom: 14px; height: 52px; overflow: hidden;
  color: var(--muted); font-size: 0.84rem; line-height: 1.5;
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
.dd-panel::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 74px; border-top: 1px solid var(--line); }
.dd-item:hover small, .dd-item:focus-visible small { opacity: 1; }
/* nothing hovered yet: preview the current page, otherwise the first item */
.dd-panel:not(:has(.dd-item:hover, .dd-item:focus-visible)) .dd-item[aria-current="page"] small,
.dd-panel:not(:has([aria-current="page"])):not(:has(.dd-item:hover, .dd-item:focus-visible)) .dd-item:first-child small { opacity: 1; }
.dd-panel:not(:has(.dd-item:hover, .dd-item:focus-visible)) .dd-item[aria-current="page"],
.dd-panel:not(:has([aria-current="page"])):not(:has(.dd-item:hover, .dd-item:focus-visible)) .dd-item:first-child { background: var(--hl); }
/* touch screens have no hover, so the panel is just the list of titles */
@media (hover: none) {
  .dd-text small, .dd-panel::after { display: none; }
  .dd-panel { padding-bottom: 8px; }
}
.dd-arrow { align-self: center; color: var(--accent); opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s; }
.dd-item:hover .dd-arrow, .dd-item:focus-visible .dd-arrow { opacity: 1; transform: none; }
.dd-item[aria-current="page"] strong { color: var(--accent); }

/* Home hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-start;
  background: var(--bg-soft);
}
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.2) 70%);
}
.hero-text {
  position: relative; z-index: 2;
  padding: calc(60px + 3.5vh) var(--gutter) 120px;
  max-width: 820px;
  color: #f4f2ee;
}
.eyebrow { font-size: 0.95rem; font-weight: 600; letter-spacing: 0; color: var(--accent); margin-bottom: 12px; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); letter-spacing: -0.03em; margin-bottom: 16px; }
.sub { font-size: clamp(1rem, 1.6vw, 1.2rem); opacity: .88; max-width: 560px; }

.hero-menu { margin-top: 28px; width: fit-content; max-width: 100%; --panel: rgba(14,14,15,.82); --hl: rgba(255,255,255,.1); color: #f4f2ee; }
.hero-menu .dd-trigger {
  font-size: 1rem; padding: 12px 26px;
  background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.35); color: #f4f2ee;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.hero-menu .dd-trigger:hover, .hero-menu.open .dd-trigger { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.hero-menu .dd-panel {
  left: 0; right: auto; top: calc(100% + 12px);
  border-color: rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.hero-menu .dd-text small { color: rgba(244,242,238,.68); }
.hero-menu .dd-panel::after { border-top-color: rgba(255,255,255,.18); }

.home .site-footer { margin-top: 0; }

/* Sub pages */
.page-head, .about-wrap { max-width: var(--max); margin: 0 auto; padding: 128px var(--gutter) 0; }
.page-head h1, .about-wrap h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); letter-spacing: -0.03em; margin: 6px 0 14px; }
.lead { color: var(--muted); max-width: 56ch; font-size: clamp(1rem, 1.5vw, 1.15rem); margin-bottom: 14px; }
.page-head.center { text-align: center; }
.page-head.center .lead { margin-left: auto; margin-right: auto; }

/* Photo layout: 10 slots that repeat. Sizes, ratios and drops look random, but the rhythm is fixed:
   wide + tall / three staggered / tall + wide / three staggered, mirrored left and right. */
.scatter {
  max-width: var(--max); margin: clamp(40px, 6vw, 72px) auto 0; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(10px, 1.8vw, 24px); row-gap: clamp(16px, 2.4vw, 32px);
  align-items: start;
}
.scatter figure {
  margin: 0; margin-top: calc(var(--o, 0) * 1vw);
  aspect-ratio: var(--r, 4 / 5);
  background: var(--bg-soft); overflow: hidden; cursor: zoom-in;
}
.scatter figure:empty { display: none; }
.scatter img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.scatter figure:hover img { transform: scale(1.03); }

.scatter figure:nth-child(10n+1)  { grid-column: 1 / span 7;  --r: 3 / 2; --o: 0; }
.scatter figure:nth-child(10n+2)  { grid-column: 9 / span 4;  --r: 3 / 4; --o: 5; }
.scatter figure:nth-child(10n+3)  { grid-column: 1 / span 4;  --r: 4 / 5; --o: 0; }
.scatter figure:nth-child(10n+4)  { grid-column: 5 / span 4;  --r: 1 / 1; --o: 6; }
.scatter figure:nth-child(10n+5)  { grid-column: 9 / span 4;  --r: 2 / 3; --o: 2; }
.scatter figure:nth-child(10n+6)  { grid-column: 1 / span 4;  --r: 3 / 4; --o: 3; }
.scatter figure:nth-child(10n+7)  { grid-column: 6 / span 7;  --r: 3 / 2; --o: 0; }
.scatter figure:nth-child(10n+8)  { grid-column: 1 / span 4;  --r: 2 / 3; --o: 4; }
.scatter figure:nth-child(10n+9)  { grid-column: 5 / span 4;  --r: 4 / 5; --o: 0; }
.scatter figure:nth-child(10n+10) { grid-column: 9 / span 4;  --r: 1 / 1; --o: 7; }

/* About */
.about-wrap { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 6vw, 80px); align-items: center; }
.portrait { background: var(--bg-soft); aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden; width: 100%; max-width: 420px; justify-self: center; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }

/* Contact */
.contact-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; max-width: 780px; margin: 36px auto 0; text-align: center; }
.contact-item { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.icon-link {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--bg);
  transition: transform .2s, opacity .2s;
}
.contact-item:hover .icon-link { transform: translateY(-2px); opacity: .9; }
.icon-link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-text { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.1rem; overflow-wrap: anywhere; transition: color .2s; }
.contact-item:hover .contact-text { color: var(--accent); }

/* Footer */
.site-footer { margin-top: clamp(72px, 10vw, 140px); padding: 28px var(--gutter); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; text-align: center; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.94);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Tablet */
@media (max-width: 860px) {
  .about-wrap { grid-template-columns: 1fr; }
}

/* Phone */
@media (max-width: 640px) {
  .site-header { padding: 10px var(--gutter); gap: 8px; }
  .brand { font-size: 0.95rem; }
  .tools { gap: 6px; }
  .lang button { padding: 4px 7px; font-size: 0.72rem; }
  .theme-btn { width: 30px; height: 30px; font-size: 0.85rem; }
  .dd-trigger { padding: 5px 11px; font-size: 0.8rem; gap: 6px; }
  /* header menu spans the screen width on phones */
  .nav-menu { position: static; }
  .nav-menu .dd-panel { top: 100%; left: var(--gutter); right: var(--gutter); width: auto; margin-top: 8px; }

  .hero h1 { font-size: 2.3rem; }
  .hero-text { padding-bottom: 120px; }
  .page-head, .about-wrap { padding-top: 100px; }
  .portrait { max-width: 300px; margin: 0 auto; }

  .contact-items { grid-template-columns: 1fr; gap: 18px; max-width: 340px; text-align: left; }
  .contact-item { flex-direction: row; justify-content: flex-start; gap: 16px; }

  /* phone rhythm: full / half + half (second one dropped) / full / half + half / full / half + half / full */
  .scatter { grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 10px; row-gap: 10px; }
  .scatter figure:nth-child(10n+1)  { grid-column: 1 / -1;     --r: 4 / 3; --o: 0; }
  .scatter figure:nth-child(10n+2)  { grid-column: 1 / span 3; --r: 3 / 4; --o: 0; }
  .scatter figure:nth-child(10n+3)  { grid-column: 4 / span 3; --r: 3 / 4; --o: 9; }
  .scatter figure:nth-child(10n+4)  { grid-column: 1 / -1;     --r: 3 / 2; --o: 0; }
  .scatter figure:nth-child(10n+5)  { grid-column: 1 / span 3; --r: 1 / 1; --o: 7; }
  .scatter figure:nth-child(10n+6)  { grid-column: 4 / span 3; --r: 4 / 5; --o: 0; }
  .scatter figure:nth-child(10n+7)  { grid-column: 1 / -1;     --r: 4 / 3; --o: 0; }
  .scatter figure:nth-child(10n+8)  { grid-column: 1 / span 3; --r: 2 / 3; --o: 0; }
  .scatter figure:nth-child(10n+9)  { grid-column: 4 / span 3; --r: 3 / 4; --o: 9; }
  .scatter figure:nth-child(10n+10) { grid-column: 1 / -1;     --r: 3 / 2; --o: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* single main page: only the active view is shown */
.view { display: none; }
.view.active { display: block; }

/* ---- header: uppercase brand, home icon, icon-only menu ---- */
.brand-wrap { display: flex; align-items: center; gap: 12px; }
.brand { text-transform: uppercase; letter-spacing: .08em; font-size: 0.95rem; font-weight: 700; }
.home-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); color: var(--text); transition: background .2s, color .2s, border-color .2s; }
.home-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.burger-btn { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 50%; }
.burger { display: flex; flex-direction: column; gap: 4px; width: 16px; }
.burger i { display: block; height: 1.6px; background: currentColor; border-radius: 2px; transition: transform .25s, opacity .2s; }
.dd-menu.open .burger i:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.dd-menu.open .burger i:nth-child(2) { opacity: 0; }
.dd-menu.open .burger i:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

/* ---- photos are never cropped: natural proportions ---- */
.scatter figure { aspect-ratio: auto; overflow: visible; }
.scatter img { height: auto; display: block; object-fit: contain; }
.scatter figure:hover img { transform: none; opacity: .92; transition: opacity .3s; }

/* ---- home: content under the hero ---- */
.hero { min-height: 88svh; }
.home-block { padding: clamp(56px, 9vw, 110px) 0; }
.home-block.alt { background: var(--bg-soft); }
.home-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.home-inner .eyebrow { margin-bottom: 26px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); align-items: start; }
.card { display: block; color: inherit; }
.card img { width: 100%; height: auto; display: block; margin-bottom: 16px; background: var(--bg-soft); }
.card-no { display: block; color: var(--accent); font-size: 0.8rem; letter-spacing: .1em; margin-bottom: 4px; }
.card h3 { font-size: 1.35rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 12px; }
.card-go { color: var(--accent); font-size: 0.9rem; font-weight: 500; }
.card:hover h3 { color: var(--accent); }
.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 56px); }
.points h3 { font-size: 1.15rem; margin-bottom: 8px; letter-spacing: -0.01em; }
.points p { color: var(--muted); font-size: 0.98rem; }
.about-teaser .big { font-size: clamp(1.4rem, 3vw, 2.2rem); line-height: 1.35; letter-spacing: -0.02em; max-width: 26ch; margin-bottom: 22px; }
.text-link { color: var(--accent); font-weight: 500; }
.text-link:hover { text-decoration: underline; }
.home-block.cta { text-align: center; border-top: 1px solid var(--line); }
.home-block.cta h2 { font-size: clamp(1.8rem, 4.5vw, 3rem); letter-spacing: -0.03em; margin-bottom: 14px; }
.home-block.cta .lead { margin: 0 auto 28px; }
.btn { display: inline-block; padding: 12px 28px; border-radius: 999px; background: var(--accent); color: var(--bg); font-weight: 600; transition: opacity .2s; }
.btn:hover { opacity: .88; }
@media (max-width: 860px) {
  .cards, .points { grid-template-columns: 1fr; }
  .cards { max-width: 480px; }
}
@media (max-width: 640px) {
  .brand { font-size: 0.78rem; letter-spacing: .05em; }
  .brand-wrap { gap: 8px; }
  .home-btn { width: 28px; height: 28px; }
  .home-btn svg { width: 15px; height: 15px; }
  .burger-btn { width: 30px; height: 30px; padding: 0; }
}

/* alignment + phone hero height */
.nav-menu { display: flex; align-items: center; }
@media (max-width: 640px) { .hero { min-height: 68svh; } }

/* icons instead of numbers */
.ic { width: 100%; height: 100%; display: block; }
.entry-ic, .card-ic { display: block; color: var(--accent); }
.dd-item .entry-ic { width: 20px; height: 20px; margin-top: 2px; }
.page-head .entry-ic, .about-wrap .entry-ic { width: 30px; height: 30px; margin: 0 0 4px; }
.page-head.center .entry-ic { margin-left: auto; margin-right: auto; }
.card-ic { width: 26px; height: 26px; margin-bottom: 8px; }

/* no numbering; lighter menu type */
.dd-item { grid-template-columns: 26px 1fr auto; }
.dd-text strong { font-weight: 400; font-size: 1rem; letter-spacing: 0; }
.dd-item[aria-current="page"] strong { font-weight: 500; }

/* ---- dropdown: text only, right aligned, ultra-light ---- */
.dd-item { display: block; text-align: right; padding: 11px 18px; }
.dd-item .dd-text strong { font-weight: 200; font-size: 1.05rem; letter-spacing: .01em; }
.dd-text small { text-align: right; font-weight: 200; }
.dd-item[aria-current="page"] strong { font-weight: 300; }
.dd-panel { font-weight: 200; }
.card-go, .text-link { font-weight: 300; }

.entry-ic, .card-ic { display: none !important; }

/* ---- text-only, left-aligned menu with extra-light type ---- */
.dd-item { grid-template-columns: 1fr; padding: 11px 16px; text-align: left; justify-items: start; }
.dd-text { text-align: left; }
.dd-text strong { font-weight: 200; font-size: 1.05rem; letter-spacing: .01em; }
.dd-item[aria-current="page"] strong { font-weight: 300; }
.dd-text small { left: 24px; }
.card-go, .text-link { }
.dd-panel, .dd-text, .dd-text small { text-align: left; }

/* ---- white photo frame on every picture ---- */
.scatter figure { background: #fff; padding: 4.5%; }
.scatter img { background: #fff; }
.card img { background: #fff; padding: 4.5%; box-sizing: border-box; }
.lightbox img { background: #fff; padding: 14px; box-sizing: border-box; }
