:root {
    --am-ink: #121416;
    --am-ink-soft: #20272b;
    --am-muted: #657178;
    --am-line: #dce4e2;
    --am-bg: #f3f6f5;
    --am-panel: #ffffff;
    --am-primary: #00a889;
    --am-primary-dark: #007c68;
    --am-blue: #2563eb;
    --am-gold: #d59628;
    --am-coral: #e85d4f;
    --am-hero: #080c0f;
    --am-radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    color: var(--am-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    background: var(--am-bg);
}

body::selection {
    color: #fff;
    background: var(--am-primary-dark);
}

a {
    color: var(--am-primary-dark);
}

.navbar {
    min-height: 74px;
    background: rgba(8, 12, 15, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(18px);
    transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.navbar.is-scrolled {
    background: rgba(255, 255, 255, 0.92);
    border-bottom-color: rgba(18, 20, 22, 0.08);
    box-shadow: 0 18px 52px rgba(18, 20, 22, 0.08);
}

.navbar-brand {
    color: #fff;
    font-weight: 850;
}

.navbar.is-scrolled .navbar-brand {
    color: var(--am-ink);
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.26);
    border-radius: var(--am-radius);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 168, 137, 0.22);
}

.navbar-toggler-icon {
    filter: invert(1);
}

.navbar.is-scrolled .navbar-toggler {
    border-color: rgba(18, 20, 22, 0.16);
}

.navbar.is-scrolled .navbar-toggler-icon {
    filter: none;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.72);
    font-weight: 720;
}

.navbar.is-scrolled .navbar-nav .nav-link {
    color: #56636a;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover,
.navbar.is-scrolled .navbar-nav .nav-link.active,
.navbar.is-scrolled .navbar-nav .nav-link:hover {
    color: var(--am-primary);
}

.brand-mark {
    position: relative;
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    overflow: hidden;
    color: #07110f;
    font-size: 0.9rem;
    font-weight: 900;
    background: #7ff2d7;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--am-radius);
}

.brand-mark::after {
    position: absolute;
    inset: auto 0 0;
    height: 3px;
    content: "";
    background: var(--am-coral);
}

.brand-logo-mark {
    display: inline-block;
    width: 46px;
    height: 46px;
    padding: 2px;
    object-fit: contain;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    overflow: hidden;
}

.navbar.is-scrolled .brand-logo-mark {
    border-color: rgba(18, 20, 22, 0.12);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 44px;
    border-radius: var(--am-radius);
    font-weight: 820;
    letter-spacing: 0;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #06100e;
    background: #62f0ce;
    border-color: #62f0ce;
    box-shadow: 0 16px 38px rgba(0, 168, 137, 0.28);
}

.btn-primary:hover,
.btn-primary:focus {
    color: #06100e;
    background: #8af6df;
    border-color: #8af6df;
}

.btn-outline-light {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.42);
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    color: #08100e;
    background: #fff;
    border-color: #fff;
}

.section-pad {
    padding: 112px 0;
}

.hero {
    position: relative;
    min-height: 92svh;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background: var(--am-hero);
    padding: 0;
}

.hero::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18));
}

.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(8, 12, 15, 0.95), rgba(8, 12, 15, 0.68) 48%, rgba(8, 12, 15, 0.32)),
        linear-gradient(180deg, rgba(8, 12, 15, 0.18), rgba(8, 12, 15, 0.9));
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 104px;
    padding-bottom: 32px;
}

.eyebrow {
    color: var(--am-primary);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    color: var(--am-ink);
    letter-spacing: 0;
}

.hero h1,
.hero h2,
.hero h3 {
    color: #fff;
}

h1 {
    max-width: 860px;
    font-size: 5.8rem;
    line-height: 0.9;
    font-weight: 930;
}

h1 span {
    display: block;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.82);
    text-stroke: 1.5px rgba(255, 255, 255, 0.82);
}

h2 {
    font-size: 3.35rem;
    line-height: 1;
    font-weight: 900;
}

h3 {
    font-size: 1.16rem;
    font-weight: 850;
}

.lead {
    max-width: 740px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 1.55rem;
    line-height: 1.48;
}

.role-list,
.subject-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.role-list span,
.subject-list span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0.66rem 0.9rem;
    color: #fff;
    font-weight: 760;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--am-radius);
    backdrop-filter: blur(10px);
}

