/* =========================
   Theme tokens
   Dark mode remains your default premium theme.
   Light mode uses a softer professional SaaS-style palette.
   ========================= */

:root {
    color-scheme: dark;
    --bg: #070b14;
    --surface: rgba(15, 23, 42, 0.82);
    --surface-solid: #0f172a;
    --surface-2: #111c33;
    --text: #f8fafc;
    --muted: #b6c2d6;
    --subtle: #7b8ba5;
    --line: rgba(148, 163, 184, 0.18);
    --accent: #38f8c8;
    --accent-2: #60a5fa;
    --accent-3: #fbbf24;
    --danger: #fb7185;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --radius: 28px;
    --radius-sm: 16px;
    --container: 1180px;
    --header-h: 78px;
    --font:
        "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
    --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

/* Automatic light mode from macOS / iOS / Android / Windows / Linux */
@media (prefers-color-scheme: light) {
    :root:not([data-theme]) {
        color-scheme: light;
        --bg: #f8fbff;
        --surface: rgba(255, 255, 255, 0.82);
        --surface-solid: #ffffff;
        --surface-2: #eef6ff;
        --text: #0b1220;
        --muted: #3f5068;
        --subtle: #687893;
        --line: rgba(15, 23, 42, 0.1);
        --accent: #0f766e;
        --accent-2: #2563eb;
        --accent-3: #d97706;
        --danger: #dc2626;
        --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    }
}

/* Manual light mode from your website button */
[data-theme="light"] {
    color-scheme: light;
    --bg: #f8fbff;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-solid: #ffffff;
    --surface-2: #eef6ff;
    --text: #0b1220;
    --muted: #3f5068;
    --subtle: #687893;
    --line: rgba(15, 23, 42, 0.1);
    --accent: #0f766e;
    --accent-2: #2563eb;
    --accent-3: #d97706;
    --danger: #dc2626;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

/* Manual dark mode from your website button */
[data-theme="dark"] {
    color-scheme: dark;
    --bg: #070b14;
    --surface: rgba(15, 23, 42, 0.82);
    --surface-solid: #0f172a;
    --surface-2: #111c33;
    --text: #f8fafc;
    --muted: #b6c2d6;
    --subtle: #7b8ba5;
    --line: rgba(148, 163, 184, 0.18);
    --accent: #38f8c8;
    --accent-2: #60a5fa;
    --accent-3: #fbbf24;
    --danger: #fb7185;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    font-family: var(--font);
    background:
        radial-gradient(
            circle at 20% 10%,
            rgba(56, 248, 200, 0.13),
            transparent 28rem
        ),
        radial-gradient(
            circle at 85% 5%,
            rgba(96, 165, 250, 0.15),
            transparent 24rem
        ),
        var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}
body.menu-open {
    overflow: hidden;
}

/* Premium light-mode page background and component polish */
[data-theme="light"] body {
    background:
        radial-gradient(
            circle at 18% 8%,
            rgba(37, 99, 235, 0.11),
            transparent 28rem
        ),
        radial-gradient(
            circle at 86% 8%,
            rgba(15, 118, 110, 0.12),
            transparent 24rem
        ),
        linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) body {
        background:
            radial-gradient(
                circle at 18% 8%,
                rgba(37, 99, 235, 0.11),
                transparent 28rem
            ),
            radial-gradient(
                circle at 86% 8%,
                rgba(15, 118, 110, 0.12),
                transparent 24rem
            ),
            linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
    }
}

a {
    color: inherit;
    text-decoration: none;
}
button,
input,
textarea,
select {
    font: inherit;
}
button {
    border: 0;
    cursor: pointer;
}
img,
svg {
    max-width: 100%;
    display: block;
}

.skip-link {
    position: fixed;
    left: 1rem;
    top: -100px;
    z-index: 999;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: var(--accent);
    color: #041014;
    font-weight: 800;
    transition: top 180ms ease;
}
.skip-link:focus {
    top: 1rem;
}

.form-hint {
    color: var(--subtle);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
}

.container {
    width: min(calc(100% - 2rem), var(--container));
    margin-inline: auto;
}
.section {
    padding: clamp(5rem, 9vw, 8rem) 0;
    position: relative;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--header-h);
    z-index: 100;
    transition:
        background 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease;
}
.site-header.scrolled {
    background: rgba(7, 11, 20, 0.78);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(20px);
}
[data-theme="light"] .site-header.scrolled {
    background: rgba(248, 251, 255, 0.84);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .site-header.scrolled {
        background: rgba(248, 251, 255, 0.84);
    }
}

