/* CSS Variables for Light and Dark Themes */
:root {
    /* Light theme colors */
    --bg-color: #f8f9fa;
    --text-color: #333;
    --header-bg: white;
    --card-bg: #f1f5f9;
    --card-text: #1e293b;
    --card-subtext: #64748b;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --secondary-accent: #3b82f6;
    --border-color: #cbd5e1;
    --footer-bg: #1e293b;
    --footer-text: white;
    --footer-subtext: #94a3b8;
    --icon-bg: white;
    --placeholder-bg: #2563eb;
    --portfolio-bg: #f8fafc;
    --stat-color: #2563eb;
    --btn-primary-text: white;
    --btn-secondary-text: #2563eb;
    --btn-secondary-border: #2563eb;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.1);
    --hero-gradient-start: #2563eb;
    --hero-gradient-end: #3b82f6;
}

/* Dark theme colors */
[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-color: #e2e8f0;
    --header-bg: #1e293b;
    --card-bg: #1e293b;
    --card-text: #e2e8f0;
    --card-subtext: #94a3b8;
    --accent-color: #3b82f6;
    --accent-hover: #60a5fa;
    --secondary-accent: #2563eb;
    --border-color: #334155;
    --footer-bg: #0f172a;
    --footer-text: #e2e8f0;
    --footer-subtext: #94a3b8;
    --icon-bg: #1e293b;
    --placeholder-bg: #3b82f6;
    --portfolio-bg: #1e293b;
    --stat-color: #3b82f6;
    --btn-primary-text: white;
    --btn-secondary-text: #3b82f6;
    --btn-secondary-border: #3b82f6;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);
    --hero-gradient-start: #1e3a8a;
    --hero-gradient-end: #1d4ed8;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    animation: fadeIn 0.5s ease-in-out;
}

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

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

ul {
    list-style: none;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 15px;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    transition: all 0.4s ease;
    cursor: pointer;
    border: none;
    animation: fadeIn 0.5s ease-in-out;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--btn-primary-text);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    transform: translateX(100%);
}

.btn-secondary {
    background-color: transparent;
    color: var(--btn-secondary-text);
    border: 3px solid var(--btn-secondary-border);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: var(--btn-primary-text);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.4);
    border-color: var(--accent-color);
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: -1;
}

.btn-secondary:hover::before {
    transform: translateX(100%);
}

/* Header */
.header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-accent));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.header:hover::after {
    transform: scaleX(1);
}

.stars-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
}

[data-theme="dark"] .stars-container {
    opacity: 1;
}

.star {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    animation: twinkle var(--duration, 3s) infinite ease-in-out;
    opacity: 0;
}

.star:nth-child(1) {
    top: 20%;
    left: 10%;
    width: 2px;
    height: 2px;
    --duration: 2s;
    animation-delay: 0s;
}

.star:nth-child(2) {
    top: 30%;
    left: 25%;
    width: 3px;
    height: 3px;
    --duration: 4s;
    animation-delay: 0.5s;
}

.star:nth-child(3) {
    top: 15%;
    left: 40%;
    width: 1px;
    height: 1px;
    --duration: 3s;
    animation-delay: 1s;
}

.star:nth-child(4) {
    top: 40%;
    left: 55%;
    width: 2px;
    height: 2px;
    --duration: 5s;
    animation-delay: 1.5s;
}

.star:nth-child(5) {
    top: 25%;
    left: 70%;
    width: 3px;
    height: 3px;
    --duration: 2.5s;
    animation-delay: 2s;
}

.star:nth-child(6) {
    top: 35%;
    left: 85%;
    width: 1px;
    height: 1px;
    --duration: 4s;
    animation-delay: 2.5s;
}

.star:nth-child(7) {
    top: 10%;
    left: 90%;
    width: 2px;
    height: 2px;
    --duration: 3s;
    animation-delay: 3s;
}

.star:nth-child(8) {
    top: 50%;
    left: 5%;
    width: 1px;
    height: 1px;
    --duration: 5s;
    animation-delay: 3.5s;
}

.star:nth-child(9) {
    top: 60%;
    left: 20%;
    width: 3px;
    height: 3px;
    --duration: 2s;
    animation-delay: 4s;
}

.star:nth-child(10) {
    top: 45%;
    left: 35%;
    width: 2px;
    height: 2px;
    --duration: 4s;
    animation-delay: 4.5s;
}

