/* Ahmed AlYazid — one identity.
   Shape language: radius 14 (inner 10), motif ◆ diamond, lines 1.5px.
   Roles: --ink ground · --deep/--surface panels · --sand cards · --accent signal.
   Palette: Graphite & Cobalt. Dark is the default; light follows the system or the header toggle. */
:root {
  color-scheme: dark;
  --ink: #0e0f12; --deep: #15171c; --surface: #1d2027;
  --sand: #eef1f6; --sand-2: #dfe4ee;
  --text: #eef1f6; --muted: #a3a9b6; --soft: #cfd4de;
  --ink-text: #10131a; --ink-muted: #4b5262;
  --accent: #5b8cff; --accent-hi: #7aa2ff; --accent-ink: #050b1f;
  --rust: #2f5bd8; --mint: #5eead4; --live-ink: #0f8a73;
  --shadow: rgba(0, 0, 0, .7); --pat: 6%; --accent-on-ink: #5b8cff;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --ink: #eceff4; --deep: #e2e6ed; --surface: #f7f8fb;
    --sand: #ffffff; --sand-2: #eef1f6;
    --text: #10131a; --muted: #555d6e; --soft: #2f3544;
    --ink-text: #10131a; --ink-muted: #555d6e;
    --accent: #2d5be3; --accent-hi: #4570ec; --accent-ink: #ffffff;
    --rust: #2d5be3; --mint: #0d9488; --live-ink: #0b7d6a;
    --shadow: rgba(16, 19, 26, .28); --pat: 3.5%; --accent-on-ink: #8aaeff;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --ink: #eceff4; --deep: #e2e6ed; --surface: #f7f8fb;
  --sand: #ffffff; --sand-2: #eef1f6;
  --text: #10131a; --muted: #555d6e; --soft: #2f3544;
  --ink-text: #10131a; --ink-muted: #555d6e;
  --accent: #2d5be3; --accent-hi: #4570ec; --accent-ink: #ffffff;
  --rust: #2d5be3; --mint: #0d9488; --live-ink: #0b7d6a;
  --shadow: rgba(16, 19, 26, .28); --pat: 3.5%; --accent-on-ink: #8aaeff;
}
:root {
  --line: color-mix(in srgb, var(--text) 14%, transparent);
  --line-strong: color-mix(in srgb, var(--text) 30%, transparent);
  --line-ink: color-mix(in srgb, var(--ink-text) 22%, transparent);
  --r: 14px;
  --r-in: 10px;
  --stroke: 1.5px;
  --display: "Unbounded", "Readex Pro", system-ui, sans-serif;
  --body: "Readex Pro", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; background: var(--ink); }
body { margin: 0; background: var(--ink); color: var(--text); font: 400 17px/1.75 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; }
h1, h2 { letter-spacing: -.035em; }
ul { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: var(--stroke) solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.theme-swap *, .theme-swap *::before, .theme-swap *::after { transition: none !important; }

.wrap { width: min(1240px, 100%); margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.skip { position: fixed; inset-inline-start: 12px; top: 12px; z-index: 99; padding: 10px 14px; border-radius: var(--r-in); background: var(--accent); color: var(--accent-ink); transform: translateY(-160%); }
.skip:focus { transform: none; }
.pattern { background-image: repeating-conic-gradient(from 45deg, color-mix(in srgb, var(--accent) var(--pat), transparent) 0 25%, transparent 0 50%); background-size: 44px 44px; }

/* motif */
.dia { display: inline-block; flex: none; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); }
.dia-live { background: var(--mint); animation: blink 1.8s ease-in-out infinite; }
.dia-lg { width: 18px; height: 18px; border-radius: 3px; }
@keyframes blink { 50% { opacity: .3; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* buttons + segmented */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: var(--r); border: var(--stroke) solid transparent; font-weight: 600; transition: transform .2s var(--ease), background .2s, border-color .2s, color .2s; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hi); }
.btn-line { border-color: var(--line-strong); }
.btn-line:hover { border-color: var(--text); }
.btn-ink { background: var(--ink-text); color: var(--sand); }
.btn-ink-line { border-color: color-mix(in srgb, var(--accent-ink) 40%, transparent); color: var(--accent-ink); }
.btn-ink-line:hover { border-color: var(--accent-ink); }
.btn:disabled { opacity: .6; cursor: progress; }
.icon-btn { display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--r); border: var(--stroke) solid currentColor; background: none; }
.link-btn { padding: 4px 0; border: 0; background: none; color: var(--accent); font-size: 14px; font-weight: 600; border-bottom: var(--stroke) solid transparent; }
.link-btn:hover { border-color: var(--accent); }

