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

:root {
    /* Modern Color Palette */
    --primary-color: #ffffff;
    --secondary-color: #a0a0a0;
    --background: #050505;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --border-color: rgba(255, 255, 255, 0.08);
    --accent-color: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(10, 10, 10, 0.7);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

[data-theme="light"] {
    --primary-color: #0f172a;
    --secondary-color: #475569;
    --background: #f8fafc;
    --surface: rgba(255, 255, 255, 0.8);
    --surface-hover: #ffffff;
    --border-color: #e2e8f0;
    --accent-color: #2563eb;
    --accent-glow: rgba(37, 99, 235, 0.3);
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: var(--primary-color);
    background: var(--background);
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Space Background for Dark Mode */
[data-theme="dark"] body {
    background: radial-gradient(ellipse at center, #000000 0%, #000000 50%, #000000 100%);
    background-attachment: fixed;
}

/* Space Stars Layer */
.space-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -3;
    opacity: 0;
    transition: opacity 0.5s ease;
}

[data-theme="dark"] .space-stars {
    opacity: 1;
}

.star {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: twinkle 4s infinite;
}

.star:nth-child(odd) {
    animation-delay: 1s;
}

.star:nth-child(even) {
    animation-delay: 2s;
}

.star:nth-child(3n) {
    animation-delay: 3s;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Nebula Background */
.space-nebula {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
    opacity: 0;
    transition: opacity 0.5s ease;
}

[data-theme="dark"] .space-nebula {
    opacity: 1;
}

.nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    animation: nebula-drift 20s infinite linear;
}

.nebula-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.02) 0%, transparent 70%);
    top: 20%;
    left: 10%;
    animation-duration: 25s;
}

.nebula-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.015) 0%, transparent 70%);
    top: 60%;
    right: 15%;
    animation-duration: 30s;
    animation-direction: reverse;
}

.nebula-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.01) 0%, transparent 70%);
    bottom: 20%;
    left: 30%;
    animation-duration: 35s;
}

@keyframes nebula-drift {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -20px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 30px) rotate(240deg);
    }

    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* Planets */
.space-planets {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

[data-theme="dark"] .space-planets {
    opacity: 1;
}

.planet {
    position: absolute;
    border-radius: 50%;
    box-shadow: inset -20px -20px 50px rgba(0, 0, 0, 0.5);
}

.planet-1 {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
    top: 15%;
    right: 20%;
    animation: planet-orbit 40s infinite linear;
    box-shadow:
        inset -8px -8px 15px rgba(0, 0, 0, 0.8),
        0 0 5px rgba(255, 255, 255, 0.1);
}

.planet-2 {
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 50%, transparent 100%);
    bottom: 25%;
    left: 15%;
    animation: planet-orbit 35s infinite linear reverse;
    box-shadow:
        inset -5px -5px 10px rgba(0, 0, 0, 0.8),
        0 0 3px rgba(255, 255, 255, 0.1);
}

.planet-3 {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 50%, transparent 100%);
    top: 50%;
    left: 5%;
    animation: planet-orbit 50s infinite linear;
    box-shadow:
        inset -10px -10px 20px rgba(0, 0, 0, 0.9),
        0 0 4px rgba(255, 255, 255, 0.08);
}

@keyframes planet-orbit {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(20px, -15px) rotate(90deg);
    }

    50% {
        transform: translate(0, -30px) rotate(180deg);
    }

    75% {
        transform: translate(-20px, -15px) rotate(270deg);
    }

    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}


.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
nav {
    border-bottom: 1px solid var(--glass-border);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: var(--glass-bg);
    box-shadow: var(--glass-shadow);
}

[data-theme="light"] nav {
    background: rgba(255, 255, 255, 0.85);
}

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

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.03em;
    transition: opacity 0.2s ease;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 1rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: var(--primary-color);
    transition: all 0.3s ease;
    position: absolute;
}

.theme-toggle:hover svg {
    transform: rotate(180deg);
}

/* Icon visibility based on theme */
/* In dark mode: show sun icon (to switch to light) */
.theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(-180deg);
}

/* In light mode: show moon icon (to switch to dark) */
[data-theme="light"] .theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(180deg);
}

[data-theme="light"] .theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), #ff6b6b);
    z-index: 1000;
    transition: width 0.1s ease;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.7;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease, transform 0.2s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

/* Hero Section */
.hero {
    padding: 10rem 0 8rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 5rem;
    align-items: center;
}

