/* adrianosimonet.ch
   Navy and sand, Young Serif headings, Montserrat text.
   Tweakable values (Phase 6 panel) are the --t-* variables. */

@font-face { font-family: "Young Serif"; src: url(../fonts/young-serif-regular.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url(../fonts/montserrat-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; src: url(../fonts/montserrat-latin-ext-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --navy-950: #0c1626; --navy-900: #12203a; --navy-800: #1a2c4b; --navy-700: #24395e;
  --navy-500: #4a6385; --navy-300: #9fb0c6; --navy-100: #e3e9f1; --navy-50: #f1f4f8;
  --sand: #c8a46b; --sand-ink: #85662f; --sand-50: #f5eee2; --sand-100: #ecdfc8;

  --bg: #f8f7f4; --surface: #ffffff; --surface-2: #f1efea; --line: #e4e1da; --line-strong: #c9c4b8;
  --ink: #142033; --head: #12203a; --muted: #555e6c;
  --accent-ink: var(--sand-ink); --link: var(--navy-700);
  --btn-bg: var(--navy-800); --btn-ink: #fff; --btn-bg-hover: var(--navy-950);
  --band-navy: var(--navy-900); --band-navy-ink: #eef1f6; --band-navy-muted: #b9c4d4;
  --band-sand: var(--sand-50);
  --shadow-s: 0 1px 2px rgba(18,32,58,.06), 0 2px 8px rgba(18,32,58,.05);
  --shadow-m: 0 10px 30px -6px rgba(18,32,58,.14);
  --shadow-l: 0 28px 60px -18px rgba(18,32,58,.28);

  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Young Serif", Georgia, serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --r-s: 10px; --r-m: 18px; --r-l: 28px;
  --page: 1180px; --gutter: clamp(16px, 4vw, 40px);

  /* tweakable */
  --t-hero-pad-top: clamp(32px, 6vw, 88px);
  --t-hero-pad-bottom: clamp(40px, 6vw, 96px);
  --t-hero-gap: clamp(28px, 5vw, 72px);
  --t-greet-size: clamp(3.4rem, 9vw, 7rem);
  --t-section-pad: clamp(56px, 8vw, 112px);
  --t-portrait-radius: 28px;
  --t-card-radius: 28px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0c1626; --surface: #12203a; --surface-2: #162745; --line: #24395e; --line-strong: #3a5277;
  --ink: #e8ebf0; --head: #f6f3ec; --muted: #a9b5c6;
  --accent-ink: #d8b77f; --link: #c9d6e8;
  --btn-bg: #c8a46b; --btn-ink: #0c1626; --btn-bg-hover: #dcbd88;
  --band-navy: #08101d; --band-navy-ink: #eef1f6; --band-navy-muted: #a9b5c6;
  --band-sand: #111e35;
  --sand-50: #111e35; --sand-100: #1b2d4d;
  --shadow-s: 0 1px 2px rgba(0,0,0,.3);
  --shadow-m: 0 12px 30px -8px rgba(0,0,0,.5);
  --shadow-l: 0 28px 60px -18px rgba(0,0,0,.65);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scroll-padding-top: 96px; }
body { overflow-x: clip; margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; transition: background .3s, color .3s; }
img, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--head); }
h1, h2, h3, .h3 { font-family: var(--serif); font-weight: 400; color: var(--head); margin: 0; line-height: 1.12; letter-spacing: -.005em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); margin-bottom: .6em; }
h3, .h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; } p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--sand); color: var(--navy-950); }
:focus-visible { outline: 3px solid var(--sand); outline-offset: 3px; border-radius: 6px; }
html { scrollbar-color: var(--line-strong) transparent; }
code { font-size: .92em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }

.container { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }
.lead { font-size: clamp(1.06rem, 1.5vw, 1.2rem); color: var(--muted); max-width: 62ch; }
.subline { font-size: 1.15rem; color: var(--accent-ink); font-weight: 600; margin: .5em 0 1em; }
.meta { font-size: .88rem; color: var(--muted); display: block; }
.note { font-size: .92rem; color: var(--muted); max-width: 70ch; margin-top: 2.5rem; }
.credit { font-size: .78rem; color: var(--muted); margin-top: .6rem; text-align: right; }
.spaced { margin-top: 2.6rem; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--r-s); background: var(--navy-900); color: #fff; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; color: #fff; }
.arrow { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); flex: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 48px; padding: 0 1.35em; border-radius: 999px;
  font: inherit; font-size: .95rem; font-weight: 650; text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: background .25s var(--ease), color .25s, border-color .25s, transform .25s var(--ease), box-shadow .25s; }
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); }
.btn-primary:hover { background: var(--btn-bg-hover); color: var(--btn-ink); transform: translateY(-1px); box-shadow: var(--shadow-m); }
.btn-primary:hover .arrow { transform: translateX(4px); }
.btn-ghost { background: transparent; color: var(--head); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--head); color: var(--head); background: var(--surface); }
.btn-danger { background: transparent; color: #a3302a; border-color: #e3b5b1; }
[data-theme="dark"] .btn-danger { color: #f0a29b; border-color: #6b2f2b; }
.btn-danger:hover { background: #a3302a; color: #fff; border-color: #a3302a; }
.btn-s { min-height: 38px; padding: 0 1em; font-size: .88rem; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(18,32,58,.4); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: block; margin-right: auto; }
.brand img { height: 50px; width: auto; }
.logo-dark { display: none !important; }
[data-theme="dark"] .logo-light { display: none !important; }
[data-theme="dark"] .logo-dark { display: block !important; }
.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav > ul { display: flex; gap: 4px; }
.site-nav li { position: relative; }
.site-nav a { display: block; padding: 10px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 550; font-size: .95rem; }
.site-nav > ul > li > a:hover { background: var(--surface-2); color: var(--head); }
.site-nav a[aria-current="page"] { color: var(--head); box-shadow: inset 0 -2px 0 var(--sand); border-radius: 0; }
.sub { position: absolute; left: 0; top: 100%; min-width: 250px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: var(--shadow-l); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .2s var(--ease), visibility .2s; }
.has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.sub a { border-radius: var(--r-s); }
.sub a:hover { background: var(--surface-2); }
.theme-toggle { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--head); cursor: pointer; margin-left: 6px; }
.theme-toggle:hover { border-color: var(--line-strong); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.i-sun { display: none; } [data-theme="dark"] .i-sun { display: block; } [data-theme="dark"] .i-moon { display: none; }
.menu-toggle { display: none; align-items: center; gap: 10px; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; font: inherit; font-weight: 600; color: var(--head); cursor: pointer; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .3s var(--ease), background .2s; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; } .menu-icon::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .header-inner { min-height: 66px; }
  .brand img { height: 42px; }
  .menu-toggle { display: inline-flex; }
  .site-nav { position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: 12px var(--gutter) 24px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-l); transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s, transform .3s var(--ease), visibility .25s; max-height: calc(100dvh - 66px); overflow-y: auto; }
  .site-nav.open { opacity: 1; visibility: visible; transform: none; }
  .site-nav > ul { flex-direction: column; }
  .site-nav a { padding: 14px 6px; font-size: 1.1rem; border-radius: 0; border-bottom: 1px solid var(--line); }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 18px; background: none; min-width: 0; }
  .sub a { font-size: 1rem; color: var(--muted); }
  .theme-toggle { margin: 16px 0 0; }
}

/* ---------- Breadcrumbs ---------- */
.crumbs { padding-top: 20px; font-size: .88rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); }
.crumbs li + li::before { content: "→"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--head); text-decoration: underline; }
.crumbs [aria-current] { color: var(--head); font-weight: 600; }

/* ---------- Hero (home) ---------- */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--t-hero-gap); align-items: center; padding-top: var(--t-hero-pad-top); padding-bottom: var(--t-hero-pad-bottom); }
.display { font-size: var(--t-greet-size); line-height: .95; margin-bottom: .35em; }
.display .greet { display: block; }
.hero-sub { display: block; font-size: .38em; line-height: 1.2; margin-top: .35em; color: var(--accent-ink); }
.hero .lead { margin-bottom: 1.8rem; }
.hero-portrait { margin: 0; position: relative; }
.hero-portrait::before { content: ""; position: absolute; inset: 22px -22px -22px 22px; border: 1.5px solid var(--sand); border-radius: var(--t-portrait-radius); z-index: -1; }
.frame img, .frame { display: block; }
.pos-50-55 img { object-position: 50% 55%; }
.frame img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--t-portrait-radius); box-shadow: var(--shadow-l); }
.hero-portrait .frame img { aspect-ratio: 4 / 5; filter: grayscale(1); }

