/* --- 1. GLOBALS & TYPOGRAPHY --- */
:root {
    /* LIGHT MODE (Default) */
    --color-bg: #FFFFFF;
    --font-heading: 'Sora';
    --font-body: 'Inter';
    --color-text: #111111;
    --color-accent: #FF5001; /* --color-accent: #0077B6; Muted blue for professional look */
    --color-subtle: #242126;
    --color-border: #EEEEEE;
    --color-card-bg: #FFFFFF;
    --color-section-bg: #FAFAFA; 
    --color-shadow: rgba(0, 0, 0, 0.08);
}

/* DARK MODE OVERRIDES */
body.dark-theme { 
    --color-bg: #111111;
    --color-text: #F5F5F5;
    --color-accent: #64FFDA; /* Electric Teal for high contrast */
    --color-subtle: #AAAAAA;
    --color-border: #333333;
    --color-card-bg: #1F1F1F;
    --color-section-bg: #191919;
    --color-shadow: rgba(100, 255, 218, 0.1);

    .alt-logo-svg {
        filter: brightness(0) invert(1) hue-rotate(180deg);
        /* - brightness(0) converts everything to black.
           - invert(1) flips black to white.
           - This is more aggressive than a simple invert.
        */
        transition: filter 0.5s; 
    }
}

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

body {
    font-family: var(--font-body);
    background-color: var(--color-bg); 
    color: var(--color-text); 
    line-height: 1.6;
    scroll-behavior: smooth;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px; 
    margin: 0 auto;
    padding: 0 30px;
}

/* Headings */
h1 { font-family: var(--font-heading); font-size: clamp(3rem, 7vw, 6rem); font-weight: 800; line-height: 1.0; color: var(--color-text); }
h2 { font-family: var(--font-heading); font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 700; margin-top: 50px; color: var(--color-text); }
h3 { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--color-text); }

p, li {
    font-family: var(--font-body);
    color: var(--color-subtle);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s, opacity 0.3s;
}
a:hover {
    color: var(--color-text);
}

.pre-header {
    font-size: 0.9rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.button {
    display: inline-block;
    padding: 15px 30px;
    border: 1px solid var(--color-accent);
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    background-color: transparent;
    color: var(--color-accent);
    transition: all 0.3s;
}
.button.primary:hover {
    background-color: var(--color-accent);
    color: var(--color-bg);
}
.button.large {
    font-size: 1.1rem;
}

/* --- 2. HEADER/NAVBAR (FIXED POSITION) --- */
#navbar {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%; 
    background-color: var(--color-bg);
    z-index: 10000; /* High z-index to ensure visibility */
    padding: 25px 0;
    border-bottom: 1px solid var(--color-border);
}
#navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    /* Existing logo styles */
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-text);
    position: relative; /* Needed for positioning the absolute logo text elements */
    overflow: hidden; /* CRITICAL: Hides clipped text */
    
    /* Set up the default state for the custom scroll variable */
    --scroll-ratio: 0; 
}

/* 2a. Default Logo Text (Sanjeev) */
.logo-text {
    /* The core text that will gradually disappear */
    display: inline-block; 
    
    /* CRITICAL: The clip-path creates the gradual "erasing" effect from right-to-left. 
       When --scroll-ratio is 0, clip-path is 100% (fully visible).
       When --scroll-ratio is 1, clip-path is 0% (fully erased/hidden).
    */
    clip-path: inset(0 calc(var(--scroll-ratio) * 100%) 0 0); 
    
    /* Smooth transition for the opacity, size, and the clip-path */
    transition: transform 0.3s, opacity 0.3s, clip-path 0.05s linear;

    font-family: 'Sora';
}

/* 2b. Alternate Logo SVG (S R E.) */
.alt-logo-svg {
    position: absolute;
    /* Use translate to perfectly center the SVG over the logo's origin point */
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%) scale(0.8); 
    
    /* Size control */
    height: 3.5rem; /* Control the visual size */
    width: auto;
    
    opacity: 0;
    pointer-events: none; 
    
    /* Ensure the image is rendered cleanly */
    object-fit: contain; 
    
    /* This text appears as the main text disappears */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;

}

