@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Premium Dark Theme Variables */
    --bg-color: #0b1120;
    /* Deep Navy */
    --second-bg-color: #1a2235;
    /* Lighter Navy */
    --text-color: #e2e8f0;
    /* Soft White */
    --main-color: #0ea5e9;
    /* Sky Blue */
    --accent-color: #38bdf8;
    /* Lighter Blue for glow */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-family: 'Outfit', sans-serif;
    --transition: all 0.4s ease;
}

/* Light Mode Override - Clean & Crisp */
.light-theme {
    --bg-color: #f8fafc;
    /* Slate 50 - Very light gray/white background */
    --second-bg-color: #ffffff;
    /* Pure White - For cards/sections */
    --text-color: #0f172a;
    /* Slate 900 - Deep, readable black */
    --main-color: #0284c7;
    /* Sky 600 - Readable Blue */
    --accent-color: #0ea5e9;
    /* Sky 500 */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.08);
    /* Subtle dark border */
}

/* Specific Light Theme Overrides */
.light-theme .header {
    background: rgba(255, 255, 255, 0.9);
    /* White transparent background */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    /* Subtle shadow */
}

.light-theme .navbar a {
    color: var(--text-color);
    font-weight: 600;
}

.light-theme .navbar a:hover,
.light-theme .navbar a.active {
    color: var(--main-color);
}

.light-theme .logo {
    color: var(--text-color);
}

.light-theme #menu-icon,
.light-theme #theme-icon {
    color: var(--text-color);
}

/* Card Shadows for Light Theme */
.light-theme .skill-box,
.light-theme .portfolio-box,
.light-theme .about-item,
.light-theme .content {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.05);
}

.light-theme .skill-box:hover,
.light-theme .portfolio-box:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: var(--font-family);
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
}

/* --- Reusable Components --- */
.heading {
    text-align: center;
    font-size: 4.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
}

.light-theme .heading span {
    text-shadow: none;
    /* Remove glow in light mode for cleaner look */
}

.heading span {
    color: var(--main-color);
    text-shadow: 0 0 10px rgba(14, 165, 233, 0.3);
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 10px var(--main-color);
    font-size: 1.6rem;
    color: var(--bg-color);
    letter-spacing: 0.1rem;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.btn:hover {
    box-shadow: 0 0 20px var(--main-color);
    transform: translateY(-3px);
    color: #fff;
}

/* --- Header / Navbar --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: rgba(11, 17, 32, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.logo span {
    color: var(--main-color);
}

.navbar a {
    font-size: 1.7rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

.navbar a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--main-color);
    transition: var(--transition);
}

.navbar a:hover::after,
.navbar a.active::after {
    width: 100%;
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
    cursor: pointer;
}

/* Theme Toggle */
#theme-icon {
    font-size: 2.4rem;
    color: var(--text-color);
    cursor: pointer;
    margin-left: 2rem;
    transition: var(--transition);
}

#theme-icon:hover {
    color: var(--main-color);
    transform: rotate(15deg);
}

/* --- Home Section --- */
section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

.home {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5rem;
}

.home-content {
    max-width: 60rem;
}

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
}

.home-content h1 {
    font-size: 5.6rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-content .text-animate {
    position: relative;
    width: 32.8rem;
    /* approximate width for typing */
}

.home-content .text-animate h3 {
    font-size: 3.2rem;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 0.7px var(--main-color);
    background-image: linear-gradient(var(--main-color), var(--main-color));
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    background-position: -33rem 0;
    animation: homeBgText 6s linear infinite;
    animation-delay: 2s;
}

/* Text typing animation substitute if complex css anims needed, kept simple primarily */
/* Using the "I'm a..." approach from previous design but cleaner */
.typing-text span {
    color: var(--main-color);
    font-weight: 600;
}

.home-content p {
    font-size: 1.6rem;
    margin: 2rem 0 4rem;
    line-height: 1.6;
}

.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: 0.2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: var(--transition);
}

.social-media a:hover {
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 10px var(--main-color);
    transform: scale(1.1);
}

.home-imgHover {
    position: relative;
    width: 400px;
    height: 400px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Animated glow border */
    position: relative;
}

.home-imgHover::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(transparent, transparent, transparent, var(--main-color));
    animation: rotate 4s linear infinite;
}