.seg { display: inline-flex; flex-wrap: wrap; padding: 3px; gap: 2px; border-radius: 12px; border: var(--stroke) solid var(--line); }
.seg button { min-height: 36px; padding: 0 13px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-weight: 600; font-size: 14px; transition: background .2s, color .2s; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: color-mix(in srgb, var(--ink) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: var(--stroke) solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font: 700 20px/1 var(--display); }
.nav { display: flex; gap: 24px; font-size: 15px; color: var(--muted); }
.nav a { padding: 6px 0; border-bottom: var(--stroke) solid transparent; transition: color .2s, border-color .2s; }
.nav a:hover, .nav a.is-current { color: var(--text); border-color: var(--accent); }
.top-actions { display: flex; align-items: center; gap: 10px; }
/* theme toggle: the identity's diamond, half lit; it turns over between dark and light */
.theme-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: var(--r); border: var(--stroke) solid var(--line-strong); background: none; color: var(--text); transition: border-color .2s, color .2s; }
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }
.theme-btn svg { width: 20px; height: 20px; transition: transform .5s var(--ease); }
.theme-btn .half { fill: currentColor; }
.theme-btn .edge { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
:root[data-theme="light"] .theme-btn svg { transform: rotate(180deg); }

/* hero */
.hero { padding-block: clamp(48px, 8vw, 104px) clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; }
.hero-name { margin-top: 18px; font-weight: 900; line-height: .88; text-transform: uppercase; letter-spacing: -.06em; font-size: clamp(52px, 9.4vw, 148px); }
.hero-name span { display: block; }
.hero-name .accent { color: var(--accent); }
.hero-lead { color: var(--soft); font-size: clamp(17px, 1.5vw, 19px); line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-facts { display: grid; margin-top: 28px; border-top: var(--stroke) solid var(--line); }
.hero-facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: 12px; border-bottom: var(--stroke) solid var(--line); }
.hero-facts dt { flex: none; color: var(--muted); font-size: 14px; }
.hero-facts dd { font-weight: 600; font-variant-numeric: tabular-nums; text-align: end; text-wrap: balance; }
.hero-facts dd small { display: block; color: var(--muted); font-size: 14px; font-weight: 400; }

/* band */
.band { overflow: hidden; background: var(--accent); color: var(--accent-ink); padding-block: 16px; }
.band-track { display: flex; width: max-content; min-height: 24px; animation: marq 32s linear infinite; }  /* reserve the row before JS fills it (no layout shift) */
.band:hover .band-track { animation-play-state: paused; }
.band-item { display: inline-flex; align-items: center; gap: 40px; padding-inline-end: 40px; font: 800 24px/1 var(--display); letter-spacing: -.02em; text-transform: uppercase; white-space: nowrap; }
.band-item .dia { width: 11px; height: 11px; background: var(--accent-ink); opacity: .45; }
@keyframes marq { to { transform: translateX(-50%); } }

/* sections */
.section { padding-block: clamp(72px, 9vw, 120px); }
.section-alt { background: var(--deep); border-block: var(--stroke) solid var(--line); }
.sec-head { margin-bottom: clamp(28px, 4vw, 44px); }
.sec-head h2 { font-size: clamp(30px, 4.3vw, 52px); max-width: 16em; }
.sec-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--accent); font-size: 14px; font-weight: 500; }
.h3 { font-size: clamp(24px, 2.6vw, 32px); }
.h4 { font: 600 18px/1.35 var(--body); }
.muted { color: var(--muted); }
.muted-ink { color: var(--ink-muted); }
.label { color: var(--accent); font-size: 13px; font-weight: 500; }
.label-ink { color: var(--rust); font-size: 13px; font-weight: 600; }
.label-acc { color: var(--accent-ink); font-size: 14px; font-weight: 600; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { padding: 5px 11px; border-radius: 8px; border: var(--stroke) solid var(--line-ink); font-size: 14px; }
.facts { display: grid; gap: 8px; }
.facts li { position: relative; padding-inline-start: 20px; }
.facts li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .7em; width: 6px; height: 6px; background: var(--rust); transform: rotate(45deg); }
.card { border-radius: var(--r); padding: clamp(22px, 3vw, 34px); }
.card-sand { background: var(--sand); color: var(--ink-text); }

