/* =============================================================================
   JACKKED QUEST SITE — Design System
   ============================================================================= */

:root {
    /* Core Hue (Default: Jackked Light 165) */
    --brand-hue: 165;

    /* Light Mode Constants (Taken from theme.dart) */
    /* Primary: S=0.50, L=0.30 */
    --pS-light: 50%;
    --pL-light: 30%;
    /* Surface: S=0.11, L=0.94 */
    --sS-light: 11%;
    --sL-light: 94%;
    /* Canvas: S=0.50, L=0.97 */
    --cS-light: 50%;
    --cL-light: 97%;

    /* Dark Mode Constants (Taken from theme.dart) */
    /* Primary: S=0.90, L=0.65 */
    --pS-dark: 90%;
    --pL-dark: 65%;
    /* Surface: S=0.07, L=0.10 */
    --sS-dark: 7%;
    --sL-dark: 10%;
    /* Canvas: S=0.18, L=0.08 */
    --cS-dark: 18%;
    --cL-dark: 8%;

    /* Shared */
    --error-light: #B03E50;
    --error-dark: #851222;
    --radius: 8px;
    --transition: 0.2s ease;
}

/* Light theme (default) */
body {
    /* Generative Colors */
    --primary: hsl(var(--brand-hue), var(--pS-light), var(--pL-light));
    /* Hover is just primary with slight lightness adj (or we can keep it simple) */
    --primary-hover: hsl(var(--brand-hue), var(--pS-light), calc(var(--pL-light) + 10%));

    --surface: hsl(calc(var(--brand-hue) + 120), var(--sS-light), var(--sL-light));
    --canvas: hsl(calc(var(--brand-hue) - 120), var(--cS-light), var(--cL-light));

    --text: #1a1a1a;
    --text-muted: #666;
    --error: var(--error-light);

    /* For derived alpha colors */
    --primary-rgb: 42, 120, 108;
    /* Need to handle this dynamically if possible, or use color-mix */
}

/* Dark theme */
body.dark {
    /* Generative Colors */
    --primary: hsl(var(--brand-hue), var(--pS-dark), var(--pL-dark));
    --primary-hover: hsl(var(--brand-hue), var(--pS-dark), calc(var(--pL-dark) + 10%));

    --surface: hsl(calc(var(--brand-hue) + 120), var(--sS-dark), var(--sL-dark));
    --canvas: hsl(calc(var(--brand-hue) - 120), var(--cS-dark), var(--cL-dark));

    --text: #ffffff;
    --text-muted: #999;
    --error: var(--error-dark);
}

/* Quest 3D Aesthetics: Shadows & LED Glow */
.content-body img,
.content-body table,
mjx-container[display="true"] {
    border-radius: var(--radius);
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: -6px 6px 16px color-mix(in srgb, var(--text) 8%, transparent);
    /* Light Mode Shadow (Bottom-Left) */
}

body.dark .content-body img,
body.dark .content-body table,
body.dark mjx-container[display="true"] {
    box-shadow: -6px 6px 20px color-mix(in srgb, var(--primary) 20%, transparent);
    /* Dark Mode LED Glow (Bottom-Left) */
}

/* Specific fix for MathJax display formulae to make them "card-like" */
mjx-container[display="true"] {
    display: block !important;
    margin: 1.5rem auto !important;
    padding: 1.25rem !important;
    background: var(--surface) !important;
    width: auto !important;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
}

/* Theme-responsive image toggling (Logic Only) */
img[src$="#dark-only"] {
    display: none;
}

body.dark img[src$="#dark-only"] {
    display: block;
}

body.dark img[src$="#light-only"] {
    display: none;
}

/* =============================================================================
   BASE STYLES
   ============================================================================= */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--canvas);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.25rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

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

blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-style: italic;
}

code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9em;
    background: var(--surface);
    padding: 0.2em 0.4em;
    border-radius: 4px;
}

pre {
    background: var(--surface);
    padding: 1rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 1rem 0;
}

pre code {
    background: none;
    padding: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

th,
td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--surface);
}

th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =============================================================================
   LAYOUT
   ============================================================================= */

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container ol,
.container ul {
    padding-left: 1.5rem;
}

/* ... */

.content-body {
    padding: 0 0 4rem;
}

.content-body img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--text) 10%, transparent);
}

/* =============================================================================
   NAVIGATION
   ============================================================================= */

.nav {
    background: var(--surface);
    border-bottom: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
    position: sticky;
    top: 0;
    z-index: 100;
}

