/* --- 1. CONFIG & VARIABLES --- */
:root {
    --bg-body: #F3F5F9;
    --surface: #FFFFFF;
    --text-primary: #111111;
    --text-secondary: #666666;
    --accent: #000000;
    --radius-xl: 40px;
    --radius-pill: 100px;
    --ease-spring: cubic-bezier(0.25, 1, 0.5, 1);
    --nav-min-width: 260px;

}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100vw;
    /* Ensure full viewport width */
}

/* Hide Scrollbar (Clean Look) */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* Firefox */
html {
    scrollbar-width: none;
}

a,
button,
.clickable,
.btn-primary,
.social-icon,
.accordion-card,
.work-item,
.glass-badge {
    cursor: pointer;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
}

/* =========================================
   2. NAVBAR
   ========================================= */
header {
    position: sticky;
    top: 24px;
    z-index: 1000;
    display: flex;
    justify-content: center;
    pointer-events: none;
    height: auto;
    min-height: 80px;
    margin-bottom: 40px;
}

nav {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-pill);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
    height: 70px;
    width: 100%;
    max-width: 1280px;
    position: relative;
    overflow: hidden;
    transition: max-width 0.6s var(--ease-spring), transform 0.3s ease;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -1px;
    position: absolute;
    top: 50%;
    left: 30px;
    transform: translateY(-50%);
    white-space: nowrap;
    z-index: 10;
    transition: all 0.6s var(--ease-spring);
}

.nav-links-wrapper {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s 0.2s;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-secondary);
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.btn-wrapper {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    transition: opacity 0.3s 0.2s;
}

.btn-wrapper .btn-primary:hover {
    transform: scale(1.05);
}

.btn-primary {
    background: var(--accent);
    color: white;
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: scale(1.02);
}

nav.scrolled {
    max-width: var(--nav-min-width);
    cursor: pointer;
    transition: max-width 0.6s 0.1s var(--ease-spring), transform 0.3s ease;
}

nav.scrolled:hover {
    transform: scale(1.05);
}

nav.scrolled .logo {
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s 0.1s var(--ease-spring);
}

nav.scrolled .nav-links-wrapper,
nav.scrolled .btn-wrapper {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease-out;
}

nav.scrolled.is-open {
    max-width: 1280px;
    cursor: default;
    transform: scale(1);
    transition: max-width 0.6s var(--ease-spring), transform 0.3s ease;
}

nav.scrolled.is-open .logo {
    left: 30px;
    transform: translateY(-50%);
    transition: all 0.6s var(--ease-spring);
}

nav.scrolled.is-open .nav-links-wrapper,
nav.scrolled.is-open .btn-wrapper {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.4s 0.2s;
}


/* =========================================
   3. HERO
   ========================================= */
.hero-container {
    position: relative;
    margin-bottom: 100px;
}

.marquee-wrapper {
    position: fixed;
    top: 200px;
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    width: 120vw;
    z-index: 0;
    opacity: 0.05;
    pointer-events: none;
    overflow: hidden;
    display: flex;
    /* justify-content: flex-start;  <-- Default, ensures text starts from the far left edge */
}

.marquee-text {
    font-size: 8rem;
    font-weight: 900;
    white-space: nowrap;
    animation: marquee 60s linear infinite;
    /* Slower for elegance */
    padding-right: 50px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    position: relative;
    z-index: 2;
}

.hero-text-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-xl);
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-headline {
    font-size: 4.5rem;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 25px;
    margin-top: 25px;
    color: #111;
}

.hero-headline i {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
}

.hero-text-card .btn-primary {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.hero-sub {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 90%;
}

.hero-image-card {
    height: 600px;
    border-radius: var(--radius-xl);
    background-image: url('https://images.unsplash.com/photo-1517694712202-14dd9538aa97?q=80&w=2070');
    background-size: cover;
    background-position: center;
    position: relative;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.15);
}

.glass-badge {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(01px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 15px 25px;
    border-radius: var(--radius-pill);
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    text-decoration: none;
    z-index: 10;
}

.glass-badge:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.3);
}


/* =========================================
   3.1 ABOUT ME (Glass Variant)
   ========================================= */
#about {
    margin-bottom: 120px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
    padding: 80px 50px;
    /* Slightly reduced horizontal padding */
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    /* No gap needed for single column */
    align-items: center;
    position: relative;
    z-index: 2;
}

.about-image-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    height: 550px;
    background: var(--surface);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.about-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-spring);
}

.about-image-card:hover img {
    transform: scale(1.05);
}

.about-tag {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.about-headline {
    font-size: 3.5rem;
    line-height: 1.1;
    letter-spacing: -2px;
    color: var(--text-primary);
    width: 100%;
}

.about-headline span {
    color: var(--text-primary);
    font-style: italic;
    font-family: 'Playfair Display', serif;
}

.about-desc {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #555;
    width: 100%;
}

.about-desc strong {
    color: var(--text-primary);
    font-weight: 600;
}

.about-features {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 22px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    cursor: default;
}

.feature-item i {
    color: #555;
}

/* =========================================
   4. EXPERTISE
   ========================================= */
#about,
#expertise,
#work,
#contact {
    scroll-margin-top: 100px;
}

