/* ============================================
   CSS Variables / Custom Properties
   ============================================ */
:root {
    --primary-color: #1f2937;
    --secondary-color: #8b5cf6;
    --accent-color: #3b82f6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Typography Variables */
    --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    --font-weight-black: 900;
    
    /* Modular Typographic Scale (Major Third - 1.25) */
    --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);      /* 12-14px */
    --font-size-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);        /* 14-16px */
    --font-size-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);      /* 16-18px */
    --font-size-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);       /* 18-20px */
    --font-size-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);        /* 20-24px */
    --font-size-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);              /* 24-32px */
    --font-size-3xl: clamp(2rem, 1.7rem + 1.5vw, 2.5rem);            /* 32-40px */
    --font-size-4xl: clamp(2.5rem, 2rem + 2.5vw, 3.5rem);            /* 40-56px */
    --font-size-5xl: clamp(3rem, 2.3rem + 3.5vw, 4.5rem);           /* 48-72px */
    
    /* Line Heights (Optimal for readability) */
    --line-height-tight: 1.2;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --line-height-loose: 1.75;
    
    /* Letter Spacing */
    --letter-spacing-tighter: -0.05em;
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;
    --letter-spacing-widest: 0.1em;
}

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

/* Typography Base Styles */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    color: var(--primary-color);
}

p {
    margin-bottom: 1.25rem;
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
}

p:last-child {
    margin-bottom: 0;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-relaxed);
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1;
}

/* Prevent body scroll when loader is visible */
body.loading {
    overflow: hidden;
}

/* ============================================
   Page Loader
   ============================================ */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.loader-spinner {
    position: relative;
    width: 80px;
    height: 80px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(1) {
    animation-delay: -0.45s;
    border-top-color: var(--primary-color);
}

.spinner-ring:nth-child(2) {
    animation-delay: -0.3s;
    border-top-color: var(--secondary-color);
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
}

.spinner-ring:nth-child(3) {
    animation-delay: -0.15s;
    border-top-color: var(--primary-color);
    width: 50%;
    height: 50%;
    top: 25%;
    left: 25%;
    opacity: 0.7;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loader-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.loader-name {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    letter-spacing: var(--letter-spacing-tight);
    line-height: var(--line-height-tight);
    animation: fadeInUp 0.8s ease;
}

.loader-subtitle {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-light);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
    animation: fadeInUp 1s ease;
    opacity: 0.8;
}

/* ============================================
   Navigation
   ============================================ */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease, padding 0.3s ease;
}

nav.scrolled {
    box-shadow: var(--shadow-md);
    padding: 0.75rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1001;
}

.logo {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-tight);
    background: var(--primary-color);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: var(--line-height-tight);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-base);
    letter-spacing: var(--letter-spacing-normal);
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.nav-links a:hover::before {
    width: 100%;
}

.nav-links a.active {
    opacity: 1;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
    position: relative;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

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

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    background: var(--bg-color);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: float 15s ease-in-out infinite reverse;
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    min-width: 300px;
    text-align: left;
    position: relative;
    z-index: 1;
    color: var(--primary-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

.hero-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
}

.hero-image {
    position: relative;
    z-index: 1;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    border-radius: 50%;
    z-index: -1;
    animation: pulse 4s ease-in-out infinite;
}

.hero-image img {
    width: 100%;
    max-width: 700px;
    height: auto;
    object-fit: contain;
    filter: grayscale(80%) contrast(1.1);
    transition: filter 0.3s ease, transform 0.3s ease;
    animation: fadeInRight 1s ease 0.3s both, float 6s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.hero-image:hover img {
    filter: grayscale(0%) contrast(1.15);
    transform: scale(1.02);
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.3;
    }
}

.hero h1 {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tighter);
    animation: fadeInUp 0.8s ease;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.hero h1:first-of-type {
    margin-bottom: -0.5rem;
    font-weight: var(--font-weight-light);
    letter-spacing: var(--letter-spacing-tight);
}

.hero h1:last-of-type {
    font-weight: var(--font-weight-extrabold);
    letter-spacing: var(--letter-spacing-tighter);
}

.hero p {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-relaxed);
    letter-spacing: var(--letter-spacing-normal);
    margin-bottom: 2rem;
    margin-top: 1rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease;
    color: var(--primary-color);
    min-height: 2rem;
}

#typing-text {
    color: var(--secondary-color);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    letter-spacing: var(--letter-spacing-wide);
    line-height: var(--line-height-relaxed);
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#typing-text::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--secondary-color);
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
    font-family: var(--font-family-base);
    letter-spacing: var(--letter-spacing-wide);
    line-height: var(--line-height-normal);
    transition: opacity 0.3s;
    animation: fadeInUp 1.2s ease;
}

.cta-button:hover {
    opacity: 0.9;
}

/* ============================================
   Sections
   ============================================ */
section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    text-align: center;
    margin-bottom: 4rem;
    color: var(--primary-color);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    border-radius: 2px;
}

.section-title.animate-in {
    opacity: 1;
    transform: translateY(0);
}

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

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-loose);
    letter-spacing: var(--letter-spacing-normal);
    color: var(--text-color);
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.about-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--secondary-color), var(--accent-color));
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.8s ease;
}

.about-text.animate-in::before {
    transform: scaleY(1);
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-text:nth-child(2) {
    transform: translateX(30px);
}

.about-text.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.about-text:nth-child(1).animate-in {
    transition-delay: 0.2s;
}

.about-text:nth-child(2).animate-in {
    transition-delay: 0.4s;
}

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

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

.project-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 1;
}

.project-card.animate-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.project-card:nth-child(1).animate-in {
    transition-delay: 0.1s;
}

