/* ===== CSS RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    /* Professional Gray/Dark Color Palette */
    --primary-color: #6b7280;
    --primary-dark: #4b5563;
    --primary-light: #9ca3af;
    --secondary-color: #9ca3af;
    --accent-color: #d1d5db;
    --accent-dark: #9ca3af;
    
    /* Neutral Colors */
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --text-light: #6b7280;
    
    /* Background Colors */
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --bg-dark: #0f172a;
    
    /* Border Colors */
    --border-light: #374151;
    --border-medium: #4b5563;
    --border-dark: #6b7280;
    
    /* Shadow Colors */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Typography Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
}

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-4xl);
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    letter-spacing: -0.025em;
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    font-weight: 400;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: var(--transition-normal);
}

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

.nav-logo a {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.nav-logo a:hover {
    color: var(--primary-color);
}

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

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

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

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

/* ===== HERO SECTION ===== */
.hero {
    padding: 120px 0 var(--space-4xl);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    margin-bottom: var(--space-xl);
}

.hero-greeting {
    display: block;
    font-size: var(--text-lg);
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: var(--space-sm);
}

.hero-name {
    display: block;
    font-size: var(--text-5xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.025em;
}

.hero-role {
    display: block;
    font-size: var(--text-2xl);
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: var(--space-xl);
}

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

.hero-actions {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 0.8s ease-out 0.2s both;
}

.code-block {
    background: var(--bg-dark);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    max-width: 100%;
    width: 100%;
}

.code-header {
    background: #1f2937;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #374151;
}

.code-title {
    color: #d1d5db;
    font-size: var(--text-sm);
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

.code-dots {
    display: flex;
    gap: var(--space-xs);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #6b7280;
}

.dot:nth-child(1) { background: #ef4444; }
.dot:nth-child(2) { background: #f59e0b; }
.dot:nth-child(3) { background: #10b981; }

.code-content {
    padding: var(--space-xl);
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--text-sm);
    line-height: 1.6;
    overflow-x: auto;
}

.code-content pre {
    margin: 0;
    white-space: pre;
}

.keyword { color: #c084fc; }
.class-name { color: #60a5fa; }
.function { color: #34d399; }
.parameter { color: #fbbf24; }
.string { color: #a3e635; }
.number { color: #fbbf24; }
.comment { color: #9ca3af; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: var(--text-sm);
    text-decoration: none;
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
    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: var(--accent-color);
    color: var(--bg-primary);
    box-shadow: var(--shadow-md);
}

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

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

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

.btn-full {
    width: 100%;
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: var(--space-4xl) 0;
    background: var(--bg-primary);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.about-text {
    animation: fadeInLeft 0.8s ease-out;
}

.about-description {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

.stat {
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    transition: var(--transition-normal);
}

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

.stat-number {
    display: block;
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.about-image {
    display: flex;
    justify-content: center;
    animation: fadeInRight 0.8s ease-out;
}

.image-placeholder {
    width: 250px;
    height: 250px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
}

.image-placeholder:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

/* ===== EXPERIENCE SECTION ===== */
.experience {
    padding: var(--space-4xl) 0;
    background: var(--bg-secondary);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-medium);
}

.timeline-item {
    position: relative;
    margin-bottom: var(--space-4xl);
    padding-left: 80px;
    animation: fadeInUp 0.8s ease-out;
}

.timeline-marker {
    position: absolute;
    left: 20px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 4px solid var(--bg-secondary);
    box-shadow: var(--shadow-md);
}

.timeline-content {
    background: var(--bg-primary);
    padding: var(--space-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    border: 1px solid var(--border-light);
}

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

.timeline-header {
    margin-bottom: var(--space-lg);
}

.timeline-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.timeline-company {
    display: block;
    font-size: var(--text-lg);
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.timeline-period {
    display: block;
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-weight: 500;
}

.timeline-description {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.timeline-achievements {
    list-style: none;
    margin-bottom: var(--space-lg);
}

.timeline-achievements li {
    position: relative;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.timeline-achievements li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: var(--text-xs);
}

.timeline-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.tech-tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: 500;
    border: 1px solid var(--border-light);
    transition: var(--transition-fast);
}

.tech-tag:hover {
    background: var(--accent-color);
    color: var(--bg-primary);
    transform: translateY(-1px);
}

/* ===== SKILLS SECTION ===== */
.skills {
    padding: var(--space-4xl) 0;
    background: var(--bg-primary);
}

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

.skill-category {
    background: var(--bg-secondary);
    padding: var(--space-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    animation: fadeInUp 0.8s ease-out;
}

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

.skill-category-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    justify-content: center;
}

.skill-category-icon {
    width: 24px;
    height: 24px;
    color: var(--accent-color);
    flex-shrink: 0;
}

.skill-category-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.skill-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-lg);
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    text-align: center;
}

.skill-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.skill-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.skill-item:hover .skill-icon {
    color: var(--primary-light);
    transform: scale(1.1);
}

.skill-name {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

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

/* ===== PROJECTS SECTION ===== */
.projects {
    padding: var(--space-4xl) 0;
    background: var(--bg-secondary);
}

.projects-carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.carousel-container {
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: var(--space-lg);
}

.carousel-track .project-card {
    flex: 0 0 calc(33.333% - var(--space-md));
    min-width: 0;
    max-width: calc(33.333% - var(--space-md));
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
}

.carousel-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.carousel-btn:hover {
    background: var(--accent-color);
    color: var(--bg-primary);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.carousel-btn:disabled:hover {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-color: var(--border-light);
    transform: none;
    box-shadow: var(--shadow-md);
}

.project-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    animation: fadeInUp 0.8s ease-out;
    border: 1px solid var(--border-light);
}

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

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

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.project-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.project-description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.project-links {
    display: flex;
    gap: var(--space-lg);
}

.project-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.project-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-color);
    transition: var(--transition-fast);
}

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

/* ===== CONTACT SECTION ===== */
.contact {
    padding: var(--space-4xl) 0;
    background: var(--bg-primary);
}

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

.contact-info {
    animation: fadeInLeft 0.8s ease-out;
}

.contact-title {
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.contact-description {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-2xl);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.contact-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-color);
    flex-shrink: 0;
}

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

.social-link {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-normal);
    text-decoration: none;
}

.social-link:hover {
    background: var(--accent-color);
    color: var(--bg-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

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

.contact-form {
    animation: fadeInRight 0.8s ease-out;
}

.form-group {
    margin-bottom: var(--space-xl);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-family: inherit;
    transition: var(--transition-fast);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(209, 213, 219, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

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

.form-actions .btn-primary {
    flex: 1;
}

.btn-refresh {
    width: 48px;
    height: 48px;
    padding: 0;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
    cursor: pointer;
}

.btn-refresh:hover {
    background: var(--accent-color);
    color: var(--bg-primary);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-refresh svg {
    width: 20px;
    height: 20px;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: var(--space-2xl) 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-text {
    font-size: var(--text-sm);
    color: var(--text-light);
}

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

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

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

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large tablets and small desktops */
@media (max-width: 1200px) {
    .container {
        max-width: 1000px;
    }
    
    .hero-container {
        gap: var(--space-3xl);
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablets */
@media (max-width: 1024px) {
    .container {
        max-width: 900px;
        padding: 0 var(--space-lg);
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
        text-align: center;
    }
    
    .hero-visual {
        order: -1;
        margin-bottom: var(--space-xl);
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
        text-align: center;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-lg);
    }
    
    .carousel-track .project-card {
        flex: 0 0 calc(50% - var(--space-sm));
        max-width: calc(50% - var(--space-sm));
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-md);
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: var(--space-2xl);
        transition: var(--transition-normal);
        box-shadow: var(--shadow-lg);
        z-index: 1000;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero Section */
    .hero {
        padding: 80px 0 var(--space-2xl);
        text-align: center;
    }
    
    .hero-container {
        gap: var(--space-xl);
    }
    
    .hero-visual {
        order: -1;
        margin-bottom: var(--space-lg);
    }
    
    .hero-name {
        font-size: var(--text-3xl);
        line-height: 1.2;
    }
    
    .hero-role {
        font-size: var(--text-lg);
        margin: var(--space-sm) 0;
    }
    
    .hero-description {
        font-size: var(--text-base);
        line-height: 1.6;
        margin-bottom: var(--space-lg);
    }
    
    .hero-actions {
        flex-direction: column;
        gap: var(--space-md);
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: var(--space-md) var(--space-lg);
    }
    
    /* Sections */
    .section {
        padding: var(--space-3xl) 0;
    }
    
    .section-title {
        font-size: var(--text-2xl);
        margin-bottom: var(--space-lg);
    }
    
    .section-subtitle {
        font-size: var(--text-base);
        margin-bottom: var(--space-xl);
    }
    
    /* About Section */
    .about-stats {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .stat-item {
        text-align: center;
        padding: var(--space-lg);
    }
    
    /* Experience Timeline */
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item {
        padding-left: 50px;
        margin-bottom: var(--space-xl);
    }
    
    .timeline-marker {
        left: 5px;
        width: 20px;
        height: 20px;
    }
    
    .timeline-content {
        padding: var(--space-lg);
    }
    
    .timeline-title {
        font-size: var(--text-lg);
    }
    
    .timeline-company {
        font-size: var(--text-base);
    }
    
    /* Skills Section */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .skill-items {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: var(--space-sm);
    }
    
    .skill-item {
        padding: var(--space-sm);
        text-align: center;
    }
    
    .skill-icon {
        width: 24px;
        height: 24px;
        margin-bottom: var(--space-xs);
    }
    
    .skill-name {
        font-size: var(--text-sm);
    }
    
    /* Projects Carousel */
    .carousel-track .project-card {
        flex: 0 0 calc(100% - var(--space-sm));
        max-width: calc(100% - var(--space-sm));
        min-width: 0;
    }
    
    .carousel-controls {
        margin-top: var(--space-xl);
        gap: var(--space-md);
    }
    
    .carousel-btn {
        width: 50px;
        height: 50px;
        padding: var(--space-sm);
    }
    
    .carousel-btn svg {
        width: 24px;
        height: 24px;
    }
    
    /* Contact Section */
    .contact-content {
        gap: var(--space-xl);
    }
    
    .contact-details {
        gap: var(--space-md);
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: var(--space-xs);
    }
    
    .social-links {
        justify-content: center;
        gap: var(--space-md);
    }
    
    .social-link {
        width: 50px;
        height: 50px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }
    
    /* Hero Section */
    .hero {
        padding: 60px 0 var(--space-xl);
    }
    
    .hero-name {
        font-size: var(--text-2xl);
        line-height: 1.1;
    }
    
    .hero-role {
        font-size: var(--text-base);
    }
    
    .hero-description {
        font-size: var(--text-sm);
        line-height: 1.5;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 260px;
        padding: var(--space-sm) var(--space-md);
        font-size: var(--text-sm);
    }
    
    /* Sections */
    .section {
        padding: var(--space-2xl) 0;
    }
    
    .section-title {
        font-size: var(--text-xl);
        margin-bottom: var(--space-md);
    }
    
    .section-subtitle {
        font-size: var(--text-sm);
        margin-bottom: var(--space-lg);
    }
    
    /* Code Block */
    .code-block {
        margin: 0 var(--space-sm);
    }
    
    .code-header {
        padding: var(--space-sm) var(--space-md);
    }
    
    .code-title {
        font-size: var(--text-sm);
    }
    
    .code-content {
        padding: var(--space-md);
        font-size: var(--text-xs);
    }
    
    /* About Stats */
    .stat-item {
        padding: var(--space-md);
    }
    
    .stat-number {
        font-size: var(--text-2xl);
    }
    
    .stat-label {
        font-size: var(--text-sm);
    }
    
    /* Timeline */
    .timeline-content {
        padding: var(--space-md);
    }
    
    .timeline-title {
        font-size: var(--text-base);
    }
    
    .timeline-company {
        font-size: var(--text-sm);
    }
    
    .timeline-duration {
        font-size: var(--text-xs);
    }
    
    .timeline-description {
        font-size: var(--text-sm);
        line-height: 1.5;
    }
    
    /* Skills */
    .skill-items {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: var(--space-xs);
    }
    
    .skill-item {
        padding: var(--space-xs);
    }
    
    .skill-icon {
        width: 20px;
        height: 20px;
    }
    
    .skill-name {
        font-size: var(--text-xs);
    }
    
    /* Projects */
    .project-content {
        padding: var(--space-md);
    }
    
    .project-title {
        font-size: var(--text-base);
    }
    
    .project-description {
        font-size: var(--text-sm);
        line-height: 1.5;
    }
    
    .project-tech {
        font-size: var(--text-xs);
    }
    
    /* Contact */
    .contact-details {
        gap: var(--space-sm);
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: var(--space-xs);
    }
    
    .contact-icon {
        width: 20px;
        height: 20px;
    }
    
    .contact-text {
        font-size: var(--text-sm);
    }
    
    .social-links {
        justify-content: center;
        gap: var(--space-sm);
    }
    
    .social-link {
        width: 45px;
        height: 45px;
    }
    
    /* Form */
    .form-group {
        margin-bottom: var(--space-md);
    }
    
    .form-input,
    .form-textarea {
        padding: var(--space-sm) var(--space-md);
        font-size: var(--text-sm);
    }
    
    .form-textarea {
        min-height: 120px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .btn-submit {
        width: 100%;
        padding: var(--space-sm) var(--space-md);
        font-size: var(--text-sm);
    }
    
    .btn-clear {
        width: 100%;
        padding: var(--space-sm) var(--space-md);
        font-size: var(--text-sm);
    }
}

/* ===== MOBILE TOUCH IMPROVEMENTS ===== */
@media (max-width: 768px) {
    /* Improve touch targets */
    .nav-link {
        padding: var(--space-md) var(--space-lg);
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    .carousel-btn {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }
    
    .social-link {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }
    
    /* Improve scrolling */
    .hero-container {
        scroll-margin-top: 80px;
    }
    
    .section {
        scroll-margin-top: 80px;
    }
    
    /* Better spacing for mobile */
    .hero-visual {
        max-width: 100%;
        overflow: hidden;
    }
    
    .code-block {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .code-content {
        white-space: pre;
        overflow-x: auto;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.nav-link:focus,
.form-input:focus,
.form-textarea:focus,
.social-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: #e5e7eb;
        --border-light: #9ca3af;
    }
}

/* Print styles */
@media print {
    .navbar,
    .hero-actions,
    .contact-form,
    .footer {
        display: none;
    }
    
    .hero {
        padding: 0;
        min-height: auto;
    }
    
    .section-title {
        color: #000000;
    }
}
