/* 
   Global Tokens & Reset
*/
:root {
    --bg-color: #050b14;
    /* Deep space navy */
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --accent-primary: #808cf8;
    --accent-secondary: #808cf8;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-glow: rgba(128, 140, 248, 0.15);

    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Google Sans', sans-serif;

    --hero-scale: 0.8;
    /* Change this single number to scale the hero text */
    --hero-font-size: clamp(calc(3rem * var(--hero-scale)), calc(5vw * var(--hero-scale)), calc(5rem * var(--hero-scale)));

    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* 
   Star Canvas
*/
#star-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    transition: opacity 3s ease;
}

/* 
   Background effects (Blobs) 
*/
.blob-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
    animation: drift 20s infinite alternate linear;
    transition: opacity 3s ease;
}

.blob-1 {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.45) 0%, rgba(14, 165, 233, 0) 70%);
    top: -15%;
    left: -15%;
}

.blob-2 {
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, rgba(37, 99, 235, 0) 70%);
    top: 40%;
    right: -20%;
    animation-delay: -5s;
}

.blob-3 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.4) 0%, rgba(56, 189, 248, 0) 70%);
    bottom: -10%;
    left: 20%;
    animation-delay: -10s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* 
   Typography 
*/
h1,
h2,
h3,
.logo {
    font-family: var(--font-heading);
    font-weight: 400;
}

.gradient-text {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), #b224ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 
   Layout 
*/
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* 
   Header Navigation 
*/
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 11, 20, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    transition: var(--transition-smooth);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
}

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

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* 
   Buttons 
*/
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-sans);
    transition: var(--transition-fast);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: #808cf8ff;
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(15, 23, 42, 0.05);
    border-color: var(--accent-primary);
}

.btn-small {
    padding: 0.5rem 1.2rem;
    font-size: 0.875rem;
}


/* 
   Hero Section 
*/
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: var(--hero-font-size);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

/* 
   Projects Section 
*/
.projects-section {
    padding: 8rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* 
   Glassmorphic Cards 
*/
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.project-image {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.03);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.glass-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 11, 20, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition-fast);
}

.glass-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    padding: 1.8rem;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-stack span {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 20px;
    color: var(--accent-primary);
    font-weight: 500;
}

/* 
   Footer 
*/
.glass-footer {
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    padding: 5rem 0 3rem;
    margin-top: 5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-left h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.footer-left p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

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

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 
   Media Queries 
*/
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
    }

    .footer-right {
        align-items: flex-start;
    }

    .nav-links {
        display: none;
        /* Add a mobile menu logic if needed */
    }
}

/* 
   Toggle Switch 
*/
.toggle-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-left: 1rem;
}

.toggle-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    transition: 0.4s;
    border-radius: 22px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-secondary);
    transition: 0.4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: rgba(56, 189, 248, 0.2);
    border-color: var(--accent-primary);
}

input:checked+.slider:before {
    transform: translateX(22px);
    background-color: var(--accent-primary);
}

/* Animation Disabling */
body.animations-disabled .blob {
    opacity: 0 !important;
}


body.animations-disabled #star-canvas {
    opacity: 0.05;
    /* Fade to almost black, just very subtle stars remaining */
}

/* 
   List View Layout (AMUSE Page)
*/
.list-view {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 1200px;
    margin: 4rem auto;
}

.list-card {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    padding: 2.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(20px);
}

.list-card:hover {
    border-color: var(--glass-border);
    box-shadow: none;
    transform: none;
    transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.list-card-video {
    flex: 0 0 400px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.list-card-video iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.list-card-content {
    flex: 1;
}

.list-card-content h3 {
    font-size: 2rem;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
}

.list-card-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 
   Mobile Navigation 
*/
.menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 1002;
    padding: 0.5rem;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: rgba(5, 11, 20, 0.98);
    backdrop-filter: blur(20px);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    padding: 6rem 2rem 2rem;
    transition: var(--transition-smooth);
    border-left: 1px solid var(--glass-border);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav .nav-links {
    flex-direction: column;
    gap: 2rem;
}

.mobile-nav .nav-links a {
    font-size: 1.2rem;
}

.mobile-nav .toggle-container {
    margin-left: 0;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
}

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

@media (max-width: 960px) {
    .glass-header .nav-links {
        display: none !important;
    }

    .menu-btn {
        display: block;
    }

    .mobile-nav .nav-links {
        display: flex !important;
        flex-direction: column;
    }

    .list-card {
        flex-direction: column;
        padding: 2rem;
        text-align: center;
    }

    .list-card-video {
        width: 100%;
        flex: none;
        margin-bottom: 1.5rem;
    }
}