/* Root Variables */
:root {
    /* Enhanced Color Palette - More Vibrant */
    --primary-light: #ffffff;      /* Clean white for better contrast */
    --primary-medium: #f0f9ff;     /* Soft blue-white */
    --secondary-dark: #0f172a;     /* Deep blue-black for high contrast */
    --secondary-medium: #3b82f6;   /* Vibrant blue */
    --accent: #e63946;             /* Vibrant red-pink */
    --accent-gradient: linear-gradient(135deg, #e63946 0%, #f43f5e 100%);
    
    /* Additional Colors */
    --white: #ffffff;
    --black: #020617;
    --gray-light: #f8fafc;
    --gray: #64748b;
    --gray-dark: #334155;
    --success: #10b981;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Typography - Premium Fonts */
    --font-brand: 'Bebas Neue', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Enhanced Shadows */
    --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);
    --shadow-glow: 0 0 50px rgba(59, 130, 246, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--secondary-dark);
    background: linear-gradient(to bottom, var(--primary-light), var(--primary-medium));
    overflow-x: hidden;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--secondary-dark);
    letter-spacing: -0.02em;
}

h1 { 
    font-size: clamp(2.5rem, 6vw, 4rem); 
    background: var(--secondary-dark);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
}

a {
    color: var(--secondary-medium);
    text-decoration: none;
    transition: var(--transition-fast);
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition-normal);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

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

.nav-brand a {
    font-family: var(--font-brand);
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--secondary-dark);
    text-transform: uppercase;
    position: relative;
    transition: var(--transition-normal);
}

.nav-brand a:hover {
    color: var(--accent);
    transform: scale(1.05);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

.nav-toggle span {
    width: 28px;
    height: 3px;
    background: var(--secondary-dark);
    margin: 4px 0;
    transition: var(--transition-spring);
    border-radius: 2px;
}

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

.nav-link {
    font-family: var(--font-body);
    color: var(--secondary-dark);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--accent-gradient);
    transition: var(--transition-spring);
    border-radius: 2px;
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
    left: 0;
    transform: translateX(0);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 100% 100%;
    margin-top: 60px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="a" patternUnits="userSpaceOnUse" width="60" height="60"><rect width="60" height="60" fill="rgba(255,255,255,0.01)"/><circle cx="30" cy="30" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23a)"/></svg>');
    animation: floatPattern 20s ease-in-out infinite;
}

@keyframes floatPattern {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, -30px); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23f1faee" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,165.3C384,171,480,149,576,154.7C672,160,768,192,864,192C960,192,1056,160,1152,144C1248,128,1344,128,1392,128L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-content {
    text-align: center;
    z-index: 1;
    color: var(--white);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

/* Hero Profile Image */
.hero-profile-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 1rem;
}

.hero-profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: var(--accent-gradient);
    padding: 5px;
    box-shadow: 0 20px 60px rgba(244, 63, 94, 0.4), 0 0 40px rgba(255, 255, 255, 0.2);
    animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

.hero-profile-image img {
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    object-fit: cover;
    border-radius: 50%;
    margin: 5px;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
    transition: var(--transition-normal);
}

.hero-profile-image:hover img {
    transform: scale(1.1);
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.5));
}

.hero-profile-ring {
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border: 3px dashed rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: rotateHeroRing 20s linear infinite;
}

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

.hero-profile-dots {
    position: absolute;
    top: -25px;
    left: -25px;
    right: -25px;
    bottom: -25px;
}

.hero-profile-dots::before,
.hero-profile-dots::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    animation: heroPulse 2s ease-in-out infinite;
}

.hero-profile-dots::before {
    top: 40px;
    left: 0;
}

.hero-profile-dots::after {
    bottom: 40px;
    right: 0;
    animation-delay: 1s;
}

@keyframes heroPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: scale(1.5);
        opacity: 1;
    }
}

.hero-title {
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease;
    color: var(--white);
}

.text-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 300;
    margin-bottom: 1rem;
    opacity: 0.95;
    color: var(--primary-medium);
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hero-location {
    font-size: 1rem;
    opacity: 0.8;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2.5rem;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: var(--transition-normal);
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 100%;
    height: 100%;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    transition: transform 0.5s ease;
    z-index: -1;
}

.btn:hover::before {
    transform: translate(-50%, -50%) scale(2);
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(244, 63, 94, 0.4);
    color: var(--white);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--secondary-dark);
    transform: translateY(-2px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: var(--transition-normal);
}

.scroll-indicator:hover {
    transform: translateX(-50%) scale(1.1);
}

.scroll-text {
    color: var(--white);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--white);
    border-bottom: 2px solid var(--white);
    transform: rotate(45deg);
    margin: 0.5rem auto 0;
    opacity: 0.7;
}

