:root {
    --color-primary: #6366f1;
    --color-primary-light: #818cf8;
    --color-primary-dark: #4f46e5;
    --color-secondary: #22d3ee;
    --color-accent: #f59e0b;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-background: #ffffff;
    --color-surface: #f8fafc;
    --color-border: #e2e8f0;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-mesh: radial-gradient(at 27% 37%, hsla(215, 98%, 61%, 1) 0px, transparent 0%),
                     radial-gradient(at 97% 21%, hsla(125, 98%, 72%, 1) 0px, transparent 50%),
                     radial-gradient(at 52% 99%, hsla(354, 98%, 61%, 1) 0px, transparent 50%),
                     radial-gradient(at 10% 29%, hsla(256, 96%, 67%, 1) 0px, transparent 50%),
                     radial-gradient(at 97% 96%, hsla(38, 60%, 74%, 1) 0px, transparent 50%),
                     radial-gradient(at 33% 50%, hsla(222, 67%, 73%, 1) 0px, transparent 50%),
                     radial-gradient(at 79% 53%, hsla(343, 68%, 79%, 1) 0px, transparent 50%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --blur-glass: blur(4px);
    --max-width: 1200px;
    --spacing-unit: 8px;
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

[data-theme="dark"] {
    --color-text: #f1f5f9;
    --color-text-light: #94a3b8;
    --color-background: #0f172a;
    --color-surface: #1e293b;
    --color-border: #334155;
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

html {
    /* scroll-behavior: smooth; - Removed to prevent conflicts with JS implementation */
    /* scroll-snap-type: y mandatory; - Removed to use normal scrolling */
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
    /* Performance optimizations for smooth scrolling */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
    will-change: scroll-position;
}


/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-bg {
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: var(--gradient-mesh);
    animation: gradientShift 20s ease infinite;
    opacity: 0.3;
}

.mesh-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, var(--color-primary-light) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, var(--color-secondary) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, var(--color-accent) 0%, transparent 50%);
    filter: blur(100px);
    opacity: 0.1;
    animation: meshMove 30s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { transform: rotate(0deg) scale(1); }
    33% { transform: rotate(120deg) scale(1.1); }
    66% { transform: rotate(240deg) scale(1); }
}

@keyframes meshMove {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-30px, 30px); }
    66% { transform: translate(30px, -30px); }
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 3);
    width: 100%;
    box-sizing: border-box;
}

/* Glass Card Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-glass);
    padding: calc(var(--spacing-unit) * 3);
    transition: all var(--transition-base);
    box-sizing: border-box;
    width: 100%;
}

.project-card.glass-card {
    padding: calc(var(--spacing-unit) * 2);
}

[data-theme="dark"] .glass-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.8);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
    cursor: pointer;
}

.nav-profile-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: none; /* Hidden by default on desktop */
    cursor: pointer;
}

.nav-profile-container {
    position: relative;
}

.nav-profile-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-base);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-profile-photo:hover {
    transform: scale(1.1);
    border-color: var(--color-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: calc(var(--spacing-unit) * 4);
}

.nav-link {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

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

/* Theme Toggle */
.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    padding: 8px;
    position: relative;
    width: 40px;
    height: 40px;
    transition: all var(--transition-base);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

[data-theme="dark"] .theme-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity var(--transition-base), transform var(--transition-base);
    color: var(--color-text);
}

.sun-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

.moon-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(180deg);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(180deg);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--spacing-unit) * 15) calc(var(--spacing-unit) * 3);
    position: relative;
}

/* Hero Profile Photo */
.hero-intro {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 3);
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.profile-photo-container {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all var(--transition-base);
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.profile-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0.3;
    filter: blur(20px);
    z-index: -1;
}

.profile-photo {
    cursor: pointer;
}