/* ---------- Bands ---------- */
.section { padding-block: var(--t-section-pad); }
.section-tight { padding-top: 8px; }
.band { padding-block: var(--t-section-pad); position: relative; }
.band-navy { background: var(--band-navy); color: var(--band-navy-ink); }
.band-navy h2, .band-navy h3 { color: #fff; }
.band-navy p { color: var(--band-navy-muted); }
.band-sand { background: var(--band-sand); }
.band-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 24px; margin-bottom: 28px; }
.band-head h2 { margin: 0; }
.link-light { color: var(--sand); font-weight: 650; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.link-light:hover { color: #fff; } .link-light:hover .arrow { transform: translateX(4px); }

.latest { display: grid; border-top: 1px solid rgba(255,255,255,.14); }
.latest a { display: grid; grid-template-columns: 220px 110px 1fr auto; gap: 16px; align-items: baseline; padding: 20px 4px; color: inherit; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.14); transition: background .25s, padding .3s var(--ease); }
.latest a:hover { background: rgba(255,255,255,.05); padding-left: 14px; }
.latest a:hover .arrow { transform: translateX(4px); }
.latest-course { font-family: var(--serif); font-size: 1.25rem; color: #fff; }
.latest-week { color: var(--sand); font-weight: 650; font-variant-numeric: tabular-nums; }
.latest-topic { color: var(--band-navy-muted); }
.latest-empty { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 32px; align-items: center; padding: 28px 0 4px; border-top: 1px solid rgba(255,255,255,.14); }
.latest-empty p { font-size: 1.1rem; margin: 0; }
.wave-line { width: 100%; height: 70px; fill: none; stroke: var(--sand); stroke-width: 2.4; stroke-dasharray: 8 10; animation: dash 18s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -360; } }
@media (max-width: 760px) {
  .latest a { grid-template-columns: 1fr auto; gap: 2px 12px; }
  .latest-week { grid-column: 1; } .latest-topic { grid-column: 1; } .latest a .arrow { grid-row: 1 / span 3; grid-column: 2; align-self: center; }
  .latest-empty { grid-template-columns: 1fr; gap: 12px; }
}

/* ---------- Big cards ---------- */
.card-grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.card-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .card-grid.three, .card-grid.two { grid-template-columns: 1fr; } }
@media (min-width: 620px) and (max-width: 900px) { .card-grid.three { grid-template-columns: 1fr 1fr; } }
.big-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--t-card-radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-s); color: inherit; text-decoration: none;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s; }
.big-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-l); color: inherit; }
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.big-card.tall .card-media { aspect-ratio: 4 / 5; }
.card-media picture, .card-media img.cover, .card-media .cover img { width: 100%; height: 100%; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.big-card:hover .card-media img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: clamp(20px, 2.4vw, 28px); flex: 1; }
.card-body p { color: var(--muted); margin: 0; }
.card-cta { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: .95rem; color: var(--head); }
.big-card:hover .card-cta .arrow, .student-card:hover .arrow, .course-tile:hover > .arrow { transform: translateX(5px); }
.media-dynova { display: grid; place-items: center; background:
  radial-gradient(circle at 20% 30%, var(--navy-50), transparent 60%), var(--surface-2); }
