/* CSS Variables for Theme Support */
:root {
    /* Dark Theme (Default) */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --bg-card: rgba(42, 42, 42, 0.8);
    --bg-card-hover: rgba(52, 52, 52, 0.9);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-hover: #7c3aed;
    --border-color: #333333;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.5);
    --shadow-heavy: rgba(0, 0, 0, 0.7);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: rgba(248, 250, 252, 0.95);
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-hover: #7c3aed;
    --border-color: #e2e8f0;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-heavy: rgba(0, 0, 0, 0.25);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* General body styles */
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
    /* iOS Safari fixes */
    -webkit-overflow-scrolling: touch;
    position: relative;
    min-height: 100vh;
}

/* Theme Switcher */
.theme-switcher {
    position: relative;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 4px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px var(--shadow-light);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.theme-switcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    transform: scale(1.1);
}

/* Footer */
footer {
    text-align: center;
    font-size: 0.9em;
    color: var(--text-muted);
    padding: 20px 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
    position: relative;
    z-index: 10;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}


#starField {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

@keyframes moveStar {
    0% {
        transform: translate(var(--start-x), var(--start-y));
    }
    100% {
        transform: translate(var(--end-x), var(--end-y));
    }
}
/* Rest of your CSS remains the same */

/* Container for page content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 20px 20px;
    text-align: left;
    position: relative;
    z-index: 10;
    min-height: calc(100vh - 120px);
    background: transparent;
}

/* Main content sections */
.content-section {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px var(--shadow-light);
    transition: all 0.3s ease;
}

.content-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px var(--shadow-medium);
    background: rgba(0, 0, 0, 0.2);
}

.content-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
    color: var(--text-primary);
}

.content-section p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 1rem 0;
    line-height: 1.7;
}





/* Page transitions */
.page {
    position: absolute;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.page.active {
    display: block;
    opacity: 1;
    transform: scale(1);
}

/* EyeTrackVR container styling */
.eyetrackvr-container, .haptics-container, .flexvr-container, .tempsense-container {
    display: flex;
    align-items: center;
    margin-top: 20px;
    transition: transform 0.4s ease; /* Same transition duration */
}

/* Link styling */
.eyetrackvr-link, .haptics-link, .flexvr-link, .tempsense-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.4s ease; /* Same transition for the link */
}

/* Text styling */
.eyetrackvr-text, .haptics-text, .flexvr-text, .tempsense-text {
    text-align: left; /* Left-align the text */
    transition: transform 0.8s ease; /* Slow down the transition for the text */
    margin-left: 20px; /* Added space to prevent clipping */
}

.eyetrackvr-icon, .haptics-icon, .flexvr-icon, .tempsense-icon {
    width: 135px;
    height: 135px;
    margin-right: 20px;
    transition: transform 0.4s ease; /* Same transition for the icon */
}

/* Text title styling */
.eyetrackvr-text h2, .haptics-text h2, .flexvr-text h2, .tempsense-text h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #ffffff;
}

/* Text description styling */
.eyetrackvr-text p, .haptics-text p, .flexvr-text p, .tempsense-text p {
    margin: 0;
    font-size: 1rem;
    color: #d1d1d1;
}

/* Hover effect to scale the icon and text together */
.tempsense-link:hover .tempsense-icon,
.tempsense-link:hover .tempsense-text h2,
.tempsense-link:hover .tempsense-text p,
.eyetrackvr-link:hover .eyetrackvr-icon,
.eyetrackvr-link:hover .eyetrackvr-text h2,
.eyetrackvr-link:hover .eyetrackvr-text p,
.haptics-link:hover .haptics-icon,
.haptics-link:hover .haptics-text h2,
.haptics-link:hover .haptics-text p,
.flexvr-link:hover .flexvr-icon,
.flexvr-link:hover .flexvr-text h2,
.flexvr-link:hover .flexvr-text p {
    transform: scale(1.1); /* Both icon and text grow by 10% */
}

/* Prevent text clipping by adjusting origin and adding spacing */
.tempsense-link:hover .tempsense-text,
.eyetrackvr-link:hover .eyetrackvr-text,
.haptics-link:hover .haptics-text,
.flexvr-link:hover .flexvr-text {
    transform-origin: left center; /* Ensure text grows away from the icon */
}


/* Navigation Styles */
nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    margin-bottom: 0;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 20px var(--shadow-light);
    -webkit-backdrop-filter: blur(20px);
    min-height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* iOS Safari fixes */
    position: -webkit-sticky;
    padding-top: max(0.5rem, env(safe-area-inset-top));
}

/* Default navigation links */
#nav-links {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Hide hamburger menu on desktop */
@media (min-width: 769px) {
    #hamburger {
        display: none !important;
    }
}

/* Ensure hamburger menu is properly positioned on mobile */
@media (max-width: 768px) {
    #hamburger {
        display: flex !important;
        position: absolute !important;
        left: 1rem !important;
        top: 1rem !important;
        transform: none !important;
        z-index: 1001 !important;
        width: 48px !important;
        height: 48px !important;
    }
}

.nav-button {
    text-decoration: none;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    padding: 12px 24px;
    border-radius: 12px;
    display: inline-block;
    position: relative;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.nav-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.nav-button:hover::before {
    left: 0;
}

.nav-button:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-medium);
    border-color: transparent;
}

.nav-button:active {
    transform: translateY(0);
}

/* Hamburger menu button */
#hamburger {
    display: none;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    position: relative;
    z-index: 200;
    transition: all 0.3s ease;
    width: 48px;
    height: 48px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#hamburger:hover {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.05);
}

#hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: currentColor;
    margin: 3px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    border-radius: 2px;
}

#hamburger.toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

#hamburger.toggle span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#hamburger.toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Project Cards */
.project-card {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px var(--shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px var(--shadow-medium);
    background: rgba(0, 0, 0, 0.2);
}

.project-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    gap: 1.5rem;
}

.project-icon {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.project-card:hover .project-icon {
    transform: scale(1.1);
}

.project-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.project-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Social Links */
.social-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-medium);
    background: rgba(0, 0, 0, 0.2);
}

.social-link img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

/* Media query adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem 1rem 1rem;
    }
    
    .content-section {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .content-section h1 {
        font-size: 2rem;
    }
    
    nav {
        padding: 0.5rem 1rem;
        margin-bottom: 0;
        height: 60px;
        position: -webkit-sticky;
        position: sticky;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    #hamburger {
        display: flex;
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        z-index: 1001;
        width: 48px;
        height: 48px;
    }
    
    #nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        backdrop-filter: blur(20px);
        padding: 0.5rem 1rem 1rem 1rem;
        border-radius: 0 0 20px 20px;
        border: 1px solid var(--border-color);
        border-top: none;
        box-shadow: 0 8px 32px var(--shadow-medium);
        max-width: 100%;
        overflow: hidden;
    }
    
    #nav-links.show {
        display: flex;
    }
    
    .nav-button {
        margin: 0.25rem 0;
        text-align: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .project-link {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .project-icon {
        width: 100px;
        height: 100px;
    }
    
    .social-links {
        grid-template-columns: 1fr;
    }
    
    /* Ensure theme switcher remains visible on mobile */
    .theme-switcher {
        display: flex !important;
        position: relative !important;
        flex-shrink: 0;
        z-index: 1002;
        margin-left: auto;
    }
    
}
/* Animation keyframes */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}