@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700;800&family=Syne:wght@400;500;600;700;800&display=swap');

* {
    cursor: auto;
}

body {
    font-family: 'Manrope', sans-serif;
    background: #010101;
    color: #f5f5f5;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-syne {
    font-family: 'Syne', sans-serif;
}

.font-playfair {
    font-family: 'Syne', sans-serif;
    /* Fallback/Replacement */
}

/* Preloader */
.preloader {
    position: fixed;
    inset: 0;
    background: #0c0c0c;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(0);
    transition: transform 1.1s cubic-bezier(0.76, 0, 0.24, 1);
    overflow: hidden;
}

.preloader.slide-up {
    transform: translateY(-100%);
}

/* Top-left name */
.preloader-brand {
    position: absolute;
    top: 44px;
    left: 52px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    opacity: 0;
    animation: plFadeIn 0.8s ease 0.2s forwards;
}

/* Giant counter */
.preloader-count {
    font-family: 'Inter', sans-serif;
    font-size: clamp(100px, 18vw, 220px);
    font-weight: 200;
    letter-spacing: -0.04em;
    color: #ffffff;
    line-height: 1;
    opacity: 0;
    animation: plFadeIn 0.6s ease 0.1s forwards;
    user-select: none;
}

/* Bottom row: status label + % sign */
.preloader-bottom {
    position: absolute;
    bottom: 48px;
    left: 52px;
    right: 52px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    opacity: 0;
    animation: plFadeIn 0.8s ease 0.3s forwards;
}

.preloader-status {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

.preloader-percent {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.25);
}

/* Thin progress line at very bottom */
.preloader-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.preloader-fill {
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.6);
    transition: width 0.05s linear;
}

@keyframes plFadeIn {
    to { opacity: 1; }
}


/* Accent Color */
.text-accent {
    color: #e8c547;
}

.bg-accent {
    background: #e8c547;
}

.border-accent {
    border-color: #e8c547;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #e8c547 0%, #fff 50%, #e8c547 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientMove 5s linear infinite;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

/* Fade In Animation (Legacy - kept for compatibility) */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger delay */
.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;
}

.delay-6 {
    transition-delay: 0.6s;
}

/* Project Card Redesign */
.project-card {
    background: #161616;
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    border: 1px solid #222;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 420px;
}