/* work: orbits + index */
.work-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.orbit-wrap { position: sticky; top: 96px; display: grid; gap: 14px; }
.orbit-stage { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1; margin-inline: auto; perspective: 900px; cursor: grab; touch-action: pan-y; user-select: none; }
.orbit-stage.is-dragging { cursor: grabbing; }
.orbit-svg { width: 100%; height: 100%; overflow: visible; transition: transform .25s var(--ease); }
.orbit-ring { fill: none; stroke: color-mix(in srgb, var(--text) 36%, transparent); stroke-width: 1.5; transition: stroke .35s, opacity .35s; }
.orbit-ring.is-active { stroke: var(--accent); }
.orbit-ring.is-dim { opacity: .55; }
.orbit-core { fill: var(--accent); }
.orbit-core-inner { fill: var(--ink); }
.orbit-nodes { position: absolute; inset: 0; pointer-events: none; }
.node { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 9px; min-height: 36px; padding: 6px 12px 6px 10px; border-radius: var(--r-in); border: var(--stroke) solid var(--line-strong); background: color-mix(in srgb, var(--deep) 94%, transparent); color: var(--text); font-size: 14px; font-weight: 600; white-space: nowrap; pointer-events: auto; transform: translate(-50%, -50%); transition: border-color .25s, background .25s, color .25s, box-shadow .25s; }
.node .dia { width: 9px; height: 9px; }
.node:hover, .node.is-hint { border-color: var(--accent); }
.node.is-active { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.node.is-active .dia { background: var(--accent-ink); }
.orbit-card { padding: 18px 20px; border-radius: var(--r); background: var(--deep); border: var(--stroke) solid var(--line); }
.orbit-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.orbit-card-title { font-size: 22px; }
.orbit-card-text { margin-top: 6px; color: var(--soft); font-size: 15px; line-height: 1.7; }

.index-wrap { position: relative; }
.index { border-top: var(--stroke) solid var(--text); }
.row { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 28px; gap: 16px; align-items: center; width: 100%; padding: 24px 10px; border: 0; border-bottom: var(--stroke) solid var(--text); background: none; text-align: start; overflow: hidden; transition: color .3s, opacity .35s; }
.row > * { position: relative; z-index: 1; }
.row-n { font: 500 13px/1 var(--mono); direction: ltr; text-align: start; color: var(--muted); }
.row-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.row-title { font: 700 clamp(18px, 2vw, 24px)/1.3 var(--display); letter-spacing: -.02em; }
.row-kind { color: var(--muted); font-size: 14px; }
.row-metric { font: 600 24px/1 var(--body); font-variant-numeric: tabular-nums; direction: ltr; }
.row-mark { display: grid; place-items: center; width: 28px; height: 28px; }
.row-mark .dia { width: 10px; height: 10px; transition: transform .35s var(--ease), background .2s; }
.row.is-dim { opacity: .3; }
.row.is-lit .row-n { color: var(--accent); }
.work-index .row::before { content: ""; position: absolute; inset: 0; z-index: 0; background: var(--accent); transform: scaleY(0); transform-origin: bottom; transition: transform .45s cubic-bezier(.7, 0, .2, 1); }
.work-index .row:hover, .work-index .row:focus-visible { color: var(--accent-ink); opacity: 1; }
.work-index .row:hover::before, .work-index .row:focus-visible::before { transform: scaleY(1); }
.work-index .row:hover .row-kind, .work-index .row:hover .row-n, .work-index .row:focus-visible .row-kind { color: var(--accent-ink); }
.work-index .row:hover .row-mark .dia { background: var(--accent-ink); }
.preview { position: absolute; z-index: 5; left: 0; top: 0; width: 240px; padding: 18px; border-radius: var(--r); background: var(--sand); color: var(--ink-text); box-shadow: 0 30px 60px -30px var(--shadow); pointer-events: none; opacity: 0; transition: opacity .2s; }
.preview.is-on { opacity: 1; }
.preview-kind { display: block; font-size: 12px; color: var(--ink-muted); }
.preview-metric { display: block; margin-top: 8px; font: 600 44px/1 var(--body); font-variant-numeric: tabular-nums; color: var(--rust); direction: ltr; text-align: start; }
.preview-label { display: block; margin-top: 8px; font-size: 14px; }

/* project detail content (shared by drawer and doors) */
.pd-intro { display: grid; gap: 14px; }
.pd-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-tags b { padding: 6px 12px; border-radius: var(--r-in); background: var(--accent); color: var(--accent-ink); font: 600 15px/1.2 var(--body); font-variant-numeric: tabular-nums; }
.pd-tags span { padding: 6px 12px; border-radius: var(--r-in); border: var(--stroke) solid var(--line-strong); font-size: 14px; }
.pd-body { color: var(--soft); }
.pd-points { color: var(--soft); font-size: 15px; }
.pd-note { color: var(--muted); font-size: 14px; }
.drawer .pd-tags b { background: var(--ink-text); color: var(--accent-on-ink); }
.drawer .pd-tags span { border-color: var(--line-ink); }
.drawer .pd-body, .drawer .pd-points { color: var(--ink-text); }
.drawer .pd-note { color: var(--ink-muted); }
.block { display: grid; gap: 14px; padding: 20px; border-radius: var(--r); background: var(--sand); color: var(--ink-text); }

/* platform workflow */
.flow { display: grid; gap: 14px; }
.flow-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; }
.flow-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.flow-steps button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px; border: 0; border-radius: var(--r-in); background: var(--sand-2); text-align: start; color: var(--ink-muted); transition: background .25s, color .25s; }
.flow-steps button b { color: var(--ink-text); font-weight: 600; }
.flow-steps button[aria-selected="true"] { background: var(--ink-text); color: var(--accent-on-ink); }
.flow-steps button[aria-selected="true"] b { color: var(--sand); }
.flow-steps button.is-done { color: var(--rust); }
.flow-steps small { font: 500 12px/1 var(--mono); }
.bar { position: relative; height: 4px; border-radius: 2px; background: var(--sand-2); }
.bar-fill { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 2px; background: var(--accent); transition: width .45s var(--ease); }
.flow-detail { min-height: 104px; padding: 16px; border-radius: var(--r-in); background: var(--ink-text); color: var(--sand); animation: rise .4s var(--ease); }
.flow-detail b { display: block; }
.flow-detail p { margin-top: 4px; color: color-mix(in srgb, var(--sand) 78%, transparent); font-size: 15px; }

