/* 
 * Main Stylesheet for Vrindopnishad
 * Inspired by cydstumpel.nl, iheartcomix.com, and fiddle.digital
 * Enhanced with modern, intellectual UI patterns and adaptive features
*/ 

/* Base styles and variables */
:root {
    --primary-color: #024c56;
    --secondary-color: #fd630a;
    --accent-color: #ffd147;
    --bg-color: #f9f9f9;
    --text-color: #333;
    
    --bg-color-rgb: 249, 249, 249;
    --text-color-rgb: 51, 51, 51;
    --accent-color-rgb: 255, 209, 71;
    
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    --transition-smooth: cubic-bezier(0.77, 0, 0.175, 1);
    --transition-bounce: cubic-bezier(0.68, -0.6, 0.32, 1.6);
    --font-primary: 'Inter', sans-serif;
    --font-size-xs: clamp(0.75rem, 2vw, 0.875rem);
    --font-size-sm: clamp(0.875rem, 2.5vw, 1rem);
    --font-size-md: clamp(1rem, 3vw, 1.25rem);
    --font-size-lg: clamp(1.25rem, 4vw, 1.5rem);
    --font-size-xl: clamp(1.5rem, 5vw, 2rem);
    --font-size-xxl: clamp(2rem, 7vw, 3rem);
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --blur-effect: none !important;
}

/* Smart theme detection with smooth transition */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-color: #f9f9f9;
        --bg-color-rgb: 18, 18, 18;
        --text-color-rgb: 249, 249, 249;
        --accent-color: #f5f5f5;
        --secondary-color: #bfbfac;
        --tertiary-color: #d1c1c1;
        --quaternary-color: #fef2de;
        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
        --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
        --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);
    }
    
    ::selection { 
        background-color: var(--tertiary-color);
        color: var(--bg-color);
    }
    
    ::-moz-selection {
        background-color: var(--tertiary-color);
        color: var(--bg-color);
    }
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    font-family: var(--font-primary);
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-primary);
    line-height: 1.5;
    overflow-x: hidden;
    transition: background-color 0.5s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.1;
}

h1 {
    font-size: clamp(3rem, 15vw, 10rem);
}

h2 {
    font-size: clamp(2rem, 8vw, 7rem);
}

h3 {
    font-size: clamp(1.5rem, 4vw, 3rem);
}

p {
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    line-height: 1.6;
    max-width: 65ch;
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}



/* Custom cursor *
.cursor {
    position: fixed;
    width: 15px;
    height: 15px;
    background-color: var(--accent-color);
    border-radius: 50%;
    left: 0;
    top: 0;
    pointer-events: none;
    z-index: 9990;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, transform 0.3s ease;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    left: 0;
    top: 0;
    pointer-events: none;
    z-index: 9990;
    opacity: 0;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    transition: 0.1s ease-out;
}

.cursor.hover,
.cursor-follower.hover {
    transform: translate(-50%, -50%) scale(1.5);
}

.cursor.click {
    transform: translate(-50%, -50%) scale(0.8);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cursor-follower.click {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.9;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.cursor.pulse {
    animation: cursorPulse 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
*/
@keyframes cursorPulse {
    0% { transform: translate(-50%, 50%) scale(1.5); }
    50% { transform: translate(-50%, -50%) scale(2); }
    100% { transform: translate(-50%, 50%) scale(1.5); }
}

/* Layout */
.container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-lg) 0;
    position: relative;
}

.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

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

.justify-between {
    justify-content: space-between;
}

.grid {
    display: grid;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

/* Header */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s var(--transition-smooth);
    background-color: var(--bg-color);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    height: 90px; /* Fixed height for consistency */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1;
    display: flex;
    align-items: center;
    height: 100%;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    height: 100%;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 100%;
    height: 100vh;
    background: var(--bg-color);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    overflow-y: auto;
}

nav.active {
    right: 0;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid rgba(var(--text-color-rgb), 0.1);
    height: 90px; /* Same height as header for alignment */
}

.nav-logo {
    font-size: 1.8rem; /* Match logo size */
    font-weight: 600;
    line-height: 1;
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-close {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--text-color-rgb), 0.05);
    border-radius: 50%;
    /* cursor: pointer; */
    transition: all 0.3s ease;
}

/* Tools menu styling - No blur effect */
.tools-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 350px;
    max-width: 100%;
    height: 100vh;
    background: var(--bg-color);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 2000;
    transition: all 0.5s var(--transition-smooth);
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(var(--text-color-rgb), 0.1);
}

.tools-menu.active {
    right: 0;
}

.tools-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid rgba(var(--text-color-rgb), 0.1);
    height: 90px; /* Match header height */
}

.tools-menu-logo {
    font-size: 1.8rem; /* Match other logos */
    font-weight: 600;
    line-height: 1;
    display: flex;
    align-items: center;
    height: 100%;
}

.main-nav {
    display: flex;
    align-items: center;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--spacing-md);
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* Final adjustments for tools icon centering */
.tools-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(var(--text-color-rgb), 0.08);
    /* cursor: pointer; */
    transition: all 0.4s var(--transition-bounce);
    margin-right: var(--spacing-sm);
    position: relative;
    overflow: hidden;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(var(--text-color-rgb), 0.05);
}

.tools-icon:hover {
    transform: scale(1.1);
    background-color: rgba(var(--text-color-rgb), 0.12);
}

.tools-icon svg {
    transition: all 0.4s var(--transition-bounce);
    stroke-width: 2.2;
}

.tools-icon:hover svg {
    transform: rotate(-90deg);
}

/* Fix for Firefox */
@-moz-document url-prefix() {
    .tools-icon svg {
        transform: translate(-50%, -50%);
    }
    
    .tools-icon:hover svg {
        transform: translate(-50%, -50%) rotate(90deg);
    }
}

.tools-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(var(--accent-color-rgb), 0.15) 0%, rgba(var(--accent-color-rgb), 0) 70%);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.tools-icon:hover::before {
    opacity: 1;
    transform: scale(1.5);
}

.tools-icon:hover {
    background-color: rgba(var(--text-color-rgb), 0.12);
    animation: pulse 1.5s infinite;
    box-shadow: var(--shadow-md);
    border-color: rgba(var(--text-color-rgb), 0.1);
}

/* Fullscreen Tools Menu */
.tools-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 100%;
    height: 100vh;
    background: var(--bg-color);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(var(--text-color-rgb), 0.1);
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    overflow-y: auto;
}

.tools-menu.active {
    right: 0;
}

.tools-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid rgba(var(--text-color-rgb), 0.1);
}

.tools-menu-logo {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-color);
}

.tools-menu-close {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--text-color-rgb), 0.05);
    border-radius: 50%;
    /* cursor: pointer; */
    transition: all 0.3s ease;
}

.tools-menu-close:hover {
    background-color: rgba(var(--text-color-rgb), 0.1);
    transform: rotate(90deg) scale(1.1);
}

.tools-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.tools-menu.active .tools-grid {
    opacity: 1;
    transform: translateY(0);
}

.tool-item {
    position: relative;
    background-color: rgba(var(--bg-color-rgb), 0.7);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    transition: all 0.4s var(--transition-bounce);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(var(--text-color-rgb), 0.08);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(20px);
    /* cursor: pointer; */
}

.tool-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(var(--text-color-rgb), 0.05) 0%, rgba(var(--text-color-rgb), 0) 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.tool-item:hover::before {
    opacity: 1;
}

.tool-icon {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(var(--text-color-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
    transition: all 0.4s var(--transition-bounce);
    z-index: 1;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(var(--text-color-rgb), 0.05);
}

.tool-item:hover .tool-icon {
    transform: scale(1.1) translateY(-5px);
    box-shadow: var(--shadow-md);
}

.tool-info {
    position: relative;
    z-index: 1;
}

.tool-info h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
    transition: transform 0.3s ease;
}

.tool-info h3::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--text-color);
    transition: width 0.4s var(--transition-smooth);
    opacity: 0.7;
}

.tool-item:hover .tool-info h3::after {
    width: 100%;
}

.tool-info p {
    font-size: var(--font-size-sm);
    opacity: 0.8;
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
}

.tool-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.language-switch-tools {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.language-btn-tools {
    font-size: var(--font-size-xs);
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius-sm);
    background-color: rgba(var(--text-color-rgb), 0.1);
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(var(--text-color-rgb), 0.05);
}

.language-btn-tools.active {
    background-color: rgba(var(--text-color-rgb), 0.2);
    font-weight: 500;
}

.language-btn-tools:hover {
    background-color: rgba(var(--text-color-rgb), 0.15);
    transform: translateY(-2px);
}

.tool-item[data-bg-color="#8E7F7F"]:hover {
    background-color: rgba(142, 127, 127, 0.1);
    border-color: rgba(142, 127, 127, 0.3);
}

.tool-item[data-bg-color="#4A4A4A"]:hover {
    background-color: rgba(74, 74, 74, 0.1);
    border-color: rgba(74, 74, 74, 0.3);
}

.tool-item[data-bg-color="#D4AF37"]:hover {
    background-color: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.3);
}

.tool-item[data-bg-color="#121212"]:hover {
    background-color: rgba(18, 18, 18, 0.1);
    border-color: rgba(18, 18, 18, 0.3);
}

.tool-item[data-bg-color="#78a4aa"]:hover {
    background-color: rgba(120, 164, 170, 0.1);
    border-color: rgba(120, 164, 170, 0.3);
}

.tool-item[data-bg-color="#e9d0a4"]:hover {
    background-color: rgba(233, 208, 164, 0.1);
    border-color: rgba(233, 208, 164, 0.3);
}

/* Adaptive tools menu for different devices */
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .tools-icon {
        width: 50px;
        height: 50px;
        margin-right: 15px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    header {
        padding: 0.8rem var(--spacing-sm);
    }
    
    .header-right {
        display: flex;
        align-items: center;
        gap: 15px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-item {
        min-height: 150px;
    }
}

@media (max-width: 480px) {
    .tools-icon {
        width: 36px;
        height: 36px;
        margin-right: 8px;
    }
    
    .tools-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .mobile-menu-btn {
        margin-left: 0;
    }
    
    header {
        padding: 0.8rem;
    }
}

/* Hero section */
.hero {
    height: 100vh;
    width: 100%;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        transparent 0%,
        rgba(var(--bg-color-rgb), 0.8) 70%
    );
    z-index: 0;
}

