 /* Color Variables */
        :root {
            --primary-color: #b74b4b; /* Deep red-brown */
            --secondary-color: #f8f5f1; /* Soft off-white */
            --text-color: #2c2b2b; /* Dark charcoal */
            --light-text-color: #7a7574; /* Muted grey-brown */
            --highlight-color: #e5a7a7; /* Light red-brown highlight */
        }
        
        /* Dark Theme Variables */
        body.dark-theme {
            --primary-color: #e5a7a7;
            --secondary-color: #2c2b2b;
            --text-color: #f8f5f1;
            --light-text-color: #a09890;
            --highlight-color: #b74b4b;
        }

        /* General Styles */
        html { scroll-behavior: smooth; }
        body {
            font-family: 'Roboto', sans-serif;
            color: var(--text-color);
            background-color: var(--secondary-color);
            margin: 0;
            padding: 0;
            line-height: 1.6;
            overflow-x: hidden;
            cursor: none; /* Hide default cursor */
            transition: background-color 0.5s ease, color 0.5s ease;
        }
        .header-font { font-family: 'Playfair Display', serif; }
        .container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 0 2rem;
        }
        section {
            padding: 8rem 1rem;
            margin-bottom: 2rem;
            transition: background-color 0.5s ease;
        }
        @media (max-width: 768px) {
            section { padding: 4.5rem 0.5rem; margin-bottom: 1.5rem; }
        }
        h2 {
            font-size: 3rem;
            font-weight: 700;
            margin-bottom: 3rem;
            text-align: center;
        }
        h3 {
            font-size: 1.25rem;
            font-weight: 600;
            margin-top: 0;
            margin-bottom: 0.5rem;
        }

        /* Navbar */
        .navbar {
            font-family: 'Poppins';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1.5rem;
            background-color: rgba(248, 245, 241, 0.85);
            backdrop-filter: blur(5px);
            z-index: 1000;
            transition: background-color 0.5s ease;
        }
        body.dark-theme .navbar { background-color: rgba(44, 43, 43, 0.85); }
        .navbar .brand {
            font-family: 'Playfair Display', serif;
            font-size: 2rem;
            font-weight: 700;
            text-decoration: none;
            color: var(--primary-color);
            transition: color 0.5s ease;
        }
        .navbar-links {
            display: flex;
            list-style: none;
            margin: 0;
            padding-right: 9rem;
            gap: 2rem;
        }
        .navbar-links a {
            text-decoration: none;
            color: var(--text-color);
            font-weight: 500;
            transition: color 0.3s ease;
        }
        .navbar-links a:hover { color: var(--primary-color); }

        /* Mobile Menu */
        .menu-toggle {
            display: none;
            font-size: 1.5rem;
            cursor: pointer;
            z-index: 1001;
            color: var(--primary-color);
            transition: color 0.3s ease;
            width: 50px;
            height: 50px;
            text-align: center;
            line-height: 50px;
        }
        .menu-toggle i { color: var(--primary-color) !important; font-size: 2rem !important; }
        @media (max-width: 768px) {
            .menu-toggle { display: block; }
            .navbar { padding: 1rem 1.5rem; }
            .navbar-links {
                display: none;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100vh;
                background-color: var(--secondary-color);
                backdrop-filter: blur(8px);
                padding-top: 5rem;
                text-align: center;
                z-index: 1000;
            }
            .navbar-links.active { display: flex; }
            .navbar-links li { margin: 1rem 0; }
            .navbar-links a { font-size: 1.8rem; }
        }

        /* Custom Cursor */
        #custom-cursor {
            position: fixed;
            width: 25px;
            height: 25px;
            border-radius: 50%;
            background-color: var(--primary-color);
            opacity: 0.7;
            pointer-events: none;
            z-index: 9999;
            transform: translate(-50%, -50%);
            transition: transform 0.1s ease-out, top 0.1s ease-out, left 0.1s ease-out;
            will-change: top, left;
        }

        /* Theme Toggle Button */
        #theme-toggle {
            position: fixed;
            top: 50%;
            right: 1rem;
            transform: translateY(-50%);
            z-index: 1001;
            background-color: var(--primary-color);
            color: var(--secondary-color);
            border: none;
            border-radius: 50%;
            width: 45px;
            height: 45px;
            font-size: 1.2rem;
            cursor: pointer;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
        }
        #theme-toggle:hover { transform: scale(1.1) translateY(-50%); }
        @media (max-width: 768px) {
            #theme-toggle { width: 40px; height: 40px; font-size: 1rem; }
        }

        /* Hero Section */
        #hero {
            position: relative;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 0.5rem;
            overflow: hidden;
            text-align: center;
        }
        .hero-bg-text {
            position: absolute;
            top: 40%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 0;
            text-align: center;
            white-space: nowrap;
        }
        .hero-bg-text h1 {
            font-size: 13vw;
            font-weight: 900;
            letter-spacing: 0.1rem;
            line-height: 1;
            opacity: 0.7;
            color: var(--light-text-color);
            transition: color 0.5s ease;
        }
        @media (min-width: 320px){ .hero-bg-text h1 { font-size: 3rem; } }
        @media (min-width: 768px) { .hero-bg-text h1 { font-size: 8rem; } }
        @media (min-width: 1024px) { .hero-bg-text h1 { font-size: 12rem; } }

        .hero-foreground {
            position: relative;
            z-index: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
        }
        .hero-photo-container {
            position: relative;
            width: 100%;
            max-width: 700px;
        }
        @media (min-width: 768px) { .hero-photo-container { max-width: 600px; } }
        .hero-photo {
            width: 100%;
            height: 100%;
            overflow: hidden;
            border-radius: 0.5rem;
        }
        .hero-photo img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .hero-intro-text {
            font-family: 'Poppins';
            text-align: center;
            margin-top: 5.2rem;
            font-size: 1.75rem;
            font-weight: 700;
            color: var(--text-color);
        }
        @media (min-width: 768px) { .hero-intro-text { font-size: 2.5rem; } }
        #typing-text { color: var(--primary-color); }

        /* Hero bottom text positioning and responsiveness */
        .hero-bottom-text {
            position: relative;
            z-index: 2;
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            max-width: 1280px;
            padding: 0 2rem;
            font-size: 1.2rem;
            font-weight: 500;
            text-transform: uppercase;
            color: var(--text-color);
            margin-top: 2rem;
        }
        @media (max-width: 768px) {
            .hero-bottom-text {
                flex-direction: column;
                bottom: initial;
                gap: 0.5rem;
                text-align: center;
            }
        }

        /* About Section */
        #about {
            font-family: 'Poppins';
            background-color: #fff;
            transition: background-color 0.5s ease;
        }
        body.dark-theme #about { background-color: #242222; }
        #about .about-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            gap: 10rem;
        }
        @media (min-width: 768px) {
            #about .about-content {
                flex-direction: row;
                justify-content: space-between;
                text-align: left;
            }
        }
        .about-text { flex: 1; }
        .about-text h2 { font-size: 4rem; }
        .about-text p {
            font-size: 1.125rem;
            line-height: 1.625;
            color: var(--light-text-color);
        }
        .about-photo { 
            flex: 1; 
        }
        .about-photo img {
            width: 70%;
            height: auto;
            border-radius: 3rem;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        }
        .about-reveal {
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            overflow: hidden;
            max-width: 900px;
            margin: 0 auto;
        }
        @media (min-width: 768px) {
            .about-reveal { flex-direction: row; }
        }

        /* Education Section */
        .education-cards {
            display: flex;
            flex-direction: column;
            gap: 4rem;
            max-width: 900px;
            margin: 0 auto;
        }
        #education{
            background: var(--primary-color);
        }
         body.dark-theme #education {
            background: #242222;
        }
        #education h2 { color: var(--secondary-color); }
        body.dark-theme #education h2 { color: var(--text-color); }
        .edu-card {
            display: flex;
            align-items: center;
            gap: 2rem;
            background: #fff;
            border-radius: 2rem;
            box-shadow: 0 10px 30px rgba(183, 75, 75, 0.13);
            padding: 2rem;
            opacity: 0;
            transform: translateX(0);
            transition: opacity 1s ease, transform 1s ease, box-shadow 0.3s ease;
            cursor: pointer;
            will-change: transform;
        }
        .edu-card:hover {
            transform: translateY(-10px) scale(1.03);
            box-shadow: 0 15px 40px rgba(183, 75, 75, 0.6);
        }
        body.dark-theme .edu-card {
            background: #332d2b;
            color: var(--text-color);
        }
        body.dark-theme .edu-content h3, body.dark-theme .edu-content p { color: var(--text-color); }
        .edu-img {
            width: 300px;
            height: 200px;
            border-radius: 1.5rem;
            object-fit: cover;
            box-shadow: 0 8px 20px rgba(183, 75, 75, 0.3);
        }
        .edu-content h3 { font-size: 2rem; color: #242222; }
        .edu-content p { margin: 0.3rem 0; color: #242222; }
        .slide-in-left { transform: translateX(-120px); }
        .slide-in-right { transform: translateX(120px); }
        .edu-card.visible { opacity: 1; transform: translateX(0); }
        @media (max-width: 768px) {
            .edu-card { flex-direction: column; text-align: center; }
            .slide-in-left, .slide-in-right { transform: translateY(30px); }
            .edu-img { width: 100%; height: auto; }
        }

        /* --- New Skills Section Styles (uses old Certs styles) --- */
        #skills .skills-container {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        #skills .card-grid {
            display: flex;
            flex-wrap: wrap; 
            justify-content: center;
            gap: 2rem;
            padding: 1rem 0;
        }
        .card {
            width: 280px;
            height: 350px;
            perspective: 1000px;
            position: relative;
            cursor: pointer;
            border-radius: 1rem;
            box-shadow: 0 6px 18px rgba(183, 75, 75, 0.2);
            transition: transform 0.4s ease, box-shadow 0.4s ease;
            overflow: hidden;
            flex: 0 0 auto;
        }
        .card:hover {
            transform: translateY(-10px) scale(1.06);
            box-shadow: 0 20px 40px rgba(183, 75, 75, 0.4);
        }
        .card-inner {
            width: 100%;
            height: 100%;
            position: relative;
            text-align: center;
            transition: transform 0.8s cubic-bezier(0.4,0,0.2,1);
            transform-style: preserve-3d;
            border-radius: 1rem;
        }
        .card.is-flipped .card-inner,
        .card:hover .card-inner {
            transform: rotateY(180deg);
        }
        .card-front, .card-back {
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            backface-visibility: hidden;
            -webkit-backface-visibility: hidden;
            border-radius: 1rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background-color: #fff;
            padding: 1.5rem;
            box-sizing: border-box;
            color: var(--text-color);
        }
        .card-front { z-index: 2; }
        .card-back { transform: rotateY(180deg); background-color: var(--primary-color); color: var(--secondary-color); }
        .card-front .skill-icon { font-size: 3.5rem; margin-bottom: 0.8rem; color: var(--primary-color); }
        .card-back h4 { font-weight: 700; font-size: 1.15rem; margin-bottom: 0.5rem; }
        .card-back ul { list-style: none; padding: 0; margin: 0; }
        .card-back li { font-size: 1.1rem; padding: 0.2rem 0; }
        body.dark-theme .card-front { background-color: #332d2b; color: var(--text-color); }
        body.dark-theme .card-back { background-color: var(--primary-color); color: #fff; }

        /* --- New Certifications Section Styles (uses old Skills styles) --- */
        #certifications {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            background: var(--primary-color);
        }
        body.dark-theme #certifications {
            background: #242222;
        }
        #certifications h2 { color: var(--secondary-color); }
        body.dark-theme #certifications h2 { color: var(--text-color); }

        .carousel-container {
            position: relative;
            max-width: 800px;
            width: 100%;
            overflow: hidden;
            margin: 0 auto;
            border-radius: 1.5rem;
            background: #fff;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            padding: 2rem;
            box-sizing: border-box;
        }
        body.dark-theme .carousel-container {
            background: #332d2b;
        }
        .carousel-track {
            display: flex;
            transition: transform 0.5s ease-in-out;
        }
        .carousel-card {
            flex-shrink: 0;
            width: 100%;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 1rem;
        }
        .carousel-card img {
            width: 220px;
            height: 130px;
            /* border-radius: 50%; */
            object-fit: cover;
            margin-bottom: 1rem;
        }
        .carousel-card h3 {
            font-size: 1.75rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
        }
        .carousel-card p {
            font-size: 1.1rem;
            max-width: 600px;
            margin: 0 auto;
        }
        .carousel-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 95%;
            display: flex;
            justify-content: space-between;
            pointer-events: none;
            z-index: 10;
        }
        .carousel-nav button {
            pointer-events: auto;
            background: transparent;
            border: none;
            color: var(--primary-color);
            font-size: 2.5rem;
            cursor: pointer;
            padding: 0 1rem;
            transition: color 0.3s ease;
            opacity: 0.7;
        }
        body.dark-theme .carousel-nav button { color: var(--text-color); }
        .carousel-nav button:hover {
            color: var(--highlight-color);
            opacity: 1;
        }
        .carousel-dots {
            display: flex;
            justify-content: center;
            margin-top: 2rem;
            gap: 0.75rem;
        }
        .dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background-color: rgba(255, 255, 255, 0.5);
            cursor: pointer;
            transition: background-color 0.3s ease, transform 0.2s ease;
        }
        body.dark-theme .dot { background-color: rgba(0, 0, 0, 0.5); }
        .dot.active {
            background-color: var(--secondary-color);
            transform: scale(1.2);
        }
        body.dark-theme .dot.active { background-color: var(--text-color); }


        /* Projects Section */
        #projects .container {
            position: relative;
            min-height: 100vh;
        }
        .stack-card-projects {
            list-style: none;
            padding: 0;
            margin: 4rem auto 0 auto;
            max-width: 100%;
            min-height: 80vh;
            position: relative;
        }
        .stack-project-card {
            position: sticky;
            top: 80px;
            width: 100%;
            margin-bottom: 120px;
            transition: transform 0.8s cubic-bezier(.4,2,.4,1), box-shadow 0.5s;
        }
        @media (max-width: 768px) {
            #projects .container {
                min-height: auto;
            }
            .stack-project-card {
                position: static;
                margin-bottom: 40px;
            }
        }
        .project-content {
            background: #fff;
            border-radius: 1.5rem;
            padding: 2.5rem 1.4rem 2rem 1.4rem;
            font-size: 1.2rem;
            text-align: center;
            box-shadow: 0 8px 24px rgba(0,0,0,0.13), 0 2px 16px 0 rgba(183,75,75,0.09);
            display: flex;
            flex-direction: column;
            align-items: center;
            min-height: 300px;
            justify-content: center;
            overflow: hidden;
            width: 100%;
            box-sizing: border-box;
        }
        body.dark-theme .project-content { 
            background-color: #332d2b; 
            color: var(--text-color); 
        }
        .project-content img {
            width: 90%;
            height: 350px;
            object-fit: cover;
            border-radius: 0.8rem;
            margin-bottom: 1rem;
            box-shadow: 0 4px 8px rgba(183, 75, 75, 0.13);
        }
        .project-links { margin-top: 1rem; }
        .project-links a {
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 500;
            margin-right: 1rem;
            transition: color 0.3s ease;
        }
        .project-links a:hover { text-decoration: underline; }
        body.dark-theme .project-links a { color: var(--secondary-color); }
        body.dark-theme .project-links a:hover { color: var(--highlight-color); }
        .hidden-link { display: none; }
        
        /* Contact Section */
        #contact { font-family: 'Poppins'; text-align: center; background-color: #fff; }
        body.dark-theme #contact { background-color: #242222; }
        .contact-form {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            max-width: 600px;
            margin: 2rem auto;
            padding: 2rem;
            background-color: var(--secondary-color);
            border-radius: 1rem;
            box-shadow: 0 4px 16px rgba(0,0,0,0.1);
        }
        body.dark-theme .contact-form { background-color: #332d2b; }
        .contact-form input, .contact-form textarea {
            width: 100%;
            padding: 0.75rem;
            border: 1px solid var(--light-text-color);
            border-radius: 0.5rem;
            background-color: #fff;
            color: var(--text-color);
            font-size: 1rem;
            transition: border-color 0.3s ease;
        }
        body.dark-theme .contact-form input, body.dark-theme .contact-form textarea {
            background-color: #4d4441;
            border-color: #6a6361;
            color: var(--text-color);
        }
        .contact-form input:focus, .contact-form textarea:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px var(--highlight-color);
        }
        .social-links {
            display: flex;
            justify-content: center;
            gap: 1.5rem;
            margin-top: 2rem;
        }
        .social-links a {
            color: var(--primary-color);
            font-size: 2rem;
            transition: transform 0.2s ease, color 0.3s ease;
        }
        .social-links a:hover {
            transform: translateY(-4px);
            color: var(--highlight-color);
        }
        .button.primary { background-color: var(--primary-color); color: #fff; }
        .button.primary:hover { background-color: #8b3c3c; }
        .button.secondary { background-color: var(--secondary-color); color: var(--primary-color); }
        .button.secondary:hover { background-color: #e5e7eb; }
        body.dark-theme .button.primary { background-color: var(--primary-color); color: var(--secondary-color); }
        body.dark-theme .button.primary:hover { background-color: var(--highlight-color); }
        body.dark-theme .button.secondary { background-color: #332d2b; color: var(--text-color); }
        body.dark-theme .button.secondary:hover { background-color: #4d4441; }

        footer .footer-text {
            background-color: #e0d5ca;
            text-align: center;
            margin-top: 15rem;
            font-size: 0.875rem;
            padding: 20px;
            color: var(--light-text-color);
        }
        @media (max-width: 768px) {
            footer .footer-text {
                margin-top: 5rem;
            }
        }

        /* Animations */
        @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
        .animate-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
        .animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
        .hero-animate-1 { animation: fadeIn 0.8s ease-out forwards; }
        .hero-animate-2 { animation: fadeIn 0.8s ease-out 0.3s forwards; }
        .hero-animate-3 { animation: fadeIn 0.8s ease-out 0.6s forwards; }
        #typing-text { display: inline-block; transition: color 0.5s ease; }
        .cursor::after {
            content: '';
            display: inline-block;
            width: 0.1em;
            height: 1.2em;
            background-color: var(--light-text-color);
            margin-left: 0.2em;
            animation: blink 1s step-end infinite;
            vertical-align: middle;
            transition: background-color 0.5s ease;
        }
        @keyframes blink { from, to { opacity: 0; } 50% { opacity: 1; } }