/* Math without Words - Refined & Elegant Dark Theme */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap&font-display=swap');

:root {
    /* Colors - Sophisticated dark palette */
    --bg-primary: #0d0d0d;
    --bg-secondary: #1a1a20;
    --text-primary: #f7f7f7;
    --text-secondary: #a8a8a8;
    --accent: #5b5dd6;
    --accent-light: #7577e6;
    --accent-hover: #4a4cc4;
    --border-color: #252529;
    --divider: #1f1f24;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: 16px;
    --line-height: 1.65;
    --letter-spacing: 0.3px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: var(--line-height);
    font-size: var(--font-size-base);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    letter-spacing: var(--letter-spacing);
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 4.5rem;
    line-height: 1.15;
    font-weight: 400;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 2.75rem;
    line-height: 1.2;
    margin-bottom: 3rem;
    font-weight: 400;
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.125rem;
    font-weight: 500;
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.75;
    font-weight: 300;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-light);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    height: 100px;
    transition: height 0.3s ease;
    z-index: 1000;
}

.header.scrolled {
    height: 60px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-title {
    flex-shrink: 0;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    transition: font-size 0.3s ease, color 0.3s ease;
    white-space: nowrap;
}

.logo:hover {
    color: var(--accent);
}

.header.scrolled .logo {
    font-size: 0.95rem;
}

.nav-menu {
    display: flex;
    gap: 0;
    flex: 1;
    justify-content: flex-end;
}

.nav-menu ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-menu a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 4px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent);
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 0.4rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Main Content */
main {
    min-height: 100vh;
}

section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

/* Slideshow Section */
.slideshow-container {
    background-color: var(--bg-secondary);
    position: relative;
    overflow: hidden;
    height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-content {
    width: 100%;
    max-width: 1600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    gap: 1rem;
    padding: 0 2rem;
}

.slideshow-images {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 2px;
    position: relative;
}

.slide {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cta-sign {
    text-align: center;
    opacity: 1;
    transition: opacity 0.6s ease;
}

.cta-sign.fade-out {
    opacity: 0;
    pointer-events: none;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 1rem 1.5rem;
    background-color: transparent;
    color: var(--text-primary);
    border-radius: 2px;
    font-weight: 400;
    font-size: 2rem;
    transition: color 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    color: var(--accent);
}

.chevron {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
    line-height: 1;
}

.chevron:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

/* About Section */
.about-container {
    background-color: var(--bg-primary);
}

.about-content {
    width: 100%;
    max-width: 900px;
    text-align: justify;
}

.blurb {
    font-size: 1.25rem;
    line-height: 1.9;
    color: var(--text-secondary);
    margin-top: 2rem;
    margin-bottom: 3rem;
    font-weight: 300;
}

.blurb p {
    margin-bottom: 1.5rem;
}

.blurb p:last-child {
    margin-bottom: 0;
}

.about-photo {
    margin: 3rem 0;
    display: flex;
    justify-content: center;
}

.about-photo img {
    width: min(400px, 100%);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
}

.about-signature {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.about-signature p {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 300;
}

.about-signature strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.about-signature a {
    font-size: 0.9rem;
}

/* Games Section */
.games-section {
    margin-top: 4rem;
    width: 100%;
}

.games-section h3 {
    text-align: center;
    margin-bottom: 3rem;
}

.game-card {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    margin-bottom: 4rem;
    padding: 2rem;
    background-color: var(--bg-secondary);
    border-radius: 4px;
}

.game-card-reverse {
    flex-direction: row-reverse;
}

.game-images {
    flex: 0 0 45%;
    min-width: 0;
    position: relative;
}

.game-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    aspect-ratio: 4 / 3;
    display: block;
}

.game-content {
    flex: 1;
    min-width: 0;
}

.game-content h4 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.game-content p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.game-authors {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-style: italic;
    font-weight: 300;
}

.game-link {
    display: block;
    margin-top: 1.25rem;
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
    text-align: center;
}

.game-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.keyword {
    color: var(--text-secondary);
    font-weight: 500;
}

.keyword-separator {
    color: var(--border-color);
}

/* Actions Section */
.actions-container {
    background-color: var(--bg-secondary);
}

.actions-content {
    width: 100%;
    max-width: 1000px;
}

.actions-content h3 {
    font-size: 1.5rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
    font-weight: 500;
}

.actions-content h3:first-of-type {
    margin-top: 0;
}

.actions-intro {
    margin: 0 0 2rem 0;
    font-size: 1.25rem;
    line-height: 1.75;
    color: var(--text-secondary);
    max-width: 850px;
    font-weight: 300;
}

.actions-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 850px;
    margin: 0 auto;
}

.action-item {
    padding: 1rem 0;
    border-bottom: 4px solid var(--border-color);
    transition: all 0.3s ease;
}

.action-item:last-child {
    border-bottom: none;
}

.action-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
    border-radius: 2px;
}

