@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@700;800;900&display=swap');

:root {
    --bg-color: #0d0d0d;
    --text-primary: #ffffff;
    --text-secondary: #8c8c8c;
    --accent-color: #ffffff;
    --border-color: rgba(255, 255, 255, 0.15);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-fast: 0.2s cubic-bezier(0.23, 1, 0.32, 1);
    --transition-slow: 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Hard reset for links */
a,
a:visited,
a:hover,
a:active,
a:focus {
    color: inherit !important;
    text-decoration: none !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.4;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Grain Overlay */
body::before {
    content: "";
    position: fixed;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background-image: url("https://grains.imgix.net/grain.png?auto=format&fit=max&w=1000");
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
    animation: grain-animation 8s steps(10) infinite;
}

@keyframes grain-animation {

    0%,
    100% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-5%, -10%);
    }

    20% {
        transform: translate(-15%, 5%);
    }

    30% {
        transform: translate(7%, -25%);
    }

    40% {
        transform: translate(-5%, 25%);
    }

    50% {
        transform: translate(-15%, 10%);
    }

    60% {
        transform: translate(15%, 0%);
    }

    70% {
        transform: translate(0%, 15%);
    }

    80% {
        transform: translate(3%, 35%);
    }

    90% {
        transform: translate(-10%, 10%);
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
}

/* Header */
.header {
    width: 100%;
    z-index: 1000;
    transition: var(--transition-fast);
    padding: 1.5rem 0;
}

.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(13, 13, 13, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    position: relative;
}

.nav-column {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.nav-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    color: var(--text-secondary);
}

.nav-content {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    line-height: 1.2;
}

.nav-center {
    text-align: center;
    justify-content: center;
    align-items: center;
}

.nav-logo {
    display: flex;
    flex-direction: column;
    line-height: 0.85;
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

.logo-first {
    font-weight: 800;
    font-size: 1.2rem;
}

.logo-last {
    font-weight: 300;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.nav-right {
    align-items: flex-end;
    text-align: right;
}

.status-live {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-live .dot {
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88;
}

/* Hero Section */
.hero {
    padding-top: 15rem;
    padding-bottom: 5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 15vw, 13rem);
    line-height: 0.8;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 4rem;
    width: 100%;
    letter-spacing: -0.04em;
    display: block;
}

.hero-subtitle {
    font-size: 1.8rem;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto 4rem;
    text-transform: uppercase;
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
    color: var(--text-secondary);
    font-weight: 700;
    line-height: 1.2;
}

.hero-subtitle strong {
    color: var(--text-primary);
}

.footer-subtitle {
    font-size: 1.4rem;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto 3rem;
    text-transform: uppercase;
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
    color: var(--text-secondary);
    font-weight: 700;
    line-height: 1.3;
}

.footer-subtitle strong {
    color: var(--text-primary);
}

/* Tech Stripe Enhanced */
.tech-stripe {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
    margin-bottom: 6rem;
    padding: 1.2rem 3rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    animation: techStripeAppear 1s ease-out;
}

/* Subtle Shimmer Effect */
.tech-stripe::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent);
    animation: shimmer 8s infinite linear;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    opacity: 0.6;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    filter: grayscale(0.2);
    cursor: default;
}

.tech-item:hover {
    opacity: 1;
    filter: grayscale(0);
    transform: translateY(-3px);
}

.tech-item img {
    width: 24px;
    height: 24px;
    transition: all 0.4s ease;
}

.tech-item:hover img {
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.3));
    transform: scale(1.1);
}

.tech-item span {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.tech-item:hover span {
    color: var(--text-primary);
}

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

    20% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

@keyframes techStripeAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.hero-intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border-top: 1px solid var(--border-color);
    padding-top: 4rem;
    width: 100%;
    position: relative;
    gap: 0;
}

.intro-item {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: 0 3rem;
    position: relative;
    transition: all 0.5s var(--transition-slow);
}

.intro-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: linear-gradient(to bottom,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
}

.intro-item:first-child {
    padding-left: 0;
}

.intro-item:last-child {
    padding-right: 0;
}

.intro-text {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    opacity: 0.7;
    transition: opacity 0.4s ease;
}

.intro-item:hover .intro-text {
    opacity: 1;
}

.intro-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    color: var(--text-primary);
}

.intro-text p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.intro-text strong {
    color: var(--text-primary);
}

