/* ============================================================
   CSS Custom Properties – Light Theme
   ============================================================ */
:root {
    --color-bg:          #e2e8f0;
    --color-bg-alt:      #edf2f7;
    --color-surface:     #d8e1eb;
    --color-border:      #e2e8f0;
    --color-text:        #1a202c;
    --color-text-muted:  #4a5568;
    --color-accent:      #0057d9;
    --color-accent-dim:  rgba(0, 87, 217, 0.08);
    --color-accent2:     #7c3aed;
    --color-accent-light:#e8f0fe;
    --color-success:     #16a34a;

    --font-sans: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --font-head:  'Orbitron', monospace;
    --font-body:  'Rajdhani', system-ui, sans-serif;

    --radius-sm:  6px;
    --radius-md:  12px;
    --radius-lg:  20px;

    --shadow-xs:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-card: 0 4px 20px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.05);
    --shadow-hover:0 8px 32px rgba(0,87,217,.12), 0 2px 8px rgba(0,0,0,.06);

    --nav-h: 68px;
    --section-gap: 96px;
}

/* ============================================================
   Skip Navigation
   ============================================================ */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--color-accent);
    color: #fff;
    padding: 12px 20px;
    font-size: .9rem;
    font-weight: 600;
    border-radius: 0 0 var(--radius-sm) 0;
    z-index: 9999;
    text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 17px; }

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a   { color: var(--color-accent); text-decoration: none; transition: color .2s; }
a:hover { color: #0041a8; }

/* ============================================================
   Focus Styles (WCAG 2.4.11)
   ============================================================ */
:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}
/* Inputs get an inset focus ring */
.form-group input:focus-visible,
.form-group textarea:focus-visible {
    outline: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

section { padding: var(--section-gap) 0; }

/* ============================================================
   Typography Helpers
   ============================================================ */
.section-label {
    font-family: var(--font-mono);
    font-size: .75rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: .14em;
    margin-bottom: .5rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-text);
    margin-bottom: .75rem;
}

.section-subtitle {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    max-width: 560px;
}

/* ============================================================
   Navigation
   ============================================================ */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: rgba(248,249,251,.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    z-index: 1000;
    transition: border-color .3s, background .3s, box-shadow .3s;
}

#navbar.scrolled {
    border-color: var(--color-border);
    background: rgba(255,255,255,.96);
    box-shadow: var(--shadow-xs);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: .95rem;
    color: var(--color-text);
    white-space: nowrap;
}
.nav-logo:hover { color: var(--color-accent); }

.nav-logo-img {
    height: 36px;
    width: auto;
}

.nav-logo span { color: #94a3b8; font-size: .8rem; font-weight: 400; }

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-links a {
    color: var(--color-text-muted);
    font-size: .875rem;
    font-weight: 500;
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--color-text); background: var(--color-surface); }
.nav-links a.active { color: var(--color-accent); background: var(--color-accent-dim); }

.btn-nav {
    background: var(--color-accent) !important;
    color: #fff !important;
    padding: 8px 18px !important;
    border-radius: var(--radius-sm) !important;
}
.btn-nav:hover { background: #0041a8 !important; color: #fff !important; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}

/* ============================================================
   Hero
   ============================================================ */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-h);
    background: var(--color-bg-alt);
    position: relative;
    overflow: hidden;
}
#hero > .container {
    width: 100%;
}

/* subtle geometric background */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 60% at 80% 40%, rgba(0,87,217,.06) 0%, transparent 70%),
        radial-gradient(ellipse 35% 40% at 10% 80%, rgba(124,58,237,.05) 0%, transparent 60%);
    pointer-events: none;
}

/* grid dot pattern */
#hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(0,87,217,.08) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 70% 70% at 80% 40%, black 0%, transparent 70%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 224px;
    gap: 64px;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-text {
    max-width: 761px;
    min-width: 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-accent-light);
    color: var(--color-accent);
    font-size: .78rem;
    font-family: var(--font-mono);
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0,87,217,.18);
}

.hero-badge::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--color-success);
    animation: pulse 2.4s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(1.35); }
}

.hero-title {
    font-size: clamp(2.2rem, 5.5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.02em;
    margin-bottom: 1.2rem;
    color: var(--color-text);
}
.hero-title span { color: var(--color-accent); }

.hero-subtitle {
    font-size: clamp(.95rem, 2vw, 1.15rem);
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
    line-height: 1.75;
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .2s;
    font-family: var(--font-sans);
}

.btn-primary {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,87,217,.25);
}
.btn-primary:hover {
    background: #0041a8;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,87,217,.32);
}

.btn-ghost {
    background: #fff;
    color: var(--color-text);
    border: 1.5px solid var(--color-border);
    box-shadow: var(--shadow-xs);
}
.btn-ghost:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

/* Hero right column */
.hero-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 224px;
    flex-shrink: 0;
}

