/* ==========================================================
   Chin Kha Yi — Industrial Training Portfolio
   ========================================================== */

:root {
  --bg: #F6F4EF;
  --bg-alt: #EFECE4;
  --surface: #FFFFFF;
  --surface-2: #FBFAF7;
  --ink: #121826;
  --ink-2: #394150;
  --muted: #6A7180;
  --line: #E4DFD4;
  --line-2: #D5CFC2;
  --brand: #1F4FA3;
  --brand-ink: #FFFFFF;
  --brand-soft: #E2EAF8;
  --accent: #E26D3D;
  --accent-soft: #FBE8DE;
  --holiday: #E8A33C;
  --leave: #8A63E8;
  --weekend: #DCD6C9;
  --work: #3D6CC4;
  --mark: #FFE38A;
  --shadow-sm: 0 1px 2px rgba(18, 24, 38, .06);
  --shadow: 0 1px 2px rgba(18, 24, 38, .05), 0 10px 30px -12px rgba(18, 24, 38, .16);
  --shadow-lg: 0 30px 80px -20px rgba(18, 24, 38, .35);
  --radius: 20px;
  --radius-sm: 12px;
  --serif: 'Instrument Serif', 'Times New Roman', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --nav-h: 68px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1019;
    --bg-alt: #0F1522;
    --surface: #141B29;
    --surface-2: #111826;
    --ink: #ECEFF5;
    --ink-2: #C3CAD7;
    --muted: #8C95A6;
    --line: #222B3B;
    --line-2: #2E3849;
    --brand: #82A8FF;
    --brand-ink: #0B1019;
    --brand-soft: #18243D;
    --accent: #F28C5E;
    --accent-soft: #3A2318;
    --holiday: #E9AE4F;
    --leave: #A88BFF;
    --weekend: #263043;
    --work: #5D8BE8;
    --mark: #6B5A16;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 32px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .75);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1019;
  --bg-alt: #0F1522;
  --surface: #141B29;
  --surface-2: #111826;
  --ink: #ECEFF5;
  --ink-2: #C3CAD7;
  --muted: #8C95A6;
  --line: #222B3B;
  --line-2: #2E3849;
  --brand: #82A8FF;
  --brand-ink: #0B1019;
  --brand-soft: #18243D;
  --accent: #F28C5E;
  --accent-soft: #3A2318;
  --holiday: #E9AE4F;
  --leave: #A88BFF;
  --weekend: #263043;
  --work: #5D8BE8;
  --mark: #6B5A16;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 32px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono { font-family: var(--mono); }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--brand); color: var(--brand-ink); }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 12px; }

/* ---------- progress ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--brand), var(--accent)); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background-color .3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { width: min(1180px, 100% - 32px); margin-inline: auto; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--ink); color: var(--bg); font: 500 15px/1 var(--mono); letter-spacing: -.02em;
}
.brand__name { font: 600 15px/1 var(--sans); letter-spacing: -.01em; }
.nav__links { display: flex; gap: 4px; }
.nav__links a {
  position: relative; text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  padding: 8px 14px; border-radius: 999px; transition: color .2s, background-color .2s;
}
.nav__links a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.nav__links a.is-active { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.nav__tools { display: flex; gap: 6px; align-items: center; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  display: inline-grid; place-items: center; cursor: pointer; transition: transform .15s, background-color .2s, border-color .2s;
}
.icon-btn:hover { border-color: var(--line-2); }
.icon-btn:active { transform: scale(.94); }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}
.menu-btn { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s, border-color .2s, color .2s;
}
.btn svg { width: 18px; height: 18px; transition: transform .2s ease; }
.btn--primary { background: var(--ink); color: var(--bg); box-shadow: 0 8px 24px -10px color-mix(in srgb, var(--ink) 60%, transparent); }
.btn--primary:hover { transform: translateY(-2px); }
.btn--primary:hover svg { transform: translateX(3px); }
.btn--ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--ghost:disabled { opacity: .4; cursor: default; border-color: var(--line-2); }
.btn--sm { height: 38px; padding: 0 14px; font-size: 13.5px; }
.link-btn { background: none; border: 0; padding: 6px 2px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.link-btn:hover { color: var(--ink); text-decoration-color: currentColor; }
.text-link { display: inline-block; background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--brand); text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 48px 0 0; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 420px at 85% 10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
    radial-gradient(520px 380px at 8% 85%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 36px;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
  opacity: .9;
}
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font: 500 12.5px/1.2 var(--mono); color: var(--ink-2); letter-spacing: .01em;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #2FB36B; box-shadow: 0 0 0 4px color-mix(in srgb, #2FB36B 22%, transparent); }
.hero__title {
  margin: 22px 0 18px; font-family: var(--serif); font-size: clamp(64px, 10.5vw, 138px); line-height: .88; letter-spacing: -.035em;
}
.hero__title em { font-style: italic; color: var(--brand); padding-right: .06em; }
.hero__lead { max-width: 560px; font-size: clamp(16px, 1.6vw, 18.5px); color: var(--ink-2); line-height: 1.65; }
.hero__lead strong { color: var(--ink); font-weight: 600; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.journey { margin-top: 36px; max-width: 520px; }
.journey__labels, .journey__months { display: flex; justify-content: space-between; font: 500 12px/1 var(--mono); color: var(--muted); }
.journey__done { color: #2FA866; }
.journey__track { position: relative; height: 8px; margin: 10px 0; border-radius: 999px; background: var(--line); }
.journey__fill { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--accent)); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.6s cubic-bezier(.2, .7, .2, 1) .3s; }
.journey.in .journey__fill { transform: scaleX(1); }
.journey__track i { position: absolute; top: 50%; left: calc(var(--p) * 1%); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.journey__months { display: grid; grid-template-columns: repeat(6, 1fr); text-align: center; }

.hero__art { position: relative; justify-self: center; width: min(420px, 100%); }
.portrait {
  margin: 0; aspect-ratio: 4 / 5.3; border-radius: 999px 999px 28px 28px; overflow: hidden;
  background: var(--brand-soft); box-shadow: var(--shadow-lg); border: 6px solid var(--surface);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.float-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13.5px; font-weight: 600; white-space: nowrap;
  animation: bob 6s ease-in-out infinite;
}
.float-chip img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; }
.fc-ico { font-size: 15px; }
.fc1 { top: 12%; left: -14%; }
.fc2 { top: 46%; right: -12%; animation-delay: -2s; }
.fc3 { bottom: 9%; left: -8%; animation-delay: -4s; }
@keyframes bob { 50% { transform: translateY(-8px); } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 64px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.stat { padding: 24px 26px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font: 400 clamp(40px, 5vw, 56px)/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 8px; font: 500 12.5px/1.3 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.ticker { margin-top: 56px; border-block: 1px solid var(--line); background: var(--surface-2); overflow: hidden; }
.ticker__track { display: flex; width: max-content; animation: ticker 60s linear infinite; }
.ticker__track span { padding: 16px 0; font: 400 22px/1 var(--serif); font-style: italic; color: var(--ink-2); white-space: nowrap; }
.ticker__track span::after { content: "✦"; font-style: normal; font-size: 12px; color: var(--accent); margin: 0 26px; vertical-align: 4px; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: 112px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.sec-head { max-width: 720px; margin-bottom: 48px; }
.sec-num { font: 500 13px/1 var(--mono); color: var(--accent); letter-spacing: .04em; text-transform: uppercase; }
.sec-head h2 { margin-top: 14px; font: 400 clamp(42px, 6vw, 72px)/1 var(--serif); letter-spacing: -.025em; }
.sec-sub { margin-top: 16px; color: var(--ink-2); font-size: 17px; max-width: 620px; }

/* ---------- areas (portfolio cards) ---------- */
.areas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.area {
  --c: var(--brand);
  position: relative; display: flex; flex-direction: column; text-align: left; gap: 12px; padding: 22px 22px 18px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); cursor: pointer;
  box-shadow: var(--shadow-sm); overflow: hidden; isolation: isolate;
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s, border-color .25s;
}
.area::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(240px 160px at 100% 0%, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%);
}
.area:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.area:hover::before { opacity: 1; }
.area__top { display: flex; justify-content: space-between; align-items: center; }
.area__ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.area__ico svg { width: 21px; height: 21px; }
.area__num { font: 500 12px/1 var(--mono); color: var(--muted); }
.area h3 { font: 600 17px/1.3 var(--sans); letter-spacing: -.01em; }
.area p { font-size: 14px; line-height: 1.55; color: var(--ink-2); flex: 1; }
.area__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.area__days { font: 400 34px/1 var(--serif); }
.area__days small { font: 500 11.5px/1 var(--mono); color: var(--muted); margin-left: 4px; text-transform: uppercase; letter-spacing: .05em; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 30px; }
.spark i { width: 7px; border-radius: 2px; background: var(--c); opacity: .85; height: calc(var(--h) * 1%); min-height: 2px; transform-origin: bottom; }
.area__go { position: absolute; right: 18px; bottom: 58px; font-size: 12.5px; font-weight: 600; color: var(--c); opacity: 0; transform: translateX(-6px); transition: .25s; }
.area:hover .area__go, .area:focus-visible .area__go { opacity: 1; transform: none; }

