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

:root {
    /* Core Colors - Black & Gray Theme */
    --primary-color: #ffffff;
    /* White for primary actions/text */
    --secondary-color: #000000;
    /* Black for backgrounds/secondary text */
    --hero-bg: #0a0a0a;
    /* Very Dark Gray for Hero */
    --text-color: #e0e0e0;
    /* Light Gray for main text */
    --text-light: #a0a0a0;
    /* Medium Gray for secondary text */
    --bg-color: #121212;
    /* Dark Gray for main background */
    --bg-secondary: #1e1e1e;
    /* Slightly lighter gray for secondary backgrounds */

    /* Accents */
    --accent-color: #ffffff;
    /* White accent */
    --accent-hover: #cccccc;
    /* Light Gray hover */
    --accent-blue: #ffffff;
    /* White for links/buttons */
    --accent-blue-light: #333333;
    /* Dark Gray for light accents */

    /* Borders & Shadows */
    --border-color: #333333;
    /* Dark Gray Border */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.8);
    --shadow-glow: 0 0 20px rgba(255, 255, 255, 0.1);

    --animation-duration: 0.3s;
    --animation-easing: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-btn: 8px;
}

html {
    scroll-behavior: smooth;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

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

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes revealText {
    from {
        clip-path: inset(0 100% 0 0);
    }

    to {
        clip-path: inset(0 0 0 0);
    }
}

/* Animation classes */
.animate-on-scroll {
    opacity: 0;
    transition: opacity var(--animation-duration) var(--animation-easing),
        transform var(--animation-duration) var(--animation-easing);
}

.animate-on-scroll.animated {
    opacity: 1;
}

.fade-in-up {
    animation: fadeInUp var(--animation-duration) var(--animation-easing) forwards;
}

.fade-in {
    animation: fadeIn var(--animation-duration) var(--animation-easing) forwards;
}

.slide-in-left {
    animation: slideInLeft var(--animation-duration) var(--animation-easing) forwards;
}

.slide-in-right {
    animation: slideInRight var(--animation-duration) var(--animation-easing) forwards;
}

.scale-in {
    animation: scaleIn var(--animation-duration) var(--animation-easing) forwards;
}

/* Focus Accessibility */
:focus-visible {
    outline: 3px solid var(--accent-blue);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Link Accessibility */
a {
    text-decoration-skip-ink: auto;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-size: 16px;
    /* Reset to standard size for Poppins */
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    color: var(--text-color);
}


body>* {
    position: relative;
    z-index: 1;
}

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

/* Navigation */
.navbar {
    background-color: rgba(18, 18, 18, 0.95);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

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

.hamburger {
    display: none;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

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

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

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

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

.lang-btn {
    background: transparent;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.lang-btn svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.lang-btn:hover {
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lang-btn.active {
    border-color: var(--primary-color);
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 0;
    border-bottom: none;
    position: relative;
    overflow: hidden;
    background-color: var(--hero-bg);
    color: var(--text-color);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/backgrounds/hero-fullstack.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.4;
    z-index: -1;
    pointer-events: none;
}



@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Gradient overlay for hero text readability */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), transparent);
    pointer-events: none;
    z-index: 0;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hero h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 6px;
    background: var(--accent-color);
    animation: expandWidth 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s both;
    border-radius: 3px;
}

@keyframes expandWidth {
    from {
        width: 0;
    }

    to {
        width: 80px;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: var(--text-light);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    position: relative;
    z-index: 1;
    font-weight: 400;
    line-height: 1.6;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--accent-color);
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-btn);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s both;
    z-index: 1;
    box-shadow: 0 4px 6px rgba(255, 255, 255, 0.2);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
    animation: shine 6s infinite linear;
    /* Continuous subtle shine */
}

.btn-primary:hover::before {
    animation: none;
    left: 100%;
    transition: 0.7s;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 255, 255, 0.3);
}

/* Sections */
section {
    padding: 5rem 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    background-color: var(--bg-color);
}


section:last-of-type {
    border-bottom: none;
}

h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 5px var(--shadow-light);
}

