/* Remove underlines from links for cleaner look (matches Zensical official style) */
.md-typeset a:not(:focus,:hover) {
    text-decoration: none;
}

/* Add spacing around card grids */
.md-typeset .grid.cards {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* ========================================
   Hero Landing Page Styles
   ======================================== */

/* Full-height hero container */
.hero-content {
    position: fixed;
    bottom: 15%;
    left: 5%;
    max-width: 550px;
    z-index: 10;
}

.hero-content h1 {
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 1.5rem 0;
    color: var(--md-default-fg-color);
}

.hero-tagline {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--md-default-fg-color--light);
    margin-bottom: 0.75rem;
}

.hero-attribution {
    font-size: 0.85rem;
    color: var(--md-default-fg-color--lighter);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-buttons .md-button {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

.hero-buttons .md-button--primary {
    background-color: var(--md-primary-fg-color);
    border-color: var(--md-primary-fg-color);
}

.hero-buttons .md-button:not(.md-button--primary) {
    background-color: transparent;
    border: 1px solid var(--md-default-fg-color--lighter);
    color: var(--md-default-fg-color);
}

.hero-buttons .md-button:not(.md-button--primary):hover {
    background-color: var(--md-default-fg-color--lightest);
}

/* Hide main content area background on home page only */
.md-typeset .hero-content ~ * {
    /* Only affects pages with hero content */
}

/* Home page specific: force dark theme for animation visibility */
body:has(.hero-content) {
    /* Force dark background */
    background-color: #1a1a2e;

    /* Override Material color scheme variables to force dark mode */
    --md-default-bg-color: #1a1a2e;
    --md-default-fg-color: rgba(255, 255, 255, 0.87);
    --md-default-fg-color--light: rgba(255, 255, 255, 0.54);
    --md-default-fg-color--lighter: rgba(255, 255, 255, 0.32);
    --md-default-fg-color--lightest: rgba(255, 255, 255, 0.12);
    --md-typeset-color: rgba(255, 255, 255, 0.87);
    --md-typeset-a-color: #82b1ff;
}

body:has(.hero-content) .md-main {
    background: transparent;
}

body:has(.hero-content) .md-content {
    padding: 0;
}

/* Force dark mode colors on home page hero text */
body:has(.hero-content) .hero-content h1 {
    color: #ffffff;
}

body:has(.hero-content) .hero-tagline {
    color: rgba(255, 255, 255, 0.7);
}

body:has(.hero-content) .hero-attribution {
    color: rgba(255, 255, 255, 0.5);
}

body:has(.hero-content) .hero-buttons .md-button:not(.md-button--primary) {
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

body:has(.hero-content) .hero-buttons .md-button:not(.md-button--primary):hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Force dark header on home page */
body:has(.hero-content) .md-header {
    background-color: rgba(26, 26, 46, 0.95);
}

/* Hide color scheme toggle on home page */
body:has(.hero-content) [data-md-component="palette"] {
    display: none;
}

body:has(.hero-content) .md-tabs {
    background-color: rgba(26, 26, 46, 0.95);
}

/* Force dark footer on home page */
/* Hide footer on home page */
body:has(.hero-content) .md-footer {
    display: none;
}

/* Force dark mobile navigation drawer on home page */
body:has(.hero-content) .md-sidebar {
    background-color: #1a1a2e;
}

body:has(.hero-content) .md-nav {
    background-color: #1a1a2e;
}

body:has(.hero-content) .md-nav__item {
    color: rgba(255, 255, 255, 0.7);
}

body:has(.hero-content) .md-nav__link {
    color: rgba(255, 255, 255, 0.7);
}

body:has(.hero-content) .md-nav__link:hover {
    color: #ffffff;
}

body:has(.hero-content) .md-nav__link--active {
    color: #ffffff;
}

/* Mobile drawer specific */
@media (max-width: 76.1875em) {
    body:has(.hero-content) .md-nav--primary {
        background-color: #1a1a2e;
        z-index: 10;
    }

    body:has(.hero-content) .md-nav--primary .md-nav__title {
        background-color: #1a1a2e;
        color: #ffffff;
    }

    body:has(.hero-content) .md-nav--primary .md-nav__title[for="__drawer"] {
        background-color: #1a1a2e;
    }

    body:has(.hero-content) .md-sidebar {
        z-index: 10;
    }
}

/* Mobile adjustments for hero */
@media (max-width: 768px) {
    .hero-content {
        left: 1.5rem;
        right: 1.5rem;
        top: 4rem; /* Below header */
        bottom: auto;
        max-width: none;
        z-index: 1; /* Lower than nav drawer */
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .md-button {
        text-align: center;
    }
}

/* Add extra spacing before attribution on taller mobile screens */
@media (max-width: 768px) and (min-height: 700px) {
    .hero-attribution {
        margin-top: 1.5rem;
    }
}

@media (max-width: 768px) and (min-height: 800px) {
    .hero-attribution {
        margin-top: 2.5rem;
    }
}

/* ========================================
   Photon Animation Background
   ======================================== */

#photon-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
}

#photon-background canvas {
    display: block;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    #photon-background {
        display: none !important;
    }
}

/* Slightly reduce opacity on smaller screens for better readability */
@media (max-width: 768px) {
    #photon-background {
        opacity: 0.5;
    }
}