.nav {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: max-content;
}
.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #031014;
    font-weight: 900;
    letter-spacing: -0.06em;
    box-shadow: 0 12px 36px rgba(56, 248, 200, 0.2);
}
.brand-text {
    font-weight: 900;
    letter-spacing: -0.04em;
}
.brand-text span {
    color: var(--muted);
    font-weight: 700;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.nav-link {
    padding: 0.6rem 0.85rem;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.94rem;
    transition:
        background 180ms ease,
        color 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(148, 163, 184, 0.14);
    color: var(--text);
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
    background: rgba(15, 23, 42, 0.07);
    color: var(--text);
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.theme-toggle {
    padding: 0;
    background: transparent;
}
.theme-toggle__track {
    width: 54px;
    height: 32px;
    padding: 4px;
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
}
.theme-toggle__thumb {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #031014;
    font-size: 0.75rem;
    font-weight: 900;
    transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
[data-theme="light"] .theme-toggle__thumb {
    transform: translateX(22px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
}
.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: var(--text);
    transition:
        transform 220ms ease,
        opacity 220ms ease;
}
.menu-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.75rem 1.05rem;
    border-radius: 999px;
    font-weight: 900;
    letter-spacing: -0.02em;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease,
        border-color 180ms ease;
}
.btn:hover {
    transform: translateY(-2px);
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #031014;
    box-shadow: 0 18px 46px rgba(56, 248, 200, 0.18);
}
.btn-secondary {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
}
.btn-lg {
    min-height: 52px;
    padding: 0.9rem 1.25rem;
}

.hero {
    min-height: 100svh;
    display: grid;
    align-items: center;
    padding-top: calc(var(--header-h) + 2rem);
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    animation: float 10s ease-in-out infinite alternate;
}
.orb-one {
    width: 36rem;
    height: 36rem;
    background: rgba(56, 248, 200, 0.17);
    right: -10rem;
    top: 7rem;
}
.orb-two {
    width: 28rem;
    height: 28rem;
    background: rgba(96, 165, 250, 0.16);
    left: -9rem;
    bottom: 2rem;
    animation-delay: -4s;
}
.grid-glow {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 70px 70px;
    mask-image: radial-gradient(circle at center, black, transparent 72%);
    opacity: 0.32;
}
@keyframes float {
    to {
        transform: translate3d(1.5rem, -1rem, 0) scale(1.04);
    }
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}
.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 1rem;
    color: var(--accent);
    font: 800 0.78rem/1 var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}
.eyebrow span {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 0 8px rgba(56, 248, 200, 0.12);
}
.hero h1,
.section-title {
    margin: 0;
    font-size: clamp(2.75rem, 7.8vw, 5.95rem);
    line-height: 0.95;
    letter-spacing: -0.075em;
}
.section-title {
    font-size: clamp(2.2rem, 5vw, 4.55rem);
    line-height: 1;
}
.hero-subtitle,
.section-copy {
    max-width: 680px;
    margin: 1.4rem 0 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}
.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 2rem;
}
.hero-metrics div,
.mini-stats div {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    backdrop-filter: blur(18px);
}
.hero-metrics strong,
.mini-stats strong {
    display: block;
    font-size: 1.45rem;
    line-height: 1;
}
.hero-metrics span,
.mini-stats span {
    display: block;
    margin-top: 0.45rem;
    color: var(--subtle);
    font-size: 0.84rem;
    font-weight: 700;
}