/* 2c. Final State (SVG fully visible) */
.logo.transformed .alt-logo-svg {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Ensure the original text is fully hidden */
.logo.transformed .logo-text {
    opacity: 0;
}

#navbar nav {
    display: flex;
    align-items: center;
}
#navbar nav a {
    margin-left: 30px;
    color: var(--color-subtle);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 1rem;
}
#navbar nav a:hover {
    color: var(--color-accent);
}

/* --- 3. SECTION STYLING --- */
section {
    padding: 120px 0;
}

/* HERO SECTION (Adjusted for fixed header) */
#hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 180px; /* Pushed content down below fixed header */
}
#hero .container {
    max-width: 900px;
    margin: 0 auto;
}
#hero h1 {
    margin: 20px 0 40px 0;
}
.scroll-hint {
    /* STYLING FOR CLICKABLE HERO LINK */
    display: inline-block;
    color: var(--color-subtle);
    font-size: 1rem;
    margin-top: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.scroll-hint:hover {
    color: var(--color-accent); 
}


/* ABOUT SECTION STYLING */
.about-section {
    padding-top: 150px;
    padding-bottom: 120px;
    background-color: var(--color-bg); 
}

.about-section .section-title {
    font-size: clamp(3rem, 6vw, 4.5rem); 
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 70px;
}

.about-content-grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr; 
    gap: 80px;
}

.about-hulk-text {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 500;
    line-height: 1.3;
    color: var(--color-text);
}

.about-bio-details p {
    font-size: 1rem;
    color: var(--color-subtle);
    margin-bottom: 25px;
}

/*.about-contact-links {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}*/

.about-contact-category {
    font-size: 0.9rem;
    color: var(--color-subtle);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.about-contact-links a {
    font-size: 1rem;
    color: var(--color-text);
    margin-bottom: 10px;
    transition: color 0.3s;
}

.about-contact-links a:hover {
    color: var(--color-accent);
}


/* EXPERIENCE SECTION STYLING */
.experience-section {
    padding-top: 150px;
    padding-bottom: 120px;
    background-color: var(--color-bg); 
}

.experience-section .section-title {
    font-size: clamp(3rem, 6vw, 4.5rem); 
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 70px;
}

.experience-role {
    padding-bottom: 60px;
    margin-bottom: 60px;
    border-bottom: 1px solid var(--color-border);
}
.experience-role:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.role-company-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 30px;
}

.role-details-grid {
    display: grid;
    grid-template-columns: 1.5fr 3fr; 
    gap: 50px;
}

.role-key-info {
    display: flex;
    flex-direction: column;
    padding-right: 30px; 
    border-right: 1px solid var(--color-border);
}

.detail-label {
    font-size: 1rem;
    color: var(--color-subtle);
    line-height: 1.6;
    margin-bottom: 5px;
}

.role-description p {
    font-size: 1rem;
    color: var(--color-subtle);
    margin-bottom: 20px;
}

.role-description ul {
    list-style: none;
    padding-left: 0;
}

.role-description ul li {
    font-size: 1rem;
    color: var(--color-subtle);
    margin-bottom: 10px;
    padding-left: 15px;
    position: relative;
}

.role-description ul li::before {
    content: ""; 
    display: block;
    width: 6px;
    height: 6px;
    background-color: var(--color-accent);
    border-radius: 50%;
    position: absolute;
    top: 10px; 
    left: 0;
}

.role-description ul li b {
    color: var(--color-text);
    font-weight: 600;
}


/* PROJECTS / WORK SECTION */
.work-section h2 {
    padding-top: 80px;
    background-color: var(--color-bg); 
}

.work-section .section-title {
    font-size: clamp(3rem, 6vw, 4.5rem); 
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 70px;
}

.project-card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s;
}
.project-card:hover {
    box-shadow: 0 10px 30px var(--color-shadow);
}

.project-category {
    color: var(--color-accent);
}
.project-card.large {
    display: grid;
    grid-template-columns: 2fr 1fr; 
    align-items: center;
    min-height: 400px;
}
.project-card.large .project-details {
    padding: 50px;
}
.project-card.large h3 {
    font-size: 2.2rem;
    margin: 10px 0 20px 0;
}
.project-card.large .project-visual {
    background-color: var(--color-section-bg);
    min-height: 400px;
    border-left: 1px solid var(--color-border);
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: var(--color-subtle);
}
.tech-stack {
    display: block;
    margin: 20px 0;
    font-weight: 500;
    color: var(--color-subtle);
}

