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

:root {
    /* Light Theme Colors - Inspired by olhauzhykova.com */
    --primary-color: #2d2d2d;
    --primary-dark: #1a1a1a;
    --primary-light: #4a4a4a;
    --secondary-color: #666666;
    --accent-color: #ff6b35;
    --accent-light: #ff8c69;
    
    --text-primary: #2d2d2d;
    --text-secondary: #666666;
    --text-light: #999999;
    --text-muted: #cccccc;
    
    --bg-primary: #f8f9f7;        /* Sage-tinted white */
    --bg-secondary: #f2f4f1;      /* Light sage */
    --bg-tertiary: #eaede8;       /* Deeper sage */
    --bg-dark: #0f172a;
    --bg-card: #ffffff;
    
    --border-color: #e2e6df;      /* Sage-tinted border */
    --border-light: #eff1ed;      /* Light sage border */
    
    /* Shadows with warmer tones */
    --shadow-xs: 0 1px 2px 0 rgb(45 45 45 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(45 45 45 / 0.08), 0 1px 2px -1px rgb(45 45 45 / 0.08);
    --shadow-md: 0 4px 6px -1px rgb(45 45 45 / 0.08), 0 2px 4px -2px rgb(45 45 45 / 0.08);
    --shadow-lg: 0 10px 15px -3px rgb(45 45 45 / 0.08), 0 4px 6px -4px rgb(45 45 45 / 0.08);
    --shadow-xl: 0 20px 25px -5px rgb(45 45 45 / 0.08), 0 8px 10px -6px rgb(45 45 45 / 0.08);
    --shadow-2xl: 0 25px 50px -12px rgb(45 45 45 / 0.15);
    
    /* Typography */
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    
    --font-size-xs: 0.75rem;      /* 12px */
    --font-size-sm: 0.875rem;     /* 14px */
    --font-size-base: 1rem;       /* 16px */
    --font-size-lg: 1.125rem;     /* 18px */
    --font-size-xl: 1.25rem;      /* 20px */
    --font-size-2xl: 1.5rem;      /* 24px */
    --font-size-3xl: 1.875rem;    /* 30px */
    --font-size-4xl: 2.25rem;     /* 36px */
    --font-size-5xl: 3rem;        /* 48px */
    --font-size-6xl: 3.75rem;     /* 60px */
    
    /* Spacing Scale */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    --space-24: 6rem;     /* 96px */
    --space-32: 8rem;     /* 128px */
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-3xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s 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);
    
    /* Z-index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* Dark Theme */
[data-theme="dark"] {
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0; /* Lighter for better visibility */
    --text-light: #cbd5e1;     /* Moved up one shade */
    --text-muted: #94a3b8;     /* Moved up one shade */
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    
    --border-color: #334155;
    --border-light: #475569;
    
    --accent-color: #ff6b35;
    --accent-light: #ff8c69;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

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

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
    overflow: hidden;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.name-animation {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-name {
    display: inline-block;
    font-size: var(--font-size-4xl);
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 0;
    transform: scale(0.8);
    animation: nameRevealFullScreen 2.8s ease-in-out forwards;
    transform-origin: center center;
    will-change: transform, opacity;
}

@keyframes nameRevealFullScreen {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(25);
    }
}

/* Fallback spinner for older browsers */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-4);
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(248, 249, 247, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: var(--z-fixed);
    transition: all var(--transition-normal);
}


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

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
    background: rgba(248, 249, 247, 0.98);
}


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

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    font-size: var(--font-size-xl);
    font-weight: 700;
    transition: var(--transition-fast);
}

.nav-logo a:hover {
    transform: translateY(-1px);
}

.logo-icon {
    font-size: var(--font-size-2xl);
}

.logo-text {
    color: var(--text-primary);
}

.logo-version {
    color: var(--accent-color);
    font-size: var(--font-size-sm);
    background: var(--bg-secondary);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
}

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

.nav-menu li {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

.nav-link.active {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

/* Dark mode navigation improvements */
[data-theme="dark"] .nav-link {
    color: var(--text-secondary);
    font-weight: 600; /* Slightly bolder for better visibility */
}

[data-theme="dark"] .nav-link:hover {
    color: var(--text-primary); /* Use primary text color instead of primary-color */
    background: var(--bg-tertiary);
}

[data-theme="dark"] .nav-link.active {
    color: var(--text-primary); /* Use primary text color for active state */
    background: var(--bg-tertiary);
}

.nav-link i {
    font-size: var(--font-size-sm);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--accent-color);
    background: var(--bg-tertiary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: var(--space-2);
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 2px 0;
    transition: var(--transition-fast);
    border-radius: var(--radius-sm);
}

/* Main Content */
.main-content {
    margin-top: 80px;
}

/* Hero Section */
.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
    padding: var(--space-20) 0;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
    width: 100%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-20);
    align-items: center;
}

.hero-text {
    animation: fadeInLeft 1s ease-out;
}