/* Sections */
.section {
    padding: var(--space-2xl) 0;
}

.section:nth-child(even) {
    background: var(--white);
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-lg);
    position: relative;
    padding-bottom: 1.5rem;
    font-family: var(--font-heading);
}

@keyframes sectionTitlePulse {
    0%, 100% { width: 80px; }
    50% { width: 100px; }
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
    animation: sectionTitlePulse 2s ease-in-out infinite;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.profile-image-container {
    position: relative;
    width: 250px;
    height: 250px;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: var(--accent-gradient);
    padding: 5px;
    box-shadow: var(--shadow-xl);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.profile-image img {
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    object-fit: cover;
    border-radius: 50%;
    margin: 5px;
}

.profile-img {
    filter: drop-shadow(0 0 20px rgba(244, 63, 94, 0.3));
    transition: var(--transition-normal);
}

.profile-image:hover .profile-img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 30px rgba(244, 63, 94, 0.5));
}

.profile-ring {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border: 3px dashed var(--accent);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
    opacity: 0.3;
}

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

.profile-dots {
    position: absolute;
    top: -30px;
    left: -30px;
    right: -30px;
    bottom: -30px;
}

.profile-dots::before,
.profile-dots::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.profile-dots::before {
    top: 50px;
    left: 0;
}

.profile-dots::after {
    bottom: 50px;
    right: 0;
    animation-delay: 1s;
}

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

.highlight {
    color: var(--accent);
    font-weight: 600;
}

.about-stats {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-start;
    margin-top: var(--space-lg);
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition-normal);
    flex: 1;
    min-width: 120px;
}

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

.stat h3 {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
    font-weight: 800;
}

.stat p {
    color: var(--gray-dark);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.code-window {
    background: var(--secondary-dark);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.code-header {
    background: #2b3e50;
    padding: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-content {
    padding: 1.5rem;
    color: var(--primary-light);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
}

.code-keyword { color: #66d9ef; }
.code-string { color: #a6e22e; }

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    align-items: start;
}

.skill-category {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--space-md);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    transition: var(--transition-normal);
    text-align: center;
    position: relative;
    overflow: hidden;
    gap: 0.75rem;
}

/* Use subgrid if supported for better alignment */
@supports (grid-template-rows: subgrid) {
    .skill-category {
        grid-template-rows: subgrid;
        grid-row: span 4;
    }
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.skill-category:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-2xl);
    background: rgba(255, 255, 255, 0.9);
}

.skill-category:hover::before {
    transform: scaleX(1);
}

.skill-icon {
    font-size: 3rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: iconFloat 3s ease-in-out infinite;
    align-self: end;
}

.skill-category:nth-child(even) .skill-icon {
    animation-delay: 1.5s;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(5deg); }
}

.skill-category h3 {
    color: var(--secondary-dark);
    font-size: 1.25rem;
    align-self: center;
    min-height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-self: start;
    min-height: 120px;
    align-content: start;
}

.skill-tag {
    display: inline-block;
    padding: 0.35rem 1rem;
    color: var(--secondary-dark);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: transform var(--transition-spring);
    cursor: pointer;
}

.skill-tag:hover {
    background: var(--accent-gradient);
    color: var(--white);
    transform: scale(1.1);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-lg);
}

.project-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition-normal);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(244, 63, 94, 0.05));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

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

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--secondary-medium), var(--secondary-dark));
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(244, 63, 94, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
    backdrop-filter: blur(5px);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.project-tech span {
    padding: 0.35rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.project-content {
    padding: var(--space-md);
}

.project-content h3 {
    margin-bottom: 0.5rem;
    color: var(--secondary-dark);
}

.project-subtitle {
    color: var(--secondary-medium);
    font-weight: 500;
    margin-bottom: 1rem;
}

.project-description {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.project-features h4 {
    color: var(--secondary-dark);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.project-features ul {
    list-style: none;
}

.project-features li {
    padding: 0.5rem 0;
    color: var(--gray-dark);
}

.project-features i {
    color: var(--accent);
    margin-right: 0.5rem;
}

.btn-project {
    margin-top: 3rem;
}

.btn-project::before {
    content: '→';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    transition: right var(--transition-spring);
    opacity: 0;
}

.btn-project:hover {
    padding-right: 2.5rem;
    transform: translateX(5px) scale(1.05);
    box-shadow: 0 5px 15px rgba(244, 63, 94, 0.3);
}

.btn-project:hover::before {
    right: 1rem;
    opacity: 1;
}

/* Timeline / Experience */
.timeline {
    position: relative;
    padding: var(--space-md) 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--primary-medium);
}

.timeline-item {
    display: flex;
    margin-bottom: var(--space-lg);
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--accent-gradient);
    border: 4px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.4);
    animation: timelinePulse 2s ease-in-out infinite;
}

@keyframes timelinePulse {
    0%, 100% { 
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
    50% { 
        transform: translateX(-50%) scale(1.2);
        opacity: 0.9;
    }
}

.timeline-date {
    flex: 1;
    text-align: right;
    padding-right: var(--space-lg);
}

.timeline-date span {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--secondary-medium);
    color: var(--white);
    border-radius: 25px;
    font-weight: 500;
}

.timeline-content {
    flex: 1;
    padding-left: var(--space-lg);
}

.timeline-content h3 {
    margin-bottom: 0.25rem;
    color: var(--secondary-dark);
}

.timeline-content h4 {
    color: var(--secondary-medium);
    margin-bottom: 1rem;
    font-weight: 500;
}

.timeline-achievements {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--primary-light);
    border-radius: 8px;
}