/* research */
.matrix { display: grid; grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr)); gap: 5px; font-size: 13px; }
.matrix .mh { padding: 0 4px 2px; color: var(--ink-muted); font-size: 12px; line-height: 1.3; }
.matrix .rh { display: flex; align-items: center; font-weight: 600; font-size: 13px; }
.matrix button { min-height: 46px; border-radius: var(--r-in); border: 0; background: var(--sand-2); color: var(--ink-text); font-weight: 600; font-size: 12px; transition: background .2s, color .2s; }
.matrix button.is-best { background: var(--ink-text); color: var(--accent-on-ink); }
.matrix button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.matrix .off { min-height: 46px; border-radius: var(--r-in); border: var(--stroke) dashed var(--line-ink); }
.cond-note { padding: 12px 14px; border-radius: var(--r-in); background: var(--sand-2); font-size: 14px; min-height: 64px; }
.cond-note b { font-family: var(--mono); font-weight: 500; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.metric { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: var(--r-in); background: var(--sand-2); }
.metric b { font: 600 24px/1 var(--body); font-variant-numeric: tabular-nums; direction: ltr; text-align: start; }
.metric span { color: var(--ink-muted); font-size: 12px; line-height: 1.3; }
.metric-accent { background: var(--accent); }
.metric-accent span { color: var(--accent-ink); }
.protocol summary { display: flex; justify-content: space-between; align-items: center; padding-block: 8px; cursor: pointer; font-weight: 600; list-style: none; border-top: var(--stroke) solid var(--line-ink); }
.protocol summary::-webkit-details-marker { display: none; }
.protocol summary .dia { background: var(--rust); transition: transform .3s var(--ease); }
.protocol[open] summary .dia { transform: rotate(225deg); }
.protocol .facts { font-size: 14px; margin-top: 4px; }

/* labs */
.lab-io { align-content: start; }
.lab-tag { display: inline-flex; align-items: center; gap: 8px; color: var(--rust); font-size: 13px; font-weight: 600; }
.lab-tag::before { content: ""; width: 7px; height: 7px; background: var(--live-ink); transform: rotate(45deg); }
.range { display: flex; flex-direction: column; gap: 2px; font-size: 15px; font-weight: 600; }
.range > span { display: flex; justify-content: space-between; }
.range output { font: 500 15px/1.6 var(--mono); }
.range-note { margin-top: -4px; color: var(--ink-muted); font-size: 13px; line-height: 1.5; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--ink-text) 25%, transparent); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--ink-text) 25%, transparent); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 3px; background: var(--accent); border: var(--stroke) solid var(--ink-text); transform: rotate(45deg); cursor: grab; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 3px; background: var(--accent); border: var(--stroke) solid var(--ink-text); transform: rotate(45deg); cursor: grab; }
.result { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 92px; padding: 16px; border-radius: var(--r-in); background: var(--ink-text); color: var(--sand); }
.result b { font: 600 28px/1.2 var(--body); color: var(--accent-on-ink); }
.result b#dPrice { font-size: 40px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; text-align: start; }
.result span { color: color-mix(in srgb, var(--sand) 66%, transparent); font-size: 14px; }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 14px; border-radius: var(--r-in); border: var(--stroke) solid var(--line-ink); background: none; color: var(--ink-text); font-size: 14px; font-weight: 600; transition: background .2s, color .2s, border-color .2s; }
.toggle .dia { background: transparent; border: var(--stroke) solid color-mix(in srgb, var(--ink-text) 45%, transparent); }
.toggle[aria-pressed="true"] { background: var(--ink-text); color: var(--sand); border-color: var(--ink-text); }
.toggle[aria-pressed="true"] .dia { background: var(--accent); border-color: var(--accent); }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 16px; border-radius: var(--r-in); border: var(--stroke) dashed color-mix(in srgb, var(--ink-text) 35%, transparent); text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover, .drop:focus-within { border-color: var(--ink-text); background: var(--sand-2); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop span { color: var(--ink-muted); font-size: 14px; }
.animal-preview { width: 100%; max-height: 200px; object-fit: contain; border-radius: var(--r-in); background: var(--sand-2); }
.meter { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--text) 20%, transparent); margin: 4px 0; }
.meter i { display: block; height: 100%; border-radius: 2px; background: var(--accent); }