/* Profile Photo Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin: 10% auto;
    padding: calc(var(--spacing-unit) * 4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-glass);
    animation: modalFadeIn 0.3s ease;
}

.modal-close {
    color: var(--color-text-light);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
    transition: color var(--transition-base);
}

.modal-close:hover {
    color: var(--color-text);
}

.modal-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    margin-bottom: calc(var(--spacing-unit) * 3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.modal-info h3 {
    font-size: 32px;
    margin-bottom: calc(var(--spacing-unit));
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-info p {
    font-size: 18px;
    color: var(--color-text-light);
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: calc(var(--spacing-unit) * 6);
    align-items: center;
    max-width: var(--max-width);
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(48px, 8vw, 88px);
    font-weight: 700;
    line-height: 1;
    margin-bottom: calc(var(--spacing-unit) * 3);
    min-width: auto;
    flex: 1;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.title-line {
    display: block;
    overflow: hidden;
}

.letter {
    display: inline-block;
}

.letter:nth-child(1) { --i: 0; }
.letter:nth-child(2) { --i: 1; }
.letter:nth-child(3) { --i: 2; }
.letter:nth-child(4) { --i: 3; }
.letter:nth-child(5) { --i: 4; }
.letter:nth-child(6) { --i: 5; }

.hero-subtitle {
    font-size: clamp(24px, 4vw, 32px);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.subtitle-prefix {
    color: var(--color-text-light);
}

.subtitle-dynamic {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 18px;
    color: var(--color-text-light);
    margin-bottom: calc(var(--spacing-unit) * 4);
}

.hero-stats {
    display: flex;
    gap: calc(var(--spacing-unit) * 4);
    margin-bottom: calc(var(--spacing-unit) * 5);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--color-text-light);
}

.hero-cta {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
}

/* Buttons */
.btn {
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: calc(var(--spacing-unit));
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex-wrap: nowrap;
    min-width: max-content;
}

.btn span {
    white-space: nowrap;
    flex-shrink: 0;
}

.btn svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-base);
    flex-shrink: 0;
}

.btn:hover svg {
    transform: translateX(4px);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

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

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

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

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-sm {
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 2.5);
    font-size: 14px;
    border-radius: 8px;
}

.btn-sm svg {
    width: 16px;
    height: 16px;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-cards {
    position: relative;
    width: 600px;
    height: 600px;
    margin-left: auto;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 2.5);
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 1.5);
    box-shadow: var(--shadow-lg);
    animation: float 6s ease infinite;
    font-size: 14px;
}

.card-1 {
    top: 5%;
    left: 15%;
    animation-delay: 0s;
}

.card-2 {
    top: 12%;
    right: 10%;
    animation-delay: 0.8s;
}

.card-3 {
    top: 25%;
    left: 5%;
    animation-delay: 1.2s;
}

.card-4 {
    top: 22%;
    left: 45%;
    animation-delay: 0.4s;
}

.card-5 {
    top: 38%;
    left: 20%;
    animation-delay: 2.1s;
}

.card-6 {
    top: 35%;
    right: 5%;
    animation-delay: 1.7s;
}

.card-7 {
    top: 52%;
    left: 8%;
    animation-delay: 2.8s;
}

.card-8 {
    top: 55%;
    right: 20%;
    animation-delay: 3.2s;
}

.card-9 {
    top: 70%;
    left: 25%;
    animation-delay: 1.5s;
}

.card-10 {
    top: 68%;
    right: 2%;
    animation-delay: 2.4s;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-12px) rotate(2deg);
    }
    66% { 
        transform: translateY(-18px) rotate(-1.5deg);
    }
}

/* Additional float variations for more organic movement */
.card-1, .card-5, .card-9 {
    animation: floatVariant1 7s ease-in-out infinite;
}

.card-3, .card-7 {
    animation: floatVariant2 5.5s ease-in-out infinite;
}

.card-2, .card-6, .card-10 {
    animation: floatVariant3 6.5s ease-in-out infinite;
}

@keyframes floatVariant1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-22px) rotate(1.5deg); }
}

@keyframes floatVariant2 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    30% { transform: translateY(-8px) rotate(-1deg); }
    70% { transform: translateY(-16px) rotate(2deg); }
}

@keyframes floatVariant3 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    40% { transform: translateY(-14px) rotate(1deg); }
    80% { transform: translateY(-10px) rotate(-0.5deg); }
}

.card-icon {
    font-size: 24px;
}

.card-text {
    font-weight: 600;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: calc(var(--spacing-unit) * 4);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(var(--spacing-unit));
    color: var(--color-text-light);
    font-size: 14px;
}

