/* ========================================
   CSS Variables / Theme
   ======================================== */
:root {
    /* Google Material-Inspired Theme — Light */
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

    --bg-body: #f8f7fc;
    --bg-card: #ffffff;
    --bg-section: #ffffff;
    --bg-surface: #f3f1fa;
    --text-primary: #1c1629;
    --text-secondary: #5b5287;
    --text-muted: #9b92c1;
    --accent: #7c3aed;
    --accent-hover: #6d28d9;
    --accent-light: rgba(124, 58, 237, 0.08);
    --accent-container: rgba(124, 58, 237, 0.12);
    --border-color: rgba(30, 27, 75, 0.08);
    --border-focus: var(--accent);
    --nav-bg: rgba(255, 255, 255, 0.9);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 15px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.06), 0 20px 40px rgba(0, 0, 0, 0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --badge-bg: rgba(124, 58, 237, 0.08);
    --badge-text: var(--accent);
    --input-bg: #ffffff;
    --placeholder-color: var(--text-muted);
    --star-color: rgba(124, 58, 237, 0.2);
}

[data-theme="dark"] {
    /* Google Material-Inspired Theme — Dark */
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

    --bg-body: #0f0b1a;
    --bg-card: #181226;
    --bg-section: #120d1f;
    --bg-surface: #1c1530;
    --text-primary: #e8e0ff;
    --text-secondary: #9d8fbf;
    --text-muted: #5a4e7a;
    --accent: #a78bfa;
    --accent-hover: #b79cff;
    --accent-light: rgba(167, 139, 250, 0.1);
    --accent-container: rgba(167, 139, 250, 0.15);
    --border-color: rgba(167, 139, 250, 0.08);
    --border-focus: var(--accent);
    --nav-bg: rgba(15, 11, 26, 0.92);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3), 0 10px 15px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4), 0 20px 40px rgba(0, 0, 0, 0.3);
    --badge-bg: rgba(167, 139, 250, 0.1);
    --badge-text: var(--accent);
    --input-bg: rgba(24, 18, 38, 0.8);
    --placeholder-color: var(--text-muted);
    --star-color: rgba(167, 139, 250, 0.3);
}

/* ========================================
   Reset & Base
   ======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.section-title,
.logo,
.nav-link,
.btn,
.project-info h3,
.skill-card h3,
.service-card h3,
.contact-label,
.footer-heading,
.youtube-channel-name,
.youtube-video-title {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

code, pre,
.skill-tags span,
.tags span,
.youtube-video-meta {
    font-family: var(--font-mono);
}

/* ========================================
   Accessibility - Skip Link & Focus
   ======================================== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 10000;
    padding: 0.8rem 1.5rem;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0 0 8px 0;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* Visible focus ring for keyboard users */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Remove focus outline for mouse users but keep for keyboard */
:focus:not(:focus-visible) {
    outline: none;
}

/* Screen-reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Form field wrapper */
.form-field {
    display: flex;
    flex-direction: column;
}