.hero-title {
    font-size: var(--font-size-6xl);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-6);
}

.title-line {
    display: block;
    color: var(--text-secondary);
    font-size: var(--font-size-2xl);
    font-weight: 400;
    margin-bottom: var(--space-2);
}

.title-name {
    display: block;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-2);
}

.title-role {
    display: block;
    color: var(--text-primary);
    position: relative;
}

.title-role::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-full);
}

.hero-description {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
    max-width: 500px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    position: relative;
    animation: fadeInRight 1s ease-out;
}

.image-container {
    position: relative;
}

.profile-image {
    width: 400px;
    height: 400px;
    border-radius: var(--radius-3xl);
    object-fit: cover;
    border: 8px solid var(--bg-card);
    box-shadow: var(--shadow-2xl);
    position: relative;
    z-index: 2;
    transition: var(--transition-slow);
    background: var(--bg-secondary);
}

.profile-image:hover {
    transform: scale(1.02);
}

/* Placeholder for missing profile image */
.profile-image[src=""], 
.profile-image:not([src]) {
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-image[src=""]:before, 
.profile-image:not([src]):before {
    content: '👤';
    font-size: 8rem;
    opacity: 0.3;
}

.image-decoration {
    position: absolute;
    top: -30px;
    left: -30px;
    width: 460px;
    height: 460px;
    border: 3px solid var(--accent-color);
    border-radius: var(--radius-3xl);
    opacity: 0.3;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.floating-icon {
    position: absolute;
    font-size: 2.5rem;
    color: var(--accent-color);
    opacity: 0.12;
}

.floating-icon:nth-child(1) {
    top: 15%;
    left: 8%;
    font-size: 2.8rem;
    animation: float 7s ease-in-out infinite;
}

.floating-icon:nth-child(2) {
    top: 70%;
    right: 8%;
    font-size: 2rem;
    animation: float 6.5s ease-in-out infinite;
    animation-delay: 2.5s;
}

.floating-icon:nth-child(3) {
    bottom: 50%;
    left: 30%;
    font-size: 2.4rem;
    animation: float 6s ease-in-out infinite;
    animation-delay: 2s;
}

.floating-icon:nth-child(4) {
    top: 17%;
    right: 40%;
    font-size: 2.2rem;
    animation: float 7.5s ease-in-out infinite;
    animation-delay: 0.5s;
}

.floating-icon:nth-child(5) {
    top: 85%;
    left: 45%;
    font-size: 1.8rem;
    animation: float 8.5s ease-in-out infinite;
    animation-delay: 1.5s;
}

.floating-icon:nth-child(6) {
    top: 65%;
    left: 4%;
    font-size: 2rem;
    animation: float 8s ease-in-out infinite;
    animation-delay: 1s;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-xl);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--font-size-base);
    transition: var(--transition-normal);
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::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: var(--transition-slow);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

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

.btn-secondary:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* PART 2 */

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

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--space-16);
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-full);
}

/* Skills Overview */
.skills-overview {
    padding: var(--space-24) 0;
    background: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-8);
}

.skill-card {
    background: var(--bg-card);
    padding: var(--space-8);
    border-radius: var(--radius-2xl);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

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

.skill-icon {
    font-size: var(--font-size-5xl);
    color: var(--accent-color);
    margin-bottom: var(--space-6);
    display: block;
}

.skill-card h3 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.skill-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Projects Preview */
.projects-preview {
    padding: var(--space-24) 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-8);
    margin-bottom: var(--space-16);
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    border: 1px solid var(--border-color);
    position: relative;
}

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

.project-image {
    height: 250px;
    overflow: hidden;
    position: relative;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

/* Placeholder for missing images */
.project-image:empty::before {
    content: '🖼️';
    font-size: 4rem;
    opacity: 0.3;
}

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

.project-content h3 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    line-height: 1.7;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: var(--space-8);
    right: var(--space-8);
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
    opacity: 0;
    visibility: hidden;
    z-index: var(--z-fixed);
}

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

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: var(--accent-light);
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    padding: var(--space-20) 0 var(--space-8);
}

[data-theme="dark"] .footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

.footer-section h3 {
    margin-bottom: var(--space-6);
    color: white;
    font-size: var(--font-size-lg);
    font-weight: 700;
}

[data-theme="dark"] .footer-section h3 {
    color: var(--text-primary);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: var(--space-4);
}

[data-theme="dark"] .footer-section p {
    color: var(--text-secondary);
}

.social-links {
    display: flex;
    gap: var(--space-4);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.social-link.linkedin:hover {
    background: #0077b5;
    border-color: #0077b5;
}

.social-link.github:hover {
    background: #333;
    border-color: #333;
}

.social-link.twitter:hover {
    background: #1da1f2;
    border-color: #1da1f2;
}

.social-link.email:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

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

.footer-links li {
    margin-bottom: var(--space-3);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

[data-theme="dark"] .footer-links a {
    color: var(--text-secondary);
}

[data-theme="dark"] .footer-links a:hover {
    color: var(--text-primary);
}

.tech-icons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.tech-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tech-icon:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: var(--space-8);
}

[data-theme="dark"] .footer-bottom {
    border-top-color: var(--border-color);
}

.footer-bottom-content {
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-2);
}