body.dark .nav {
    border-bottom-color: color-mix(in srgb, var(--text) 10%, transparent);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.nav-brand:hover {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-muted);
    transition: var(--transition);
}

.burger.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.theme-icon-left {
    font-size: 1.2rem;
    color: var(--text-muted);
    user-select: none;
    display: flex;
    align-items: center;
    height: 24px;
}

.theme-icon-right {
    font-size: 1.9rem;
    color: var(--text-muted);
    user-select: none;
    display: flex;
    align-items: center;
    height: 24px;
    margin-left: -4px;
    /* Compensate for larger character footprint to balance gap */
    margin-bottom: 4px;
}

.theme-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.slider {
    position: relative;
    cursor: pointer;
    width: 48px;
    height: 24px;
    background-color: var(--surface);
    border: 2px solid var(--text-muted);
    transition: var(--transition);
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: '';
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-muted);
    transition: var(--transition);
    border-radius: 50%;
}

.theme-toggle input:checked~.slider {
    border-color: var(--primary);
}

.theme-toggle input:checked~.slider:before {
    transform: translateX(24px);
    background-color: var(--primary);
}

.theme-toggle:hover .slider {
    border-color: var(--primary);
}

/* Theme Dropdown */
.theme-dropdown {
    position: relative;
    display: inline-block;
    margin-left: calc(-8px);
    /* Compensate for button padding to match text gap */
}

.theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: color var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover,
.theme-btn.active {
    color: var(--primary);
}

.theme-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--surface);
    border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--text) 15%, transparent);
    display: none;
    flex-direction: column;
    gap: 1rem;
    min-width: 200px;
    z-index: 1000;
}

.theme-menu.visible {
    display: flex;
}

.theme-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.theme-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    min-width: 50px;
}

.theme-control-wrapper {
    display: flex;
    justify-content: center;
    width: 120px;
    /* Fixed width to align toggle and slider center */
}

/* Gradient Hue Slider */
.hue-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(to right,
            hsl(0, 100%, 50%),
            hsl(60, 100%, 50%),
            hsl(120, 100%, 50%),
            hsl(180, 100%, 50%),
            hsl(240, 100%, 50%),
            hsl(300, 100%, 50%),
            hsl(360, 100%, 50%));
    outline: none;
    cursor: pointer;
    border: 1px solid var(--text-muted);
}

.hue-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--text);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hue-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--text);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* =============================================================================
   HERO (Landing Page)
   ============================================================================= */

.hero {
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: white;
}

body.dark .btn-primary {
    color: black;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}

body.dark .btn-secondary {
    border-color: color-mix(in srgb, var(--text) 15%, transparent);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

body.dark .btn-secondary:hover {
    color: black;
}

/* =============================================================================
   CARDS
   ============================================================================= */

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--text) 10%, transparent);
    border-color: color-mix(in srgb, var(--primary) 30%, transparent);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.card h3 {
    margin-top: 0;
    color: var(--primary);
}

.card p {
    color: var(--text-muted);
    margin-bottom: 0;
}

/* =============================================================================
   LISTING GRID
   ============================================================================= */

.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin: 0.5rem 0 3rem;
}

.listing-item {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius);
    transition: all var(--transition);
    border: 1px solid transparent;
}

.listing-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--text) 10%, transparent);
    border-color: color-mix(in srgb, var(--primary) 30%, transparent);
}

.listing-item h3 {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
}

.listing-item:hover h3 {
    color: var(--primary);
}

/* =============================================================================
   ARTICLE / TOPIC CONTENT
   ============================================================================= */

.content-header {
    padding: 1rem 0 0;
    margin-bottom: 0;
}

.content-header h1 {
    margin-bottom: 0.5rem;
}

.content-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.content-body {
    padding: 0 0 4rem;
}

.content-body ul,
.content-body ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-body li {
    margin-bottom: 0.5rem;
}

/* Screenshot gallery — horizontal scroll */
.screenshot-gallery {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--primary) 20%, transparent) transparent;
}

.screenshot-gallery::-webkit-scrollbar {
    height: 4px;
}

.screenshot-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.screenshot-gallery::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--primary) 20%, transparent);
    border-radius: 2px;
}

.screenshot-gallery::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--primary) 40%, transparent);
}

.screenshot-gallery img {
    height: 420px;
    width: auto;
    flex-shrink: 0;
    border-radius: var(--radius);
    scroll-snap-align: start;
    box-shadow: none !important;
}

