:root {
    --color-bg: hsl(210 40% 98%);
    --color-foreground: hsl(222 47% 11%);
    --color-card: hsl(0 0% 100%);
    --color-card-foreground: hsl(222 47% 11%);
    --color-popover: hsl(0 0% 100%);
    --color-popover-foreground: hsl(222 47% 11%);
    --color-primary: hsl(221 83% 53%);
    --color-primary-foreground: hsl(210 40% 98%);
    --color-secondary: hsl(210 40% 96%);
    --color-secondary-foreground: hsl(222 47% 11%);
    --color-accent: hsl(262 83% 58%);
    --color-accent-foreground: hsl(210 40% 98%);
    --color-destructive: hsl(0 84% 60%);
    --color-destructive-foreground: hsl(210 40% 98%);
    --color-muted: hsl(210 40% 94%);
    --color-muted-foreground: hsl(215 16% 47%);
    --color-border: hsl(214 32% 91%);
    --color-input: hsl(214 32% 91%);
    --color-ring: hsl(221 83% 53%);
    --color-glass: rgba(255, 255, 255, 0.3);
    --color-glass-blur: blur(24px);
    --font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;

    /* Consistent responsive spacing scale */
    --spacing-xs: clamp(0.15rem, 0.4vw, 0.3rem);
    --spacing-sm: clamp(0.4rem, 0.75vw, 0.6rem);
    --spacing-md: clamp(0.75rem, 1.5vw, 1.2rem);
    --spacing-lg: clamp(1.3rem, 2.5vw, 1.8rem);
    --spacing-xl: clamp(1.8rem, 3.5vw, 2.4rem);
    --spacing-2xl: clamp(2.8rem, 5vw, 3.6rem);
    --spacing-3xl: clamp(3.6rem, 7vw, 4.8rem);
    --spacing-4xl: clamp(4.6rem, 7vw, 5.8rem)
        /* Consistent responsive spacing scale */
        --spacing-xs: clamp(0.15rem, 0.4vw, 0.3rem);
    --spacing-sm: clamp(0.4rem, 0.75vw, 0.6rem);
    --spacing-md: clamp(0.75rem, 1.5vw, 1.2rem);
    --spacing-lg: clamp(1.3rem, 2.5vw, 1.8rem);
    --spacing-xl: clamp(1.8rem, 3.5vw, 2.4rem);
    --spacing-2xl: clamp(2.8rem, 5vw, 3.6rem);
    --spacing-3xl: clamp(3.6rem, 7vw, 4.8rem);
    --spacing-4xl: clamp(4.6rem, 7vw, 5.8rem);

    /* Consistent responsive gaps */
    --gap-xs: clamp(0.15rem, 0.3vw, 0.3rem);
    --gap-sm: clamp(0.4rem, 0.6vw, 0.6rem);
    --gap-md: clamp(0.7rem, 1.2vw, 1rem);
    --gap-lg: clamp(1rem, 2vw, 1.5rem);
    --gap-xl: clamp(1.4rem, 2.8vw, 2rem);

    /* Updated font sizes with better proportional scaling like hero section */
    --font-size-xs: clamp(0.75rem, 1.5vw, 0.875rem);
    --font-size-sm: clamp(0.875rem, 2vw, 1rem);
    --font-size-md: clamp(1rem, 2.25vw, 1.125rem);
    --font-size-base: clamp(1rem, 2.5vw, 1.25rem);
    /* default body font size */
    --font-size-lg: clamp(1.125rem, 3vw, 1.5rem);
    --font-size-xl: clamp(1.25rem, 3.5vw, 1.875rem);
    --font-size-2xl: clamp(1.5rem, 4vw, 2.25rem);
    --font-size-3xl: clamp(1.875rem, 4.5vw, 3rem);
    --font-size-4xl: clamp(2.25rem, 5vw, 3.75rem);

    /* NEW: Consistent line height */
    --line-height-base: 1.6;
    --line-height-heading: 1.25;

    /* NEW: Transition timing */
    --transition-default: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    /* Enhanced dark theme colors for professional look */
    --color-bg: hsl(222 47% 8%);
    --color-foreground: hsl(210 40% 98%);
    --color-card: hsl(222 47% 10%);
    --color-card-foreground: hsl(210 40% 98%);
    --color-popover: hsl(222 47% 8%);
    --color-popover-foreground: hsl(210 40% 98%);
    --color-primary: hsl(217 91% 60%);
    --color-primary-foreground: hsl(222 47% 8%);
    --color-secondary: hsl(217 33% 18%);
    --color-secondary-foreground: hsl(210 40% 98%);
    --color-accent: hsl(262 83% 64%);
    --color-accent-foreground: hsl(210 40% 98%);
    --color-destructive: hsl(0 63% 31%);
    --color-destructive-foreground: hsl(210 40% 98%);
    --color-muted: hsl(217 33% 18%);
    --color-muted-foreground: hsl(215 20% 70%);
    --color-border: hsl(217 33% 18%);
    --color-input: hsl(217 33% 18%);
    --color-ring: hsl(213 27% 84%);
    --color-glass: rgba(0, 0, 0, 0.3);
}