.hero-card {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(
        180deg,
        var(--surface),
        rgba(255, 255, 255, 0.02)
    );
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}
.code-window {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #050812;
}
[data-theme="light"] .code-window {
    background: #0f172a;
}
.code-window__bar {
    display: flex;
    gap: 0.5rem;
    padding: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.code-window__bar span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fb7185;
}
.code-window__bar span:nth-child(2) {
    background: #fbbf24;
}
.code-window__bar span:nth-child(3) {
    background: #38f8c8;
}
pre {
    margin: 0;
    padding: 1.35rem;
    overflow-x: auto;
    color: #d9f99d;
    font: 700 0.98rem/1.8 var(--mono);
}
.profile-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface-solid);
}
.profile-avatar {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: var(--surface-2);
    font-size: 1.8rem;
}
.profile-name {
    margin: 0;
    font-weight: 900;
    font-size: 1.1rem;
}
.profile-role {
    margin: 0.1rem 0 0;
    color: var(--muted);
}
.profile-highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.profile-highlights span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.58rem 0.75rem;
    border-radius: 999px;
    background: rgba(56, 248, 200, 0.09);
    border: 1px solid rgba(56, 248, 200, 0.18);
    color: var(--accent);
    font: 800 0.76rem/1 var(--mono);
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.toolkit span {
    padding: 0.5rem 0.72rem;
    border-radius: 999px;
    background: rgba(56, 248, 200, 0.09);
    border: 1px solid rgba(56, 248, 200, 0.18);
    color: var(--accent);
    font: 800 0.78rem/1 var(--mono);
}

.about,
.contact {
    background: linear-gradient(180deg, transparent, rgba(148, 163, 184, 0.05));
}
.about-grid,
.contact-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}
.educator-card {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    padding: clamp(1.3rem, 3vw, 2rem);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}
.educator-card__top {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--muted);
    font-weight: 800;
    font-size: 0.9rem;
}
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 8px rgba(56, 248, 200, 0.12);
}
.educator-icon {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    margin: 2rem 0 1.4rem;
    border-radius: 28px;
    background: linear-gradient(
        135deg,
        rgba(56, 248, 200, 0.16),
        rgba(96, 165, 250, 0.18)
    );
    font-size: 2.5rem;
}

.educator-icon svg {
    width: 42px;
    height: 42px;
    color: var(--accent);
}