.subject-list span {
    color: var(--am-ink);
    background: #fff;
    border-color: rgba(18, 20, 22, 0.1);
    line-height: 1.25;
}

.portrait-panel {
    margin: 0;
}

.portrait-placeholder {
    position: relative;
    aspect-ratio: 4 / 5;
    display: grid;
    place-items: end center;
    width: min(100%, 420px);
    overflow: hidden;
    color: #fff;
    isolation: isolate;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)),
        #11181c;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--am-radius);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
    transform-style: preserve-3d;
    margin-left: auto;
}

.portrait-placeholder::before {
    position: absolute;
    inset: 18px;
    z-index: -1;
    content: "";
    background-image:
        linear-gradient(90deg, rgba(98, 240, 206, 0.24) 1px, transparent 1px),
        linear-gradient(rgba(98, 240, 206, 0.18) 1px, transparent 1px);
    background-size: 32px 32px;
    border: 1px solid rgba(98, 240, 206, 0.2);
    border-radius: var(--am-radius);
    transform: translateZ(-30px);
}

.portrait-placeholder::after {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20%;
    height: 2px;
    z-index: 4;
    content: "";
    background: linear-gradient(90deg, transparent, var(--am-coral), var(--am-primary), transparent);
    animation: scanLine 4s ease-in-out infinite;
}

.portrait-placeholder picture {
    position: relative;
    z-index: 2;
    width: 118%;
    max-width: none;
    margin-right: -6%;
    margin-bottom: -7%;
}

.profile-cutout {
    display: block;
    width: 100%;
    height: auto;
    filter:
        drop-shadow(0 28px 42px rgba(0, 0, 0, 0.46))
        drop-shadow(0 0 28px rgba(98, 240, 206, 0.14));
    transform: translateY(2%);
}

.portrait-placeholder small {
    position: absolute;
    right: 1.2rem;
    bottom: 1rem;
    left: 1.2rem;
    z-index: 5;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 760;
    text-transform: uppercase;
}

.portrait-panel figcaption {
    width: min(100%, 420px);
    margin-top: 1rem;
    margin-left: auto;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.95rem;
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--am-radius);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(16px);
}

.hero .stats-strip {
    margin-top: 2rem !important;
}

.stats-strip div {
    padding: 1.35rem;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.stats-strip div:last-child {
    border-right: 0;
}

.stats-strip strong {
    display: block;
    color: #fff;
    font-size: 2.4rem;
    line-height: 1;
}

.stats-strip span {
    display: block;
    margin-top: 0.4rem;
    color: rgba(255, 255, 255, 0.66);
    font-weight: 700;
}

.section-heading {
    max-width: 820px;
    margin-bottom: 2.7rem;
}

.section-text {
    color: #3a474e;
    font-size: 1.16rem;
    line-height: 1.78;
}

.credential-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.5rem;
}

.credential-strip span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 40px;
    padding: 0.55rem 0.75rem;
    color: var(--am-ink);
    font-size: 0.94rem;
    font-weight: 780;
    background: #fff;
    border: 1px solid rgba(18, 20, 22, 0.1);
    border-radius: var(--am-radius);
}

.credential-strip i {
    color: var(--am-primary-dark);
}

.profile-section,
.experience-section,
.method-section {
    background: #fff;
}

.muted-section {
    background:
        linear-gradient(180deg, #eff4f2, #f8faf9);
}

.portfolio-section,
.teaching-section {
    background: var(--am-bg);
}

.expertise-section {
    color: #fff;
    background:
        linear-gradient(135deg, rgba(0, 168, 137, 0.18), transparent 38%),
        #11171a;
}

.expertise-section h2,
.expertise-section h3 {
    color: #fff;
}

.expertise-section .section-text {
    color: rgba(255, 255, 255, 0.72);
}

.info-card,
.skill-card,
.project-card,
.contact-form,
.response-card {
    background: var(--am-panel);
    border: 1px solid rgba(18, 20, 22, 0.09);
    border-radius: var(--am-radius);
    box-shadow: 0 18px 54px rgba(18, 20, 22, 0.07);
}

.info-card,
.skill-card {
    position: relative;
    min-height: 100%;
    padding: 1.55rem;
    overflow: hidden;
}

.info-card::after,
.skill-card::after,
.project-card::after {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: "";
    opacity: 0;
    background: linear-gradient(135deg, rgba(0, 168, 137, 0.12), rgba(37, 99, 235, 0.08));
    transition: opacity 220ms ease;
}

.info-card:hover::after,
.skill-card:hover::after,
.project-card:hover::after {
    opacity: 1;
}

.tilt-card {
    transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

.tilt-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 168, 137, 0.32);
    box-shadow: 0 28px 74px rgba(18, 20, 22, 0.13);
}

