/* ================================
   DESIGN SYSTEM & CSS VARIABLES
   ================================ */

:root {
    /* Colors */
    --primary-color: #667eea;
    --primary-light: #8b9ef8;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    /* Neutral Colors */
    --dark-bg: #0f0f15;
    --dark-surface: #1a1a23;
    --dark-surface-alt: #252530;
    --dark-text: #ffffff;
    --dark-text-secondary: #b0b0b8;
    --dark-border: #3d3d47;

    --light-bg: #ffffff;
    --light-surface: #f8f8fb;
    --light-surface-alt: #f0f0f5;
    --light-text: #1a1a23;
    --light-text-secondary: #666677;
    --light-border: #e5e5e8;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-secondary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Monaco', monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 2.5rem;
    --spacing-3xl: 3rem;
    --spacing-4xl: 4rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.3);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Current Theme */
    --bg: var(--dark-bg);
    --surface: var(--dark-surface);
    --surface-alt: var(--dark-surface-alt);
    --text: var(--dark-text);
    --text-secondary: var(--dark-text-secondary);
    --border: var(--dark-border);
}

/* Light Mode */
body.light-mode {
    --bg: var(--light-bg);
    --surface: var(--light-surface);
    --surface-alt: var(--light-surface-alt);
    --text: var(--light-text);
    --text-secondary: var(--light-text-secondary);
    --border: var(--light-border);
}

/* ================================
   GLOBAL STYLES
   ================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* ================================
   LOADING SCREEN
   ================================ */

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    flex-direction: column;
    gap: var(--spacing-lg);
    animation: fadeOut 0.6s ease-out 2.4s forwards;
}

.loader {
    position: relative;
    width: 80px;
    height: 80px;
}

.loader-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

.loader-ring:nth-child(2) {
    border-top-color: var(--accent-color);
    animation-delay: 0.4s;
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
}

.loader-ring:nth-child(3) {
    border-top-color: var(--secondary-color);
    animation-delay: 0.8s;
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
}

.loading-text {
    font-size: var(--text-xl);
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* ================================
   SCROLL PROGRESS BAR
   ================================ */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    z-index: 1000;
    transition: width var(--transition-fast);
    box-shadow: 0 0 10px var(--primary-color);
}

/* ================================
   NAVBAR
   ================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-lg) 0;
    background: rgba(15, 15, 21, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    transition: all var(--transition-base);
}

body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.7);
}

.navbar.scroll-down {
    transform: translateY(-100%);
}

.navbar.scroll-up {
    transform: translateY(0);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-secondary);
    font-size: var(--text-2xl);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-base);
}

.nav-link:hover {
    color: var(--text);
}

.nav-link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text);
    transition: all var(--transition-base);
    border-radius: var(--radius-full);
}

/* ================================
   THEME TOGGLE
   ================================ */

.theme-toggle-nav {
    margin-left: var(--spacing-md);
    padding-left: var(--spacing-md);
    border-left: 1px solid var(--border);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text);
    transition: transform var(--transition-base);
}

.theme-toggle:hover {
    transform: rotate(20deg);
}

.sun-icon,
.moon-icon {
    width: 20px;
    height: 20px;
    position: absolute;
    transition: opacity var(--transition-base), transform var(--transition-base);
}

.sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.moon-icon {
    opacity: 0;
    transform: rotate(-180deg);
}

body.light-mode .sun-icon {
    opacity: 0;
    transform: rotate(180deg);
}

body.light-mode .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* ================================
   HERO SECTION
   ================================ */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-4xl) var(--spacing-xl);
    position: relative;
    overflow: hidden;
    background: var(--bg);
    margin-top: 60px;
}

.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at 20% 50%,
        rgba(102, 126, 234, 0.1) 0%,
        transparent 50%
    ),
    radial-gradient(
        ellipse at 80% 50%,
        rgba(240, 147, 251, 0.1) 0%,
        transparent 50%
    );
    animation: gradientShift 8s ease infinite;
    z-index: 0;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-4xl);
    align-items: center;
    z-index: 1;
}

.hero-content {
    animation: slideInUp 0.8s ease-out;
}

.hero-title {
    font-family: var(--font-secondary);
    font-size: var(--text-6xl);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--spacing-lg);
}

.hero-text {
    display: block;
    color: var(--text);
}

.hero-highlight {
    display: block;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInDown 0.8s ease-out;
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-3xl);
    line-height: 1.8;
    max-width: 500px;
    animation: fadeIn 0.8s ease-out 0.2s backwards;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-lg);
    animation: fadeIn 0.8s ease-out 0.4s backwards;
}

@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);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ================================
   BUTTONS
   ================================ */

.btn {
    padding: var(--spacing-md) var(--spacing-2xl);
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: var(--radius-lg);
    opacity: 0;
    transform: translate(-50%, -50%);
    animation: glow 0.6s ease-out;
    pointer-events: none;
}

