/* ==========================================
   Preloader & Curtain
========================================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 99999; /* Topmost */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 1.2s cubic-bezier(0.76, 0, 0.24, 1);
}

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

.curtain-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #333; /* Dark Grey secondary layer */
    z-index: 99990; /* Below preloader */
    transition: transform 1.2s cubic-bezier(0.76, 0, 0.24, 1);
    transition-delay: 0.1s; /* Slight delay for layered effect */
}

.curtain-layer.hide {
    transform: translateY(-100%);
}

.preloader-text {
    color: #fff;
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 5px;
    opacity: 0;
    animation: fadeInOut 2s ease forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; letter-spacing: 10px; }
    40% { opacity: 1; letter-spacing: 5px; }
    80% { opacity: 1; letter-spacing: 5px; }
    100% { opacity: 0; letter-spacing: 0px; }
}

/* ==========================================
   CSS Custom Properties & Reset
========================================== */
:root {
    /* Colors - Pure White & Black Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #e5e5e5;
    --border-light: #eeeeee;
    --success: #22c55e;

    /* Typography */
    --font-primary: 'Outfit', sans-serif;
    --font-secondary: 'Inter', sans-serif;
    --font-hindi: 'Noto Sans Devanagari', sans-serif;

    /* Spacing */
    --section-padding: 80px 0;
    --container-max: 1400px;
    --container-padding: 0 24px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --radius-full: 9999px;
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* scroll-behavior: smooth; REMOVED for Lenis compatibility */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #d1d1d1 var(--bg-primary); /* Firefox */
}

/* Lenis Recommended CSS */
html.lenis, html.lenis body {
    height: auto;
}

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

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

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

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

/* ==========================================
   Global Polish (Scrollbar, Selection, Grain)
========================================== */
/* Custom Scrollbar - Webkit */
::-webkit-scrollbar {
    width: 6px; /* Made slightly thinner for 'sleek' look */
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d1d1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1a1a1a; /* Darker on hover for better contrast */
}

/* Custom Text Selection */
::selection {
    background: #000000; /* Pure Black for maximum editorial contrast */
    color: #ffffff;
    text-shadow: none;
}

::-moz-selection {
    background: #000000;
    color: #ffffff;
    text-shadow: none;
}

/* Grain Overlay - Texture */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9000; /* Below cursor, above content */
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

body {
    font-family: var(--font-secondary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ==========================================
   Cursor Follower
========================================== */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--text-primary); /* Will invert with difference mode */
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    /* mix-blend-mode: difference; Optional: makes it visible on dark/light */
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9998;
    pointer-events: none;
    transition: width 0.2s, height 0.2s, background-color 0.2s, transform 0.2s;
}

body:hover .cursor-dot,
body:hover .cursor-outline {
    opacity: 1;
}


/* ==========================================
   Staggered Text Hover Effect (Lando Norris Style)
========================================== */
.nav-link {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    text-decoration: none;
    line-height: 1.2; /* Ensure height for overflow */
}

.letter {
    display: inline-block;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
    transform-style: preserve-3d;
}

/* The duplicate letter that slides up */
.letter::after {
    content: attr(data-letter);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--text-primary); /* Or inherit */
}

/* Hover state */
.nav-link:hover .letter {
    transform: translateY(-100%);
}

/* Active state handling - keep it simple or animate */
.nav-link.active {
    color: var(--text-primary);
}

/* ==========================================
   Navigation - Minimal & Unique
========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 20px 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-secondary); /* Matches section-tag font usually */
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    position: relative;
    z-index: 1001;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 50px;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