.hero-text {
    max-width: 650px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent-color);
    margin-bottom: 2rem;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Typing Animation */
.typing-text {
    border-right: 2px solid var(--accent-color);
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    50% {
        border-color: var(--accent-color);
    }

    51%,
    100% {
        border-color: transparent;
    }
}


/* Particle Background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

/* Space dust particles for dark mode */
[data-theme="dark"] .particle {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
    opacity: 0.2;
}

.space-dust {
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.3) !important;
    opacity: 0.2 !important;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Enhanced space dust animation */
@keyframes space-drift {
    0% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0.1;
    }

    25% {
        transform: translateY(-15px) translateX(10px) rotate(90deg);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-30px) translateX(-5px) rotate(180deg);
        opacity: 0.2;
    }

    75% {
        transform: translateY(-15px) translateX(-10px) rotate(270deg);
        opacity: 0.3;
    }

    100% {
        transform: translateY(0px) translateX(0px) rotate(360deg);
        opacity: 0.1;
    }
}

.space-dust {
    animation: space-drift 8s ease-in-out infinite;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--secondary-color);
    line-height: 1.5;
}

/* Profile Image */
.hero-image {
    width: 300px;
    height: 300px;
    position: relative;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    filter: grayscale(100%);
    transition: filter 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-image img:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Theme-specific image visibility */
.profile-dark {
    opacity: 1;
    pointer-events: auto;
}

.profile-light {
    opacity: 0;
    pointer-events: none;
}

[data-theme="light"] .profile-dark {
    opacity: 0;
    pointer-events: none;
}

[data-theme="light"] .profile-light {
    opacity: 1;
    pointer-events: auto;
}

/* Fade-in Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.hero-text {
    animation-delay: 0.2s;
}

.hero-image {
    animation-delay: 0.4s;
}

/* Slide-in Animation for Headings */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
}

.slide-in-left.animate {
    animation: slideInLeft 0.6s ease-out forwards;
}

/* Scroll Reveal Animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tech Stack Marquee */
.tech-marquee {
    padding: 6rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(5, 5, 5, 0) 0%, rgba(59, 130, 246, 0.05) 50%, rgba(5, 5, 5, 0) 100%);
    overflow: hidden;
    position: relative;
}

.marquee {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.marquee-content {
    display: flex;
    animation: scroll 25s linear infinite;
    will-change: transform;
}

.marquee-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 3rem;
    min-width: 160px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

.marquee-item img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: grayscale(100%) opacity(0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.marquee-item:hover img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1) translateY(-5px);
    filter: drop-shadow(0 10px 20px rgba(59, 130, 246, 0.3));
}

