/* sebachandra.com — shared styles
   Palette: royal blue, cream, gold. Dark only. English at /, Chinese at /zh/. */

:root {
  --royal: #1D3C8F;
  --royal-deep: #132A66;
  --navy: #0F1E4A;
  --cream: #F6F0E4;
  --ivory: #FBF8F1;

  /* dark (default) */
  --bg: var(--navy);
  --ink: var(--cream);
  --muted: rgba(246, 240, 228, 0.84);
  --line: rgba(246, 240, 228, 0.18);
  --ring: rgba(246, 240, 228, 0.35);
  --gold: #D4B46A;          /* decoration */
  --gold-ink: #D4B46A;      /* gold text */
  --btn-bg: var(--cream);
  --btn-ink: var(--royal);
  --ghost-bg: rgba(15, 30, 74, 0.35);
  --ghost-line: rgba(246, 240, 228, 0.7);
  --placeholder: rgba(246, 240, 228, 0.08);

  --font: 'Inter Tight', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --pad: clamp(20px, 4vw, 56px);
  color-scheme: dark;
}

/* Chinese: tight negative tracking crowds hanzi, so relax it */
:lang(zh) .home h1, :lang(zh) .statement, :lang(zh) .big, :lang(zh) .soon { letter-spacing: 0; }
:lang(zh) .statement { line-height: 1.3; }
/* hanzi are wider and heavier than Latin letters, so the Chinese hero runs smaller and fits one line on a phone */
:lang(zh) .home h1 { font-size: clamp(42px, 6.6vw, 104px); line-height: 1.1; }
:lang(zh) .quote blockquote { font-style: normal; }
:lang(zh) .row dt, :lang(zh) .label { letter-spacing: .2em; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--btn-bg); color: var(--btn-ink); padding: 10px 16px; border-radius: 999px; }

.dot { color: var(--gold); }

/* ---------- page shell (About, Project, Blog, 404) ---------- */
.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--pad);
}

/* ---------- nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  padding: 24px 0;
  position: relative;
  z-index: 2;
}
.logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-decoration: none;
  padding: 10px 0;
}
.nav-right { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 36px); }
.links { display: flex; gap: clamp(16px, 2.6vw, 36px); list-style: none; margin: 0; padding: 0; }
.links a {
  display: inline-block;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
}
.links a:hover, .links a[aria-current="page"] { border-bottom-color: var(--gold); }

/* language switch: EN | 中文 pill */
.lang {
  display: inline-flex; align-items: center; gap: 2px;
  height: 44px; padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--ring);
}
.lang a {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; min-width: 44px; padding: 0 12px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: .02em;
  text-decoration: none;
  color: var(--muted);
  transition: color .2s ease, background-color .2s ease;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current] { background: var(--cream); color: var(--royal); }