.scroll-line {
    width: 2px;
    height: 40px;
    background: var(--color-border);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    animation: scrollLine 2s ease infinite;
}

@keyframes scrollLine {
    0% { top: -100%; }
    100% { top: 100%; }
}

/* Section Styles */
section {
    padding: calc(var(--spacing-unit) * 10) 0;
    /* scroll-snap-align: start; - Removed to use normal scrolling */
    min-height: 100vh;
}

/* Contact section should not take full height to allow footer visibility */
.contact {
    min-height: auto;
}

.section-header {
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 8);
}

.section-label {
    font-size: 14px;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 700;
    margin-top: calc(var(--spacing-unit));
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--spacing-unit) * 4);
    margin-bottom: calc(var(--spacing-unit) * 6);
}

.about-card {
    text-align: left;
}

.about-card.full-width {
    grid-column: 1 / -1;
    text-align: center;
}

.about-card h3 {
    font-size: 24px;
    margin-bottom: calc(var(--spacing-unit) * 2);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: calc(var(--spacing-unit) * 3);
    margin-top: calc(var(--spacing-unit) * 3);
}

.expertise-item {
    text-align: center;
    padding: calc(var(--spacing-unit) * 3);
}

.expertise-icon {
    font-size: 48px;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.expertise-item h4 {
    font-size: 18px;
    margin-bottom: calc(var(--spacing-unit));
    color: var(--color-text);
}

.expertise-item p {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.5;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: calc(var(--spacing-unit) * 3);
    margin-top: calc(var(--spacing-unit) * 6);
}

.stat-card {
    text-align: center;
    padding: calc(var(--spacing-unit) * 3);
    background: var(--color-surface);
    border-radius: 16px;
    transition: transform var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-icon {
    font-size: 48px;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: calc(var(--spacing-unit) * 4);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 2);
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.skill-icon {
    font-size: 32px;
}

.skill-card h3 {
    font-size: 20px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit));
}

.skill-tag {
    padding: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
    background: var(--color-surface);
    border-radius: 20px;
    font-size: 14px;
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.skill-tag:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* Experience Section */
.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
}

.timeline-item {
    position: relative;
    padding-left: 100px;
    margin-bottom: calc(var(--spacing-unit) * 8);
}

.timeline-dot {
    position: absolute;
    left: 30px;
    top: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: 4px solid var(--color-background);
    z-index: 1;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.timeline-header h3 {
    font-size: 24px;
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}

.timeline-header h4 {
    font-size: 18px;
    color: var(--color-text-light);
}

.timeline-date {
    font-size: 14px;
    color: var(--color-primary);
    font-weight: 600;
}

.timeline-content ul {
    list-style: none;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.timeline-content li {
    position: relative;
    padding-left: calc(var(--spacing-unit) * 3);
    margin-bottom: calc(var(--spacing-unit));
    color: var(--color-text-light);
}

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

.timeline-tags {
    display: flex;
    gap: calc(var(--spacing-unit));
}

.tag {
    padding: calc(var(--spacing-unit) * 0.5) calc(var(--spacing-unit) * 2);
    background: var(--color-surface);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
}

/* Projects Section */
.projects-bento {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-auto-rows: 240px;
    gap: calc(var(--spacing-unit) * 1.5);
}

.project-card {
    display: flex;
    flex-direction: column;
    transition: all var(--transition-base);
    cursor: pointer;
    height: 240px;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: calc(var(--spacing-unit) * 0.75);
    gap: calc(var(--spacing-unit) * 0.5);
}

.project-header h3 {
    font-size: 18px;
    line-height: 1.2;
    flex: 1;
}

.project-type {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-primary);
    font-weight: 600;
    white-space: nowrap;
}

.project-card p {
    color: var(--color-text-light);
    flex-grow: 0;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    font-size: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card.large p {
    -webkit-line-clamp: 4;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 0.25);
    margin-top: auto;
}

.project-actions {
    margin-top: calc(var(--spacing-unit) * 1.5);
    padding-top: calc(var(--spacing-unit) * 1.5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
}

.project-tech span {
    font-size: 11px;
    padding: calc(var(--spacing-unit) * 0.5) calc(var(--spacing-unit));
    background: var(--color-surface);
    border-radius: 4px;
    white-space: nowrap;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--spacing-unit) * 8);
    align-items: center;
}

