:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #38bdf8;
    --accent-hover: #7dd3fc;
    --border-color: #334155;
}

/* Nav Styles */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 2rem;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    border-bottom: 1px solid var(--border-color);
}

nav a {
    color: var(--text-primary);
    margin-left: 2rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

header {
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    padding: 2rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--accent-color);
    font-weight: 400;
    max-width: 600px;
}

section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

/* Plotly Section */
#data-viz {
    width: 100%;
    height: 500px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    aspect-ratio: 1/1;
    background: #000;
}

.gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
    opacity: 0.8;
}

.gallery-item:hover img {
    transform: scale(1.1);
    opacity: 1;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.8);
    font-size: 0.875rem;
    color: var(--text-primary);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* MathJax Section */
.equation-box {
    font-family: 'JetBrains Mono', monospace;
    padding: 2rem;
    background: #000;
    border-radius: 8px;
    overflow-x: auto;
    text-align: center;
}

footer {
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    section { padding: 3rem 1.5rem; }
}