* {
    box-sizing: border-box;
}

:root {
    --bg-dark: #0f1115;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.08);
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --text-main: #e9edf1;
    --text-muted: #94a3b8;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Glob */
.background-glob {
    position: fixed;
    top: -20%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15), transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* Layout Wrapper */
.layout-wrapper {
    display: flex;
    max-width: 1600px;
    /* Wider to accommodate sidebar */
    margin: 0 auto;
    min-height: calc(100vh - 80px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content {
    flex: 1;
    min-width: 0;
    padding-bottom: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-sidebar {
    width: 380px;
    border-left: 1px solid var(--border-glass);
    background: rgba(15, 17, 21, 0.7);
    backdrop-filter: blur(20px);
    height: calc(100vh - 80px);
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
}

.site-sidebar.collapsed {
    width: 50px;
}

.sidebar-toggle {
    position: absolute;
    left: -15px;
    top: 2rem;
    width: 30px;
    height: 30px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
    z-index: 101;
}

.sidebar-toggle i {
    font-size: 0.8rem;
    color: white;
    transition: transform 0.3s ease;
}

.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.sidebar-toggle:hover {
    transform: scale(1.1);
    background: var(--accent-secondary);
}

.collapsed-label {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    white-space: nowrap;
    text-transform: uppercase;
    font-family: var(--font-heading);
    letter-spacing: 0.2em;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 900;

    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.site-sidebar.collapsed .collapsed-label {
    display: block;
    opacity: 1;
}

.site-sidebar.collapsed .sidebar-header,
.site-sidebar.collapsed .sidebar-scroll-area {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: 0 4rem 2rem;
    /* Add horizontal padding for desktop */
}

.page-header {
    text-align: center;
    max-width: 1200px;
    margin: 4rem auto 2rem;
    padding: 0 2rem;
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.sidebar-header {
    padding: 2rem 1.5rem 1rem;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin: 0;
}

.sidebar-scroll-area {
    padding: 1rem 1.5rem 4rem;
    overflow-y: auto;
    flex: 1;
}

.sidebar-post-item {
    background: var(--bg-card);
    transition: transform 0.2s, border-color 0.2s;
}

.sidebar-thumb {
    width: 50px;
    height: 50px;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-top: 0;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

/* Navigation */
.site-nav {
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glass);
    background: rgba(15, 17, 21, 0.8);
    height: 80px;
    display: flex;
    align-items: center;
}

.nav-content {
    max-width: 1600px;
    /* Match wrapper */
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

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

.nav-links {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.nav-profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--accent-primary);
}

/* Remove Overlay styles */
.nav-overlay,
.hamburger {
    display: none;
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2.5rem;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

.overlay-header h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--accent-primary);
}

.overlay-posts {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    /* Space between years */
    padding-bottom: 2rem;
}

.year-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.year-label {
    font-size: 1.5rem;
    color: var(--accent-primary);
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.5rem;
    margin: 0;
}

.year-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.overlay-post-item {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    padding: 0.8rem;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    transition: transform 0.2s, border-color 0.2s;
}

.overlay-post-item:hover {
    transform: translateX(8px);
    border-color: var(--accent-primary);
}

.overlay-post-thumbnail {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.overlay-post-thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.overlay-post-details {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.overlay-post-item h4 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.3;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Hero */
.hero {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 1.5rem;
    max-width: 1300px;
    margin: 0 auto 2rem;
    padding: 0 2rem;
}

.bento-item {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bento-item:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
}

.bento-large {
    grid-column: span 2;
    grid-row: span 2;
    padding: 1.5rem;
    /* Slightly more compact */
}

/* Bento specific contents */
.resource-link-card {
    padding: 0;
}

.bento-link-content {
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: background 0.3s ease;
}

.resource-link-card:hover .bento-link-content {
    background: rgba(59, 130, 246, 0.05);
}

.resource-link-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--accent-primary);
}

.resource-link-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Map Overlay Styling */
.map-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(15, 17, 21, 0.9) 0%, rgba(15, 17, 21, 0.4) 100%);
    backdrop-filter: blur(8px);
    z-index: 2;
    pointer-events: none;
}

.map-overlay h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin: 0 0 0.25rem 0;
    color: var(--accent-primary);
}

.map-overlay p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}


.bento-wide {
    grid-column: span 2;
}

.bento-medium {
    grid-column: span 1;
    grid-row: span 1;
}

.bento-small {
    grid-column: span 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Bento specific contents */
.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    display: block;
}

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

.bento-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Get in Touch Section */
.get-in-touch-section {
    padding: 3rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.connect-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 32px;
    padding: 4rem;
    backdrop-filter: blur(20px);
    overflow: hidden;
    align-items: center;
}

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

.contact-methods-row {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.subscribe-column {
    background: rgba(59, 130, 246, 0.03);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.bento-newsletter-form-horizontal {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.bento-newsletter-form-horizontal input[type="email"] {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
}

.bento-newsletter-form-horizontal button {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.bento-newsletter-form-horizontal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.contact-main {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.contact-subscribe {
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
}

.contact-subscribe h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.contact-subscribe p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.contact-info h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--accent-primary);
}

/* Integrated Ultra-Simple Footer */
.site-footer {
    border-top: 1px solid var(--border-glass);
    padding: 4rem 2rem 2rem;
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
}

.footer-integrated-content {
    max-width: 1000px;
    margin: 0 auto 3rem;
}

.footer-message p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.footer-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.footer-subscribe-standalone {
    width: 100%;
    max-width: 600px;
}

.footer-heading {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-main), var(--accent-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-description {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.footer-newsletter-form {
    display: flex;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.6rem;
    border-radius: 16px;
    border: 1px solid var(--border-glass);
    width: 100%;
}

.footer-newsletter-form input[type="email"] {
    background: transparent;
    border: none;
    padding: 0.8rem 1.2rem;
    color: var(--text-main);
    font-size: 1.1rem;
    flex: 1;
}

.footer-newsletter-form input:focus {
    outline: none;
}

.footer-newsletter-form button {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.footer-newsletter-form button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.footer-connect-unified {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-size: 1.4rem;
}

.footer-connect-unified strong {
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-connect-unified a {
    color: var(--text-main);
    transition: all 0.3s ease;
    opacity: 0.7;
}

.footer-connect-unified a:hover {
    color: var(--accent-primary);
    opacity: 1;
    transform: translateY(-2px);
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 4rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-glass);
}

.nav-prev,
.nav-next {
    display: flex;
    flex-direction: column;
}

.nav-next {
    text-align: right;
    align-items: flex-end;
}

.nav-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.post-navigation a {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s;
    line-height: 1.4;
}

.post-navigation a:hover {
    color: var(--accent-primary);
}

.newsletter-inline {
    background: rgba(59, 130, 246, 0.05);
    padding: 3rem;
    border-radius: 24px;
    text-align: center;
    border: 1px solid rgba(59, 130, 246, 0.1);
    margin-top: 4rem;
}

@media (max-width: 600px) {
    .post-navigation {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 800px) {
    .footer-actions {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-newsletter-form {
        width: 100%;
        max-width: 400px;
    }

    .footer-newsletter-form input {
        width: 100%;
    }
}

@media (max-width: 800px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .bento-newsletter-form-horizontal {
        flex-direction: column;
    }
}

.contact-map-card {
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-glass);
}

/* Blog List */
.blog-list {
    max-width: 1200px;
    margin: 0 auto 4rem;
    padding: 0 2rem;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    transition: transform 0.2s, border-color 0.2s;
    overflow: hidden;
}

.post-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
}

.post-card-image {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    /* Plain white for logos as requested */
    padding: 1rem;
}

.post-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.post-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-card h3 {
    margin: 0.5rem 0;
    font-size: 1.25rem;
    line-height: 1.3;
}

.post-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

/* Thoughts Simple List */
.thoughts-simple {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.thought-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-glass);
    transition: background 0.2s;
}

.thought-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.thought-thumbnail {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 6px;
    padding: 5px;
}

.thought-thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.thought-content {
    display: flex;
    flex-direction: column;
}

.thought-item h4 {
    margin: 0.2rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.thought-desc {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
}

.view-all-link {
    align-self: center;
    margin-top: 1.5rem;
    font-weight: 600;
    color: var(--accent-primary);
    transition: transform 0.2s;
}

.view-all-link:hover {
    transform: translateX(5px);
}

.text-muted {
    color: var(--text-muted);
}

/* Blog Post */
.blog-post {
    max-width: 700px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.post-header {
    margin-bottom: 3rem;
    text-align: center;
}

.back-link {
    display: block;
    margin-bottom: 2rem;
    color: var(--accent-primary);
    font-weight: 600;
    text-align: left;
}

.post-content {
    font-size: 1.1rem;
    color: #d1d5db;
}

.post-content h2 {
    color: var(--text-main);
    margin-top: 2.5rem;
    font-size: 1.8rem;
}

.post-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
}

.post-content pre {
    background: #1e1e1e;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
}

/* Newsletter Footer */
footer {
    border-top: 1px solid var(--border-glass);
    padding: 2rem 2rem;
    text-align: center;
    background: radial-gradient(circle at center bottom, rgba(59, 130, 246, 0.08), transparent 70%),
        linear-gradient(to top, #000, var(--bg-dark));
    position: relative;
    overflow: hidden;
}

/* Bento Subscribe Card */
.bento-subscribe-card {
    background: linear-gradient(135deg, rgba(15, 17, 21, 0.9) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-color: var(--accent-primary);
    position: relative;
    overflow: hidden;
}

.bento-subscribe-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.bento-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.bento-newsletter-form input[type="email"] {
    width: 100%;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    padding: 1.2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: block;
}

.bento-newsletter-form input[type="email"]:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
    outline: none;
}

.bento-newsletter-form button {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.bento-newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Featured Research scroller */
.featured-research {
    max-width: 1400px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.scroller-header {
    margin-bottom: 1.5rem;
}

.scroller-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.scroller-header h2 {
    font-size: 2rem;
    margin-bottom: 0.2rem;
}

.scroller-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.horizontal-scroller-container {
    position: relative;
    display: flex;
    align-items: center;
}

.horizontal-scroller {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 1rem 0 2rem;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
    width: 100%;
}

.horizontal-scroller::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

.scroll-card {
    flex: 0 0 35%;
    /* Reduced size */
    min-width: 300px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    overflow: hidden;
    scroll-snap-align: start;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

@media (max-width: 800px) {
    .scroll-card {
        flex: 0 0 85%;
    }
}

.scroll-card:hover {
    transform: scale(1.02);
    border-color: var(--accent-primary);
}

.scroll-card-image {
    height: 200px;
    /* Reduced height */
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.scroll-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.scroll-card-content {
    padding: 1.5rem;
}

.scroll-card-content h3 {
    font-size: 1.4rem;
    /* Smaller font */
    margin: 0.5rem 0;
    line-height: 1.2;
}

.scroll-card-content p {
    font-size: 0.95rem;
    /* Smaller font */
    color: var(--text-muted);
    margin: 0;
}

/* Scroller Nav */
.scroller-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(15, 17, 21, 0.8);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s, background 0.3s;
    opacity: 0;
}

.scroller-nav:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.scroller-nav.prev {
    left: -25px;
}

.scroller-nav.next {
    right: -25px;
}

@media (max-width: 1200px) {
    .scroller-nav.prev {
        left: 0;
    }

    .scroller-nav.next {
        right: 0;
    }
}

@media (max-width: 900px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .layout-wrapper {
        flex-direction: column;
    }

    .site-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-left: none;
        border-top: 1px solid var(--border-glass);
    }

    .sidebar-scroll-area {
        height: 500px;
        /* Scrollable list on mobile too but fixed height */
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }
}

/* Gallery Grid Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.gallery-item {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

.gallery-item img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    background: #000;
    display: block;
}

.gallery-info {
    padding: 1.5rem;
}

.gallery-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--accent-primary);
}

.gallery-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

@media (max-width: 1200px) {
    .main-content {
        padding: 0 2rem 2rem;
    }
}

/* Lightbox Enhancements */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 12, 16, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    margin-top: 1.5rem;
    color: #fff;
    font-size: 1.1rem;
    font-family: var(--font-heading);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1.5rem;
    }

    .gallery-item img {
        height: 250px;
    }
}