.tech-stack-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tech-stack-preview span {
    background: rgba(255, 255, 255, 0.05); /* Very subtle background */
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    white-space: nowrap;
}

.stack-track svg {
    width: 2%; height: auto;
}

.project-card.small {
    padding: 40px;
    border-left: 5px solid var(--color-accent);
}
.project-card.small h3 {
    font-size: 1.8rem;
}

/* EXPERTISE SECTION (Graffio Style) */
.expertise-section {
    background-color: var(--color-section-bg);
}
.expertise-section h2 {
    padding-top: 80px; 
}

.expertise-section .section-title {
    font-size: clamp(3rem, 6vw, 4.5rem); 
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 70px;
}

.capabilities-grid {
    display: flex;
    gap: 100px; 
    padding-top: 20px;
}

.capabilities-column {
    flex: 1; 
}

.capabilities-column h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border); 
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.capabilities-column ul {
    list-style: none;
    padding: 0;
}

.capabilities-column li {
    font-size: 1.1rem;
    color: var(--color-subtle);
    padding: 15px 0;
    border-bottom: 1px solid var(--color-border); 
    transition: color 0.3s;
}

.capabilities-column li:hover {
    color: var(--color-text); 
}

/* CONTACT SECTION */
.contact-section {
    text-align: center;
    padding: 150px 0;
}
.contact-section .pre-header {
    margin-bottom: 20px;
}
.contact-link {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--color-text);
    display: inline-block;
    border-bottom: 4px solid var(--color-accent);
    padding-bottom: 5px;
    /* Updated transition for contact link hover animation */
    transition: color 0.3s, border-bottom-color 0.3s, transform 0.2s;
}
.contact-link:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-text);
    transform: translateX(10px) scale(1.02);
}

/* --- FOOTER --- */
footer {
    padding: 50px 0; 
    color: var(--color-subtle);
    font-size: 1rem; 
    border-top: 1px solid var(--color-border);
    background-color: var(--color-bg);
}

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

.copyright {
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.social-links a {
    color: var(--color-subtle);
    margin-left: 30px;
    font-size: 0.9rem;
    position: relative;
    padding-bottom: 5px; 
    transition: color 0.3s;
}

/* The custom underline effect */
.social-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: var(--color-subtle);
    transition: background-color 0.3s;
}

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

.social-links a:hover::after {
    background-color: var(--color-text); 
}


/* --- 4. CUSTOM CURSOR EFFECT (JS CLASS FIX) --- */
body {
    cursor: none !important;
}

/* Ensure interactive elements are clickable while keeping the native cursor hidden */
a, button, #theme-toggle, .project-card {
    pointer-events: auto !important; 
    cursor: none !important; 
}

.custom-cursor {
    width: 20px;
    height: 20px;
    background-color: var(--color-accent);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none; /* Crucial: allows clicks to pass through to buttons */
    z-index: 99999;
    transition: transform 0.1s ease-out, width 0.3s, height 0.3s, opacity 0.3s;
    mix-blend-mode: difference; /* Makes it visible on all backgrounds */
}

/* Hide the real mouse cursor everywhere */
body, a, button, .logo {
    cursor: none !important;
}

/* Cursor effect when hovering over clickable items */
.custom-cursor.cursor-hover {
    transform: scale(3);
    background-color: white;
    opacity: 0.5;
}

.cursor-pointer {
    width: 10px;
    height: 10px;
    background-color: var(--color-accent);
    mix-blend-mode: exclusion; 
    transition: all 0.2s ease-out; 
}

/* NEW FIX: Style the custom cursor when the body has the 'is-hovering-link' class */
body.is-hovering-link .cursor-pointer {
    transform: translate(-50%, -50%) scale(4); 
    opacity: 0.8;
}

/* --- 5. FIXED THEME TOGGLE BUTTON --- */
#theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10100; /* High z-index */
    
    /* Appearance */
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: var(--color-card-bg); 
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 15px var(--color-shadow);
    
    /* Content */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: none; 
    transition: transform 0.2s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

#theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px var(--color-accent); 
}

.icon {
    display: block;
    transition: transform 0.3s;
}

/* --- 6. ANIMATIONS & SCROLL EFFECTS --- */

/* Initial state for elements that will fade/slide in on scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Active state for elements that have entered the viewport */
.animate-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

/* Special case for Header (Navbar) - load animation */
#navbar.animate-on-scroll {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out; 
}
#navbar.animate-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

/* Special case for Hero content (Fades in immediately on load) */
.hero-section .fade-in {
    opacity: 0;
    animation: fadeInSlideUp 1s ease-out forwards;
}

/* Individual delays for Hero content (staggered effect) */
.hero-section .pre-header { animation-delay: 0.2s; }
.hero-section h1 { animation-delay: 0.4s; }
.hero-section .scroll-hint { animation-delay: 0.6s; }

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --- 7. MEDIA QUERIES (Responsiveness) --- */
@media (max-width: 992px) {
    /* About and Experience Stack */
    .about-content-grid, .role-details-grid {
        grid-template-columns: 1fr; 
        gap: 40px;
    }
    .experience-role .role-key-info {
        border-right: none;
        padding-right: 0;
    }

    /* Work Stack */
    .project-card.large {
        grid-template-columns: 1fr;
    }
    .project-card.large .project-visual {
        min-height: 250px;
        border-left: none;
        border-top: 1px solid var(--color-border);
        border-radius: 0 0 8px 8px;
    }
}