.media-dynova img { width: 62% !important; height: auto !important; object-fit: contain !important; }
[data-theme="dark"] .media-dynova { background: radial-gradient(circle at 20% 30%, var(--navy-800), transparent 60%), var(--surface-2); }
[data-theme="dark"] .media-dynova img { filter: brightness(0) invert(.92); }
.big-card:hover .media-dynova img { transform: scale(1.03); }
/* Dynova card in the black-and-white "old print" look of the photo cards */
.media-dynova.vintage, [data-theme="dark"] .media-dynova.vintage { background: url(../img/grain.png), radial-gradient(ellipse at 50% 45%, #d9d6cf 0%, #a9a59c 70%, #6f6c66 100%); background-size: 160px 160px, auto; }
.media-dynova.vintage img, [data-theme="dark"] .media-dynova.vintage img { filter: grayscale(1) contrast(1.4) brightness(.35); mix-blend-mode: multiply; opacity: .92; }
.media-tutoring { background: var(--navy-900); display: grid; place-items: center; }
.media-tutoring svg { width: 100%; height: 100%; }
.media-tutoring .formula { fill: none; stroke: #4a6385; stroke-width: 3; stroke-linecap: round; }
.media-tutoring .lock { fill: none; stroke: var(--sand); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; transition: transform .6s var(--ease); transform-origin: 200px 140px; }
.big-card:hover .media-tutoring .lock { transform: scale(1.08); }

/* ---------- Split sections ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.split-photo { margin: 0; }
.split-photo .frame img { aspect-ratio: 4 / 5; }
.split-photo.wide .frame img { aspect-ratio: 16 / 10; }
.page-hero { padding-top: clamp(28px, 4vw, 56px); padding-bottom: clamp(32px, 5vw, 64px); }
.page-hero h1 { margin-bottom: .45em; }
@media (max-width: 860px) {
  .hero, .split { grid-template-columns: 1fr; }
  .hero-portrait { max-width: 420px; }
  .hero-portrait::before { inset: 14px -12px -14px 12px; }
  .split-photo .frame img { aspect-ratio: 4 / 3; }
}
.mini-path { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 28px 0 32px; position: relative; }
.mini-path::before { content: ""; position: absolute; left: 6px; right: 6px; top: 7px; height: 2px; background: linear-gradient(90deg, var(--sand), var(--navy-500)); }
.mini-path li { padding: 28px 14px 0 0; position: relative; }
.mini-path li::before { content: ""; position: absolute; top: 0; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--sand); }
.mini-path li:last-child::before { background: var(--sand); }
.mini-path b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.5rem; color: var(--head); }
.mini-path span { display: block; font-size: .85rem; line-height: 1.4; color: var(--muted); }

/* ---------- Dynova ---------- */
.dynova-hero .dynova-logo { width: min(260px, 60vw); margin-bottom: 26px; }
[data-theme="dark"] .dynova-logo { filter: brightness(0) invert(.92); }
.narrow-split { display: grid; grid-template-columns: .8fr 1.2fr; gap: 32px; align-items: start; padding-top: 0; }
.big-statement { font-family: var(--serif); font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.35; color: var(--head); margin: 0; }
@media (max-width: 860px) { .narrow-split { grid-template-columns: 1fr; } }
.layers { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.layers-figure { margin: 0; background: #fff; border-radius: var(--r-l); padding: 18px; box-shadow: var(--shadow-m); }
.layers-figure img { border-radius: var(--r-m); }
.layers-figure figcaption { font-size: .8rem; color: #555e6c; padding: 10px 4px 0; }
.layer-stack { margin-top: 24px; counter-reset: l; }
.layer-stack li { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 16px 0 16px 18px; border-top: 1px solid var(--line-strong); position: relative; }
.layer-stack li:last-child { border-bottom: 1px solid var(--line-strong); }
.layer-stack b { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; color: var(--head); }
.layer-stack span { color: var(--muted); }
.layer-stack li.is-mine { background: color-mix(in srgb, var(--sand) 18%, transparent); }
.layer-stack li.is-mine { border-top-color: var(--sand); }
.layer-stack li.is-mine + li { border-top-color: var(--sand); }
.layer-stack li.is-mine b { color: var(--accent-ink); }
@media (max-width: 860px) { .layers { grid-template-columns: 1fr; } .layers-figure { max-width: 420px; } .layer-stack li { grid-template-columns: 1fr; gap: 2px; } }
.role-text { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 980px; margin-bottom: 44px; }
.role-text p { font-size: 1.08rem; }
@media (max-width: 760px) { .role-text { grid-template-columns: 1fr; gap: 0; } }
.sensor-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-m); overflow: hidden; }
.sensor { background: var(--band-navy); padding: 24px 20px 26px; }
.sensor-icon { width: 44px; height: 44px; fill: none; stroke: var(--sand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.sensor h3 { font-size: 1.2rem; margin-bottom: .45em; }
.sensor p { font-size: .9rem; margin: 0; }
@media (max-width: 1000px) { .sensor-row { grid-template-columns: repeat(2, 1fr); } .sensor:last-child { grid-column: span 2; } }
@media (max-width: 520px) { .sensor-row { grid-template-columns: 1fr; } .sensor:last-child { grid-column: auto; } }
.timeline-h { display: grid; grid-template-columns: repeat(6, 1fr); margin: 40px 0 48px; position: relative; }
.timeline-h li { position: relative; padding: 30px 14px 0 0; }
.timeline-h li::before { content: ""; position: absolute; top: 8px; left: 0; right: 0; height: 2px; background: var(--line-strong); }
.timeline-h li.done::before { background: var(--sand); }
.timeline-h li::after { content: ""; position: absolute; top: 1px; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--line-strong); }
.timeline-h li.done::after { border-color: var(--sand); background: var(--sand); }
.timeline-h b { display: block; font-size: .85rem; color: var(--accent-ink); font-weight: 650; }
.timeline-h span { display: block; font-family: var(--serif); color: var(--head); font-size: 1.05rem; line-height: 1.3; margin-top: 4px; }
@media (max-width: 860px) {
  .timeline-h { grid-template-columns: 1fr; margin-left: 6px; }
  .timeline-h li { padding: 0 0 22px 32px; }
  .timeline-h li::before { top: 0; bottom: 0; left: 7px; right: auto; width: 2px; height: auto; }
}
.supervisor { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; padding: 26px 30px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); }
.supervisor p { margin: 0; max-width: 56ch; font-size: 1.05rem; }

/* ---------- Quote ---------- */
.quote-band { background: var(--band-navy); color: #fff; padding-block: clamp(56px, 8vw, 104px); }
.quote { margin-inline: auto; text-align: center; }
.quote blockquote { margin: 0; }
.quote p { font-family: var(--serif); font-size: clamp(2.2rem, 6vw, 4.4rem); line-height: 1.05; color: #fff; text-wrap: balance; }
.quote p::before { content: "\201C"; color: var(--sand); margin-right: .05em; }
.quote p::after { content: "\201D"; color: var(--sand); margin-left: .05em; }
.quote figcaption { margin-top: 18px; color: var(--sand); font-weight: 650; letter-spacing: .02em; }

/* ---------- Teaching ---------- */
.course-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
@media (max-width: 760px) { .course-grid { grid-template-columns: 1fr; } }
.course-tile { position: relative; display: flex; align-items: flex-end; min-height: clamp(260px, 30vw, 360px); padding: clamp(24px, 3vw, 36px);
  border-radius: var(--t-card-radius); overflow: hidden; background: var(--navy-900); color: #fff; text-decoration: none; isolation: isolate;
  box-shadow: var(--shadow-m); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.course-tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-l); color: #fff; }
.course-tile .viz { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.course-tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, rgba(8,16,29,.85)); }
.course-tile h2 { color: #fff; margin: 0 0 .2em; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.course-meta { color: var(--navy-300); font-size: .9rem; margin: 0; }
.course-count { margin: 10px 0 0; display: inline-block; padding: 4px 12px; border-radius: 99px; background: rgba(200,164,107,.18); color: var(--sand); font-weight: 650; font-size: .85rem; }
.course-tile > .arrow { position: absolute; right: 28px; bottom: 32px; width: 28px; height: 28px; color: var(--sand); }
.course-hero { position: relative; min-height: clamp(320px, 38vw, 460px); display: flex; align-items: flex-end; background: var(--navy-950); color: #fff; overflow: hidden; isolation: isolate; }
.course-hero .viz-hero { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 62%; z-index: -1; }
.course-hero::after { content: ""; position: absolute; left: 0; right: 0; top: 40%; height: 22%; z-index: -1; background: linear-gradient(180deg, rgba(12,22,38,0), var(--navy-950)); }
.course-hero-inner { padding-block: 48px 40px; }
.course-hero h1 { color: #fff; }
.course-hero .subline { color: var(--sand); margin-bottom: 0; }
.infobox { margin-top: 16px; display: inline-block; padding: 10px 16px; border-radius: var(--r-s); background: rgba(255,255,255,.1); color: #fff; }
.week-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px 24px; align-items: center; padding: 18px 22px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); transition: border-color .3s, box-shadow .3s; }
.week-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow-m); }
.week-row.is-current { padding: 26px 28px; border-color: var(--sand); box-shadow: var(--shadow-m); }
.week-num { width: 64px; height: 64px; border-radius: 16px; display: grid; place-content: center; text-align: center; background: var(--surface-2); color: var(--head); font-family: var(--serif); font-size: 1.6rem; line-height: 1; }
.week-num small { font-family: var(--font); font-size: .62rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 4px; }
.is-current .week-num { background: var(--sand); color: var(--navy-950); } .is-current .week-num small { color: var(--navy-800); }
.week-title { font-weight: 650; font-size: 1.05rem; color: var(--head); text-decoration: none; } .week-title:hover { text-decoration: underline; }
.week-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.week-list { display: grid; gap: 12px; }
@media (max-width: 680px) { .week-row { grid-template-columns: auto 1fr; } .week-actions { grid-column: 1 / -1; justify-content: flex-start; } }
.slides-frame { margin-top: 28px; border-radius: var(--r-l); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-m); background: #fff; aspect-ratio: 16 / 10; }
.slides-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); font-weight: 600; }
.pager a { text-decoration: underline; text-underline-offset: 4px; } .pager a:hover { color: var(--head); }
.back { margin-top: 32px; font-weight: 600; }

/* ---------- Empty state & notices ---------- */
.empty-state { display: grid; justify-items: start; gap: 12px; padding: 36px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-l); color: var(--muted); }
.empty-state svg { width: 140px; fill: none; stroke: var(--sand); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.empty-state p { margin: 0; font-size: 1.05rem; }
.notice { padding: 12px 16px; border-radius: var(--r-s); background: color-mix(in srgb, var(--sand) 22%, var(--surface)); color: var(--head); margin-bottom: 20px; font-weight: 550; }
.notice.error, .field-error { background: color-mix(in srgb, #c0392b 12%, var(--surface)); color: #8e2a22; }
[data-theme="dark"] .notice.error, [data-theme="dark"] .field-error { color: #f3b2ab; }
.field-error { padding: 10px 14px; border-radius: var(--r-s); font-weight: 550; font-size: .92rem; margin: 0; }

/* ---------- Tutoring ---------- */
.student-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.student-card { display: flex; flex-direction: column; gap: 6px; padding: 26px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; box-shadow: var(--shadow-s); transition: transform .45s var(--ease), box-shadow .45s; }
.student-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-l); color: inherit; }
.student-card b { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; color: var(--head); }
.initial { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-900); color: var(--sand); font-family: var(--serif); font-size: 1.5rem; margin-bottom: 10px; }
.initial.big { width: 72px; height: 72px; font-size: 2rem; margin: 0 auto 8px; }
.login-wrap { display: grid; place-items: center; min-height: 60vh; }
.login-card { width: min(440px, 100%); display: grid; gap: 10px; padding: clamp(26px, 4vw, 40px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-l); }
.login-card h1 { font-size: 2rem; text-align: center; margin-bottom: 14px; }
.login-card label, .admin-form label { font-weight: 650; font-size: .92rem; color: var(--head); display: grid; gap: 6px; }
.login-card input, .admin-form input:not([type="radio"]):not([type="checkbox"]), .admin-form select, .admin-form textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line-strong); border-radius: var(--r-s); padding: 12px 14px; width: 100%; }
.login-card input#code { font-size: 1.4rem; letter-spacing: .14em; text-transform: uppercase; text-align: center; font-variant-numeric: tabular-nums; }
.login-card input:focus, .admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus { outline: none; border-color: var(--sand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sand) 35%, transparent); }
input[aria-invalid="true"] { border-color: #c0392b !important; }
.login-card .btn { margin-top: 8px; }
.hint { font-size: .85rem; color: var(--muted); margin: 0; }
.help { font-size: .88rem; color: var(--muted); text-align: center; margin-top: 8px; }
.tut-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; }
.tut-head h1 { font-size: clamp(2rem, 4vw, 3rem); }
.doc-list { display: grid; gap: 12px; }
.doc { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 18px 22px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
.doc b { color: var(--head); }
.doc-kind { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); color: var(--head); }
.doc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 620px) { .doc { grid-template-columns: auto 1fr; } .doc-actions { grid-column: 1 / -1; } }

