/* Theme Transition */
.theme-transition *,
.theme-transition *::before,
.theme-transition *::after {
    transition: background-color 0.5s ease,
                color 0.5s ease,
                border-color 0.5s ease,
                box-shadow 0.5s ease,
                opacity 0.5s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--button-bg, var(--primary-color));
    border: none;
    color: var(--button-text, white);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0;
    margin-left: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(123, 44, 191, 0.3);
}

.theme-toggle:hover {
    transform: translateY(-2px) scale(1.05);
    background-color: var(--button-hover, var(--accent-color));
    box-shadow: 0 4px 15px rgba(123, 44, 191, 0.4);
    color: white;
}

.theme-toggle:active {
    transform: translateY(0) scale(0.98);
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(255,255,255,0.15) 0%,
        rgba(255,255,255,0.25) 50%,
        rgba(255,255,255,0.15) 100%);
    transform: translateX(-100%) skewX(-15deg);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1;
}

.theme-toggle:hover::before {
    transform: translateX(200%) skewX(-15deg);
}

/* Base Theme Variables */
:root {
    /* Original Light Theme */
    --black: #000000;
    --white: #FFFFFF;
    --gray: #666666;
    --light-gray: #F5F5F5;
    --purple: #b6a4fa;
    --purple-light: #c5b6fa;
    
    /* Theme Variables */
    --bg-color: var(--white);
    --text-color: var(--black);
    --primary-color: var(--black);
    --secondary-color: var(--light-gray);
    --accent-color: var(--black);
    --card-bg: var(--white);
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-color: #e0e0e0;
    --header-bg: rgba(255, 255, 255, 0.95);
    --header-text: var(--black);
    --footer-bg: #1a1a1a; /* Dark footer in light mode */
    --footer-text: #ffffff; /* Light text in dark footer */
    --hover-color: #f0f0f0;
    --transition-speed: 0.3s;
    
    /* Button Styles */
    --button-bg: var(--black);
    --button-hover: #333333;
    --button-text: var(--white);
    
    /* Input Styles */
    --input-bg: var(--white);
    --input-border: #e0e0e0;
    --input-text: var(--black);
}

/* Dark Theme - Inverted from Light */
[data-theme="dark"] {
    --bg-color: #000000; /* Black background */
    --text-color: #f5f5f5; /* Light text */
    --primary-color: #8a74e0; /* Darker purple */
    --secondary-color: #e0e0e0; /* Lighter secondary color */
    --accent-color: #9d8ae6; /* Darker purple accent */
    --card-bg: #ffffff; /* White cards */
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --border-color: #dddddd;
    --header-bg: rgba(138, 116, 224, 0.95); /* Darker purple header */
    --header-text: #ffffff; /* White text for better contrast */
    --footer-bg: #222222; /* Dark footer */
    --footer-text: #f5f5f5; /* Light footer text */
    --hover-color: #b1a3e6; /* Darker purple for hover states */
    
    /* Dark mode form section */
    .form-section {
        background: var(--header-bg); /* Purple background */
        padding: 4rem 2rem;
    }
    
    /* Black form container */
    .contact-form-simple {
        background: #000 !important;
        color: #fff !important;
        padding: 2rem;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    .contact-form-simple input,
    .contact-form-simple textarea {
        background: transparent !important;
        border: none !important;
        border-bottom: 1px solid #555 !important;
        color: #fff !important;
        padding: 0.5rem 0 !important;
        font-size: 18px !important;
        width: 100% !important;
        margin-bottom: 1.5rem !important;
    }
    
    .contact-form-simple input::placeholder,
    .contact-form-simple textarea::placeholder {
        color: #fff !important;
        opacity: 0.8 !important;
    }
    
    .contact-form-simple input:focus,
    .contact-form-simple textarea:focus {
        outline: none !important;
        border-color: #fff !important;
    }
    
    .btn-submit-simple {
        background: #b6a4fa !important;
        color: #000 !important;
        border: none !important;
        padding: 1rem 2rem !important;
        border-radius: 50px !important;
        font-size: 18px !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        width: 100% !important;
        text-align: center !important;
        margin-top: 1rem !important;
    }
    
    .btn-submit-simple {
        background: #b6a4fa;
        color: #000;
    }
    
    .btn-submit-simple:hover {
        background: #a08ef0;
    }
    
    /* Button Styles */
    --button-bg: var(--purple);
    --button-hover: var(--purple-light);
    --button-text: #ffffff; /* White text on buttons */
    
    /* Input Styles */
    --input-bg: #ffffff;
    --input-border: #dddddd;
    --input-text: #222222;
}

/* Apply Theme Colors */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* About page specific styles */
[data-theme="light"] .about-section,
[data-theme="light"] .who-i-am {
    background-color: #ffffff;
}

/* Dark mode background with fade transition */
body {
    transition: background-color 0.5s ease-in-out;
    position: relative;
    overflow-x: hidden;
}

/* Hero Section Layout */
.hero {
    display: flex;
    align-items: center;
    min-height: 80vh;
    padding: 60px 0;
}

.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto 40px;
}