.educator-card h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.3rem);
    line-height: 1.04;
    letter-spacing: -0.05em;
}
.educator-card p {
    color: var(--muted);
    margin: 1rem 0 0;
}
.mini-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.credentials {
    display: grid;
    gap: 0.85rem;
    margin: 1.6rem 0;
}
.credentials article,
.feature-card,
.course-card,
.contact-form {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
}
.credentials article {
    display: flex;
    gap: 1rem;
    padding: 1rem;
}
.icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--surface-2);
    flex: 0 0 auto;
}
.credentials h3,
.course-card h3,
.feature-card h3 {
    margin: 0;
    font-size: 1.08rem;
    letter-spacing: -0.03em;
}
.credentials p,
.course-card p,
.feature-card p {
    margin: 0.35rem 0 0;
    color: var(--muted);
}
.toolkit {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.section-header {
    max-width: 760px;
    margin-bottom: 2rem;
}
.section-header.centered {
    text-align: center;
    margin-inline: auto;
}
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.4rem;
}
.tab {
    padding: 0.72rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-weight: 900;
    transition:
        background 180ms ease,
        color 180ms ease,
        transform 180ms ease;
}
.tab:hover {
    transform: translateY(-2px);
    color: var(--text);
}
.tab.active {
    background: var(--accent);
    color: #031014;
    border-color: transparent;
}
.course-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.course-card {
    padding: 1.2rem;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        opacity 180ms ease;
}
.course-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 248, 200, 0.38);
}
.course-card.hidden {
    display: none;
}
.course-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    margin-bottom: 1rem;
    font-size: 1.55rem;
}
.course-icon.beginner {
    background: rgba(56, 248, 200, 0.12);
}
.course-icon.intermediate {
    background: rgba(251, 191, 36, 0.14);
}
.course-icon.advanced {
    background: rgba(96, 165, 250, 0.14);
}
.level {
    margin: 0 0 0.35rem !important;
    color: var(--accent) !important;
    font: 900 0.75rem/1 var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.course-card ul {
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.55rem;
}
.course-card li {
    color: var(--muted);
    font-size: 0.93rem;
    display: flex;
    gap: 0.55rem;
}
.course-card li::before {
    content: "✓";
    color: var(--accent);
    font-weight: 900;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.feature-card {
    padding: 1.35rem;
}
.feature-card span {
    display: inline-block;
    margin-bottom: 1.2rem;
    color: var(--accent);
    font: 900 0.82rem/1 var(--mono);
}

.contact-grid {
    align-items: start;
}
.contact-list {
    display: grid;
    gap: 0.7rem;
    margin-top: 1.5rem;
}
.contact-list a {
    color: var(--accent);
    font-weight: 900;
    word-break: break-word;
}
.contact-copy {
    display: grid;
    gap: 1.35rem;
}

.contact-visual-card {
    position: relative;
    min-height: 390px;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(56, 248, 200, 0.16),
            transparent 34%
        ),
        radial-gradient(
            circle at 80% 15%,
            rgba(96, 165, 250, 0.16),
            transparent 34%
        ),
        var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(18px);
}

.contact-visual-card::before {
    content: "";
    position: absolute;
    inset: auto -20% -35% -20%;
    height: 55%;
    background: radial-gradient(
        ellipse at center,
        rgba(56, 248, 200, 0.16),
        transparent 65%
    );
    pointer-events: none;
}

.contact-visual-card__top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--muted);
    font-weight: 800;
    font-size: 0.9rem;
}

.contact-list--cards {
    display: grid;
    gap: 0.85rem;
    margin-top: 1.5rem;
}

.contact-icon-link {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background:
        linear-gradient(
            135deg,
            rgba(56, 248, 200, 0.08),
            rgba(96, 165, 250, 0.06)
        ),
        var(--surface);
    color: var(--text);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(18px);
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease;
}

.contact-icon-link:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 248, 200, 0.34);
    box-shadow: 0 18px 48px rgba(56, 248, 200, 0.12);
}

.contact-icon-badge {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.96),
        rgba(226, 232, 240, 0.92)
    );
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.contact-icon-badge svg {
    width: 28px;
    height: 28px;
    display: block;
}

.contact-link-text {
    display: grid;
    gap: 0.16rem;
    min-width: 0;
}

.contact-link-text strong {
    color: var(--text);
    font-weight: 900;
    line-height: 1.1;
}

.contact-link-text small {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}

.gmail-contact-link:hover .gmail-badge,
.linkedin-contact-link:hover .linkedin-badge {
    transform: scale(1.04);
}

.gmail-badge,
.linkedin-badge {
    transition: transform 180ms ease;
}

@media (max-width: 420px) {
    .contact-icon-link {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .contact-icon-badge {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
        border-radius: 15px;
    }

    .contact-icon-badge svg {
        width: 26px;
        height: 26px;
    }

    .contact-link-text small {
        font-size: 0.8rem;
    }
}

.contact-3d-model {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 290px;
    margin-top: 0.35rem;
    --poster-color: transparent;
    background: transparent;
}

.contact-model-fallback {
    display: grid;
    place-items: center;
    height: 100%;
    padding: 1rem;
    color: var(--subtle);
    text-align: center;
    font: 800 0.82rem/1.5 var(--mono);
}

.contact-visual-tags {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.4rem;
}

.contact-visual-tags span {
    padding: 0.55rem 0.75rem;
    border-radius: 999px;
    background: rgba(56, 248, 200, 0.09);
    border: 1px solid rgba(56, 248, 200, 0.18);
    color: var(--accent);
    font: 800 0.74rem/1 var(--mono);
}

.hardware-panel {
    display: grid;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.hardware-controls {
    display: grid;
    gap: 0.5rem;
}

.hardware-controls label {
    font-weight: 800;
    color: var(--muted);
}

.hardware-viewer-card {
    padding: 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.hardware-viewer-card h3 {
    margin: 0 0 0.35rem;
}

.hardware-viewer-card p {
    margin: 0 0 1rem;
    color: var(--muted);
}

.contact-icon-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-icon-badge {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--line);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease;
}

.linkedin-badge {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.95),
        rgba(240, 244, 248, 0.9)
    );
}