.hero-title {
    position: relative;
    z-index: 2;
    font-size: clamp(3rem, 15vw, 10rem);
    font-weight: 600;
    line-height: 0.9;
    margin-bottom: 2rem;
    max-width: 20ch;
    color: var(--text-color);
}

.hero-title .row {
    position: relative;
    overflow: visible;
    line-height: 1.1;
    margin-bottom: 0.2em;
}

.hero-title .row:last-child {
    margin-bottom: 0;
}

.hero-title .row span {
    display: block;
    transform: translateY(100%);
    opacity: 0;
    animation: titleReveal 1s var(--transition-smooth) forwards;
}

.hero-title .row:nth-child(1) span { animation-delay: 0.1s; }
.hero-title .row:nth-child(2) span { animation-delay: 0.2s; }
.hero-title .row:nth-child(3) span { animation-delay: 0.3s; }

@keyframes titleReveal {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hero-subtitle {
    position: relative;
    z-index: 2;
    background: rgba(var(--bg-color-rgb), 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 1.5rem;
    border-radius: 4px;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 400;
    margin-bottom: 2rem;
    max-width: 40ch;
    overflow: hidden;
    border: 1px solid rgba(var(--text-color-rgb), 0.05);
    transition: background 0.3s ease, transform 0.3s ease;
}

.hero-subtitle:hover {
    background: rgba(var(--bg-color-rgb), 0.7);
    transform: translateY(-5px);
}

.hero-subtitle span {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
    animation: subtitleReveal 1s var(--transition-smooth) forwards;
    animation-delay: 0.5s;
}

@keyframes subtitleReveal {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Button styles */
.btn {
    position: relative;
    z-index: 2;
    background: transparent;
    font-size: 1rem;
    text-decoration: none;
    color: var(--text-color);
    padding: 0.8rem 2rem;
    border: 1px solid rgba(var(--text-color-rgb), 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border-radius: 4px;
    display: inline-block;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--text-color);
    z-index: -1;
    transition: width 0.3s ease;
}

.btn:hover {
    color: var(--bg-color);
}

.btn:hover::before {
    width: 100%;
}

/* Project section */
.projects {
    padding: calc(var(--spacing-md) * 2) var(--spacing-md);
    position: relative;
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        transparent 0%,
        rgba(var(--bg-color-rgb), 0.8) 70%
    );
    z-index: 0;
}

.section-title {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 600;
    margin-bottom: 2rem;
    position: relative;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.section-title:hover {
    color: var(--secondary-color);
}

.project-list {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.project-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(var(--text-color-rgb), 0.1);
    position: relative;
    /* cursor: pointer; */
    transition: transform 0.3s ease, padding-left 0.3s ease, border-bottom-color 0.3s ease;
}

.project-item:hover {
    transform: translateX(10px);
    padding-left: 10px;
    border-bottom-color: rgba(var(--text-color-rgb), 0.3);
}

.project-title {
    position: relative;
    z-index: 2;
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 500;
    line-height: 1.2;
    transition: color 0.3s ease, transform 0.3s ease;
    color: var(--text-color);
}

.project-title:hover {
    color: var(--secondary-color);
    transform: translateX(10px);
}

.project-category {
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.project-item:hover .project-category {
    opacity: 1;
}

.project-item::after {
    content: "→";
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-item:hover::after {
    opacity: 0.7;
    transform: translateY(-50%) translateX(-10px);
}

/* Horizontal Scroll Section */
.horizontal-section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

@media (min-width: 769px) {
    .horizontal-section {
        height: 100vh;
    }
    
    .horizontal-content {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        will-change: transform;
    }
    
    .horizontal-item {
        position: relative;
        padding: 2rem;
        width: 25%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        will-change: transform;
    }
}

@media (max-width: 768px) {
    .horizontal-section {
        height: auto;
        min-height: calc(var(--vh, 1vh) * 70);
    }
    
    .horizontal-content {
        position: relative;
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 0 var(--spacing-md);
    }
    
    .horizontal-item {
        width: 100%;
        padding: var(--spacing-lg) 0;
        margin-bottom: var(--spacing-lg);
        border-bottom: 1px solid rgba(var(--text-color-rgb), 0.1);
    }
    
    .horizontal-item:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
}

.horizontal-title {
    position: relative;
    z-index: 2;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    font-size: clamp(2rem, 8vw, 7rem);
    font-weight: 600;
    color: var(--text-color);
}

.horizontal-text {
    position: relative;
    z-index: 2;
    background: rgba(var(--bg-color-rgb), 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 1.5rem;
    border-radius: 4px;
    font-size: clamp(1rem, 2vw, 1.5rem);
    max-width: 40ch;
    border: 1px solid rgba(var(--text-color-rgb), 0.05);
    transition: background 0.3s ease, transform 0.3s ease;
}

.horizontal-text:hover {
    background: rgba(var(--bg-color-rgb), 0.7);
    transform: translateY(-5px);
}

/* About section */
.about {
    padding: calc(var(--spacing-md) * 2) var(--spacing-md);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        transparent 0%,
        rgba(var(--bg-color-rgb), 0.8) 70%
    );
    z-index: 0;
}

.about-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: start;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-info {
    margin-bottom: 2rem;
}

.about-text h2 {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    line-height: 1;
}

.about-text p {
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 50ch;
}

.about-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-image:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.reveal-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    transform: translateX(0);
    transition: transform 1s var(--transition-smooth);
}

.about-image.revealed .reveal-mask {
    transform: translateX(100%);
}

/* Image hover effect */
.image-hover {
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    height: 250px;
    z-index: 98;
    pointer-events: none;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.image-hover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    transition: transform 0.5s ease;
    filter: grayscale(0.3);
}

.image-hover.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.image-hover.visible img {
    transform: scale(1);
    filter: grayscale(0);
}

.image-hover.distort img {
    animation: distortEffect 0.5s ease;
}

@keyframes distortEffect {
    0% { transform: scale(1.1) rotate(0deg); filter: blur(0); }
    25% { transform: scale(1.15) rotate(1deg); filter: blur(2px); }
    50% { transform: scale(1.2) rotate(-1deg); filter: blur(4px); }
    75% { transform: scale(1.15) rotate(1deg); filter: blur(2px); }
    100% { transform: scale(1.1) rotate(0deg); filter: blur(0); }
}

/* Scroll progress with enhanced visual feedback */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--tertiary-color) 100%);
    z-index: 9999;
    mix-blend-mode: difference;
    transition: width 0.1s linear, height 0.3s ease;
}

.scroll-progress.glow {
    height: 4px;
    box-shadow: 0 0 10px var(--accent-color), 0 0 5px var(--accent-color);
    transition: width 0.1s linear, box-shadow 0.3s ease, height 0.3s ease;
}

/* Language switch with improved accessibility */
.language-switch {
    position: fixed;
    top: var(--spacing-md);
    right: calc(var(--spacing-md) + 200px);
    display: flex;
    gap: 0.5rem;
    z-index: 100;
}

/* Language button styles with modern design */
.language-switch a {
    font-size: var(--font-size-xs);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s var(--transition-bounce);
    opacity: 0.7;
    font-weight: 500;
    background: rgba(var(--bg-color-rgb), 0.3);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(var(--text-color-rgb), 0.1);
    box-shadow: var(--shadow-sm);
}

.language-switch a.active {
    opacity: 1;
    background: rgba(var(--text-color-rgb), 0.1);
    border-color: rgba(var(--text-color-rgb), 0.2);
}

.language-switch a:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Enhanced mobile navigation */
nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background-color: rgba(var(--bg-color-rgb), 0.95);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 1000;
    transition: right 0.5s var(--transition-smooth);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    border-left: 1px solid rgba(var(--text-color-rgb), 0.1);
    overflow-y: auto;
    overscroll-behavior: contain;
}

nav.active {
    right: 0;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid rgba(var(--text-color-rgb), 0.1);
}