.hero-logo-wrap {
    background: #fff;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px 32px;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.hero-logo {
    width: 160px;
    height: auto;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,.15));
    transition: transform .3s;
}
.hero-logo:hover { transform: scale(1.04); }

/* Hero stats card */
.hero-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    width: 100%;
    box-shadow: var(--shadow-card);
}

.hero-card-stat {
    text-align: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
}
.hero-card-stat:last-child { border-bottom: none; }
.hero-card-stat .num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-accent);
    font-family: var(--font-mono);
    letter-spacing: -.02em;
}
.hero-card-stat .label {
    font-size: .78rem;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-top: 2px;
}

/* ============================================================
   About
   ============================================================ */
#about { background: var(--color-bg); }

.about-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 64px;
    align-items: start;
}

.about-avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 20px; }

.about-avatar {
    width: 200px; height: 200px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 3px solid var(--color-border);
    box-shadow: var(--shadow-card);
    background: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    flex-shrink: 0;
}
.about-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center center; }
.avatar-fallback {
    width: 100%; height: 100%;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--color-text-muted);
}

.about-social a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1.5px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: .8rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xs);
    transition: all .2s;
}
.about-social a:hover {
    border-color: #0a66c2;
    color: #0a66c2;
    box-shadow: var(--shadow-card);
}

.about-text p {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.about-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 1.75rem;
}

.highlight-item {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: var(--shadow-xs);
    transition: border-color .2s, box-shadow .2s;
}
.highlight-item:hover { border-color: var(--color-accent); box-shadow: var(--shadow-card); }
.highlight-item .icon { font-size: 1.3rem; margin-bottom: 4px; }
.highlight-item strong { display: block; font-size: .88rem; color: var(--color-text); }
.highlight-item span { font-size: .78rem; color: var(--color-text-muted); }

/* ============================================================
   Skills
   ============================================================ */
#skills { background: var(--color-bg-alt); }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 3rem;
}

.skill-card {
    background: #fff;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    box-shadow: var(--shadow-xs);
}
.skill-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.skill-card-icon {
    width: 46px; height: 46px;
    background: var(--color-accent-dim);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.skill-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: .75rem; color: var(--color-text); }

.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
    background: var(--color-surface);
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    transition: background .2s, color .2s, border-color .2s;
}
.tag:hover { background: var(--color-accent-dim); color: var(--color-accent); border-color: rgba(0,87,217,.25); }

/* ============================================================
   Experience / Timeline
   ============================================================ */
#experience { background: var(--color-bg); }

.timeline {
    position: relative;
    margin-top: 3rem;
    padding-left: 36px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 10px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-accent), rgba(0,87,217,.1));
}

.timeline-item {
    position: relative;
    margin-bottom: 44px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -42px;
    top: 5px;
    width: 13px; height: 13px;
    background: var(--color-accent);
    border-radius: 50%;
    border: 3px solid var(--color-bg-alt);
    box-shadow: 0 0 0 3px rgba(0,87,217,.18);
}

.timeline-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: .4rem;
}

.timeline-title { font-size: 1rem; font-weight: 700; color: var(--color-text); }
.timeline-company { color: var(--color-accent); font-size: .88rem; font-weight: 500; margin-bottom: .3rem; }

.timeline-date {
    font-family: var(--font-mono);
    font-size: .75rem;
    color: var(--color-text-muted);
    background: var(--color-surface);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    white-space: nowrap;
}

.timeline-desc {
    color: var(--color-text-muted);
    font-size: .9rem;
    line-height: 1.75;
}

/* ============================================================
   Projects
   ============================================================ */
#projects { background: var(--color-bg-alt); }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 20px;
    margin-top: 3rem;
}

.project-card {
    background: #fff;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    box-shadow: var(--shadow-xs);
}
.project-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.project-header { display: flex; align-items: center; justify-content: space-between; }
.project-icon { font-size: 1.75rem; }
.project-links { display: flex; gap: 8px; }
.project-links a {
    color: var(--color-text-muted);
    display: flex;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: color .2s, background .2s;
}
.project-links a:hover { color: var(--color-accent); background: var(--color-accent-dim); }

.project-card h3 { font-size: .95rem; font-weight: 700; color: var(--color-text); }
.project-card p { color: var(--color-text-muted); font-size: .875rem; line-height: 1.7; flex: 1; }

/* ============================================================
   Contact
   ============================================================ */
#contact { background: var(--color-bg); }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 64px;
    align-items: start;
}

.contact-info > p {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-items { display: flex; flex-direction: column; gap: 12px; }

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: #fff;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    box-shadow: var(--shadow-xs);
    transition: border-color .2s, box-shadow .2s;
}
.contact-item:hover { border-color: var(--color-accent); box-shadow: var(--shadow-card); color: var(--color-text); }

.contact-item-icon {
    width: 40px; height: 40px;
    background: var(--color-accent-dim);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    flex-shrink: 0;
}

.contact-item-text strong { display: block; font-size: .88rem; font-weight: 600; }
.contact-item-text span { font-size: .78rem; color: var(--color-text-muted); }