.linkedin-badge svg {
    width: 22px;
    height: 22px;
    display: block;
}

.contact-icon-link:hover .contact-icon-badge {
    transform: translateY(-2px);
}

.gmail-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.gmail-contact-link svg {
    flex: 0 0 auto;
}

.contact-icon-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-icon-badge {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--line);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
}

.gmail-badge {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.95),
        rgba(240, 244, 248, 0.9)
    );
}

.gmail-badge svg {
    width: 22px;
    height: 22px;
    display: block;
}

.contact-icon-link:hover .contact-icon-badge {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

#hardwareModel {
    width: 100%;
    height: 420px;
    background: transparent;
}

@media (max-width: 680px) {
    #hardwareModel {
        height: 280px;
    }
}

@media (max-width: 980px) {
    .contact-visual-card {
        max-width: 560px;
    }
}

@media (max-width: 680px) {
    .contact-visual-card {
        min-height: 330px;
        padding: 0.9rem;
    }

    .contact-3d-model {
        height: 235px;
    }

    .contact-visual-tags span {
        font-size: 0.68rem;
        padding: 0.48rem 0.65rem;
    }
}
.contact-form {
    padding: clamp(1rem, 3vw, 1.5rem);
    display: grid;
    gap: 1rem;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
label {
    display: grid;
    gap: 0.45rem;
}
label span {
    color: var(--muted);
    font-weight: 900;
    font-size: 0.88rem;
}
input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-solid);
    color: var(--text);
    padding: 0.85rem 0.95rem;
    outline: none;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease;
}
textarea {
    resize: vertical;
    min-height: 140px;
}
input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(56, 248, 200, 0.12);
}
.field-error input,
.field-error select,
.field-error textarea {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.1);
}
.error-message {
    min-height: 1rem;
    color: var(--danger);
    font-weight: 800;
    font-size: 0.78rem;
}
.form-note {
    margin: -0.25rem 0 0;
    color: var(--subtle);
    font-size: 0.86rem;
}
.form-status {
    margin: 0;
    min-height: 1.25rem;
    color: var(--accent);
    font-weight: 900;
}

.footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--line);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr auto;
    gap: 1.5rem;
    align-items: center;
}
.footer p {
    margin: 0.8rem 0 0;
    color: var(--subtle);
    font-size: 0.9rem;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}
.footer-links a {
    color: var(--muted);
    font-weight: 800;
}
.social-links {
    display: flex;
    gap: 0.6rem;
}
.social-links a {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--accent);
    font-weight: 900;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.social-link {
    --social-color: var(--accent);

    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: var(--social-color);
    background:
        linear-gradient(
            135deg,
            rgba(56, 248, 200, 0.09),
            rgba(96, 165, 250, 0.08)
        ),
        var(--surface);
    border: 1px solid var(--line);
    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease,
        color 180ms ease;
}

.social-link svg {
    width: 22px;
    height: 22px;
}

.social-link--gmail {
    --social-color: #ea4335;
}

.social-link--linkedin {
    --social-color: #0a66c2;
}