/* === Custom Scrollbar Styling === */

/* For WebKit browsers (Chrome, Edge, Safari) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 10px;
    border: 2px solid var(--color-bg);
    /* makes it look inset */
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) var(--color-bg);
}


body {
    /* Added subtle background pattern for professional look */
    background: var(--color-bg);
    background-image: radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
    color: var(--color-foreground);
    font-family: var(--font-family);
    margin: 0;
    line-height: 1.6;
    font-size: clamp(1rem, 1vw + 0.5rem, 1.13rem);
    overflow-x: hidden;
    scroll-behavior: smooth;
    transition: var(--transition-default);
}

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

/* ================= NAVIGATION =================== */
.nav-header {
    position: fixed;
    width: 100vw;
    top: 0;
    z-index: 42;
    background: transparent;
    transition: background 0.33s, backdrop-filter 0.33s;
}

.nav-header.scrolled {
    background: var(--color-glass);
    backdrop-filter: var(--color-glass-blur);
    box-shadow: 0 4px 24px var(--color-border);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 64px;
}

.logo {
    color: var(--color-primary);
    font-size: 2rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.2rem;
    align-items: center;
    margin: 0;
    padding: 0;
    padding-left: 1rem;
}

.nav-link {
    text-decoration: none;
    color: var(--color-foreground);
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    transition: color 0.19s;
}

.nav-link.active,
.nav-link:hover {
    color: var(--color-primary);
}


