@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    font-family: 'Poppins', sans-serif;
    outline: none;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: black;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: calc(100% - 40px);
    padding: 20px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.header>div {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header>div:first-child,
.header>div:last-child,
.header>div.logo,
.header>div.actions,
.header>div.mobile-toggle {
    flex: 1;
    width: 0;
}

.header>div:first-child,
.header>div.logo {
    justify-content: flex-start;
}

.header>div:last-child,
.header>div.actions,
.header>div.mobile-toggle {
    justify-content: flex-end;
}

.header>div.logo>img {
    height: 24px;
}

.header>div.nav {
    gap: 10px;
}

.header>div.nav>a>button {
    font-size: 16px;
    border: 0px;
    background-color: transparent;
    color: white;
    cursor: pointer;
}

.header>div.actions>a>button {
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    height: 40px;
    padding: 0px 24px;
    background-color: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    color: white;
    cursor: pointer;
}

.hero {
    width: 100%;
    height: 100%;
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    flex-direction: row;
    background-image: url("../img/background.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.5s ease-out;
    opacity: 0;
    /* Invisible by default */
}

/* Add active state like other sections */
.hero.active {
    opacity: 1;
}

.rainbow-btn {
    width: fit-content;
    height: 50px;
    padding: 8px 20px;
    border-radius: 25px;
    border: 0;
    background-color: black;
    color: white;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 0 6px 1px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    opacity: 0;
    border: 2px solid transparent;
    background-image: linear-gradient(black, black), linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-size: 100% 100%, 400% 400%;
    animation: heroButtonFadeIn 0.6s ease-out forwards 2s, rainbow-border 5s linear infinite;
    z-index: 10;
}

.hero .rainbow-btn {
    position: absolute;
    bottom: 20px;
    margin: auto;
    left: 0;
    right: 0;
}

/* Specific delay for About button if needed, or reuse animation */
#about-projects-btn {
    opacity: 0;
    animation: heroButtonFadeIn 0.6s ease-out forwards 0.5s, rainbow-border 5s linear infinite;
    /* Faster fade in for about */
    margin-top: 40px;
}

@keyframes heroButtonFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero>div {
    width: 50%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.hero>div.hero-text>div.text {
    width: 70%;
}

.hero>div.hero-text>div.text>h1 {
    font-size: 72px;
    font-weight: 700;
    color: black;
    margin: 0;
    margin-bottom: -10px;
}

.hero>div.hero-text>div.text>h2 {
    font-size: 24px;
    font-weight: 500;
    color: black;
    margin: 0;
    margin-bottom: 50px;
}

.hero>div.hero-text>div.text>div.actions {
    gap: 10px;
    display: flex;
    flex-direction: row;
}

.hero>div.hero-text>div.text>div.actions>a:first-child>button {
    background-color: black;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero>div.hero-text>div.text>div.actions>a:first-child>button {
    border: 2px solid transparent;
    background-image: linear-gradient(black, black), linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-size: 100% 100%, 400% 400%;
    animation: rainbow-border 5s linear infinite;
}

@keyframes rainbow-border {
    0% {
        background-position: 0 0, 0 0;
    }

    50% {
        background-position: 0 0, 100% 0;
    }

    100% {
        background-position: 0 0, 0 0;
    }
}

.hero>div.hero-text>div.text>div.actions>a>button {
    font-size: 18px;
    border: 2px solid black;
    height: 50px;
    padding: 0px 20px;
    background-color: rgba(0, 0, 0, 0.04);
    border-radius: 25px;
    color: black;
    cursor: pointer;
}

span#super-highlight {
    background: linear-gradient(22deg, #33db7e, #aff681);
    background-size: 100% auto;
    background-position: center;
    color: #204889;
    padding: 4px 10px;
    /* -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; */
}

@media (max-width: 768px) {
    .header {
        width: calc(100% - 20px);
        padding: 10px;
    }

    .header>div.nav,
    .header>div.actions {
        display: none;
    }

    .header>div.mobile-toggle {
        display: flex;
        justify-content: flex-end;
    }

    .header>div:first-child {
        justify-content: center;
    }

    div.hero {
        flex-direction: column;
        padding-bottom: 20px;
        overflow-y: auto;
    }

    div.hero>div.hero-image {
        order: 1;
    }

    div.hero>div.hero-text {
        order: 2;
    }

    .hero .rainbow-btn {
        position: static;
        order: 3;
        margin-top: 20px;
        transform: none;
        margin-left: auto;
        margin-right: auto;
    }

    div.hero>div {
        width: 100%;
    }

    div.hero>div.hero-text {
        height: 40%;
    }

    div.hero>div.hero-image {
        height: calc(60% - 40px);
        margin-top: 40px;
        justify-content: center;
    }

    div.hero>div.hero-text {
        justify-content: flex-start;
        padding-top: 20px;
    }

    .hero>div.hero-text>div.text {
        width: 90%;
        text-align: center;
    }

    div.hero>div.hero-text>div.text>h1 {
        font-size: 48px;
    }

    div.hero>div.hero-text>div.text>h2 {
        font-size: 20px;
    }

    .hero>div.hero-text>div.text>div.actions {
        justify-content: center;
    }

    .hero>div.hero-text>div.text>div.actions>a>button {
        font-size: 14px;
    }
}


div.about {
    width: 100%;
    min-height: 80vh;
    /* changed from height: 100% to min-height to accommodate content */
    background-color: #050505;
    /* Very dark background to match body/hero contrast */
    /* display: flex; */
    justify-content: center;
    align-items: center;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

div.about.active {
    opacity: 1;
}

.about-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.about-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    /* Above blobs, below content */
    pointer-events: none;
}

.particle {
    position: absolute;
    background: white;
    border-radius: 50%;
    top: -10px;
    animation-name: fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes fall {
    0% {
        transform: translateY(-10px) translateX(0);
    }

    100% {
        transform: translateY(100vh) translateX(20px);
    }
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: blob-float 10s infinite ease-in-out alternate;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: #33db7e;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: #aff681;
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #204889;
    top: 30%;
    left: 40%;
    opacity: 0.4;
    animation-duration: 15s;
}

@keyframes blob-float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(20px, 40px) scale(1.1);
    }
}

.about-container {
    width: 90%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 1;
}

.about-header {
    text-align: center;
}

.about-header h2 {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.about-header .subtitle {
    font-size: 16px;
    color: #888;
    max-width: 1000px;
    margin: 0 auto;
    font-weight: 300;
}

.about-content {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    width: 100%;
}

.about-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    flex: 1;
    min-width: 280px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(51, 219, 126, 0.1);
    border-color: rgba(51, 219, 126, 0.3);
}

.about-card h3 {
    font-size: 24px;
    color: white;
    margin-bottom: 15px;
    font-weight: 600;
}

.about-card p {
    font-size: 14px;
    color: #aaa;
    line-height: 1.6;
}

/* Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .about-header h2 {
        font-size: 36px;
    }

    .about-content {
        flex-direction: column;
    }
}

/* Projects Section */
div.projects {
    width: 100%;
    height: 100%;
    background-color: #050505;
    justify-content: center;
    align-items: center;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

div.projects.active {
    opacity: 1;
}

.projects-container {
    width: 90%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 1;
}

.projects-header {
    text-align: center;
}

.projects-header h2 {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.projects-header .subtitle {
    font-size: 18px;
    color: #888;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

/* Projects Content & Cards */
.projects-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 40px;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(51, 219, 126, 0.1);
    border-color: rgba(51, 219, 126, 0.3);
}

.project-image {
    flex: 1;
    height: 250px;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-image.multi-image {
    background: transparent;
    /* Remove background for multi-image to look cleaner if they don't fill */
    gap: 5px;
}

.project-image img {
    height: 100%;
    width: auto;
    object-fit: cover;
    flex: 1;
    /* Distribute space */
    border-radius: 4px;
    /* Slight roundness for individual images */
}

.img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    /* Match parent */
}

.img-placeholder::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: placeholder-shimmer 2s infinite;
}

@keyframes placeholder-shimmer {
    100% {
        left: 100%;
    }
}

.project-info {
    flex: 1.5;
    text-align: left;
}

.project-card h3 {
    font-size: 32px;
    color: white;
    margin-bottom: 15px;
    font-weight: 700;
}

.project-card p {
    font-size: 15px;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-analysis {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid #33db7e;
    padding: 15px 20px;
    border-radius: 0 10px 10px 0;
    margin-top: 20px;
}

.project-analysis h4 {
    font-size: 14px;
    text-transform: uppercase;
    color: #33db7e;
    margin-bottom: 5px;
    font-weight: 600;
    letter-spacing: 1px;
}

.project-analysis p {
    margin-bottom: 0;
    font-size: 13px;
    color: #999;
}

.project-features {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid #33db7e;
    padding: 15px 20px;
    border-radius: 0 10px 10px 0;
    margin-top: 20px;
}

.project-features h4 {
    font-size: 14px;
    text-transform: uppercase;
    color: #33db7e;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 1px;
}

.project-features ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.project-features li {
    font-size: 13px;
    color: #b5b5b5;
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
}

.project-features li::before {
    content: "-";
    position: absolute;
    left: 0;
    color: #33db7e;
}

.project-features li:last-child {
    margin-bottom: 0;
}

/* Contact Section */
div.contact {
    width: 100%;
    height: 100vh;
    background-color: #050505;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

div.contact.active {
    opacity: 1;
}

.contact-container {
    width: 90%;
    max-width: 600px;
    /* Narrower for form focus */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.contact-header {
    text-align: center;
}

.contact-header h2 {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.contact-header .subtitle {
    font-size: 16px;
    color: #888;
    max-width: 500px;
    margin: 0 auto;
    font-weight: 300;
}

.contact-email {
    margin-top: 20px;
    font-size: 18px;
    font-weight: 500;
}

.contact-email a {
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s ease;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-email a:hover {
    color: #33db7e;
    background: rgba(255, 255, 255, 0.1);
    border-color: #33db7e;
}

.contact-content {
    width: 100%;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease, background 0.3s ease;
    box-sizing: border-box;
    /* Ensure padding doesn't break width */
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #33db7e;
    background: rgba(255, 255, 255, 0.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-btn {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
    padding: 15px;
    font-size: 16px;
}

/* Contact Blobs */
.contact-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.contact-blob-1 {
    width: 500px;
    height: 500px;
    background: #ff5e00;
    top: -100px;
    left: -100px;
    opacity: 0.4;
    animation-delay: -3s;
}

.contact-blob-2 {
    width: 400px;
    height: 400px;
    background: #ff0055;
    bottom: -50px;
    right: -50px;
    opacity: 0.4;
    animation-delay: -6s;
}

.contact-blob-3 {
    width: 300px;
    height: 300px;
    background: #7a00ff;
    top: 40%;
    left: 30%;
    opacity: 0.2;
    animation-duration: 18s;
}

/* Project Blobs */
.project-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.project-blob-1 {
    width: 600px;
    height: 600px;
    background: #7a00ff;
    top: -200px;
    right: -100px;
    animation-delay: -2s;
}

.project-blob-2 {
    width: 400px;
    height: 400px;
    background: #00ffd5;
    bottom: -100px;
    left: -50px;
    animation-delay: -7s;
}

.project-blob-3 {
    width: 300px;
    height: 300px;
    background: #ff00c8;
    top: 40%;
    left: 50%;
    opacity: 0.3;
    animation-duration: 12s;
}

@media (max-width: 768px) {
    div.projects {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100dvh;
        /* Use dynamic viewport height */
        height: 100%;
        /* Fallback */
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        display: block;
        padding: 100px 20px 40px;
        box-sizing: border-box;
        z-index: 5;
    }

    div.projects:not(.active) {
        display: none !important;
    }

    div.projects.active {
        display: block !important;
        opacity: 1;
    }

    .projects-container {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        min-height: auto;
        width: 100%;
        box-sizing: border-box;
    }

    .projects-header h2 {
        font-size: 32px;
        margin-bottom: 10px;
    }

    .project-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px;
        width: 100%;
        box-sizing: border-box;
        max-width: 100%;
    }

    .project-image {
        width: 100%;
        height: 200px;
        flex: none;
    }

    .project-info {
        flex: none;
        width: 100%;
        text-align: center;
    }

    .project-analysis {
        text-align: left;
        border-left: none;
        border-top: 3px solid #33db7e;
        border-radius: 0 0 10px 10px;
        box-sizing: border-box;
        width: 100%;
    }

    .project-features {
        text-align: left;
        border-left: none;
        border-top: 3px solid #33db7e;
        border-radius: 0 0 10px 10px;
        background: rgba(255, 255, 255, 0.03);
        padding: 15px;
        margin-top: 10px;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Loading Screen */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

#loader img {
    width: 140px;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

/* Mobile Menu Styles */
div.mobile-toggle {
    display: none;
    flex: 1;
    height: 100%;
    align-items: center;
}

#mobile-menu-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.close-menu-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    z-index: 2001;
}

.mobile-links {
    display: flex;
    flex-direction: column;
    gap: 40px;
    text-align: center;
}

.mobile-links a {
    color: white;
    font-size: 32px;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, color 0.3s;
}

.mobile-menu-overlay.active .mobile-links a {
    opacity: 1;
    transform: translateY(0);
}

.mobile-links a:hover {
    color: #33db7e;
}