/* ---------- buttons ---------- */
.btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; min-width: 128px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 15px; font-weight: 500;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .22); }
.btn-solid { background: var(--btn-bg); color: var(--btn-ink); }
.btn-ghost {
  background: var(--ghost-bg);
  color: var(--ink);
  border: 1.5px solid var(--ghost-line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* ---------- socials ---------- */
.socials { display: flex; gap: 12px; list-style: none; margin: 0; padding: 0; justify-content: center; }
.soc {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--ring);
  transition: transform .2s ease, border-color .2s ease;
}
.soc:hover { transform: translateY(-2px); border-color: var(--gold); }
.site-footer { display: flex; justify-content: center; padding: 8px 0 clamp(24px, 5vh, 48px); }

/* ---------- home hero ---------- */
.home { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: var(--navy); }
.home picture, .home .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.home .hero-img { object-fit: cover; object-position: 50% 70%; }
.home .shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(15,30,74,.6) 0%, rgba(15,30,74,.15) 60%, rgba(15,30,74,.15) 100%); }
.home .layer { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; padding: 0 var(--pad); color: var(--cream); }
.home .copy { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; margin-top: clamp(8px, 4vh, 48px); }
.home h1 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(56px, 9.5vw, 144px);
  line-height: .95;
  letter-spacing: -0.05em;
  text-shadow: 0 2px 24px rgba(10, 20, 50, .35);
}
.home .btn-solid { background: var(--cream); color: var(--royal); }
.home .btn-ghost { color: inherit; }
.home .site-footer { margin-top: auto; padding-bottom: clamp(20px, 4vh, 36px); }
.home .soc { background: rgba(15,30,74,.38); border-color: rgba(246,240,228,.35);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.home .lang { background: rgba(15,30,74,.38); border-color: rgba(246,240,228,.35);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.home .lang a { color: rgba(246,240,228,.84); }
.home .lang a:hover { color: var(--cream); }
.home .lang a[aria-current] { color: var(--royal); }

/* ---------- about ---------- */
.main { flex: 1 1 auto; width: 100%; max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; gap: clamp(40px, 7vh, 72px); padding: clamp(32px, 6vh, 64px) 0; }
.statement { margin: 0; font-weight: 600; font-size: clamp(30px, 4.2vw, 60px); line-height: 1.12; letter-spacing: -0.035em; max-width: 20em; }
.statement a { color: var(--gold-ink); text-decoration: none; border-bottom: 1.5px solid var(--gold); }
.facts { margin: 0; border-bottom: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; align-items: baseline; padding: 20px 0; border-top: 1px solid var(--line); }
.row dt { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.row dd { margin: 0; font-size: clamp(19px, 1.6vw, 24px); font-weight: 500; line-height: 1.4; }
.row dd a { text-decoration: none; border-bottom: 1.5px solid var(--gold); }

/* ---------- project ---------- */
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: clamp(40px, 8vh, 88px) 0 clamp(48px, 8vh, 96px); }
.big { margin: 0 0 20px; font-weight: 600; font-size: clamp(40px, 5.4vw, 76px); line-height: 1; letter-spacing: -0.045em; }
.quote { margin: 0 0 clamp(32px, 6vh, 56px); max-width: 40em; }
.quote blockquote { margin: 0; font-size: clamp(18px, 1.5vw, 21px); font-style: italic; line-height: 1.5; color: var(--muted); }
.quote figcaption { margin-top: 8px; font-size: 14px; letter-spacing: .08em; color: var(--gold-ink); }
.list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.item { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; padding: 40px 0; border-top: 1px solid var(--line); }
.squircle { width: 280px; height: 280px; border-radius: 36%; object-fit: cover; overflow: hidden; }
@supports (corner-shape: squircle) { .squircle { corner-shape: squircle; border-radius: 50%; } }
.squircle.empty { display: flex; align-items: center; justify-content: center; background: var(--placeholder); border: 1.5px dashed var(--ring); color: var(--muted); }
.text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.year { font-size: 15px; font-weight: 600; letter-spacing: .08em; color: var(--gold-ink); }
/* one section per category */
.group + .group { margin-top: clamp(56px, 9vh, 96px); }
.cat { margin: 0 0 12px; font-size: clamp(28px, 3vw, 40px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
:lang(zh) .cat { letter-spacing: .02em; }
.item h3 { margin: 0; font-size: clamp(22px, 2vw, 28px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.item p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 40em; }
.more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 15px; font-weight: 500; text-decoration: none; align-self: flex-start; }
.more::after { content: "→"; color: var(--gold); }
.more:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
/* film player: "Watch the film" toggle opens an inline video in the text column (no JS) */
.film { align-self: stretch; margin-top: 6px; }
.film summary {
  width: fit-content;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1.5px solid var(--ghost-line);
  font-size: 15px; font-weight: 500;
  cursor: pointer; list-style: none;
}
.film summary::-webkit-details-marker { display: none; }
.film summary::before { content: "▶"; font-size: 11px; color: var(--gold); }
.film[open] summary::before { content: "■"; }
.film summary:hover { border-color: var(--gold); }
.film video { display: block; width: 100%; height: auto; margin-top: 20px; aspect-ratio: 16 / 9; border-radius: 20px; background: #000; }
.film video::cue { font-family: var(--font); background: rgba(0, 0, 0, .6); }
.credit { font-size: 13px; color: var(--muted); }
.credit a { color: inherit; }

/* ---------- blog / 404 ---------- */
.label { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.soon { margin: 0; font-weight: 600; font-size: clamp(48px, 7vw, 104px); line-height: 1; letter-spacing: -0.045em; }
.sub { margin: 0; font-size: clamp(19px, 1.6vw, 24px); line-height: 1.5; color: var(--muted); }

/* ---------- phone ---------- */
@media (max-width: 720px) {
  .nav { justify-content: center; padding: 16px 0 4px; }
  .nav-right { flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
  .links { gap: 22px; }
  .home .hero-img { object-position: 26% 50%; }
  .home .copy { gap: 20px; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 16px 0; }
  .item { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 28px 0; }
  .squircle { width: 120px; height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
