/* Roboto Slab from TU Delft's public typography package, Apache 2.0.
 * Kept local so the public website and protected portal need no font CDN. */
@font-face {
    font-family: "Roboto Slab";
    src: url("../fonts/roboto-slab-variable.ttf") format("truetype");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

/*
 * Delft Learning Platform
 * Server-rendered academic interface. No frontend framework or build step required.
 */

/* Public landing page and academic record */
.landing-hero { background: #0c2340; color: #ffffff; }
.landing-hero__inner { padding-block: 4.5rem; }
.landing-hero h1 { color: #fff; font-size: clamp(2.8rem, 5.6vw, 4.9rem); letter-spacing: -.055em; line-height: 1.05; }
.landing-hero__intro { max-width: 760px; font-size: 1.17rem; line-height: 1.75; margin-block: 1.5rem; }
.landing-hero__actions { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-top: 2rem; }
.landing-destinations { background: #ffffff; }
.destination-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.destination-card { display: flex; flex-direction: column; padding: 1.6rem; border: 1px solid #e7e7e7; background: #fff; color: #000000; text-decoration: none; border-radius: var(--radius); transition: transform 160ms ease, border-color 160ms ease; }
.destination-card:hover { transform: translateY(-4px); border-color: #0076c2; color: #0c2340; }
.destination-card__number { color: #5c5c5c; text-transform: uppercase; font-size: .65rem; font-weight: 700; letter-spacing: .07em; margin-bottom: 2.2rem; }
.destination-card h3 { font-size: 1.3rem; letter-spacing: -.03em; }
.destination-card p { color: #5c5c5c; font-size: .9rem; flex: 1; }
.destination-card__link { display: flex; justify-content: space-between; gap: .6rem; font-size: .8rem; font-weight: 700; margin-top: 1rem; }
.destination-card--accent { background: #e6f6fa; border-color: #e7e7e7; }
.landing-education { border-left: 3px solid #00a6d6; padding-left: 2rem; }
.project-card__accent { height: 8px; background: linear-gradient(90deg, #0076c2 0 75%, #00a6d6 75%); }
.cv-layout.cv-layout--wide { grid-template-columns: minmax(190px, .32fr) minmax(0, 1fr); gap: 3.5rem; }
.cv-index, .cv-profile-links { display: grid; gap: .65rem; }
.cv-index a { font-size: .85rem; color: #000000; text-decoration: none; }
.cv-index a:hover { color: #0076c2; text-decoration: underline; }
.cv-profile-links { border-top: 1px solid #e7e7e7; margin-top: 1.8rem; padding-top: 1.3rem; margin-bottom: 1.3rem; font-size: .82rem; }
.cv-section { scroll-margin-top: 110px; }
.publication-item__note { color: #5c5c5c; font-size: .8rem; font-style: italic; margin-top: .5rem; }
.opportunity-list { border-top: 1px solid #e7e7e7; }
.opportunity-card { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 1.5rem; padding-block: 2.6rem; border-bottom: 1px solid #e7e7e7; scroll-margin-top: 100px; }
.opportunity-card__number { color: #0076c2; font-family: var(--font-heading); font-size: 2.5rem; }
.opportunity-card h3 { max-width: 900px; font-size: clamp(1.35rem, 2.5vw, 1.75rem); line-height: 1.35; }
.opportunity-card p { max-width: 800px; }
.opportunity-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; color: #5c5c5c; font-size: .8rem; margin-block: 1.2rem; }
.opportunity-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; margin: 1.2rem 0 .7rem; }
@media (max-width: 1050px) { .destination-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 800px) { .cv-layout.cv-layout--wide { grid-template-columns: 1fr; } .cv-index { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
    .landing-hero__inner { padding-block: 3rem; }
    .destination-grid { grid-template-columns: 1fr; }
    .destination-card__number { margin-bottom: 1rem; }
    .landing-education { padding-left: 1.3rem; }
    .opportunity-card { grid-template-columns: 1fr; gap: .5rem; }
    .opportunity-card__number { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto !important; } .destination-card, .project-card { transition: none !important; } }
@media print { .public-header, .public-footer, .cv-sidebar, .cv-hero .btn, .citation-details { display: none !important; } .cv-layout.cv-layout--wide { display: block; } .cv-entry, .publication-item { break-inside: avoid; } }

:root {
    --font-body: Arial, Helvetica, sans-serif;
    --font-heading: "Roboto Slab", Georgia, serif;
    --brand-cyan: #00a6d6;
    --brand-navy: #0c2340;
    --brand-royal: #0076c2;
    --primary: #0076c2;
    --primary-strong: #0c2340;
    --primary-soft: #e6f6fa;
    --primary-faint: #e6f6fa;
    --accent: #0076c2;
    --accent-soft: #e6f6fa;
    --ink: #000000;
    --ink-soft: #000000;
    --muted: #5c5c5c;
    --muted-light: #5c5c5c;
    --line: #e7e7e7;
    --line-strong: #9d9d9d;
    --canvas: #ffffff;
    --surface: #ffffff;
    --surface-subtle: #e7e7e7;
    --success: #009b77;
    --success-soft: #e7e7e7;
    --warning: #000000;
    --warning-soft: #ffb81c;
    --danger: #a50034;
    --danger-soft: #e7e7e7;
    --info: #0076c2;
    --info-soft: #e6f6fa;
    --shadow-sm: 0 1px 2px rgba(24, 42, 49, 0.06);
    --shadow-md: 0 8px 24px rgba(24, 42, 49, 0.08);
    --radius-xs: 3px;
    --radius-sm: 2px;
    --radius: 2px;
    --radius-lg: 4px;
    --content-width: 1180px;
    --reading-width: 820px;
    --transition: 160ms ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    color: var(--ink);
    background: var(--canvas);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
}

body.menu-open {
    overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 0.55em;
    color: var(--ink);
    font-weight: 720;
    line-height: 1.22;
}

h1 { font-size: clamp(1.65rem, 3vw, 2.15rem); letter-spacing: -0.025em; }
h2 { font-size: 1.25rem; letter-spacing: -0.01em; }
h3 { font-size: 1rem; }
h4 { font-size: 0.9rem; }

p {
    margin: 0 0 1rem;
}

ul,
ol {
    margin: 0 0 1rem 1.3rem;
    padding: 0;
}

li + li {
    margin-top: 0.35rem;
}

a {
    color: var(--primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--primary-strong);
}

button,
input,
select,
textarea {
    font: inherit;
}

fieldset {
    min-width: 0;
    margin: 0;
}

legend {
    padding: 0;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

img,
video,
iframe {
    max-width: 100%;
}

code,
kbd,
pre {
    font-family: Consolas, "Liberation Mono", monospace;
}

code,
kbd {
    padding: 0.08rem 0.28rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-xs);
    color: var(--ink-soft);
    background: var(--surface-subtle);
}

hr {
    height: 1px;
    margin: 1.4rem 0;
    border: 0;
    background: var(--line);
}

:focus-visible {
    outline: 3px solid #000000;
    outline-offset: 2px;
}

[hidden] {
    display: none !important;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.65rem 0.9rem;
    color: #fff;
    background: var(--primary-strong);
    border-radius: var(--radius-sm);
    transform: translateY(-160%);
    transition: transform var(--transition);
}

.skip-link:focus {
    transform: translateY(0);
}

.container {
    width: min(100% - 3rem, var(--content-width));
    margin-inline: auto;
}

.container--reading {
    width: min(100% - 3rem, var(--reading-width));
}

.main-content {
    flex: 1;
    padding: 1.65rem 0 3rem;
}

.main-content--flush {
    padding-top: 0;
}

.site-header {
    position: sticky;
    z-index: 100;
    top: 0;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.97);
    border-top: 4px solid var(--brand-cyan);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

.header-inner {
    min-height: 62px;
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--ink);
    font-weight: 760;
    letter-spacing: -0.015em;
    text-decoration: none;
}

.brand:hover {
    color: var(--primary-strong);
    text-decoration: none;
}

.brand-mark {
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--primary);
    border-radius: var(--radius-sm);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.brand-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.08;
}

.brand-copy small {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 650;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    padding: 0.48rem 0.65rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 700;
}

.main-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.main-nav > a,
.nav-link {
    padding: 0.46rem 0.62rem;
    color: var(--muted);
    border-radius: var(--radius-sm);
    font-size: 0.87rem;
    font-weight: 680;
    text-decoration: none;
}

.main-nav > a:hover,
.nav-link:hover,
.main-nav > a[aria-current="page"] {
    color: var(--primary-strong);
    background: var(--primary-faint);
    text-decoration: none;
}

.user-menu {
    margin-left: 0.45rem;
    padding-left: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-left: 1px solid var(--line);
}

.user-chip {
    max-width: 180px;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.25;
}

.user-chip strong {
    display: block;
    overflow: hidden;
    color: var(--ink-soft);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-footer {
    margin-top: auto;
    padding: 1.65rem 0;
    color: var(--muted);
    background: var(--surface);
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(140px, 0.6fr));
    gap: 2rem;
}

.footer-brand {
    max-width: 520px;
}

.footer-title {
    margin-bottom: 0.45rem;
    color: var(--ink-soft);
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.footer-list {
    margin: 0;
    list-style: none;
}

.footer-list li + li {
    margin-top: 0.3rem;
}

.footer-list a {
    color: var(--muted);
}

.footer-meta {
    margin-top: 1.4rem;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--line);
    font-size: 0.79rem;
}

.page-header {
    margin-bottom: 1.35rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
}

.page-header__copy {
    min-width: 0;
}

.page-header h1 {
    margin-bottom: 0.32rem;
}

.page-header__actions {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
}

.page-kicker {
    margin-bottom: 0.45rem;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.page-kicker--inverse {
    color: rgba(255, 255, 255, 0.74);
}

.page-intro,
.lede {
    max-width: 760px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.96rem;
}

.breadcrumb {
    margin: 0 0 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.38rem;
    color: var(--muted);
    font-size: 0.8rem;
    list-style: none;
}

.breadcrumb li {
    margin: 0;
}

.breadcrumb li:not(:last-child)::after {
    content: "/";
    margin-left: 0.38rem;
    color: var(--line-strong);
}

.breadcrumb a {
    color: var(--muted);
}

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: var(--primary-strong);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0 0 0 auto;
    width: min(43vw, 620px);
    opacity: 0.18;
    background-image:
        linear-gradient(90deg, transparent 23px, rgba(255, 255, 255, 0.22) 24px),
        linear-gradient(transparent 23px, rgba(255, 255, 255, 0.22) 24px);
    background-size: 24px 24px;
    transform: skewX(-9deg) translateX(12%);
}

.hero__inner {
    position: relative;
    z-index: 1;
    min-height: 430px;
    padding-block: clamp(4rem, 8vw, 6.5rem);
    display: grid;
    grid-template-columns: minmax(0, 700px) minmax(240px, 1fr);
    align-items: center;
    gap: 4rem;
}

.hero h1 {
    max-width: 700px;
    margin-bottom: 1rem;
    color: #fff;
    font-size: clamp(2.25rem, 5vw, 4rem);
    line-height: 1.05;
}

.hero p {
    max-width: 650px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.08rem;
}

.hero__actions {
    margin-top: 1.55rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.hero-card {
    padding: 1.25rem;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.hero-card__label {
    margin-bottom: 0.75rem;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero .hero-card p {
    color: var(--muted);
}

.hero .hero-card__label {
    color: var(--primary);
}

.feature-strip {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.feature-strip__inner {
    padding-block: 1.25rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.feature-point {
    padding-left: 0.85rem;
    border-left: 3px solid var(--primary-soft);
}

.feature-point strong {
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.88rem;
}

.feature-point span {
    color: var(--muted);
    font-size: 0.8rem;
}

.content-section {
    padding-block: 3rem;
}

.content-section + .content-section {
    border-top: 1px solid var(--line);
}

.section-heading {
    max-width: 680px;
    margin-bottom: 1.5rem;
}

.section-heading p {
    margin-bottom: 0;
    color: var(--muted);
}

.card,
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card {
    padding: 1.2rem;
}

.card--interactive {
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.card--interactive:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card--muted {
    background: var(--surface-subtle);
    box-shadow: none;
}

.card--accent {
    border-top: 4px solid var(--brand-cyan);
}

.card__header,
.panel__header {
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
}

.card__header h2,
.card__header h3,
.panel__header h2,
.panel__header h3 {
    margin-bottom: 0.16rem;
}

.card__header p,
.panel__header p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.card__footer,
.panel__footer {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--line);
}

.panel__body {
    padding: 1.25rem;
}

.panel__header {
    margin: 0;
    padding: 1rem 1.25rem;
}

.panel__footer {
    margin: 0;
    padding: 0.85rem 1.25rem;
}

.grid {
    display: grid;
    gap: 1rem;
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.layout-sidebar {
    display: grid;
    grid-template-columns: minmax(230px, 275px) minmax(0, 1fr);
    align-items: start;
    gap: 1.25rem;
}

.layout-aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 330px);
    align-items: start;
    gap: 1.25rem;
}

.stack > * + * {
    margin-top: 1rem;
}

.stack--tight > * + * {
    margin-top: 0.55rem;
}

.sidebar-nav {
    margin: 0;
    list-style: none;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    padding: 0.58rem 0.72rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--ink-soft);
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    font-weight: 650;
    text-decoration: none;
}

.sidebar-nav a:hover,
.sidebar-nav a[aria-current="page"] {
    color: var(--primary-strong);
    background: var(--primary-soft);
}

.sidebar-nav__count {
    color: var(--muted);
    font-size: 0.73rem;
    font-variant-numeric: tabular-nums;
}

.stat {
    min-height: 112px;
    padding: 1.05rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.stat__value {
    margin-bottom: 0.22rem;
    color: var(--primary-strong);
    font-size: 1.8rem;
    font-weight: 780;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}

.stat__label {
    color: var(--muted);
    font-size: 0.8rem;
}

.stat__trend {
    margin-top: 0.55rem;
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 700;
}

.badge {
    min-height: 1.4rem;
    padding: 0.16rem 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--muted);
    background: var(--surface-subtle);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1.1;
    white-space: nowrap;
}

.badge::before {
    width: 0.42rem;
    height: 0.42rem;
    display: block;
    background: currentColor;
    border-radius: 50%;
    content: "";
    opacity: 0.72;
}

.badge--success { color: #000000; background: var(--success-soft); border-color: #e7e7e7; }
.badge--warning { color: #000000; background: var(--warning-soft); border-color: #ffb81c; }
.badge--danger { color: #a50034; background: var(--danger-soft); border-color: #e7e7e7; }
.badge--info { color: #000000; background: var(--info-soft); border-color: #e7e7e7; }
.badge--neutral { color: var(--muted); background: var(--surface-subtle); border-color: var(--line); }

.badge--plain::before {
    display: none;
}

.progress-group {
    display: grid;
    gap: 0.75rem;
}

.progress-row {
    display: grid;
    gap: 0.36rem;
}

.progress-row__label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 680;
}

.progress-row__label span:last-child {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.progress {
    width: 100%;
    height: 0.52rem;
    display: block;
    overflow: hidden;
    appearance: none;
    border: 0;
    background: #e7e7e7;
    border-radius: 999px;
}

.progress::-webkit-progress-bar {
    background: #e7e7e7;
    border-radius: 999px;
}

.progress::-webkit-progress-value {
    background: var(--primary);
    border-radius: 999px;
}

.progress::-moz-progress-bar {
    background: var(--primary);
    border-radius: 999px;
}

.progress--optional::-webkit-progress-value {
    background: var(--accent);
}

.progress--optional::-moz-progress-bar {
    background: var(--accent);
}

.course-card {
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

.course-card__meta {
    margin-bottom: 0.7rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.course-card h2 {
    margin-bottom: 0.4rem;
    font-size: 1.18rem;
}

.course-card p {
    color: var(--muted);
    font-size: 0.88rem;
}

.course-card__footer {
    margin-top: auto;
    padding-top: 1rem;
}

.week-list {
    margin: 0;
    list-style: none;
}

.week-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.week-card + .week-card {
    margin-top: 0.8rem;
}

.week-card__header {
    padding: 0.9rem 1.05rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--primary-faint);
    border-bottom: 1px solid var(--line);
}

.week-card__header h2 {
    margin: 0;
    font-size: 1rem;
}

.week-card__header p {
    margin: 0.18rem 0 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.learning-list {
    margin: 0;
    list-style: none;
}

.learning-list li {
    margin: 0;
}

.learning-list li + li {
    border-top: 1px solid var(--line);
}

.learning-item {
    padding: 0.82rem 1.05rem;
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
    color: inherit;
    text-decoration: none;
}

.learning-item:hover {
    color: inherit;
    background: #ffffff;
    text-decoration: none;
}

.learning-item__type {
    width: 2.15rem;
    height: 2.15rem;
    display: grid;
    place-items: center;
    color: var(--primary-strong);
    background: var(--primary-soft);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.learning-item__copy {
    min-width: 0;
}

.learning-item__copy strong {
    display: block;
    color: var(--ink);
    font-size: 0.88rem;
}

.learning-item__copy span {
    color: var(--muted);
    font-size: 0.77rem;
}

.learning-item__state {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.completion-mark {
    width: 1.45rem;
    height: 1.45rem;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 800;
}

.completion-mark.is-complete {
    color: #fff;
    background: var(--success);
    border-color: var(--success);
}

.meta-list {
    margin: 0;
    display: grid;
    gap: 0.65rem;
}

.meta-list__row {
    display: grid;
    grid-template-columns: minmax(100px, 0.45fr) minmax(0, 1fr);
    gap: 0.75rem;
    font-size: 0.84rem;
}

.meta-list dt {
    color: var(--muted);
}

.meta-list dd {
    margin: 0;
    color: var(--ink-soft);
    font-weight: 650;
}

.lab-brief dd {
    font-weight: 400;
}

.activity-header {
    padding: 1.4rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 5px solid var(--primary);
    border-radius: var(--radius);
}

.activity-header__meta {
    margin-top: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.reading-content {
    color: var(--ink-soft);
    font-size: 1rem;
    line-height: 1.72;
}

.reading-content h2,
.reading-content h3 {
    margin-top: 1.6em;
}

.reading-content pre {
    max-width: 100%;
    padding: 1rem;
    overflow: auto;
    color: #ffffff;
    background: #0c2340;
    border-radius: var(--radius-sm);
}

.video-shell {
    overflow: hidden;
    color: #fff;
    background: #000000;
    border: 1px solid #000000;
    border-radius: var(--radius);
}

.video-shell video {
    width: 100%;
    max-height: 72vh;
    display: block;
    background: #000;
}

.video-shell__caption {
    padding: 0.65rem 0.85rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.77rem;
}

.callout {
    padding: 0.9rem 1rem;
    color: var(--ink-soft);
    background: var(--primary-faint);
    border: 1px solid #e7e7e7;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
}

.callout--warning { background: var(--warning-soft); border-color: #ffb81c; border-left-color: var(--warning); }
.callout--danger { background: var(--danger-soft); border-color: #e7e7e7; border-left-color: var(--danger); }
.callout--success { background: var(--success-soft); border-color: #e7e7e7; border-left-color: var(--success); }

.callout h2,
.callout h3 {
    margin-bottom: 0.25rem;
    font-size: 0.92rem;
}

.callout p:last-child {
    margin-bottom: 0;
}

.btn {
    min-height: 2.3rem;
    padding: 0.52rem 0.86rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: var(--primary-strong);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 720;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.btn:hover {
    color: var(--primary-strong);
    background: var(--primary-faint);
    border-color: var(--primary);
    text-decoration: none;
}

.btn--primary {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.btn--primary:hover {
    color: #fff;
    background: var(--primary-strong);
    border-color: var(--primary-strong);
}

.btn--dark {
    color: #fff;
    background: var(--ink);
    border-color: var(--ink);
}

.btn--dark:hover {
    color: #fff;
    background: #000000;
    border-color: #000000;
}

.btn--danger {
    color: var(--danger);
    border-color: #a50034;
}

.btn--danger:hover {
    color: #fff;
    background: var(--danger);
    border-color: var(--danger);
}

.btn--ghost {
    background: transparent;
    border-color: transparent;
}

.btn--small {
    min-height: 1.92rem;
    padding: 0.34rem 0.62rem;
    font-size: 0.76rem;
}

.btn--large {
    min-height: 2.75rem;
    padding: 0.7rem 1.1rem;
    font-size: 0.92rem;
}

.btn--block {
    width: 100%;
}

.btn:disabled,
.btn[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.55;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.button-row--spread {
    justify-content: space-between;
}

.button-row--center {
    justify-content: center;
}

.inline-form {
    display: inline;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1rem;
}

.field {
    margin-bottom: 1rem;
}

.field--full {
    grid-column: 1 / -1;
}

.label,
.field > label {
    margin-bottom: 0.34rem;
    display: block;
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 720;
}

.required {
    color: var(--danger);
}

.input,
.select,
.textarea {
    width: 100%;
    min-height: 2.5rem;
    padding: 0.58rem 0.7rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid #5c5c5c;
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.textarea {
    min-height: 7rem;
    resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 166, 214, 0.1);
}

.input[aria-invalid="true"],
.select[aria-invalid="true"],
.textarea[aria-invalid="true"] {
    border-color: var(--danger);
}

.field-help,
.field-error,
.character-count {
    margin: 0.3rem 0 0;
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
}

.field-error {
    color: var(--danger);
    font-weight: 650;
}

.character-count {
    text-align: right;
}

.check-row,
.radio-row {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
}

.check-row input,
.radio-row input {
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 auto;
    margin-top: 0.22rem;
    accent-color: var(--primary);
}

.choice-list {
    display: grid;
    gap: 0.55rem;
}

.choice {
    padding: 0.72rem 0.78rem;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.choice:hover,
.choice:focus-within {
    border-color: var(--primary);
    background: var(--primary-faint);
}

.choice input {
    margin-top: 0.24rem;
    accent-color: var(--primary);
}

.file-drop {
    padding: 1.4rem;
    text-align: center;
    background: var(--primary-faint);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
}

.file-drop:focus-within,
.file-drop.is-dragging {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.file-drop input[type="file"] {
    max-width: 100%;
}

.file-name {
    margin: 0.45rem 0 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.alert {
    position: relative;
    margin-bottom: 1rem;
    padding: 0.78rem 2.6rem 0.78rem 0.9rem;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--info);
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
}

.alert--success { color: #000000; background: var(--success-soft); border-color: #e7e7e7; border-left-color: var(--success); }
.alert--warning { color: #000000; background: var(--warning-soft); border-color: #ffb81c; border-left-color: var(--warning); }
.alert--danger { color: #a50034; background: var(--danger-soft); border-color: #e7e7e7; border-left-color: var(--danger); }
.alert--info { color: #000000; background: var(--info-soft); border-color: #e7e7e7; border-left-color: var(--info); }

.alert p:last-child {
    margin-bottom: 0;
}

.alert__close {
    position: absolute;
    top: 0.42rem;
    right: 0.45rem;
    width: 1.8rem;
    height: 1.8rem;
    display: grid;
    place-items: center;
    color: currentColor;
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.data-table th,
.data-table td {
    padding: 0.7rem 0.78rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--ink-soft);
    background: var(--surface-subtle);
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: #ffffff;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.cell-primary {
    display: block;
    color: var(--ink);
    font-weight: 700;
}

.cell-secondary {
    display: block;
    margin-top: 0.16rem;
    color: var(--muted);
    font-size: 0.75rem;
}

.timeline {
    margin: 0;
    list-style: none;
}

.timeline__item {
    position: relative;
    margin: 0;
    padding: 0 0 1.15rem 1.45rem;
    border-left: 2px solid var(--line);
}

.timeline__item:last-child {
    padding-bottom: 0;
    border-color: transparent;
}

.timeline__item::before {
    position: absolute;
    top: 0.18rem;
    left: -0.42rem;
    width: 0.72rem;
    height: 0.72rem;
    background: var(--surface);
    border: 2px solid var(--line-strong);
    border-radius: 50%;
    content: "";
}

.timeline__item.is-complete::before {
    background: var(--success);
    border-color: var(--success);
}

.timeline__item.is-current::before {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.timeline__item h3 {
    margin-bottom: 0.16rem;
}

.timeline__item p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.79rem;
}

.rubric {
    display: grid;
    gap: 0.8rem;
}

.rubric-item {
    padding: 0.9rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.rubric-item__header {
    margin-bottom: 0.55rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.rubric-item__score {
    color: var(--primary-strong);
    font-weight: 780;
    white-space: nowrap;
}

.check-list {
    margin: 0;
    list-style: none;
}

.check-list li {
    margin: 0;
    padding: 0.48rem 0;
    display: grid;
    grid-template-columns: 1.25rem minmax(0, 1fr);
    gap: 0.5rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.82rem;
}

.check-list li:last-child {
    border-bottom: 0;
}

.check-list__mark {
    color: var(--success);
    font-weight: 800;
}

.check-list__mark.is-error {
    color: var(--danger);
}

.question {
    scroll-margin-top: 6rem;
}

.question + .question {
    margin-top: 1rem;
}

.question__number {
    margin-bottom: 0.3rem;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.question__prompt {
    margin-bottom: 0.8rem;
    color: var(--ink);
    font-weight: 680;
}

.quiz-navigation {
    position: sticky;
    top: 82px;
}

.question-index {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.4rem;
    list-style: none;
}

.question-index a {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    background: var(--surface-subtle);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 750;
    text-decoration: none;
}

.question-index a:hover {
    color: var(--primary-strong);
    border-color: var(--primary);
    background: var(--primary-soft);
}

.auth-shell {
    min-height: calc(100vh - 230px);
    padding: 3rem 0;
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(100%, 470px);
    padding: 1.6rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 4px solid var(--brand-cyan);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.auth-card__header {
    margin-bottom: 1.3rem;
}

.auth-card__header h1 {
    margin-bottom: 0.35rem;
    font-size: 1.55rem;
}

.auth-card__header p,
.auth-note {
    color: var(--muted);
    font-size: 0.84rem;
}

.auth-divider {
    margin: 1.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--muted);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    height: 1px;
    flex: 1;
    background: var(--line);
    content: "";
}

.empty-state {
    padding: 2.25rem 1.25rem;
    color: var(--muted);
    text-align: center;
}

.empty-state__mark {
    width: 2.8rem;
    height: 2.8rem;
    margin: 0 auto 0.8rem;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 800;
}

.empty-state h2,
.empty-state h3 {
    margin-bottom: 0.32rem;
    color: var(--ink-soft);
}

.empty-state p {
    max-width: 500px;
    margin: 0 auto;
}

.empty-state .button-row {
    margin-top: 1rem;
    justify-content: center;
}

.error-page {
    min-height: 50vh;
    display: grid;
    place-items: center;
    text-align: center;
}

.error-page__code {
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-size: clamp(3rem, 12vw, 6.5rem);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 1;
}

.notice-bar {
    padding: 0.7rem 0;
    color: #fff;
    background: var(--primary-strong);
    font-size: 0.78rem;
}

.notice-bar__inner {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.tabs {
    margin: 0 0 1.2rem;
    display: flex;
    gap: 0.2rem;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    list-style: none;
}

.tabs li {
    margin: 0;
}

.tabs a {
    margin-bottom: -1px;
    padding: 0.65rem 0.8rem;
    display: block;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.tabs a:hover,
.tabs a[aria-current="page"] {
    color: var(--primary-strong);
    border-bottom-color: var(--primary);
}

.key-value {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.82rem;
}

.key-value + .key-value {
    margin-top: 0.52rem;
    padding-top: 0.52rem;
    border-top: 1px solid var(--line);
}

.key-value span:first-child {
    color: var(--muted);
}

.key-value strong:last-child {
    text-align: right;
}

.avatar-list {
    margin: 0;
    display: grid;
    gap: 0.55rem;
    list-style: none;
}

.person-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.person-row__avatar {
    width: 2.1rem;
    height: 2.1rem;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: var(--primary-strong);
    background: var(--primary-soft);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 800;
}

.person-row__copy {
    min-width: 0;
    font-size: 0.82rem;
}

.person-row__copy strong,
.person-row__copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.person-row__copy span {
    color: var(--muted);
    font-size: 0.74rem;
}

.score-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.score-bar .progress {
    flex: 1;
}

.score-bar strong {
    width: 3.2rem;
    color: var(--primary-strong);
    font-size: 0.78rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.toolbar {
    margin-bottom: 1rem;
    padding: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.toolbar .field {
    min-width: 170px;
    margin-bottom: 0;
}

.mobile-only { display: none; }
.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-small { font-size: 0.79rem; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-tabular { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 980px) {
    .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-sidebar,
    .layout-aside { grid-template-columns: 1fr; }
    .quiz-navigation { position: static; }
    .hero__inner { grid-template-columns: minmax(0, 1fr) 280px; gap: 2rem; }
}

@media (max-width: 820px) {
    .container,
    .container--reading { width: min(100% - 2rem, var(--content-width)); }
    .nav-toggle { display: inline-flex; }
    .main-nav {
        position: fixed;
        inset: 66px 0 auto;
        max-height: calc(100vh - 66px);
        padding: 0.8rem 1rem 1rem;
        display: none;
        align-items: stretch;
        flex-direction: column;
        overflow-y: auto;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-md);
    }
    .main-nav.is-open { display: flex; }
    .main-nav > a,
    .nav-link { padding: 0.65rem 0.75rem; }
    .user-menu {
        margin: 0.4rem 0 0;
        padding: 0.8rem 0 0;
        align-items: flex-start;
        flex-direction: column;
        border-top: 1px solid var(--line);
        border-left: 0;
    }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .hero__inner { min-height: 0; grid-template-columns: 1fr; }
    .hero-card { max-width: 500px; }
    .hero::after { width: 65vw; }
    .feature-strip__inner { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-header { align-items: flex-start; flex-direction: column; }
    .page-header__actions { justify-content: flex-start; }
}

@media (max-width: 620px) {
    body { font-size: 14px; }
    .main-content { padding-top: 1.2rem; }
    .brand-copy small { display: none; }
    .footer-grid,
    .grid--2,
    .grid--3,
    .grid--4,
    .feature-strip__inner,
    .form-grid { grid-template-columns: 1fr; }
    .footer-brand { grid-column: auto; }
    .footer-meta { flex-direction: column; }
    .hero__inner { padding-block: 3.2rem; }
    .hero h1 { font-size: 2.2rem; }
    .hero-card { display: none; }
    .content-section { padding-block: 2.2rem; }
    .card,
    .panel__body,
    .activity-header { padding: 1rem; }
    .panel__header,
    .panel__footer { padding-inline: 1rem; }
    .learning-item { grid-template-columns: 2.1rem minmax(0, 1fr); }
    .learning-item__state { grid-column: 2; justify-content: flex-start; }
    .week-card__header { align-items: flex-start; flex-direction: column; }
    .meta-list__row { grid-template-columns: 1fr; gap: 0.1rem; }
    .button-row .btn { flex: 1 1 auto; }
    .btn--mobile-block { width: 100%; }
    .data-table th,
    .data-table td { padding: 0.62rem 0.6rem; }
    .mobile-only { display: initial; }
}

.stream-grid { display: grid; gap: 1rem; padding: 1rem 1.25rem 1.25rem; }
.stream-section { min-width: 0; }
.stream-section > h3 { margin: 0 0 .55rem; color: var(--color-primary-dark, #0c2340); font-size: .83rem; letter-spacing: .06em; text-transform: uppercase; }
.stream-section .learning-list { margin: 0; }
.input--compact { min-width: 9.5rem; padding: .45rem .55rem; }
@media (min-width: 900px) { .stream-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stream-section:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* Public academic site */
.public-site {
    --public-dark: #0c2340;
    --public-deep: #0c2340;
    --public-gold: #0076c2;
    background: #ffffff;
}

.public-main { flex: 1; }

.public-header {
    position: sticky;
    z-index: 100;
    top: 0;
    background: rgba(255, 255, 255, 0.97);
    border-top: 4px solid var(--brand-cyan);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
}

.public-header__inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.academic-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.72rem;
    color: var(--ink);
    text-decoration: none;
}

.academic-brand:hover { color: var(--ink); }

.academic-brand__mark {
    width: 2.875rem;
    height: 2.875rem;
    flex: 0 0 auto;
    display: block;
    object-fit: contain;
    background: transparent;
}

.academic-brand strong,
.academic-brand small { display: block; }
.academic-brand strong { font-size: 0.98rem; line-height: 1.15; }
.academic-brand small { margin-top: 0.22rem; color: var(--muted); font-size: 0.67rem; letter-spacing: 0.075em; text-transform: uppercase; }

.public-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.18rem;
}

.public-nav > a:not(.btn) {
    padding: 0.6rem 0.62rem;
    color: var(--ink-soft);
    font-size: 0.86rem;
    font-weight: 650;
    text-decoration: none;
    border-radius: var(--radius-sm);
}

.public-nav > a:not(.btn):hover,
.public-nav > a:not(.btn)[aria-current="page"] { color: var(--primary-strong); background: var(--primary-faint); }
.public-nav__portal { margin-left: 0.5rem; }

.profile-hero,
.public-page-hero,
.project-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(18, 55, 67, 0.98), rgba(18, 55, 67, 0.93)),
        repeating-linear-gradient(90deg, transparent 0 55px, rgba(255,255,255,.05) 55px 56px);
}

.profile-hero::after,
.public-page-hero::after,
.project-hero::after {
    position: absolute;
    inset: 0 0 0 auto;
    width: 45%;
    content: "";
    pointer-events: none;
    opacity: 0.35;
    background:
        linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 42px 42px;
    transform: perspective(520px) rotateY(-11deg) scale(1.1);
    transform-origin: right center;
}

.profile-hero__grid {
    position: relative;
    z-index: 1;
    min-height: 550px;
    padding-block: 5rem;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.72fr);
    align-items: center;
    gap: clamp(3rem, 8vw, 7rem);
}

.profile-hero h1,
.public-page-hero h1,
.project-hero h1 {
    max-width: 850px;
    color: #fff;
    font-size: clamp(2.8rem, 6vw, 5.4rem);
    font-weight: 760;
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.profile-hero__role { color: #ffffff; font-size: 1rem; font-weight: 620; }
.profile-hero__statement { max-width: 700px; margin: 1.5rem 0 2rem; color: #ffffff; font-size: clamp(1.08rem, 1.7vw, 1.35rem); line-height: 1.55; }

.profile-portrait-wrap { display: flex; justify-content: center; }
.profile-portrait {
    width: min(100%, 360px);
    aspect-ratio: 4 / 5;
    display: block;
    object-fit: cover;
    border: 8px solid rgba(255, 255, 255, 0.14);
    border-radius: 180px 180px 24px 24px;
    box-shadow: 0 28px 70px rgba(2, 20, 26, 0.35);
}

.profile-portrait--placeholder {
    display: grid;
    place-content: center;
    text-align: center;
    background: linear-gradient(145deg, rgba(255,255,255,.17), rgba(255,255,255,.06));
}
.profile-portrait--placeholder span { font-size: 1.4rem; font-weight: 750; }
.profile-portrait--placeholder small { color: #ffffff; }

.btn--light { color: var(--primary-strong); background: #fff; border-color: #fff; }
.btn--light:hover { color: var(--primary-strong); background: #e6f6fa; border-color: #e6f6fa; }
.btn--outline-light { color: #fff; background: transparent; border-color: rgba(255,255,255,.6); }
.btn--outline-light:hover { color: var(--primary-strong); background: #fff; border-color: #fff; }

.preview-notice { padding: 0.72rem 0; color: #000000; background: #ffb81c; border-bottom: 1px solid #ffb81c; font-size: 0.8rem; }

.public-section { padding-block: clamp(3.8rem, 7vw, 6rem); }
.public-section--tinted { background: #e6f6fa; border-block: 1px solid #e7e7e7; }
.public-section--dark { color: #ffffff; background: var(--public-deep); }
.public-section--dark h2 { color: #fff; }

.section-heading--split { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.section-heading--split > div { max-width: 720px; }
.section-heading--inverse h2,
.section-heading--inverse p { color: #fff; }
.section-heading--inverse p { color: #ffffff; }

.text-link { flex: 0 0 auto; font-weight: 700; text-decoration: none; }
.text-link--inverse { color: #fff; }
.text-link--inverse:hover { color: #fff; text-decoration: underline; }

.public-card-grid { gap: 1.25rem; }
.project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.project-grid--featured > .project-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: center;
}

.research-theme-card,
.learning-principle,
.teaching-course-card,
.course-public-card {
    padding: 1.65rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 4px solid var(--brand-cyan);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.research-theme-card__number,
.learning-principle > span { display: block; margin-bottom: 1.45rem; color: var(--public-gold); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; }
.research-theme-card h3,
.learning-principle h3 { font-size: 1.22rem; }
.research-theme-card p,
.learning-principle p { color: var(--muted); }
.research-theme-card a,
.teaching-course-card a { font-weight: 700; text-decoration: none; }

.project-card {
    min-width: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.project-card__image { width: 100%; aspect-ratio: 16 / 9; display: block; object-fit: cover; }
.project-card__image--contain { aspect-ratio: auto; height: auto; object-fit: contain; padding: .65rem; background: #fff; }
.project-card__image--placeholder {
    display: grid;
    place-items: center;
    color: rgba(255,255,255,.74);
    background:
        radial-gradient(circle at 75% 25%, rgba(255,255,255,.18) 0 8%, transparent 9%),
        linear-gradient(135deg, var(--primary), var(--public-deep));
}
.project-card__image--placeholder span { font-size: 4rem; font-weight: 800; opacity: 0.55; }
.project-card__body { padding: 1.4rem; }
.project-card__meta { margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; color: var(--muted); font-size: 0.74rem; }
.project-card h3 { font-size: 1.15rem; }
.project-card h3 a { color: var(--ink); text-decoration: none; }
.project-card h3 a:hover { color: var(--primary); text-decoration: underline; }
.project-card p { color: var(--muted); }
.project-card__role { margin-bottom: 0 !important; color: var(--ink-soft) !important; font-size: 0.79rem; font-weight: 700; }
.project-card__funders { margin: 0.65rem 0 0; font-size: 0.79rem; line-height: 1.5; }
.project-card__funders strong { color: var(--ink-soft); }

.public-two-column,
.public-contact,
.editorial-layout,
.cv-layout { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: clamp(2.5rem, 7vw, 6rem); align-items: start; }

.publication-stack { display: grid; gap: 0; border-top: 1px solid var(--line); }
.publication-item { padding: 1.35rem 0; display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: 1rem; border-bottom: 1px solid var(--line); }
.publication-item__year { color: var(--public-gold); font-weight: 800; font-variant-numeric: tabular-nums; }
.publication-item__type { margin-bottom: 0.28rem; color: var(--muted); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.publication-item h3 { margin-bottom: 0.38rem; font-size: 1.02rem; line-height: 1.4; }
.publication-item h3 a { color: var(--ink); text-decoration: none; }
.publication-item h3 a:hover { color: var(--primary); text-decoration: underline; }
.publication-item__authors,
.publication-item__venue { margin-bottom: 0.25rem; color: var(--muted); font-size: 0.82rem; }
.citation-details { margin-top: 0.75rem; color: var(--muted); font-size: 0.78rem; }
.citation-details summary { cursor: pointer; color: var(--primary); font-weight: 700; }
.citation-details p { margin: 0.55rem 0 0; padding: 0.75rem; background: var(--primary-faint); border-left: 3px solid var(--primary); }

.course-public-card { color: var(--ink); border-top-color: var(--public-gold); }
.course-public-card h3 { font-size: 1.28rem; }
.course-public-card p:last-child { margin-bottom: 0; color: var(--muted); }
.teaching-portal-callout { margin-top: 1.4rem; padding: 1.1rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); }
.teaching-portal-callout p { max-width: 700px; margin: 0; }

.public-contact { align-items: center; }
.public-contact__actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 0.7rem; }

.public-page-hero__inner { position: relative; z-index: 1; max-width: 900px; padding-block: clamp(4rem, 8vw, 7rem); }
.public-page-hero--compact .public-page-hero__inner { padding-block: clamp(3.2rem, 6vw, 5rem); }
.public-page-hero .public-page-hero__sync { margin-top: 1.25rem; margin-bottom: 0; font-size: .85rem; line-height: 1.5; }
.public-page-hero h1,
.project-hero h1 { font-size: clamp(2.55rem, 5vw, 4.5rem); }
.public-page-hero__inner > p:last-of-type:not(.page-kicker),
.project-hero__grid > div > p:not(.page-kicker) { max-width: 740px; color: #ffffff; font-size: 1.08rem; }

.research-theme-list { display: grid; gap: 0; }
.research-theme-index { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin-top: 2rem; }
.research-theme-index a { color: #fff; font-size: .85rem; text-underline-offset: .25em; }
.research-theme-detail { padding: 3.4rem 0; display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: clamp(2rem, 7vw, 6rem); border-top: 1px solid var(--line); scroll-margin-top: 100px; }
.research-theme-detail:first-child { padding-top: 0; border-top: 0; }
.research-theme-detail__title > span { display: block; margin-bottom: 1.1rem; color: var(--public-gold); font-weight: 800; letter-spacing: .12em; }
.research-theme-detail__title h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.research-theme-detail__title p,
.research-theme-detail__body p { color: var(--muted); }
.research-theme-detail__body .research-theme-detail__question { color: var(--ink); font-size: 1.15rem; font-weight: 600; line-height: 1.6; }
.research-theme-detail__body { display: grid; gap: 1.25rem; }
.research-theme-detail__body > div { padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }

.link-list { margin-left: 0; list-style: none; }
.link-list li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.link-list a { font-weight: 680; text-decoration: none; }

.project-hero__grid { position: relative; z-index: 1; padding-block: clamp(4rem, 8vw, 6.5rem); display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr); gap: clamp(2.5rem, 7vw, 6rem); align-items: end; }
.project-hero__badges { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.project-hero__badges span { color: #ffffff; font-size: .8rem; }
.badge--inverse { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); }
.project-facts { margin: 0; padding: 1.35rem; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); }
.project-facts > div + div { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid rgba(255,255,255,.14); }
.project-facts dt { color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.project-facts dd { margin: .2rem 0 0; color: #fff; }

.editorial-layout { grid-template-columns: minmax(0, 1.3fr) minmax(240px, .5fr); }
.editorial-layout--single { grid-template-columns: minmax(0, 760px); }
.public-prose { max-width: 760px; font-size: 1.02rem; }
.public-prose h2 { margin-top: 2rem; font-size: 1.55rem; }
.public-prose h3 { margin-top: 1.5rem; font-size: 1.15rem; }
.project-links { padding: 1.35rem; background: var(--primary-faint); border: 1px solid var(--line); border-radius: var(--radius); }
.project-links h2 { margin-top: 1.3rem; font-size: .92rem; }
.project-links h2:first-child { margin-top: 0; }
.project-visual { margin-bottom: 3.5rem; }
.project-visual__image { display: block; width: 100%; height: auto; background: #fff; }
.project-visual figcaption { margin-top: 1rem; color: var(--muted); font-size: .8rem; line-height: 1.6; }
.project-visual figcaption p { margin-bottom: .3rem; }

.publication-page { max-width: 900px; }
.publication-group + .publication-group { margin-top: 3.5rem; }
.publication-group > h2 { margin-bottom: 1.2rem; font-size: 1.55rem; }

.teaching-course-group + .teaching-course-group { margin-top: 2.5rem; }
.teaching-course-group > h3 { margin-bottom: 1rem; font-size: 1.4rem; }
.teaching-course-card h4 { font-size: 1.3rem; }
.teaching-course-card p { color: var(--muted); }

.cv-hero { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.cv-layout { grid-template-columns: minmax(220px, .45fr) minmax(0, 1.55fr); }
.cv-sidebar { position: sticky; top: 105px; padding: 1.35rem; background: var(--primary-faint); border-top: 4px solid var(--brand-cyan); }
.preview-note { color: var(--warning); font-size: .8rem; }
.cv-sections { display: grid; gap: 3rem; }
.cv-section { scroll-margin-top: 100px; }
.cv-section > h2 { padding-bottom: .7rem; border-bottom: 2px solid var(--ink); font-size: 1.45rem; }
.cv-entry { padding: 1.15rem 0; display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1.3rem; border-bottom: 1px solid var(--line); }
.cv-entry__date { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.cv-entry h3 { margin-bottom: .2rem; }
.cv-entry__org { color: var(--muted); font-weight: 650; }

.public-empty { grid-column: 1 / -1; padding: 3rem; text-align: center; background: var(--primary-faint); border: 1px dashed var(--line-strong); }

.public-footer { margin-top: auto; padding: 3.3rem 0 1.4rem; color: #ffffff; background: #0c2340; }
.public-footer h2 { color: #fff; font-size: .86rem; letter-spacing: .04em; }
.public-footer p,
.public-footer li { color: #ffffff; font-size: .8rem; }
.public-footer a { color: #fff; }
.public-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; }
.public-footer__meta { margin-top: 2.2rem; padding-top: 1rem; display: flex; justify-content: space-between; gap: 1rem; color: #ffffff; border-top: 1px solid rgba(255,255,255,.14); font-size: .7rem; }

@media (max-width: 900px) {
    .academic-brand small { display: none; }
    .profile-hero__grid { min-height: 490px; grid-template-columns: minmax(0, 1.25fr) minmax(220px, .55fr); gap: 2.5rem; }
    .public-two-column,
    .editorial-layout,
    .public-contact { grid-template-columns: 1fr; gap: 2rem; }
    .public-contact__actions { justify-content: flex-start; }
    .research-theme-detail { gap: 2.5rem; }
}

@media (max-width: 820px) {
    .project-grid { grid-template-columns: 1fr; }
    .project-grid--featured > .project-card:last-child:nth-child(odd) { grid-column: auto; display: block; }
    .public-nav {
        position: fixed;
        inset: 80px 0 auto;
        max-height: calc(100vh - 80px);
        padding: .8rem 1rem 1rem;
        display: none;
        align-items: stretch;
        flex-direction: column;
        overflow-y: auto;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-md);
    }
    .public-nav.is-open { display: flex; }
    .public-nav > a:not(.btn) { padding: .72rem .8rem; }
    .public-nav__portal { margin: .5rem 0 0; }
    .profile-hero__grid { min-height: 0; padding-block: 4rem; grid-template-columns: minmax(0, 1fr) 190px; }
    .profile-hero h1 { font-size: clamp(2.7rem, 9vw, 4.2rem); }
    .section-heading--split { align-items: flex-start; flex-direction: column; gap: .6rem; }
    .research-theme-detail,
    .project-hero__grid,
    .cv-layout { grid-template-columns: 1fr; }
    .project-facts { max-width: 520px; }
    .cv-sidebar { position: static; }
    .public-footer__grid { grid-template-columns: 1fr 1fr; }
    .public-footer__grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .public-header__inner { min-height: 68px; }
    .academic-brand__mark { width: 2.5rem; height: 2.5rem; }
    .academic-brand strong { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .public-nav { inset: 72px 0 auto; }
    .profile-hero::after,
    .public-page-hero::after,
    .project-hero::after { width: 75%; opacity: .22; }
    .profile-hero__grid { padding-block: 3.4rem; display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 2rem; }
    .profile-portrait { width: 118px; aspect-ratio: 1; border-width: 5px; border-radius: 50%; }
    .profile-portrait--placeholder span { font-size: .9rem; }
    .profile-portrait--placeholder small { font-size: .65rem; }
    .profile-hero h1,
    .public-page-hero h1,
    .project-hero h1 { font-size: 2.55rem; }
    .hero__actions { align-items: stretch; flex-direction: column; }
    .hero__actions .btn { width: 100%; }
    .public-section { padding-block: 3.2rem; }
    .teaching-portal-callout,
    .cv-hero { align-items: stretch; flex-direction: column; }
    .publication-item { grid-template-columns: 3.2rem minmax(0, 1fr); }
    .research-theme-detail { padding: 2.5rem 0; }
    .cv-entry { grid-template-columns: 1fr; gap: .35rem; }
    .public-footer__grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .public-footer__grid > div:first-child { grid-column: auto; }
    .public-footer__meta { flex-direction: column; }
}

/* TU Delft house style shared by the public website and learning portal.
 * Brandbook: cyan / black / white, Roboto Slab headings, Arial body text.
 * Royal blue is used for readable links and white-labelled controls. */
h1, h2 { font-family: var(--font-heading); font-weight: 400; letter-spacing: 0; }
h3, h4, h5, h6 { font-family: var(--font-body); }
.hero h1, .profile-hero h1, .public-page-hero h1, .project-hero h1 {
    font-weight: 400;
    letter-spacing: -.025em;
    line-height: 1.15;
}
.landing-hero { color: #000; background: var(--brand-cyan); }
.landing-hero h1 { max-width: 960px; color: #000; font-weight: 400; font-size: clamp(2.4rem, 4.5vw, 4.1rem); letter-spacing: -.025em; line-height: 1.15; }
.landing-hero .page-kicker, .landing-hero .text-link { color: #000; }
.destination-card h3 { font-family: var(--font-heading); font-weight: 500; letter-spacing: -.015em; }
.destination-card:hover { border-color: #000; }
.destination-card--accent { background: #e6f6fa; }
.project-card__accent { background: var(--brand-cyan); }
.profile-hero, .public-page-hero, .project-hero { background: var(--brand-navy); }
.hero::after, .profile-hero::after, .public-page-hero::after, .project-hero::after { content: none; }
.profile-portrait--placeholder, .project-card__image--placeholder { background: var(--brand-navy); }
.brand-mark { color: #000; background: var(--brand-cyan); border-radius: 0; }
.public-header, .site-header { background: #fff; backdrop-filter: none; }
.cv-section h2 { font-weight: 400; border-bottom: 1px solid var(--line-strong); }
.stat__trend, .text-success { color: #000; }
.main-nav > .btn--primary { color: #fff; }
.main-nav > .btn--primary:hover { color: #fff; background: var(--brand-navy); }
:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid #000; outline-offset: 3px; box-shadow: none; }
.public-page-hero :focus-visible, .project-hero :focus-visible,
.public-section--dark :focus-visible, .public-footer :focus-visible { outline-color: #fff; }