.star:nth-child(11) {
    top: 70%;
    left: 50%;
    width: 1px;
    height: 1px;
    --duration: 3s;
    animation-delay: 5s;
}

.star:nth-child(12) {
    top: 55%;
    left: 65%;
    width: 2px;
    height: 2px;
    --duration: 5s;
    animation-delay: 5.5s;
}

.star:nth-child(13) {
    top: 65%;
    left: 80%;
    width: 3px;
    height: 3px;
    --duration: 2.5s;
    animation-delay: 6s;
}

.star:nth-child(14) {
    top: 75%;
    left: 95%;
    width: 1px;
    height: 1px;
    --duration: 4s;
    animation-delay: 6.5s;
}

.star:nth-child(15) {
    top: 85%;
    left: 15%;
    width: 2px;
    height: 2px;
    --duration: 3s;
    animation-delay: 7s;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: relative;
    z-index: 2;
    animation: slideInDown 0.5s ease-out;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo h2 {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

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

.logo h2:hover::after {
    width: 100%;
}

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

.logo span {
    color: var(--secondary-accent);
}

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

.nav-link {
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    transition: all 0.3s ease;
    padding: 5px 0;
}

.nav-link:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

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

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

.theme-toggle {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.3s ease;
    margin-left: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.05);
}

.theme-toggle:hover {
    transform: rotate(20deg) scale(1.1);
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--accent-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-left: 15px;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.hamburger:hover {
    background-color: rgba(37, 99, 235, 0.1);
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.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);
}

/* Hero Section */
.hero {
    padding: 150px 0 100px;
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    color: white;
    text-align: center;
    animation: fadeIn 1s ease-in-out;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
    pointer-events: none;
}

.hero-content {
    animation: fadeIn 0.5s ease-in-out;
}

.hero-content h1 {
    margin-bottom: 20px;
    font-weight: 700;
    animation: slideInUp 1s ease-out;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
    animation: slideInUp 1s ease-out 0.2s both;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    animation: slideInUp 1s ease-out 0.4s both;
}

.hero-buttons .btn {
    animation: pulse 2s infinite;
    animation-delay: 0.5s;
}

.hero-buttons .btn-secondary {
    animation-delay: 0.7s;
}

.hero-buttons .btn:hover {
    animation: none;
}

/* Services Section */
.services {
    padding: 100px 0;
    background-color: var(--header-bg);
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.section-header {
    margin-bottom: 60px;
    animation: fadeIn 0.8s ease-in-out;
    position: relative;
    animation-delay: 0.1s;
    animation-fill-mode: both;
}

.section-header h2 {
    color: var(--card-text);
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-accent));
    border-radius: 3px;
}

.section-header p {
    text-align: center;
    font-size: 1.2rem;
    color: var(--card-subtext);
    max-width: 700px;
    margin: 20px auto 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    animation: fadeIn 0.5s ease-in-out 0.2s both;
}

.service-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px var(--shadow);
    animation: fadeIn 0.5s ease-in-out;
    position: relative;
    overflow: hidden;
    z-index: 1;
    animation-delay: calc(0.1s * var(--item-index, 0));
    animation-fill-mode: both;
}

.service-card:nth-child(1) { --item-index: 1; }
.service-card:nth-child(2) { --item-index: 2; }
.service-card:nth-child(3) { --item-index: 3; }
.service-card:nth-child(4) { --item-index: 4; }
.service-card:nth-child(5) { --item-index: 5; }
.service-card:nth-child(6) { --item-index: 6; }

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px var(--shadow-hover);
}

.service-card:hover::before {
    transform: translateX(100%);
}

.service-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    transition: all 0.3s ease;
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    background-color: rgba(37, 99, 235, 0.1);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.2);
    animation: fadeIn 0.3s ease-in-out;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    background-color: rgba(37, 99, 235, 0.2);
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--card-text);
    animation: fadeIn 0.3s ease-in-out 0.1s both;
}

.service-card p {
    color: var(--card-subtext);
    animation: fadeIn 0.3s ease-in-out 0.2s both;
}

/* About Section */
.about {
    padding: 100px 0;
    background-color: var(--card-bg);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    animation: fadeIn 0.5s ease-in-out;
}

.about-text {
    animation: fadeIn 0.5s ease-in-out;
}

.about-text h2 {
    color: var(--card-text);
}

.about-text p {
    color: var(--card-subtext);
    margin-bottom: 20px;
}

