:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #38bdf8;
    --accent-hover: #7dd3fc;
    --border-color: #334155;
}

* {
    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;
}

/* Nav Styles */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0.75rem 2rem;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

nav a {
    color: var(--text-primary);
    margin-left: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--accent-color);
}

.brand-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.nav-right {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 0.75rem;
    min-width: 0;
}

.nav-sections {
    display: flex;
    align-items: center;
    overflow-x: auto;
    min-width: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-sections::-webkit-scrollbar {
    display: none;
}

.nav-sections a {
    flex: 0 0 auto;
    margin-left: 0;
    white-space: nowrap;
}

.nav-sections a + a {
    margin-left: 2rem;
}

.menu-dropdown {
    position: relative;
    margin-left: 0.25rem;
}

.menu-dropdown summary {
    list-style: none;
    cursor: pointer;
    width: 44px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    background: rgba(30, 41, 59, 0.85);
}

.menu-dropdown summary::-webkit-details-marker {
    display: none;
}

.menu-dropdown[open] summary {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.menu-icon {
    width: 18px;
    height: 2px;
    background: currentColor;
    position: relative;
    border-radius: 2px;
}

.menu-icon::before,
.menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.menu-icon::before {
    top: -6px;
}

.menu-icon::after {
    top: 6px;
}

.menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    min-width: 180px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-bg);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.menu-dropdown:not([open]) .menu-panel {
    display: none;
}

.menu-panel a {
    display: block;
    margin: 0;
    padding: 0.65rem 0.9rem;
    font-weight: 500;
}

.menu-panel a + a {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

/* Logo Styles */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 0 !important;
    cursor: pointer;
}

.logo-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    max-width: 30px;
    max-height: 30px;
    flex: 0 0 30px;
    border-radius: 6px;
    object-fit: contain;
}

.logo-text {
    color: #f8fafc;
    font-family: 'Inter', sans-serif;
    letter-spacing: 1px;
    font-size: 1.1rem;
    white-space: nowrap;
}

.logo-text strong {
    color: #38bdf8;
    font-weight: 800;
}

.lang-switch {
    display: inline-flex;
    gap: 0.4rem;
    margin-left: 36px;
}

.lang-btn {
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.75);
    color: var(--text-secondary);
    padding: 0.1rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
}

.lang-btn.is-active {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Header Styles */
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;
    text-align: center;
}

/* Section Styles */
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);
}

/* Research Specific (2D FET & Analysis) */
.figure-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.figure-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.figure-card img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.data-table th, .data-table td {
    border: 1px solid var(--border-color);
    padding: 1rem;
    text-align: center;
}

.data-table th {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
}

.discussion-box {
    background: rgba(56, 189, 248, 0.05);
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem;
    margin-top: 2rem;
    border-radius: 0 8px 8px 0;
}

/* 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 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;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* Math & Visualization */
#data-viz {
    width: 100%;
    height: 500px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.equation-box {
    font-family: 'JetBrains Mono', monospace;
    padding: 2rem 2.4rem;
    background: #000;
    border-radius: 8px;
    overflow-x: auto;
    text-align: center;
    margin: 1.5rem 0;
}

/* Footer */
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 Queries */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    section { padding: 3rem 1.5rem; }
    .logo-text { font-size: 0.9rem; }
    nav { padding: 0.75rem 1rem; gap: 0.5rem; }
    .brand-block { gap: 0.25rem; }
    .lang-switch { margin-left: 0; }
    .lang-btn { font-size: 0.66rem; padding: 0.08rem 0.45rem; }
    .nav-right {
        flex: 1;
        justify-content: flex-end;
        min-width: 0;
    }
    .nav-sections { max-width: calc(100vw - 170px); }
    .nav-sections { gap: 0; }
    .nav-sections a + a { margin-left: 0.9rem; }
    .nav-sections a { font-size: 0.92rem; }
    .menu-dropdown summary { width: 40px; height: 34px; }
    .equation-box {
        font-size: 0.9rem;
        padding: 1rem 1.35rem;
    }
}