.contact-info h3 {
    font-size: 32px;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 3);
    margin: calc(var(--spacing-unit) * 4) 0;
    align-items: flex-start;
    text-align: left;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 2);
    text-decoration: none;
    color: var(--color-text);
    transition: all var(--transition-base);
}

.contact-link:hover {
    transform: translateY(-2px);
}

.contact-icon {
    font-size: 32px;
}

.contact-label {
    display: block;
    font-size: 12px;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
}

/* Social Links */
.social-links {
    margin: calc(var(--spacing-unit) * 4) 0;
    text-align: center;
    width: 100%;
}

.contact-info .btn {
    margin: calc(var(--spacing-unit) * 3) auto 0 auto;
    display: block;
    width: fit-content;
}

.social-links h4 {
    font-size: 18px;
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--color-text);
    text-align: center;
}

.social-grid {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    justify-content: center;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(var(--spacing-unit));
    padding: calc(var(--spacing-unit) * 2);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    color: var(--color-text);
    transition: all var(--transition-base);
    min-width: 80px;
}

.social-link:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-primary);
}

.social-link svg {
    width: 24px;
    height: 24px;
}

.social-link span {
    font-size: 12px;
    font-weight: 500;
}

/* Orbit Animation */
.orbit-container {
    position: relative;
    width: 400px;
    height: 400px;
}

.orbit {
    position: absolute;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.orbit-1 {
    width: 150px;
    height: 150px;
    animation: rotate 20s linear infinite;
}

.orbit-2 {
    width: 250px;
    height: 250px;
    animation: rotate 30s linear infinite reverse;
}

.orbit-3 {
    width: 350px;
    height: 350px;
    animation: rotate 40s linear infinite;
}

.planet {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-primary);
}

.planet-1 {
    top: 50%;
    left: 0;
    animation: rotate 20s linear infinite reverse;
}

.planet-2 {
    top: 0;
    left: 50%;
    animation: rotate 30s linear infinite;
}

.planet-3 {
    top: 50%;
    right: 0;
    animation: rotate 40s linear infinite reverse;
}

@keyframes rotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Footer */
.footer {
    padding: calc(var(--spacing-unit) * 6) 0;
    border-top: 1px solid var(--color-border);
    /* scroll-snap-align: end; - Removed to use normal scrolling */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
}

.footer-social {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: var(--color-text-light);
    text-decoration: none;
    transition: all var(--transition-base);
}

.footer-social-link:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

.footer-social-link svg {
    width: 18px;
    height: 18px;
}

.footer-links {
    display: flex;
    gap: calc(var(--spacing-unit) * 3);
}