.expertise-section .skill-card {
    color: rgba(255, 255, 255, 0.76);
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(255, 255, 255, 0.13);
    box-shadow: none;
    backdrop-filter: blur(14px);
}

.info-card p,
.skill-card li,
.process-step p,
.project-card p {
    color: var(--am-muted);
}

.info-card p,
.card-link {
    position: relative;
    z-index: 1;
}

.expertise-section .skill-card li {
    color: rgba(255, 255, 255, 0.68);
}

.card-icon {
    position: relative;
    z-index: 1;
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 1.25rem;
    place-items: center;
    color: #06100e;
    background: #62f0ce;
    border-radius: var(--am-radius);
}

.skill-card ul {
    position: relative;
    z-index: 1;
    padding-left: 1.1rem;
    margin-bottom: 0;
}

.skill-card h3,
.info-card h3 {
    position: relative;
    z-index: 1;
}

.skill-card li + li {
    margin-top: 0.55rem;
}

.focus-card {
    min-height: 250px;
}

.focus-card h3 {
    font-size: 1.35rem;
}

.focus-card p {
    font-size: 1.04rem;
    line-height: 1.68;
}

.project-card {
    position: relative;
    overflow: hidden;
}

.project-media {
    position: relative;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: end;
    overflow: hidden;
    padding: 1rem;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.82), rgba(0, 168, 137, 0.72)),
        #121416;
}

.project-media::before {
    position: absolute;
    inset: 0;
    content: "";
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 34px 34px;
    transform: skewY(-8deg) scale(1.2);
}

.project-media span {
    position: relative;
    padding: 0.45rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 850;
    background: rgba(0, 0, 0, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: var(--am-radius);
    backdrop-filter: blur(10px);
}

.project-body {
    position: relative;
    z-index: 1;
    padding: 1.35rem;
}

.project-meta {
    display: flex;
    margin-bottom: 0.8rem;
}

.project-meta span {
    color: var(--am-coral);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.icon-link,
.placeholder-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.4rem;
    font-weight: 850;
    text-decoration: none;
}

.icon-link:hover {
    color: var(--am-primary-dark);
}

.placeholder-link {
    color: var(--am-muted);
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    overflow: hidden;
    border: 1px solid rgba(18, 20, 22, 0.1);
    border-radius: var(--am-radius);
    background: rgba(18, 20, 22, 0.1);
}

.process-step {
    min-height: 230px;
    padding: 1.55rem;
    background: #fff;
    transition: background 220ms ease, color 220ms ease;
}

.process-step:hover {
    color: #fff;
    background: var(--am-ink);
}

.process-step:hover h3,
.process-step:hover p {
    color: #fff;
}

.process-step span {
    display: block;
    margin-bottom: 1rem;
    color: var(--am-primary-dark);
    font-size: 0.9rem;
    font-weight: 950;
}

.contact-section {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(120deg, rgba(0, 168, 137, 0.16), transparent 42%),
        #0b1013;
}

.contact-section::before {
    position: absolute;
    inset: 0;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 72px 72px;
    opacity: 0.35;
}

.contact-section .container {
    position: relative;
}

.contact-section h2,
.contact-section .eyebrow {
    color: #fff;
}

.contact-list p {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    color: #d8e3e5;
}

.contact-list a {
    color: #d8e3e5;
    text-decoration: none;
}

.contact-list a:hover {
    color: #7ff2d7;
}

.contact-list i {
    color: #7ff2d7;
}

.external-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.external-links a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 0.45rem 0.7rem;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--am-radius);
}

.external-links a:hover {
    color: #06100e;
    background: #7ff2d7;
}

.contact-form {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.96);
}

.form-control {
    min-height: 50px;
    border-color: rgba(18, 20, 22, 0.12);
    border-radius: var(--am-radius);
}