@keyframes glow {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ================================
   HERO VISUAL ELEMENTS
   ================================ */

.hero-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    animation: float 3s ease-in-out infinite;
}

body.light-mode .floating-card {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.card-icon {
    font-size: 2rem;
}

.floating-card p {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
}

.card-1 {
    top: 20px;
    left: 0;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    animation-delay: 0.2s;
}

.card-3 {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0.4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.scroll-indicator {
    position: absolute;
    bottom: var(--spacing-3xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    animation: bounce 2s ease-in-out infinite;
    cursor: pointer;
}

.scroll-indicator span {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.arrow-down {
    width: 20px;
    height: 20px;
    stroke: var(--primary-color);
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ================================
   CONTAINER
   ================================ */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

/* ================================
   SECTION STYLES
   ================================ */

section {
    padding: var(--spacing-4xl) var(--spacing-xl);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-4xl);
    animation: fadeIn 0.6s ease-out;
}

.section-header h2 {
    font-family: var(--font-secondary);
    font-size: var(--text-5xl);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
}

.section-header p {
    font-size: var(--text-lg);
    color: var(--text-secondary);
}

/* ================================
   ABOUT SECTION
   ================================ */

.about {
    background: var(--surface);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-4xl);
    align-items: center;
}

.about-image {
    animation: slideInLeft 0.8s ease-out;
}

.image-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 3px;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--surface);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.image-placeholder svg {
    width: 100%;
    height: 100%;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.about-text {
    animation: slideInRight 0.8s ease-out;
}

.about-text p {
    font-size: var(--text-base);
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-2xl);
}

.skill-item {
    background: var(--surface-alt);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all var(--transition-base);
}

.skill-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.skill-item h4 {
    margin-bottom: var(--spacing-sm);
    color: var(--text);
}

.skill-item p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
}

/* ================================
   PROJECTS SECTION
   ================================ */

.projects {
    background: var(--bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-2xl);
}

.project-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.6s ease-out;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

.project-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.project-placeholder svg {
    width: 100%;
    height: 100%;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-image {
    transition: transform var(--transition-base);
}

.project-info {
    padding: var(--spacing-2xl);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    margin-bottom: var(--spacing-sm);
    font-size: var(--text-lg);
    font-weight: 700;
}

.project-info p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    flex: 1;
}

.project-tags {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.project-tags span {
    font-size: var(--text-xs);
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    border-radius: var(--radius-full);
}

.project-link {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-base);
    display: inline-block;
}

.project-link:hover {
    gap: var(--spacing-sm);
    transform: translateX(2px);
}

/* ================================
   SERVICES SECTION
   ================================ */

.services {
    background: var(--surface);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-2xl);
}

.service-card {
    background: var(--surface-alt);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    text-align: center;
    transition: all var(--transition-base);
    animation: fadeIn 0.6s ease-out;
}

.service-card:hover {
    transform: translateY(-5px);
    background: rgba(102, 126, 234, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-lg);
    color: white;
}

.service-icon svg {
    width: 30px;
    height: 30px;
}

.service-card h3 {
    margin-bottom: var(--spacing-sm);
    font-size: var(--text-lg);
}

.service-card p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.service-features {
    list-style: none;
    text-align: left;
}

