/* :root defines "CSS Variables". 
   If we want to change the whole site's color scheme, we just change these values here.
*/
:root {
    --bg-color: #FFFFFF; /* Pure white background */
    --bg-soft: #F5F5F7; /* Light gray for secondary sections */
    --text-main: #1D1D1F; /* Almost black text (easier on eyes than #000) */
    --text-light: #86868B; /* Gray text for secondary info */
    --accent: #0071E3; /* Apple-style Blue */
    --glass: rgba(255, 255, 255, 0.8); /* See-through white */
    --shadow: 0 10px 30px rgba(0,0,0,0.05); /* Soft shadow */
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Apple-style smooth easing */
}

/* RESET: Removes default spacing browsers add to elements */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6; /* Improves text readability */
    overflow-x: hidden; /* Prevents horizontal scrollbar */
}

/* TYPOGRAPHY */
h1 {
    font-size: 4rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -0.01em;
    margin-bottom: 2rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* UTILITY CLASSES */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}
/* Centers content */
.section-padding {
    padding: 8rem 0;
}
/* Consistent vertical spacing */
.bg-soft {
    background-color: var(--bg-soft);
}

/* GLASS CARD STYLE */
/* Used for timeline items and modals to look like floating glass */
.glass-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.02); /* Very subtle border */
}

/* NAVIGATION */
.glass-nav {
    position: fixed; /* Sticks to top */
    top: 0;
    width: 100%;
    background: var(--glass);
    /* backdrop-filter creates the blur effect behind the nav */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); /* For Safari support */
    z-index: 1000; /* Ensures it sits on top of everything */
    border-bottom: 2px solid rgba(0,0,0,0.05);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* CHANGE 1: Remove the width limit so it spans the whole screen */
    width: 100%;
    max-width: 100%;
    /* CHANGE 2: Remove auto margins since we aren't centering a box anymore */
    margin: 0;
    /* CHANGE 3: Increase side padding so they aren't stuck to the absolute edge */
    padding: 1.2rem 4rem;
}

/* Optional: Adjust for smaller screens so it doesn't look weird on mobile */
@media(max-width: 768px) {
    .nav-content {
        padding: 1.2rem 2rem;
    }
}

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

}

    .nav-links a {
        font-size: 0.9rem;
        font-weight: 500;
        color: var(--text-light);
    }

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

/* HERO SECTION */
.hero {
    height: 100vh; /* Takes up 100% of the Viewport Height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(135deg, #1D1D1F 0%, #86868B 100%);
    -webkit-background-clip: text; /* Clips background to the text shape */
    -webkit-text-fill-color: transparent; /* Makes text see-through so background shows */
}

/* Scroll Indicator (Line at bottom of hero) */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--text-light);
}

    .scroll-indicator .line {
        width: 1px;
        height: 40px;
        background: #ddd;
        margin: 10px auto 0;
    }

/* PROJECT FILTERS */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-group {
    display: flex;
    background: var(--bg-soft);
    padding: 4px;
    border-radius: 50px;
}

.filter-btn {
    border: none;
    background: none;
    padding: 0.6rem 1.5rem;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}
    /* When a button is active, it becomes white with a shadow */
    .filter-btn.active {
        background: white;
        color: var(--text-main);
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }

/* TOGGLE SWITCH (The tricky part) */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 24px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }
/* Hide the real checkbox */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ddd;
    transition: .4s;
    border-radius: 34px;
}
    /* The white circle inside the toggle */
    .slider:before {
        position: absolute;
        content: "";
        height: 16px;
        width: 16px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }
/* When checked (active), change color and move the circle */
input:checked + .slider {
    background-color: var(--text-main);
}

    input:checked + .slider:before {
        transform: translateX(16px);
    }

/* GRID LAYOUT */
.project-grid {
    /* Auto-fill columns: fits as many 300px columns as possible */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    /* Initial state for scroll animation (hidden and moved down) */
    opacity: 0;
    transform: translateY(20px);
}

    .project-card:hover {
        transform: scale(1.02);
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    }

.card-img {
    height: 200px;
    background: #eee;
    width: 100%;
    object-fit: cover;
}

.card-info {
    padding: 1.5rem;
}

/* TIMELINE (Vertical Line) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
    /* The vertical grey line */
    .timeline::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 1px;
        background: #ddd;
    }

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 3rem;
}
    /* The dot on the timeline */
    .timeline-item::before {
        content: '';
        position: absolute;
        left: -4px;
        top: 0;
        width: 9px;
        height: 9px;
        background: var(--text-main);
        border-radius: 50%;
    }

/* MODAL / POPUP */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none; /* User can't click it when hidden */
    transition: var(--transition);
}

    .modal-overlay.active {
        opacity: 1;
        pointer-events: all;
    }
/* Show it */

.modal-content {
    max-width: 600px;
    width: 90%;
    position: relative;
    transform: scale(0.95); /* Starts slightly small */
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: scale(1); /* Zooms in */
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ANIMATIONS */
/* Define the keyframes for fading up */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Classes to apply animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}
/* Waits 0.2s */
.delay-2 {
    animation-delay: 0.4s;
}
/* Waits 0.4s */

/* SCROLL TRIGGER CLASS */
/* Elements with .reveal start hidden and move up when Javascript adds .active */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: 1s cubic-bezier(0.16, 1, 0.3, 1);
}

    .reveal.active {
        opacity: 1;
        transform: translateY(0);
    }

/* --- UPDATED LOGO STYLES --- */
.logo {
    display: flex;
    align-items: center;
    gap: 12px; /* Space between face and text */
    text-decoration: none;
    color: var(--text-main);
}