.nav-logo {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.nav-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* cursor: pointer; */
    background-color: rgba(var(--text-color-rgb), 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(var(--text-color-rgb), 0.05);
}

.nav-close:hover {
    background-color: rgba(var(--text-color-rgb), 0.15);
    transform: rotate(90deg);
}

nav ul {
    list-style: none;
    padding: var(--spacing-md);
    margin: 0;
}

nav li {
    margin-bottom: var(--spacing-sm);
}

nav a {
    display: block;
    padding: 0.8rem 0;
    color: var(--text-color);
    text-decoration: none;
    font-size: var(--font-size-md);
    transition: all 0.3s ease;
    position: relative;
    opacity: 0.8;
}

nav a:hover {
    opacity: 1;
    transform: translateX(8px);
}

.nav-divider {
    height: 1px;
    background-color: rgba(var(--text-color-rgb), 0.1);
    margin: var(--spacing-md) 0;
}

.language-item {
    margin-top: var(--spacing-md);
}

.language-label {
    font-size: var(--font-size-sm);
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.language-switch-nav {
    display: flex;
    gap: 0.5rem;
}

.language-btn-nav {
    font-size: var(--font-size-xs);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    background-color: rgba(var(--text-color-rgb), 0.1);
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(var(--text-color-rgb), 0.05);
    display: inline-block;
}

.language-btn-nav.active {
    background-color: rgba(var(--text-color-rgb), 0.2);
    font-weight: 500;
}

.language-btn-nav:hover {
    background-color: rgba(var(--text-color-rgb), 0.15);
    transform: translateY(-2px);
}

/* Enhanced menu overlay with blur effect */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1999; /* Below menus and nav */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none; /* Initially not blocking clicks */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.menu-open .menu-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Now blocking clicks */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Modern hamburger menu button - Enhanced visibility */
.mobile-menu-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex !important; /* Force display with !important */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* cursor: pointer; */
    z-index: 2001; /* Above tools menu and nav */
    background-color: #D4AF37; /* Gold background matching send button */
    border: 2px solid rgba(0, 0, 0, 0.2);
    transition: all 0.3s var(--transition-bounce);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    margin-left: 15px;
    transform: scale(1);
    --webkit-appearance: none; /* Fix for Safari */
    -webkit-transform: scale(1); /* Safari-specific transform */
    opacity: 1; /* Ensure it's not transparent */
    visibility: visible; /* Explicitly set visibility */
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 3px;
    background-color: #000; /* Black for high contrast */
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.mobile-menu-btn.active {
    background-color: #EFCB4B; /* Lighter gold when active */
    transform: rotate(180deg);
    -webkit-transform: rotate(180deg); /* Safari-specific transform */
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    -webkit-transform: translateY(9px) rotate(45deg); /* Safari-specific transform */
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    -webkit-transform: translateY(-9px) rotate(-45deg); /* Safari-specific transform */
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
    -webkit-transform: scale(1.1); /* Safari-specific transform */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* Ensure mobile menu button is always visible */
.header-right {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 18px !important;
}

/* Override media queries to ensure button is always displayed on Safari */
@media screen and (min-width: 0) {
    .mobile-menu-btn {
        display: flex !important;
    }
}

/* Specific Safari fixes using @supports */
@supports (-webkit-touch-callout: none) {
    .mobile-menu-btn {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Adaptive layout for different devices */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex !important;
    }
    
    .header-right {
        gap: 12px !important;
    }
}

@media (min-width: 769px) {
    .header-right {
        display: flex !important;
        align-items: center !important;
    }
    
    .tools-icon {
        margin-right: 0;
    }
    
    /* Display menu button on all devices for now since Safari is having issues */
    .mobile-menu-btn {
        display: flex !important;
    }
}

/* Very small mobile devices */
@media (max-width: 360px) {
    .tools-icon {
        width: 34px;
        height: 34px;
        margin-right: 6px;
    }
    
    .tools-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    header {
        padding: 0.7rem;
    }
    
    .mobile-menu-btn {
        width: 36px;
        height: 36px;
        display: flex !important;
    }
}

/* Landscape mode on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .tools-icon {
        width: 36px;
        height: 36px;
    }
    
    header {
        padding: 0.7rem 1rem;
    }
    
    .tools-menu {
        overflow-y: auto;
    }
    
    nav {
        overflow-y: auto;
    }
    
    .nav-header {
        padding: 0.8rem var(--spacing-md);
    }
    
    nav ul {
        padding: 0.8rem var(--spacing-md);
    }
    
    nav li {
        margin-bottom: 0.5rem;
    }
    
    nav a {
        padding: 0.5rem 0;
    }
}

/* Footer */
footer {
    padding: calc(var(--spacing-md) * 2) var(--spacing-md) var(--spacing-md);
    position: relative;
    z-index: 1;
    background-color: var(--bg-color);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-top: 1px solid rgba(var(--text-color-rgb), 0.1);
}

.footer-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.footer-logo {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1;
}

.footer-text {
    position: relative;
    z-index: 2;
    background: rgba(var(--bg-color-rgb), 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 1rem;
    border-radius: 4px;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    line-height: 1.6;
    max-width: 35ch;
    border: 1px solid rgba(var(--text-color-rgb), 0.05);
    transition: background 0.3s ease, transform 0.3s ease;
}

.footer-text:hover {
    background: rgba(var(--bg-color-rgb), 0.7);
    transform: translateY(-5px);
}

.footer-links h3 {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    text-decoration: none;
    color: var(--text-color);
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
    position: relative;
    display: inline-block;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--secondary-color);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--secondary-color);
    transform: translateX(5px);
}

.footer-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left center;
}

.footer-bottom {
    margin-top: var(--spacing-lg);
    padding-top: 1.5rem;
    border-top: 1px solid rgba(var(--text-color-rgb), 0.1);
    text-align: center;
    font-size: clamp(0.8rem, 1vw, 0.9rem);
    opacity: 0.6;
}

/* Landing page styles */
.landing-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: var(--spacing-md);
    position: relative;
    text-align: center;
}

.landing-title {
    font-size: clamp(3rem, 15vw, 8rem);
    font-weight: 600;
    line-height: 0.9;
    margin-bottom: var(--spacing-md);
    overflow: hidden;
    text-align: center;
    width: 100%;
}

.landing-title span {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
    animation: titleReveal 1s var(--transition-smooth) forwards;
}

.progress-container {
    width: 100%;
    max-width: 400px;
    height: 1px;
    background-color: rgba(var(--text-color-rgb), 0.2);
    margin-bottom: var(--spacing-md);
    position: relative;
    overflow: hidden;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: var(--text-color);
    transition: width 0.05s linear;
}

