@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

/* Root Variables */
:root {
    --bg-color: #f7f9fc;
    --text-main: #1a1a2e;
    --text-muted: #6b7280;
    --accent-color: #10b981;
    --accent-hover: #059669;
    --blob-pink: rgba(255, 182, 193, 0.4);
    --blob-cyan: rgba(167, 243, 208, 0.4);
    --blob-blue: rgba(191, 219, 254, 0.4);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* Slightly smaller base font (14.5px instead of 16px) for a professional, refined look.
       This will gracefully scale down all rem-based sizes (fonts, buttons, padding) by ~10% */
    font-size: 14.5px;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.8;
    animation: drift 20s infinite alternate ease-in-out;
}

.blob-pink {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--blob-pink);
}

.blob-blue {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--blob-blue);
    animation-delay: -5s;
}

.blob-cyan {
    top: 30%;
    left: 40%;
    width: 400px;
    height: 400px;
    background: var(--blob-cyan);
    animation-delay: -10s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.3rem;
}

.logo-icon {
    background: var(--text-main);
    color: white;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.9rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    font-weight: 500;
    font-size: 0.85rem;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--text-main);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding-top: 130px;
    /* Space for navbar */
}

/* Acknowledgments Banner */
.acknowledgments-banner {
    position: relative;
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    /* Slimmer padding */
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    z-index: 10;
}

.scrolling-logos {
    width: 100%;
    overflow: hidden;
}

.logo-track {
    display: flex;
    width: calc(250px * 10);
    animation: scroll 20s linear infinite;
}

.logo-item {
    width: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-item img {
    max-height: 35px;
    /* Shrunk banner logos */
    max-width: 130px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.5);
    transition: all 0.3s ease;
}

.logo-item img:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

.hero-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: row;
    /* Stack horizontally */
    align-items: center;
    justify-content: center;
    gap: 4rem;
    /* Add spacing between portrait and text */
    margin-top: 20px;
    padding-left: 6rem;
    /* Pushes content right so it clears the social icons */
    padding-right: 2rem;
}

.social-sidebar {
    position: absolute;
    left: 2%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 50;
    /* Ensure this is on top of portrait container */
}

.social-sidebar a {
    color: var(--text-main);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-sidebar a:hover {
    color: var(--accent-color);
    transform: scale(1.2);
}

.hero-text {
    text-align: center;
    /* Centers name and role subtitle */
    z-index: 15;
    flex: 1;
    /* allow it to take remaining width */
}

.hero-text h1 {
    font-size: 4.5rem;
    /* Can be slightly larger because of horizontal layout */
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 0.2rem;
    color: var(--text-main);
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.role-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 2px;
}

/* Updated Portrait Container */
.portrait-container {
    position: relative;
    width: 380px;
    /* Tweaked to be slightly smaller and tighter */
    height: 380px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Orbital Animation Styles */
.tools-orbit {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: orbit-rotate 35s linear infinite;
    z-index: 20;
    pointer-events: none;
    /* Allows clicking through space */
}

@keyframes orbit-rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.tool-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    /* Reverse rotation so icons stay upright */
    animation: counter-rotate 35s linear infinite;
    transform-origin: center;
    pointer-events: auto;
    /* Re-enable pointer events on the icons themselves */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-icon:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    z-index: 30;
}

@keyframes counter-rotate {
    0% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.tool-icon img {
    width: 55%;
    object-fit: contain;
}

/* Polar constraints to naturally place them around the circle edges */
.icon-1 {
    top: -15px;
    left: 50%;
    margin-left: -30px;
}

.icon-2 {
    right: 0px;
    top: 15%;
}

.icon-3 {
    right: 10%;
    bottom: -5px;
}

.icon-4 {
    left: 10%;
    bottom: -5px;
}

.icon-5 {
    left: 0px;
    top: 15%;
}

/* The actual image container (the photo inside the shape) */
.image-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    overflow: hidden;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    animation: morph 8s ease-in-out infinite alternate;
}

@keyframes morph {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    50% {
        border-radius: 60% 40% 30% 70% / 50% 60% 40% 50%;
    }

    100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }
}

.image-wrapper img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.text-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.text-logo:hover {
    color: var(--text-main);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-250px * 5));
    }
}

/* Layout Containers & Typography */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 5%;
}

.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--text-main);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* About Section */
.about-section {
    position: relative;
    background: white;
    box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.02);
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.about-text strong {
    color: var(--text-main);
    font-weight: 600;
}