.marquee-item span {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.marquee-item:hover span {
    opacity: 1;
    transform: translateY(0);
    color: var(--primary-color);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Enhanced hover effects */
.marquee:hover .marquee-content {
    animation-play-state: paused;
}

/* Fix Kafka logo visibility in dark mode */
.marquee-item img[alt="Kafka"] {
    filter: grayscale(100%) brightness(1.2) contrast(1.3);
    opacity: 0.6;
}

.marquee-item:hover img[alt="Kafka"] {
    filter: grayscale(0%) brightness(1.4) contrast(1.5);
    opacity: 1;
}

/* Additional contrast for dark mode */
[data-theme="dark"] .marquee-item img[alt="Kafka"] {
    filter: grayscale(100%) brightness(1.5) contrast(1.8) invert(0.1);
    opacity: 0.7;
}

[data-theme="dark"] .marquee-item:hover img[alt="Kafka"] {
    filter: grayscale(0%) brightness(1.6) contrast(2) invert(0);
    opacity: 1;
}

/* Sections */
.section {
    padding: 5rem 0;
    border-top: 1px solid var(--border-color);
}

.section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.section h3 {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.section h4 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.section p {
    font-size: 1.1rem;
    color: var(--secondary-color);
    line-height: 1.7;
    max-width: 800px;
}

/* Experience Section */
.experience-item {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.experience-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-glow);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.experience-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.company {
    color: var(--accent-color);
    font-weight: 500;
    font-size: 1.1rem;
}

.date {
    font-size: 0.9rem;
    color: var(--secondary-color);
    background: var(--surface-hover);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    border: 1px solid var(--border-color);
}

.experience-description {
    margin-top: 1rem;
}

.experience-description>p {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.experience-description ul {
    list-style: none;
    padding: 0;
}

.experience-description li {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    position: relative;
    color: var(--secondary-color);
    line-height: 1.6;
}

.experience-description li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Project Cards */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 1;
}

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

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-glow);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.project-card p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.project-tags span {
    font-size: 0.8rem;
    padding: 0.35rem 0.85rem;
    background: var(--surface-hover);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--primary-color);
    font-weight: 500;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-category {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.skill-category:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.skill-category h4 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.skill-category p {
    font-size: 0.95rem;
    color: var(--secondary-color);
    line-height: 1.5;
}

.certifications {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.certifications h3 {
    margin-bottom: 1rem;
}

.certifications ul {
    list-style: none;
    padding: 0;
}

.certifications li {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    color: var(--secondary-color);
}

.certifications li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* Contact Section */
.contact-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.contact-link {
    padding: 0.75rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.contact-link:hover {
    background: var(--primary-color);
    color: var(--background);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

/* Footer */
footer {
    padding: 4rem 0;
    text-align: center;
    color: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    background: var(--background);
}

footer p {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-image {
        width: 250px;
        height: 250px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    nav {
        padding: 1rem 0;
    }

    .logo {
        font-size: 1.2rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.85rem;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-links a {
        padding: 0.5rem;
        border-radius: 4px;
        transition: background-color 0.2s ease;
    }

    .nav-links a:hover {
        background-color: var(--hover-color);
        transform: none;
    }

    .theme-toggle {
        top: 1.5rem;
        right: 1.5rem;
        width: 28px;
        height: 28px;
    }

    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }

    /* Mobile Menu */
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--background);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        transition: right 0.3s ease;
        border-left: 1px solid var(--border-color);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    /* Mobile menu overlay */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .hero {
        padding: 4rem 0 3rem;
    }

    .hero h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .hero-tag {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
        margin-bottom: 1.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .hero-image {
        width: 200px;
        height: 200px;
    }

    .tech-marquee {
        padding: 3rem 0;
    }

    .marquee-item {
        padding: 0 1.5rem;
        min-width: 110px;
    }

    .marquee-item img {
        width: 45px;
        height: 45px;
    }

    .marquee-item span {
        font-size: 0.7rem;
    }

    .section {
        padding: 3rem 0;
    }

    .section h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .section p {
        font-size: 1rem;
    }

    .experience-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .experience-description li {
        font-size: 0.95rem;
        padding-left: 1.2rem;
    }

    .date {
        margin-top: 0;
        font-size: 0.9rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        padding: 1.5rem;
    }

    .project-card h3 {
        font-size: 1.2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .skill-category {
        padding: 1.25rem;
    }

    .contact-links {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-link {
        text-align: center;
        width: 100%;
    }

    footer {
        padding: 2rem 0;
        margin-top: 3rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .nav-links {
        gap: 0.75rem;
        font-size: 0.8rem;
    }

    .hero {
        padding: 3rem 0 2rem;
    }

    .hero h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .hero-tag {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
        margin-bottom: 1.25rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .hero-image {
        width: 160px;
        height: 160px;
    }

    .tech-marquee {
        padding: 2.5rem 0;
    }

    .marquee-item {
        padding: 0 1rem;
        min-width: 90px;
    }

    .marquee-item::before {
        width: 50px;
        height: 50px;
    }

    .marquee-item img {
        width: 40px;
        height: 40px;
    }

    .marquee-item span {
        font-size: 0.65rem;
    }

    .section {
        padding: 2.5rem 0;
    }

    .section h2 {
        font-size: 1.35rem;
        margin-bottom: 1.25rem;
    }

    .section p {
        font-size: 0.95rem;
    }

    .experience-description li {
        font-size: 0.9rem;
    }

    .project-card {
        padding: 1.25rem;
    }

    .project-card h3 {
        font-size: 1.1rem;
    }

    .project-card p {
        font-size: 0.95rem;
    }

    .project-tags span {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }

    .skill-category {
        padding: 1rem;
    }

    .skill-category h4 {
        font-size: 0.95rem;
    }

    .skill-category p {
        font-size: 0.9rem;
    }

    .contact-link {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }

    .character {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    /* Improve touch targets for mobile */
    .contact-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .project-card {
        min-height: 200px;
    }

    .skill-category {
        min-height: 120px;
    }

    /* Better mobile scrolling */
    .tech-marquee {
        -webkit-overflow-scrolling: touch;
    }
}