.loading-text {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.loading-text:hover {
    color: var(--secondary-color);
}

.language-options {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    justify-content: center;
}

.language-btn {
    position: relative;
    z-index: 2;
    background: rgba(var(--bg-color-rgb), 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 1rem;
    text-decoration: none;
    color: var(--text-color);
    padding: 0.8rem 2rem;
    border: 1px solid rgba(var(--text-color-rgb), 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease, transform 0.3s ease;
    border-radius: 4px;
}

.language-btn:hover {
    color: var(--bg-color);
    transform: translateY(-3px);
    border-color: var(--text-color);
}

.language-btn.active {
    background-color: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
}

/* Background elements */
.bg-element {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    z-index: -1;
    will-change: transform;
}

.bg-element-1 {
    width: 300px;
    height: 300px;
    background-color: var(--secondary-color);
    top: -150px;
    right: -150px;
    animation: float 15s ease-in-out infinite;
}

.bg-element-2 {
    width: 200px;
    height: 200px;
    background-color: var(--tertiary-color);
    bottom: -100px;
    left: -100px;
    animation: float 18s ease-in-out infinite reverse;
}

.bg-element-3 {
    width: 250px;
    height: 250px;
    background-color: var(--quaternary-color);
    bottom: 20%;
    right: 10%;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(-5%, 5%);
    }
    50% {
        transform: translate(5%, 10%);
    }
    75% {
        transform: translate(10%, -5%);
    }
}

/* Mobile menu button styles - Always visible on mobile */
.mobile-menu-btn {
    display: none; /* Hidden by default, shown on mobile */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.3s ease;
    position: relative;
    padding: 15px;
    margin: -15px;
    background: transparent;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
    pointer-events: none;
}

/* Mobile menu button animation */
.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile menu button hover effects */
.mobile-menu-btn:hover {
    transform: scale(1.1);
}

.mobile-menu-btn:hover span {
    background-color: var(--secondary-color);
}

/* Menu overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.menu-open .menu-overlay {
    display: block;
    /*opacity: 1;*/
}

/* Navigation header styles */
.nav-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    width: 100%;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.nav-close {
    cursor: pointer;
    font-size: 1.8rem;
    color: var(--text-color);
    transition: transform 0.3s ease;
}

.nav-close:hover {
    transform: rotate(90deg);
    color: var(--secondary-color);
}

/* Desktop navigation styles */
@media (min-width: 769px) {
    nav {
        position: relative;
        transform: none;
        max-width: none;
        height: auto;
        background-color: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 0;
        visibility: visible;
        box-shadow: none;
        overflow-y: visible;
        width: auto;
    }
    
    nav ul {
        display: flex;
        flex-direction: row;
    }
    
    .nav-header {
        display: none;
    }
}

/* Mobile navigation styles */
@media (max-width: 768px) {
    :root {
        --spacing-xs: 0.25rem;
        --spacing-sm: 0.5rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
        --font-size-xs: 0.75rem;
        --font-size-sm: 0.875rem;
        --font-size-md: 1rem;
        --font-size-lg: 1.5rem;
        --font-size-xl: 2rem;
        --font-size-xxl: 2.5rem;
    }
    
    body, html {
        overflow-x: hidden;
    }
    
    .container {
        padding: var(--spacing-md);
    }
    
    .horizontal-section {
        height: auto;
        overflow: visible;
    }
    
    .horizontal-content {
        position: relative;
        flex-direction: column;
        height: auto;
        width: 100%;
    }
    
    .horizontal-item {
        width: 100%;
        height: auto;
        padding: var(--spacing-lg) var(--spacing-md);
        margin-bottom: var(--spacing-xl);
    }
    
    .horizontal-title {
        font-size: var(--font-size-xl);
        margin-bottom: var(--spacing-md);
    }
    
    .horizontal-text {
        font-size: var(--font-size-md);
    }
    
    /* Improved mobile menu */
    .mobile-menu-btn {
        display: flex;
        top: 15px;
        right: 15px;
        z-index: 1002;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: rgba(var(--bg-color-rgb), 0.95);
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1001;
        padding: 80px 20px 20px;
        overflow-y: auto;
        visibility: hidden;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    }
    
    nav.active {
        transform: translateX(0);
        visibility: visible;
    }
    
    nav ul {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    nav a {
        font-size: var(--font-size-lg);
        padding: var(--spacing-sm) 0;
        opacity: 0.8;
    }
    
    nav a:hover {
        opacity: 1;
        transform: translateX(10px);
    }
    
    /* Improved language switch for mobile */
    .language-switch {
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 100;
    }
    
    .language-switch a {
        font-size: var(--font-size-sm);
        padding: 5px 8px;
    }
    
    /* Improved hero section for mobile */
    .hero {
        min-height: 100vh;
        padding: 100px var(--spacing-md) var(--spacing-xl);
    }
    
    .hero-title {
        font-size: var(--font-size-xxl);
        margin-bottom: var(--spacing-lg);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-md);
        max-width: 100%;
    }
    
    /* Improved projects section for mobile */
    .projects {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    .project-item {
        margin-bottom: var(--spacing-lg);
    }
    
    /* Improved about section for mobile */
    .about {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-image {
        width: 100%;
        margin-top: var(--spacing-lg);
    }
    
    /* Improved footer for mobile */
    footer {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--spacing-xl);
    }
    
    .footer-links {
        width: 100%;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    :root {
        --font-size-lg: 1.25rem;
        --font-size-xl: 1.75rem;
        --font-size-xxl: 2.25rem;
    }
    
    .hero-title {
        font-size: var(--font-size-xxl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-sm);
    }
    
    .btn {
        font-size: var(--font-size-sm);
        padding: 8px 16px;
    }
    
    .section-title {
        font-size: var(--font-size-xl);
    }
    
    .project-title {
        font-size: var(--font-size-md);
    }
    
    .project-category {
        font-size: var(--font-size-xs);
    }
    
    .horizontal-title {
        font-size: var(--font-size-lg);
    }
    
    .horizontal-text {
        font-size: var(--font-size-sm);
    }
    
    .about-text h2 {
        font-size: var(--font-size-xl);
    }
    
    .about-text p {
        font-size: var(--font-size-sm);
    }
    
    .footer-logo {
        font-size: var(--font-size-xl);
    }
    
    .footer-text p {
        font-size: var(--font-size-sm);
    }
    
    .footer-links h3 {
        font-size: var(--font-size-md);
    }
    
    .footer-links a {
        font-size: var(--font-size-sm);
    }
}

/* Additional styles for text visibility and overlapping fixes */

/* Text visibility improvements */
.text-container {
    position: relative;
    z-index: 1;
    isolation: isolate;
}

/* Prevent text overlapping */
.text-layer {
    position: relative;
    z-index: 2;
    mix-blend-mode: difference;
}

/* Text contrast enhancement */
.text-contrast {
    position: relative;
    color: var(--text-color);
    mix-blend-mode: normal;
    text-shadow: none;
    transition: color 0.3s ease;
}

.text-contrast:hover {
    color: var(--secondary-color);
}

/* Text background for better readability */
.text-bg {
    position: relative;
    z-index: 2;
    background: rgba(var(--bg-color-rgb), 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 1.5rem;
    border-radius: 4px;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.6;
    border: 1px solid rgba(var(--text-color-rgb), 0.05);
    transition: background 0.3s ease, transform 0.3s ease;
}

.text-bg:hover {
    background: rgba(var(--bg-color-rgb), 0.7);
    transform: translateY(-5px);
}

.text-bg::before {
    content: none;
}

/* Enhanced hero title visibility */
.hero-title {
    position: relative;
    z-index: 2;
    font-size: clamp(3rem, 15vw, 10rem);
    font-weight: 600;
    line-height: 0.9;
    margin-bottom: 2rem;
    max-width: 20ch;
    color: var(--text-color);
}

.hero-title .row {
    position: relative;
    overflow: visible;
    line-height: 1.1;
    margin-bottom: 0.2em;
}

.hero-title .row:last-child {
    margin-bottom: 0;
}

/* Improved subtitle readability */
.hero-subtitle {
    position: relative;
    z-index: 2;
    background: rgba(var(--bg-color-rgb), 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 1.5rem;
    border-radius: 4px;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 400;
    margin-bottom: 2rem;
    max-width: 40ch;
    overflow: hidden;
    border: 1px solid rgba(var(--text-color-rgb), 0.05);
    transition: background 0.3s ease, transform 0.3s ease;
}

.hero-subtitle:hover {
    background: rgba(var(--bg-color-rgb), 0.7);
    transform: translateY(-5px);
}

/* Project title improvements */
.project-title {
    position: relative;
    z-index: 2;
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 500;
    line-height: 1.2;
    transition: color 0.3s ease, transform 0.3s ease;
    color: var(--text-color);
}

.project-title:hover {
    color: var(--secondary-color);
    transform: translateX(10px);
}

/* Section title enhancements */
.section-title {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 600;
    margin-bottom: 2rem;
    position: relative;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.section-title:hover {
    color: var(--secondary-color);
}

/* Horizontal section text improvements */
.horizontal-item {
    position: relative;
    padding: 2rem;
}

.horizontal-title {
    position: relative;
    z-index: 2;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    font-size: clamp(2rem, 8vw, 7rem);
    font-weight: 600;
    color: var(--text-color);
}

.horizontal-text {
    position: relative;
    z-index: 2;
    background: rgba(var(--bg-color-rgb), 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 1.5rem;
    border-radius: 4px;
    font-size: clamp(1rem, 2vw, 1.5rem);
    max-width: 40ch;
    border: 1px solid rgba(var(--text-color-rgb), 0.05);
    transition: background 0.3s ease, transform 0.3s ease;
}

.horizontal-text:hover {
    background: rgba(var(--bg-color-rgb), 0.7);
    transform: translateY(-5px);
}

/* Footer text improvements */
.footer-content {
    position: relative;
    z-index: 2;
}

.footer-text {
    position: relative;
    z-index: 2;
    background: rgba(var(--bg-color-rgb), 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 1rem;
    border-radius: 4px;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    line-height: 1.6;
    max-width: 35ch;
    border: 1px solid rgba(var(--text-color-rgb), 0.05);
    transition: background 0.3s ease, transform 0.3s ease;
}

.footer-text:hover {
    background: rgba(var(--bg-color-rgb), 0.7);
    transform: translateY(-5px);
}

/* Navigation text improvements */
nav a {
    position: relative;
    z-index: 2;
    mix-blend-mode: difference;
}

/* Language switch improvements */
.language-btn {
    position: relative;
    z-index: 2;
    background: rgba(var(--bg-color-rgb), 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Loading text improvements */
.loading-text {
    position: relative;
    z-index: 2;
    mix-blend-mode: difference;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Mobile menu text improvements */
.mobile-menu {
    position: relative;
    z-index: 1000;
}

.mobile-menu-content {
    position: relative;
    z-index: 1001;
    background: rgba(var(--bg-color-rgb), 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Text animations refinements */
@keyframes textReveal {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes textFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Text hover effects */
.text-hover {
    position: relative;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.text-hover:hover {
    color: var(--secondary-color);
}

/* Magnetic text effect */
.magnetic-text {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.75, 0, 0.25, 1);
}

/* Scroll-triggered text animations */
.fade-up {
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

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

/* Text gradient effect */
.text-gradient {
    background: linear-gradient(
        45deg,
        var(--secondary-color),
        var(--tertiary-color),
        var(--quaternary-color)
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientMove 8s ease infinite;
    text-shadow: none;
    transition: filter 0.3s ease;
}

.text-gradient:hover {
    filter: brightness(1.2);
}

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

/* Text mask reveal effect */
.text-mask {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.text-mask span {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
    animation: textReveal 0.8s var(--transition-smooth) forwards;
    animation-delay: 0.3s;
}

.text-mask.revealed span {
    transform: translateY(0);
    opacity: 1;
}

.text-mask::after {
    content: none;
}

/* Responsive text adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: clamp(2rem, 10vw, 4rem);
    }

    .hero-subtitle {
        font-size: clamp(1rem, 4vw, 1.2rem);
        padding: 0.8rem;
    }

    .section-title {
        font-size: clamp(1.8rem, 8vw, 3rem);
    }

    .horizontal-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }

    .horizontal-text {
        font-size: clamp(0.9rem, 3vw, 1.1rem);
        padding: 0.8rem;
    }
}

/* Dark mode text adjustments */
@media (prefers-color-scheme: dark) {
    .text-bg::before {
        background-color: rgba(0, 0, 0, 0.85);
    }

    .text-contrast {
        text-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .text-bg::before {
        background-color: var(--bg-color);
        opacity: 0.5;
    }

    .text-contrast {
        text-shadow: none;
    }
}

/* Fix for loader positioning */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 9997;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hide {
    opacity: 0;
    visibility: hidden;
}

.loader-text {
    font-size: clamp(2rem, 7vw, 5rem);
    font-weight: 500;
    overflow: hidden;
    line-height: 1;
    text-align: center;
    position: relative;
    z-index: 2;
    color: var(--text-color);
    transition: transform 0.3s ease, color 0.3s ease;
}

.loader-text:hover {
    transform: scale(1.05);
    color: var(--secondary-color);
}

.counter {
    position: relative;
    font-size: 1.2rem;
    font-weight: 400;
    margin-top: 2rem;
    text-align: center;
    color: var(--text-color);
    transition: color 0.3s ease;
}

/* Additional animation for page transitions */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.6s var(--transition-smooth);
}

.page-transition.active {
    transform: translateY(0%);
}

.page-transition.exit {
    transform: translateY(-100%);
}

/* Page loaded animation */
.page-loaded .hero-title .row span {
    animation: none;
    transform: translateY(0);
    opacity: 1;
}

body.page-loaded {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Noise texture effect */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 90;
    /*opacity: 1;*/
    mix-blend-mode: overlay;
}

/* Fix for staggered items visibility */
.staggered-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Fix for reveal elements */
.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fix for menu open state */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Fix for word and character animations */
.word {
    display: inline-block;
    overflow: hidden;
    margin-right: 0.25em;
}

.char {
    display: inline-block;
    transform: translateY(100%);
    animation: charReveal 0.5s forwards;
}

@keyframes charReveal {
    to {
        transform: translateY(0);
    }
}

/* Fix for scramble text effect */
.scramble-char {
    display: inline-block;
    color: var(--accent-color);
    opacity: 0.8;
}

/* Fix for subtitle animation */
@keyframes subtitleReveal {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Fix for title animation */
@keyframes titleReveal {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Custom selection color */
::selection {
    background-color: var(--secondary-color);
    color: var(--bg-color);
    text-shadow: none;
}

::-moz-selection {
    background-color: var(--secondary-color);
    color: var(--bg-color);
    text-shadow: none;
}

/* Custom selection for specific elements */
.text-gradient::selection {
    background-color: var(--tertiary-color);
    color: var(--bg-color);
    -webkit-text-fill-color: var(--bg-color);
}

.text-gradient::-moz-selection {
    background-color: var(--tertiary-color);
    color: var(--bg-color);
    -webkit-text-fill-color: var(--bg-color);
}

.hero-title::selection {
    background-color: var(--quaternary-color);
    color: var(--text-color);
}

.hero-title::-moz-selection {
    background-color: var(--quaternary-color);
    color: var(--text-color);
}

/* Selection for links */
a::selection {
    background-color: var(--tertiary-color);
    color: var(--bg-color);
}

a::-moz-selection {
    background-color: var(--tertiary-color);
    color: var(--bg-color);
}

/* Selection for code or pre elements if you have them */
code::selection, pre::selection {
    background-color: var(--quaternary-color);
    color: var(--text-color);
}

code::-moz-selection, pre::-moz-selection {
    background-color: var(--quaternary-color);
    color: var(--text-color);
}

/* Fix main content to prevent overflow */
main {
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

@media (min-width: 1200px) {
    .horizontal-content {
        width: 400%;
    }
    
    .horizontal-item {
        width: 25%;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .horizontal-content {
        width: 300%;
    }
    
    .horizontal-item {
        width: 33.33%;
    }
}

@media (max-width: 767px) {
    .horizontal-section {
        height: auto;
        padding: var(--spacing-lg) 0;
    }
    
    .horizontal-content {
        position: relative;
        width: 100%;
        flex-direction: column;
        height: auto;
    }
    
    .horizontal-item {
        width: 100%;
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }
    
    .horizontal-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }
}

/* Add styles for nav header */
.nav-header {
    display: none;
}

@media (max-width: 768px) {
    .nav-header {
        display: flex;
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        transition-delay: 0.05s;
    }
    
    nav.active .nav-header {
        opacity: 1;
        transform: translateY(0);
    }
    
    header {
        padding: var(--spacing-sm);
        background: rgba(var(--bg-color-rgb), 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

/* Add overlay when menu is open */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.menu-open .menu-overlay {
    display: block;
    opacity: 1;
}

/* Fix animations for mobile */
@media (max-width: 768px) {
    .staggered-item {
        transform: translateY(20px);
        opacity: 0;
        transition: transform 0.5s ease, opacity 0.5s ease;
    }
    
    .staggered-item.visible {
        transform: translateY(0);
        opacity: 1;
    }
    
    /* Fix language switch for mobile */
    .language-switch {
        position: fixed;
        top: var(--spacing-md);
        right: calc(var(--spacing-md) + 50px);
        z-index: 1000;
    }
    
    .language-switch a {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Fix nav position for mobile */
    nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        max-width: 300px;
        height: 100vh;
        background-color: rgba(var(--bg-color-rgb), 0.95);
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
        padding: calc(var(--spacing-lg) * 2) var(--spacing-md) var(--spacing-md);
        overflow-y: auto;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap target sizes for mobile */
    a, button, .btn, .mobile-menu-btn, .nav-close, .language-btn {
        min-height: 44px;
        min-width: 44px;
        padding: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Adjust padding for navigation links */
    nav a {
        padding: 12px 0;
        margin: 4px 0;
    }
    
    /* Remove hover effects that don't work well on touch devices */
    a:hover, .btn:hover, .mobile-menu-btn:hover, .nav-close:hover {
        transform: none !important;
    }
    
    /* Disable magnetic effect on touch devices */
    .magnetic {
        transform: none !important;
    }
    
    /* Make sure buttons have proper touch feedback */
    .btn:active, .mobile-menu-btn:active, .nav-close:active, .language-btn:active {
        opacity: 0.7;
    }
    
    /* Hide cursor on touch devices 
    .cursor, .cursor-follower {
        display: none !important;
    }
    
    /* Improve scrolling performance */
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix sticky hover states on mobile */
    .project-item:hover, .horizontal-item:hover, .about-image:hover, 
    .footer-links a:hover, .text-hover:hover, .text-gradient:hover {
        transform: none !important;
    }
}

/* Fix for mobile viewport height issues */
.hero, .horizontal-section {
    height: 100vh; /* Fallback */
    height: calc(var(--vh, 1vh) * 100);
}

@media (max-width: 768px) {
    .horizontal-section {
        height: auto;
        min-height: calc(var(--vh, 1vh) * 70);
    }
}

/* Magnetic Elements */
.magnetic {
    display: inline-block;
    position: relative;
    will-change: transform;
    transform-style: preserve-3d;
    /* backface-visibility: hidden; */
    transform: translate3d(0, 0, 0);
    /* cursor: pointer; */
    transition: transform 0.05s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.magnetic:hover {
    z-index: 10;
}

.btn.magnetic {
    overflow: hidden;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.btn.magnetic::before {
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
}

/* Improve magnetic effect on mobile */
@media (hover: none) and (pointer: coarse) {
    .magnetic span {
        transform: none !important;
        transition: none !important;
    }
    
    .magnetic {
        transform: none !important;
        transition: none !important;
    }
    
    .magnetic::after {
        display: none;
    }
    
    .magnetic.active {
        transform: scale(0.95) !important;
        transition: transform 0.2s ease !important;
    }
}

.cursor.magnetic-hover {
    background-color: rgba(var(--accent-color), 0.8);
    mix-blend-mode: difference;
    transform: translate(-50%, -50%) scale(1.2);
    filter: blur(2px) drop-shadow(0 0 8px rgba(var(--accent-color), 0.5));
}

.cursor-follower.magnetic-hover {
    border-color: rgba(var(--accent-color), 0.8);
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0.8;
    /* filter: blur(1px); */
}

.cursor.hover.magnetic-hover {
    transform: translate(-50%, -50%) scale(1.5);
}

.cursor-follower.hover.magnetic-hover {
    transform: translate(-50%, -50%) scale(2.2);
}

.magnetic span {
    display: inline-block;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    transition: transform 0.05s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: 2;
    backface-visibility: hidden;
}

.magnetic.active {
    transform: scale(0.95) !important;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.magnetic.active span {
    transform: scale(0.95) !important;
}

.btn.magnetic.active {
    transform: scale(0.95) !important;
}

.btn.magnetic span {
    position: relative;
    z-index: 2;
    backface-visibility: hidden;
}

.btn.magnetic.active::before {
    opacity: 1;
    transform: scale(1.1);
}

.magnetic::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(var(--accent-color), 0);
    opacity: 0;
    z-index: -1;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
}

.magnetic:hover::after {
    opacity: 0.5;
    box-shadow: 0 0 20px 5px rgba(var(--accent-color), 0.3);
}

.btn.magnetic:hover::after {
    opacity: 0.7;
    box-shadow: 0 0 30px 8px rgba(var(--accent-color), 0.4);
}

@keyframes magneticPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--accent-color), 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(var(--accent-color), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--accent-color), 0);
    }
}

.magnetic.active::after {
    animation: magneticPulse 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

.btn.magnetic.active::after {
    animation: magneticPulse 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

/* Tools Menu Additional Animations */
.tools-menu.active .tool-item {
    opacity: 1;
    transform: translateY(0);
}

.tools-menu.active .tool-item:nth-child(1) { transition-delay: 0.1s; }
.tools-menu.active .tool-item:nth-child(2) { transition-delay: 0.15s; }
.tools-menu.active .tool-item:nth-child(3) { transition-delay: 0.2s; }
.tools-menu.active .tool-item:nth-child(4) { transition-delay: 0.25s; }
.tools-menu.active .tool-item:nth-child(5) { transition-delay: 0.3s; }
.tools-menu.active .tool-item:nth-child(6) { transition-delay: 0.35s; }

.tool-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--accent-color), 0.2);
    border-radius: 12px;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: -1;
}

.tool-item:hover .tool-icon::before {
    transform: scale(1.5);
    opacity: 0.5;
}

/* Tools Icon Animation */
.tools-icon svg {
    transition: transform 0.5s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

.tools-icon:hover svg {
    transform: translate(-50%, -50%) rotate(90deg);
    color: var(--accent-color);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--accent-color), 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(var(--accent-color), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--accent-color), 0); }
}

.tools-icon:hover {
    background-color: rgba(var(--text-color-rgb), 0.2);
    animation: pulse 1.5s infinite;
}

/* Fix for tools icon animation on hover */
.tools-icon svg {
    will-change: transform;
}

/* Ensure the tools icon is perfectly centered on mobile too */
@media (max-width: 768px) {
    .tools-icon {
        display: none;
    }
}

/* Pulse animation for tools icon */
.tools-icon.pulse-animation {
    animation: iconPulse 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes iconPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Ensure the tools icon SVG is perfectly centered */
.tools-icon svg {
    will-change: transform;
    transform-origin: center center;
}

/* Fix for Safari */
@supports (-webkit-touch-callout: none) {
    .tools-icon svg {
        transform: translate(-50%, -50%);
    }
    
    .tools-icon:hover svg {
        transform: translate(-50%, -50%) rotate(-90deg);
    }
}

/* Accessibility - Visually hidden text */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile-specific styles for tools icon */
@media (max-width: 768px) {
    .header-right {
        gap: 8px;
    }
    
    .tools-icon {
        display: flex;
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }
    
    .tools-icon svg {
        width: 20px;
        height: 20px;
    }
    
    /* Adjust header layout for mobile */
    header {
        justify-content: space-between;
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .logo {
        font-size: 1.5rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .tools-icon {
        width: 32px;
        height: 32px;
        margin-right: 8px;
    }
    
    .tools-icon svg {
        width: 18px;
        height: 18px;
    }
    
    header {
        padding: var(--spacing-sm) var(--spacing-sm);
    }
    
    .header-right {
        gap: 5px;
    }
}

/* Fix for Safari on mobile */
@supports (-webkit-touch-callout: none) and (max-width: 768px) {
    .tools-icon svg {
        transform: translate(-50%, -50%);
    }
}

/* Mobile menu styles */
nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 1000;
    padding: var(--spacing-md);
    transition: right 0.5s var(--transition-smooth);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    display: block;
    overflow-y: auto;
}

nav.active {
    right: 0;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid rgba(var(--text-color-rgb), 0.1);
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-close {
    font-size: 2rem;
    /* cursor: pointer; */
    transition: all 0.3s ease;
}

.nav-close:hover {
    transform: rotate(90deg);
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

nav li {
    margin-bottom: var(--spacing-sm);
}

nav a {
    display: block;
    padding: var(--spacing-sm) 0;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

nav a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.nav-divider {
    height: 1px;
    background-color: rgba(var(--text-color-rgb), 0.1);
    margin: var(--spacing-md) 0;
}

.language-item {
    margin-top: var(--spacing-md);
}

.language-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

.language-switch-nav {
    display: flex;
    gap: 10px;
}

.language-btn-nav {
    padding: 5px 15px;
    border-radius: 20px;
    background-color: rgba(var(--text-color-rgb), 0.1);
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.language-btn-nav.active {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

.language-btn-nav:hover {
    background-color: rgba(var(--text-color-rgb), 0.2);
}

/* Menu overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    backdrop-filter: blur(3px);
}

body.menu-open .menu-overlay {
    opacity: 1;
    visibility: visible;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    /* cursor: pointer; */
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Show mobile menu button on mobile */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
}

/* Fix for tools icon on all devices */
@media (min-width: 769px) {
    .header-right {
        display: flex;
        align-items: center;
    }
    
    .tools-icon {
        margin-right: 0;
    }
    
    .mobile-menu-btn {
        display: none;
    }
}

/* Fix for very small devices */
@media (max-width: 360px) {
    .tools-icon {
        width: 30px;
        height: 30px;
        margin-right: 5px;
    }
    
    .tools-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    header {
        padding: 8px 10px;
    }
}

/* Fix for landscape mode on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .tools-icon {
        width: 32px;
        height: 32px;
    }
    
    header {
        padding: 8px 15px;
    }
    
    .tools-menu {
        overflow-y: auto;
    }
}

/* Update the header-right container to align items properly */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

/* Make both icons magnetic on the same horizontal axis */
.mobile-menu-btn,
.tools-icon {
    position: relative;
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Magnetic effect for both icons */
.mobile-menu-btn.magnetic,
.tools-icon.magnetic {
    display: inline-block;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* Horizontal magnetic movement */
.mobile-menu-btn.magnetic:hover,
.tools-icon.magnetic:hover {
    transform: translateX(10px);
}

/* Active state for magnetic effect */
.mobile-menu-btn.magnetic:active,
.tools-icon.magnetic:active {
    transform: scale(0.95);
}

/* Add smooth transition for hover effect */
.mobile-menu-btn.magnetic,
.tools-icon.magnetic {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Ensure proper spacing between icons */
.header-right {
    gap: 12px;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .header-right {
        gap: 8px;
    }
    
    .mobile-menu-btn,
    .tools-icon {
        transform: none !important; /* Disable magnetic effect on mobile */
    }
}

/* Add these new styles after your existing CSS */

/* Enhanced Carousel Styles */
.carousel-section {
    position: relative;
    overflow: hidden;
    height: 70vh;
    margin: 2rem 0;
}

.carousel-container {
    height: 100%;
    display: flex;
    transition: transform 0.5s var(--transition-smooth);
    touch-action: pan-y pinch-zoom;
}

.carousel-item {
    flex: 0 0 100%;
    position: relative;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    transition: transform 0.5s var(--transition-smooth);
}

.carousel-item:hover img {
    transform: scale(1);
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    transform: translateY(100%);
    transition: transform 0.5s var(--transition-smooth);
}

.carousel-item:hover .carousel-caption {
    transform: translateY(0);
}

.carousel-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: transparent;
    /* cursor: pointer; */
    transition: all 0.3s var(--transition-bounce);
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

/* Enhanced Animation Classes */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--transition-smooth),
                transform 0.6s var(--transition-smooth);
}

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

.reveal-element {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s var(--transition-smooth),
                transform 0.6s var(--transition-smooth);
}

.reveal-element.visible {
    opacity: 1;
    transform: scale(1);
}

/* Enhanced Magnetic Effect */
.magnetic {
    display: inline-block;
    transition: transform 0.3s var(--transition-bounce);
}

.magnetic:hover {
    transform: scale(1.1);
}

/* Enhanced Loader */
.loader-text span {
    display: inline-block;
    opacity: 0;
    transform: translateY(1em);
    animation: textReveal 0.5s var(--transition-smooth) forwards;
}

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

/* Enhanced Mobile Styles */
@media (max-width: 768px) {
    .carousel-section {
        height: 50vh;
    }

    .carousel-caption {
        padding: 1rem;
        transform: translateY(0);
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    }

    .carousel-dots {
        bottom: 1rem;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
    .carousel-caption {
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    }

    .carousel-dot {
        border-color: var(--text-color);
    }

    .carousel-dot.active {
        background: var(--text-color);
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .carousel-caption {
        transform: translateY(0);
    }

    .magnetic:hover {
        transform: none;
    }

    .carousel-item:hover img {
        transform: none;
    }
}

/* Accessibility Improvements */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Focus States */
:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* Print Styles */
@media print {
    .carousel-section,
    .loader
    /*, .cursor, */
    /* .cursor-follower*/{ 
        display: none;
    }

    .about-content {
        page-break-inside: avoid;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* Add these fixes to the end of your CSS file */

/* Fix cursor performance 
.cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background-color: var(--text-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    transition: width 0.3s, height 0.3s, background-color 0.3s;
    backface-visibility: hidden;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid var(--text-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    transition: width 0.3s, height 0.3s, border-color 0.3s, opacity 0.3s;
    backface-visibility: hidden;
}

/* Fix menu positioning */
nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background-color: rgba(var(--bg-color-rgb), 0.95);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    border-left: 1px solid rgba(var(--text-color-rgb), 0.1);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateZ(0);
    will-change: right;
}

.tools-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background-color: rgba(var(--bg-color-rgb), 0.95);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    border-left: 1px solid rgba(var(--text-color-rgb), 0.1);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateZ(0);
    will-change: right;
}

/* Fix menu overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    display: none;
    transition: opacity 0.4s ease;
}

/* Fix overflow issues */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    max-width: 100vw;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
}

footer {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Fix background elements */
.bg-element {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    backface-visibility: hidden;
}

/* Fix carousel */
.carousel-section {
    position: relative;
    overflow: hidden;
    height: 70vh;
    margin: 2rem 0;
    transform: translateZ(0);
}

.carousel-container {
    height: 100%;
    display: flex;
    transition: transform 0.5s var(--transition-smooth);
    touch-action: none;
    will-change: transform;
}

.carousel-item {
    flex: 0 0 100%;
    position: relative;
    overflow: hidden;
    touch-action: none;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

/* Fix horizontal scroll section */
.horizontal-section {
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.horizontal-content {
    display: flex;
    transition: transform 0.5s var(--transition-smooth);
    will-change: transform;
}

/* Fix magnetic effect */
.magnetic {
    display: inline-block;
    transition: transform 0.3s var(--transition-bounce);
    transform: translate3d(0, 0, 0);
    will-change: transform;
    backface-visibility: hidden;
}

/* Fix for mobile devices */
@media (max-width: 768px) {
    /* .cursor, .cursor-follower {
        display: none;
    }
    
    * {
        cursor: auto !important;
    }
    
    a, button, .btn, .tool-item, .project-item, .horizontal-item, .magnetic {
        cursor: pointer !important;
    } */
    
    .carousel-section {
        height: 50vh;
    }
}

/* Fix for touch devices */
@media (hover: none) {
    /* .cursor, .cursor-follower {
        display: none;
    }
    
    * {
        cursor: auto !important;
    }
    
    a, button, .btn, .tool-item, .project-item, .horizontal-item, .magnetic {
        cursor: pointer !important;
    } */
}

/* Add these styles at the end of the file */
body.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

body.dark-mode .btn {
    background-color: #333;
    color: #ffffff;
}

body.dark-mode .btn:hover {
    background-color: #444;
}

body.dark-mode .hero::before,
body.dark-mode .projects::before,
body.dark-mode .about::before {
    background-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .carousel-item::before {
    background-color: rgba(0, 0, 0, 0.5);
}

body.dark-mode .carousel-caption {
    color: #ffffff;
}

body.dark-mode .footer-content {
    background-color: #222;
}

body.dark-mode .footer-text {
    color: #ffffff;
}

body.dark-mode .footer-links a {
    color: #ffffff;
}

body.dark-mode .footer-links a:hover {
    color: #cccccc;
}

/* Toast Notification Styles */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    background-color: #333;
    color: white;
    border-radius: 5px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast.show {
    opacity: 1;
}

.toast-success {
    background-color: #4CAF50;
}

.toast-error {
    background-color: #f44336;
}

.toast-info {
    background-color: #2196F3;
}

/* Form Error Styles */
.input-error {
    border: 2px solid #f44336;
}

.error-message {
    color: #f44336;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Search Highlight */
.search-highlight {
    background-color: rgba(255, 255, 0, 0.3);
    transition: background-color 0.5s ease;
}

/* Contact Form Styles */
.contact-form {
    display: grid;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--text-color);
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.contact-form button {
    background-color: var(--accent-color);
    color: var(--bg-color);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    /* cursor: pointer; */
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background-color: var(--secondary-color);
}

/* Team section with improved horizontal scrolling */
.team-section {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    margin-bottom: 3rem;
    padding-top: 2rem;
}

.team-section .section-title {
    z-index: 10;
    position: relative;
    text-align: center;
    margin-bottom: 2rem;
}

.team-section .horizontal-content {
    position: absolute;
    top: 80px;
    left: 0;
    width: max-content;
    height: calc(100% - 80px);
    display: flex;
    align-items: center;
    padding: 2rem 10vw 2rem;
    will-change: transform;
    animation: autoScroll 30s linear infinite;
}

@keyframes autoScroll {
    0% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(calc(-100% + 100vw));
    }
    100% {
        transform: translateX(0);
    }
}

/* Pause animation on hover */
.team-section:hover .horizontal-content {
    animation-play-state: paused;
}

.team-section .horizontal-item {
    min-width: 500px;
    width: 40vw;
    max-width: 700px;
    height: 80vh;
    max-height: 700px;
    margin-right: 8rem;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 2.5rem;
    border-radius: 10px;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--bg-color);
    border: 1px solid rgba(var(--text-color-rgb), 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    overflow: hidden;
}

.team-section .horizontal-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    background: rgba(var(--bg-color-rgb), 0.5);
}

.team-section .horizontal-item:last-child {
    margin-right: 10vw;
}

.team-member .member-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 2rem;
    margin-bottom: 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(var(--accent-color-rgb), 0.7);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    flex-shrink: 0;
}

.team-member:hover .member-image {
    /* transform: scale(1.05); */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.team-member .member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* .team-member:hover .member-image img {
    transform: scale(1.1);
} */

.team-member .member-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-height: 100%;
    overflow-y: auto;
    padding-right: 10px;
}

.team-member .horizontal-title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    text-align: left;
    margin-bottom: 1rem;
}

.team-member .horizontal-text {
    text-align: left;
    max-width: 100%;
    overflow-y: visible;
    padding-right: 5px;
}

.team-member .horizontal-text p {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.team-member .horizontal-text::-webkit-scrollbar {
    width: 4px;
}

.team-member .horizontal-text::-webkit-scrollbar-thumb {
    background-color: rgba(var(--text-color-rgb), 0.2);
    border-radius: 2px;
}

.team-member .horizontal-text::-webkit-scrollbar-track {
    background-color: rgba(var(--bg-color-rgb), 0.1);
}

.team-section .scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(var(--bg-color-rgb), 0.7);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: bounce 2s infinite;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Ensure responsive behavior works properly */
@media (max-width: 768px) {
    .team-section {
        height: auto;
        min-height: unset;
        padding: 2rem 0;
    }
    
    .team-section .horizontal-content {
        position: relative;
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 0 var(--spacing-md);
        left: unset;
        transform: none !important;
        animation: none; /* Disable animation on mobile */
    }
    
    .team-section .horizontal-item {
        width: 100%;
        min-width: unset;
        max-width: unset;
        height: auto;
        margin-right: 0;
        margin-bottom: 2rem;
        flex-direction: column;
        align-items: center;
        padding: 1.5rem;
    }
    
    .team-member .member-image {
        width: 150px;
        height: 150px;
        margin-right: 0;
        margin-bottom: 1.5rem;
    }
    
    .team-member .horizontal-title {
        text-align: center;
    }
    
    .team-member .horizontal-text {
        text-align: center;
    }
    
    .team-section .scroll-indicator {
        display: none;
    }
}

/* Modern menu button and tools icon styling */
.tools-icon,
.mobile-menu-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex !important;
    justify-content: center;
    align-items: center;
    /* cursor: pointer; */
    z-index: 1001;
    background-color: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s var(--transition-bounce);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    --webkit-appearance: none;
    --webkit-transform: scale(1);
    transform: scale(1);
    opacity: 1;
    visibility: visible;
}

.tools-icon svg,
.mobile-menu-btn svg {
    stroke: var(--text-color);
    width: 21px;
    height: 21px;
    transition: all 0.3s ease;
}

/* Desktop menu button styling */
@media (min-width: 769px) {
    .tools-icon,
    .mobile-menu-btn {
        margin: 0 8px;
    }
    
    .header-right {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 10px !important;
    }
    
    /* Keep mobile menu button visible but styled for desktop */
    .mobile-menu-btn {
        display: flex !important;
        background-color: rgba(0, 0, 0, 0.05);
    }
}

/* Hover effects for both icons */
.tools-icon:hover,
.mobile-menu-btn:hover {
    transform: scale(1.1);
    -webkit-transform: scale(1.1);
    background-color: rgba(212, 175, 55, 0.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Active state for mobile menu button */
.mobile-menu-btn.active {
    background-color: rgba(212, 175, 55, 0.2);
    transform: scale(1.05);
    -webkit-transform: scale(1.05);
}

.mobile-menu-btn.active svg {
    stroke: #D4AF37;
}

/* Enhanced header layout */
.header-right {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
    .tools-icon,
    .mobile-menu-btn {
        width: 40px;
        height: 40px;
    }
    
    .header-right {
        gap: 10px !important;
    }
}

/* Specific Safari fixes using @supports *
@supports (-webkit-touch-callout: none) {
    .tools-icon,
    .mobile-menu-btn {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Very small mobile devices */
@media (max-width: 360px) {
    .tools-icon,
    .mobile-menu-btn {
        width: 36px;
        height: 36px;
    }
    
    .tools-icon svg,
    .mobile-menu-btn svg {
        width: 36px;
        height: 36px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    header {
        padding: 0.7rem;
    }
}

/* Menu items styling */
nav ul {
    display: flex;
    flex-direction: column;
    list-style: none;
    padding: var(--spacing-md);
    margin: 0;
}

nav li {
    margin-bottom: var(--spacing-sm);
    position: relative;
}

nav a {
    display: block;
    font-size: 1.5rem;
    padding: 1rem 0;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s var(--transition-bounce);
}

nav a:hover {
    color: var(--accent-color);
}

nav a:hover::after,
nav a.active::after {
    width: 2.5rem;
}

nav a.active {
    color: var(--accent-color);
    font-weight: 600;
}

.nav-divider {
    height: 1px;
    background-color: rgba(var(--text-color-rgb), 0.1);
    margin: 1rem 0;
}

/* Tools menu close button hover effect */
.tools-menu-close:hover,
.nav-close:hover {
    background-color: rgba(var(--text-color-rgb), 0.1);
    transform: rotate(90deg);
}

/* Enhanced media queries for responsive design */
@media (max-width: 768px) {
    header {
        height: 70px;
        padding: 0.8rem var(--spacing-sm);
    }
    
    .header-right {
        gap: 10px !important;
    }
    
    .logo, .nav-logo, .tools-menu-logo {
        font-size: 1.5rem;
    }
    
    .nav-header, .tools-menu-header {
        height: 70px;
        padding: 0.8rem var(--spacing-sm);
    }
    
    nav a {
        font-size: 1.3rem;
        padding: 0.8rem 0;
    }
    
    .nav-close, .tools-menu-close {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 480px) {
    header {
        height: 60px;
        padding: 0.6rem var(--spacing-xs);
    }
    
    .logo, .nav-logo, .tools-menu-logo {
        font-size: 1.3rem;
    }
    
    .nav-header, .tools-menu-header {
        height: 60px;
        padding: 0.6rem var(--spacing-xs);
    }
    
    .tools-icon, .mobile-menu-btn {
        width: 38px;
        height: 38px;
    }
    
    .tools-icon svg, .mobile-menu-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Very small mobile devices */
@media (max-width: 360px) {
    .tools-icon, .mobile-menu-btn {
        width: 36px !important;
        height: 36px !important;
    }
    
    .logo {
        font-size: 1.1rem !important;
    }
    
    header {
        padding: 0.5rem !important;
    }
}

/* Animation for menu opening */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

nav.active ul li {
    animation: slideIn 0.4s forwards;
    opacity: 0;
}

nav.active ul li:nth-child(1) { animation-delay: 0.1s; }
nav.active ul li:nth-child(2) { animation-delay: 0.15s; }
nav.active ul li:nth-child(3) { animation-delay: 0.2s; }
nav.active ul li:nth-child(4) { animation-delay: 0.25s; }
nav.active ul li:nth-child(5) { animation-delay: 0.3s; }
nav.active ul li:nth-child(6) { animation-delay: 0.35s; }

.tools-menu.active .tool-item {
    animation: fadeIn 0.5s forwards;
    opacity: 0;
}

.tools-menu.active .tool-item:nth-child(1) { animation-delay: 0.1s; }
.tools-menu.active .tool-item:nth-child(2) { animation-delay: 0.2s; }
.tools-menu.active .tool-item:nth-child(3) { animation-delay: 0.3s; }

/* Menu overlay styling */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

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

/* Menu overlay styling - No blur effect */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1999; /* Just below the tools menu */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none; /* Initially not blocking clicks */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.menu-open .menu-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Now blocking clicks */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Fullscreen Tools Menu - No blur */
.tools-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 100%;
    height: 100vh;
    background: var(--bg-color);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(var(--text-color-rgb), 0.1);
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    overflow-y: auto;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
}

/* Fixing other overlay classes */
.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Fix for mobile */
@media (max-width: 768px) {
    nav {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: var(--bg-color);
    }

    /* Fixing alternate menu overlay */
    body.menu-open .menu-overlay {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* Newsletter subscription styles */
.newsletter {
    margin-top: 2rem;
}

.newsletter h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.newsletter form {
    display: flex;
    gap: 0.5rem;
    max-width: 400px;
    position: relative;
}

.newsletter input {
    flex: 1;
    padding: 1rem 1.2rem;
    border: 2px solid rgba(var(--text-color-rgb), 0.1);
    border-radius: 12px;
    background: rgba(var(--text-color-rgb), 0.03);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    width: 100%;
}

.newsletter input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(var(--text-color-rgb), 0.05);
    box-shadow: 0 0 0 4px rgba(var(--accent-color-rgb), 0.1);
}

.newsletter input::placeholder {
    color: rgba(var(--text-color-rgb), 0.5);
}

.newsletter button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-color);
    color: var(--bg-color);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    /* cursor: pointer; */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.newsletter button:hover {
    background: var(--secondary-color);
    transform: translateY(-50%) translateX(-2px);
}

.newsletter button ion-icon {
    font-size: 1.2rem;
}

/* Mobile styles for newsletter */
@media (max-width: 768px) {
    .newsletter {
        margin: 0 auto;
        max-width: 100%;
        padding: 0 1rem;
    }

    .newsletter form {
        max-width: 100%;
    }

    .newsletter input {
        padding-right: 120px; /* Make space for the button */
    }

    .newsletter button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .newsletter input {
        font-size: 0.9rem;
        padding: 0.9rem 1rem;
        padding-right: 100px;
    }

    .newsletter button {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Carousel dots improvements for mobile */
.carousel-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.8rem;
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    /* cursor: pointer; */
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* Contact form improvements */
.contact-form {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 1.5rem;
    background: rgba(var(--bg-color-rgb), 0.5);
    border-radius: 12px;
    border: 1px solid rgba(var(--text-color-rgb), 0.1);
}

.contact-form .form-group {
    margin-bottom: 1.2rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid rgba(var(--text-color-rgb), 0.1);
    border-radius: 8px;
    background: rgba(var(--text-color-rgb), 0.03);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(var(--text-color-rgb), 0.05);
    box-shadow: 0 0 0 4px rgba(var(--accent-color-rgb), 0.1);
}

.contact-form button {
    width: 100%;
    padding: 1rem;
    background: var(--accent-color);
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    /* cursor: pointer; */
    transition: all 0.3s ease;
}

.contact-form button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Newsletter form improvements */
.newsletter {
    width: 100%;
    max-width: 400px;
}

.newsletter form {
    position: relative;
    width: 100%;
}

.newsletter input {
    width: 100%;
    padding: 1rem 120px 1rem 1.2rem;
    border: 2px solid rgba(var(--text-color-rgb), 0.1);
    border-radius: 12px;
    background: rgba(var(--text-color-rgb), 0.03);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.newsletter button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-color);
    color: var(--bg-color);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    /* cursor: pointer; */
    transition: all 0.3s ease;
}

/* Mobile responsive improvements */
@media (max-width: 768px) {
    .carousel-dots {
        bottom: 1rem;
        gap: 0.6rem;
        padding: 0.4rem 0.8rem;
    }

    .carousel-dot {
        width: 6px;
        height: 6px;
    }

    .contact-form {
        padding: 1rem;
        margin: 0;
        border-radius: 8px;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .contact-form button {
        padding: 0.8rem;
        font-size: 0.95rem;
    }

    .newsletter {
        padding: 0;
        margin: 1.5rem 0;
    }

    .newsletter input {
        padding: 0.8rem 100px 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .newsletter button {
        padding: 0.5rem 1rem;
        right: 4px;
        font-size: 0.85rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .carousel-dots {
        bottom: 0.8rem;
        gap: 0.5rem;
        padding: 0.3rem 0.6rem;
    }

    .carousel-dot {
        width: 5px;
        height: 5px;
    }

    .contact-form {
        padding: 0.8rem;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 0.7rem 0.9rem;
        font-size: 0.85rem;
    }

    .contact-form button {
        padding: 0.7rem;
        font-size: 0.9rem;
    }

    .newsletter input {
        padding: 0.7rem 90px 0.7rem 0.9rem;
        font-size: 0.85rem;
    }

    .newsletter button {
        padding: 0.4rem 0.8rem;
        right: 3px;
        font-size: 0.8rem;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .carousel-dots {
        gap: 0.4rem;
        padding: 0.25rem 0.5rem;
    }

    .newsletter input {
        padding-right: 80px;
    }

    .newsletter button {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* Contact section layout improvements */
.about-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: start;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-info {
    margin-bottom: 2rem;
}

/* Mobile responsive layout for contact section */
@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .about-text {
        order: 1;
        margin-bottom: 2rem;
    }

    .contact-form {
        order: 2;
        margin-top: 2rem;
        width: 100%;
    }

    .contact-info {
        background: rgba(var(--bg-color-rgb), 0.5);
        padding: 1.5rem;
        border-radius: 12px;
        border: 1px solid rgba(var(--text-color-rgb), 0.1);
    }

    .contact-info h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .contact-info p {
        margin-bottom: 0.8rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .about-text {
        margin-bottom: 1.5rem;
    }

    .contact-form {
        margin-top: 1.5rem;
    }

    .contact-info {
        padding: 1.2rem;
    }

    .contact-info h2 {
        font-size: 1.5rem;
    }

    .contact-info p {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }
}

/* Tools icon - Base styles */
.tools-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(var(--text-color-rgb), 0.08);
    /* cursor: pointer; */
    transition: all 0.3s var(--transition-bounce);
    position: relative;
    border: 1px solid rgba(var(--text-color-rgb), 0.1);
    margin-right: var(--spacing-sm);
    -webkit-tap-highlight-color: transparent;
}

.tools-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    transition: transform 0.3s var(--transition-bounce);
}

/* Hover effects - Only on non-touch devices */
@media (hover: hover) {
    .tools-icon:hover {
        transform: scale(1.1);
        background-color: rgba(var(--text-color-rgb), 0.12);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

    .tools-icon:hover svg {
        transform: rotate(-90deg);
    }
}

/* Active state */
.tools-icon:active {
    transform: scale(0.95);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tools-icon {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }

    .tools-icon svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .tools-icon {
        width: 36px;
        height: 36px;
        margin-right: 8px;
    }

    .tools-icon svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 360px) {
    .tools-icon {
        width: 32px;
        height: 32px;
        margin-right: 6px;
    }

    .tools-icon svg {
        width: 16px;
        height: 16px;
    }
}

/* Remove any duplicate tool-icon styles from other places in the CSS */
/* ... existing code */

/* Carousel section improvements */
.carousel-section {
    position: relative;
    overflow: hidden;
    height: 70vh;
    margin: 2rem 0;
}

.carousel-container {
    height: 100%;
    display: flex;
    transition: transform 0.5s var(--transition-smooth);
}

.carousel-item {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    text-align: center;
}

.carousel-caption h3 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 1rem;
    font-weight: 600;
}

.carousel-caption p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Mobile responsive carousel */
@media (max-width: 768px) {
    .carousel-section {
        height: 50vh;
    }

    .carousel-caption {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .carousel-section {
        height: 40vh;
    }

    .carousel-caption {
        padding: 1rem;
    }
}

/* Header tools alignment */
.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.tools-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tools-icon {
    margin: 0;
    width: 42px;
    height: 42px;
}

/* Responsive tools alignment */
@media (max-width: 768px) {
    .tools-container {
        gap: 6px;
    }

    .tools-icon {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 480px) {
    .tools-container {
        gap: 4px;
    }

    .tools-icon {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 360px) {
    .tools-container {
        gap: 3px;
    }

    .tools-icon {
        width: 34px;
        height: 34px;
    }
}

/* Mobile menu button styled like tools icon */
.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(var(--text-color-rgb), 0.08);
    /* cursor: pointer; */
    transition: all 0.3s var(--transition-bounce);
    position: relative;
    border: 1px solid rgba(var(--text-color-rgb), 0.1);
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    transition: transform 0.3s var(--transition-bounce);
}

/* Hover effects - Only on non-touch devices */
@media (hover: hover) {
    .mobile-menu-btn:hover {
        transform: scale(1.1);
        background-color: rgba(var(--text-color-rgb), 0.12);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

    .mobile-menu-btn:hover svg {
        transform: rotate(-90deg);
    }
}

/* Active state */
.mobile-menu-btn:active {
    transform: scale(0.95);
}

.mobile-menu-btn.active {
    background-color: rgba(var(--text-color-rgb), 0.15);
}

.mobile-menu-btn.active svg {
    transform: rotate(90deg);
}

/* Responsive adjustments for both icons */
@media (max-width: 768px) {
    .tools-icon,
    .mobile-menu-btn {
        width: 38px;
        height: 38px;
    }

    .tools-icon svg,
    .mobile-menu-btn svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .tools-icon,
    .mobile-menu-btn {
        width: 36px;
        height: 36px;
    }

    .tools-icon svg,
    .mobile-menu-btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 360px) {
    .tools-icon,
    .mobile-menu-btn {
        width: 34px;
        height: 34px;
    }

    .tools-icon svg,
    .mobile-menu-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Tools container spacing */
.tools-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .tools-container {
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .tools-container {
        gap: 4px;
    }
}

@media (max-width: 360px) {
    .tools-container {
        gap: 3px;
    }
}

/* Enhanced tools icon and menu containers for better separation */
.tools-container {
    display: flex;
    align-items: center;
    gap: 18px;
    background-color: rgba(142, 127, 127, 0.05);
    padding: 6px 10px;
    border-radius: 30px;
}

.tools-icon, .mobile-menu-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    /* cursor: pointer; */
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

/* Styles for desktop */
@media (min-width: 769px) {
    .mobile-menu-btn {
        margin-left: 5px;
    }
    
    .tools-icon:hover, .mobile-menu-btn:hover {
        transform: translateY(-2px);
        background-color: rgba(255, 255, 255, 0.25);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
}

/* Responsive styles for tools container */
@media (max-width: 768px) {
    .tools-container {
        gap: 12px;
        padding: 5px 8px;
    }
    
    .tools-icon, .mobile-menu-btn {
        width: 36px;
        height: 36px;
    }
    
    .tools-icon svg, .mobile-menu-btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .tools-container {
        gap: 8px;
        padding: 4px 6px;
    }
    
    .tools-icon, .mobile-menu-btn {
        width: 32px;
        height: 32px;
    }
    
    .tools-icon svg, .mobile-menu-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* SVG icon styles */
.tools-icon svg, .mobile-menu-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.3s ease;
}

/* Enhanced magnetic effect for logo and buttons */
.logo.magnetic {
    position: relative;
    display: inline-block; 
    transform-style: preserve-3d;
    transition: transform 0.2s cubic-bezier(0.33, 1, 0.68, 1);
}

.logo.magnetic:hover {
    transform: scale(1.05);
}

/* Enhanced button magnetic effect */
.btn.magnetic {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.2s cubic-bezier(0.33, 1, 0.68, 1);
}

.btn.magnetic:hover {
    transform: scale(1.05);
}

/* Improved menu separation */
@media (min-width: 769px) {
    .header-right {
        gap: 20px;
        display: flex;
        align-items: center;
    }
    
    .tools-container {
        display: flex;
        gap: 15px;
        margin-left: 15px;
    }
}

/* Improved responsive design for mobile */
@media (max-width: 768px) {
    .header-right {
        gap: 15px;
    }
    
    .tools-container {
        display: flex;
        gap: 12px;
        align-items: center;
        justify-content: flex-end;
    }
    
}

/* --- Fix: Always show both cursors on desktop --- */
@media (hover: hover) and (pointer: fine) {
  /* .cursor, .cursor-follower {
    display: block !important;
  }
  body, html, * {
    cursor: auto !important;
  } */
}