/* ---------- panels ---------- */
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-top: 16px; }
.panel { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel__head h3 { font: 400 28px/1.1 var(--serif); letter-spacing: -.01em; }
.panel__note, .panel__hint { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.panel__hint { margin: 0; font: 500 12px/1 var(--mono); }

.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background-color .2s, color .2s, box-shadow .2s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }

.bars { margin-top: 20px; display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: 196px 1fr 52px; align-items: center; gap: 14px; border: 0; background: none; padding: 2px 0; cursor: pointer; text-align: left; border-radius: 8px; }
.bar__label { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.bar__label i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); flex: none; }
.bar__track { height: 12px; border-radius: 999px; background: var(--bg-alt); overflow: hidden; }
.bar__fill { display: block; height: 100%; border-radius: inherit; background: var(--c); width: calc(var(--v) * 1%); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1s cubic-bezier(.2, .7, .2, 1), width .6s cubic-bezier(.2, .7, .2, 1); }
.bars.in .bar__fill { transform: scaleX(1); }
.bar__val { font: 500 13.5px/1 var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.bar:hover .bar__track { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 30%, transparent); }

.tools { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 4px; }
.tools li { display: flex; gap: 14px; padding: 14px 4px; border-top: 1px solid var(--line); }
.tools li:first-child { border-top: 0; padding-top: 4px; }
.tools b { display: block; font-size: 15px; font-weight: 600; }
.tools li > div > span { display: block; font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.tool__ico { width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center; font: 600 15px/1 var(--mono); color: #fff; background: #2B5BB8; }
.tool__ico--x { background: #1D7A46; }
.tool__ico--s { background: #C2622E; }
.tool__ico--d { background: #5D6779; }

.milestones-panel { margin-top: 16px; }
.milestones { list-style: none; margin: 26px 0 0; padding: 0 0 6px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.ms { position: relative; scroll-snap-align: start; padding: 0 14px 0 0; }
.ms::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--line-2); }
.ms:last-child::before { right: auto; width: 16px; }
.ms button { position: relative; display: block; width: 100%; text-align: left; border: 0; background: none; padding: 0; cursor: pointer; }
.ms__dot { position: relative; display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--c, var(--brand)); transition: transform .2s; }
.ms button:hover .ms__dot { transform: scale(1.25); }
.ms__date { display: block; margin-top: 14px; font: 500 12px/1 var(--mono); color: var(--muted); }
.ms__title { display: block; margin-top: 8px; font-size: 14.5px; font-weight: 600; line-height: 1.4; padding-right: 8px; }
.ms button:hover .ms__title { color: var(--brand); }

/* ---------- calendar ---------- */
.cal-wrap { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--ink-2); margin-bottom: 20px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 8px; }
.lg { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.lg--work { background: var(--work); }
.lg--weekend { background: var(--weekend); }
.lg--holiday { background: var(--holiday); }
.lg--leave { background: var(--leave); }
.lg--photo { background: var(--surface); border: 1.5px solid var(--line-2); position: relative; }
.lg--photo::after { content: ""; position: absolute; right: 2px; top: 2px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.cal { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.month h4 { margin: 0 0 10px; font: 600 14px/1 var(--sans); display: flex; justify-content: space-between; align-items: baseline; }
.month h4 small { font: 500 11.5px/1 var(--mono); color: var(--muted); }
.month__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.month__dow { font: 500 10px/1 var(--mono); color: var(--muted); text-align: center; padding-bottom: 4px; }
.day {
  --c: var(--work);
  position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 5px; cursor: pointer;
  background: var(--c); color: #fff; font: 500 9.5px/1 var(--mono);
  display: grid; place-items: center; transition: transform .15s, opacity .25s, background-color .25s, box-shadow .15s;
}
.day[data-k="weekend"] { --c: var(--weekend); color: var(--muted); }
.day[data-k="holiday"] { --c: var(--holiday); }
.day[data-k="leave"] { --c: var(--leave); }
.day.has-photo::after { content: ""; position: absolute; top: 2px; right: 2px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1.5px var(--surface); }
.day:hover { transform: scale(1.18); z-index: 2; box-shadow: 0 4px 12px -2px rgba(0, 0, 0, .3); }
.day.is-dim { opacity: .16; }
.day.is-hit { background: var(--hit); }
.day.is-pulse { animation: pulse 1.1s ease 2; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 45%, transparent); } }

/* ---------- toolbar ---------- */
.toolbar {
  position: sticky; top: calc(var(--nav-h) + 8px); z-index: 20; margin-top: 28px; padding: 14px; display: grid; gap: 12px;
  border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 90%, transparent); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow);
  grid-template-columns: 1fr auto; align-items: center;
}
.toolbar .chips, .toolbar__row { grid-column: 1 / -1; }
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 46px; padding: 0 44px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg);
  color: var(--ink); font: 400 15px/1 var(--sans); transition: border-color .2s, box-shadow .2s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.search kbd { position: absolute; right: 12px; font: 500 12px/1 var(--mono); color: var(--muted); border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 7px; background: var(--surface); }