.about-image {
    animation: fadeIn 0.5s ease-in-out 0.2s both;
}

.stats {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    animation: fadeIn 0.5s ease-in-out 0.3s both;
}

.stat-item {
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
    transition: transform 0.3s ease;
    animation-delay: calc(0.1s * var(--item-index, 0));
    animation-fill-mode: both;
}

.stat-item:nth-child(1) { --item-index: 1; }
.stat-item:nth-child(2) { --item-index: 2; }
.stat-item:nth-child(3) { --item-index: 3; }

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

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--stat-color);
    margin-bottom: 5px;
    transition: transform 0.3s ease;
}

.stat-item:hover h3 {
    transform: scale(1.1);
}

.stat-item p {
    color: var(--card-subtext);
    font-weight: 500;
    animation: fadeIn 0.3s ease-in-out 0.2s both;
}

.image-placeholder {
    background: linear-gradient(135deg, var(--placeholder-bg), var(--accent-color));
    border-radius: 10px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 5rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.5s ease-in-out 0.3s both;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.image-placeholder:hover {
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.image-placeholder:hover::before {
    transform: translateX(100%);
}

/* Portfolio Section */
.portfolio {
    padding: 100px 0;
    background-color: var(--bg-color);
    position: relative;
}

.portfolio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    animation: fadeIn 0.5s ease-in-out 0.2s both;
}

.portfolio-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
    transition: all 0.4s ease;
    animation: fadeIn 0.5s ease-in-out;
    position: relative;
    overflow: hidden;
    z-index: 1;
    animation-delay: calc(0.1s * var(--item-index, 0));
    animation-fill-mode: both;
}

.portfolio-item:nth-child(1) { --item-index: 1; }
.portfolio-item:nth-child(2) { --item-index: 2; }
.portfolio-item:nth-child(3) { --item-index: 3; }
.portfolio-item:nth-child(4) { --item-index: 4; }

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: -1;
}

.portfolio-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px var(--shadow-hover);
}

.portfolio-item:hover::before {
    transform: translateX(100%);
}

.portfolio-image {
    background: linear-gradient(135deg, var(--placeholder-bg), var(--accent-color));
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.3s ease-in-out;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.05);
}

.portfolio-info {
    padding: 20px;
    background-color: var(--portfolio-bg);
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease-in-out;
}

.portfolio-item:hover .portfolio-info {
    background-color: var(--card-bg);
}

.portfolio-info h3 {
    color: var(--card-text);
    margin-bottom: 10px;
    animation: fadeIn 0.3s ease-in-out 0.1s both;
}

.portfolio-info p {
    color: var(--card-subtext);
    animation: fadeIn 0.3s ease-in-out 0.2s both;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background-color: var(--card-bg);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 50px;
    animation: fadeIn 0.5s ease-in-out 0.2s both;
}

.contact-info {
    animation: fadeIn 0.5s ease-in-out;
}

.contact-details {
    animation: fadeIn 0.3s ease-in-out 0.1s both;
}

.contact-form {
    animation: fadeIn 0.5s ease-in-out 0.3s both;
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease-in-out;
    transition: transform 0.3s ease;
    padding: 15px;
    border-radius: 10px;
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px var(--shadow);
    animation-delay: calc(0.1s * var(--item-index, 0));
    animation-fill-mode: both;
}

.contact-item:nth-child(1) { --item-index: 1; }
.contact-item:nth-child(2) { --item-index: 2; }
.contact-item:nth-child(3) { --item-index: 3; }

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-hover);
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
    background-color: var(--icon-bg);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.contact-item:hover .contact-icon {
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.contact-details h3 {
    color: var(--card-text);
    margin-bottom: 5px;
    animation: fadeIn 0.3s ease-in-out 0.2s both;
}

.contact-details p {
    color: var(--card-subtext);
    animation: fadeIn 0.3s ease-in-out 0.3s both;
}

.contact-form .form-group {
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in-out;
    animation-delay: calc(0.1s * var(--item-index, 0));
    animation-fill-mode: both;
}

.contact-form .form-group:nth-child(1) { --item-index: 1; }
.contact-form .form-group:nth-child(2) { --item-index: 2; }
.contact-form .form-group:nth-child(3) { --item-index: 3; }
.contact-form .form-group:nth-child(4) { --item-index: 4; }

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease, background-color 0.3s ease;
    background-color: var(--header-bg);
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
    background-color: var(--bg-color);
}

