:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --secondary-text: #4a4a4a;
    --font-main: 'Inter', sans-serif;
    --spacing-unit: 1rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-list {
    display: flex;
    justify-content: flex-start;
    gap: 2rem;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-link {
    text-decoration: none;
    color: var(--secondary-text);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-color);
    background: rgba(0, 0, 0, 0.05);
}

/* Adjust container for fixed nav */
body {
    padding-top: 60px;
}

/* Header */
.header {
    margin-bottom: 6rem;
    max-width: 600px;
}

.name {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.bio {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--secondary-text);
    margin-bottom: 2rem;
    max-width: 480px;
}

.socials {
    display: flex;
    gap: 1.5rem;
}

.socials a {
    color: var(--text-color);
    transition: opacity 0.2s;
}

.socials a:hover {
    opacity: 0.6;
}

/* Section Titles */
.section-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 2rem;
}

/* Work Section - Horizontal Scroll */
.work-section {
    margin-bottom: 8rem;
    position: relative;
}

.work-container-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.horizontal-scroll-container {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding-bottom: 2rem;
    /* Space for scrollbar if visible, or just breathing room */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar for cleaner look */
    scrollbar-width: none;
    width: 100%;
    scroll-behavior: smooth;
}

.horizontal-scroll-container::-webkit-scrollbar {
    display: none;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    /* Hidden by default, shown on hover or via JS if needed */
    transition: opacity 0.3s, background-color 0.2s;
    pointer-events: none;
    /* Prevent clicking when hidden */
}

.nav-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.nav-btn:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-btn.prev {
    left: -20px;
}

.nav-btn.next {
    right: -20px;
}

/* On mobile, we might want them inside or more visible */
@media (max-width: 768px) {
    .nav-btn {
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.9);
    }

    .nav-btn.prev {
        left: 10px;
    }

    .nav-btn.next {
        right: 10px;
    }
}

.project-card {
    flex: 0 0 400px;
    height: 500px;
    border-radius: 4px;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
}

/* Fullscreen Overlay for Card Zoom */
.card-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.card-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Expanded Card State */
.project-card.expanding {
    position: fixed !important;
    z-index: 101;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card.expanded {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 80vw !important;
    height: 80vh !important;
    max-width: 1000px;
    max-height: 700px;
    z-index: 101;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

/* Close button for expanded card */
.card-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #333;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.2s ease;
    z-index: 102;
}

.project-details {
    margin-top: 2rem;
    text-align: center;
    max-width: 600px;
    transition: opacity 0.5s ease;
}

.project-details h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.project-details p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
    opacity: 0.9;
}

.project-desc-list {
    text-align: left;
    margin-bottom: 2rem;
    padding-left: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.project-desc-list li {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    line-height: 1.5;
    opacity: 0.95;
}

.view-code-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    font-weight: 600;
    transition: background 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.view-code-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Adjust for light themed cards */
.project-card[style*="color: black"] .view-code-btn {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Travel Page Styles */
.travel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.travel-card {
    background: #f4f4f5;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    aspect-ratio: 4/5;
    position: relative;
}

.travel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.travel-img-placeholder {
    width: 100%;
    height: 100%;
    background-color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 3rem;
}

.travel-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.travel-location {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.travel-date {
    font-size: 0.9rem;
    opacity: 0.8;
}

.project-card.expanded .card-close-btn {
    opacity: 1;
}

.card-close-btn:hover {
    background: #fff;
}

.card-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.project-logo {
    font-size: 2rem;
    font-weight: 900;
    text-align: center;
    line-height: 1;
}

/* Placeholders for visual interest */
.sphere-placeholder {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #888888);
    border-radius: 50%;
    margin-top: 2rem;
}

/* Experiments Section */
.experiments-section {
    max-width: 800px;
}

.experiments-list {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.experiment-item {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.experiment-icon {
    font-size: 1.5rem;
    padding-top: 0.25rem;
}

.experiment-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.experiment-desc {
    color: var(--secondary-text);
    font-size: 1rem;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .name {
        font-size: 3rem;
    }

    .project-card {
        flex: 0 0 85vw;
        /* Show mostly one card on mobile */
        height: 400px;
    }
}