h2.animated {
    opacity: 1;
    transform: translateY(0);
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 4px;
    background: var(--accent-blue);
    transition: width 0.8s ease;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

h2.animated::after {
    width: 120px;
}

/* About Section */
.about {
    position: relative;
    background-color: var(--bg-color);
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/backgrounds/about-development.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.35;
    z-index: -1;
    pointer-events: none;
}

.about .container {
    position: relative;
    z-index: 1;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    position: relative;
    z-index: 1;
}

.about-content.animated {
    opacity: 1;
    transform: translateY(0);
}

.about-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    transition: transform 0.3s ease;
}

.about-content p {
    position: relative;
    padding-left: 1.5rem;
}

.about-content p::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-blue);
    opacity: 0.4;
    transition: all 0.3s ease;
    font-weight: bold;
}

.about-content p:hover::before {
    opacity: 1;
    color: var(--accent-blue);
    transform: translateX(5px);
}

.about-content p:hover {
    transform: translateX(5px);
    padding-left: 2rem;
}

/* Projects Section */
.projects {
    position: relative;
    background-color: var(--bg-color);
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/backgrounds/projects-portfolio.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
}


.projects .container {
    position: relative;
    z-index: 1;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.project-card {
    border: 1px solid var(--border-color);
    padding: 2rem;
    transition: all 0.4s var(--animation-easing);
    background-color: var(--secondary-color);
    opacity: 0;
    transform: translateY(20px);
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.project-card:hover {
    border-color: var(--accent-blue-light);
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    z-index: 2;
}

.project-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.01em;
    position: relative;
    padding-bottom: 0.5rem;
}

.project-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: width 0.4s ease;
    border-radius: 1px;
}

.project-card:hover h3::after {
    width: 50px;
}

.project-tech {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 1rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.project-card p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: var(--text-color);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags span {
    background-color: var(--hover-color);
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    display: inline-block;
}

.project-tags span {
    position: relative;
    overflow: hidden;
}

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

.project-tags span:hover::before {
    left: 0;
}

.project-tags span:hover {
    background-color: var(--accent-blue);
    color: var(--secondary-color);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.25);
    border-color: var(--accent-blue);
}

/* Creative Services Section */
.creative-services {
    position: relative;
    background-color: var(--bg-color);
}

.creative-services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/backgrounds/creative-services.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.35;
    z-index: -1;
    pointer-events: none;
}


.creative-services .container {
    position: relative;
    z-index: 1;
}

.section-intro {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-color);
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(15px);
}

.section-intro.animated {
    opacity: 0.8;
    transform: translateY(0);
}

.section-intro:hover {
    opacity: 1;
}

.creative-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.creative-card {
    border: 1px solid var(--border-color);
    padding: 3rem 2rem;
    background-color: var(--secondary-color);
    transition: all 0.4s var(--animation-easing);
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.creative-card:hover {
    border-color: var(--accent-blue-light);
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.creative-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.creative-icon {
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--primary-color);
}

.creative-icon svg {
    width: 48px;
    height: 48px;
    stroke-width: 1.5;
}

.creative-card:hover .creative-icon {
    transform: scale(1.2) rotate(10deg);
    animation: float 3s ease-in-out infinite;
}

.creative-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.01em;
    position: relative;
    padding-bottom: 0.5rem;
}

.creative-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: width 0.4s ease;
    border-radius: 1px;
}

.creative-card:hover h3::after {
    width: 60px;
}

.creative-card p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-color);
    text-align: left;
}

.creative-features {
    list-style: none;
    padding: 0;
    text-align: left;
}

.creative-features li {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    position: relative;
    padding-left: 1.5rem;
}

.creative-features li:last-child {
    border-bottom: none;
}

.creative-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.creative-portfolio {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.creative-portfolio h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--primary-color);
}

.creative-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.creative-item {
    border: 1px solid var(--border-color);
    padding: 2rem;
    background-color: var(--secondary-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px);
    border-radius: 12px;
}

.creative-item.animated {
    opacity: 1;
    transform: translateY(0);
}

.creative-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.creative-item h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.creative-item p {
    line-height: 1.6;
    color: var(--text-color);
}

/* Skills Section */
.skills {
    position: relative;
    background-color: var(--bg-color);
}

.skills::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/backgrounds/skills-technology.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
}


.skills .container {
    position: relative;
    z-index: 1;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-category {
    border: 1px solid var(--border-color);
    padding: 2rem;
    background-color: var(--secondary-color);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--accent-blue);
    transition: height 0.4s ease;
    border-radius: 0 2px 2px 0;
}

