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

:root {
    /* Apple-inspired Light Theme */
    --background-primary: #ffffff;
    --background-secondary: #f5f5f7;
    --background-card: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-accent: #0071e3;
    --border-color: #d2d2d7;
    --gradient-start: #0071e3;
    --gradient-end: #06c;
    --success-color: #30d158;
    --warning-color: #ffd60a;
    --error-color: #ff453a;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 5rem;
    
    /* Typography - Apple System */
    --font-primary: 'SF Pro Display', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Arial', sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', 'Consolas', 'Courier New', monospace;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background-color: var(--background-primary);
    color: var(--text-primary);
    line-height: 1.47619;
    font-size: 21px;
    font-weight: 400;
    letter-spacing: 0.011em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    overscroll-behavior: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    will-change: contents;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 1000;
    transition: all var(--transition-base);
    border-bottom: 1px solid var(--border-color);
}

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

.nav-logo {
    font-size: 21px;
    line-height: 1.381;
    font-weight: 600;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.011em;
    font-family: 'SF Pro Display', var(--font-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 17px;
    line-height: 1.23536;
    letter-spacing: -0.022em;
    font-weight: 400;
    transition: color var(--transition-fast);
    position: relative;
    opacity: 0.88;
}

.nav-link:hover {
    color: var(--text-primary);
    opacity: 1;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: var(--text-accent);
    transition: all var(--transition-base);
    transform: translateX(-50%);
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition-base);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--spacing-xxl) var(--spacing-lg);
    background: var(--background-primary);
    overflow: hidden;
}

.hero * {
    will-change: transform, opacity;
}

.hero-content {
    text-align: center;
    z-index: 2;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Removed centered gradient effect */

.hero-title {
    font-size: clamp(56px, 9vw, 110px);
    font-weight: 600;
    line-height: 1.05;
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.005em;
    font-family: 'SF Pro Display', var(--font-primary);
}

.greeting {
    display: block;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.009em;
    line-height: 1.33341;
    opacity: 0.86;
}

.name {
    display: block;
    background: linear-gradient(90deg, 
        #5B9DFF 0%, 
        #6B7FDB 15%,
        #8B6FC7 30%, 
        #B55FA3 45%, 
        #D54F7F 60%, 
        #E84855 75%, 
        #F5533D 90%, 
        #FF6B35 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-flow 6s linear infinite;
}

@keyframes gradient-flow {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

.hero-subtitle {
    font-size: clamp(32px, 4vw, 56px);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    letter-spacing: 0.004em;
    line-height: 1.07143;
    font-family: 'SF Pro Display', var(--font-primary);
}

.hero-description {
    font-size: 24px;
    color: var(--text-primary);
    max-width: 720px;
    margin: 0 auto var(--spacing-xl);
    line-height: 1.33341;
    letter-spacing: 0.009em;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.823rem 1.76rem;
    border-radius: 980px;
    text-decoration: none;
    font-weight: 400;
    font-size: 19px;
    line-height: 1.21053;
    letter-spacing: 0.012em;
    transition: all var(--transition-base);
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    box-shadow: 0 10px 30px rgba(0, 113, 227, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 113, 227, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--background-secondary);
    border-color: var(--text-accent);
    color: var(--text-accent);
}

/* Hero Background Layers */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-bg-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 80% 50% at 20% -40%, rgba(120, 119, 198, 0.15), transparent),
        radial-gradient(ellipse 80% 50% at 80% -40%, rgba(255, 119, 198, 0.1), transparent),
        radial-gradient(ellipse 60% 120% at -20% 50%, rgba(120, 119, 198, 0.12), transparent),
        radial-gradient(ellipse 60% 120% at 120% 50%, rgba(99, 102, 241, 0.1), transparent),
        radial-gradient(ellipse 100% 50% at 50% 120%, rgba(168, 85, 247, 0.08), transparent);
    filter: blur(40px);
    opacity: 0.7;
}

@media (max-width: 768px) {
    .hero-bg-gradient {
        opacity: 0.4; /* More subtle on mobile to not distract */
    }
}

.hero-noise {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.02;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255, 255, 255, 0.01) 35px, rgba(255, 255, 255, 0.01) 70px);
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    25% { transform: translate(20px, -30px) rotate(90deg) scale(1.1); }
    50% { transform: translate(-20px, 20px) rotate(180deg) scale(0.95); }
    75% { transform: translate(30px, 10px) rotate(270deg) scale(1.05); }
}