.project-card:hover {
    border-color: #333;
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.project-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.project-title {
    font-family: 'Manrope', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.project-desc {
    color: #9ca3af;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 90%;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-tags {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.project-tags span {
    background: #222;
    color: #e8c547;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(232, 197, 71, 0.1);
}

.project-actions {
    margin-top: auto;
    position: relative;
    z-index: 10;
}

.github-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: #e8c547;
    color: #0c0c0c;
    padding: 0.8rem 1.6rem;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.github-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(232, 197, 71, 0.4);
    background: #f0cd50;
}

.project-image-container {
    position: absolute;
    bottom: -10%;
    right: -5%;
    width: 65%;
    height: 55%;
    z-index: 1;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(20px);
    opacity: 0.8;
    mask-image: linear-gradient(to top, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top, black 80%, transparent 100%);
}

.project-card:hover .project-image-container {
    transform: scale(1.05) translateY(-10px);
    opacity: 1;
    z-index: 5;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    border-radius: 12px;
    box-shadow: -20px -20px 40px rgba(0, 0, 0, 0.5);
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

.project-card:hover .project-image {
    filter: grayscale(0%);
}

/* Skill Tag */
.skill-tag {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.skill-tag::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #e8c547;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.skill-tag:hover::before {
    transform: translateY(0);
}

.skill-tag span {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.skill-tag:hover span {
    color: #0c0c0c;
}

/* Nav Link */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #e8c547;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Magnetic Effect */
.magnetic {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Social Link */
.social-link {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: #e8c547;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.social-link:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* Glow Effect */
.glow {
    text-shadow: 0 0 40px rgba(232, 197, 71, 0.3);
}

/* Smooth Scroll */
html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* Letter Spacing Animate */
.letter-space-animate {
    letter-spacing: 0.05em;
    transition: letter-spacing 0.4s ease;
}

.letter-space-animate:hover {
    letter-spacing: 0.15em;
}

/* Blob Background */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: blobFloat 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, -50px) scale(1.1);
    }
}

/* Line Decoration */
.line-decoration {
    position: relative;
}

.line-decoration::before {
    content: '';
    position: absolute;
    left: -60px;
    top: 50%;
    width: 40px;
    height: 1px;
    background: #e8c547;
}

/* Ripple Effect */
.ripple-btn {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Selection Style */
::selection {
    background: #e8c547;
    color: #0c0c0c;
}


/* Glitch Effect */
.glitch-wrapper {
    position: relative;
    display: inline-block;
}

.glitch {
    position: relative;
    color: #f5f5f5;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0c0c0c;
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip-path: inset(44% 0 61% 0);
    animation: glitch-anim-1 1.5s infinite linear alternate-reverse;
    display: none;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip-path: inset(58% 0 43% 0);
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
    display: none;
}

.glitch-wrapper:hover .glitch::before,
.glitch-wrapper:hover .glitch::after {
    display: block;
}

@keyframes glitch-anim-1 {
    0% {
        clip-path: inset(20% 0 80% 0);
    }

    20% {
        clip-path: inset(60% 0 10% 0);
    }

    40% {
        clip-path: inset(40% 0 50% 0);
    }

    60% {
        clip-path: inset(80% 0 5% 0);
    }

    80% {
        clip-path: inset(10% 0 70% 0);
    }

    100% {
        clip-path: inset(30% 0 20% 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: inset(10% 0 60% 0);
    }

    20% {
        clip-path: inset(30% 0 20% 0);
    }

    40% {
        clip-path: inset(70% 0 10% 0);
    }

    60% {
        clip-path: inset(20% 0 50% 0);
    }

    80% {
        clip-path: inset(60% 0 30% 0);
    }

    100% {
        clip-path: inset(5% 0 80% 0);
    }
}

/* Image Reveal Animation */
.reveal-image {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1s cubic-bezier(0.77, 0, 0.175, 1), transform 1s cubic-bezier(0.77, 0, 0.175, 1);
    transform: scale(1.1);
}

.reveal-image.visible {
    clip-path: inset(0 0 0 0);
    transform: scale(1);
}

/* Staggered Text Animation */
.split-text-line {
    overflow: hidden;
}

.split-text-word {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.split-text-word.visible {
    transform: translateY(0);
}

/* Live Demo Button */
.live-demo-btn:hover {
    background: #e8c547 !important;
    color: #0c0c0c !important;
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(232, 197, 71, 0.4);
}


/* ── About Section ──────────────────────────────────────── */
.about-section {
    background: #010101;
    height: 450vh;
    position: relative;
    z-index: 2;
}

.about-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 52px;
}

.about-content {
    max-width: 52%;
}

.about-quote {
    font-size: clamp(22px, 3.6vw, 60px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin: 0;
}

.about-word {
    display: inline;
    color: rgba(255, 255, 255, 0.15);
    will-change: color;
}

.about-me-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 14px 28px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    margin-top: 40px;
    transition: color 0.3s ease, border-color 0.3s ease, gap 0.3s ease;
}

.about-me-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    gap: 16px;
}

.about-me-btn-arrow {
    transition: transform 0.3s ease;
}

.about-me-btn:hover .about-me-btn-arrow {
    transform: translateX(3px);
}

@media (max-width: 768px) {
    .about-sticky { padding: 0 24px; }
    .about-content { max-width: 100%; }
}

/* ── Mobile 480px ──────────────────────────────────────── */
@media (max-width: 480px) {
    /* Nav */
    .main-nav { padding: 16px 20px; }
    .menu-btn { font-size: 13px; gap: 8px; }

    /* Menu overlay — full width on phones */
    .menu-overlay { width: 100%; padding: 20px 8%; }
    .overlay-nav { margin-top: 32px; }

    /* Hero */
    .hero-section { padding: 0 5%; }
    .hero-heading { white-space: normal; font-size: clamp(28px, 8vw, 60px); }
    .hero-line2 { white-space: normal; font-size: clamp(26px, 7.5vw, 56px); }
    .hero-subtitle { font-size: 13px; }

    /* Projects */
    .sw-top-bar { padding: 16px 16px; }
    .sw-label { font-size: 14px; }
    .flip-wrapper { width: 92vw; height: 50vh; }
    .sw-card-overlay {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 10px 12px;
    }
    .sw-card-title { font-size: 12px; }
    .sw-card-tags span { font-size: 10px; padding: 3px 8px; }

    /* Worked with */
    .worked-section { padding: 40px 0; }
    .worked-inner { padding: 0 16px; gap: 40px; }
    .worked-title { font-size: 32px; }
    .worked-count { font-size: 16px; }
    .worked-row { flex-direction: column; gap: 12px; align-items: flex-start; padding: 16px 0; }
    .worked-left, .worked-right { width: 100%; }
    .worked-company, .worked-role, .worked-date, .worked-location { font-size: 13px; }

    /* About */
    .about-sticky { padding: 0 16px; }
    .about-quote { font-size: 20px; }
    .about-me-btn { font-size: 13px; padding: 10px 20px; margin-top: 28px; }

    /* Footer */
    .site-footer { padding: 24px 16px 24px; min-height: 140px; }
    .footer-name { font-size: 36px; }
    .footer-cols { gap: 20px; flex-wrap: wrap; position: static; margin-top: 16px; }
    .footer-inner { min-height: auto; display: flex; flex-direction: column; }
    .footer-name { position: static; margin-bottom: 20px; }
    .footer-top-btn { width: 44px; height: 44px; font-size: 18px; }
}

/* ── Worked With ───────────────────────────────────────── */
.worked-section {
    background: #fff;
    padding: 120px 0;
    position: relative;
    z-index: 2;
    border-radius: 0 0 20px 20px;
}

.worked-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 52px;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.worked-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.worked-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(40px, 5vw, 72px);
    font-weight: 500;
    letter-spacing: -0.06em;
    line-height: 1em;
    color: #010101;
    /* scroll reveal */
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.worked-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.worked-count {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 400;
    color: #a6a6a6;
    letter-spacing: -0.02em;
    /* scroll reveal */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.15s,
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.worked-count.visible {
    opacity: 1;
    transform: translateY(0);
}

.worked-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.worked-item {
    /* scroll reveal */
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.worked-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.worked-line {
    height: 2px;
    background: #202020;
    width: 100%;
}

.worked-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    text-decoration: none;
    color: #010101;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.worked-row:hover {
    opacity: 0.5;
}

.worked-left,
.worked-right {
    flex: 1 0 0;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.worked-company,
.worked-role,
.worked-date,
.worked-location {
    flex: 1 0 0;
    max-width: 300px;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #010101;
}

.worked-role,
.worked-date,
.worked-location {
    color: #a6a6a6;
}

@media (max-width: 900px) {
    .worked-inner { padding: 0 24px; gap: 60px; }
    .worked-section { padding: 80px 0; }
    .worked-company,
    .worked-role,
    .worked-date,
    .worked-location {
        font-size: 15px;
    }
}

@media (max-width: 560px) {
    .worked-row {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    .worked-left,
    .worked-right {
        width: 100%;
    }
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
    background: #fff;
    border-radius: 20px 20px 0 0;
    min-height: 180px;
    padding: 32px 52px 36px;
}

.footer-inner {
    position: relative;
    height: 100%;
    min-height: 160px;
}

.footer-name {
    position: absolute;
    bottom: 0;
    left: 0;
    font-size: clamp(48px, 7vw, 96px);
    font-weight: 800;
    color: #0c0c0c;
    letter-spacing: -0.04em;
    line-height: 1;
}

.footer-cols {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 52px;
    align-items: flex-start;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 80px;
}

.footer-col-label {
    font-size: 12px;
    color: #aaa;
    font-weight: 400;
    margin-bottom: 4px;
}

.footer-col-muted {
    font-size: 13px;
    color: #6b6bff;
    font-weight: 400;
}

.footer-col-link {
    font-size: 13px;
    color: #0c0c0c;
    text-decoration: none;
    font-weight: 400;
    transition: opacity 0.2s;
}

.footer-col-link:hover { opacity: 0.5; }

.footer-top-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #0c0c0c;
    background: #0c0c0c;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    position: relative;
    overflow: hidden;
    transition: background 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                color 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.footer-top-btn:hover {
    background: #fff;
    border-color: #0c0c0c;
    color: #0c0c0c;
}

.footer-top-btn .arrow-main,
.footer-top-btn .arrow-ghost {
    position: absolute;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    line-height: 1;
}

.footer-top-btn .arrow-main {
    transform: translateY(0);
    opacity: 1;
}

.footer-top-btn .arrow-ghost {
    transform: translateY(140%);
    opacity: 0;
}

.footer-top-btn:hover .arrow-main {
    transform: translateY(-140%);
    opacity: 0;
}

.footer-top-btn:hover .arrow-ghost {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 768px) {
    .site-footer { padding: 48px 24px 40px; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
    .footer-cols { flex-wrap: wrap; gap: 32px; }
}

/* Video Showcase */
.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #161616;
    border-radius: 24px;
    border: 1px solid #222;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-container:hover {
    border-color: #333;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(-5px);
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1a1a1a 0%, #0c0c0c 100%);
    cursor: pointer;
}

.play-button-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-button {
    width: 60px;
    height: 60px;
    background: #e8c547;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0c0c0c;
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.play-button svg {
    width: 24px;
    height: 24px;
    margin-left: 4px;
    /* Optical adjustment */
}

.play-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(232, 197, 71, 0.3);
    animation: ripple-pulse 2s infinite;
}

.video-container:hover .play-button {
    transform: scale(1.1);
}

@keyframes ripple-pulse {
    0% {
        width: 60px;
        height: 60px;
        opacity: 0.5;
        border-width: 2px;
    }

    100% {
        width: 100px;
        height: 100px;
        opacity: 0;
        border-width: 0px;
    }
}

/* ============================================================
   EDWIN LE INSPIRED HERO REDESIGN
   ============================================================ */

/* Page Wrapper - receives tilt transform on menu open */
.page-wrapper {
    position: relative;
    z-index: 1;
    background: #010101;
    transform-origin: center center;
    transition: transform 0.7s cubic-bezier(0.77, 0, 0.175, 1),
                border-radius 0.7s cubic-bezier(0.77, 0, 0.175, 1);
    /* will-change: transform removed — it creates a containing block that
       breaks position:sticky and position:fixed for all descendants */
    overflow-x: clip; /* 'clip' never creates a scroll container — 'hidden' implicitly makes overflow-y:auto which breaks sticky */
}

body.menu-open .page-wrapper {
    /* slide right into the open 62% space, slight tilt */
    transform: translateX(36%) scale(0.62) rotate(6deg);
    border-radius: 18px;
    overflow: hidden;
    pointer-events: none;
}

/* ---- Main Nav ---- */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 40px;
    transition: opacity 0.3s ease;
}

body.menu-open .main-nav {
    opacity: 0;
    pointer-events: none;
}

.menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.04em;
    cursor: pointer;
    padding: 0;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.menu-btn:hover {
    opacity: 1;
}

.nav-initials {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 300;
    color: #fff;
    letter-spacing: 0.18em;
    opacity: 0.45;
}

/* ---- Menu Overlay — LEFT PANEL only (2-part layout like Edwin Le) ---- */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 38%;          /* covers only the left portion */
    height: 100%;
    background: #0a0a0a;
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    padding: 28px 10%;
}

body.menu-open .menu-overlay {
    opacity: 1;
    pointer-events: all;
}

.close-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.04em;
    cursor: pointer;
    padding: 0;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    align-self: flex-start;
}

.close-btn:hover {
    opacity: 1;
}

.overlay-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 64px;
}

.overlay-nav-link {
    font-family: 'Inter', sans-serif;
    font-size: clamp(36px, 4.5vw, 72px);
    font-weight: 400;
    color: #fff;
    text-decoration: none;
    line-height: 1.3;
    letter-spacing: -0.02em;
    opacity: 0.9;
    transition: opacity 0.2s ease, letter-spacing 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.overlay-nav-link:hover {
    opacity: 1;
    letter-spacing: 0.01em;
}

/* ---- Wave Canvas ---- */
.wave-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    display: block;
}

/* ---- Hero Section ---- */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 8%;
    overflow: hidden;
    background: #010101;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: none;   /* let heading span full padded width */
}

/* Line 1: "Sup, am Md Shafi." */
.hero-heading {
    font-family: 'Inter', sans-serif;
    font-size: clamp(36px, 5.8vw, 100px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.05em;
    margin: 0 0 0.05em 0;
    display: block;
    white-space: nowrap;
}

.hero-muted {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

/* "Md Shafi." — full white, extra bold, spotlight */
.hero-name {
    color: #ffffff;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

/* No pseudo-element glitch on hero-name — text scramble handles the effect */

/* Line 2: typewriter */
.hero-line2 {
    font-family: 'Inter', sans-serif;
    font-size: clamp(34px, 5.5vw, 94px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.05em;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 0.6em 0;
    display: block;
    white-space: nowrap;
}

#typeText {
    color: rgba(255, 255, 255, 0.6);
}

.type-cursor {
    display: inline-block;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
    animation: blink-cursor 0.9s step-end infinite;
    margin-left: 2px;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Hero subtitle */
.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #555;
    line-height: 1.6;
    letter-spacing: 0.01em;
    margin: 0;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.scroll-ring {
    width: 32px;
    height: 32px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scrollBob 2s ease-in-out infinite;
}

.scroll-dot-inner {
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
}

@keyframes scrollBob {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(6px); opacity: 1; }
}

/* ── Selected Work — Edwin Le style ─────────────────────── */
.projects-section {
    background: #fff;
    position: relative;
    height: 300vh;
    border-radius: 100px 100px 0 0;
}


.projects-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    background: #fff;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* "Selected work(3)" — top-left, dark, large */
.sw-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    padding: 40px 52px;
    z-index: 10;
    pointer-events: none;
}

.sw-label {
    font-family: 'Inter', sans-serif;
    font-size: 38px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #0c0c0c;
}

.sw-label sup {
    font-size: 11px;
    font-weight: 400;
    vertical-align: super;
    letter-spacing: 0;
}

/* Perspective wrapper — parent of rotating card */
/* Very large perspective = card barely changes apparent size during rotation */
.flip-wrapper {
    perspective: 2200px;
    perspective-origin: 50% 50%;
    width: min(23cm, 88vw);
    height: min(17cm, 60vh);
    z-index: 2;
    position: relative;
    filter: drop-shadow(0 8px 30px rgba(0,0,0,0.18));
}

/* Rotating card — preserve-3d so front/back are true 3D */
/* NO overflow:hidden here — it would flatten preserve-3d */
.flip-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform-origin: center center;
    will-change: transform;
    border-radius: 16px;
    border: 8px solid #0c0c0c;
    background: #111;
    /* No filter here — it flattens preserve-3d and breaks backface-visibility */
}

/* Both faces — dark, flex column, backface hidden */
.flip-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: #111;
    border-radius: 11px; /* inner radius = card border-radius - border-width */
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Back face starts flipped — visible when card rotates past 90° */
.flip-back {
    transform: rotateX(180deg);
}

/* Image fills face */
.sw-card-image {
    flex: 1;
    overflow: hidden;
    min-height: 0;
    position: relative;
}

.sw-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0, 0, 1);
}