/* Starfield Background */
.starfield {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.star {
    position: absolute;
    border-radius: 50%;
    background: var(--star-color);
    animation: twinkle var(--duration, 3s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

section {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

/* ========================================
   Animations — Anti-Gravity
   ======================================== */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Float / Levitate — the anti-gravity signature */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}




@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.float {
    animation: float 4s ease-in-out infinite;
}

.float-slow {
    animation: floatSlow 6s ease-in-out infinite;
}

/* Apply gentle floating to cards with GPU acceleration */
.skill-card:nth-child(2),
.service-card:nth-child(3),
.project-card:nth-child(2) {
    animation: floatSlow 6s ease-in-out infinite;
    will-change: transform;
}

.skill-card:nth-child(3),
.service-card:nth-child(5) {
    animation: floatSlow 7s ease-in-out infinite;
    animation-delay: 1s;
    will-change: transform;
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo {
    font-size: 1.35rem;
    font-weight: 650;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    transition: color 0.3s;
}

.logo span {
    color: var(--accent);
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    padding: 0.35rem 0;
    transition: color 0.25s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2.5px;
    background-color: var(--accent);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link[aria-current="page"] {
    color: var(--accent);
    font-weight: 600;
}

.nav-link[aria-current="page"]::after {
    width: 100%;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.25s ease;
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-light);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
    padding: 8px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   Hero / Carousel
   ======================================== */
.hero-section {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-carousel {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 70px;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    padding: 0 2rem;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
}

.slide-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 30%, var(--accent-light) 0%, transparent 60%);
    opacity: 0.5;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.carousel-slide[data-index="1"] .slide-bg {
    background: radial-gradient(circle at 30% 70%, var(--accent-light) 0%, transparent 55%);
}

.carousel-slide[data-index="2"] .slide-bg {
    background: radial-gradient(circle at 50% 50%, var(--accent-light) 0%, transparent 55%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    text-align: center;
    padding: 2rem 0;
}

.badge {
    display: inline-block;
    background: var(--badge-bg);
    color: var(--badge-text);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    margin-bottom: 1.5rem;
    letter-spacing: 0.3px;
    border: 1px solid var(--accent);
    animation: fadeIn 0.6s ease 0.2s both;
}

.hero-content h1 {
    font-size: 3.75rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 1.25rem;
    line-height: 1.1;
    animation: slideUp 0.6s ease 0.3s both;
}

.hero-content .highlight {
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 2.5rem;
    animation: slideUp 0.6s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: slideUp 0.6s ease 0.5s both;
}

/* Buttons — Material Style */
.btn {
    padding: 0.8rem 1.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    border: 1.5px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

/* Carousel Controls */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.carousel-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.carousel-btn.prev {
    left: 2rem;
}

.carousel-btn.next {
    right: 2rem;
}

/* Carousel Dots */
.carousel-dots {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}

.carousel-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.carousel-dots .dot.active {
    background: var(--accent);
    width: 28px;
    border-radius: 5px;
}

.carousel-dots .dot:hover {
    background: var(--accent);
}

/* Section cosmic dividers */
section {
    padding: 6rem 0;
    position: relative;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 650;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--text-primary);
}

.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    background: var(--accent);
    margin: 0.75rem auto 0;
    border-radius: 4px;
}

.section-subtitle {
    color: var(--text-secondary);
    text-align: center;
    max-width: 500px;
    margin: 0 auto 3.5rem;
    font-size: 1.05rem;
}

/* ========================================
   About / Skills
   ======================================== */
.about-section {
    background: var(--bg-section);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--bg-card);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.skill-card:focus-within {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.skill-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.skill-icon i {
    font-size: 1.5rem;
    color: var(--accent);
}

.skill-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.skill-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tags span {
    background: var(--accent-light);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ========================================
   Services
   ======================================== */
.services-section {
    background: var(--bg-body);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-light);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--accent);
}

.service-card:hover .service-icon i {
    color: #fff;
}

.service-icon i {
    font-size: 1.5rem;
    color: var(--accent);
    transition: color 0.3s ease;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.service-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.service-features li {
    font-size: 0.88rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-features li i {
    color: var(--accent);
    font-size: 0.75rem;
    width: 18px;
    height: 18px;
    background: var(--accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ========================================
   Projects
   ======================================== */
.projects-section {
    background: var(--bg-section);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.project-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.project-overlay span {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-overlay span i {
    transition: transform 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card:hover .project-overlay span i {
    transform: translateX(4px);
}

.img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-placeholder i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
}

.project-info {
    padding: 1.5rem 1.75rem 1.75rem;
}

.project-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags span {
    background: var(--accent-light);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* ========================================
   YouTube Section
   ======================================== */
.youtube-section {
    background: var(--bg-body);
}

/* Channel Info */
.youtube-channel-info {
    margin-bottom: 2.5rem;
}

.youtube-channel-brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    transition: all 0.3s ease;
    flex-wrap: wrap;
}

.youtube-channel-brand:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.youtube-channel-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    flex-shrink: 0;
}

.youtube-channel-meta {
    flex: 1;
    min-width: 150px;
}

.youtube-channel-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.youtube-channel-subs {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.youtube-subscribe-btn {
    background: #ff0000;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    flex-shrink: 0;
}

.youtube-subscribe-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.35);
}

.youtube-subscribe-btn i {
    font-size: 1.1rem;
}

/* Loading */
.youtube-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    color: var(--text-muted);
    gap: 0.75rem;
}

.youtube-loading-spinner {
    font-size: 2rem;
    color: var(--accent);
    animation: pulse 1.5s ease-in-out infinite;
}

/* Error / Setup */
.youtube-error {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.youtube-error i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.youtube-error h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.youtube-error p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}    /* Modal Loading Spinner */
.youtube-modal-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    background: #0a0a0a;
    z-index: 1;
}

.youtube-modal-loader i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.4);
}

.youtube-player-container {
    position: relative;
    z-index: 2;
}

/* Hide loader when player is ready */
.youtube-player-container:not(:empty) ~ .youtube-modal-loader {
    display: none;
}

/* Code inline styling */
code {
    background: var(--accent-light);
    color: var(--accent);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.85em;
}

    /* Empty State */
.youtube-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.youtube-empty i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Video Grid */
.youtube-videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Video Card */
.youtube-video-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.5s ease forwards;
}

.youtube-video-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.youtube-video-card:focus-within {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.youtube-thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--accent-light);
}

.youtube-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.youtube-video-card:hover .youtube-thumbnail img {
    transform: scale(1.08);
}

.youtube-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.youtube-play-overlay i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.youtube-video-card:hover .youtube-play-overlay {
    opacity: 1;
}

.youtube-video-card:hover .youtube-play-overlay i {
    transform: scale(1.15);
}

.youtube-video-info {
    padding: 1rem 1.25rem 1.25rem;
}

.youtube-video-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}

.youtube-video-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.youtube-video-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.youtube-video-meta i {
    font-size: 0.75rem;
    color: var(--accent);
}

/* Video Modal */
.youtube-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.youtube-modal.open {
    opacity: 1;
    visibility: visible;
}

.youtube-modal-content {
    position: relative;
    width: 100%;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.youtube-modal.open .youtube-modal-content {
    transform: scale(1);
}

.youtube-modal-close {
    position: absolute;
    top: -44px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
    z-index: 10;
    opacity: 0.8;
}

.youtube-modal-close:hover {
    opacity: 1;
    transform: scale(1.15);
}

.youtube-player-container {
    width: 100%;
    height: 100%;
}

.youtube-player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ========================================
   Contact
   ======================================== */
.contact-section {
    background: var(--bg-section);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.25s ease;
}

.contact-item:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.contact-item i {
    font-size: 1.2rem;
    color: var(--accent);
    width: 44px;
    height: 44px;
    background: var(--accent-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
    font-weight: 500;
}

.contact-item a {
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.2s;
}

.contact-item a:hover {
    color: var(--accent);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.85rem 1.2rem;
    background: var(--input-bg);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.25s ease;
    outline: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--placeholder-color);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-container);
}

.contact-form button {
    align-self: flex-start;
}

/* ========================================
   Footer
   ======================================== */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    position: relative;
    padding-top: 0;
}

/* Wave SVG separator */
.footer-wave {
    position: relative;
    top: -1px;
    line-height: 0;
}

.footer-wave svg {
    display: block;
    width: 100%;
    height: 50px;
}

.footer-wave svg path {
    fill: var(--border-color);
}

[data-theme="dark"] .footer-wave svg path {
    fill: #1a2440;
}

.footer-wave + .footer-content {
    padding-top: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1.2fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}

/* Brand Column */
.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    display: inline-block;
    margin-bottom: 1rem;
}