@media (max-width: 768px) {
    section {
        padding: 80px 0;
    }
    h1 {
        font-size: 3rem;
    }
    .about-section .section-title, .experience-section .section-title {
        margin-bottom: 40px;
    }

    /* Expertise Stack */
    .capabilities-grid {
        flex-direction: column;
        gap: 40px;
    }
    
    /* Contact link size */
    .contact-link {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    footer .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .social-links a {
        margin-left: 0;
        margin-right: 25px; 
    }
    /* Fixed button mobile adjustment */
    #theme-toggle {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
}
/* -------------------------------------- */
/* --- 7. ANIMATED UNDERLINE LINK (Custom Slow Transition) --- */
/* -------------------------------------- */

/* BASE STYLES for the Text */
.animated-link {
    /* CORRECTED: Sets text color to the main text color */
    color: var(--color-text); 
    text-decoration: none;
    font-weight: 700;
    cursor: none; 
    
    /* Required for positioning and spacing */
    position: relative; 
    display: inline-block; 
    padding-bottom: 5px;
    
    /* Ensure the text color smoothly transitions for dark mode */
    transition: color 0.3s; 
}

/* THE UNDERLINE PSEUDO-ELEMENT (::before) */
.animated-link::before {
    content: '';
    
    /* Positioning and Size */
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px; /* Thickness of the underline */
    
    /* Initial Color (Accent color, made subtle) */
    background-color: var(--color-accent); 
    opacity: 0.25; /* Light state */
    
    /* Transition/Animation Setup: SLOW 3-SECOND COLOR CHANGE */
    transition: opacity 1.5s ease-in-out; 
}

/* HOVER STATE: The Darkening/Saturating Animation (3s slow fade) */
.animated-link:hover::before {
    /* On hover, transition to full brightness */
    opacity: 1; 
}

/* DARK MODE OVERRIDES */
/* In dark mode, the text color is already correct via the base .animated-link rule 
   and the global dark-theme text color variable. No specific override needed here. */



/* --- NEW STYLES FOR ABOUT CONTACT LINKS (Grid Layout) --- */

.about-contact-links {
    margin-top: 0;
    padding-top: 100px;

    grid-column: 1 / span 2;
    
    /* NEW: Implement a two-column grid */
    display: grid;
    grid-template-columns: 1fr 1.2fr 1.2fr; /* 1fr for category, 1.5fr for links */
    gap: 40px; /* Space between the category column and the link column */
}

/* Category Column Styling (The First Column) */
.about-contact-category {
    /* Style for the 'SRE & GitOps' text */
    display: flex; /* Centers text vertically */
    flex-direction: column;
    justify-content: center;
    
    color: var(--color-subtle);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Link Wrapper Column Styling (The Second Column) */
.about-links-column {
    /* New wrapper needed to hold the links in the second column */
    display: flex;
    flex-direction: column;
}

.about-contact-link-wrapper {
    /* Wrapper handles the spacing and positioning of the line */
    padding: 10px 0;
    
    /* Creates the visual line using a border */
    border-bottom: 1px solid var(--color-border);
    transition: border-color 0.3s;
}

.about-contact-link-wrapper:first-child {
    /* Optional: Add a top line to match some designs */
    border-top: 1px solid var(--color-border);
}

.about-contact-link-wrapper a {
    /* Style for the link text itself */
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text);
    transition: color 0.3s; 
}

.about-contact-link-wrapper a:hover {
    color: var(--color-accent);
}

.external-icon {
    /* Style for the '↗' arrow */
    margin-left: 5px;
    font-size: 0.8rem;
    vertical-align: top;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.about-contact-link-wrapper a:hover .external-icon {
    opacity: 1;
}

.dot-red {
    color: var(--color-accent);
}

/* Fix: Ensure the cursor only disappears when the custom cursor is actually active */
@media (pointer: fine) {
    body { cursor: none; }
    a, button { cursor: none; }
}

/* Improvement: Prevent "Layout Shift" during theme toggle */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
/* --- BENTO GRID CORE --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(80px, auto);
    gap: 20px;
    margin: 40px auto;
}

.bento-item {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 28px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, border-color 0.3s;

}

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

/* Row/Col Spanning */
.location-card { grid-column: span 1; grid-row: span 2; }
.featured-card { grid-column: span 2; grid-row: span 2; }
.pipeline-card { grid-column: span 2; grid-row: span 2; }
.spotify-card { grid-column: span 1; grid-row: span 1; }
.typing-card { grid-column: span 1; grid-row: span 2; }
.social-mini-grid { grid-column: span 1; grid-row: span 1; }
/*.social-grid-card { grid-column: span 2; } */
.discover-card-link { grid-column: span 2; grid-row: span 1; }
.github-card { grid-column: span 2; grid-row: span 2; }
.tech-stack-card { grid-column: span 2; grid-row: span 2; }

/* Components */
.card-badge {
    align-self: flex-start;
    background: rgba(var(--color-text), 0.05);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--color-border);
}

/* Map specific */
.location-card iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    filter: grayscale(1) contrast(1.2);
    border: none;
    z-index: 1;
}
body.dark-theme .location-card iframe { filter: grayscale(1) invert(0.9) contrast(1.2); }
.location-footer {
    position: absolute; bottom: 20px; left: 24px;
    z-index: 2; font-weight: 700; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Spotify */
.spotify-card { flex-direction: row; align-items: center; gap: 15px; }
.album-art { width: 80px; height: 64px; border-radius: 12px; }
.spotify-info h4 { font-size: 1rem; margin: 2px 0; }
.spotify-status { font-size: 0.7rem; opacity: 0.6; }

/* Tech Stack Slider */
.stack-slider { overflow: hidden; margin: 20px 0; white-space: nowrap; }
.stack-track { display: inline-block; animation: scrollStack 20s linear infinite; }
.stack-track span { font-size: 2rem; margin-right: 40px; opacity: 0.5; font-weight: 800; }

@keyframes scrollStack {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Github Graph */
.github-graph { 
    display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; 
    margin: 20px 0;
}
.graph-sq { width: 100%; aspect-ratio: 1; border-radius: 2px; }

/* Responsive */
@media (max-width: 992px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- LOCATION CARD STYLING --- */
.location-card {
    position: relative;
    padding: 0 !important; /* Remove padding to let map fill edges */
    overflow: hidden;
    border-radius: 28px;
}

.map-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Dark Mode Map Filter */
.location-card iframe {
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(1) invert(0.92) contrast(1.2) brightness(0.9); /* Creates the deep dark look */
}

/* The Green Indicator Dot */
.map-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(100, 255, 218, 0.2); /* Matches your Electric Teal accent */
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.4);
    z-index: 2;
}

.map-dot::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--color-accent); /* */
    border: 2px solid white;
    border-radius: 50%;
}

/* Floating Badge */
.location-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(8px);
    color: white;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