.timeline-achievements h5 {
    color: var(--secondary-dark);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.timeline-achievements ul {
    list-style: none;
    color: var(--gray-dark);
}

.timeline-achievements li {
    padding: 0.25rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.timeline-achievements li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
}

.contact-info h3 {
    margin-bottom: 1rem;
    color: var(--secondary-dark);
}

.contact-details {
    margin-top: var(--space-md);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item i {
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    color: var(--white);
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(244, 63, 94, 0.3);
    animation: float 3s ease-in-out infinite;
}

.contact-item:nth-child(2) i {
    animation-delay: 1s;
}

.contact-item:nth-child(3) i {
    animation-delay: 2s;
}

.contact-item h4 {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
}

.contact-item a,
.contact-item span {
    color: var(--secondary-dark);
    font-weight: 500;
}

/* Contact Form */
.contact-form {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    padding: var(--space-lg);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary-dark);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-normal);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.1);
    transform: scale(1.01);
}

.btn-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--secondary-dark), var(--black));
    color: var(--white);
    padding: var(--space-lg) 0 var(--space-sm);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: shimmerLine 3s ease-in-out infinite;
}

@keyframes shimmerLine {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
}

.footer-brand h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--primary-medium);
}

.footer-links h4,
.footer-social h4 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: var(--primary-medium);
    display: block;
    padding: 0.25rem 0;
}

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

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

.social-links a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: var(--transition-spring);
    font-size: 1.2rem;
}

.social-links a:hover {
    background: var(--accent-gradient);
    transform: translateY(-5px) rotate(360deg) scale(1.1);
    box-shadow: 0 10px 20px rgba(244, 63, 94, 0.3);
    border-color: transparent;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--primary-medium);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 55px;
    height: 55px;
    background: var(--accent-gradient);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-spring);
    z-index: 999;
    box-shadow: 0 10px 30px rgba(244, 63, 94, 0.4);
    font-size: 1.3rem;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    animation: bounceIn 0.5s ease;
}

.back-to-top:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 15px 40px rgba(244, 63, 94, 0.5);
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

.animate-fade-in {
    animation: fadeInDown 0.8s ease;
}

.animate-slide-up {
    animation: slideUp 0.8s ease;
}

.animate-slide-up-delay {
    animation: slideUp 0.8s ease 0.2s both;
}

.animate-slide-up-delay-2 {
    animation: slideUp 0.8s ease 0.4s both;
}

.animate-fade-in-delay {
    animation: fadeInDown 0.8s ease 0.6s both;
}

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

/* Additional Animations */
.section {
    animation: fadeInUp 0.8s ease-out;
}

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

/* Responsive Design */
@media (max-width: 1024px) and (min-width: 769px) {
    /* Skills - 2 columns on tablets */
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        width: 100%;
        height: calc(100vh - 60px);
        background: var(--white);
        transition: var(--transition-normal);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        padding: var(--space-md);
        gap: 0;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid var(--primary-light);
    }
    
    /* Hero */
    .hero-profile-container {
        width: 150px;
        height: 150px;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
        text-align: center;
    }
    
    /* About */
    .about-content {
        grid-template-columns: 1fr;
        text-align: left;
    }
    
    .about-stats {
        justify-content: space-around;
    }
    
    /* Skills */
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    /* Timeline */
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item::before {
        left: 20px;
    }
    
    .timeline-date {
        display: none;
    }
    
    .timeline-content {
        padding-left: 60px;
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    :root {
        --space-2xl: 4rem;
        --space-xl: 3rem;
        --space-lg: 2rem;
    }
    
    .container {
        padding: 0 var(--space-xs);
    }
    
    .section-title {
        font-size: 1.75rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .back-to-top,
    .scroll-indicator,
    .contact-form {
        display: none;
    }
    
    body {
        color: black;
    }
    
    a {
        text-decoration: underline;
    }
}