.section-header {
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2.5rem;
    letter-spacing: -1px;
}

.expertise-accordion {
    display: flex;
    gap: 15px;
    height: 500px;
    margin-bottom: 100px;
}

.accordion-card {
    position: relative;
    flex: 1;
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.accordion-card:hover {
    flex: 3;
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.8;
    filter: grayscale(0%);
    transition: all 0.6s ease;
}

.accordion-card:hover .card-bg {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 30px 50px 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    transform: translateY(20px);
    transition: transform 0.5s var(--ease-spring);
}

.accordion-card:hover .card-content {
    transform: translateY(0);
}

.card-num {
    font-size: 3rem;
    font-family: 'Playfair Display', serif;
    opacity: 0.3;
    position: absolute;
    top: 20px;
    right: 30px;
    transition: 0.3s;
    color: #000;
}

.accordion-card:hover .card-num {
    opacity: 1;
    color: #fff;
}

.card-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.card-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    transform: translateY(10px);
    overflow: hidden;
    transition: all 0.5s var(--ease-spring);
}

.accordion-card:hover .card-desc {
    max-height: 100px;
    opacity: 1;
    margin-top: 10px;
    transform: translateY(0);
}


/* =========================================
   5. SELECTED WORKS
   ========================================= */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 350px;
    gap: 20px;
    margin-bottom: 100px;
}

.work-item {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.work-item.wide {
    grid-column: span 2;
}

.work-item.tall {
    grid-row: span 2;
}

/* Specific placement for Coming Soon to be 4th in HTML but 2nd visually */
.work-item.tall-fixed {
    grid-row: 1 / span 2;
    grid-column: 3;
}

.work-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.work-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 50%);
    opacity: 1;
    /* Always visible */
    transition: 0.4s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
}

.view-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%) scale(0.8);
    background: white;
    color: black;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    opacity: 0;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.work-info-text {
    color: white;
    transition: 0.4s;
}

.work-info-text h3 {
    font-size: 1.5rem;
    margin-bottom: 0;
    font-weight: 700;
    /* Title always visible like card-title */
}

.work-info-text span {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    transform: translateY(10px);
    overflow: hidden;
    display: block;
    transition: all 0.5s var(--ease-spring);
}

.work-item:hover .work-img {
    transform: scale(1.1);
}

.work-item:hover .work-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.work-item:hover .view-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.work-item:hover .work-info-text span {
    max-height: 50px;
    opacity: 1;
    margin-top: 8px;
    transform: translateY(0);
}


/* =========================================
   6. COMPACT FOOTER
   ========================================= */
footer {
    background: #111;
    color: #fff;
    padding: 50px;
    border-radius: var(--radius-xl);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 2;
}

.footer-heading {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.6;
    margin-bottom: 10px;
}

.footer-big-text {
    font-size: 13vw;
    font-weight: 800;
    line-height: 0.8;
    letter-spacing: -4px;
    color: #222;
    text-align: center;
    user-select: none;
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -45%;
    /* Use translate property to avoid conflict with transform animation */
    z-index: 0;
    white-space: nowrap;
}

.footer-cta-btn {
    background: white;
    color: black;
    padding: 16px 40px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: transform 0.2s;
    z-index: 2;
}

.footer-cta-btn:hover {
    transform: scale(1.05);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    z-index: 2;
}

.social-wrapper {
    display: flex;
    gap: 10px;
}

.social-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.social-icon:hover {
    background: white;
    color: black;
}

/* =========================================
   7. RESPONSIVE - TABLET (max-width: 900px)
   ========================================= */
@media (max-width: 900px) {

    .hero-grid,
    .about-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        gap: 40px;
    }

    .about-image-card {
        height: 400px;
    }


    .hero-headline {
        font-size: 3rem;
    }

    .marquee-text {
        font-size: 4rem;
    }

    .nav-links-wrapper {
        display: none;
    }

    .expertise-accordion {
        flex-direction: column;
        height: auto;
    }

    .accordion-card {
        height: 300px;
        flex: none;
    }

    .accordion-card:hover {
        flex: none;
        height: 300px;
    }

    .card-desc {
        opacity: 1;
        max-height: 100px;
        margin-top: 5px;
        transform: translateY(0);
    }

    .card-num {
        opacity: 1;
        color: #fff;
    }

    .card-content {
        transform: translateY(0);
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 300px;
    }

    .work-item.wide,
    .work-item.tall,
    .work-item.tall-fixed {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

    .footer-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .footer-big-text {
        font-size: 18vw;
    }

    .footer-bottom {
        flex-direction: column-reverse;
        gap: 20px;
    }
}

/* =========================================
   7.1 RESPONSIVE - MOBILE (max-width: 600px)
   ========================================= */