.contact-form input:hover,
.contact-form textarea:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--card-subtext);
    opacity: 0.7;
}

.contact-form button.btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease-in-out 0.4s both;
}

.contact-form button.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.5);
}

/* Footer */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 70px 0 0;
    position: relative;
    animation: fadeIn 0.5s ease-in-out;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-accent));
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
    animation: fadeIn 0.5s ease-in-out;
}

.footer-logo {
    animation: fadeIn 0.3s ease-in-out;
}

.footer-logo h2 {
    color: var(--footer-text);
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease-in-out 0.1s both;
}

.footer-logo p {
    color: var(--footer-subtext);
    max-width: 300px;
    animation: fadeIn 0.3s ease-in-out 0.2s both;
}

.footer-links,
.footer-social {
    animation: fadeIn 0.3s ease-in-out 0.2s both;
}

.footer-links h3,
.footer-social h3 {
    color: var(--footer-text);
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
    animation: fadeIn 0.3s ease-in-out;
}

.footer-links h3::after,
.footer-social h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.footer-links h3:hover::after,
.footer-social h3:hover::after {
    width: 100px;
}

.footer-links ul {
    animation: fadeIn 0.3s ease-in-out 0.1s both;
}

.footer-links ul li {
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease-in-out;
    animation-delay: calc(0.05s * var(--item-index, 0));
    animation-fill-mode: both;
}

.footer-links ul li:nth-child(1) { --item-index: 1; }
.footer-links ul li:nth-child(2) { --item-index: 2; }
.footer-links ul li:nth-child(3) { --item-index: 3; }
.footer-links ul li:nth-child(4) { --item-index: 4; }
.footer-links ul li:nth-child(5) { --item-index: 5; }

.footer-links ul li a {
    color: var(--footer-subtext);
    transition: all 0.3s ease;
    padding: 5px 0;
    display: inline-block;
}

.footer-links ul li a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.social-icons {
    display: flex;
    gap: 15px;
    animation: fadeIn 0.3s ease-in-out 0.2s both;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #334155;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    animation: fadeIn 0.3s ease-in-out;
    animation-delay: calc(0.05s * var(--item-index, 0));
    animation-fill-mode: both;
}

.social-icons a:nth-child(1) { --item-index: 1; }
.social-icons a:nth-child(2) { --item-index: 2; }
.social-icons a:nth-child(3) { --item-index: 3; }
.social-icons a:nth-child(4) { --item-index: 4; }

.social-icons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: -1;
}

.social-icons a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px) scale(1.1);
}

.social-icons a:hover::before {
    transform: translateX(100%);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #334155;
    color: var(--footer-subtext);
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease-in-out 0.3s both;
}

.footer-bottom p {
    margin: 0;
}

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

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2.5rem;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 0;
        align-items: center;
    }
    
    .logo h2 {
        font-size: 1.6rem;
        align-self: center;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--header-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
        z-index: 1001;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .header-controls {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .hamburger {
        display: flex;
        align-items: center;
        align-self: center;
    }
    
    .theme-toggle {
        font-size: 1.3rem;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        align-self: center;
    }
    
    .hero {
        padding: 120px 0 80px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .stats {
        flex-direction: column;
        gap: 30px;
    }
    
    .services-grid,
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    /* Mobile alignment fixes */
    .navbar {
        padding: 15px 0;
        align-items: center;
    }
    
    .logo h2 {
        font-size: 1.6rem;
        align-self: center;
    }
    
    .theme-toggle {
        margin-left: 10px;
        font-size: 1.3rem;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        align-self: center;
    }
    
    .hamburger {
        margin-left: 10px;
        display: flex;
        align-items: center;
        align-self: center;
    }
}

@media (max-width: 576px) {
    .container {
        width: 95%;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        width: 100%;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    /* Further mobile alignment adjustments */
    .navbar {
        padding: 12px 0;
        align-items: center;
    }
    
    .logo h2 {
        font-size: 1.5rem;
        align-self: center;
    }
    
    .header-controls {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .hamburger {
        display: flex;
        align-items: center;
        align-self: center;
    }
    
    .theme-toggle {
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        align-self: center;
    }
}

/* Print Styles */
@media print {
    .header,
    .hero,
    .footer {
        display: none;
    }
    
    body {
        background-color: white;
        color: black;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
}