/* Profile Image */
.profile-image {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    background: transparent;
    padding-bottom: 20px; /* Space for the fade effect */
}

/* Fade effect under the image */
.profile-image {
    position: relative;
    z-index: 1;
}

/* Text and image layering - simplified */
.hero {
    position: relative;
}

/* Make text always interactive */
.hero-content {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

/* Style for the webdesigner text */
.hero-content h1 {
    position: relative;
    z-index: 1;
    margin: 0;
}

/* Make the arrow-circle interactive */
.arrow-circle {
    position: relative;
    display: inline-block;
    pointer-events: auto;
    cursor: pointer;
}

/* Image container */
.profile-image {
    position: absolute;
    z-index: 0; /* Start behind everything */
    pointer-events: none; /* Don't block clicks */
}

/* Make the actual image interactive */
.profile-image img {
    position: relative;
    pointer-events: auto;
    z-index: 2;
}

/* When hovering the text, bring it forward */
.hero-content h1:hover {
    z-index: 3;
}

/* Ensure text is clickable even when visually behind */
.hero-content h1,
.hero-content h1 * {
    pointer-events: auto !important;
}

.profile-image::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 10%;
    right: 10%;
    height: 40px;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        rgba(255, 255, 255, 0) 100%);
    filter: blur(15px);
    z-index: -1;
    border-radius: 50%;
    transform: perspective(100px) rotateX(30deg);
}

.profile-img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 70vh; /* Limit height to 70% of viewport height */
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .profile-img {
        max-height: 80vh; /* Slightly larger on bigger screens */
    }
}

/* Starry night effect */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.star {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Show stars only in dark mode */
[data-theme="dark"] .star {
    opacity: 1;
    animation: twinkle 4s infinite;
}

/* Different star sizes */
.star.small {
    width: 1px;
    height: 1px;
}

.star.medium {
    width: 2px;
    height: 2px;
}

.star.large {
    width: 3px;
    height: 3px;
}

/* Twinkling animation */
@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Different animation delays for natural effect */
.star:nth-child(5n) { animation-delay: 0.5s; }
.star:nth-child(7n+1) { animation-delay: 1s; }
.star:nth-child(11n+2) { animation-delay: 1.5s; }
.star:nth-child(13n+3) { animation-delay: 2s; }

[data-theme="dark"] body {
    background: #000000;
}

/* Update specific elements to use theme variables */
.header {
    background-color: var(--header-bg);
    color: var(--header-text);
    transition: background-color var(--transition-speed) ease,
                color var(--transition-speed) ease;
    box-shadow: 0 2px 10px rgba(182, 164, 250, 0.2);
}

.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    transition: background-color var(--transition-speed) ease,
                color var(--transition-speed) ease;
}

/* Update form elements */
input,
textarea,
select {
    background-color: var(--input-bg, var(--card-bg));
    color: var(--input-text, var(--text-color));
    border: 1px solid var(--input-border, var(--border-color));
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    transition: all var(--transition-speed) ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(157, 78, 221, 0.2);
}

/* Style placeholders */
::placeholder {
    color: var(--footer-text);
    opacity: 0.7;
}

/* Update cards and containers */
.card,
.portfolio-item,
.about-content {
    background-color: var(--card-bg);
    box-shadow: var(--card-shadow);
    transition: background-color var(--transition-speed) ease,
                box-shadow var(--transition-speed) ease;
}