/* journey */
.timeline { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tl-line { position: absolute; inset-inline: 0; top: 21px; height: var(--stroke); background: var(--line); }
.tl-fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--accent); transition: width .45s var(--ease); }
.tl-btn { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 0; border: 0; background: none; text-align: start; }
.tl-btn .tl-dia { width: 24px; height: 24px; margin: 9px; border-radius: 4px; transform: rotate(45deg); background: var(--deep); border: var(--stroke) solid var(--line-strong); transition: background .3s, border-color .3s, transform .3s var(--ease); }
.tl-btn:hover .tl-dia { transform: rotate(45deg) scale(1.12); }
.tl-btn.is-past .tl-dia { border-color: var(--accent); }
.tl-btn[aria-selected="true"] .tl-dia { background: var(--accent); border-color: var(--accent); }
.tl-btn small { color: var(--muted); font: 500 13px/1 var(--mono); direction: ltr; }
.tl-btn b { font-weight: 600; font-size: 17px; }
.tl-panel { display: grid; grid-template-columns: 150px 1fr; gap: 20px; margin-top: 28px; animation: rise .4s var(--ease); }
.tl-panel small { font: 600 24px/1.2 var(--body); font-variant-numeric: tabular-nums; color: var(--rust); direction: ltr; text-align: start; }
.tl-panel b { display: block; font-size: 19px; }
.tl-panel p { margin-top: 4px; color: var(--ink-muted); }