.intro-contact {
    display: flex;
    flex-direction: column;
}

.contact-link {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary) !important;
    text-decoration: none;
    margin-bottom: 1rem;
    transition: var(--transition-fast);
    position: relative;
    width: fit-content;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding-bottom: 2px;
}

.contact-link:hover {
    border-color: var(--text-primary) !important;
    padding-left: 5px;
}

.availability-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-top: 0.5rem;
}


.availability-tag .dot {
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88;
}

/* Socials Section */
.socials-row {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 8rem 0;
}

.footer .socials-row {
    margin: 4rem 0 6rem;
}


/* Featured Section */
.featured-projects {
    padding-top: 10rem;
    padding-bottom: 10rem;
}

.section-title-huge {
    font-size: clamp(3rem, 10vw, 8rem);
    font-family: var(--font-heading);
    text-transform: uppercase;
    margin-bottom: 2rem;
    /* Reduced to bring subtitle closer */
    border-top: 1px solid var(--border-color);
    padding-top: 6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-align: center;
}

.section-subtitle-small {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 6rem;
    /* Increased to give cards more breathing room */
    opacity: 0.7;
    text-align: center;
    display: block;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.3);
}

.project-number {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: block;
}

.project-card .card-title {
    font-size: 2rem;
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.project-card .card-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.btn-view-full {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary) !important;
    margin-top: auto;
    transition: var(--transition-fast);
}

.btn-view-full:hover {
    gap: 1.2rem;
}

.see-more-row {
    display: flex;
    justify-content: center;
    margin-top: 6rem;
}

a.btn-pill,
a.btn-see-more {
    padding: 1rem 3rem;
    background: var(--text-primary);
    color: #000 !important;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: var(--transition-fast);
}

.btn-pill:hover,
.btn-see-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

/* Badge & Logo Transparency */
.badge img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    /* mix-blend-mode removed to prioritize SVG alpha filters */
}

.badge img.logo-fix {
    /* For logos with WHITE backgrounds:
       1. Invert to make the white background black
       2. Use high-precision SVG filter to make black transparent 
       3. Hue-rotate back to preserve original logo colors */
    filter: invert(1) hue-rotate(180deg) contrast(2) brightness(1.1) url(#perfect-remove-black);
}

.badge img.logo-black-bg {
    /* For logos that already have a BLACK background */
    filter: contrast(1.5) url(#perfect-remove-black);
}

.badge img.logo-cobasi {
    filter: url(#chroma-key-teal);
}

/* Achievement Section & Focused Carousel */
.achievement-section {
    padding-top: 10rem;
    padding-bottom: 5rem;
    overflow: hidden;
    /* Clips the track at section level */
}

.carousel-viewport {
    width: 100%;
    position: relative;
    padding: 2rem 0;
    overflow: visible;
    /* Allows neighbors to be seen */
    display: flex;
    justify-content: flex-start;
    /* Start from left, JS will handle offset */
}

.carousel-track {
    display: flex;
    gap: 4rem;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    align-items: center;
    width: max-content;
    will-change: transform;
}

.achievement-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 32px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 30vw;
    min-width: 450px;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    opacity: 0.3;
    /* Increased for better peek */
    transform: scale(0.9);
    filter: blur(4px) grayscale(1);
    pointer-events: none;
}

.achievement-card.active {
    opacity: 1;
    transform: scale(1);
    border-color: rgba(255, 255, 255, 0.2);
    filter: blur(0) grayscale(0);
    pointer-events: all;
    background: rgba(255, 255, 255, 0.04);
}

/* Pagination Dots with Liquid Animation */
.carousel-pagination {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 5rem;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    /* Elastic/Liquid ease */
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dot.active {
    width: 40px;
    background: #ffffff;
    /* Explicit white for active state */
    border-radius: 20px;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.4),
        0 0 10px rgba(255, 255, 255, 0.2);
    animation: liquidRipple 3s infinite ease-in-out;
}

@keyframes liquidRipple {

    0%,
    100% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(0.96);
        filter: brightness(1.2);
    }
}

.dot:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.2);
}

.achievement-card:hover {
    background: rgba(255, 255, 255, 0.04);
}

.achievement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    mix-blend-mode: screen;
    /* Effectively makes black parts transparent */
}