.footer-logo span {
    color: var(--accent);
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

/* Column Headings */
.footer-heading {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 28px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

/* Link Lists */
.footer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-list li a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.25s ease;
}

.footer-list li a i {
    font-size: 0.6rem;
    color: var(--text-muted);
    transition: all 0.25s ease;
}

.footer-list li a:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.footer-list li a:hover i {
    color: var(--accent);
}

/* Contact List */
.footer-contact {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-contact li i {
    color: var(--accent);
    font-size: 0.95rem;
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.footer-contact li a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.footer-contact li a:hover {
    color: var(--accent);
}

/* Bottom Bar */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-bottom p strong {
    color: var(--text-secondary);
}

.footer-bottom p i {
    color: var(--accent);
}

.footer-back-top {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.25s ease;
}

.footer-back-top:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

/* ========================================
   Mouse Trail — Colorful Dots
   ======================================== */
.mouse-trail-dot {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    will-change: transform, opacity;
    mix-blend-mode: multiply;
}

[data-theme="dark"] .mouse-trail-dot {
    mix-blend-mode: screen;
}

@keyframes mouseTrailFade {
    0% {
        opacity: 0.9;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-40px) scale(0);
    }
}

/* ========================================
   Voice Control
   ======================================== */
.voice-btn {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow-md);
    z-index: 998;
    transition: all 0.25s ease;
}

.voice-btn:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-lg);
}