.home-imgHover::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(transparent, transparent, transparent, var(--main-color));
    animation: rotate 4s linear infinite;
    animation-delay: -2s;
}

.home-imgHover .img-box {
    position: relative;
    width: 95%;
    height: 95%;
    background: var(--bg-color);
    border-radius: 50%;
    z-index: 1;
    overflow: hidden;
}

.home-imgHover .img-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}


/* --- About Section --- */
.about {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 2rem;
    background: var(--second-bg-color);
}

.about-content {
    text-align: center;
}

.about-content h2 {
    text-align: center;
    line-height: 1.2;
}

.about-content h3 {
    font-size: 2.6rem;
    margin-top: 1rem;
}

.about-content p {
    font-size: 1.6rem;
    margin: 2rem 0 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    /* Ensure center alignment as requested */
}

.about-details {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.about-item {
    background: var(--bg-color);
    padding: 1.5rem 2rem;
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 150px;
    transition: var(--transition);
}

.about-item:hover {
    border-color: var(--main-color);
    transform: translateY(-5px);
}

.about-item .title {
    font-size: 1.4rem;
    color: var(--main-color);
    font-weight: 600;
}

.about-item .info {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-top: 0.5rem;
}

/* --- Skills Section --- */
.skills {
    background: var(--bg-color);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.skill-box {
    background: var(--second-bg-color);
    padding: 3rem 2rem;
    border-radius: 2rem;
    text-align: center;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-box:hover {
    transform: translateY(-10px);
    border-color: var(--main-color);
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.2);
}

.light-theme .skill-box:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.skill-box i {
    font-size: 7rem;
    color: var(--main-color);
    margin-bottom: 2rem;
}

.skill-box h3 {
    font-size: 2rem;
    font-weight: 600;
}

/* --- Education Section --- */
.education {
    background: var(--second-bg-color);
}

.education-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5rem;
}

.education-column {
    flex: 1 1 40rem;
}

.education-column .title {
    font-size: 2.5rem;
    margin: 0 0 1.5rem 2rem;
}

.education-box {
    border-left: .2rem solid var(--main-color);
}

.education-content {
    position: relative;
    padding-left: 2rem;
}

.education-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -1.1rem;
    width: 2rem;
    height: 2rem;
    background: var(--main-color);
    border-radius: 50%;
}

.content {
    position: relative;
    padding: 1.5rem;
    border: .1rem solid var(--glass-border);
    border-radius: .6rem;
    margin-bottom: 2rem;
    overflow: hidden;
    background: var(--bg-color);
    transition: var(--transition);
}

.content:hover {
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.2);
    border-color: var(--main-color);
}

.content .year {
    font-size: 1.5rem;
    color: var(--main-color);
    padding-bottom: .5rem;
}

.content .year i {
    padding-right: .5rem;
}

.content h3 {
    font-size: 2rem;
}

.content p {
    font-size: 1.6rem;
    padding-top: .5rem;
}

/* --- Projects Section (NEW) --- */
.portfolio {
    background: var(--bg-color);
}

.portfolio-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    padding: 0 2rem;
}

.portfolio-box {
    position: relative;
    border-radius: 2rem;
    box-shadow: 0 0 1rem var(--glass-bg);
    overflow: hidden;
    display: flex;
    height: 350px;
    /* Increased height */
    background: var(--second-bg-color);
    border: 1px solid var(--glass-border);
}

/* Fallback/Placeholder if no images, using gradient */
.portfolio-box .project-visual {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--second-bg-color) 0%, #1e293b 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 5rem;
    color: #334155;
    transition: var(--transition);
}

.portfolio-box .project-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    filter: brightness(0.6);
    /* Darker by default */
    transition: var(--transition);
}

.portfolio-box:hover .project-visual img {
    opacity: 1;
    filter: brightness(1);
    /* Brighten on hover */
    transform: scale(1.05);
    /* Zoom effect on image */
}

/* Reset scale for the container itself so we don't double zoom interactively with text */
.portfolio-box:hover .project-visual {
    transform: scale(1.0);
}

.portfolio-box .portfolio-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.1), var(--main-color));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 4rem;
    transform: translateY(100%);
    transition: 0.5s ease;
}

.portfolio-box:hover .portfolio-layer {
    transform: translateY(0);
}

.portfolio-layer h4 {
    font-size: 3rem;
    color: #fff;
}