/* tools — variant Bento: filter + chips */
.tools-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tools-chips li { display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: var(--r-in); border: var(--stroke) solid var(--line); background: var(--deep); font-size: 15px; font-weight: 500; transition: opacity .3s, background .3s, color .3s, border-color .3s; }
.tools-chips li .dia { width: 6px; height: 6px; opacity: 0; transition: opacity .3s; }
.tools-chips li.on { background: var(--sand); color: var(--ink-text); border-color: var(--sand); }
.tools-chips li.on .dia { opacity: 1; background: var(--rust); }
.tools-chips li.off { opacity: .28; }

/* closing bento */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; gap: 10px; padding: clamp(22px, 3vw, 32px); border-radius: var(--r); transition: transform .35s var(--ease); }
.tile:hover { transform: translateY(-3px); }
.tile-sand { background: var(--sand); color: var(--ink-text); }
.tile-sand, .card-sand, .block, .preview { border: var(--stroke) solid var(--line-ink); }
.tile-deep { background: var(--ink); border: var(--stroke) solid var(--line); }
.tile-accent { background: var(--accent); color: var(--accent-ink); }
.t-edu { grid-column: span 5; }
.t-certs { grid-column: span 4; }
.t-base { grid-column: span 3; justify-content: space-between; }
.t-contact { grid-column: span 12; flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; }
.t-contact:hover { transform: none; }
.gpa { display: grid; gap: 8px; margin-top: auto; padding-top: 14px; }
.gpa-num b { font: 600 40px/1 var(--body); font-variant-numeric: tabular-nums; }
.gpa-num span { margin-inline-start: 6px; color: var(--ink-muted); }
.gpa-bar { position: relative; height: 4px; border-radius: 2px; background: var(--sand-2); }
.gpa-fill { position: absolute; inset-block: 0; left: 0; width: 84.25%; border-radius: 2px; background: var(--accent); }
.gpa-dia { position: absolute; top: -5px; left: 84.25%; width: 14px; height: 14px; margin-left: -7px; background: var(--accent); }
.certs { display: grid; gap: 12px; margin-top: 6px; }
.certs li { display: flex; gap: 12px; align-items: baseline; font-weight: 600; }
.lang-label { margin-top: 10px; }
.t-city { font: 700 30px/1.2 var(--display); }
.contact-title { margin-top: 8px; font-size: clamp(36px, 5.4vw, 72px); line-height: 1.05; }
.t-contact-copy { display: grid; gap: 18px; }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.email { font: 500 clamp(18px, 2.2vw, 26px)/1.3 var(--mono); user-select: all; border-bottom: var(--stroke) solid color-mix(in srgb, var(--accent-ink) 50%, transparent); }
.magnet { display: grid; place-items: center; flex: none; width: 150px; height: 150px; margin: 36px; border-radius: var(--r); background: var(--ink-text); color: var(--sand); transform: rotate(45deg); transition: transform .25s var(--ease), background .2s; }
.magnet span { transform: rotate(-45deg); font: 700 22px/1.1 var(--display); text-align: center; }