/* Update buttons */
.btn {
    background-color: var(--button-bg, var(--primary-color));
    color: var(--button-text, white);
    border: none;
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease,
                transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    background-color: var(--button-hover, var(--accent-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

/* Update links */
a {
    color: var(--primary-color);
    transition: color var(--transition-speed) ease;
}

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

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--black);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Page Transition */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    pointer-events: none;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    background: transparent;
    perspective: 1200px;
}

/* Hide transition when not active */
.page-transition:not(.visible) {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.8s;
}

/* Transition Panels */
.transition-panel {
    position: absolute;
    background: var(--primary-color, #8a74e0);
    will-change: transform;
    pointer-events: none;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* Left/Right Panels */
.transition-panel.left,
.transition-panel.right {
    top: 0;
    width: 50.1%; /* Slight overlap to prevent gap */
    height: 100%;
    transform: translate3d(0, 0, 0);
}

.transition-panel.left {
    left: 0;
    transform: translate3d(-100%, 0, 0);
    transform-origin: left center;
}

.transition-panel.right {
    right: 0;
    transform: translate3d(100%, 0, 0);
    transform-origin: right center;
}

/* Opening animation - panels start from center and move to edges */
.page-transition.visible:not(.closing) {
    opacity: 1;
    visibility: visible;
}

.page-transition.visible:not(.closing) .transition-panel {
    transition-duration: 1s;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition.visible:not(.closing) .transition-panel.left {
    transform: translate3d(-100%, 0, 0);
}

.page-transition.visible:not(.closing) .transition-panel.right {
    transform: translate3d(100%, 0, 0);
}

/* Initial state for opening animation */
.page-transition:not(.closing) .transition-panel {
    transition-duration: 0s;
}

/* Closing animation - panels move to center */
.page-transition.closing {
    opacity: 1;
    visibility: visible;
}

.page-transition.closing .transition-panel {
    transition-duration: 1s;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition.closing .transition-panel.left {
    transform: translate3d(0, 0, 0);
}

.page-transition.closing .transition-panel.right {
    transform: translate3d(0, 0, 0);
}

/* Slight scale effect for depth */
@keyframes scaleIn {
    from { transform: scale(0.98); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Apply scale to page content after transition */
body.transitioning main {
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Ensure content is not visible during transition */
body.transitioning {
    overflow: hidden;
    height: 100vh;
}

/* Initial page load overlay */
.page-load-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: 100000; /* Higher than other elements */
    opacity: 1;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

/* Fade out the overlay */
.page-load-overlay.fade-out {
    opacity: 0;
}

/* Ensure content is hidden until overlay fades out */
body.loading {
    overflow: hidden;
    height: 100vh;
}

body.loading main {
    opacity: 0;
    transition: opacity 0.5s ease-in-out 0.5s; /* Delay to sync with overlay fade */
}

body.loaded main {
    opacity: 1;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Higher than page transition */
    overflow: hidden;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.loading-screen.hide {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    position: relative;
    z-index: 10;
    text-align: center;
    pointer-events: none;
}

.loading-screen::before,
.loading-screen::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 50%;
    background: #000;
    transition: transform 1s cubic-bezier(0.86, 0, 0.07, 1);
    z-index: 1;
}

.loading-screen::before {
    top: 0;
    left: 0;
    transform: translateY(0);
    border-bottom: 2px solid #000; /* Hide the seam */
}

.loading-screen::after {
    bottom: 0;
    left: 0;
    transform: translateY(0);
    border-top: 2px solid #000; /* Hide the seam */
}

.loading-screen.hide::before {
    transform: translateY(-100%);
}

.loading-screen.hide::after {
    transform: translateY(100%);
}

.loading-screen.hide .loading-content {
    opacity: 0;
    transition: opacity 0.4s ease-out;
    transition-delay: 0.2s;
}

/* Loading bar */
.loading-bar {
    width: 200px;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 20px auto 0;
    position: relative;
    overflow: hidden;
}

.loading-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Ensure content stays centered during animation */
.loading-content {
    position: relative;
    z-index: 2;
    transition: opacity 0.8s ease-out;
}

.loading-screen.hide .loading-content {
    opacity: 0;
}

.loading-content {
    position: relative;
    z-index: 2;
    text-align: center;
    transition: opacity 0.5s ease-out;
}

.loading-screen.hide .loading-content {
    opacity: 0;
}

.initials {
    font-size: 6rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.05em;
    line-height: 1;
    position: relative;
    z-index: 2;
}

.loading-bar {
    width: 200px;
    height: 2px;
    background-color: transparent;
    position: relative;
    margin-top: 2rem;
    overflow: hidden;
}

.progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background-color: #fff;
    animation: loading 2s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
}

@keyframes loading {
    0% {
        width: 0;
        left: 0;
    }
    50% {
        width: 100%;
        left: 0;
    }
    100% {
        width: 0;
        left: 100%;
    }
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

ul {
    list-style: none;
}

/* Header Styles */
.header {
    padding: 24px 0;
    position: relative;
    z-index: 100;
}

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

.logo {
    font-size: 24px;
    font-weight: 700;
}

.main-nav > ul {
    display: flex;
    align-items: center;
    gap: 0; /* Remove gap to control spacing with margins */
}

.main-nav > ul > li {
    margin-right: 32px; /* Use margin instead of gap for better control */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.main-nav > ul > li:last-child {
    margin-right: 0;
}

.main-nav a {
    font-size: 16px;
    font-weight: 500;
    position: relative;
    color: inherit;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-block;
    transform: translateY(0);
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -6px;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease, transform 0.3s ease;
    transform-origin: left;
}

.main-nav a:hover,
.main-nav a.active {
    /* Removed transform to prevent movement */
}

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

/* Dark mode styles */
.header.dark-bg .main-nav a::after {
    background-color: #b6a4fa;
}

.header.dark-bg .main-nav a.active {
    color: #fff;
}

.header.dark-bg .main-nav a:hover {
    color: #fff;
}

/* Only apply hover effect to main nav items, not language or username */
.main-nav > ul > li:not(:nth-last-child(-n+3)) a::after {
    display: block;
}

.main-nav > ul > li:nth-last-child(-n+3) a::after {
    display: none;
}

.lang {
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.lang.active {
    background-color: var(--black);
    color: var(--white);
}

/* Dark mode language selector */
.header.dark-bg .lang {
    color: rgba(255, 255, 255, 0.7);
}

.header.dark-bg .lang.active {
    background-color: #b6a4fa;
    color: #000;
    font-weight: 500;
}

.header.dark-bg .lang:not(.active):hover {
    color: #fff;
    background-color: rgba(182, 164, 250, 0.1);
}

.username {
    background-color: var(--black);
    color: var(--white) !important;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    margin-left: 16px;
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: right center;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 80px 0;
}

/* Animation keyframes */
@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Contact Page Animations */
/* Section header animation */
.section-header {
    overflow: hidden;
}

.section-header h1,
.section-header p {
    opacity: 0;
    transform: translateY(-30px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

.section-header p {
    transition-delay: 0.1s;
}

.section-header.animated h1,
.section-header.animated p {
    opacity: 1;
    transform: translateY(0);
}

.contact-method {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

.contact-icon,
.contact-details {
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

/* Form section animations */
.form-section {
    opacity: 1 !important; /* Ensure form section is always visible */
}

.form-section h2,
.form-section p,
.form-section .contact-form-simple {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

/* Ensure form inputs are visible by default */
.contact-form-simple input,
.contact-form-simple textarea,
.contact-form-simple button {
    opacity: 1 !important;
    transform: translateX(0) !important;
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Ensure form elements are visible when animated */
.contact-section.animated .contact-method,
.form-section.animated h2,
.form-section.animated p,
.form-section.animated input,
.form-section.animated textarea,
.form-section.animated button {
    opacity: 1;
    transform: translate(0, 0);
}

/* Add some spacing between contact methods */
.contact-method:not(:last-child) {
    margin-bottom: 2rem;
}

/* Form input focus effects */
.contact-form-simple input:focus,
.contact-form-simple textarea:focus {
    transform: translateX(0) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Button hover effect */
.btn-submit-simple:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* About Page Animations */
.about-content {
    opacity: 0; /* Start hidden */
}

.about-content.animated .about-text {
    animation: slideInFromLeft 0.8s ease-out forwards;
    opacity: 0;
}

.about-content.animated .about-image {
    animation: slideInFromRight 0.8s ease-out forwards;
    opacity: 0;
    animation-delay: 0.2s; /* Slight delay after text */
}

/* Ensure smooth animation */
.about-content {
    transition: opacity 0.5s ease;
}

.about-content.animated {
    opacity: 1;
}

.about-text, .about-image {
    will-change: transform, opacity;
    backface-visibility: hidden;
}

@keyframes slideInFromLeftToRight {
    0% {
        opacity: 0;
        transform: translateX(-200%);
    }
    70% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(80px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Text animations when page is loaded */
.hero .intro {
    opacity: 0;
    transform: translateX(100%); /* Start off-screen to the right */
    display: inline-block; /* Ensure transform works properly */
    font-size: 1.2em; /* Slightly larger text */
    font-weight: 400; /* Slightly bolder */
    letter-spacing: 0.5px; /* Better readability */
    max-width: 800px; /* Limit width for better readability */
    margin: 0 auto 1.5rem; /* Center and add some space below */
}

.hero .intro.animated {
    animation: slideInFromLeftToRight 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero h1 {
    opacity: 0;
}

.hero h1.animated {
    animation: slideInFromRight 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.2s;
}

/* Webdesigner Text with Tracking Circle */
.hero h1 {
    position: relative;
    display: inline-block;
    cursor: default;
    overflow: visible;
    will-change: transform, opacity; /* Optimize for animation */
    backface-visibility: hidden; /* Prevent flicker */
    opacity: 1; /* Make sure text is visible */
    transform: translateZ(0); /* Force hardware acceleration */
    /* Animation is now controlled by the loading screen state */
}

/* Circle Arrow Cursor */
.circle-arrow {
    position: fixed;
    width: 60px;  /* Increased from 40px */
    height: 60px;  /* Increased from 40px */
    border: 2px solid currentColor;
    border-radius: 50%;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;  /* Increased from 14px */
    font-weight: bold;  /* Added for better visibility */
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: 
        opacity 0.3s ease,
        transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.1);  /* Slightly more visible background */
    backdrop-filter: blur(3px);  /* Slightly stronger blur */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);  /* Added subtle shadow */
}

.circle-arrow.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Hide default cursor when hovering over the text */
.hero h1 .arrow-circle {
    cursor: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero .intro {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--gray);
}

.hero h1 {
    font-size: 120px;
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 24px 0;
    letter-spacing: -2px;
    cursor: default;
    display: inline-block;
    transition: all 0.3s ease;
    color: var(--black);
}

.hero h1:hover {
    color: white;
    -webkit-text-stroke: 1px black;
    text-shadow: none;
}

/* Make Webdesigner text visible in dark mode */
[data-theme="dark"] .hero h1 {
    color: white;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    /* Prevent animation from replaying */
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

/* Hover state for Webdesigner text in dark mode */
[data-theme="dark"] .hero h1:hover {
    color: white;
    -webkit-text-stroke: 1px white;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 20px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px) scale(1.02);
    /* Prevent animation from replaying */
    animation: textPulse 2s infinite ease-in-out !important;
}

/* Add a subtle pulse animation on hover */
@keyframes textPulse {
    0% { transform: translateY(-2px) scale(1.02); }
    50% { transform: translateY(-2px) scale(1.05); }
    100% { transform: translateY(-2px) scale(1.02); }
}

/* Update circle arrow cursor color in dark mode */
[data-theme="dark"] .circle-arrow {
    color: white;
    border-color: white;
}

/* About Page Styles */
.about-section {
    padding: 100px 0;
}

.about-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
}

.about-text {
    flex: 1;
    max-width: 600px;
}

.about-text h1 {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.about-text h1::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.about-text p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
    color: var(--text-color);
    opacity: 0.9;
}

.skills {
    margin-top: 40px;
}

.skills h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.skills ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 0;
    margin: 0;
    list-style: none;
    color: var(--text-color);
}

.skills li {
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skills li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.about-image {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.about-image .image-placeholder {
    width: 100%;
    height: 500px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

/* Responsive styles */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .about-text,
    .about-image {
        max-width: 100%;
    }
    
    .about-image {
        margin-top: 50px;
    }
}

@media (max-width: 768px) {
    .about-text h1 {
        font-size: 48px;
    }
    
    .about-text p {
        font-size: 16px;
    }
    
    .about-image .image-placeholder {
        height: 400px;
    }
}

/* Skills Section */
.about-text .skills {
    margin-top: 20px; /* Reduced from default */
}

.about-text .skills h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.about-text .skills ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.about-text .skills li {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Who I Am Section */
.who-i-am {
    padding: 80px 0 140px; /* Adjusted padding for better spacing */
    background-color: var(--bg-color);
    color: var(--text-color);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    margin-top: -1px; /* Fix potential 1px gap */
}

.who-i-am-content {
    max-width: 1400px; /* Increased from 1200px */
    margin: 0 auto;
    padding: 0 60px; /* Increased side padding */
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

.section-header {
    max-width: 900px; /* Increased from 800px */
    margin: 0 auto 80px;
    text-align: center;
    position: relative;
    padding: 40px 0;
}

.section-header h2 {
    font-size: 48px;
    margin: 0 0 20px 0; /* Reduced bottom margin to move line up */
    position: relative;
    display: inline-block;
    color: var(--text-color);
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px; /* Moved line up closer to text */
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background-color: var(--primary-color);
}

.section-header p {
    font-size: 18px;
    line-height: 1.8;
    margin: 30px auto 25px; /* Added top margin to move text down */
    color: var(--text-color);
    opacity: 0.9;
    max-width: 800px;
    padding: 0 20px;
}

.download-cv {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    margin-top: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.download-cv:hover {
    background-color: var(--button-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* About Section Styles */
.about-section {
    padding: 100px 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.5s ease;
}

/* Dark mode styles for About Section */
[data-theme="dark"] .about-section {
    background-color: #1a0a2e; /* Dark purple background */
}

.about-content {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Center items vertically */
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px; /* Added vertical padding */
    gap: 60px;
    background-color: var(--bg-color);
    border-radius: 12px;
    transition: background-color 0.5s ease;
}

/* Dark mode styles for content box */
[data-theme="dark"] .about-content {
    background-color: #1a0a2e; /* Match the dark purple background */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.about-text {
    flex: 1;
    max-width: 600px;
    padding: 0; /* Reset any previous padding */
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 400px;
    overflow: hidden;
    position: relative;
}

.profile-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    object-fit: contain; /* Maintain aspect ratio */
    object-position: center;
    display: block;
    margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .about-text, .about-image {
        max-width: 100%;
    }
    
    .profile-image {
        max-width: 80%;
        margin-top: 40px;
    }
}

@media (max-width: 576px) {
    .profile-image {
        max-width: 100%;
    }
}

.tools-section {
    text-align: center;
    margin: 100px auto;
    max-width: 1200px;
    padding: 0 20px;
}

.tools-section h3 {
    font-size: 36px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.tools-section .subtitle {
    font-size: 18px;
    color: var(--gray);
    margin-bottom: 70px;
    display: block;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.tool-item {
    text-align: center;
    position: relative;
}

.tool-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
    box-shadow: 0 0 0 15px var(--bg-color), 0 0 0 16px rgba(255, 255, 255, 0.1);
}

.tool-logo {
    width: 110px;
    height: 110px;
    object-fit: contain;
    z-index: 2;
    transition: all 0.3s ease;
    padding: 5px;
    box-sizing: border-box;
}

.tool-item:hover .tool-logo {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* Adjust specific logos */
.tool-item:nth-child(1) .tool-logo {  /* Figma */
    width: 120px;
    height: 120px;
    margin-top: -5px;
}

.tool-item:nth-child(2) .tool-logo {  /* Illustrator */
    width: 115px;
    height: 115px;
}

.tool-item:nth-child(3) .tool-logo {  /* XD */
    width: 110px;
    height: 110px;
}

.tool-item:nth-child(4) .tool-logo {  /* Photoshop */
    width: 120px;
    height: 120px;
    margin-top: -5px;
}

.tool-item:nth-child(5) .tool-logo {  /* VSCode */
    width: 115px;
    height: 115px;
}

.tool-item:nth-child(6) .tool-logo {  /* Sublime */
    width: 110px;
    height: 110px;
}

.tool-item:nth-child(7) .tool-logo {  /* Blender */
    width: 115px;
    height: 115px;
}

.tool-circle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 15px solid rgba(138, 116, 224, 0.1);
    border-top-color: var(--primary-color);
    transform: rotate(45deg);
    box-sizing: border-box;
}

.tool-item:nth-child(1) .tool-circle::before {
    border-top-color: var(--primary-color);
}

.tool-item:nth-child(2) .tool-circle::before {
    border-top-color: #FF6B6B;
}

.tool-item:nth-child(3) .tool-circle::before {
    border-top-color: #4ECDC4;
}

.tool-item:nth-child(4) .tool-circle::before {
    border-top-color: #45B7D1;
}

.tool-circle span {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    z-index: 1;
}

.tool-item p {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    margin-top: 15px;
}

.tool-circle {
    margin: 0 auto 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-item:hover .tool-circle {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.tool-item p {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
    transition: all 0.3s ease;
}

.tool-item:hover p {
    color: var(--primary-color);
}

/* Footer Styles */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0 30px;
    position: relative;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* Dark mode footer */
[data-theme="dark"] .footer {
    background-color: #ffffff;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 5%;
    right: 5%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo span {
    font-size: 24px;
    font-weight: 700;
    display: block;
    margin-bottom: 15px;
    color: var(--footer-text);
}

/* Dark mode footer logo */
[data-theme="dark"] .footer-logo span {
    color: #000000; /* Black color for the logo */
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 0;
    padding: 0;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-section h4 {
    font-size: 20px;
    margin-bottom: 22px;
    color: var(--footer-text);
    opacity: 0.95;
    font-weight: 600;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .footer-section h4 {
    color: #111;
    font-weight: 700;
}

[data-theme="dark"] .footer-section a {
    color: #333;
}

[data-theme="dark"] .footer-section a:hover {
    color: #000;
}

[data-theme="dark"] .footer-logo p {
    color: #555;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
    color: var(--footer-text);
    opacity: 0.9;
    transition: all 0.3s ease;
    font-weight: 400;
}

.footer-section ul li:hover {
    opacity: 1;
    transform: translateX(3px);
}

[data-theme="dark"] .footer-section ul li {
    color: #2a2a2a; /* Even darker for dark mode */
    font-weight: 500; /* Slightly bolder for better readability */
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 15px;
}

.footer-section a:hover {
    color: white;
}

.portfolio-links {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.portfolio-links .btn-secondary,
.btn-outline,
.btn-outline:not(.btn-primary) {
    display: none !important;
}

/* Ensure View Project button is centered */
.project-links {
    justify-content: center !important;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
    overflow: hidden;
    padding: 5px;
    box-sizing: border-box;
}

.social-links img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Make LINE icon larger within its container */
.social-links a[aria-label="LINE"] img {
    transform: scale(2.5); /* Further increased scale for maximum visibility */
    transform-origin: center; /* Ensure it scales from the center */
    margin: 0 auto; /* Ensure proper centering */
}

/* Make Instagram circle black in dark mode */
[data-theme="dark"] .social-links a[aria-label="Instagram"] {
    background-color: #000000; /* Black background for Instagram circle in dark mode */
}

.social-links a:hover {
    background-color: white;
    color: var(--black);
    transform: translateY(-3px);
}

/* Contact Page Styles */
.contact-section {
    padding: 100px 0;
    background-color: #fff;
    transition: background-color var(--transition-speed) ease;
}

/* Dark mode contact section */
[data-theme="dark"] .contact-section {
    background-color: #000000;
}

/* Dark mode contact heading */
[data-theme="dark"] .contact-section h1 {
    color: #ffffff;
}

.contact-section .section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.contact-section h1 {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--black);
    font-weight: 700;
}

.contact-section p {
    font-size: 18px;
    color: var(--gray);
    line-height: 1.6;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info {
    padding: 40px;
    background-color: #f9f9f9;
    border-radius: 10px;
    height: fit-content;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* Dark mode contact info */
[data-theme="dark"] .contact-info {
    background-color: #1e1e1e; /* Dark grey background */
    color: #ffffff;
    border: 1px solid #333; /* Subtle border */
}

[data-theme="dark"] .contact-details h3,
[data-theme="dark"] .contact-details p,
[data-theme="dark"] .contact-details a {
    color: #ffffff !important;
}

[data-theme="dark"] .contact-details a:hover {
    color: #b6a4fa !important; /* Light purple on hover */
}

[data-theme="dark"] .contact-icon {
    background-color: #1a1a1a;
    color: #ffffff;
}

.contact-method {
    display: flex;
    margin-bottom: 30px;
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
    color: var(--black);
}

.contact-details h3 {
    font-size: 18px;
    margin: 0 0 5px 0;
    color: var(--black);
    font-weight: 600;
}

.contact-details p,
.contact-details a {
    margin: 0;
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: var(--black);
}

.contact-form-simple {
    background: #000 !important; /* Black background */
    padding: 50px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #fff !important; /* White text */
    max-width: 600px;
    margin: 0 auto;
}

.contact-form-simple input,
.contact-form-simple textarea {
    background: transparent !important;
    color: #fff !important;
    border: none !important;
    border-bottom: 1px solid #555 !important;
    padding: 0.5rem 0 !important;
    font-size: 18px !important;
    width: 100% !important;
    margin-bottom: 1.5rem !important;
    transition: all 0.3s ease !important;
}

.contact-form-simple input::placeholder,
.contact-form-simple textarea::placeholder {
    color: #fff !important;
    opacity: 0.8 !important;
}

.contact-form-simple input:focus,
.contact-form-simple textarea:focus {
    outline: none !important;
    border-color: #fff !important;
}

/* Dark mode contact form styles are now handled in the main dark theme */

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--black);
    transition: color var(--transition-speed) ease;
}

/* Form element styles are now handled in the main dark theme */

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #ffffff;
    color: #333333;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    transition: all var(--transition-speed) ease;
}

/* Form input styles are now handled in the main dark theme */

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--black);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.username-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    margin-left: 15px;
    white-space: nowrap;
    line-height: normal;
    position: relative;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
    will-change: transform, padding, letter-spacing;
    backface-visibility: hidden;
    perspective: 1000px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: 
        padding 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        letter-spacing 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Background layer for smooth expansion */
.username-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    transform: scaleX(1);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
    border-radius: 4px;
}

/* Hover state */
.username-btn:hover {
    padding: 8px 24px;
    letter-spacing: 0.02em;
    transform: translate3d(0, -1px, 0) scale(1.02);
    transition: 
        padding 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        letter-spacing 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Animate the background expansion */
.username-btn:hover::before {
    transform: scaleX(1.1);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Text styles - ensure visibility */
.username-btn,
.username-btn:visited,
.username-btn:active,
.username-btn:focus {
    color: #fff !important;
    outline: none;
}

/* Light mode hover text color */
:not([data-theme="dark"]) .username-btn:hover {
    color: #000 !important;
}

/* Ensure text remains white in dark mode */
[data-theme="dark"] .username-btn:hover {
    color: #fff !important;
}

/* Subtle hover effect */
.username-btn:hover {
    background-color: #111;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Add a subtle glow effect */
.username-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 4px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
    pointer-events: none;
}

.username-btn:hover::after {
    opacity: 1;
}

/* Dark navbar state on contact page */
.header.dark-bg .username-btn {
    background-color: #b6a4fa;
}

.header.dark-bg .username-btn::before {
    background: #b6a4fa;
}

.header.dark-bg .username-btn:hover {
    background-color: #c5b6fa;
    box-shadow: 0 4px 12px rgba(182, 164, 250, 0.3);
}

.header.dark-bg .username-btn:hover::before {
    background: #c5b6fa;
}

/* Username button hover effect with sibling animation */
.username-btn {
    position: relative;
    white-space: nowrap;
    display: inline-block;
}

/* When username button is hovered, move all previous siblings to the left */
.username-btn:hover ~ li {
    transform: translateX(-15px);
}

.btn-submit {
    background-color: var(--black);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 30px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-submit:hover {
    background-color: #333;
    transform: translateY(-2px);
}

/* Form Section Styles */
.form-section {
    background: #000; /* Black background in light mode */
    color: #fff; /* White text for better contrast */
    padding: 4rem 2rem;
    transition: background-color var(--transition-speed) ease;
}

.form-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    color: #fff; /* Ensure text is white */
}

/* Ensure form section text is white */
.form-section h2,
.form-section .form-intro {
    color: #fff !important;
}

.form-logo {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--header-text);
}

.form-section h2 {
    font-size: 36px;
    margin-bottom: 1rem;
    color: var(--header-text);
}

.form-intro {
    font-size: 14px;
    margin-bottom: 2rem;
    max-width: 400px;
    color: var(--header-text);
    line-height: 1.6;
}

.contact-form-simple {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form-simple input,
.contact-form-simple textarea {
    width: 100%;
    padding: 0.5rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #555;
    color: var(--header-text);
    font-size: 18px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.contact-form-simple input::placeholder,
.contact-form-simple textarea::placeholder {
    color: #888;
}

.contact-form-simple input:focus,
.contact-form-simple textarea:focus {
    outline: none;
    border-color: var(--black);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .contact-form-simple input:focus,
[data-theme="dark"] .contact-form-simple textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(138, 116, 224, 0.2);
}

.btn-submit-simple {
    width: 100%;
    margin-top: 2rem;
    padding: 1rem 2rem;
    background: #b6a4fa; /* Light purple color to match dark mode */
    color: #000; /* Black text for better contrast */
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* Submit button hover effect */
[data-theme="dark"] .btn-submit-simple:hover {
    transform: translateY(-2px);
}

.btn-submit-simple:hover {
    background: #a08ef0; /* Slightly darker purple on hover */
    transform: translateY(-2px);
}

/* Responsive styles for Form section */
@media (max-width: 768px) {
    .form-section {
        padding: 3rem 1.5rem;
    }
    
    .form-section h2 {
        font-size: 28px;
    }
    
    .form-intro {
        font-size: 14px;
    }
    
    .btn-submit-simple {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Responsive styles for Contact section */
@media (max-width: 1024px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-info {
        order: 2;
    }
    
    .contact-form {
        order: 1;
    }
}

@media (max-width: 768px) {
    .contact-section {
        padding: 60px 0;
    }
    
    .contact-section h1 {
        font-size: 36px;
    }
    
    .contact-section p {
        font-size: 16px;
    }
    
    .contact-form,
    .contact-info {
        padding: 30px;
    }
    
    .contact-method {
        flex-direction: column;
    }
    
    .contact-icon {
        margin-bottom: 15px;
    }
}

/* Responsive styles for Who I Am section */
@media (max-width: 768px) {
    .section-header h2 {
        font-size: 36px;
    }
    
    .section-header p {
        font-size: 16px;
    }
    
    .tools-section h3 {
        font-size: 28px;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .tool-circle {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .tool-circle {
        width: 100px;
        height: 100px;
        font-size: 20px;
    }
}

.hero .location {
    font-size: 18px;
    color: var(--gray);
    text-align: left;
    width: 100%;
    display: block;
    margin-left: 0;
    padding-left: 0;
}

.profile-image {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    height: 50vh;
    overflow: hidden;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 50%);
    position: relative;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80%;
    background-color: #eee;
    border-radius: 50% 50% 0 0;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease, background-color var(--transition-speed) ease, box-shadow 0.3s ease;
    padding: 0.8rem 0;
    will-change: background-color, color;
}

/* Dark background for header when over dark sections in light mode */
:root .header.dark-bg {
    background-color: #000000 !important;
}

:root .header.dark-bg .logo,
:root .header.dark-bg .main-nav a,
:root .header.dark-bg .theme-toggle {
    color: #ffffff !important;
}

:root .header.dark-bg .main-nav a::after {
    background-color: #ffffff !important;
}

/* Dark background for header when over dark sections */
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.main-nav {
    margin-left: auto; /* Push nav to the right */
    padding-left: 2rem; /* Add space between logo and nav */
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem; /* Slightly reduced gap between nav items */
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-nav a {
    color: var(--header-text, var(--text-color));
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: inline-block;
}

.main-nav a:hover {
    color: var(--accent-color);
    background-color: rgba(157, 78, 221, 0.1);
    transform: translateY(-2px);
}

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

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

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

.main-nav a:hover,
.main-nav a.active {
    color: #6c63ff;
}

/* Username button */
.username-btn {
    background-color: var(--button-bg, var(--primary-color));
    color: var(--button-text, white) !important;
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(123, 44, 191, 0.3);
    z-index: 1;
}

.username-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(123, 44, 191, 0.4);
    background-color: var(--button-hover, var(--accent-color));
}

.username-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(255,255,255,0.15) 0%,
        rgba(255,255,255,0.25) 50%,
        rgba(255,255,255,0.15) 100%);
    transform: translateX(-100%) skewX(-15deg);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: -1;
}

.username-btn:hover::before {
    transform: translateX(200%) skewX(-15deg);
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.header.dark-bg .main-nav a,
.header.dark-bg .logo {
    color: var(--header-text);
}

.header.dark-bg {
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header.dark-bg .main-nav a,
.header.dark-bg .logo {
    color: var(--header-text);
}

/* Active state for navigation links */
.header .main-nav a.active {
    color: #b6a4fa;
}

/* Username button styling */
.username {
    background-color: #000;
    color: #fff !important;
    transition: background-color 0.3s ease;
}

.header.dark-bg .username {
    background-color: #b6a4fa;
    color: #000 !important;
}

/* Language toggle styling */
.lang {
    color: rgba(0, 0, 0, 0.7);
    transition: color 0.3s ease;
}

.lang.active {
    color: #000;
}

.header.dark-bg .lang {
    color: rgba(255, 255, 255, 0.7);
}

.header.dark-bg .lang.active {
    color: #fff;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 90px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 64px;
    }
    
    .main-nav ul {
        gap: 16px;
    }
    
    .username {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 48px;
    }
    
    .hero .intro,
    .hero .location {
        font-size: 16px;
    }
    
    .main-nav ul {
        gap: 12px;
    }
    
    .lang {
        padding: 4px 8px;
    }
}