@media (max-width: 768px) {
    .screenshot-gallery img {
        height: 320px;
    }
}

.content-body hr {
    border: none;
    height: 1px;
    background: color-mix(in srgb, var(--text) 8%, transparent);
    margin: 2rem 0;
}

/* =============================================================================
   FOOTER
   ============================================================================= */

.footer {
    margin-top: auto;
    padding: 2rem 1.5rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--surface);
    background: var(--surface);
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 1.25rem;
}

.footer-col h3 {
    color: var(--text);
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 700;
    text-align: center;
}

.footer-left,
.footer-right {
    text-align: center;
}

.footer-left p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.footer-support {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
    flex-wrap: wrap;
}

.footer-support li {
    display: flex;
    align-items: center;
}

.footer-support li:not(:last-child)::after {
    content: "|";
    margin: 0 0.75rem;
    color: var(--text-muted);
    opacity: 0.3;
}

.footer-support a {
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: color var(--transition);
}

.footer-support a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 1rem;
    border-top: 1px solid color-mix(in srgb, var(--text) 5%, transparent);
    text-align: center;
    font-size: 0.75rem;
}

body.dark .footer-bottom {
    border-top-color: color-mix(in srgb, var(--text) 5%, transparent);
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

main {
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-support {
        justify-content: center;
    }

    .nav-inner {
        padding: 1rem;
        flex-wrap: wrap;
    }

    .burger {
        display: flex;
        order: 2;
    }

    .nav-menu {
        display: none;
        width: 100%;
        order: 3;
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding-top: 0.5rem;
    }

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

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        border-top: 1px solid var(--surface);
    }

    .nav-links a {
        display: block;
        padding: 0.4rem;
    }

    .theme-toggle {
        margin-top: 0.5rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .card-grid,
    .listing-grid {
        grid-template-columns: 1fr;
    }

    .content-header {
        padding: 2rem 0 1rem;
    }
}

/* =============================================================================
   UTILITIES
   ============================================================================= */

.sr-only {
    position: absolute;
    width: 1px;
    padding: 1.5rem;
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--text) 10%, transparent);
    border-color: color-mix(in srgb, var(--primary) 30%, transparent);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.card h3 {
    margin-top: 0;
    color: var(--primary);
}

.card p {
    color: var(--text-muted);
    margin-bottom: 0;
}


/* =============================================================================
   ARTICLE / TOPIC CONTENT
   ============================================================================= */

.content-header {
    padding: 1rem 0 0;
    margin-bottom: 0;
}

.content-header h1 {
    margin-bottom: 0.5rem;
}

.content-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.content-body {
    padding: 0 0 4rem;
}

.content-body ul,
.content-body ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-body li {
    margin-bottom: 0.5rem;
}

/* End of footer refinement */

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

main {
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .nav-inner {
        padding: 1rem;
        flex-wrap: wrap;
    }

    .burger {
        display: flex;
        order: 2;
    }

    .nav-menu {
        display: none;
        width: 100%;
        order: 3;
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding-top: 0.5rem;
    }

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

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        border-top: 1px solid var(--surface);
    }

    .nav-links a {
        display: block;
        padding: 0.4rem;
    }

    .theme-toggle {
        margin-top: 0.5rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .card-grid,
    .listing-grid {
        grid-template-columns: 1fr;
    }

    .content-header {
        padding: 2rem 0 1rem;
    }
}

/* =============================================================================
   UTILITIES
   ============================================================================= */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* =============================================================================
   FORMS (Dash Inputs)
   ============================================================================= */

/* Global base — ensures all inputs are theme-aware by default */
input,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="password"] {
    background: var(--canvas);
    color: var(--text);
    border: 1px solid var(--surface);
    border-radius: var(--radius);
    font-family: inherit;
}

input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    background: var(--canvas);
    border: 1px solid var(--surface);
    color: var(--text);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    min-height: 3rem;
    line-height: normal;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 20%, transparent);
}

/* Number input spinner — hidden */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* =============================================================================
   VIDEO EMBEDS
   ============================================================================= */

.video-link {
    display: block;
    position: relative;
    width: fit-content;
    margin: 1.5rem auto;
}

.video-link::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background-color: var(--primary);
    border-radius: 12px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M8 5v14l11-7z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 50%;
    transition: all 0.2s ease;
    opacity: 0.85;
    box-shadow: 0 4px 10px color-mix(in srgb, var(--text) 30%, transparent);
    z-index: 10;
    pointer-events: none;
}