.foot { border-top: var(--stroke) solid var(--line); }
.foot-row { display: flex; justify-content: space-between; min-height: 72px; align-items: center; color: var(--muted); font-size: 14px; }

/* drawer */
.drawer-shade { position: fixed; inset: 0; z-index: 40; background: color-mix(in srgb, var(--ink) 72%, transparent); animation: fade .3s ease; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 41; width: min(600px, 100%); overflow-y: auto; padding: calc(24px + env(safe-area-inset-top, 0px)) clamp(18px, 3vw, 36px) calc(32px + env(safe-area-inset-bottom, 0px)); background: var(--sand); color: var(--ink-text); animation: slideL .45s var(--ease); }
:root[dir="rtl"] .drawer { animation-name: slideR; }
@keyframes slideL { from { transform: translateX(100%); } }
@keyframes slideR { from { transform: translateX(-100%); } }
@keyframes fade { from { opacity: 0; } }
.drawer-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.drawer .h3 { margin-top: 18px; }
.drawer-body { display: grid; gap: 16px; margin-top: 14px; }
.drawer .block { background: var(--sand-2); padding: 16px; }
.drawer .block .flow-steps button, .drawer .block .matrix button, .drawer .block .metric, .drawer .block .cond-note, .drawer .block .bar { background: var(--sand); }
.drawer .block .flow-steps button[aria-selected="true"] { background: var(--ink-text); }
.drawer .block .matrix button.is-best { background: var(--ink-text); }
.drawer .block .matrix button[aria-pressed="true"], .drawer .block .metric-accent { background: var(--accent); }
.drawer-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 28px; padding-top: 14px; border-top: var(--stroke) solid var(--ink-text); }
.drawer-nav button { display: grid; gap: 2px; max-width: 48%; padding: 8px 0; border: 0; background: none; color: var(--ink-text); text-align: start; }
.drawer-nav small { font-size: 13px; color: var(--ink-muted); }
.drawer-nav span { font-weight: 700; line-height: 1.35; }
.drawer-nav button:hover span { color: var(--rust); }
#drawerNext { margin-inline-start: auto; text-align: end; }


/* responsive */
@media (max-width: 1060px) {
  .nav { display: none; }
  .hero-grid, .work-grid { grid-template-columns: minmax(0, 1fr); }
  .orbit-wrap { position: static; }
  .orbit-stage { max-width: 440px; }
  .t-edu, .t-certs { grid-column: span 6; }
  .t-base { grid-column: span 12; flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 12px; }
  .t-contact { flex-direction: column; align-items: flex-start; }
  .magnet { align-self: center; }
}
@media (max-width: 640px) {
  .top-actions .btn { min-height: 40px; padding: 0 12px; font-size: 14px; white-space: nowrap; }
  .top-row { gap: 12px; }
  .top-actions { gap: 8px; }
  .row { grid-template-columns: 32px minmax(0, 1fr) auto; padding-block: 20px; }
  .row-mark { display: none; }
  .row-metric { font-size: 19px; }
  .flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .matrix { grid-template-columns: 1fr repeat(3, minmax(0, .9fr)); }
  .matrix .mh { font-size: 10px; }
  .matrix button { font-size: 11px; }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  .tl-line { display: none; }
  .tl-panel { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .t-edu, .t-certs { grid-column: span 12; }
  .node { font-size: 12px; padding: 4px 9px 4px 8px; min-height: 30px; }
  .magnet { width: 120px; height: 120px; margin: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .001ms !important; }
}
@media (max-width: 420px) {
  .cv-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .brand { font-size: 17px; }
}
@media (max-width: 360px) {
  .brand { font-size: 15px; gap: 7px; }
  .top-row { gap: 8px; }
}