.seg--months { overflow-x: auto; scrollbar-width: none; max-width: 100%; justify-self: start; }
.seg--months::-webkit-scrollbar { display: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 32px 2px 2px; margin: -2px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip {
  --c: var(--brand);
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px; border-radius: 999px; flex: none;
  border: 1px solid var(--line-2); background: var(--surface); font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chip small { font: 500 11.5px/1 var(--mono); color: var(--muted); }
.chip:hover { border-color: var(--c); }
.chip[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.chip[aria-pressed="true"] i { background: #fff; }
.chip[aria-pressed="true"] small { color: rgba(255, 255, 255, .8); }
.toolbar__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.toolbar__row .link-btn:first-of-type { margin-left: auto; }

.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__ui { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); transition: background-color .2s; flex: none; }
.switch__ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s cubic-bezier(.2, .7, .2, 1); }
.switch input:checked + .switch__ui { background: var(--brand); }
.switch input:checked + .switch__ui::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__ui { outline: 2.5px solid var(--brand); outline-offset: 3px; }

.summary { margin: 26px 0 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; font-size: 14.5px; color: var(--ink-2); }
.summary b { color: var(--ink); }
.summary .sum-top { font-size: 13.5px; color: var(--muted); }
.summary > span + span::before { content: "·"; margin-right: 16px; color: var(--line-2); }

/* ---------- entries ---------- */
.entries { display: grid; gap: 10px; }
.month-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2);
}
.month-head:first-child { margin-top: 0; }
.month-head h3 { font: 400 34px/1 var(--serif); letter-spacing: -.01em; }
.month-head span { font: 500 12.5px/1 var(--mono); color: var(--muted); }
.entry {
  display: grid; grid-template-columns: 76px 1fr auto; gap: 18px; align-items: start; padding: 18px 20px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  content-visibility: auto; contain-intrinsic-size: auto 104px;
  transition: border-color .2s, transform .2s;
}
.entry:hover { border-color: var(--line-2); }
.entry.is-flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--brand); } }
.entry__date { display: grid; justify-items: start; gap: 4px; }
.entry__day { font: 400 40px/.9 var(--serif); letter-spacing: -.02em; }
.entry__dow { font: 500 11.5px/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.entry__text { font-size: 15.5px; line-height: 1.6; color: var(--ink); white-space: pre-line; }
.entry__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { --c: var(--brand); display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--ink-2); background: color-mix(in srgb, var(--c) 11%, transparent); border: 0; cursor: pointer; }
.tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.tag:hover { color: var(--ink); background: color-mix(in srgb, var(--c) 20%, transparent); }
.entry__thumb { width: 92px; height: 92px; border-radius: 12px; overflow: hidden; border: 0; padding: 0; cursor: zoom-in; background: var(--bg-alt); }
.entry__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.entry__thumb:hover img { transform: scale(1.08); }
.entry--off { grid-template-columns: 76px 1fr; padding: 12px 20px; background: transparent; box-shadow: none; border-style: dashed; }
.entry--off .entry__day { font-size: 28px; }
.entry--off .entry__text { color: var(--muted); font-size: 14.5px; align-self: center; }
.entry--holiday { border-color: color-mix(in srgb, var(--holiday) 55%, var(--line)); background: color-mix(in srgb, var(--holiday) 7%, transparent); }
.entry--leave { border-color: color-mix(in srgb, var(--leave) 55%, var(--line)); background: color-mix(in srgb, var(--leave) 7%, transparent); grid-template-columns: 76px 1fr auto; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; margin-right: 8px; border-radius: 6px; font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; vertical-align: 2px; }
.badge--holiday { background: var(--holiday); color: #2A1B00; }
.badge--leave { background: var(--leave); color: #fff; }
.badge--weekend { background: var(--weekend); color: var(--ink-2); }
.badge--work { background: var(--brand-soft); color: var(--brand); }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 2px; }
.empty { padding: 56px 20px; text-align: center; border-radius: var(--radius); border: 1px dashed var(--line-2); color: var(--muted); }
.empty b { display: block; font: 400 30px/1.2 var(--serif); color: var(--ink); margin-bottom: 6px; }

/* ---------- gallery ---------- */
.gallery { columns: 3 300px; column-gap: 16px; }
.shot {
  position: relative; display: block; width: 100%; margin: 0 0 16px; padding: 0; border: 0; border-radius: 18px; overflow: hidden; cursor: zoom-in;
  break-inside: avoid; background: var(--bg-alt); box-shadow: var(--shadow-sm); text-align: left;
}
.shot img { width: 100%; height: auto; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.shot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 12, 20, .78), rgba(8, 12, 20, 0) 55%); opacity: .85; transition: opacity .3s; }
.shot figcaption { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; color: #fff; }
.shot figcaption b { display: block; font: 400 22px/1.15 var(--serif); }
.shot figcaption span { display: block; margin-top: 6px; font: 500 11.5px/1 var(--mono); opacity: .85; letter-spacing: .04em; text-transform: uppercase; }
.shot:hover img { transform: scale(1.05); }
.shot:hover::after { opacity: 1; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.card__label { font: 500 12px/1 var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.company { display: flex; align-items: center; gap: 16px; }
.company img { width: 64px; height: 64px; border-radius: 14px; border: 1px solid var(--line); background: #fff; object-fit: contain; }
.company img.avatar { border-radius: 50%; object-fit: cover; object-position: 50% 22%; background: var(--brand-soft); }
.company h3 { margin-top: 8px; font: 400 28px/1.1 var(--serif); }
.dl { margin: 20px 0 0; display: grid; }
.dl div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); }
.dl dt { font: 500 12.5px/1.6 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.dl dd a { color: var(--brand); text-decoration: none; }
.dl dd a:hover { text-decoration: underline; }
.card .text-link { margin-top: 16px; }
.contact {
  margin-top: 16px; padding: 32px; border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow);
}
.contact h3 { font: 400 40px/1 var(--serif); }
.contact p { margin-top: 8px; opacity: .75; }
.contact__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.contact .btn--primary { background: var(--bg); color: var(--ink); }
.contact .btn--ghost { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent); }
.contact .btn--ghost:hover { border-color: var(--bg); }

/* ---------- footer ---------- */
.footer { padding: 36px 0 48px; font-size: 14px; color: var(--muted); }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a:not(.text-link) { color: var(--ink-2); }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .3s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- tooltip ---------- */
.tip {
  position: fixed; z-index: 70; max-width: 280px; padding: 10px 12px; border-radius: 12px; pointer-events: none;
  background: var(--ink); color: var(--bg); font-size: 13px; line-height: 1.45; box-shadow: var(--shadow-lg);
}
.tip b { display: block; font: 500 11.5px/1.3 var(--mono); opacity: .7; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- modal ---------- */
dialog { padding: 0; border: 0; color: var(--ink); }
dialog::backdrop { background: rgba(6, 10, 18, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal { width: min(620px, 100% - 24px); max-height: min(88vh, 860px); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.modal[open] { animation: pop .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal__box { display: flex; flex-direction: column; max-height: inherit; }
.modal__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 24px 24px 0; }
.modal__kicker { font: 500 12px/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.modal__head h3 { margin-top: 10px; font: 400 36px/1.05 var(--serif); letter-spacing: -.01em; }
.modal__body { padding: 18px 24px 22px; overflow-y: auto; }
.modal__body .entry__text { font-size: 16.5px; }
.modal__img { margin-top: 18px; width: 100%; border: 0; padding: 0; border-radius: 16px; overflow: hidden; cursor: zoom-in; background: var(--bg-alt); }
.modal__img img { width: 100%; max-height: 44vh; object-fit: cover; }
.modal__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 24px 20px; border-top: 1px solid var(--line); }
.modal__count { font-size: 12.5px; color: var(--muted); }

/* ---------- lightbox ---------- */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; background: rgba(6, 9, 15, .94); color: #fff; }
.lightbox[open] { display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; animation: fade .25s ease; }
.lightbox::backdrop { background: transparent; }
@keyframes fade { from { opacity: 0; } }
.lb-fig { margin: 0; height: 100dvh; display: grid; grid-template-rows: 1fr auto; gap: 14px; padding: 56px 0 20px; min-width: 0; }
.lb-fig img { justify-self: center; align-self: center; max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lb-fig img.swap { animation: fade .3s ease; }
.lb-fig figcaption { display: grid; gap: 6px; justify-items: center; text-align: center; max-width: 640px; margin-inline: auto; }
.lb-fig figcaption b { font: 400 26px/1.15 var(--serif); }
.lb-fig figcaption span { font-size: 14px; opacity: .78; }
.lb-fig .lb-count { font-size: 12px; opacity: .6; letter-spacing: .06em; }
.lb-fig .text-link { color: #9DBBFF; margin-top: 4px; }
.lb-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #fff; display: grid; place-items: center; cursor: pointer; justify-self: center; transition: background-color .2s; }
.lb-btn:hover { background: rgba(255, 255, 255, .18); }
.lb-close { position: absolute; top: 14px; right: 14px; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .fc1 { left: -6%; } .fc2 { right: -4%; } .fc3 { left: -4%; }
  .areas { grid-template-columns: repeat(2, 1fr); }
  .cal { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  :root { --nav-h: 60px; }
  .menu-btn { display: inline-grid; }
  .nav__links {
    position: absolute; top: calc(var(--nav-h) - 4px); left: 12px; right: 12px; flex-direction: column; gap: 2px; padding: 8px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .2s, transform .2s;
  }
  .nav__links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a { padding: 13px 14px; font-size: 16px; border-radius: 12px; }
  .hero { padding-top: 28px; }
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__art { width: min(340px, 82%); order: -1; }
  .fc1 { left: -10%; } .fc2 { right: -10%; } .fc3 { left: -6%; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 48px; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .section { padding: 80px 0; }
  .about { grid-template-columns: 1fr; }
  .toolbar { position: static; grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .areas { grid-template-columns: 1fr; }
  .cal { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .cal-wrap, .panel, .card { padding: 18px; }
  .bar { grid-template-columns: 118px 1fr 40px; gap: 10px; }
  .bar__label { font-size: 13px; }
  .entry { grid-template-columns: 52px 1fr; gap: 12px; padding: 16px; }
  .entry--off, .entry--leave { grid-template-columns: 52px 1fr; padding: 12px 16px; }
  .entry__day { font-size: 32px; }
  .entry__thumb { grid-column: 2; width: 100%; height: 180px; }
  .entry--off .entry__day { font-size: 24px; }
  .dl div { grid-template-columns: 1fr; gap: 2px; }
  .gallery { columns: 2 150px; column-gap: 10px; }
  .shot { margin-bottom: 10px; border-radius: 14px; }
  .shot figcaption b { font-size: 17px; }
  .shot figcaption { left: 12px; right: 12px; bottom: 10px; }
  .contact { padding: 24px; }
  .contact h3 { font-size: 32px; }
  .lightbox[open] { grid-template-columns: 1fr; }
  .lb-prev, .lb-next { position: absolute; top: auto; bottom: 18px; z-index: 2; }
  .lb-prev { left: 16px; } .lb-next { right: 16px; }
  .lb-fig { padding: 60px 12px 84px; }
  .search kbd { display: none; }
  .hide-sm { display: none; }
  .hero__cta .btn { flex: 1 1 100%; }
  .summary > span + span::before { content: none; }
  .summary { flex-direction: column; gap: 4px; }
  .toolbar__row .link-btn:first-of-type { margin-left: 0; }
  .float-chip { font-size: 12px; padding: 8px 11px; }
  .modal__head h3 { font-size: 30px; }
  .modal__foot .btn--sm { padding: 0 10px; font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .reveal { opacity: 1; transform: none; }
  .ticker__track { animation: none; }
}
