:root {
  --bg: #0e0e0f;
  --bg-soft: #161618;
  --text: #ecebe8;
  --muted: #9a9892;
  --line: #2a2a2d;
  --accent: #d9b27c;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  /* 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;
  --text: #1a1a1a;
  --muted: #6b6a66;
  --line: #deddd8;
  --accent: #9a6b2f;
}

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

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;
}

/* 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: 16px var(--gutter);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  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;
}

.nav { display: flex; gap: 28px; font-size: 0.82rem; letter-spacing: 0; }
.nav a { color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--text); }

.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, .menu-btn {
  background: none; border: 1px solid var(--line); color: var(--text);
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 0.95rem;
}
.menu-btn { display: none; }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  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,.05) 60%);
}
.hero-text {
  position: relative; z-index: 2;
  padding: 0 var(--gutter) clamp(170px, 24vh, 230px);
  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.6rem, 7vw, 5rem); letter-spacing: -0.03em; margin-bottom: 16px; }
.sub { font-size: clamp(1rem, 1.6vw, 1.2rem); opacity: .88; max-width: 560px; }


/* Five separate rounded boxes, a gold highlight follows the pointer, dropdown panel opens under them */
.seg-wrap { margin-top: 28px; width: fit-content; max-width: 100%; position: relative; }
.seg { position: relative; display: flex; flex-wrap: wrap; gap: 10px; }
.glider {
  position: absolute; top: 0; left: 0; width: 0; height: 0;
  border-radius: 999px; background: var(--accent);
  opacity: 0; pointer-events: none; z-index: 0;
  transition: transform .35s cubic-bezier(.4,0,.2,1), width .35s cubic-bezier(.4,0,.2,1), height .35s cubic-bezier(.4,0,.2,1), opacity .2s;
}
.glider.no-slide { transition: opacity .2s; }
.seg-item {
  position: relative; z-index: 1;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28); border-radius: 999px;
  color: #f4f2ee; font: inherit; font-size: 0.95rem; font-weight: 500;
  padding: 10px 20px; cursor: pointer; white-space: nowrap;
  transition: color .25s;
  -webkit-tap-highlight-color: transparent;
}
.seg-item.on { color: var(--bg); }
.seg-item:focus-visible { outline: 2px solid #f4f2ee; outline-offset: 2px; }

/* the dropdown floats under the boxes so opening it never moves the page */
.dd-area { position: absolute; top: 100%; left: 0; width: 100%; margin-top: 14px; z-index: 5; }
.dd {
  display: none; position: relative;
  padding: 18px 48px 18px 22px; border-radius: 18px;
  color: #f4f2ee;
  background: rgba(14,14,15,.72);
  border: 1px solid rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.dd.open { display: block; animation: ddIn .25s ease; }
.dd::before {
  content: ""; position: absolute; top: -7px; left: calc(var(--caret-x, 40px) - 7px);
  width: 12px; height: 12px; transform: rotate(45deg);
  background: rgba(14,14,15,.72);
  border-left: 1px solid rgba(255,255,255,.18); border-top: 1px solid rgba(255,255,255,.18);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.dd::after { content: "\2192"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 1.2rem; }
.entry-no { color: var(--accent); font-size: 0.8rem; letter-spacing: .1em; }
.dd h2 { font-size: 1.25rem; margin: 6px 0 4px; }
.dd p { color: rgba(244,242,238,.72); font-size: 0.95rem; }
@keyframes ddIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Sections */
.block { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 10vw, 120px) var(--gutter) 0; }
.block-head { max-width: 640px; margin-bottom: 36px; }
.block-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); margin-bottom: 10px; }
.block-head p { color: var(--muted); }

/* Photo grid (masonry via CSS columns keeps original aspect ratios) */
.grid { columns: 3 320px; column-gap: 14px; }
.grid figure { break-inside: avoid; margin-bottom: 14px; background: var(--bg-soft); cursor: zoom-in; overflow: hidden; }
.grid img { width: 100%; height: auto; transition: transform .6s ease, opacity .3s; }
.grid figure:hover img { transform: scale(1.025); }
.grid figure:empty { display: none; }
/* About */
.about { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 6vw, 80px); align-items: center; }
.about h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); margin-bottom: 14px; }
.about p { color: var(--muted); margin-bottom: 14px; max-width: 540px; }
.portrait { background: var(--bg-soft); aspect-ratio: 4 / 5; overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }

/* Contact */
.contact { text-align: center; }
.contact .block-head { margin-left: auto; margin-right: auto; }
.contact-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; max-width: 780px; margin: 8px auto 0; }
.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); }
@media (max-width: 640px) {
  .contact-items { grid-template-columns: 1fr; gap: 18px; max-width: 340px; }
  .contact-item { flex-direction: row; justify-content: flex-start; gap: 16px; text-align: left; }
}

/* 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; }

/* Mobile */
@media (max-width: 860px) {
  .menu-btn { display: inline-block; }
  .nav {
    position: fixed; inset: 64px 0 auto 0;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    transform: translateY(-120%); transition: transform .3s ease; z-index: -1;
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 16px var(--gutter); border-top: 1px solid var(--line); }
  .about { grid-template-columns: 1fr; }
  .grid { columns: 2 150px; column-gap: 10px; }
  .grid figure { margin-bottom: 10px; }}

/* Phone layout */
@media (max-width: 640px) {
  .site-header { padding: 12px var(--gutter); gap: 12px; }
  .brand { font-size: 1rem; }
  .tools { gap: 6px; }
  .lang button { padding: 4px 8px; font-size: 0.72rem; }
  .theme-btn, .menu-btn { width: 30px; height: 30px; font-size: 0.85rem; }
  .nav { inset: 54px 0 auto 0; }
  .hero h1 { font-size: 2.3rem; }
  .sub { font-size: 1rem; }
  .hero-text { padding-bottom: 230px; }
  .seg-wrap { width: 100%; }
  .seg { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
  .seg-item { min-width: 0; padding: 11px 6px; font-size: 0.82rem; line-height: 1.25; white-space: normal; text-align: center; }
  .seg-item:nth-of-type(-n+3) { grid-column: span 2; }
  .seg-item:nth-of-type(n+4) { grid-column: span 3; }
  .dd::before { display: none; }
  .dd { padding: 16px 44px 16px 18px; }
  .block { padding-top: 64px; }
  .block-head { margin-bottom: 24px; }
  .portrait { max-width: 360px; }
}
@media (max-width: 520px) {
  .grid { columns: 1; }
  .grid figure { margin-bottom: 12px; }
}

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