.project-card:nth-child(2).animate-in {
    transition-delay: 0.3s;
}

.project-card:nth-child(3).animate-in {
    transition-delay: 0.5s;
}

.project-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px) scale(1.02);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.project-screenshot {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    height: auto;
    min-height: 400px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transition: background 0.3s ease;
}

.project-screenshot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.03), rgba(59, 130, 246, 0.03));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-screenshot::after {
    opacity: 1;
}

.project-screenshot img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: block;
    background: transparent;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.project-card:hover .project-screenshot img {
    transform: scale(1.05);
}

.project-content {
    padding: 2rem;
    position: relative;
}

.project-content h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-snug);
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.project-content p {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-relaxed);
    letter-spacing: var(--letter-spacing-normal);
    color: var(--text-color);
    margin-bottom: 1.25rem;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
    letter-spacing: var(--letter-spacing-wide);
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.project-links a:hover:not(.coming-soon) {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    color: var(--secondary-color);
    transform: translateX(4px);
}

.project-links a::after {
    content: '→';
    transition: transform 0.3s ease;
    display: inline-block;
}

.project-links a:hover:not(.coming-soon)::after {
    transform: translateX(4px);
}

.project-links a.coming-soon {
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

.coming-soon-badge {
    display: inline-block;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    letter-spacing: var(--letter-spacing-wide);
    background: var(--bg-light);
    color: var(--text-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    text-transform: uppercase;
}

/* ============================================
   Contact Section
   ============================================ */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.contact-form.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.form-group {
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.form-group.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.form-group:nth-child(1).animate-in {
    transition-delay: 0.1s;
}

.form-group:nth-child(2).animate-in {
    transition-delay: 0.2s;
}

.form-group:nth-child(3).animate-in {
    transition-delay: 0.3s;
}

.form-group:nth-child(4).animate-in {
    transition-delay: 0.4s;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    letter-spacing: var(--letter-spacing-wide);
    color: var(--text-color);
    text-transform: uppercase;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    letter-spacing: var(--letter-spacing-normal);
    color: var(--text-color);
    background: var(--bg-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1), var(--shadow-md);
    transform: translateY(-2px);
}

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

.form-group input.error,
.form-group textarea.error {
    border-color: #ef4444;
}

.error-message {
    color: #ef4444;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    letter-spacing: var(--letter-spacing-normal);
    margin-top: 0.5rem;
    line-height: var(--line-height-normal);
}

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

.submit-button {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    font-family: var(--font-family-base);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: var(--line-height-normal);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-button:hover::before {
    left: 100%;
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.submit-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submit-button.loading {
    position: relative;
    color: transparent;
}

.submit-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Form Validation States */
.form-group input.valid,
.form-group textarea.valid {
    border-color: #10b981;
}

.form-group input.valid:focus,
.form-group textarea.valid:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    max-width: 500px;
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-family: var(--font-family-base);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: #10b981;
}

.toast-error {
    background: #ef4444;
}

.toast-info {
    background: #3b82f6;
}

.toast-icon {
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-weight: var(--font-weight-medium);
}

.toast-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    opacity: 1;
}

.toast-close:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        min-width: auto;
        max-width: none;
    }
}

/* ============================================
   Lazy Loading Images
   ============================================ */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[data-src].loaded {
    opacity: 1;
}

/* ============================================
   Keyboard Navigation & Focus Management
   ============================================ */
.project-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: 10px;
}

.project-card:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

/* Skip to main content link (hidden but accessible) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 4px 0;
    font-weight: var(--font-weight-semibold);
}

.skip-link:focus {
    top: 0;
}

main:focus {
    outline: none;
}

main[tabindex="-1"]:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

/* ============================================
   Footer
   ============================================ */
footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, #111827 100%);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

footer p {
    font-weight: var(--font-weight-normal);
    letter-spacing: var(--letter-spacing-normal);
    opacity: 0.9;
}

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

.social-links a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.1);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.social-links a:hover::before {
    width: 100%;
    height: 100%;
}

.social-links a i {
    font-size: 1.5rem;
}

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

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

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

@keyframes float {

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

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

/* ============================================
   Scroll Animations
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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


/* ============================================
   Back to Top Button
   ============================================ */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

#back-to-top::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

#back-to-top:hover::before {
    width: 100%;
    height: 100%;
}

#back-to-top[aria-hidden="true"] {
    opacity: 0;
    visibility: hidden;
}

#back-to-top[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

#back-to-top:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: var(--shadow-xl);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .loader-spinner {
        width: 60px;
        height: 60px;
    }
    
    .loader-name {
        font-size: var(--font-size-xl);
    }
    
    .loader-subtitle {
        font-size: var(--font-size-xs);
    }
    
    .loader-content {
        gap: 1.5rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-top: 1px solid var(--border-color);
        z-index: 999;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    body.menu-open {
        overflow: hidden;
    }

    .hero {
        padding: 5rem 2rem;
        align-items: center;
    }

    .hero-container {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
        justify-content: center;
    }

    .hero-content {
        text-align: center;
        order: 1;
        align-items: center;
    }

    .hero-image {
        order: 2;
    }

    .hero-image img {
        max-width: 100%;
    }

    .hero h1 {
        font-size: var(--font-size-4xl);
    }

    .hero p {
        font-size: var(--font-size-lg);
    }
    
    #typing-text {
        font-size: var(--font-size-base);
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: var(--font-size-3xl);
    }
    
    .about-text {
        font-size: var(--font-size-base);
    }
    
    .project-content h3 {
        font-size: var(--font-size-xl);
    }
    
    .project-content p {
        font-size: var(--font-size-sm);
    }

    .project-screenshot {
        min-height: 300px;
        padding: 0;
    }

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