/* Book A Call button */
.btn-book {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.btn-book:hover {
    opacity: 0.7;
}

.nav-toggle {
    display: none;
    height: 48px;
    width: 48px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.nav-toggle:hover {
    background: rgba(0,0,0,0.03);
}

.hamburger {
    position: relative;
    width: 24px;
    height: 1.5px;
    background: var(--text-primary);
    transition: transform 0.3s cubic-bezier(0.76, 0, 0.24, 1), background 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 1.5px;
    background: var(--text-primary);
    transition: transform 0.3s cubic-bezier(0.76, 0, 0.24, 1), top 0.3s cubic-bezier(0.76, 0, 0.24, 1);
    left: 0;
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

/* Active State for Hamburger (Global or Mobile) */
.nav-toggle.active .hamburger {
    background: transparent;
    transform: rotate(180deg); /* Rotate the whole thing for flair */
}

.nav-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* ==========================================
   Hero Section
========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

/* Vertical text on left */
.hero-vertical-text {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: rotate(-90deg) translateX(-50%);
    transform-origin: left center;
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--text-muted);
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 2;
}

.hero-year {
    position: absolute;
    left: 30px;
    bottom: 100px;
    font-size: 0.85rem;
    color: var(--text-muted);
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.hero-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: center;
    width: 100%;
    min-height: calc(100vh - 80px);
}

.hero-content {
    z-index: 1;
    padding-left: 40px;
}

/* Stats row */
.hero-stats {
    display: flex;
    gap: 50px;
    margin-bottom: 80px;
}

.hero-stat {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.stat-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: capitalize;
    margin-top: -5px;
}

/* Hero Location & Time */
.hero-location-time {
    position: absolute;
    right: 30px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    z-index: 2;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    gap: 10px;
}

.location-label {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-transform: uppercase;
}

#hero-clock {
    font-family: var(--font-primary);
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}

/* Main title - HELLO */
.hero-title {
    font-family: var(--font-primary);
    font-size: clamp(6rem, 18vw, 14rem);
    font-weight: 300;
    line-height: 0.85;
    color: var(--text-primary);
    letter-spacing: -8px;
    margin-bottom: 30px;
    overflow: hidden; /* For the stagger effect */
    display: inline-flex; /* Keep letters together */
    cursor: default;
}

/* Stagger effect trigger for hero title */
.hero-title:hover .letter {
    transform: translateY(-100%);
}

/* Subtitle */
.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 100px;
}

/* Scroll indicator */
.scroll-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.scroll-indicator:hover {
    color: var(--text-primary);
}

.scroll-indicator svg {
    animation: bounce 2s infinite;
}

@keyframes bounce {

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

    50% {
        transform: translateY(5px);
    }
}

/* Hero image container */
.hero-image-container {
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    overflow: hidden;
}

.hero-portrait {
    width: 100%;
    max-width: 650px;
    height: auto;
    object-fit: cover;
    object-position: top center;
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

.hero-portrait:hover {
    filter: grayscale(50%);
}

/* ==========================================
   Buttons
========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-normal);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-primary);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ==========================================
   Section Styles
========================================== */
section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 8px 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-primary);
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1;
    color: var(--text-primary);
    cursor: default;
    letter-spacing: -0.03em;
}

/* ==========================================
   About Section - Clean & Minimal
========================================== */
/* About Section - Editorial Redesign */
.about-section {
    padding: 10rem 0;
    background-color: var(--bg-color);
    position: relative;
    overflow: hidden;
}

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

.about-editorial-content {
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

.about-lead-text {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 300;
    line-height: 1.5;
    color: var(--text-primary);
    max-width: 900px;
    letter-spacing: 0.01em;
}

.about-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 3rem;
}

.about-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.about-stat-item:hover {
    transform: translateY(-5px);
}

.stat-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-color);
}

.stat-sub {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #555;
    line-height: 1.5;
}

/* Responsive Design for About */
@media (max-width: 1024px) {
    .about-lead-text {
        font-size: 2.5rem;
    }
    
    .about-stats-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .about-container {
        padding: 0 2rem;
    }

    .about-lead-text {
        font-size: 2rem;
    }
}

/* ==========================================
   Skills Section - NEW
========================================== */
.skills-section {
    background: var(--bg-secondary);
    padding: var(--section-padding);
}

.skills-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--container-padding);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.skill-category {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 25px;
    transition: var(--transition-normal);
}

.skill-category:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-color: var(--text-primary);
}