.portfolio-layer p {
    font-size: 1.6rem;
    margin: .3rem 0 1rem;
    color: #fff;
}

.portfolio-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 5rem;
    height: 5rem;
    background: #fff;
    border-radius: 50%;
}

.portfolio-layer a i {
    font-size: 2rem;
    color: #333;
}

/* --- Contact Section --- */
.contact {
    background: var(--second-bg-color);
}

.contact form {
    max-width: 70rem;
    margin: 0 auto;
    text-align: center;
}

.contact form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--bg-color);
    border-radius: .8rem;
    margin: .7rem 0;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.light-theme .contact form .input-box input,
.light-theme .contact form textarea {
    background: #ffffff;
    /* White input background */
    border: 1px solid #cbd5e1;
    /* Visible border */
    color: #0f172a;
}

.light-theme .contact form .input-box input:focus,
.light-theme .contact form textarea:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
    /* Clean focus ring */
}

.contact form .input-box input {
    width: 49%;
}

.contact form .input-box input:focus,
.contact form textarea:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.1);
}

.contact form textarea {
    resize: none;
    height: 200px;
}

.contact form .btn {
    margin-top: 2rem;
    cursor: pointer;
}

/* --- Footer --- */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    background: var(--bg-color);
    border-top: 1px solid var(--glass-border);
}

.footer-text p {
    font-size: 1.6rem;
}

.footer-iconTop a {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background: var(--main-color);
    border-radius: .6rem;
    transition: var(--transition);
}

.footer-iconTop a:hover {
    box-shadow: 0 0 10px var(--main-color);
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--bg-color);
}

/* --- Media Queries --- */
@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media (max-width: 991px) {
    .header {
        padding: 2rem 4%;
    }

    section {
        padding: 10rem 4% 2rem;
    }

    .home {
        padding: 0 4%;
    }

    .footer {
        padding: 2rem 4%;
    }
}

@media (max-width: 768px) {
    .header {
        background: var(--bg-color);
    }

    #menu-icon {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 4%;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0, 0, 0, .1);
        display: none;
        flex-direction: column;
    }

    .navbar.active {
        display: flex;
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }

    .home {
        flex-direction: column-reverse;
        justify-content: center;
        gap: 2rem;
    }

    .home-content {
        align-items: center;
        text-align: center;
    }

    .home-content h3 {
        font-size: 2.6rem;
    }

    .home-content h1 {
        font-size: 5rem;
    }

    .home-imgHover {
        width: 70vw;
        height: 70vw;
        margin-top: 2rem;
    }

    .about {
        flex-direction: column-reverse;
        text-align: center;
    }

    .contact form .input-box input {
        width: 100%;
    }
}

@media (max-width: 450px) {
    html {
        font-size: 50%;
    }

    .home-content h1 {
        font-size: 4rem;
    }
}

/* Animation Classes */
/* --- Dynamic Scroll Animations --- */

/* Base class for all animated elements */
.animate-scroll {
    opacity: 0;
    transition: all 1s ease-out;
    will-change: opacity, transform;
}

/* 1. Fade Up (Standard for sections) */
.fade-up {
    transform: translateY(60px);
}

/* 2. Fade Left (For text on left side) */
.fade-left {
    transform: translateX(-100px);
}

/* 3. Fade Right (For images on right side) */
.fade-right {
    transform: translateX(100px);
}

/* 4. Zoom In (For profile pics or strong focal points) */
.zoom-in {
    transform: scale(0.6);
}

/* Active State - When element is in view */
.animate-scroll.show {
    opacity: 1;
    transform: translate(0) scale(1);
    /* Resets all transforms */
}

/* --- Staggered Delays (for grids/lists) --- */
/* Elements appear one after another */
.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}

.delay-500 {
    transition-delay: 500ms;
}

.delay-600 {
    transition-delay: 600ms;
}

.delay-700 {
    transition-delay: 700ms;
}

.delay-800 {
    transition-delay: 800ms;
}

/* Heavy/Module Impact Effect */
/* Adds a 3D-like flip effect just for fun/premium feel */
.heavy-flip {
    transform: perspective(1000px) rotateX(90deg);
    transform-origin: bottom;
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bounce effect */
}

.heavy-flip.show {
    transform: perspective(1000px) rotateX(0);
    opacity: 1;
}