.action-item h4 {
    margin-bottom: 1rem;
    margin-top: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 500;
}

.action-details {
    display: flex;
    gap: 2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    align-items: center;
    letter-spacing: 0.2px;
}

.action-date {
    min-width: 130px;
    flex-shrink: 0;
    font-weight: 500;
}

.action-place {
    flex-grow: 1;
}

.action-visitors {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    font-weight: 500;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    min-width: 5rem;
    justify-content: flex-end;
    filter: grayscale(100%);
    opacity: 0.85;
}

.visitor-icon {
    display: inline-block;
    width: 1.2rem;
    flex-shrink: 0;
}

.visitor-number {
    text-align: right;
    min-width: 3rem;
}

/* References Section */
.references-container {
    background-color: var(--bg-primary);
}

.references-content {
    width: 100%;
    max-width: 1000px;
}

.references-intro {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 750px;
    font-weight: 300;
    margin-bottom: 2.5rem;
}

.references-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.reference-item {
    padding: 1.75rem 0 1.75rem 1.5rem;
    border-left: 2px solid var(--accent);
    transition: border-left-color 0.3s ease, padding-left 0.3s ease;
}

.reference-item:hover {
    border-left-color: var(--accent-light);
    padding-left: 2rem;
}

.reference-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    font-size: 1.125rem;
    line-height: 1.5;
}

.reference-authors {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

.reference-journal {
    font-size: 0.875rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.reference-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.reference-link {
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
    display: inline-block;
}

.placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    font-weight: 300;
}

.sponsor-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}

.sponsor-logo {
    height: 45px;
    opacity: 0.65;
    transition: opacity 0.3s ease, filter 0.3s ease;
    filter: grayscale(100%);
}

.sponsor-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    letter-spacing: 0.2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-menu.active {
        max-height: 300px;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem 2rem;
    }

    .nav-menu li {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .header-content {
        padding: 0 1.5rem;
    }

    section {
        min-height: auto;
        padding: 3rem 1.5rem;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2rem;
        margin-bottom: 2.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .slideshow-content {
        gap: 2rem;
    }

    .slideshow-images {
        aspect-ratio: 4 / 3;
    }

    .references-list {
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .action-details {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .action-date {
        min-width: auto;
    }

    .action-visitors {
        justify-content: flex-start;
    }

    .about-signature {
        flex-direction: column;
        gap: 2rem;
    }

    .game-card {
        flex-direction: column !important;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .game-images {
        flex: 0 0 auto;
        width: 100%;
    }

    .game-content h4 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    h1 {
        font-size: 2.5rem;
    }

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

    section {
        padding: 2rem 1rem;
    }

    .cta-button {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }

    .action-item {
        padding: 1.5rem 0;
    }

    .action-item,
    .reference-item {
        padding: 1.5rem 1rem;
    }

    .footer-content {
        gap: 1.5rem;
    }
}