@media (max-width: 600px) {
    :root {
        --radius-xl: 24px;
    }

    .container {
        padding: 12px;
    }

    /* Header & Nav */
    header {
        top: 12px;
        min-height: 60px;
        margin-bottom: 24px;
    }

    nav {
        height: 56px;
        border-radius: 30px;
    }

    .logo {
        font-size: 1.1rem;
        left: 20px;
    }

    nav.scrolled .logo {
        font-size: 1rem;
    }

    .btn-wrapper {
        right: 8px;
    }

    .btn-primary {
        padding: 10px 18px;
        font-size: 0.8rem;
        gap: 6px;
    }

    /* Hero */
    .hero-container {
        margin-bottom: 60px;
    }

    .hero-grid {
        gap: 16px;
    }

    .hero-text-card,
    .hero-image-card {
        width: 100%;
        box-sizing: border-box;
    }

    .hero-text-card {
        padding: 30px 24px;
    }

    .hero-text-card div[style*="display: flex"] {
        flex-direction: column;
        gap: 10px !important;
    }

    .hero-text-card .btn-primary {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 14px 24px;
        box-sizing: border-box;
    }

    .hero-headline {
        font-size: 2.2rem;
        letter-spacing: -1px;
        margin-bottom: 16px;
    }

    .hero-sub {
        font-size: 1rem;
        margin-bottom: 24px;
        max-width: 100%;
    }

    .hero-image-card {
        height: 350px;
    }

    .glass-badge {
        padding: 12px 18px;
        font-size: 0.85rem;
        bottom: 16px;
        right: 16px;
    }

    .marquee-text {
        font-size: 2.5rem;
    }

    /* About Me Mobile */
    #about {
        margin-bottom: 80px;
    }

    .about-image-card {
        height: 300px;
    }

    .about-headline {
        font-size: 2.2rem !important;
    }

    .about-desc {
        font-size: 1rem;
        max-width: 100%;
    }

    .about-features {
        flex-direction: column;
        gap: 15px;
    }

    /* Section Headers */
    .section-header {
        margin-bottom: 24px;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    /* Expertise Accordion */
    .expertise-accordion {
        gap: 10px;
        margin-bottom: 60px;
    }

    .accordion-card {
        height: 250px;
        border-radius: var(--radius-xl);
    }

    .accordion-card:hover {
        height: 250px;
    }

    .card-content {
        padding: 20px;
    }

    .card-title {
        font-size: 1.4rem;
    }

    .card-desc {
        font-size: 0.85rem;
    }

    .card-num {
        font-size: 2rem;
        top: 12px;
        right: 16px;
    }

    /* Works Grid */
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        grid-auto-rows: 250px;
        margin-bottom: 60px;
    }

    .work-item.wide,
    .work-item.tall,
    .work-item.tall-fixed {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

    .work-overlay {
        padding: 20px;
        opacity: 1;
        /* Always visible on mobile */
        background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    }

    .view-btn {
        padding: 12px 20px;
        font-size: 0.85rem;
    }

    .work-info-text {
        transform: translateY(0);
        /* No hover needed */
    }

    .work-info-text h3 {
        font-size: 1.2rem;
    }

    .work-info-text span {
        opacity: 1;
        max-height: 50px;
        margin-top: 5px;
        transform: translateY(0);
    }

    /* Footer */
    footer {
        padding: 30px 24px;
        gap: 30px;
        border-radius: var(--radius-xl);
    }

    .footer-heading {
        font-size: 0.85rem;
    }

    .footer-top {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
    }

    .footer-top h2 {
        font-size: 1.8rem !important;
    }

    .footer-cta-btn {
        padding: 16px 28px;
        font-size: 1rem;
        width: 100%;
        text-align: center;
        display: block;
        box-sizing: border-box;
    }

    .footer-big-text {
        font-size: 22vw;
    }

    .footer-bottom {
        padding-top: 20px;
        text-align: center;
    }

    .social-wrapper {
        justify-content: center;
    }

    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* =========================================
   7.2 RESPONSIVE - SMALL MOBILE (max-width: 400px)
   ========================================= */
@media (max-width: 400px) {
    .hero-headline {
        font-size: 1.8rem;
    }

    .hero-sub {
        font-size: 0.9rem;
    }

    .hero-text-card {
        padding: 24px 18px;
    }

    .hero-image-card {
        height: 280px;
    }

    .btn-primary {
        padding: 8px 14px;
        font-size: 0.75rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .bento-grid {
        grid-auto-rows: 180px;
    }

    .footer-top h2 {
        font-size: 1.5rem !important;
    }

    .footer-cta-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* =========================================
   8. ANIMATIONS
   ========================================= */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* =========================================
   6. ANIMATIONS (Scroll Reveal)
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   7. PRELOADER
   ========================================= */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Initial: Full Screen */
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    transition: clip-path 1s cubic-bezier(0.7, 0, 0.3, 1);
}

#preloader.loaded {
    /* Final: Diagonal Wipe '\' Shape */
    /* Top moves faster to the left than Bottom, creating a '\' edge */
    clip-path: polygon(-200% 0, -200% 0, -50% 100%, -50% 100%);
    pointer-events: none;
}

.loader-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #000;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}