.skill-category:hover::before {
    height: 100%;
}

.skill-category.animated {
    opacity: 1;
    transform: translateY(0);
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    border-left-color: var(--accent-blue);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
    background-color: var(--accent-blue-light);
}

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.01em;
    position: relative;
    padding-left: 1rem;
}

.skill-category h3::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 0.8em;
    opacity: 0.5;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.skill-category:hover h3::before {
    transform: translateX(5px);
    opacity: 1;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    transition: all 0.3s ease;
    padding-left: 0.5rem;
}

.skill-category li:hover {
    padding-left: 1rem;
    color: var(--accent-blue);
    font-weight: 500;
}

.skill-category li:last-child {
    border-bottom: none;
}

/* Contact Section */
.contact {
    text-align: center;
    position: relative;
    background-color: var(--bg-color);
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/backgrounds/contact-connection.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.35;
    z-index: -1;
    pointer-events: none;
}



.contact .container {
    position: relative;
    z-index: 1;
}

.contact p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.contact-info {
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.contact-info.animated {
    opacity: 1;
    transform: translateY(0);
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    transition: transform 0.3s ease, background-color 0.3s ease;
    padding: 0.5rem;
    border-radius: 4px;
}

.contact-info p {
    position: relative;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.contact-info p:hover {
    transform: translateX(5px);
    background-color: var(--accent-blue-light);
    border-left-color: var(--accent-blue);
    padding-left: 1rem;
}

.availability {
    font-weight: 600;
    color: var(--primary-color);
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    color: var(--text-color);
    padding: 2rem 0;
    animation: fadeIn 0.6s ease-in 0.3s both;
}

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

.footer p {
    margin: 0;
    transition: transform 0.3s ease;
}

.footer:hover p {
    transform: scale(1.05);
}

.footer nav a {
    transition: all 0.3s ease;
    display: inline-block;
}

.footer nav a:hover {
    transform: translateY(-2px);
    text-decoration: underline;
}

/* Footer Language Switcher */
.footer-language-switcher {
    display: flex;
    gap: 0.3rem;
}

.lang-btn-footer {
    background: transparent;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-btn-footer svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lang-btn-footer:hover,
.lang-btn-footer:active,
.lang-btn-footer:focus {
    opacity: 1;
    transform: scale(1.1);
}

.lang-btn-footer.active {
    border-color: rgba(255, 255, 255, 0.8);
    opacity: 1;
    transform: scale(1.1);
}

/* Footer language switcher always visible */
.footer-language-switcher {
    display: flex;
}

/* Responsive Design */
/* Responsive Design - Premium Mobile Experience */
@media (max-width: 768px) {

    /* Mobile Navigation - Hamburger Style */
    .navbar {
        display: block;
        /* Show navbar on mobile */
        padding: 1rem 0;
    }

    .hamburger {
        display: block;
        cursor: pointer;
        z-index: 1002;
    }

    .hamburger .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        -webkit-transition: all 0.3s ease-in-out;
        transition: all 0.3s ease-in-out;
        background-color: var(--primary-color);
        border-radius: 2px;
    }

    /* Hamburger Animation */
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        /* Adjust based on navbar height */
        gap: 0;
        flex-direction: column;
        background-color: rgba(18, 18, 18, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        border-bottom: 1px solid var(--border-color);
        height: auto;
        bottom: auto;
        /* Reset bottom property */
        justify-content: flex-start;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-top: none;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
        display: block;
        /* Reset flex */
    }

    .nav-menu a {
        font-size: 1.1rem;
        flex-direction: row;
        /* Reset flex direction */
        justify-content: center;
        padding: 0.5rem 1rem;
        font-weight: 500;
        color: var(--text-color);
    }

    .nav-menu a:hover {
        color: var(--primary-color);
        background-color: transparent;
        transform: none;
    }

    /* Hide language switcher in header on mobile, keep in footer */
    .navbar .language-switcher {
        display: none;
    }

    /* Adjust CTA for mobile menu */
    .nav-cta {
        display: none !important;
        /* Hide CTA in navbar on mobile, maybe add to menu? */
    }

    /* Add CTA to mobile menu if needed, or keep floating */
    /* For now, let's keep the floating CTA but adjust position if needed */
    /* Actually, let's hide the floating CTA and rely on the menu links */

    /* Re-enable CTA in menu if we want */


    /* Hero Section - Mobile Optimized */
    .hero {
        min-height: 85vh;
        /* Taller hero on mobile */
        padding: 6rem 0 4rem;
        text-align: center;
        display: flex;
        align-items: center;
    }

    .hero h1 {
        font-size: 2.5rem;
        /* Prevent overflow */
        line-height: 1.2;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 1rem;
        margin-bottom: 2.5rem;
    }

    /* Section Spacing */
    section {
        padding: 4rem 0;
    }

    h2 {
        font-size: 2.2rem;
        margin-bottom: 2.5rem;
    }

    /* Cards - Mobile Snap/Stack */
    .projects-grid,
    .creative-grid,
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 0.5rem;
    }

    .project-card,
    .creative-card {
        padding: 2rem 1.5rem;
        transform: translateY(0) !important;
        /* Reset transform for better scroll */
        opacity: 1 !important;
        /* Ensure visibility */
    }

    /* Footer Adjustments */
    .footer {
        padding-bottom: 100px;
        /* Space for bottom nav */
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-language-switcher {
        order: -1;
        justify-content: center;
        margin-bottom: 1rem;
    }
}

/* Enable hover effects on touch devices using :active and :focus */
@media (hover: none) and (pointer: coarse) {

    /* Navigation links - active state for touch */
    .nav-menu a:active,
    .nav-menu a:focus {
        transform: translateY(-2px);
        opacity: 0.8;
        color: var(--accent-blue);
    }

    .nav-menu a:active::after,
    .nav-menu a:focus::after {
        width: 100%;
    }

    /* Buttons - active state for touch */
    .btn-primary:active,
    .btn-primary:focus {
        background-color: var(--accent-blue);
        border-color: var(--accent-blue);
        color: var(--secondary-color);
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
    }

    /* Language buttons - active state for touch */
    .lang-btn:active,
    .lang-btn:focus {
        background-color: var(--accent-blue);
        border-color: var(--accent-blue);
        color: var(--secondary-color);
        transform: scale(1.05);
        box-shadow: 0 3px 10px rgba(255, 255, 255, 0.2);
    }

    /* Project cards - active state for touch */
    .project-card:active,
    .project-card:focus {
        border-color: var(--accent-blue);
        box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
        transform: translateY(-5px);
    }

    /* Creative cards - active state for touch */
    .creative-card:active,
    .creative-card:focus {
        border-color: var(--accent-blue);
        box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
        transform: translateY(-5px);
    }

    /* Skill categories - active state for touch */
    .skill-category:active,
    .skill-category:focus {
        border-color: var(--accent-blue);
        border-left-color: var(--accent-blue);
        box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
        transform: translateY(-3px);
    }

    /* Contact info - active state for touch */
    .contact-info p:active,
    .contact-info p:focus {
        border-left-color: var(--accent-blue);
        transform: translateX(5px);
    }

    /* Project tags - active state for touch */
    .project-tags span:active,
    .project-tags span:focus {
        background-color: var(--accent-blue);
        border-color: var(--accent-blue);
        color: var(--secondary-color);
        box-shadow: 0 3px 8px rgba(255, 255, 255, 0.2);
    }
}

/* Add touch-action for better touch interactions */
.nav-menu a,
.btn-primary,
.lang-btn,
.project-card,
.creative-card,
.skill-category,
.contact-info p,
.project-tags span {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* RTL Support for Farsi */
[dir="rtl"] {
    direction: rtl;
}



[dir="rtl"] .language-switcher {
    flex-direction: row-reverse;
}

/* Enhanced Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.contact-card {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-lg);
}

.contact-avatar {
    width: 100px;
    height: 100px;
    background-color: var(--bg-color);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--accent-blue);
    color: var(--primary-color);
    overflow: hidden;
    padding: 0;
}

.contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.contact-role {
    color: var(--accent-blue);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
    font-weight: 600;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

.contact-link:hover {
    color: var(--primary-color);
    background-color: var(--bg-color);
}

.contact-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.btn-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background-color: #0077b5;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-btn);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.btn-linkedin:hover {
    background-color: #005582;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.3);
}

.btn-linkedin svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Enhanced Footer */
.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

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

.footer-links a:hover {
    color: var(--accent-blue);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

.footer-copyright {
    color: var(--text-light);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}