.social-link:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--social-color) 45%, transparent);
    background:
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--social-color) 16%, transparent),
            rgba(96, 165, 250, 0.08)
        ),
        var(--surface-solid);
    box-shadow:
        0 18px 42px color-mix(in srgb, var(--social-color) 20%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Better light-mode social buttons */
[data-theme="light"] .social-link {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.96),
        rgba(238, 246, 255, 0.92)
    );
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow:
        0 14px 34px rgba(15, 23, 42, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .social-link:hover {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--social-color) 10%, white),
        #ffffff
    );
    box-shadow:
        0 18px 42px color-mix(in srgb, var(--social-color) 18%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.social-link:hover {
    transform: translateY(-3px);
    background: var(--accent);
    color: #061014;
    box-shadow: 0 10px 28px rgba(56, 248, 200, 0.22);
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 650ms ease,
        transform 650ms ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}
::selection {
    background: var(--accent);
    color: #031014;
}

/* Light mode refinements for cards, buttons, badges, and chips */
[data-theme="light"] .btn-primary {
    color: #ffffff;
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.18);
}

[data-theme="light"] .brand-mark {
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.2);
}

[data-theme="light"] .hero-card,
[data-theme="light"] .educator-card,
[data-theme="light"] .credentials article,
[data-theme="light"] .feature-card,
[data-theme="light"] .course-card,
[data-theme="light"] .contact-form,
[data-theme="light"] .contact-visual-card,
[data-theme="light"] .contact-icon-link,
[data-theme="light"] .hero-metrics div,
[data-theme="light"] .mini-stats div {
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .profile-highlights span,
[data-theme="light"] .toolkit span,
[data-theme="light"] .contact-visual-tags span,
[data-theme="light"] .contact-mini-points span {
    background: rgba(15, 118, 110, 0.08);
    border-color: rgba(15, 118, 110, 0.16);
    color: var(--accent);
}

[data-theme="light"] .status-dot {
    box-shadow: 0 0 0 8px rgba(15, 118, 110, 0.12);
}

[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .btn-primary {
        color: #ffffff;
        box-shadow: 0 18px 42px rgba(37, 99, 235, 0.18);
    }

    :root:not([data-theme]) .brand-mark {
        color: #ffffff;
        box-shadow: 0 14px 34px rgba(37, 99, 235, 0.2);
    }

    :root:not([data-theme]) .hero-card,
    :root:not([data-theme]) .educator-card,
    :root:not([data-theme]) .credentials article,
    :root:not([data-theme]) .feature-card,
    :root:not([data-theme]) .course-card,
    :root:not([data-theme]) .contact-form,
    :root:not([data-theme]) .contact-visual-card,
    :root:not([data-theme]) .contact-icon-link,
    :root:not([data-theme]) .hero-metrics div,
    :root:not([data-theme]) .mini-stats div {
        box-shadow: 0 22px 60px rgba(15, 23, 42, 0.08);
    }

    :root:not([data-theme]) .profile-highlights span,
    :root:not([data-theme]) .toolkit span,
    :root:not([data-theme]) .contact-visual-tags span,
    :root:not([data-theme]) .contact-mini-points span {
        background: rgba(15, 118, 110, 0.08);
        border-color: rgba(15, 118, 110, 0.16);
        color: var(--accent);
    }

    :root:not([data-theme]) .status-dot {
        box-shadow: 0 0 0 8px rgba(15, 118, 110, 0.12);
    }

    :root:not([data-theme]) input:focus,
    :root:not([data-theme]) select:focus,
    :root:not([data-theme]) textarea:focus {
        box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
    }
}

/* Large desktop screens */
@media (min-width: 1600px) {
    :root {
        --container: 1360px;
    }

    body {
        font-size: 17px;
    }
}

/* Tablet portrait, iPad, small laptops: navbar becomes hamburger */
@media (max-width: 1080px) {
    .container {
        width: min(calc(100% - 2rem), var(--container));
    }

    .nav {
        justify-content: flex-start;
        gap: 0.6rem;
    }

    .brand {
        flex: 1 1 auto;
        min-width: 0;
        margin-right: auto;
    }

    .brand-mark {
        flex: 0 0 auto;
    }

    .brand-text {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-actions {
        order: 2;
        flex: 0 0 auto;
        gap: 0.45rem;
    }

    .theme-toggle {
        flex: 0 0 auto;
    }

    .menu-toggle {
        order: 3;
        display: block;
        flex: 0 0 auto;
    }

    .nav-cta {
        display: none;
    }

    .nav-menu {
        position: fixed;
        inset: var(--header-h) 1rem auto 1rem;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        padding: 1rem;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: var(--surface-solid);
        box-shadow: var(--shadow);
        z-index: 99;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-link {
        padding: 0.9rem 1rem;
    }
}

/* Tablet and smaller page layout */
@media (max-width: 980px) {
    .hero-grid,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-card {
        width: 100%;
        max-width: 560px;
    }

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

    .educator-card {
        position: relative;
        top: auto;
    }

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

/* Phones */
@media (max-width: 680px) {
    .container {
        width: min(calc(100% - 2rem), var(--container));
    }

    .nav {
        gap: 0.45rem;
    }

    .brand {
        gap: 0.55rem;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 13px;
        font-size: 0.9rem;
    }

    .brand-text {
        max-width: clamp(7rem, 36vw, 10rem);
        font-size: 0.9rem;
    }

    .brand-text span {
        display: none;
    }

    .nav-actions {
        gap: 0.35rem;
    }

    .theme-toggle__track {
        width: 48px;
        height: 30px;
    }

    .theme-toggle__thumb {
        width: 20px;
        height: 20px;
        font-size: 0.68rem;
    }

    [data-theme="light"] .theme-toggle__thumb {
        transform: translateX(20px);
    }

    .menu-toggle {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .hero {
        padding-top: calc(var(--header-h) + 1rem);
    }

    .hero h1 {
        font-size: clamp(2.4rem, 15vw, 4rem);
    }

    .hero-metrics,
    .mini-stats,
    .course-grid,
    .feature-grid,
    .form-row {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 4.2rem 0;
    }

    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.25rem;
    }

    .tab {
        white-space: nowrap;
    }

    .contact-form {
        padding: 1rem;
    }

    .form-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Small phones */
@media (max-width: 420px) {
    .container {
        width: min(calc(100% - 1.6rem), var(--container));
    }

    .nav {
        gap: 0.35rem;
    }

    .brand {
        gap: 0.45rem;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        font-size: 0.85rem;
    }

    .brand-text {
        max-width: 105px;
        font-size: 0.84rem;
    }

    .theme-toggle__track {
        width: 44px;
        height: 28px;
    }

    .theme-toggle__thumb {
        width: 18px;
        height: 18px;
        font-size: 0.62rem;
    }

    [data-theme="light"] .theme-toggle__thumb {
        transform: translateX(18px);
    }

    .menu-toggle {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    .menu-toggle span {
        width: 18px;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .profile-highlights {
        grid-template-columns: 1fr;
    }
}

/* Very small phones */
@media (max-width: 360px) {
    .container {
        width: min(calc(100% - 1.4rem), var(--container));
    }

    .brand-text {
        max-width: 78px;
        font-size: 0.78rem;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
        font-size: 0.78rem;
    }

    .theme-toggle__track {
        width: 42px;
        height: 26px;
    }

    .theme-toggle__thumb {
        width: 16px;
        height: 16px;
        font-size: 0.56rem;
    }

    [data-theme="light"] .theme-toggle__thumb {
        transform: translateX(18px);
    }

    .menu-toggle {
        width: 36px;
        height: 36px;
    }

    .menu-toggle span {
        width: 17px;
    }
}

/* Ultra small screens: keep logo icon only so navbar never breaks */
@media (max-width: 330px) {
    .brand-text {
        display: none;
    }

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

/* Landscape phones */
@media (max-width: 900px) and (orientation: landscape) {
    :root {
        --header-h: 70px;
    }

    .hero {
        min-height: auto;
        padding-top: calc(var(--header-h) + 2rem);
    }

    .section {
        padding: 3.5rem 0;
    }

    .nav-menu {
        max-height: calc(100svh - var(--header-h) - 1rem);
        overflow-y: auto;
    }
}

/* Reduce animations for users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }

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