.logo-img {
    height: 50px; /* Adjust this to make the face bigger/smaller */
    width: auto;
    display: block;
    mix-blend-mode: multiply; /* MAGICAL LINE: Makes white background of image disappear if it isn't perfectly transparent */
}

.logo span {
    font-weight: 700;
    letter-spacing: -0.05em;
    font-size: 1.2rem;
}


/* --- BENTO GRID STYLES --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.bento-card {
    background: white;
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .bento-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    }

/* Make the first card wide on desktop */
@media (min-width: 768px) {
    .bento-card.large {
        grid-column: span 2;
    }
}

.bento-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.bento-card p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

.bento-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: var(--bg-soft);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

    .tag-cloud span {
        background: var(--bg-soft);
        color: var(--text-main);
        padding: 0.5rem 1rem;
        border-radius: 8px;
        font-size: 0.85rem;
        font-weight: 500;
    }

/* --- AURORA BACKGROUND SYSTEM --- */
.blob-cont {
    position: fixed; /* Stays in place while you scroll */
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100vh;
    z-index: -1; /* Pushes color behind your text and cards */
    overflow: hidden;
    background: #FFFFFF; /* The base white canvas */
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px); /* Creates the foggy, soft look */
    opacity: 0.4; /* Keeps the color subtle and professional */
    animation: float 15s infinite alternate; /* Makes them breathe/move */
}

/* Color 1: Soft Sky Blue */
.blob-one { 
    top: -10%; 
    left: -10%; 
    width: 50vw; 
    height: 50vw; 
    background: #E0F2FE; 
}

/* Color 2: Gentle Lavender */
.blob-two { 
    bottom: -10%; 
    right: -10%; 
    width: 60vw; 
    height: 60vw; 
    background: #F3E8FF; 
    animation-delay: -5s; 
}

/* Color 3: Indigo Accent */
.blob-three { 
    top: 40%; 
    left: 30%; 
    width: 30vw; 
    height: 30vw; 
    background: #E0E7FF; 
    opacity: 0.2; 
}

/* The Movement Logic */
@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 60px) scale(1.1); }
}

/* --- OPTIONAL: HOLOGRAPHIC CARD HOVER --- */
/* Add this to make your cards "glow" when you touch them */
.bento-card:hover, .glass-card:hover, .project-card:hover {
    background: rgba(255, 255, 255, 0.9); /* Makes the card pop against the colors */
    border-top: 2px solid #0071E3; /* Adds a "Digital Blue" stripe on top */
}

/* --- RED PENCIL UNDERLINE --- */
.sketch-underline {
    position: relative;
    display: inline-block;
    color: var(--text-main); /* Ensures the text stays dark */
}

    .sketch-underline::after {
        content: "";
        position: absolute;
        left: -5%;
        bottom: 2px; /* Adjust this to move the line up or down */
        width: 110%;
        height: 12px;
        /* This SVG creates a hand-drawn look using Safety Red (#FF3B30) */
        background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 10"><path d="M1 5 Q 50 1 99 5" stroke="%23FF3B30" stroke-width="3" fill="none" stroke-linecap="round"/></svg>');
        background-size: 100% 100%;
        background-repeat: no-repeat;
        z-index: -1; /* Puts the line slightly behind the text for a realistic look */
    }

/* --- BLUEPRINT CORNER BRACKETS --- */
/* the blue tone under squares */
/* We apply this to both Bento and Glass cards */
.bento-card, .glass-card {
    position: relative;
    border: 1px solid #E5E5E7;
}

/* --- LASER NAV HOVER --- */
.nav-links a {
    position: relative;
    transition: color 0.3s ease;
}

    .nav-links a:hover {
        color: #FF3B30 !important; /* Forces Safety Red on hover */
    }

    .nav-links a::before {
        content: "";
        position: absolute;
        left: -15px; /* Moves the dot to the left of the text */
        top: 50%;
        transform: translateY(-50%) scale(0);
        width: 8px;
        height: 8px;
        background: #FF3B30;
        border-radius: 50%;
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .nav-links a:hover::before {
        transform: translateY(-50%) scale(1); /* Pops the dot into view */
    }

/* --- FOOTER LINK ALIGNMENT & SPACING --- */
.footer-socials {
    display: flex;
    justify-content: center; /* Ensures all 3 links are on the same line */
    gap: 80px; /* Brave spacing between links */
    margin-top: 50px;
    padding-bottom: 20px;
}

.footer-link {
    position: relative;
    font-size: 1.1rem;
    font-weight: 600; /* Bold so they are clearly links */
    color: #1D1D1F;
    text-decoration: none;
    transition: color 0.3s ease;
}

    /* --- THE LASER DOT EFFECT --- */
    .footer-link::before {
        content: "";
        position: absolute;
        left: -20px; /* Moves dot to the left of the word */
        top: 50%;
        transform: translateY(-50%) scale(0); /* Hidden by default */
        width: 8px;
        height: 8px;
        background: #FF3B30; /* Safety Red laser point */
        border-radius: 50%;
        box-shadow: 0 0 10px rgba(255, 59, 48, 0.5); /* Subtle glow */
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .footer-link:hover {
        color: #FF3B30; /* Text turns red on hover */
    }

        .footer-link:hover::before {
            transform: translateY(-50%) scale(1); /* Dot pops in when hovering */
        }

    /* Adding a subtle "Pencil Line" underline on hover for extra visibility */
    .footer-link::after {
        content: "";
        position: absolute;
        width: 100%;
        height: 2px;
        bottom: -6px;
        left: 0;
        background-color: #FF3B30;
        transform: scaleX(0);
        transform-origin: bottom right;
        transition: transform 0.3s ease-out;
    }

    .footer-link:hover::after {
        transform: scaleX(1);
        transform-origin: bottom left;
    }
 