.badge img.logo-fix {
    /* For logos with white backgrounds:
       1. Invert to make the white background black
       2. Use hue-rotate to fix the colors
       3. Use contrast/brightness to ensure the background is pure black (#000)
    */
    filter: invert(1) hue-rotate(180deg) contrast(1.5) brightness(1.1);
}

/* Credentials Section */
.credentials-section {
    padding-top: 10rem;
    padding-bottom: 5rem;
}

.credentials-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 6rem;
    width: 100%;
}

.credential-column {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.credential-item {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.credential-year {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.credential-item h3 {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    text-transform: uppercase;
}

.credential-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.cert-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.cert-list li {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.cert-list .dot {
    width: 8px;
    height: 8px;
    background: var(--text-primary);
    border-radius: 50%;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.cert-content strong {
    display: block;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.cert-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.cert-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-cert {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    background: transparent;
}

.btn-cert:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.language-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.language-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lang-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.lang-name {
    font-size: 1.1rem;
    font-weight: 800;
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.lang-level {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    width: 0;
    height: 100%;
    background: #ffffff;
    border-radius: 10px;
    opacity: 0.6;
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0);
}

.progress.filled {
    opacity: 0.95;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.language-item:hover .progress {
    opacity: 1;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    background: var(--accent-color);
}

.badge-outline {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.achievement-card h3 {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.achievement-card p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.nav-arrows {
    display: flex;
    justify-content: flex-end;
    gap: 2rem;
    margin-top: 4rem;
    font-size: 1.5rem;
}

.nav-arrows span {
    opacity: 0.2;
    cursor: pointer;
    transition: var(--transition-fast);
}

.nav-arrows span:hover {
    opacity: 1;
    color: var(--text-primary);
}

/* Footer */
.footer {
    padding: 15rem 0 5rem;
    text-align: center;
}

.get-in-touch {
    font-size: clamp(5rem, 18vw, 15rem);
    font-family: var(--font-heading);
    text-transform: uppercase;
    line-height: 0.8;
    margin-bottom: 6rem;
    font-weight: 900;
    letter-spacing: -0.06em;
    color: var(--text-primary);
}

.footer-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 8rem;
}

.footer-logo {
    display: flex;
    line-height: 1;
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

.footer-logo .logo-first {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.footer-logo .logo-last {
    font-weight: 300;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.footer-links-group {
    display: flex;
    gap: 3rem;
}

.footer-links-group a {
    color: var(--text-secondary) !important;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    transition: var(--transition-fast);
}

.footer-links-group a:hover {
    color: var(--text-primary) !important;
}

/* Global Reveal System */
.reveal {
    opacity: 0;
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal-up {
    transform: translateY(40px);
}

.reveal-down {
    transform: translateY(-40px);
}

.reveal-left {
    transform: translateX(40px);
}

.reveal-right {
    transform: translateX(-40px);
}

.reveal.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Delay Utilities for Staggered Lists */
.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

/* Experience Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-container {
    background: rgba(10, 10, 10, 0.85);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow-y: auto;
    backdrop-filter: blur(30px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 3rem;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: var(--transition-fast);
    z-index: 2001;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.modal-header .badge {
    margin-bottom: 1.5rem;
    width: fit-content;
}

.achievement-card h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0px !important;
    color: var(--text-primary);
    text-transform: uppercase;
    line-height: 0.9;
}

.achievement-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: -0.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-dot {
    opacity: 0.3;
    font-size: 0.5rem;
}

.achievement-card p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    text-transform: uppercase;
}

.modal-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.modal-details {
    color: var(--text-secondary);
    line-height: 1.8;
}

.modal-details ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.modal-details li {
    padding-left: 2rem;
    position: relative;
}

.modal-details li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--text-primary);
    opacity: 0.5;
}

.modal-details strong {
    color: var(--text-primary);
}

/* Modal Scrollbar */
.modal-container::-webkit-scrollbar {
    width: 6px;
}

.modal-container::-webkit-scrollbar-track {
    background: transparent;
}

.modal-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.modal-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Case Study Modal (Wide Document Style) */
#caseStudyOverlay {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
}

.case-study-container {
    background: #050505;
    width: 95%;
    max-width: 1200px;
    height: 90vh;
    border-radius: 48px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    /* Let internal layout handle padding */
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 1);
    transform: scale(0.9) translateY(40px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

#caseStudyOverlay.active .case-study-container {
    transform: scale(1) translateY(0);
}

.case-study-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 0;
    height: 100%;
}

.case-study-sidebar {
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    height: 100%;
    overflow-y: auto;
}

.case-study-main {
    padding: 4rem 5rem;
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    overflow-y: auto;
}

/* Custom Scrollbars */
.case-study-main::-webkit-scrollbar,
.case-study-sidebar::-webkit-scrollbar {
    width: 4px;
}

.case-study-main::-webkit-scrollbar-thumb,
.case-study-sidebar::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.15);
    border-radius: 10px;
}

#caseStudyTitle {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.case-study-section {
    position: relative;
    padding-bottom: 1rem;
}

.case-study-section h4 {
    font-size: 0.75rem;
    color: #3b82f6;
    letter-spacing: 0.3em;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-transform: uppercase;
}

.case-study-section h4::after {
    content: '';
    height: 1px;
    flex: 1;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.2), transparent);
}

.case-study-section p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 95%;
}

/* KPI Card Treatment */
.kpi-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(59, 130, 246, 0.01) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 24px;
    padding: 2.5rem;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.kpi-card h4 {
    color: #60a5fa;
}

.kpi-card p {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 500;
}

.sidebar-item .nav-label {
    display: block;
    margin-bottom: 1.2rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.tag {
    background: rgba(59, 130, 246, 0.08);
    color: #93c5fd;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.15);
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

#caseStudyFocus {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

@media (max-width: 1024px) {
    .container {
        padding: 0 4rem;
    }

    .case-study-layout {
        grid-template-columns: 1fr;
    }

    .case-study-sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 2rem;
    }

    .case-study-main {
        padding: 2rem;
    }

    #caseStudyTitle {
        font-size: 2.8rem;
    }

    .section-title-huge {
        font-size: 4rem;
        padding-top: 4rem;
    }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        width: 100vw;
    }

    .container {
        padding: 0 1.5rem;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .header {
        padding: 1rem 0;
    }

    .nav-grid {
        display: flex;
        justify-content: center;
    }

    .nav-left,
    .nav-right {
        display: none;
    }

    /* Hero Section - Zen Scale */
    .hero {
        padding-top: 10rem;
        padding-bottom: 4rem;
    }

    .hero-title {
        font-size: 2.4rem !important;
        /* Force override of clamp */
        margin-bottom: 1.5rem;
        letter-spacing: -0.02em;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 3rem;
        color: var(--text-secondary);
        font-weight: 500;
    }

    /* Tech Stripe Mobile */
    .tech-stripe {
        padding: 0.8rem 1.2rem;
        gap: 1.2rem;
        margin-bottom: 4rem;
        flex-wrap: wrap;
        border-radius: 20px;
    }

    .tech-item span {
        font-size: 0.6rem;
    }

    .tech-item img {
        width: 18px;
        height: 18px;
    }

    /* Section Titles - Zen Scale */
    .section-title-huge {
        font-size: 1.8rem !important;
        padding-top: 4rem;
        margin-bottom: 0.8rem;
        letter-spacing: -0.01em;
    }

    .section-subtitle-small {
        font-size: 0.7rem;
        margin-bottom: 3rem;
        letter-spacing: 0.15em;
    }

    /* Grids */
    .projects-grid,
    .credentials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        padding: 2rem 1.5rem;
    }

    .project-card .card-title {
        font-size: 1.4rem;
    }

    /* Carousel Adjustment */
    .achievement-card {
        width: 85vw;
        min-width: 280px;
        padding: 2rem 1.5rem;
    }

    .achievement-card h3 {
        font-size: 1.6rem !important;
    }

    /* Contact Section - Zen Scale */
    .get-in-touch {
        font-size: 2.2rem !important;
        margin-bottom: 2rem;
        letter-spacing: -0.02em;
    }

    .footer-subtitle {
        font-size: 1.1rem;
        margin-bottom: 3rem;
    }

    .btn-pill {
        padding: 0.8rem 2rem;
        font-size: 0.8rem;
    }

    .footer-nav {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
        text-align: center;
    }

    .footer-links-group {
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 2.2rem !important;
    }

    .get-in-touch {
        font-size: 2rem !important;
    }

    .case-study-container {
        border-radius: 24px;
        height: 95vh;
    }

    .case-study-main {
        padding: 2rem 1rem;
        gap: 2rem;
    }

    #caseStudyTitle {
        font-size: 1.8rem;
    }
}