:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --dark-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --light-gradient: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --text-white: #ffffff;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-dark: #1a1a2e;
    
    --accent-purple: #667eea;
    --accent-pink: #f093fb;
    --accent-orange: #fcb69f;
    --accent-green: #22c55e;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    
    --border-radius: 12px;
    --border-radius-lg: 20px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Typography System - Modern 2025 Hierarchy */
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-family-headings: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-family-display: 'Playfair Display', 'Merriweather', Georgia, serif;
    
    /* Font Sizes - Consistent Scale */
    --font-size-xs: 0.75rem;     /* 12px - Small text, labels */
    --font-size-sm: 0.875rem;    /* 14px - Secondary text */
    --font-size-base: 1rem;      /* 16px - Body text */
    --font-size-lg: 1.125rem;    /* 18px - Large body text */
    --font-size-xl: 1.25rem;     /* 20px - Small headings */
    --font-size-2xl: 1.5rem;     /* 24px - H4 headings */
    --font-size-3xl: 2rem;       /* 32px - H3 headings */
    --font-size-4xl: 2.5rem;     /* 40px - H2 headings */
    --font-size-5xl: 3rem;       /* 48px - H1 headings */
    --font-size-6xl: 4rem;       /* 64px - Hero titles */
    
    /* Font Weights - Professional System */
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.6;
    --line-height-relaxed: 1.8;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

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

/* Professional Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 {
    font-family: var(--font-family-headings);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: var(--font-weight-extrabold);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

h2 {
    font-family: var(--font-family-headings);
    font-size: clamp(1.875rem, 4vw, 3.5rem);
    font-weight: var(--font-weight-bold);
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    line-height: 1.2;
}

h3 {
    font-family: var(--font-family-headings);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: var(--font-weight-semibold);
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

h4 {
    font-family: var(--font-family-headings);
    font-size: clamp(1.25rem, 2.5vw, 1.875rem);
    font-weight: var(--font-weight-semibold);
    margin-bottom: 1rem;
    letter-spacing: -0.015em;
    line-height: 1.4;
}

h5 {
    font-family: var(--font-family-headings);
    font-size: 1.125rem;
    font-weight: var(--font-weight-medium);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
    line-height: 1.5;
}

h6 {
    font-family: var(--font-family-headings);
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    margin-bottom: 0.5rem;
    letter-spacing: -0.005em;
    line-height: 1.5;
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.7;
    font-weight: var(--font-weight-regular);
    font-family: var(--font-family-primary);
}

/* Professional Button System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25);
    border: 2px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--text-white);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.btn-cta-alt {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: var(--text-white);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

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

.btn-cta-alt:hover::before {
    left: 100%;
}

.btn-cta-alt:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(240, 147, 251, 0.4);
    filter: brightness(1.1);
}

.btn-large {
    padding: 20px 40px;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
}

/* Cards */
.card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition);
}

.card:hover::before {
    opacity: 1;
}

/* Professional Section Spacing */
section {
    padding: 100px 0 60px 0;
    position: relative;
}

section:first-of-type {
    padding-top: 120px;
}

section:last-of-type {
    padding-bottom: 100px;
}

/* Section spacing adjustments for better visual hierarchy */
section + section {
    margin-top: 0;
}

.section-dark {
    background: var(--dark-gradient);
    color: var(--text-white);
}

.section-dark h2,
.section-dark h3,
.section-dark p {
    color: var(--text-white);
}

.section-title-light,
.category-title-light {
    color: var(--text-white) !important;
    border-color: var(--text-white) !important;
}

.section-light {
    background: var(--bg-secondary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #fcb69f 100%);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.2);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-white);
}

.hero h1 {
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
    background: linear-gradient(90deg, #fff 0%, #fcb69f 50%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: textShine 3s linear infinite;
    font-family: var(--font-family-headings);
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: var(--font-weight-extrabold);
    letter-spacing: -0.04em;
    line-height: 1.05;
}

@keyframes textShine {
    to {
        background-position: 200% center;
    }
}

.hero-subtitle {
    font-family: var(--font-family-primary);
    font-size: clamp(1.25rem, 3vw, 1.875rem);
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
    letter-spacing: -0.015em;
    margin-bottom: 2rem;
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7), 
                 0 0 20px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.3px;
    animation: fadeInUp 1s ease 0.2s both;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-description {
    font-family: var(--font-family-primary);
    font-size: clamp(var(--font-size-lg), 2vw, var(--font-size-xl));
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-relaxed);
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6), 
                 0 0 15px rgba(0, 0, 0, 0.4);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.2px;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.6s both;
}

/* Feature Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--primary-gradient);
    border-radius: var(--border-radius-lg);
    opacity: 0;
    z-index: -1;
    transition: var(--transition);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: var(--font-size-2xl);
    color: var(--text-white);
}

/* Project Cards */
.project-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: 2rem;
}

.project-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

.project-header {
    padding: 2rem;
    background: var(--primary-gradient);
    color: var(--text-white);
}

.project-header h4 {
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.project-subtitle {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    opacity: 0.9;
    font-style: italic;
}

.project-body {
    padding: 2rem;
}

.project-result {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-top: 1rem;
    border-left: 4px solid var(--accent-purple);
}

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.tech-badge {
    padding: 6px 12px;
    background: var(--primary-gradient);
    color: var(--text-white);
    border-radius: 20px;
    font-family: var(--font-family-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.team-member {
    text-align: center;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.team-avatar {
    width: 120px;
    height: 120px;
    background: var(--primary-gradient);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-5xl);
    color: var(--text-white);
}

.team-name {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: 0.5rem;
}

.team-role {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* CTA Section */
.cta-section {
    background: var(--primary-gradient);
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    color: var(--text-white);
    margin-bottom: 1.5rem;
}

.cta-section p {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-relaxed);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: var(--primary-gradient);
    color: var(--text-white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
    filter: brightness(1.1);
}

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

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

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

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

.animate-on-scroll {
    opacity: 0;
    transition: var(--transition);
}

.animate-on-scroll.animated {
    opacity: 1;
    animation: fadeInUp 0.8s ease forwards;
}

/* Fix for mobile devices - ensure elements don't disappear on scroll */
@media (max-width: 768px) {
    .animate-on-scroll {
        opacity: 1 !important;
    }
    
    /* Disable animations on mobile to prevent disappearing content */
    .animate-on-scroll.animated {
        animation: none;
    }
}