.voice-btn.listening {
    animation: voicePulse 1s ease-in-out infinite;
}

.voice-btn.listening i {
    animation: voiceWave 0.8s ease-in-out infinite;
}

@keyframes voicePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(167, 139, 250, 0);
        transform: scale(1.05);
    }
}

@keyframes voiceWave {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(0.9); }
    75% { transform: scale(1.15); }
}

/* Voice status toast */
.voice-toast {
    position: fixed;
    bottom: 5.5rem;
    left: 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.7rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    pointer-events: none;
    white-space: nowrap;
}

.voice-toast.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.voice-toast i {
    color: #22c55e;
    font-size: 0.65rem;
    animation: voicePulse 1.5s ease-in-out infinite;
}

.voice-toast .fa-circle.paused {
    color: var(--text-muted);
    animation: none;
}

.voice-toast .command-text {
    color: var(--accent);
    font-weight: 600;
}

/* ========================================
   Scroll to Top
   ======================================== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.25s ease;
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet & Below */
@media (max-width: 968px) {
    .youtube-videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-content h1 {
        font-size: 2.75rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-form button {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Navigation */
    .nav-list {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-body);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-120%);
        opacity: 0;
        transition: all 0.4s ease;
        box-shadow: var(--shadow-lg);
    }

    .nav-list.open {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 0.75rem 0;
        display: block;
    }

    .hamburger {
        display: flex;
    }

    /* Hero */
    .hero-section {
        height: 90vh;
        min-height: 500px;
    }

    .hero-content h1 {
        font-size: 2.25rem;
        letter-spacing: -1px;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .badge {
        font-size: 0.75rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .carousel-btn.prev {
        left: 0.75rem;
    }

    .carousel-btn.next {
        right: 0.75rem;
    }

    .carousel-dots {
        bottom: 2rem;
    }

    .carousel-dots .dot {
        width: 8px;
        height: 8px;
    }

    .carousel-dots .dot.active {
        width: 22px;
    }

    /* Sections */
    section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .skills-grid,
    .services-grid,
    .projects-grid,
    .youtube-videos-grid {
        grid-template-columns: 1fr;
    }

    .youtube-channel-brand {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .youtube-channel-meta {
        text-align: center;
    }

    .youtube-modal {
        padding: 1rem;
    }

    .youtube-modal-close {
        top: -36px;
        font-size: 1.5rem;
    }

    .skill-card,
    .service-card {
        padding: 2rem 1.5rem;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-social {
        justify-content: center;
    }

    .footer-list li a {
        justify-content: center;
    }

    .footer-contact li {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.9rem;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .scroll-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .voice-btn {
        bottom: 1.25rem;
        left: 1.25rem;
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .voice-toast {
        bottom: 4.5rem;
        left: 1.25rem;
        font-size: 0.78rem;
        padding: 0.5rem 1rem;
        max-width: 220px;
        white-space: normal;
    }
}

/* GPU-accelerated card transitions for smoothness */
.skill-card,
.service-card,
.project-card,
.contact-item,
.btn {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    html {
        scroll-behavior: auto;
    }

    .skip-link {
        transition: none;
    }
}