.skill-category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-item {
    background: var(--bg-tertiary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.skill-category:hover .skill-item {
    background: var(--text-primary);
    color: var(--bg-primary);
}

/* ==========================================
   Projects Section
========================================== */
.projects {
    background: var(--bg-primary);
}

.projects-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--container-padding);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.project-image {
    height: 220px;
    background: linear-gradient(135deg, #e0e0e0 0%, #c0c0c0 100%);
    position: relative;
    overflow: hidden;
}

.project-image-2 {
    background: linear-gradient(135deg, #d0d0d0 0%, #b0b0b0 100%);
}

.project-image-3 {
    background: linear-gradient(135deg, #c5c5c5 0%, #a5a5a5 100%);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    transform: translateY(20px);
    transition: var(--transition-normal);
}

.project-card:hover .project-link {
    transform: translateY(0);
}

.project-info {
    padding: 24px;
}

.project-title {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-tags span {
    background: var(--bg-tertiary);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ==========================================
   CTA Section
========================================== */
.cta-section {
    background: var(--bg-tertiary);
    padding: 100px 0;
    text-align: center;
}

.cta-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 24px;
}

.cta-title {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.3;
}

.cta-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 35px;
    line-height: 1.7;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    padding-bottom: 3px;
    border-bottom: 1px solid var(--text-primary);
    transition: var(--transition-fast);
}

.cta-btn:hover {
    opacity: 0.7;
}

/* ==========================================
   Footer - Dark Style
========================================== */
.footer-new {
    background: #1a1a1a;
    padding: 50px 0;
}

.footer-new-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-socials {
    display: flex;
    gap: 2rem;
}

.footer-social-link {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    text-decoration: none;
    line-height: 1.2;
}

.footer-social-link:hover .letter {
    transform: translateY(-100%);
}

.footer-social-link .letter::after {
    color: #ffffff;
}

.footer-social-link:hover {
    color: #fff;
}

.footer-brand {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1px #ffffff;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
    letter-spacing: -0.02em;
    text-align: center;
}

.footer-brand:hover {
    color: #ffffff;
    letter-spacing: 0.05em;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.footer-email a {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: #fff;
    transition: opacity 0.3s ease;
}

.footer-email a:hover {
    opacity: 0.8;
}

.footer-copyright {
    text-align: center;
    color: #666;
    font-size: 0.8rem;
    margin-top: 40px;
    font-family: var(--font-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ==========================================
   Responsive Styles
========================================== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 0 40px;
    }

    .hero-content {
        order: 1;
        padding-left: 0;
    }

    .hero-image-container {
        order: 0;
        justify-content: center;
        margin-bottom: 40px;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-vertical-text,
    .hero-year,
    .hero-location-time {
        display: none;
    }

    .hero-title {
        letter-spacing: -4px;
    }

    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bento-intro {
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .bento-stat-main {
        grid-column: 1;
    }

    .bento-arrow-card {
        grid-column: 2;
    }

    .bento-feature:nth-of-type(4) {
        grid-column: 1;
        grid-row: auto;
    }

    .bento-feature:nth-of-type(5) {
        grid-column: 2;
        grid-row: auto;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0;
        gap: 30px;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.6s cubic-bezier(0.76, 0, 0.24, 1);
        z-index: 999;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    /* Editorial Mobile Links */
    .nav-menu .nav-link {
        font-family: var(--font-primary);
        font-size: 3rem;
        font-weight: 300;
        color: var(--text-primary);
        letter-spacing: -2px;
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .nav-menu.active .nav-link {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered Delays */
    .nav-menu.active li:nth-child(1) .nav-link { transition-delay: 0.1s; }
    .nav-menu.active li:nth-child(2) .nav-link { transition-delay: 0.2s; }
    .nav-menu.active li:nth-child(3) .nav-link { transition-delay: 0.3s; }
    .nav-menu.active li:nth-child(4) .nav-link { transition-delay: 0.4s; }
    .nav-menu.active li:nth-child(5) .nav-link { transition-delay: 0.5s; }

    .nav-toggle {
        display: flex;
    }

    .btn-book {
        display: none;
    }

    /* Hamburger active states are now handled globally for better animation consistency */

    .hero-portrait {
        max-width: 350px;
    }

    .hero-title {
        font-size: 5rem;
        letter-spacing: -3px;
    }

    .about-bento-container {
        padding: 0 30px;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-intro,
    .bento-stat-main,
    .bento-arrow-card,
    .bento-feature:nth-of-type(4),
    .bento-feature:nth-of-type(5) {
        grid-column: 1;
    }

    .bento-arrow-card {
        display: none;
    }

    .curved-arrow {
        display: none;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .footer-new-container {
        flex-direction: column;
        gap: 30px;
        text-align: center;
        padding: 0 30px;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .hero-title {
        font-size: 4rem;
        letter-spacing: -2px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================
   Enhanced Skills Section - Hero Style Match
========================================== */
.skills-section {
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
    padding: 60px 0;
}

/* Vertical text decoration like hero */
.skills-section::before {
    content: 'Technologies';
    position: absolute;
    right: 30px;
    top: 50%;
    transform: rotate(90deg) translateX(-50%);
    transform-origin: right center;
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--text-muted);
    text-transform: uppercase;
    white-space: nowrap;
}

.skills-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 60px;
}

/* ==========================================
   Generic Section Headers (Applied Everywhere)
========================================== */
.section-header {
    text-align: left;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-primary);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 300;
    line-height: 1;
    color: var(--text-primary);
    letter-spacing: -2px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    margin: 20px 0 0 0;
    width: 60px;
    height: 2px;
    background: var(--text-primary);
}

.section-tag {
    display: block;
    background: transparent;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

/* ==========================================
   Skills Section - Editorial Kinetic List
========================================== */
.skills-editorial {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--text-primary);
}

.skill-row {
    display: grid;
    grid-template-columns: 0.1fr 0.4fr 1fr; /* Number, Title, Skills */
    padding: 50px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    align-items: center;
    cursor: default;
}

/* Hover State - High Contrast */
.skill-row:hover {
    background-color: var(--text-primary);
}

.skill-row:hover .skill-num,
.skill-row:hover .skill-name {
    color: var(--bg-primary);
}

.skill-header {
    display: contents; /* Allows children to participate in the parent grid */
}

.skill-num {
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s ease;
}

.skill-name {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: -1px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.skill-row:hover .skill-name {
    transform: translateX(10px);
}

.skill-list-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.skill-pill {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 0; /* Sharp edges for editorial feel */
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    background: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.skill-row:hover .skill-pill {
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.8);
}

.skill-row:hover .skill-pill:hover {
    background: var(--bg-primary);
    color: var(--text-primary) !important;
    border-color: var(--bg-primary);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1024px) {
    .skill-row {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px 0;
    }
    
    .skill-header {
        display: flex;
        align-items: baseline;
        gap: 20px;
    }
    
    .skill-list-inline {
        justify-content: flex-start;
    }
    
    .skill-row:hover {
        background: transparent;
    }
    
    .skill-row:hover .skill-num { color: var(--text-muted); }
    .skill-row:hover .skill-name { color: var(--text-primary); transform: none; }
    .skill-row:hover .skill-pill { color: var(--text-secondary); border-color: var(--border-color); }
}

/* ==========================================
   Projects Section - Editorial Stack
========================================== */
.projects-section {
    background: var(--bg-primary);
    padding: 120px 0;
}

/* ==========================================
   Projects Section - Sticky Gallery (Lando Style)
========================================== */
.projects-sticky-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 80px;
    position: relative;
}

.projects-visuals {
    width: 50%;
    height: 80vh;
    position: sticky;
    top: 10vh; /* Center vertically in viewport */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.project-visual-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.project-visual-item.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.project-image {
    width: 100%;
    height: 120%; /* Increased height for parallax movement */
    background-size: cover;
    background-position: center;
    will-change: transform;
}

.project-img-1 { background: linear-gradient(135deg, #e0e0e0 0%, #c0c0c0 100%); }
.project-img-2 { background: linear-gradient(135deg, #d0d0d0 0%, #b0b0b0 100%); }
.project-img-3 { background: linear-gradient(135deg, #c5c5c5 0%, #a5a5a5 100%); }

.projects-info {
    width: 50%;
    padding-bottom: 10vh;
}

.project-info-item {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
    opacity: 0.3;
    transition: opacity 0.5s ease;
}

.project-info-item.active {
    opacity: 1;
}

.project-number-large {
    font-family: var(--font-primary);
    font-size: 5rem;
    font-weight: 300;
    color: var(--border-color);
    line-height: 1;
    margin-bottom: 20px;
}

.project-title-large {
    font-family: var(--font-primary);
    font-size: 3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.project-desc-large {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 30px;
    max-width: 90%;
}

.project-tags-line {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    font-weight: 500;
    color: var(--text-primary);
    transition: opacity 0.3s ease;
}

.project-link-btn:hover {
    opacity: 0.7;
}

/* Responsive Projects */
@media (max-width: 1024px) {
    .projects-sticky-wrapper {
        flex-direction: column;
        gap: 40px;
    }

    .projects-visuals {
        width: 100%;
        height: 50vh;
        position: relative;
        top: 0;
    }

    .projects-info {
        width: 100%;
        padding-bottom: 0;
    }

    .project-info-item {
        min-height: auto;
        padding: 40px 0;
        opacity: 1; /* Always visible on mobile */
        border-bottom: 1px solid var(--border-light);
    }
    
    .project-info-item:last-child {
        border-bottom: none;
    }
}

.project-link {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    transform: translateY(20px);
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-card:hover .project-link {
    transform: translateY(0);
}

/* Hero Image Size Adjustment */
.hero-portrait {
    width: 100%;
    max-width: 400px;
    max-height: 500px;
    object-fit: cover;
    object-position: top center;
}

.hero-image-container {
    max-height: 550px;
}

@media (max-width: 768px) {
    .hero-portrait {
        max-width: 280px;
        max-height: 350px;
    }
}

@media (max-width: 480px) {
    .hero-portrait {
        max-width: 220px;
        max-height: 280px;
    }
}

/* ==========================================
   Responsive - Hide vertical text on mobile
========================================== */
@media (max-width: 1024px) {

    .skills-section::before,
    .projects::before,
    .projects::after {
        display: none;
    }

    .skills-container,
    .projects-container {
        padding: 0 30px;
    }

    .skills-section .section-title,
    .projects .section-title {
        font-size: clamp(2rem, 5vw, 3rem);
    }
}

@media (max-width: 768px) {

    .skills-section,
    .projects {
        padding: 50px 0;
    }

    .skills-section .section-header,
    .projects .section-header {
        margin-bottom: 30px;
    }

    .skills-container,
    .projects-container {
        padding: 0 20px;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .skill-category {
        padding: 25px 20px;
    }
}

@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   Infinite Marquee
========================================== */
.marquee-section {
    background: var(--text-primary);
    padding: 25px 0;
    overflow: hidden;
    position: relative;
    z-index: 10;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.marquee-track {
    display: flex;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
    width: max-content; /* Ensure width fits content */
}

.marquee-text {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bg-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-right: 0; /* No margin, we use padding in the text string or just rely on the dash */
    padding-right: 20px; /* Add some spacing between repeats */
    opacity: 0.9;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%); /* Move by half the total width (assuming 2 sets of text cover the loop) */
    }
}

/* Hover to pause */
.marquee-section:hover .marquee-track {
    animation-play-state: paused;
}

/* ==========================================
   Mobile Responsiveness Fixes
========================================== */
@media (max-width: 768px) {
    /* Hide custom cursor on mobile/touch devices */
    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }

    /* Adjust Marquee size */
    .marquee-text {
        font-size: 1rem;
        letter-spacing: 1px;
    }
    
    .marquee-section {
        padding: 15px 0;
    }

    /* Tactile Touch Feedback (App-like feel) */
    a:active, button:active, .project-info-item:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* ==========================================
   Scroll Progress Bar
========================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--text-primary);
    z-index: 1002; /* Above navbar */
    transition: width 0.1s ease-out;
}

/* ==========================================
   Back to Top Button
========================================== */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.76, 0, 0.24, 1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: #000; /* Ensure it stays dark */
}

.back-to-top svg {
    transition: transform 0.3s ease;
}

.back-to-top:hover svg {
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