/* City Label */
.location-city {
    position: absolute;
    bottom: 25px;
    left: 25px;
    z-index: 3;
    font-family: var(--font-heading); /* */
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Featured Work */
/* Featured Card Layout */
.featured-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.featured-main-content h3 {
    font-size: 1.8rem;
    margin: 10px 0;
}

.featured-main-content p {
    font-size: 1rem;
    color: var(--color-subtle);
    max-width: 90%;
}

/* Inset Preview Box */
.featured-preview-box {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.2); /* Slightly darker than card bg */
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 20px;
}

.preview-inner {
    display: flex;
    align-items: center;
    gap: 15px;
}

.preview-icon {
    width: 40px;
    height: 40px;
    background: var(--color-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.preview-text strong {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text);
}

.preview-text span {
    font-size: 0.8rem;
    color: var(--color-subtle);
}

/* Dark theme tweak for the inset box */
body.dark-theme .featured-preview-box {
    background: rgba(255, 255, 255, 0.03);
}
/* --- SPOTIFY CARD --- */
.spotify-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px !important;
}

.spotify-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spotify-status {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    opacity: 0.6;
    color: var(--color-subtle);
}

.spotify-body {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.album-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.album-art {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

/* Music Visualizer Bars */
.play-indicator {
    position: absolute;
    bottom: 5px; 
    right: 5px;
    display: flex; 
    gap: 2px;
    align-items: flex-end;
    height: 12px;
}

.play-indicator .bar {
    width: 3px; height: 8px;
    background: #1DB954;
    animation: bounce 1s ease-in-out infinite;
}
.play-indicator .bar:nth-child(2) { animation-delay: 0.2s; }
.play-indicator .bar:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 100% { height: 4px; }
    50% { height: 12px; }
}

/* --- TYPING CARD --- */
.typing-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden; /* Important for the watermark */
}

.typing-display {
    position: relative;
    display: flex;
    align-items: center;
}

.typing-watermark {
    position: absolute;
    left: -10px;
    font-size: 9rem;
    font-weight: 900;
    font-family: var(--font-heading);
    color: var(--color-text);
    opacity: 0.04; /* Very faint */
    line-height: 1;
    z-index: 1;
    user-select: none;
}

.typing-main-val {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.typing-main-val .val {
    font-size: 5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--color-text);
}

.typing-main-val .unit {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-accent); /* Using your accent color */
}

.typing-footer {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--color-border);
    padding-top: 15px;
}

.stat-pill {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.7;
}

.track-details h4 {
    font-size: 1rem;
    margin: 0;
    color: var(--color-text);
    font-weight: 700;
}

.track-details p {
    font-size: 0.85rem;
    margin: 0;
    color: var(--color-subtle);
}

/* This container takes up exactly 1 'slot' in your bento grid */
.social-mini-stack {
    grid-column: span 1; 
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Splits that 1 slot into 3 tiny boxes */
    gap: 10px;
}

/* Individual social boxes inherit bento-item styles but stay small */
/* 1. The Wrapper (Invisible Layout Container) */
.social-discover-wrapper {
    grid-column: span 3; /* Adjust this span to fit your row (e.g., 3 columns) */
    display: grid;
    grid-template-columns: 1fr 2fr; /* Socials get 1 part, Discover gets 2 parts */
    gap: 20px; /* Matches your main .bento-grid gap */
}

/* 2. The Social Card */
.social-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    align-items: center;
    justify-items: center;
}

.mini-social-link {
    text-decoration: none;
    font-weight: bold;
    color: var(--color-text);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    transition: 0.3s;
    border: 1px solid var(--color-border);
}

/* 3. The Discover Card */
.discover-card-link {
    display: flex;
    justify-content: center;
    padding: 0 30px !important;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
}

.circle-arrow {
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-header-flex {
    display: flex;
    flex-direction: row;      /* Force side-by-side */
    justify-content: space-between; /* Left and Right split */
    align-items: center;       /* Vertical center */
    width: 100%;
}

.contribution-count {
    font-size: 0.85rem;
    color: var(--color-subtle);
    font-family: var(--font-body);
}

/* Container logic */
.featured-card {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

/* Internal 3x2 Grid for the 6 metrics */
.featured-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    flex-grow: 1;
    margin-top: 10px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 2px solid var(--color-accent); /* Small accent line for style */
    padding-left: 12px;
}

/* Highlighting the Number */
.metric-number {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--color-accent);
    line-height: 1.1;
}