.footer-links a {
    color: var(--color-text-light);
    text-decoration: none;
    transition: color var(--transition-base);
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .projects-bento {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .floating-cards {
        width: 500px;
        height: 500px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: calc(var(--spacing-unit) * 4);
    }
    
    .hero-visual {
        display: none;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .orbit-container {
        display: none;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-unit) * 3);
    }
    
    .expertise-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: calc(var(--spacing-unit) * 2);
        padding: 0;
        margin: 0 auto;
    }
    
    .expertise-item {
        text-align: center;
        padding: calc(var(--spacing-unit) * 2);
        margin: 0 auto;
        max-width: 250px;
    }
    
    .projects-bento {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    section {
        padding: calc(var(--spacing-unit) * 6) 0;
    }
    
    .section-header {
        margin-bottom: calc(var(--spacing-unit) * 4);
    }
    
    .container {
        padding: 0 calc(var(--spacing-unit) * 2);
        margin: 0 auto;
        box-sizing: border-box;
    }
    
    /* Fix about section centering on mobile */
    .about-content {
        padding: 0;
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
    }
    
    .about-card {
        text-align: center;
        margin: 0 auto calc(var(--spacing-unit) * 2);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* About cards use standard glass-card padding on mobile */
    
    .about-card h3 {
        text-align: center;
        margin-bottom: calc(var(--spacing-unit) * 2);
    }
    
    .about-card p {
        text-align: left;
        margin: 0;
    }
    
    /* Mobile Profile Photo */
    .nav-profile-photo {
        display: block; /* Show header photo on mobile */
    }
    
    .profile-photo-container {
        display: none; /* Hide hero photo on mobile */
    }
    
    .hero-intro {
        gap: calc(var(--spacing-unit) * 2);
        justify-content: center;
    }
    
    .hero-title {
        min-width: auto;
    }
    
    /* Hide scroll indicator on mobile */
    .scroll-indicator {
        display: none;
    }
    
    /* Scroll snap removed - using normal scrolling */
    html {
        /* scroll-snap-type: none; - Removed to use normal scrolling */
    }
    
    section {
        min-height: auto;
    }
    
    .profile-photo {
        width: 100px;
        height: 100px;
    }
    
    .nav-container {
        padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 2);
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: var(--color-background);
        width: 100%;
        height: auto;
        text-align: center;
        transition: var(--transition-base);
        box-shadow: var(--shadow-lg);
        padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 1);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        z-index: 1000;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
        margin: 0;
        min-height: 44px; /* Ensure minimum touch target size */
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        transition: var(--transition-base);
        text-decoration: none;
        font-weight: 500;
        font-size: 18px;
    }

    .nav-link:hover, .nav-link:focus {
        background-color: var(--color-primary);
        color: white;
        transform: translateY(-2px);
    }

    .hamburger {
        display: flex;
        min-width: 44px; /* Ensure minimum touch target size */
        min-height: 44px;
        align-items: center;
        justify-content: center;
        padding: 8px;
        border-radius: 4px;
        transition: var(--transition-base);
    }

    .hamburger:hover {
        background-color: rgba(0, 0, 0, 0.1);
    }

    .hero {
        padding: calc(var(--spacing-unit) * 12) calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 6);
    }
    
    .hero-title {
        font-size: clamp(42px, 8vw, 52px);
        min-width: auto;
        margin-bottom: calc(var(--spacing-unit) * 1.5);
        width: 100%;
        max-width: 100%;
    }
    
    .title-line {
        display: block;
        margin-right: 0;
    }
    
    .hero-content {
        transform: none !important;
        opacity: 1 !important;
    }

    .hero-stats {
        flex-direction: column;
        gap: calc(var(--spacing-unit) * 2);
        align-items: center;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: calc(var(--spacing-unit) * 2);
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-unit) * 3);
    }

    .about-card {
        text-align: center;
    }

    .expertise-grid {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-unit) * 2);
        max-width: 300px;
        margin: 0 auto;
    }

    .expertise-item p {
        display: none;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-unit) * 3);
    }

    .timeline-line {
        display: none;
    }

    .timeline-item {
        padding-left: 0;
        text-align: left;
        max-width: 500px;
        margin: 0 auto calc(var(--spacing-unit) * 4) auto;
    }

    .timeline-dot {
        display: none;
    }

    .timeline-header {
        flex-direction: column;
        text-align: left;
        gap: calc(var(--spacing-unit));
    }
    
    .timeline-content {
        text-align: left;
    }
    
    .timeline-content ul {
        text-align: left;
    }
    
    .timeline-content li {
        text-align: left;
    }
    
    .timeline-tags {
        justify-content: flex-start;
    }

    .projects-bento {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: calc(var(--spacing-unit) * 3);
    }

    .project-card {
        height: auto;
        min-height: 200px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .project-card.hidden-mobile {
        display: none;
    }
    
    .load-more-btn {
        margin: calc(var(--spacing-unit) * 4) auto 0 auto;
        display: block;
        width: fit-content;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-unit) * 4);
        text-align: center;
    }

    .social-grid {
        justify-content: center;
        flex-wrap: wrap;
    }

    .social-link {
        min-width: 100px;
        flex: 0 0 auto;
    }

    .footer-content {
        flex-direction: column;
        gap: calc(var(--spacing-unit) * 3);
        text-align: center;
    }

    .footer-left {
        align-items: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: calc(var(--spacing-unit) * 2);
    }
}