/* Cleaned up - orbs removed for better gradient distribution */

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-secondary);
    border-radius: 25px;
    position: relative;
}

.scroll-arrow::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    transform: translateX(-50%);
    animation: scroll-animation 2s infinite;
}

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

@keyframes scroll-animation {
    0% { opacity: 0; top: 10px; }
    50% { opacity: 1; }
    100% { opacity: 0; top: 30px; }
}

/* Section Styles */
section {
    padding: var(--spacing-xxl) 0;
    position: relative;
}

.section-title {
    font-size: clamp(48px, 6vw, 80px);
    font-weight: 600;
    text-align: center;
    margin-bottom: var(--spacing-xxl);
    letter-spacing: -0.003em;
    line-height: 1.05;
    color: var(--text-primary);
    font-family: 'SF Pro Display', var(--font-primary);
}

/* About Section */
.about {
    background: var(--background-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    max-width: 1000px;
    margin: 0 auto;
}

.about-text {
    font-size: 19px;
    line-height: 1.4211;
    letter-spacing: 0.012em;
}

.about-text .lead {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.14286;
    letter-spacing: 0.007em;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    font-family: 'SF Pro Display', var(--font-primary);
}

.about-text p {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-size: 21px;
    line-height: 1.47619;
    letter-spacing: 0.011em;
    font-weight: 400;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-lg);
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--background-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.stat {
    padding: var(--spacing-md);
}

.stat-number {
    font-size: 48px;
    font-weight: 600;
    line-height: 1.0834933;
    letter-spacing: 0.003em;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'SF Pro Display', var(--font-primary);
}

.stat-label {
    font-size: 14px;
    line-height: 1.42859;
    letter-spacing: -0.016em;
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
}

/* Experience Section */
.timeline {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
    overflow: hidden;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 100%;
    padding: var(--spacing-lg) 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

/* Odd items - content on right */
.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(odd) .timeline-date {
    flex: 0 0 calc(50% - var(--spacing-xl));
    text-align: right;
}

.timeline-item:nth-child(odd) .timeline-content {
    flex: 0 0 calc(50% - var(--spacing-xl));
}

/* Even items - content on left */
.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-item:nth-child(even) .timeline-date {
    flex: 0 0 calc(50% - var(--spacing-xl));
    text-align: left;
}

.timeline-item:nth-child(even) .timeline-content {
    flex: 0 0 calc(50% - var(--spacing-xl));
}

/* Timeline dot */
.timeline-item::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    background: var(--text-accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 4px var(--background-primary);
    z-index: 2;
}

.timeline-date {
    font-size: 14px;
    line-height: 1.42859;
    letter-spacing: -0.016em;
    color: var(--text-secondary);
    font-weight: 600;
}

.timeline-content {
    padding: var(--spacing-lg);
    background: var(--background-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

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

.timeline-content h3 {
    font-size: 24px;
    line-height: 1.33341;
    letter-spacing: 0.009em;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    font-family: 'SF Pro Display', var(--font-primary);
}

.timeline-content h4 {
    font-size: 19px;
    line-height: 1.4211;
    letter-spacing: 0.012em;
    color: var(--text-accent);
    margin-bottom: var(--spacing-md);
    font-weight: 400;
}

.timeline-content p {
    color: var(--text-primary);
    font-size: 19px;
    line-height: 1.4211;
    letter-spacing: 0.012em;
    margin-bottom: var(--spacing-md);
    opacity: 0.86;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.tag {
    padding: 0.35rem 0.875rem;
    background: rgba(41, 151, 255, 0.1);
    color: var(--text-accent);
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.42859;
    letter-spacing: -0.016em;
    font-weight: 500;
    border: 1px solid rgba(41, 151, 255, 0.2);
}

/* Projects Section */
.projects {
    background: var(--background-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

.project-card {
    background: var(--background-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    will-change: transform, box-shadow;
}

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

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    position: relative;
    overflow: hidden;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 71, 227, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

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

.project-links {
    display: flex;
    gap: var(--spacing-md);
}

.project-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-accent);
    transition: all var(--transition-base);
}

.project-link:hover {
    background: white;
    transform: scale(1.2);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.project-content {
    padding: var(--spacing-lg);
}

.project-content h3 {
    font-size: 28px;
    line-height: 1.14286;
    letter-spacing: 0.007em;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    font-family: 'SF Pro Display', var(--font-primary);
}

.project-content p {
    color: var(--text-primary);
    font-size: 19px;
    line-height: 1.4211;
    letter-spacing: 0.012em;
    margin-bottom: var(--spacing-md);
    opacity: 0.86;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.tech-badge {
    padding: 0.35rem 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.42859;
    letter-spacing: -0.016em;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-xl);
    max-width: 1200px;
    margin: 0 auto;
}

.skill-category {
    background: var(--background-card);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.skill-category:hover {
    box-shadow: var(--shadow-md);
}

.skill-category h3 {
    font-size: 24px;
    line-height: 1.33341;
    letter-spacing: 0.009em;
    font-weight: 600;
    margin-bottom: var(--spacing-xl);
    color: var(--text-accent);
    text-align: center;
    font-family: 'SF Pro Display', var(--font-primary);
}

.skill-icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--spacing-lg);
    justify-items: center;
}

.skill-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    will-change: transform;
}

.skill-icon-item:hover {
    transform: translateY(-5px) scale(1.1);
}

.skill-icon-item i {
    font-size: 3.5rem;
    transition: all var(--transition-base);
}

.skill-icon-item:hover i {
    filter: drop-shadow(0 5px 15px rgba(41, 151, 255, 0.4));
}

/* Skill Logos */
.skill-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    transition: all var(--transition-base);
}

.skill-icon-item:hover .skill-logo {
    filter: drop-shadow(0 5px 15px rgba(41, 151, 255, 0.4));
    transform: scale(1.1);
}

.skill-icon-name {
    font-size: 14px;
    line-height: 1.42859;
    letter-spacing: -0.016em;
    color: var(--text-secondary);
    text-align: center;
    transition: color var(--transition-base);
}

.skill-icon-item:hover .skill-icon-name {
    color: var(--text-primary);
}

/* Contact Section */
.contact {
    background: var(--background-secondary);
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-intro {
    font-size: 24px;
    line-height: 1.33341;
    letter-spacing: 0.009em;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xl);
    font-weight: 400;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    justify-content: center;
    margin-bottom: var(--spacing-xl);
}

.contact-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-primary);
    text-decoration: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--background-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.contact-link:hover {
    background: var(--text-accent);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--background-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.social-link:hover {
    background: var(--text-accent);
    color: white;
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Footer */
.footer {
    padding: var(--spacing-lg) 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.42859;
    letter-spacing: -0.016em;
}

/* Smooth Apple-like Animations */
.fade-in {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.fade-in-delay {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1) 0.15s;
    will-change: transform, opacity;
}

.fade-in-delay-2 {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
    will-change: transform, opacity;
}

.fade-in-delay-3 {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1) 0.45s;
    will-change: transform, opacity;
}

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

/* Parallax and Scale Effects */
.parallax-element {
    will-change: transform;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-on-scroll {
    will-change: transform, opacity;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stagger Animation */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-item.show {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth Reveal */
.reveal-text {
    overflow: hidden;
}

.reveal-text-content {
    transform: translateY(100%);
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-text.show .reveal-text-content {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 968px) {
    /* Timeline adjustments for tablets and smaller */
    .timeline {
        padding: var(--spacing-lg);
    }
    
    .timeline::before {
        left: 20px;
        width: 2px;
    }
    
    .timeline-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding-left: 50px;
        padding-right: 0;
        gap: var(--spacing-sm);
    }
    
    .timeline-item::after {
        left: 20px;
        width: 12px;
        height: 12px;
    }
    
    .timeline-item:nth-child(odd) .timeline-date,
    .timeline-item:nth-child(even) .timeline-date {
        flex: 1 1 auto;
        width: 100%;
        text-align: left !important;
        margin-bottom: var(--spacing-xs);
        font-size: 0.85rem;
    }
    
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
    }
    
    .timeline-content {
        padding: var(--spacing-md);
    }
    
    .timeline-content h3 {
        font-size: 21px;
    }
    
    .timeline-content h4 {
        font-size: 17px;
    }
    
    .timeline-content p {
        font-size: 17px;
    }
}

@media (max-width: 768px) {
    /* Hero Mobile Optimizations */
    .hero {
        min-height: calc(100vh - 70px);
        padding: var(--spacing-xl) var(--spacing-md);
        padding-top: calc(70px + var(--spacing-xl));
    }
    
    .hero-content {
        padding-top: 0;
    }
    
    .hero-title {
        margin-bottom: var(--spacing-md);
    }
    
    .greeting {
        font-size: clamp(20px, 4vw, 24px);
        margin-bottom: var(--spacing-xs);
        opacity: 1;
        font-weight: 500;
    }
    
    .name {
        font-size: clamp(40px, 10vw, 56px);
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: clamp(24px, 5vw, 32px);
        margin-bottom: var(--spacing-sm);
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 18px;
        line-height: 1.4;
        margin-bottom: var(--spacing-lg);
        padding: 0 var(--spacing-sm);
    }
    
    .scroll-indicator {
        bottom: 1rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: saturate(180%) blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: start;
        padding-top: var(--spacing-xl);
        transition: left var(--transition-base);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Timeline mobile styles already handled in 968px breakpoint */
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
    }
    
    .skill-icons-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: var(--spacing-md);
    }
    
    .skill-icon-item i {
        font-size: 2.5rem;
    }
    
    .skill-logo {
        width: 40px;
        height: 40px;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 19px;
    }
    
    /* Aggressive mobile optimization for small screens */
    .hero {
        min-height: calc(100vh - 60px);
        padding: var(--spacing-md) var(--spacing-sm);
        padding-top: calc(60px + var(--spacing-lg));
    }
    
    .hero-title {
        font-size: 36px;
        margin-bottom: var(--spacing-sm);
    }
    
    .greeting {
        font-size: 18px;
        margin-bottom: 0.25rem;
        font-weight: 500;
        color: var(--text-accent);
    }
    
    .name {
        font-size: 36px;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 22px;
        margin-bottom: var(--spacing-sm);
        line-height: 1.2;
        opacity: 0.9;
    }
    
    .hero-description {
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: var(--spacing-md);
        padding: 0;
        opacity: 0.85;
    }
    
    .hero-buttons {
        gap: var(--spacing-sm);
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 17px;
    }
    
    .scroll-indicator {
        display: none; /* Hide on very small screens to save space */
    }
    
    .section-title {
        font-size: 40px;
    }
    
    /* Timeline mobile adjustments */
    .timeline {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item {
        padding-left: 40px;
        padding-right: var(--spacing-sm);
    }
    
    .timeline-item::after {
        left: 15px;
        width: 10px;
        height: 10px;
    }
    
    .timeline-content {
        padding: var(--spacing-sm);
    }
    
    .timeline-content h3 {
        font-size: 19px;
    }
    
    .timeline-content h4 {
        font-size: 17px;
    }
    
    .timeline-content p {
        font-size: 17px;
    }
    
    .tech-tags {
        gap: 0.25rem;
    }
    
    .tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
    
    .skill-icons-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-sm);
    }
    
    .skill-icon-item i {
        font-size: 2rem;
    }
    
    .skill-logo {
        width: 32px;
        height: 32px;
    }
    
    .skill-icon-name {
        font-size: 0.75rem;
    }
}