.flip-card:hover .sw-card-image img {
    transform: scale(1.04);
}

/* Hover overlay — fades in on card hover */
.sw-card-hover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.32);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.flip-card:hover .sw-card-hover-overlay {
    opacity: 1;
}


/* Bottom info bar */
.sw-card-overlay {
    padding: 16px 20px;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.sw-card-title {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    letter-spacing: -0.01em;
    margin: 0;
    white-space: nowrap;
}

.sw-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

.sw-card-tags span {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    white-space: nowrap;
}

/* Marquee container — centered, behind card (z-index 1) */
/* Clip container — overflow:hidden cuts the text as it slides up */
.proj-marquee {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    /* height = one text line; JS sets translateY to both center and slide */
    height: clamp(36px, 5vw, 64px);
    line-height: 1;
}

/* One item per project — only one is visible at a time (display toggled by JS) */
.proj-marquee-item {
    position: absolute;
    top: 0; left: 0; right: 0;
}

/* JS sets translateY on this — separate element so CSS translateX on track isn't overridden */
.proj-marquee-slide {
    display: block;
    will-change: transform;
}

/* CSS horizontal animation ONLY on this element — no JS transform here */
.proj-marquee-track {
    display: block;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 800;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: #0c0c0c;
    line-height: 1;
    animation: projMarqueeRun 20s linear infinite;
}

@keyframes projMarqueeRun {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    /* Nav */
    .main-nav { padding: 20px 24px; }

    /* Menu overlay full width on tablet/phone */
    .menu-overlay { width: 70%; padding: 28px 8%; }

    /* Hero */
    .hero-heading { white-space: normal; }
    .hero-line2 { white-space: normal; }

    /* Flip card */
    .flip-wrapper {
        width: 88vw;
        height: 58vh;
    }

    .sw-top-bar {
        padding: 24px 24px;
    }

    .sw-label {
        font-size: 17px;
    }

    .sw-card-overlay {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 14px 16px;
    }

    /* Page wrapper menu tilt — less extreme on mobile */
    body.menu-open .page-wrapper {
        transform: translateX(50%) scale(0.7) rotate(4deg);
    }
}