/* Extra small mobile devices */
@media (max-width: 375px) {
    /* Container inherits padding from 768px breakpoint for consistency */
    
    /* About cards inherit glass-card styling */
    
    .about-content {
        gap: calc(var(--spacing-unit) * 2);
    }
    
    /* Fix expertise grid on very small screens */
    .expertise-grid {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-unit) * 1.5);
        padding: 0 calc(var(--spacing-unit));
        margin: calc(var(--spacing-unit) * 2) auto 0;
        max-width: 280px;
    }
    
    .expertise-item {
        padding: calc(var(--spacing-unit) * 1.5);
        margin: 0;
    }
    
    .hero {
        padding: calc(var(--spacing-unit) * 8) calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 4);
    }
    
    .hero-title {
        font-size: clamp(32px, 10vw, 42px);
        margin-bottom: calc(var(--spacing-unit) * 1);
    }
    
    /* Glass cards inherit base styles and adjust padding for mobile */
    .glass-card {
        padding: calc(var(--spacing-unit) * 2);
        margin: 0 0 calc(var(--spacing-unit) * 2) 0;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: calc(var(--spacing-unit) * 1.5);
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 2);
        font-size: 14px;
    }
    
    .project-card {
        margin-bottom: calc(var(--spacing-unit) * 2);
        padding: calc(var(--spacing-unit) * 2);
    }
    
    .nav-menu {
        padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 1.5);
    }
    
    .nav-link {
        padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 2);
        font-size: 16px;
    }
    
    /* Ensure no horizontal overflow */
    body, html {
        overflow-x: hidden;
    }
    
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Small tablets and large mobile devices */
@media (max-width: 425px) {
    /* Container inherits consistent padding from 768px breakpoint */
}

@media (max-width: 480px) {
    section {
        padding: calc(var(--spacing-unit) * 4) 0;
    }
    
    .section-header {
        margin-bottom: calc(var(--spacing-unit) * 3);
    }
    
    /* Container uses consistent 768px padding for all small devices */
    
    /* Small Mobile Profile Photo */
    .nav-profile-photo {
        display: block; /* Show header photo on small mobile */
        width: 35px;
        height: 35px;
    }
    
    .profile-photo-container {
        display: none; /* Hide hero photo on small mobile */
    }
    
    .hero-intro {
        gap: calc(var(--spacing-unit) * 1.5);
        justify-content: center;
    }
    
    .hero-title {
        min-width: auto;
    }
    
    /* Hide scroll indicator on small mobile */
    .scroll-indicator {
        display: none;
    }
    
    /* Scroll snap removed - using normal scrolling */
    html {
        /* scroll-snap-type: none; - Removed to use normal scrolling */
    }
    
    section {
        min-height: auto;
    }
    
    .profile-photo {
        width: 80px;
        height: 80px;
    }
    
    
    .hero-title {
        font-size: clamp(36px, 7vw, 42px);
        min-width: auto;
        margin-bottom: calc(var(--spacing-unit) * 1);
        width: 100%;
        max-width: 100%;
    }
    
    .hero {
        padding: calc(var(--spacing-unit) * 10) calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 4);
    }
    
    .hero-subtitle {
        font-size: clamp(18px, 4vw, 24px);
    }
    
    .section-title {
        font-size: clamp(28px, 6vw, 36px);
    }
    
    .project-card {
        min-height: 220px;
    }
    
    .skill-card {
        padding: calc(var(--spacing-unit) * 2);
    }
    
    /* Glass cards use base styles with consistent mobile padding */
    
    .about-card {
        padding: calc(var(--spacing-unit) * 2);
        margin-bottom: calc(var(--spacing-unit) * 2);
    }
    
    .timeline-content {
        padding: calc(var(--spacing-unit) * 2);
        text-align: left;
    }
    
    .timeline-content ul {
        text-align: left;
    }
    
    .timeline-content li {
        text-align: left;
    }
    
    .timeline-tags {
        justify-content: flex-start;
    }
    
    .social-grid {
        gap: calc(var(--spacing-unit));
    }
    
    .social-link {
        min-width: 80px;
        padding: calc(var(--spacing-unit) * 1.5);
    }
    
    .footer-links {
        flex-direction: column;
        gap: calc(var(--spacing-unit));
    }
    
    /* Ensure single column for very small screens */
    .projects-bento {
        grid-template-columns: 1fr;
    }
    
    .project-card.hidden-mobile {
        display: none;
    }
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--color-primary);
    color: white;
}