.form-control:focus {
    border-color: var(--am-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 168, 137, 0.15);
}

.privacy-check {
    color: #3a474e;
    font-size: 0.94rem;
}

.privacy-check a {
    font-weight: 820;
}

textarea.form-control {
    min-height: 150px;
}

.site-footer {
    padding: 1.5rem 0;
    color: #d8e3e5;
    background: #06090b;
}

.site-footer .container {
    align-items: center;
}

.site-footer a {
    color: #7ff2d7;
    text-decoration: none;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
}

.footer-brand-line {
    display: inline-flex;
    gap: 0.75rem;
    align-items: center;
}

.footer-logo-mark {
    display: inline-block;
    width: 34px;
    height: 34px;
    padding: 2px;
    object-fit: contain;
    background: #fff;
    border-radius: 9px;
    overflow: hidden;
}

.cookie-preferences-link {
    padding: 0;
    color: #7ff2d7;
    font: inherit;
    line-height: inherit;
    background: transparent;
    border: 0;
}

.cookie-preferences-link:hover,
.site-footer a:hover {
    color: #fff;
}

.cookie-banner {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
    width: min(680px, calc(100% - 2rem));
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.2rem;
    padding: 1.2rem;
    color: #fff;
    background: rgba(8, 12, 15, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--am-radius);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(16px);
    transition: opacity 220ms ease, transform 220ms ease;
}

.cookie-banner.is-hiding {
    opacity: 0;
    transform: translateY(10px);
}

.cookie-banner h2 {
    color: #fff;
    font-size: 1.35rem;
}

.cookie-banner p:not(.eyebrow) {
    margin-bottom: 0.85rem;
    color: rgba(255, 255, 255, 0.72);
}

.cookie-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.cookie-options label {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    min-height: 38px;
    padding: 0.45rem 0.65rem;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--am-radius);
}

.cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    justify-content: end;
}

.portfolio-page {
    background: #fff;
}

.legal-page {
    background: #fff;
}

.legal-hero {
    position: relative;
    overflow: hidden;
    padding: 142px 0 76px;
    color: #fff;
    background:
        linear-gradient(120deg, rgba(0, 168, 137, 0.18), transparent 42%),
        linear-gradient(180deg, rgba(8, 12, 15, 0.9), rgba(8, 12, 15, 0.98)),
        #080c0f;
}

.legal-hero::before {
    position: absolute;
    inset: 0;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 72px 72px;
    opacity: 0.44;
}

.legal-hero .container {
    position: relative;
}

.legal-hero h1 {
    max-width: 960px;
    color: #fff;
    font-size: 4.3rem;
    line-height: 0.96;
}

.legal-hero .lead {
    color: rgba(255, 255, 255, 0.74);
}

.legal-content {
    background: #fff;
}

.legal-block {
    max-width: 900px;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(18, 20, 22, 0.1);
}

.legal-block:first-child {
    padding-top: 0;
}

.legal-block h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

.legal-block p,
.legal-block li {
    color: #3a474e;
    font-size: 1.08rem;
    line-height: 1.72;
}

.admin-main {
    min-height: 100vh;
    padding-top: 74px;
    background: #fff;
}

.admin-login {
    max-width: 540px;
    margin: 0 auto;
}

.admin-page-heading {
    margin-bottom: 1.5rem;
}

.admin-page-heading-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
    justify-content: space-between;
}

/* Admin & student pages use a compact heading scale: the public site's hero
   sizes (5.8rem h1, 3.35rem h2) must never leak into the panels. */
.admin-page h1 {
    max-width: none;
    color: var(--am-ink);
    font-size: 1.9rem;
    line-height: 1.15;
}

.admin-page h2 {
    max-width: none;
    font-size: 1.3rem;
    line-height: 1.25;
}

.admin-page h3 {
    font-size: 1.1rem;
}

