/* --- Base & Color Theme --- */
:root {
    --color-bg: #09090b;
    --color-bg-alt: #141417;
    --color-text: #fafafa;
    --color-gray: #a1a1aa;
    --color-border: #27272a;
    --color-primary: #22c55e; /* Green */
    --color-secondary: #3b82f6; /* Blue */
    --color-accent: #ef4444; /* Red */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
    line-height: 1.6;
}

body.overflow-hidden {
    overflow: hidden;
}

#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.65; /* Slightly muted for better layout contrast */
}

/* --- Clean, Scalable Section Layouts --- */
.scroll-section {
    position: relative;
    padding: 5rem 1rem; 
    width: 100%;
    /* The horizontal border has been removed completely */
}

/* --- Full-Page Snap Scrolling for Desktop --- */
@media (min-width: 1024px) {
    body {
        overflow: hidden; /* Prevents double scrollbars */
    }
    .scroll-container {
        height: 100vh;
        overflow-y: auto;
        scroll-snap-type: y mandatory; /* Re-enables the snap effect */
        scroll-behavior: smooth;
    }
    .scroll-section {
        height: 100vh;
        padding: 2rem 4rem; /* Adds side padding, limits vertical padding */
        scroll-snap-align: start; /* Locks the section to the top of the view */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    #home {
        padding-top: 0; /* Centers the hero perfectly on snap */
    }
}

.section-alt {
    background-color: var(--color-bg-alt);
}

#home {
    padding-top: 8rem;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

/* --- Premium Glassmorphism Card Style --- */
.main-card {
    background-color: rgba(20, 20, 23, 0.45);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1.75rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}
@media (min-width: 768px) {
    .main-card { padding: 2.5rem; }
}

/* --- Smooth Navigation Underlines --- */
.nav-link {
    position: relative;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover, .nav-link.active {
    color: var(--color-primary);
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link.active::after, .nav-link:hover::after {
    width: 100%;
}

/* --- Mobile Menu Drawer --- */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
}
.mobile-menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0; 
    width: 300px;
    height: 100%;
    background-color: #0e0e11;
    border-left: 1px solid var(--color-border);
    z-index: 100;
    transform: translateX(100%); 
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 5rem;
}
.mobile-menu.is-open {
    transform: translateX(0);
}
.mobile-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-radius: 0.5rem;
    color: var(--color-gray);
    font-weight: 500;
    transition: all 0.2s ease;
}
.mobile-link:hover, .mobile-link.active {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--color-primary);
}

/* --- Clean Interactive Hovers --- */
.action-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.action-button:hover {
    transform: translateY(-2px);
}
.action-button-green { background-color: var(--color-primary); }
.action-button-green:hover { box-shadow: 0 0 25px rgba(34, 197, 94, 0.4); }
.action-button-blue { background-color: var(--color-secondary); }
.action-button-blue:hover { box-shadow: 0 0 25px rgba(59, 130, 246, 0.4); }

.social-icon { transition: all 0.2s ease; }
.social-icon:hover {
    transform: translateY(-3px);
    color: var(--color-primary);
}

.category-card {
    background-color: rgba(14, 14, 17, 0.6);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-primary);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.15);
}

#featured-carousel {
    position: relative;
    width: 100%;
    min-height: 480px; /* Give it static space to avoid jumpy UI layout shifts */
}
.featured-card {
    display: block;
    background-color: rgba(14, 14, 17, 0.8);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: scale(0.98);
    pointer-events: none;
}
.featured-card.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}
.featured-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-secondary);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

/* --- Hero Element Fixes --- */
.profile-picture {
    animation: glow-pulse 6s infinite ease-in-out;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.profile-picture:hover { transform: scale(1.03); }

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.2); }
    50% { box-shadow: 0 0 40px rgba(34, 197, 94, 0.4); }
}

.skill-icon-container {
    transition: transform 0.2s ease;
}
.skill-icon-container:hover { transform: translateY(-4px); }

/* --- Corrected Scroll Down Indicator Positioning --- */
.scroll-down-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    pointer-events: none;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* --- Definitive High-Accuracy Inline Role Cycler --- */
.text-slide-fade {
    display: inline-block;
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 1;
    transform: translateY(0);
    line-height: inherit; /* Inherits the identical line height of the parent H2 */
}

/* State when shifting out */
.text-slide-fade.is-changing {
    opacity: 0;
    transform: translateY(-12px);
}