/* ---------- About ---------- */
.langs { display: flex; gap: 12px; align-items: baseline; font-weight: 600; color: var(--head); margin-top: 1.4rem; }
.langs span { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
.timeline { position: relative; margin-top: 12px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 12px; bottom: 12px; width: 2px; background: linear-gradient(var(--sand), var(--line-strong)); }
.timeline li { display: grid; grid-template-columns: 150px 120px 1fr; gap: 24px; align-items: start; padding: 0 0 36px 40px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--band-sand); border: 3px solid var(--sand); }
.timeline li:first-child::before { background: var(--sand); }
.tl-period { font-weight: 650; color: var(--head); padding-top: 2px; font-variant-numeric: tabular-nums; }
.tl-logo { background: #fff; border: 1px solid var(--line); border-radius: var(--r-s); height: 64px; display: grid; place-items: center; padding: 10px; }
.tl-logo img { max-height: 44px; width: auto; object-fit: contain; }
.tl-text h3 { font-size: 1.3rem; }
.tl-place { color: var(--accent-ink); font-weight: 600; margin: 4px 0 6px; }
.tl-desc { color: var(--muted); }
@media (max-width: 760px) { .timeline li { grid-template-columns: 1fr; gap: 8px; } .tl-logo { width: 130px; } }

/* ---------- Log ---------- */
.log-hero { position: relative; min-height: clamp(240px, 32vw, 380px); display: flex; align-items: flex-end; color: #fff; isolation: isolate; overflow: hidden; }
.log-hero-img, .log-hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.log-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12,22,38,.1), rgba(12,22,38,.78)); }
.log-hero-inner { padding-block: 40px; } .log-hero h1 { color: #fff; } .log-hero .lead { color: #e3e9f1; margin: .4em 0 0; }
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.entry-card { display: block; border-radius: var(--r-l); overflow: hidden; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: transform .45s var(--ease), box-shadow .45s; }
.entry-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-l); color: inherit; }
.entry-card .card-media { aspect-ratio: 4 / 3; }
.entry .facts { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.facts div { padding: 14px 20px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); min-width: 140px; }
.facts dt { font-size: .78rem; color: var(--muted); font-weight: 600; } .facts dd { margin: 0; font-family: var(--serif); font-size: 1.5rem; color: var(--head); }
.route { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 20px; margin: 28px 0; }
.route-map { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 10px; width: 100%; max-height: 360px; }
.route-map polyline { fill: none; stroke: var(--navy-700); stroke-width: 8; stroke-linejoin: round; stroke-linecap: round; }
[data-theme="dark"] .route-map polyline { stroke: var(--navy-300); }
.route-map .start { fill: var(--sand); }
.route-map .end { fill: var(--navy-900); stroke: var(--sand); stroke-width: 4; }
[data-theme="dark"] .route-map .end { fill: #fff; }
.profile { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px 18px 10px; align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; }
.profile-plot { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.y-axis { display: flex; flex-direction: column; justify-content: space-between; font-size: .8rem; color: var(--muted); text-align: right; padding: 4px 0 2px; font-variant-numeric: tabular-nums; }
.profile svg { width: 100%; height: 200px; border-left: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.profile polygon { fill: color-mix(in srgb, var(--sand) 30%, transparent); } .profile polyline { fill: none; stroke: var(--sand-ink); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.profile figcaption { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); padding: 6px 0 0 58px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .route { grid-template-columns: 1fr; } }
.prose { max-width: 68ch; font-size: 1.08rem; } .prose p { margin-bottom: 1.1em; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 32px; }
.gallery figure { margin: 0; } .gallery img { border-radius: var(--r-m); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { font-size: .85rem; color: var(--muted); padding-top: 6px; }

/* ---------- Contact ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 36px; max-width: 900px; }
.contact-card { padding: 30px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s); display: grid; gap: 16px; }
.contact-card svg { width: 40px; height: 40px; fill: none; stroke: var(--sand-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="dark"] .contact-card svg { stroke: var(--sand); }
.contact-value { font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 1.6rem); color: var(--head); text-decoration: none; overflow-wrap: anywhere; }
@media (max-width: 680px) { .contact-cards { grid-template-columns: 1fr; } }

/* ---------- 404 & legal ---------- */
.notfound { text-align: center; display: grid; justify-items: center; gap: 12px; }
.notfound svg { width: min(320px, 80%); fill: none; stroke: var(--sand); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 12px; }
.notfound .dash { stroke: var(--line-strong); stroke-dasharray: 6 8; }
.legal h1 { margin-bottom: .6em; } .legal h2 { font-size: 1.5rem; margin-top: 1.6em; }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: var(--navy-900); color: #d7deea; margin-top: 40px; }
[data-theme="dark"] .site-footer { background: #08101d; }
.ridge { position: absolute; left: 0; right: 0; top: -59px; width: 100%; height: 60px; fill: var(--navy-900); }
[data-theme="dark"] .ridge { fill: #08101d; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 20px 40px; align-items: center; padding-block: 44px 36px; }
.footer-brand img { width: 170px; }
.footer-text p { margin: 0; color: #b9c4d4; font-size: .92rem; }
.footer-name { color: #fff !important; font-weight: 600; }
.site-footer a { color: #e3e9f1; text-decoration: none; } .site-footer a:hover { color: var(--sand); text-decoration: underline; }
.footer-nav { display: flex; gap: 18px; font-size: .92rem; }
.footer-copy { grid-column: 1 / -1; margin: 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; color: #8d9bb1; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }

/* ---------- Admin ---------- */
.admin main { min-height: 70vh; }
.admin-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 26px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-tabs a { padding: 8px 14px; border-radius: 99px; text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--ink); }
.admin-tabs a[aria-current] { background: var(--navy-900); color: #fff; }
[data-theme="dark"] .admin-tabs a[aria-current] { background: var(--sand); color: var(--navy-950); }
.admin-wrap h1 { font-size: clamp(2rem, 3.6vw, 2.8rem); margin-bottom: .6em; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.admin-stats a { padding: 26px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.admin-stats b { font-family: var(--serif); font-weight: 400; font-size: 2rem; color: var(--head); }
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; margin-top: 20px; }
@media (max-width: 900px) { .admin-cols { grid-template-columns: 1fr; } }
.admin-box { padding: 24px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); margin-top: 20px; }
.admin-cols > .admin-box { margin-top: 0; }
.admin-box summary { cursor: pointer; font-weight: 650; color: var(--head); }
.admin-box h2 { margin-bottom: 14px; }
.admin-form { display: grid; gap: 14px; margin-top: 12px; }
.admin-form small { font-weight: 400; color: var(--muted); }
.admin-form .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radio-row { border: 0; padding: 0; margin: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.radio-row legend { font-weight: 650; font-size: .92rem; color: var(--head); margin-bottom: 6px; }
.radio-row label { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.admin-form .btn { justify-self: start; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--r-m); overflow: hidden; border: 1px solid var(--line); }
.admin-table th { text-align: left; font-size: .8rem; color: var(--muted); font-weight: 650; padding: 12px 16px; background: var(--surface-2); }
.admin-table td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-actions form { margin: 0; }
.admin-list { display: grid; gap: 8px; margin-bottom: 24px; }
.admin-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line); }
.code-reveal { padding: 20px 24px; border-radius: var(--r-l); background: var(--navy-900); color: #e3e9f1; margin-bottom: 24px; }
.code-reveal .code { font-family: var(--serif); font-size: 2.4rem; letter-spacing: .12em; color: var(--sand); margin: 6px 0 0; }
@media (max-width: 700px) { .admin-table thead { display: none; } .admin-table tr { display: grid; padding: 8px 0; } .admin-table td { border: 0; padding: 6px 16px; } .admin-table tr + tr { border-top: 1px solid var(--line); } }
.upload-progress { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.upload-progress span { display: block; height: 100%; width: 0; background: var(--sand); transition: width .2s; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
  .big-card:hover, .course-tile:hover, .student-card:hover, .entry-card:hover { transform: none; }
}
@media print { .site-header, .site-footer, .theme-toggle { display: none; } body { background: #fff; color: #000; } }