/* Sub-title detail */
.metric-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-subtle);
    margin-top: 4px;
    line-height: 1.2;
}

/* Ensure it stacks on mobile */
@media (max-width: 768px) {
    .featured-metrics-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
    }
}

/* Time-widget */
.fixed-bottom-left {
    position: fixed;
    bottom: 25px;
    left: 25px; /* Moved to Left */
    z-index: 999;
    display: flex;
    flex-direction: column; /* Stacks KTM over Time */
    align-items: flex-start; /* Aligns text to the left */
}

.time-label {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.8;
}

#ktm-clock {
    font-family: 'Inter', monospace; /* Monospace keeps digits steady */
    font-variant-numeric: tabular-nums;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text);
}

@media (max-width: 1600px) {
    .fixed-bottom-left {
        position: static; /* Moves it back into the normal flow of the page */
        margin: 20px;
        padding: 0;
        background: none;
        border: none;
    }
}

.pipeline-card {
    grid-column: span 2;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--color-card-bg);
}

.pipeline-title {
    align-self: flex-start;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 10px 0 30px 0;
}

.pipeline-flow {
    display: flex;
    align-items: flex-end; /* Aligns icons and labels to baseline */
    justify-content: space-between;
    width: 100%;
    max-width: 500px;
    margin: 20px 0;
}

.pipeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.step-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text);
}

.step-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    position: relative;
    z-index: 2;
}

/* Icon Background Colors & Glows */
.step-commit .step-icon { box-shadow: 0 0 15px var(--color-accent) }
.step-build .step-icon  { box-shadow: 0 0 15px var(--color-accent) }
.step-scan .step-icon   { box-shadow: 0 0 15px var(--color-accent) }
.step-deploy .step-icon { box-shadow: 0 0 15px var(--color-accent) }

/* Animated Connecting Arrows */
.pipeline-arrow {
    height: 4px;
    flex-grow: 1;
    margin: 0 0 20px 0; /* Pulls arrows closer to icons */
    position: relative;
    border-radius: 2px;
}

.arrow-orange { background: linear-gradient(90deg, var(--color-accent), #ff9800); }

/* Animation Effect */
.pipeline-arrow::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    background-size: 200% 100%;
    animation: flow 2s linear infinite;
}

@keyframes flow {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.pipeline-footer {
    font-size: 0.9rem;
    color: var(--color-subtle);
    margin-top: 20px;
    font-weight: 500;
}

.arrow-split {
    margin-left: 300px;
}

/* --- Hamburger Icon --- */
.menu-toggle {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--color-text);
    border-radius: 2px;
    transition: 0.3s;
}

/* --- Mobile Menu Logic --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex; /* Show on mobile */
    }

    #nav-menu {
        position: fixed;
        top: 0;
        right: -100%; /* Hidden off-screen to the right */
        width: 100%;
        height: 100vh;
        background-color: var(--color-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease-in-out;
        z-index: 1000;
        gap: 30px;
    }

    /* This class is added by JavaScript on click */
    #nav-menu.active {
        right: 0; /* Slide into view */
    }

    /* Transform hamburger into 'X' when active */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8.5px) rotate(45deg);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8.5px) rotate(-45deg);
    }
}

/* --- BENTO MOBILE FIX --- */
@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr; /* Single column layout */
        grid-auto-rows: auto;
    }

    /* Force all bento items to take full width */
    .bento-item {
        grid-column: span 1 !important;
        grid-row: auto !important;
        min-height: auto;
    }

    .location-card {
        min-height: 300px; /* Keep height for the map */
    }

    /* Pipeline Flow Adjustment */
    .pipeline-flow {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .pipeline-arrow {
        width: 4px;
        height: 30px;
        margin: 0;
        transform: rotate(0deg); /* Pointing down */
    }

    .social-discover-wrapper {
        grid-template-columns: 1fr;
    }

    .featured-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Tiny screens (iPhone SE, etc) */
@media (max-width: 480px) {
    .featured-metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .typing-main-val .val {
        font-size: 3.5rem; /* Shrink large numbers */
    }
}