.skills-card {
    background: var(--bg-color);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.skills-card h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skills-tags span {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.skills-tags span:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

/* Projects Section */
.projects-section {
    background: transparent;
    position: relative;
    z-index: 10;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--blob-blue));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-date {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--text-main);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 1.5rem;
}

.project-card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.project-sub {
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.project-card p:not(.project-sub) {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 1.5rem;
}

.project-tech span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.05);
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
}

/* Timeline & Experience */
.experience-list {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid rgba(0, 0, 0, 0.1);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: -2.6rem;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.timeline-date {
    display: inline-block;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.timeline-item h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.timeline-company {
    display: block;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-item ul {
    list-style-type: none;
}

.timeline-item ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.timeline-item ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Certifications */
.cert-grid {
    display: grid;
    gap: 1.5rem;
}

.cert-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
}

.cert-card:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-color: var(--accent-color);
}

.cert-card i {
    font-size: 2rem;
    color: var(--accent-color);
}

.cert-card h4 {
    font-size: 1.1rem;
    color: var(--text-main);
}

.cert-card span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Achievements & Gallery Section */
.achievements-section {
    background: white;
    position: relative;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
}

.gallery-wrapper {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    padding: 2rem 0;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gallery-track {
    display: flex;
    width: max-content;
    gap: 1.5rem;
    animation: marquee 35s linear infinite;
}

.gallery-track.reverse {
    animation: marquee-reverse 35s linear infinite;
}

.gallery-track:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 0.75rem));
    }
}

@keyframes marquee-reverse {
    0% {
        transform: translateX(calc(-50% - 0.75rem));
    }

    100% {
        transform: translateX(0);
    }
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 300px;
    width: 450px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transform: perspective(800px) rotateY(0deg);
    transition: all 0.5s ease;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(80%);
    transition: all 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(26, 26, 46, 0.9), transparent);
    color: white;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.4s ease;
}

.gallery-item:hover {
    transform: perspective(800px) translateZ(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

.gallery-overlay span {
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
}

/* Content Creator Section */
.content-section {
    position: relative;
    z-index: 10;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: -1rem;
    margin-bottom: 3rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.content-column h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}

.content-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 0 15px 15px 15px;
    /* Softer radius matching rectangular slim shape */
    padding: 1rem;
    position: relative;
    overflow: visible;
    /* Show the top folder tab */
    transition: all 0.4s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-card::before {
    content: '';
    position: absolute;
    top: -1.75rem;
    left: -1px;
    width: 30%;
    max-width: 120px;
    height: 1.75rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    transition: all 0.4s ease;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
    border-color: var(--accent-color);
}

.content-card:hover::before {
    border-color: var(--accent-color);
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    /* Standard Video Rectangle */
    border-radius: 15px;
    overflow: hidden;
}

.article-card .content-info {
    padding: 0.5rem;
    /* Clean padding since there's no thumbnail above it */
}

.video-thumbnail img,
.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.content-card:hover img {
    transform: scale(1.05);
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(255, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.content-card:hover .play-btn {
    transform: translate(-50%, -50%) scale(1.1);
}

.content-info {
    padding: 1.5rem 0.5rem 0.5rem;
}

.content-info h4 {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.content-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: gap 0.3s ease;
}

.content-card:hover .content-link {
    gap: 10px;
}

/* Contact CTA & Footer */
.text-center {
    text-align: center;
}

.contact-cta {
    padding: 8rem 0;
    background: linear-gradient(to bottom, transparent, rgba(16, 185, 129, 0.05));
}

.contact-cta h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.contact-cta p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

footer {
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
}

.footer-content {
    padding: 0 5%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .hero-text {
        text-align: center;
    }

    .hero-text h1 {
        font-size: 3.5rem;
    }

    .hero-content {
        flex-direction: column;
        gap: 2rem;
    }

    .portrait-container {
        width: 320px;
        height: 320px;
    }

    .image-wrapper {
        width: 300px;
        height: 300px;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .portrait-container {
        width: 300px;
        height: 300px;
    }

    .image-wrapper {
        width: 220px;
        height: 220px;
    }

    .social-sidebar {
        position: static;
        flex-direction: row;
        transform: none;
        margin-bottom: 2rem;
        justify-content: center;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .contact-cta h2 {
        font-size: 2rem;
    }

    .blob {
        opacity: 0.5;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}