/* General styling for toggle buttons (sidebar + navbar) */
.dark-mode-toggle {
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--color-foreground);
    transition: color 0.2s;
    list-style: none;
    /* remove bullets */
    background: none;
    border: none;
    padding: 0.3rem 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mode-btn {
    flex: 1;
    /* each button takes equal width */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    color: var(--color-foreground);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.theme-buttons {
    display: flex;
    width: 100%;
    /* fill the appearance-toggle container */
    justify-content: space-between;
    /* spread buttons evenly */
    gap: 1rem;
    /* optional spacing */
}

.dropdown-theme {
    display: none;
    position: absolute;
    top: 100%;
    /* below toggle */
    right: 5vw;
    left: auto;
    /* align right */
    background: var(--color-card);
    padding: 0.5rem;
    list-style: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 130px;
    /* optional, adjust to content */
    z-index: 10000;
}

.dropdown-theme li {
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.dropdown-theme li:hover {
    background: var(--color-muted);
    color: var(--color-primary);
}

.dropdown-theme li i {
    width: 16px;
    text-align: center;
}

/* Hover effect */
.mode-btn:hover,
.dark-mode-toggle:hover {
    color: var(--color-primary);
}

.dark-mode-toggle i {
    color: var(--color-foreground);
    transition: color 0.2s;
}

.dark-mode-toggle.active i,
.dark-mode-toggle:hover i {
    color: var(--color-primary);
}

.dropdown-theme li {
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    color: var(--color-foreground);
    transition: color 0.2s;
}

.dropdown-theme li:hover,
.dropdown-theme li.active {
    color: var(--color-primary);
}


/* Active button highlight (sidebar) */
.mode-btn:hover,
.mode-btn.active {
    color: var(--color-primary);
}

/* Keeping responsive sidebar functionality while maintaining old CSS reference styles */
.nav-toggle {
    display: none;
}

.hamburger-menu {
    display: none;
    cursor: pointer;
    color: var(--color-foreground);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.hamburger-menu:hover {
    color: var(--color-primary);
    background: var(--color-muted);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hamburger-menu:active {
    transform: scale(0.95);
}

.hamburger-menu svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.nav-sidebar {
    position: fixed;
    top: 0;
    right: -50vw;
    width: 50vw;
    inset: 0 auto 0 auto;
    background: var(--color-card);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--color-border);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 2rem 0;
    /* Prevent clicks inside sidebar from bubbling to overlay */
    pointer-events: auto;
    overflow-y: auto;
}

.appearance-toggle {
    margin-top: auto;
    border-top: 1px solid var(--color-border);
    padding: 2rem 2rem 0 2rem;
}

.sidebar-header {
    display: flex;
    justify-content: flex-end;
    padding: 0 2rem 2rem 2rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
}

.close-menu {
    cursor: pointer;
    color: var(--color-foreground);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
}

.close-menu:hover {
    color: var(--color-primary);
    background: var(--color-muted);
    transform: rotate(90deg);
    /* removed scale to keep size consistent */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.close-menu:active {
    transform: rotate(90deg) scale(0.9);
}

.close-menu svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.sidebar-nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 2rem;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-nav-link {
    text-decoration: none;
    color: var(--color-foreground);
    font-weight: 600;
    font-size: 1.2rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.sidebar-nav-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.sidebar-nav-link:hover::before {
    left: 100%;
}

.sidebar-nav-link:hover,
.sidebar-nav-link.active {
    color: var(--color-primary);
    background: var(--color-muted);
    transform: translateX(12px) scale(1.02);
    border-color: var(--color-primary);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1), 0 0 20px rgba(120, 119, 198, 0.2);
}

.sidebar-nav-link:active {
    transform: translateX(8px) scale(0.98);
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 50vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    cursor: pointer;
}

.nav-toggle:checked~.nav-sidebar {
    right: 0;
}

.nav-toggle:checked~.nav-sidebar .sidebar-nav-link {
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    transform: translateX(30px);
}

.nav-toggle:checked~.nav-sidebar .sidebar-nav-link:nth-child(1) {
    animation-delay: 0.1s;
}

.nav-toggle:checked~.nav-sidebar .sidebar-nav-link:nth-child(2) {
    animation-delay: 0.2s;
}

.nav-toggle:checked~.nav-sidebar .sidebar-nav-link:nth-child(3) {
    animation-delay: 0.3s;
}

.nav-toggle:checked~.nav-sidebar .sidebar-nav-link:nth-child(4) {
    animation-delay: 0.4s;
}

.nav-toggle:checked~.nav-sidebar .sidebar-nav-link:nth-child(5) {
    animation-delay: 0.5s;
}

.nav-toggle:checked~.nav-sidebar {
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.3s;
    opacity: 0;
    transform: translateX(30px);
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-toggle:checked~.nav-overlay {
    opacity: 1;
    visibility: visible;
    width: 50vw;
}

@media (min-width: 713px) {
    .nav-toggle:checked {
        /* Force uncheck the toggle when screen size increases */
        display: none;
    }

    .nav-sidebar {
        right: -50vw !important;
    }

    .nav-overlay {
        opacity: 0 !important;
        visibility: hidden !important;
    }
}

@media (max-width: 712px) {
    body:has(.nav-toggle:checked) {
        /* Prevent body scroll when sidebar is open */
        overflow: hidden;
        height: 100vh;
    }
}

/* Responsive navigation styles */
@media (max-width: 712px) {
    .nav-links {
        display: none;
    }

    .hamburger-menu {
        display: block;
    }

    .nav-sidebar {
        width: 50vw;
        right: -50vw;
    }
}

@media (max-width: 480px) {
    .nav-sidebar {
        width: 75vw;
        right: -75vw;
    }
}

/* ================= HERO SECTION =================== */

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    padding: 120px 2.5rem 100px 2.5rem;
    min-height: 70vh;
    position: relative;

}

/* .space{
    padding-top: 1re;
} */

.hero-content {
    /* Improved content layout for left-side positioning */
    display: flex;
    flex-direction: column;
    flex: 1;
    max-width: 600px;
    align-items: flex-start;
    gap: 1.5rem;
    height: auto;

}

/* Added new hero visual container for right-side laptop image */
.hero-visual {
    flex-shrink: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.laptop-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;

}

.laptop-image {
    /* Professional circular laptop image with ambient lighting effects */
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--color-primary);
    background: var(--color-card);
    box-shadow: 0 0 60px rgba(120, 119, 198, 0.4), 0 0 120px rgba(255, 119, 198, 0.2), 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.laptop-image::before {
    /* Added ambient glow effect around the laptop image */
    content: "";
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: conic-gradient(from 0deg, var(--color-primary), var(--color-accent), var(--color-primary));
    border-radius: 50%;
    z-index: -1;
    opacity: 0.3;
    filter: blur(20px);
}

/* HERO HEADINGS */
.hero-title {
    /* Professional gradient title styling matching reference */
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    padding: 0rem 0rem;
}

.typing-text {
    /* Enhanced subtitle with better typography */
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    margin: 0;
    color: var(--color-foreground);
    font-family: "Segoe UI", sans-serif;
    letter-spacing: -0.01em;
}

.hero-intro {
    /* Improved description styling */
    font-size: var(--font-size-sm);
    color: var(--color-muted-foreground);
    margin: 0;
    font-weight: 400;
    line-height: 1.6;
    max-width: 500px;
}

/* Added availability status styling */
.availability-status {
    font-size: 1rem;
    color: var(--color-muted-foreground);
    margin: 0;
    font-weight: 400;
}

/* HERO BUTTONS */
.hero-buttons {
    /* Better button layout with icons */
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn {
    /* Enhanced button styling with icon support */
    font-family: inherit;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    border: none;
    outline: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    justify-content: center;
}

.btn::before {
    /* Added button hover effect */
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    /* Professional primary button */
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: var(--color-primary-foreground);
    box-shadow: 0 8px 32px rgba(120, 119, 198, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(120, 119, 198, 0.4);
}

.btn-secondary {
    /* Enhanced secondary button */
    background: transparent;
    color: var(--color-foreground);
    border: 2px solid var(--color-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--color-muted);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

/* Enhanced status indicator positioning and styling */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--color-muted-foreground);
    background: rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Updated responsive design for new layout */
@media (max-width: 1000px) {
    .hero {
        /* Stack layout on smaller screens with image on top */
        flex-direction: column;
        align-items: center;
        gap: 1.1rem;
        text-align: center;
        padding-top: 100px;
    }

    .hero-content {
        align-items: center;
        text-align: center;
        order: 2;
    }

    .hero-visual {
        order: 1;
    }

    .laptop-image {
        width: 250px;
        height: 250px;
    }

    .skill-cards {
        grid-template-columns: 1fr;
    }


}

@media (max-width: 768px) {
    .hero {
        gap: 1.1rem;
    }

    .laptop-image {
        width: 200px;
        height: 200px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }


}

@media (max-width: 570px) {
    .hero {
        gap: 1.1rem;
    }

    .laptop-image {
        width: 150px;
        height: 150px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .status-indicator {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* ================== SKILLS & PROJECTS (retain your HTML structure!) ==================== */
.section-title {
    color: var(--color-primary);
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: 0.25em;
}

.section-subtitle {
    color: var(--color-muted-foreground);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 2rem;
    text-align: center;
    max-width: 520px;
    margin-right: auto;
}

/* Skills */
.skill-cards {
    width: 100%;
    height: var(--height);
    /* border: 1px solid red; */
    overflow: hidden;
    mask: linear-gradient(to right,
            transparent,
            var(--color-foreground),
            transparent);
}

.skill-cards .list {
    display: flex;
    width: 100%;
    min-width: calc(var(--width) * var(--quantity));
    position: relative;
    gap: 3rem;
}

/* .skill-card {
    width: 100%;
    background: var(--color-glass);
    backdrop-filter: var(--color-glass-blur);
    border-radius: 16px;
    padding: 1.2rem 1.2rem;
    text-align: center;
    box-shadow: 0 8px 12px var(--color-border);
    transition: transform 0.26s cubic-bezier(0.3, 1.4, 0.6, 1.7);
    color: var(--color-foreground);
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    user-select: none;
    border: 1.2px solid var(--color-border);
    justify-content: flex-start;
    gap: 1rem;
} */

.skill-cards {
    backdrop-filter: var(--color-glass-blur);
}


.skill-card {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    gap: 1rem;
    transition: transform 0.26s cubic-bezier(0.3, 1.4, 0.6, 1.7);
    cursor: pointer;
    text-align: center;
    color: var(--color-foreground);
}

.skill-card .skill-icon {
    width: 48px;
    height: 48px;
    color: var(--color-primary);
    /* controls the SVG fill */
}

.list {
    gap: 1.5rem;
    border: 1.5px solid var(--color-border);
    height: inherit;
    box-sizing: border-box;
}

.skill-cards .list .item {
    width: var(--width);
    height: var(--height);
    position: absolute;
    left: 110%;
    animation: autorun 8s linear infinite;
    animation-delay: calc((8s / var(--quantity)) * (var(--position)));

}

.skill-cards .list .item i {
    /* width: 1rem; */
    font-size: 2.1rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
    transition: color 0.25s;
}



@keyframes autorun {
    from {
        left: 100%;
    }

    to {
        left: calc(var(--width) * -1);
    }
}

.skill-card span {
    font-weight: 600;
    font-size: 1.13rem;
}

.skill-cards:hover .item {
    animation-play-state: paused;
}

.skill-card:hover {
    transform: scale(1.10);
    color: var(--color-primary);
}

.skill-card:hover i {
    color: var(--color-accent);
}


/* --- PROJECT CARDS --- */
.project-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 4rem auto;
    justify-items: center;
    padding: var(--spacing-md);
    /* consistent padding around the grid */
}

.project-card {
    background: var(--color-glass);
    backdrop-filter: var(--color-glass-blur);
    border-radius: 16px;
    box-shadow: 0 8px 22px var(--color-border);
    border: 1.5px solid var(--color-border);
    display: flex;
    flex-direction: column;
    transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    max-width: 320px;
    min-height: 380px;
    padding: var(--spacing-md);
    box-sizing: border-box;
    gap: var(--gap-md);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
}

.project-image {
    position: relative;
    height: 160px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    margin: 0;
    flex-shrink: 0;
    transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smart fallback text */
.project-image .fallback-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-muted-foreground, #777);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    pointer-events: none;
    white-space: nowrap;
    opacity: 0.85;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    /* ensures readability */
    transition: opacity 0.25s ease, transform 0.25s ease;
}


.project-card:hover .project-image {
    transform: scale(1.07);
}

.project-title {
    font-weight: 700;
    margin: 0;
    font-size: 1.3rem;
    color: var(--color-accent);
    cursor: text;
}

.project-description {
    font-weight: 400;
    color: var(--color-foreground);
    flex-grow: 1;
    margin: 0;
    line-height: var(--line-height-base);
    cursor: text;
}

.project-description .more-text {
    display: none;
}

.project-description.expanded .more-text {
    display: inline;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--color-accent, #0077ff);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0;
    margin-left: 0.3rem;
    text-decoration: underline;
}

.project-tools {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-start;
}

/* Subtle tag styling for tools */
.project-tools span {
    background: var(--color-secondary);
    color: var(--color-secondary-foreground);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: text;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .project-cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
        padding: var(--spacing-sm);
    }

    .project-card {
        max-width: 280px;
        min-height: 360px;
        padding: var(--spacing-sm);
        gap: var(--gap-sm);
    }
}

@media (max-width: 480px) {
    .project-cards {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding: var(--spacing-xs);
    }

    .project-card {
        min-height: auto;
        padding: var(--spacing-xs);
        gap: var(--gap-xs);
    }
}

/* --- Container & Row --- */
.search-section {
    max-width: 720px;
    margin: 0 auto var(--spacing-xl) auto;
    padding: var(--spacing-lg) var(--spacing-md);
}

.search-filter-row {
    display: flex;
    gap: var(--gap-md);
    align-items: center;
}

/* --- Search Input --- */
#project-search {
    flex: 1;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    font-size: 1rem;
    font-family: var(--font-family);
    background: var(--color-card);
    color: var(--color-foreground);
    transition: all var(--transition-default);
}

#project-search:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-ring);
}

/* --- Custom Dropdown --- */
.custom-dropdown {
    position: relative;
    width: 220px;
    font-family: var(--font-family);
    cursor: pointer;
}

.custom-dropdown .selected {
    padding: 0.55rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: var(--color-card);
    color: var(--color-foreground);
    transition: all var(--transition-default);
}



.custom-dropdown .selected::after {
    content: "▼";
    float: right;
    font-size: 0.6rem;
    margin-top: 0.25rem;
    transition: transform 0.25s;
}

.custom-dropdown.active .selected::after {
    transform: rotate(-180deg);
}

/* Dropdown options */
.custom-dropdown .options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    margin-top: 0.25rem;
    list-style: none;
    padding: 0.25rem 0;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.custom-dropdown.active .options {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.custom-dropdown .options li {
    padding: 0.5rem 1rem;
    margin: 0;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.custom-dropdown .options li:hover {
    background: var(--color-primary);
    color: var(--color-primary-foreground);
}

.custom-dropdown .options li.active {
    font-weight: 600;
    background: var(--color-primary);
    color: var(--color-primary-foreground);
}

/* --- Responsive --- */
@media (max-width: 536px) {
    .search-filter-row {
        flex-direction: column;
        align-items: center;
        /* center instead of stretch */
        gap: var(--gap-sm);
    }

    #project-search,
    .custom-dropdown {
        width: 90%;
        /* more natural width */
        max-width: 400px;
        /* cap to avoid overly long inputs */
    }
}

/* SUBFOOTER & FOOTER */
.subfooter {
    background: var(--color-primary);
    color: var(--color-bg);
    padding: 3rem 1rem;
    text-align: center;
    box-shadow: 0 10px 20px rgba(53, 89, 188, 0.13);
}

.subfooter h2 {
    margin-top: 0;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    font-weight: 800;
}

.subfooter p {
    max-width: 440px;
    margin: 1rem auto 1.5rem auto;
    font-weight: 400;
    text-align: center;
}

.footer {
    background: var(--color-glass);
    backdrop-filter: var(--color-glass-blur);
    border-top: 1.5px solid var(--color-border);
    padding: clamp(1rem, 3vw, 1.5rem) 0;
    color: var(--color-muted-foreground);
    font-weight: 400;
    font-size: clamp(0.8rem, 1vw, 0.95rem);
    user-select: none;
    text-align: center;
    transition: background 0.3s ease;
    z-index: 10;
    position: relative;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Optional social links */
.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.footer-social a {
    color: var(--color-muted-foreground);
    font-size: 1.25rem;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.footer-social a:hover,
.footer-social a:focus {
    color: var(--color-primary);
}

/* Responsive adjustments */
@media (min-width: 480px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Responsive navbar/gaps: */
@media (max-width: 768px) {
    .nav-links {
        gap: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }


}

@media (max-width: 480px) {
    .skill-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-cards {
        grid-template-columns: 1fr;
    }

    @media screen and (max-width: 400px) {
        .skill-cards {
            grid-template-columns: 1fr;
        }

    }

}

@media (height > 320px) {
    .hero-title {
        height: 5.5rem;
    }

}

/* ================= CONTACT FORM =================== */

.contact-container {
    max-width: 800px;
    /* grows on large screens */
    width: 90%;
    /* relative width */
    margin: 0 auto 4rem auto;
    padding: 1.5rem;
    box-sizing: border-box;
}

.form-message {
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 1rem;
    display: none;
    text-align: center;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#contact-form label {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 2px solid var(--color-primary);
    font-size: 1rem;
    box-sizing: border-box;
    transition: border 0.2s ease, box-shadow 0.2s ease;
    max-width: 100%;
    resize: vertical;
    background: var(--color-card);
    color: var(--color-foreground);
    
}

#contact-form textarea {
    min-height: 120px;
    font-family: var(--font-family); 
    line-height: 1.5;
    /* better readability */
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--color-accent, #0077ff);
    box-shadow: 0 0 5px rgba(0, 119, 255, 0.2);
}

#contact-form button {
    padding: 0.8rem;
    border-radius: 10px;
    width: 100%;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.15s ease;
}

#contact-form button:hover {
    transform: scale(1.02);
}

.contact-info {
    margin-top: 2rem;
    font-size: 0.95rem;
    color: var(--color-text);
    text-align: center;
}

.contact-info a {
    color: var(--color-primary);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* --- Responsive tweaks --- */
@media (max-width: 480px) {
    .contact-container {
        padding: 1rem;
        width: 95%;
    }

    #contact-form button {
        font-size: 1rem;
        padding: 0.7rem;
    }
}


#scrollTopBtn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: none;
    background: var(--color-primary);
    color: var(--color-popover);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: opacity var(--transition-default), transform var(--transition-default);
    opacity: 0;
    pointer-events: none;
    /* prevent clicks when hidden */
    z-index: 1000;
}

#scrollTopBtn.show {
    opacity: 1;
    pointer-events: auto;
}

#scrollTopBtn:hover {
    transform: scale(1.1);
    background: var(--color-accent);
    color: var(--color-accent-foreground);
}

/* ================= ABOUT SECTION - who am i =================== */
@layer about {
    .about-section {
        max-width: 900px;
        margin: 2rem auto 4rem auto;

        .section-title {
            text-align: left;
            margin-bottom: 1rem;
        }

        .about-content {
            display: flex;
            flex-wrap: wrap;
            gap: 1.5rem;
            align-items: center;

            .about-img {
                width: 180px;
                height: 180px;
                object-fit: cover;
                border-radius: 20px;
                box-shadow: 0 0 12px var(--color-primary);
                flex-shrink: 0;

                @media (max-width: 515px) {
                    width: auto;
                    height: auto;
                    max-width: 100%;
                }
            }

            .about-text {
                flex: 1;
                font-weight: 400;
                font-size: clamp(1rem, 1vw + 0.25rem, 1.125rem);
                color: var(--color-text);

                @media (max-width: 515px) {
                    flex: unset;
                    text-align: left;
                }
            }

            @media (max-width: 515px) {
                flex-direction: column;
                align-items: flex-start;
            }
        }
    }
}

/* ================= ABOUT SECTION ================= */
@layer about {
    .about-section {
        max-width: 900px;
        margin: 2rem auto 4rem auto;

        .section-title {
            text-align: left;
            margin-bottom: var(--spacing-sm);
            font-size: var(--font-size-2xl);
            font-weight: 700;
        }

        .about-content {
            display: flex;
            flex-wrap: wrap;
            gap: var(--gap-lg);
            align-items: center;

            .about-img {
                width: 180px;
                height: 180px;
                object-fit: cover;
                border-radius: 20px;
                box-shadow: 0 0 12px var(--color-primary);
                flex-shrink: 0;

                @media (max-width: 515px) {
                    width: auto;
                    height: auto;
                    max-width: 100%;
                }
            }

            .about-text {
                flex: 1;
                font-weight: 400;
                font-size: var(--font-size-md);
                line-height: var(--line-height-base);
                color: var(--color-text);

                @media (max-width: 515px) {
                    flex: unset;
                    text-align: left;
                }
            }

            @media (max-width: 515px) {
                flex-direction: column;
                align-items: flex-start;
            }
        }
    }
}
/* ================= EDUCATION SECTION ================= */
@layer education {
    .education-section {
        max-width: 900px;
        margin: 2rem auto 3rem auto;

        .section-title {
            text-align: left;
            margin-bottom: var(--spacing-sm);
            font-size: var(--font-size-2xl);
            font-weight: 700;
        }

        .education-item {
            display: flex;
            align-items: center;
            gap: var(--gap-md);
            margin-bottom: var(--spacing-md);

            .education-icon {
                flex-shrink: 0;
                width: 40px;
                height: 40px;
                border-radius: 50%;
                background: var(--color-primary);
                display: flex;
                align-items: center;
                justify-content: center;
                color: var(--color-background);
                font-size: 1.2rem;
            }

            .education-text {
                flex: 1;
                font-weight: 400;
                font-size: var(--font-size-md);
                line-height: var(--line-height-base);
                color: var(--color-text);
            }

            @media (max-width: 515px) {
                flex-direction: column;
                align-items: flex-start;

                .education-text {
                    margin-left: 0;
                }
            }
        }
    }
}

/* ================= PROFESSIONAL EXPERIENCE SECTION ================= */
@layer experience {
    .experience-section {
        max-width: 900px;
        margin: 2rem auto 6rem auto;

        .section-title {
            text-align: left;
            margin-bottom: var(--spacing-sm);
            font-size: var(--font-size-2xl);
            font-weight: 700;
        }

        .experience-item {
            display: flex;
            align-items: center;
            gap: var(--gap-md);
            margin-bottom: var(--spacing-4xl);

            .experience-icon {
                flex-shrink: 0;
                width: 40px;
                height: 40px;
                border-radius: 50%;
                background: var(--color-accent);
                display: flex;
                align-items: center;
                justify-content: center;
                color: var(--color-background);
                font-size: 1.2rem;
            }

            .experience-text {
                flex: 1;
                font-weight: 400;
                font-size: var(--font-size-md);
                line-height: var(--line-height-base);
                color: var(--color-text);
            }

            @media (max-width: 515px) {
                flex-direction: column;
                align-items: flex-start;

                .experience-text {
                    margin-left: 0;
                }
            }
        }
    }
}