.video-link:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

/* =============================================================================
   DASH DCC DROPDOWN (Dash 3.x — React-Select)
   ============================================================================= */

/* Container */
.dash-dropdown {
    font-family: inherit;
}

/* Control (the visible box) */
.dash-dropdown .Select-control {
    background-color: var(--canvas) !important;
    border: 1px solid var(--surface) !important;
    border-radius: var(--radius) !important;
    box-shadow: none !important;
    height: 3rem !important;
    overflow: hidden !important;
    cursor: pointer !important;
}

.dash-dropdown.is-focused .Select-control {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 20%, transparent) !important;
}

/* Vertically center value text and placeholder */
.dash-dropdown .Select-value-label,
.dash-dropdown .Select-placeholder {
    line-height: 3rem !important;
}

/* Selected value text */
.dash-dropdown .Select-value-label {
    color: var(--text) !important;
}

/* Placeholder */
.dash-dropdown .Select-placeholder {
    color: var(--text-muted) !important;
}

/* Arrow indicator */
.dash-dropdown .Select-arrow-zone {
    vertical-align: middle !important;
}

.dash-dropdown .Select-arrow {
    border-top-color: var(--text-muted) !important;
}

/* Menu (dropdown list) */
.dash-dropdown .Select-menu-outer {
    background-color: var(--surface) !important;
    border: 1px solid color-mix(in srgb, var(--text) 10%, transparent) !important;
    border-radius: var(--radius) !important;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--text) 15%, transparent) !important;
    margin-top: 4px !important;
    z-index: 9999 !important;
}

/* Individual options */
.dash-dropdown .VirtualizedSelectOption {
    background-color: var(--surface) !important;
    color: var(--text) !important;
    cursor: pointer !important;
}

.dash-dropdown .VirtualizedSelectFocusedOption {
    background-color: var(--primary) !important;
    color: white !important;
}

body.dark .dash-dropdown .VirtualizedSelectFocusedOption {
    color: black !important;
}

/* React-Select internal input — reset global input styles */
.dash-dropdown .Select-input > input {
    color: var(--text) !important;
    background: transparent !important;
    border: none !important;
}

/* Clear zone */
.dash-dropdown .Select-clear-zone {
    color: var(--text-muted) !important;
}

/* =============================================================================
   PORTFOLIO PAGE
   ============================================================================= */

.portfolio-hero {
    padding: 3rem 0 1rem;
    text-align: center;
}

.portfolio-hero h1 {
    font-size: 2.75rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.portfolio-tagline {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 1.25rem;
    line-height: 1.7;
}

.portfolio-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.portfolio-links a {
    font-weight: 500;
}

.portfolio-dot {
    color: var(--text-muted);
    opacity: 0.4;
    user-select: none;
}

/* Sections */
.portfolio-section {
    padding-top: 1rem;
    padding-bottom: 1.5rem;
}

.portfolio-section h2 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

/* Roles / Experience */
.portfolio-role {
    margin-bottom: 1.75rem;
    padding-left: 1rem;
    border-left: 3px solid var(--surface);
    transition: border-color var(--transition);
}

.portfolio-role:hover {
    border-left-color: var(--primary);
}

.portfolio-role-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.portfolio-role-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text);
}

.portfolio-company {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.portfolio-dates {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    white-space: nowrap;
    padding-top: 0.15rem;
}

.portfolio-dates-inline {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    float: right;
}

.portfolio-role-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.portfolio-subrole {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin: 1rem 0 0.4rem;
    font-style: italic;
}

.portfolio-role ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

.portfolio-role li {
    margin-bottom: 0.4rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text);
}

/* Skills */
.portfolio-skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.portfolio-skill-group {
    background: var(--surface);
    padding: 1.25rem;
    border-radius: var(--radius);
}

.portfolio-skill-group h4 {
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
    color: var(--primary);
}

.portfolio-skill-group p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Achievements */
.portfolio-achievements {
    padding-left: 1.5rem;
}

.portfolio-achievements li {
    margin-bottom: 0.5rem;
    font-size: 0.92rem;
    line-height: 1.5;
}

/* Interest Card Links */
.portfolio-card-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.portfolio-interests .portfolio-dot {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .portfolio-hero h1 {
        font-size: 2rem;
    }

    .portfolio-role-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    .portfolio-dates-inline {
        float: none;
        display: block;
        margin-top: 0.15rem;
    }

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