.admin-auth-grid {
    width: min(980px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: start;
}

.admin-auth-grid .admin-auth-card:first-child {
    grid-column: 1 / -1;
}

.admin-auth-card {
    width: 100%;
}

.admin-auth-card + .admin-auth-card {
    margin-top: 1.25rem;
}

@supports (display: grid) {
    .admin-auth-card + .admin-auth-card {
        margin-top: 0;
    }
}

.admin-module-grid {
    width: min(980px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.admin-module-card {
    position: relative;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.3rem;
    color: var(--am-ink);
    text-decoration: none;
    background: #f5f8f7;
    border: 1px solid rgba(18, 20, 22, 0.09);
    border-radius: var(--am-radius);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.admin-module-card:hover {
    color: var(--am-ink);
    border-color: rgba(0, 168, 137, 0.32);
    box-shadow: 0 22px 58px rgba(18, 20, 22, 0.1);
    transform: translateY(-4px);
}

.admin-module-card strong,
.admin-module-card small {
    display: block;
}

.admin-module-card strong {
    margin-top: 1rem;
    font-size: 1.25rem;
    line-height: 1.15;
}

.admin-module-card small {
    color: var(--am-muted);
    font-weight: 760;
}

.admin-module-card > i {
    position: absolute;
    right: 1.2rem;
    bottom: 1.2rem;
    color: var(--am-primary-dark);
}

.admin-module-card.is-disabled {
    color: #5b656b;
    background: #f8faf9;
    opacity: 0.74;
}

.admin-module-card.is-disabled:hover {
    border-color: rgba(18, 20, 22, 0.09);
    box-shadow: none;
    transform: none;
}

.admin-qr {
    display: block;
    width: 260px;
    height: 260px;
    max-width: 100%;
    margin: 1rem auto;
    background: #fff;
    border: 1px solid rgba(18, 20, 22, 0.12);
    border-radius: var(--am-radius);
    object-fit: contain;
}

.admin-qr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.admin-secret {
    color: #3a474e;
    overflow-wrap: anywhere;
}

.admin-help-text {
    color: var(--am-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.admin-toolbar {
    margin-bottom: 1.5rem;
}

.admin-filter {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(220px, 1fr) auto auto auto;
    gap: 0.8rem;
    align-items: end;
}

.btn-outline-admin {
    color: var(--am-ink);
    background: #fff;
    border: 1px solid rgba(18, 20, 22, 0.14);
    box-shadow: none;
}

.btn-outline-admin:hover,
.btn-outline-admin:focus {
    color: #06100e;
    background: #7ff2d7;
    border-color: #7ff2d7;
}

.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-summary-card {
    padding: 1.2rem;
    background: #f5f8f7;
    border: 1px solid rgba(18, 20, 22, 0.09);
    border-radius: var(--am-radius);
}

.admin-summary-card span,
.admin-summary-card small {
    display: block;
    color: var(--am-muted);
    font-weight: 760;
}

.admin-summary-card strong {
    display: block;
    margin: 0.25rem 0;
    color: var(--am-ink);
    font-size: 2rem;
    line-height: 1;
}

.admin-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid rgba(18, 20, 22, 0.1);
    border-radius: var(--am-radius);
    box-shadow: 0 18px 54px rgba(18, 20, 22, 0.06);
}

.admin-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    vertical-align: top;
    border-bottom: 1px solid rgba(18, 20, 22, 0.08);
}

.admin-table th {
    color: var(--am-muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    background: #f5f8f7;
}

.admin-table td {
    color: #3a474e;
    font-size: 0.94rem;
    line-height: 1.45;
}

.admin-table td strong,
.admin-meta {
    display: block;
}

.admin-meta {
    margin-top: 0.25rem;
    color: var(--am-muted);
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.status-pill {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 0.28rem 0.55rem;
    font-size: 0.8rem;
    font-weight: 850;
    border-radius: var(--am-radius);
}

.status-pill.success {
    color: #053d34;
    background: rgba(0, 168, 137, 0.16);
}

.status-pill.muted {
    color: #4c5960;
    background: rgba(101, 113, 120, 0.14);
}

.status-pill.note {
    color: #13367a;
    background: rgba(37, 99, 235, 0.12);
}

.status-pill.error {
    color: #7a1313;
    background: rgba(220, 53, 69, 0.14);
}

.admin-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.25rem;
    color: var(--am-muted);
    font-weight: 760;
}

.admin-pagination > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.portfolio-detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 78svh;
    display: flex;
    align-items: end;
    padding: 142px 0 78px;
    color: #fff;
    background:
        linear-gradient(120deg, rgba(0, 168, 137, 0.18), transparent 42%),
        linear-gradient(180deg, rgba(8, 12, 15, 0.88), rgba(8, 12, 15, 0.98)),
        #080c0f;
}

.portfolio-detail-hero::before {
    position: absolute;
    inset: 0;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 72px 72px;
    opacity: 0.5;
}

.portfolio-detail-hero .container {
    position: relative;
}

.portfolio-detail-hero h1 {
    max-width: 960px;
    color: #fff;
    font-size: 5rem;
    line-height: 0.95;
}

.portfolio-detail-hero .lead {
    color: rgba(255, 255, 255, 0.74);
}

.back-link,
.portfolio-kicker,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.back-link {
    width: fit-content;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 820;
    text-decoration: none;
}

.back-link:hover {
    color: #7ff2d7;
}

.portfolio-kicker {
    margin-bottom: 1rem;
}

.portfolio-kicker span,
.detail-tags span {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 0.48rem 0.72rem;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 850;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--am-radius);
    backdrop-filter: blur(10px);
}

.detail-tags {
    margin-top: 1.6rem;
}

.portfolio-detail-section {
    background: #fff;
}

.detail-panel {
    position: sticky;
    top: 100px;
    padding: 1.4rem;
    background: #f5f8f7;
    border: 1px solid rgba(18, 20, 22, 0.09);
    border-radius: var(--am-radius);
}

.detail-list {
    display: grid;
    gap: 1rem;
    margin: 1.4rem 0 0;
}

.detail-list div {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(18, 20, 22, 0.09);
}

.detail-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.detail-list dt {
    color: var(--am-muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.detail-list dd {
    margin: 0.25rem 0 0;
    color: var(--am-ink);
    font-weight: 820;
}

.portfolio-showcase {
    position: relative;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 0.65rem;
    overflow: hidden;
    padding: 1.4rem;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.78), rgba(0, 168, 137, 0.68)),
        #121416;
    border-radius: var(--am-radius);
}

.portfolio-showcase::before {
    position: absolute;
    inset: 0;
    content: "";
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 42px 42px;
    transform: skewY(-8deg) scale(1.2);
}

.portfolio-showcase span,
.portfolio-showcase strong {
    position: relative;
}

.portfolio-showcase span {
    font-size: 0.84rem;
    font-weight: 900;
    text-transform: uppercase;
}

.portfolio-showcase strong {
    max-width: 760px;
    font-size: 3.2rem;
    line-height: 1;
}

.portfolio-section-block {
    padding: 2.1rem 0;
    border-bottom: 1px solid rgba(18, 20, 22, 0.1);
}

.portfolio-section-block h2 {
    max-width: 880px;
    font-size: 2.6rem;
}

.portfolio-section-block p:not(.eyebrow),
.result-list {
    max-width: 780px;
    color: #3a474e;
    font-size: 1.13rem;
    line-height: 1.76;
}

.result-list {
    display: grid;
    gap: 0.7rem;
    padding-left: 1.2rem;
}

.portfolio-next-section {
    padding: 0 0 96px;
    background: #fff;
}

.portfolio-nav-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.nav-project {
    min-height: 168px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.4rem;
    color: #fff;
    text-decoration: none;
    background: #121416;
    border: 1px solid rgba(18, 20, 22, 0.12);
    border-radius: var(--am-radius);
    transition: transform 180ms ease, background 180ms ease;
}

.nav-project:hover {
    color: #fff;
    background: #0f766e;
    transform: translateY(-4px);
}

.nav-project span {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 820;
}

.nav-project strong {
    font-size: 1.45rem;
    line-height: 1.15;
}

.nav-project.next {
    text-align: right;
    align-items: end;
}

.response-page {
    min-height: 100vh;
    background: var(--am-bg);
}

.response-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
}

.response-card {
    width: min(680px, 100%);
    padding: 2rem;
}

.response-icon {
    display: grid;
    width: 54px;
    height: 54px;
    margin-bottom: 1.2rem;
    place-items: center;
    color: #fff;
    border-radius: var(--am-radius);
}

.response-icon.success {
    background: var(--am-primary-dark);
}

.response-icon.error {
    background: #b42318;
}

.response-icon.note {
    background: var(--am-blue);
}

.submitted-preview {
    padding: 1rem;
    margin: 1rem 0 1.5rem;
    background: var(--am-bg);
    border-radius: var(--am-radius);
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 680ms ease, transform 680ms ease;
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes scanLine {
    0%,
    100% {
        transform: translateY(-150px);
        opacity: 0;
    }

    20%,
    70% {
        opacity: 1;
    }

    50% {
        transform: translateY(150px);
    }
}

@media (max-width: 1199.98px) {
    h1 {
        font-size: 4.8rem;
    }

    h2 {
        font-size: 2.85rem;
    }
}

@media (max-width: 991.98px) {
    .navbar {
        background: rgba(255, 255, 255, 0.94);
        border-bottom-color: rgba(18, 20, 22, 0.08);
    }

    .navbar-brand {
        color: var(--am-ink);
    }

    .navbar-toggler {
        border-color: rgba(18, 20, 22, 0.16);
    }

    .navbar-toggler-icon {
        filter: none;
    }

    .navbar-nav {
        padding: 1rem 0;
    }

    .navbar-nav .nav-link {
        color: #56636a;
    }

    .section-pad {
        padding: 82px 0;
    }

    .hero {
        min-height: auto;
        padding: 0;
    }

    .hero-content {
        padding-top: 126px;
        padding-bottom: 64px;
    }

    h1 {
        font-size: 4rem;
    }

    h2 {
        font-size: 2.35rem;
    }

    .lead {
        font-size: 1.3rem;
    }

    .portrait-placeholder {
        width: min(100%, 360px);
        margin-right: auto;
    }

    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-detail-hero {
        min-height: auto;
        padding: 124px 0 64px;
    }

    .portfolio-detail-hero h1 {
        font-size: 3.6rem;
    }

    .legal-hero h1 {
        font-size: 3.4rem;
    }

    .detail-panel {
        position: static;
    }

    .admin-filter,
    .admin-summary-grid,
    .admin-auth-grid,
    .admin-module-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-filter .btn {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .hero-content {
        padding-top: 102px;
        padding-bottom: 34px;
    }

    .hero-scrim {
        background:
            linear-gradient(180deg, rgba(8, 12, 15, 0.88), rgba(8, 12, 15, 0.76) 50%, rgba(8, 12, 15, 0.92));
    }

    h1 {
        font-size: 3.35rem;
    }

    h2 {
        font-size: 2rem;
    }

    .stats-strip {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats-strip div {
        padding: 0.9rem 0.65rem;
        border-right: 1px solid rgba(255, 255, 255, 0.12);
        border-bottom: 0;
    }

    .stats-strip div:last-child {
        border-right: 0;
    }

    .stats-strip strong {
        font-size: 1.55rem;
    }

    .stats-strip span {
        font-size: 0.78rem;
        line-height: 1.25;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .process-step {
        min-height: auto;
    }

    .btn-lg {
        width: 100%;
    }

    .hero .btn-lg {
        width: auto;
        flex: 1 1 150px;
        min-height: 56px;
        padding-right: 0.85rem;
        padding-left: 0.85rem;
        font-size: 1rem;
    }

    .role-list {
        gap: 0.55rem;
    }

    .role-list span {
        min-height: 36px;
        padding: 0.5rem 0.7rem;
        font-size: 0.88rem;
        line-height: 1.2;
    }

    .subject-list span {
        width: 100%;
    }

    .portrait-panel {
        display: none;
    }

    .portfolio-detail-hero h1 {
        font-size: 3rem;
    }

    .legal-hero {
        padding: 124px 0 58px;
    }

    .legal-hero h1 {
        font-size: 2.85rem;
    }

    .portfolio-showcase {
        min-height: 260px;
    }

    .portfolio-showcase strong {
        font-size: 2.1rem;
    }

    .portfolio-section-block h2 {
        font-size: 2rem;
    }

    .portfolio-nav-grid {
        grid-template-columns: 1fr;
    }

    .nav-project.next {
        text-align: left;
        align-items: stretch;
    }

    .cookie-banner {
        grid-template-columns: 1fr;
    }

    .cookie-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .cookie-actions .btn {
        flex: 1 1 140px;
    }

    .admin-filter,
    .admin-summary-grid,
    .admin-auth-grid,
    .admin-module-grid {
        grid-template-columns: 1fr;
    }

    .admin-pagination {
        align-items: stretch;
    }

    .admin-pagination,
    .admin-pagination > div,
    .admin-pagination .btn {
        width: 100%;
    }
}

@media (max-width: 420px) {
    h1 {
        font-size: 3rem;
    }

    .portrait-placeholder span {
        font-size: 6rem;
    }

    .role-list span {
        width: auto;
    }

    .subject-list span {
        width: 100%;
    }

    .portfolio-detail-hero h1 {
        font-size: 2.65rem;
    }

    .legal-hero h1 {
        font-size: 2.55rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Generic responsive grid for setting/content cards (adapts, stacks on mobile) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
    align-items: start;
}

.cards-grid .response-card {
    width: 100%;
    margin: 0;
    padding: 1.5rem;
}

/* Small, consistent card titles (no giant headings inside cards) */
.panel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.panel-title i {
    color: #00a889;
}

.response-card h2 {
    font-size: 1.3rem;
    line-height: 1.25;
}

.response-card h3 {
    font-size: 1.1rem;
}

/* Full-width module grid (class pickers): fills the container, aligned to title */
.admin-module-grid--full {
    width: 100%;
    max-width: 100%;
    margin: 0;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* Student area */
.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    align-items: start;
}

.student-grid .response-card {
    width: 100%;
    padding: 1.5rem;
    margin: 0;
}

.student-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.student-card-title i {
    font-size: 1.3rem;
    color: #00a889;
}

.student-material-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.student-material-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.6rem;
    background: rgba(0, 168, 137, 0.04);
}

.student-material-list li > div {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

/* Exam lockdown runtime */
.exam-shell {
    max-width: 1180px;
    margin: 0 auto;
}

.exam-shell .exam-card {
    width: 100%;
    max-width: 100%;
    padding: 1.75rem;
    margin: 0;
}

.exam-countdown {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.exam-form-frame {
    width: 100%;
    min-height: 70vh;
    border: 0;
    border-radius: 0.6rem;
}

.exam-violation-toast {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1080;
    max-width: 90%;
    padding: 0.75rem 1.25rem;
    border-radius: 0.6rem;
    background: #b00020;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    display: none;
}

.exam-consent-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.exam-consent-card {
    max-width: 560px;
    background: #fff;
    border-radius: 0.8rem;
    padding: 1.75rem;
}

/* Language switcher: same page in another language, in the navbar. */
.lang-switch {
    display: inline-flex;
    gap: 0.25rem;
    align-items: center;
}

.nav-lang-switch {
    margin-left: 0.85rem;
}

.lang-switch-item {
    padding: 0.14rem 0.46rem;
    border: 1px solid transparent;
    border-radius: 0.45rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.lang-switch-item:hover,
.lang-switch-item:focus-visible {
    color: var(--am-primary);
}

.lang-switch-item.is-active {
    background: rgba(0, 168, 137, 0.14);
    border-color: rgba(0, 168, 137, 0.42);
    color: var(--am-primary);
}

.navbar.is-scrolled .lang-switch-item {
    color: #56636a;
}

.navbar.is-scrolled .lang-switch-item:hover,
.navbar.is-scrolled .lang-switch-item.is-active {
    color: var(--am-primary-dark);
}

/* Below the navbar breakpoint the bar is white: the switcher lives inside the
   collapsed menu, as the last entry, and needs ink-coloured labels to be read. */
@media (max-width: 991.98px) {
    .lang-switch-item {
        padding: 0.34rem 0.72rem;
        border-color: rgba(18, 20, 22, 0.14);
        color: #56636a;
        font-size: 0.86rem;
    }

    .lang-switch-item:hover,
    .lang-switch-item:focus-visible,
    .lang-switch-item.is-active {
        color: var(--am-primary-dark);
    }

    .nav-lang-switch {
        display: flex;
        gap: 0.4rem;
        margin-top: 0.9rem;
        margin-left: 0;
        padding-top: 0.9rem;
        border-top: 1px solid rgba(18, 20, 22, 0.08);
    }
}

/* Courtesy-translation notice on the translated legal pages. */
.legal-courtesy-notice {
    margin-top: 1.25rem;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--am-primary);
    border-radius: 0.35rem;
    background: rgba(0, 168, 137, 0.1);
    font-size: 0.95rem;
}

.legal-courtesy-notice a {
    color: var(--am-primary);
    font-weight: 700;
}