[data-theme="dark"] .footer-bottom p {
    color: var(--text-light);
}

.footer-version {
    font-size: var(--font-size-xs);
    opacity: 0.8;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

.text-right {
    text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }

/* Animations */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

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

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: var(--font-size-5xl);
    }
    
    .profile-image {
        width: 350px;
        height: 350px;
    }
    
    .image-decoration {
        width: 410px;
        height: 410px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--bg-card);
        width: 100%;
        text-align: center;
        transition: var(--transition-normal);
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border-color);
        padding: var(--space-8) 0;
    }

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

    .nav-menu li {
        margin: var(--space-2) 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--space-12);
        text-align: center;
    }

    .hero-title {
        font-size: var(--font-size-4xl);
    }

    .title-line {
        font-size: var(--font-size-xl);
    }

    .hero-buttons {
        justify-content: center;
    }

    .profile-image {
        width: 300px;
        height: 300px;
    }

    .image-decoration {
        width: 360px;
        height: 360px;
        top: -20px;
        left: -20px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .tech-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 var(--space-3);
    }

    .container {
        padding: 0 var(--space-3);
    }

    .hero {
        padding: var(--space-16) 0;
    }

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .hero-description {
        font-size: var(--font-size-base);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

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

    .image-decoration {
        width: 310px;
        height: 310px;
    }

    .section-title {
        font-size: var(--font-size-3xl);
    }

    .skill-card,
    .project-card {
        margin: 0 var(--space-2);
    }

    .back-to-top {
        bottom: var(--space-4);
        right: var(--space-4);
        width: 45px;
        height: 45px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
        --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .floating-icon {
        animation: none;
    }
    
    .image-decoration {
        animation: none;
    }
}

/* Print styles */
@media print {
    .navbar,
    .nav-toggle,
    .theme-toggle,
    .back-to-top,
    .floating-elements {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .hero {
        min-height: auto;
        padding: var(--space-8) 0;
    }
    
    .btn {
        border: 2px solid black !important;
        background: white !important;
        color: black !important;
    }
}

@media (max-width: 768px) {
    .loading-name {
        font-size: var(--font-size-xl);
    }
}

@media (max-width: 480px) {
    .loading-name {
        font-size: var(--font-size-lg);
    }
}

@media (max-width: 1024px) {
    .loading-name {
        font-size: var(--font-size-3xl);
    }
}

@media (max-width: 768px) {
    .loading-name {
        font-size: var(--font-size-2xl);
    }
}

@media (max-width: 480px) {
    .loading-name {
        font-size: var(--font-size-xl);
    }
}

/* Ensure main content is visible after loading */
.main-content {
    margin-top: 80px;
    opacity: 1;
    visibility: visible;
}

body.loading .main-content {
    opacity: 0;
    visibility: hidden;
}


/* Focus styles for accessibility */
.btn:focus,
.nav-link:focus,
.theme-toggle:focus,
.social-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

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

::-moz-selection {
    background: var(--accent-color);
    color: white;
}

/* Scrollbar styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--border-color);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Technology Icons with Brand Colors */
.tech-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.tech-icon {
    font-size: 1.8rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tech-icon.kubernetes {
    color: #326ce5;
}
.tech-icon.kubernetes:hover {
    color: #4e7ff7;
    transform: scale(1.2) rotate(360deg);
}

.tech-icon.helm {
    color: #0f1689;
}
.tech-icon.helm:hover {
    color: #2836a8;
    transform: scale(1.2) rotate(15deg);
}

.tech-icon.docker {
    color: #2496ed;
}
.tech-icon.docker:hover {
    color: #50a9f2;
    transform: scale(1.2);
}

.tech-icon.gcp {
    color: #4285f4;
}
.tech-icon.gcp:hover {
    color: #5a95f5;
    transform: scale(1.2);
}

.tech-icon.gitlab {
    color: #fc6d26;
}
.tech-icon.gitlab:hover {
    color: #fd8140;
    transform: scale(1.2);
}

.tech-icon.terraform {
    color: #7e3ff2;
}
.tech-icon.terraform:hover {
    color: #9562f6;
    transform: scale(1.2);
}

.tech-icon.python {
    color: #3776ab;
}
.tech-icon.python:hover {
    color: #4b8bc7;
    transform: scale(1.2);
}

.tech-icon.go {
    color: #00add8;
}
.tech-icon.go:hover {
    color: #00c7f7;
    transform: scale(1.2);
}

.tech-icon.git {
    color: #f05032;
}
.tech-icon.git:hover {
    color: #f26d4f;
    transform: scale(1.2);
}