.service-features li {
    font-size: var(--text-sm);
    padding: var(--spacing-sm) 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.service-features li:last-child {
    border-bottom: none;
}

/* ================================
   CONTACT SECTION
   ================================ */

.contact {
    background: var(--bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-4xl);
}

.contact-info {
    animation: slideInLeft 0.8s ease-out;
}

.info-item {
    margin-bottom: var(--spacing-3xl);
}

.info-item h4 {
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.info-item a {
    font-size: var(--text-lg);
    color: var(--text);
    text-decoration: none;
    transition: color var(--transition-base);
}

.info-item a:hover {
    color: var(--primary-color);
}

.info-item p {
    font-size: var(--text-lg);
    color: var(--text);
}

.social-links {
    margin-top: var(--spacing-3xl);
}

.socials {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.social-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text);
    transition: all var(--transition-base);
}

.social-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-color: transparent;
    color: white;
    transform: translateY(-3px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.contact-form {
    animation: slideInRight 0.8s ease-out;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.form-group {
    position: relative;
}

.form-input,
.form-textarea {
    width: 100%;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    color: var(--text);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    transition: all var(--transition-base);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: transparent;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

.form-group label {
    position: absolute;
    left: var(--spacing-md);
    top: var(--spacing-md);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    pointer-events: none;
    transition: all var(--transition-base);
}

.form-input:focus ~ label,
.form-input:not(:placeholder-shown) ~ label,
.form-textarea:focus ~ label,
.form-textarea:not(:placeholder-shown) ~ label {
    top: -10px;
    left: var(--spacing-md);
    font-size: var(--text-xs);
    color: var(--primary-color);
    background: var(--bg);
    padding: 0 var(--spacing-sm);
}

.btn-submit {
    align-self: flex-start;
}

/* ================================
   FOOTER
   ================================ */

.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: var(--spacing-3xl) var(--spacing-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-3xl);
}

.footer-section h4 {
    margin-bottom: var(--spacing-lg);
    font-size: var(--text-lg);
}

.footer-section p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: var(--spacing-md);
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: color var(--transition-base);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: var(--spacing-xl);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.footer-bottom a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* ================================
   BACK TO TOP BUTTON
   ================================ */

.back-to-top {
    position: fixed;
    bottom: var(--spacing-2xl);
    right: var(--spacing-2xl);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: var(--radius-full);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 99;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* ================================
   INTERSECTION OBSERVER ANIMATIONS
   ================================ */

.fade-in {
    opacity: 0;
    animation: fadeInAnim 0.6s ease-out forwards;
}

.slide-in-left {
    opacity: 0;
    animation: slideInLeftAnim 0.6s ease-out forwards;
}

.slide-in-right {
    opacity: 0;
    animation: slideInRightAnim 0.6s ease-out forwards;
}

.slide-in-up {
    opacity: 0;
    animation: slideInUpAnim 0.6s ease-out forwards;
}

@keyframes fadeInAnim {
    to { opacity: 1; }
}

@keyframes slideInLeftAnim {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRightAnim {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUpAnim {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        order: -1;
        height: 300px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: var(--text-4xl);
    }

    .section-header h2 {
        font-size: var(--text-4xl);
    }
}

@media (max-width: 768px) {
    .navbar-container {
        padding: 0 var(--spacing-lg);
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: var(--surface);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: var(--spacing-xl) 0;
        gap: 0;
        z-index: 99;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        display: block;
        padding: var(--spacing-lg);
        border-bottom: 1px solid var(--border);
    }

    .theme-toggle-nav {
        border-left: none;
        border-bottom: 1px solid var(--border);
        padding: var(--spacing-lg) 0;
        margin-left: 0;
    }

    .hero {
        padding: var(--spacing-3xl) var(--spacing-lg);
        margin-top: 70px;
    }

    .hero-title {
        font-size: var(--text-3xl);
    }

    .hero-subtitle {
        font-size: var(--text-base);
    }

    .hero-cta {
        flex-wrap: wrap;
    }

    .floating-card {
        max-width: 100px;
    }

    .section-header h2 {
        font-size: var(--text-3xl);
    }

    .section-header p {
        font-size: var(--text-base);
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    section {
        padding: var(--spacing-3xl) var(--spacing-lg);
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: var(--spacing-lg);
        right: var(--spacing-lg);
    }
}

@media (max-width: 480px) {
    :root {
        font-size: 14px;
    }

    .hero {
        min-height: auto;
        padding-top: var(--spacing-2xl);
    }

    .hero-title {
        font-size: var(--text-2xl);
    }

    .hero-subtitle {
        font-size: var(--text-sm);
        margin-bottom: var(--spacing-2xl);
    }

    .hero-cta {
        gap: var(--spacing-sm);
    }

    .btn {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: var(--text-xs);
    }

    .hero-visual {
        display: none;
    }

    .container {
        padding: 0 var(--spacing-lg);
    }

    .contact-content {
        gap: var(--spacing-2xl);
    }

    .form-input,
    .form-textarea {
        padding: var(--spacing-md);
    }
}
/* =========================
   TARGETED CENTER FIX
========================= */

/* HERO FIX */
.hero-content {
    text-align: center;
    margin: 0 auto;
}

.hero-subtitle {
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    justify-content: center;
}

/* STATS */
.stats-grid {
    justify-content: center;
    text-align: center;
}

/* VALUE SECTION */
.value-proposition {
    text-align: center;
}

.value-proposition p {
    max-width: 700px;
    margin: 0 auto;
}

.value-grid {
    justify-content: center;
}

.value-grid div {
    text-align: center;
}

/* ABOUT TEXT CENTER */
.about-text {
    text-align: center;
    margin: 0 auto;
}

.about-text p {
    margin-left: auto;
    margin-right: auto;
}

/* TIMELINE */
.timeline {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

/* PROJECT CARDS TEXT */
.project-info {
    text-align: center;
}

/* SERVICES */
.service-features {
    text-align: center;
}

/* TESTIMONIALS */
.testimonials {
    text-align: center;
}

.testimonial-grid {
    justify-content: center;
}

/* TOOLS */
.tools {
    text-align: center;
}

.tools-grid {
    justify-content: center;
}

/* CONTACT SECTION */
.contact-content {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
}

.contact-info {
    text-align: center;
}

.socials {
    justify-content: center;
}

.contact-form {
    max-width: 600px;
    width: 100%;
}

/* FINAL CTA */
.final-cta {
    text-align: center;
}