/* Form */
.contact-form {
    background: #fff;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-card);
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--color-text);
}

.form-group input,
.form-group textarea {
    background: var(--color-bg-alt);
    border: 1.5px solid var(--color-border);
    color: var(--color-text);
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: .9rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.form-group input:focus,
.form-group textarea:focus {
    background: #fff;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(0,87,217,.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ============================================================
   Footer
   ============================================================ */
#footer {
    background: var(--color-text);
    color: #e2e8f0;
    padding: 48px 0 28px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .9rem;
    font-weight: 600;
    color: #fff;
}
.footer-brand span { color: #94a3b8; font-size: .8rem; font-weight: 400; }

.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: #94a3b8; font-size: .85rem; transition: color .2s; }
.footer-links a:hover { color: #fff; }

.footer-social { display: flex; gap: 10px; }
.footer-social a {
    color: #94a3b8;
    width: 36px; height: 36px;
    border: 1px solid #334155;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .2s, border-color .2s;
}
.footer-social a:hover { color: #fff; border-color: #94a3b8; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid #1e293b;
    font-size: .8rem;
    color: #64748b;
}
.footer-bottom a { color: #64748b; }
.footer-bottom a:hover { color: #94a3b8; }

/* ============================================================
   Scroll-reveal
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
/* ---- tablet (≤ 900px) ---- */
@media (max-width: 900px) {
    .hero-grid  { grid-template-columns: 1fr; }

    /* logo + stats side-by-side */
    .hero-right { flex-direction: row; align-items: stretch; gap: 16px; }
    .hero-logo-wrap { flex: 0 0 auto; padding: 16px 20px; }
    .hero-logo  { width: 110px; }

    /* stats: 3 columns in one row */
    .hero-card  { flex: 1; display: grid; grid-template-columns: repeat(3,1fr); padding: 0; }
    .hero-card-stat {
        padding: 16px 8px;
        border-bottom: none;
        border-right: 1px solid var(--color-border);
    }
    .hero-card-stat:last-child { border-right: none; }
    .hero-card-stat .num  { font-size: 1.5rem; }
    .hero-card-stat .label { font-size: .7rem; }

    .about-grid   { grid-template-columns: 1fr; }
    .about-avatar-wrap { flex-direction: row; }
    .contact-grid { grid-template-columns: 1fr; }
}

/* ---- mobile (≤ 640px) ---- */
@media (max-width: 640px) {
    :root { --section-gap: 64px; }

    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: var(--nav-h); left: 0; right: 0;
        background: rgba(255,255,255,.98);
        border-bottom: 1px solid var(--color-border);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 16px 24px 20px;
        gap: 2px;
        transform: translateY(-110%);
        transition: transform .28s ease;
        box-shadow: var(--shadow-card);
    }
    .nav-links.open { transform: none; }
    .nav-links a    { width: 100%; padding: 10px 14px; }

    /* hero: logo above stats, both full-width */
    .hero-right     { flex-direction: column; gap: 12px; }
    .hero-logo-wrap { width: 100%; padding: 16px 24px; }
    .hero-logo      { width: 90px; margin: 0 auto; }

    /* stats: always 3 columns on mobile too */
    .hero-card      { display: grid; grid-template-columns: repeat(3,1fr); padding: 0; }
    .hero-card-stat {
        padding: 14px 6px;
        border-bottom: none;
        border-right: 1px solid var(--color-border);
    }
    .hero-card-stat:last-child { border-right: none; }
    .hero-card-stat .num   { font-size: 1.4rem; }
    .hero-card-stat .label { font-size: .65rem; }

    .about-highlights { grid-template-columns: 1fr; }
    .form-row         { grid-template-columns: 1fr; }
    .contact-form     { padding: 24px; }
}

/* ============================================================
   Legal Pages (Impressum / Datenschutz)
   ============================================================ */
.legal-content h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 2rem 0 .5rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid var(--color-border);
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p  { color: var(--color-text-muted); margin-bottom: .85rem; line-height: 1.8; font-size: .95rem; }
.legal-content ul { color: var(--color-text-muted); margin: .5rem 0 .85rem 1.5rem; font-size: .95rem; line-height: 1.9; }
.legal-content strong { color: var(--color-text); }

/* ============================================================
   Hero Role Switcher
   ============================================================ */
.hero-role {
    display: block;
    color: hsl(216, 100%, 30%) !important;
    min-height: 2.4em;          /* reserves space for up to 2 wrapped lines */
    transition: opacity .5s ease, transform .5s ease;
}
.hero-role.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}
.hero-role.fade-in {
    opacity: 0;
    transform: translateY(10px);
}

#hero-subtitle {
    min-height: 5.5rem;         /* reserves space for 3 lines of text */
    transition: opacity .5s ease;
}
#hero-subtitle.fade-out { opacity: 0; }

/* ============================================================
   Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-role, #hero-subtitle { transition: none; }
}
