:root {
    /* Light Theme - Softer, eye-friendly colors */
    --primary-bg: linear-gradient(135deg, #6c5ce7 0%, #74b9ff 25%, #00b894 50%, #fdcb6e 75%, #fd79a8 100%);
    --sidebar-bg: rgba(255, 255, 255, 0.95);
    --main-bg: #ffffff;
    --section-alt-bg: #f8f9fa;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --text-muted: #b2bec3;
    --accent-color: #6c5ce7;
    --accent-secondary: #00b894;
    --card-bg: #ffffff;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    --nav-hover-bg: rgba(108, 92, 231, 0.1);
    --skill-gradient: linear-gradient(45deg, #6c5ce7, #00b894);
    --hero-bg: linear-gradient(120deg, #e0eafc 0%, #cfdef3 100%);
    --hero-text: #222;
}

[data-theme="dark"] {
    --primary-bg: linear-gradient(135deg, #5f3dc4 0%, #339af0 25%, #12b886 50%, #fab005 75%, #e64980 100%);
    --sidebar-bg: rgba(40, 42, 54, 0.95);
    --main-bg: #282a36;
    --section-alt-bg: #44475a;
    --text-primary: #f8f8f2;
    --text-secondary: #c4c7d0;
    --text-muted: #8be9fd;
    --accent-color: #bd93f9;
    --accent-secondary: #50fa7b;
    --card-bg: #44475a;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    --nav-hover-bg: rgba(189, 147, 249, 0.2);
    --skill-gradient: linear-gradient(45deg, #bd93f9, #50fa7b);
    --hero-bg: linear-gradient(120deg, #232946 0%, #1a1a2e 100%);
    --hero-text: #f8f8f2;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1002;
    background: var(--card-bg);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    font-size: 1.2rem;
    color: var(--accent-color);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(180deg);
    background: var(--accent-color);
    color: var(--card-bg);
}

/* Navigation Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(15px);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease, background 0.3s ease;
    overflow: hidden; /* Prevent scrolling */
    display: flex;
    flex-direction: column;
}

.sidebar.mobile-hidden {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 1.2rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    margin: 0 auto 1rem;
    background-image: url('assets/img/profile.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    animation: pulse 2s ease-in-out infinite alternate;
    overflow: hidden;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.05);
    }
}

.sidebar-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-family: 'Agustina', cursive;
}

.sidebar-title {
    font-size: 1.0rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.nav-menu {
    padding: 0.5rem 0;
    flex-grow: 1;
}

.nav-item {
    display: block;
    padding: 0.7rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    font-size: 1rem;
}

.nav-item:hover,
.nav-item.active {
    background: var(--nav-hover-bg);
    color: var(--accent-color);
    border-left-color: var(--accent-color);
    transform: translateX(5px);
}

.nav-item i {
    width: 20px;
    margin-right: 1rem;
}

.social-links {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.social-links a {
    display: block;
    padding: 0.5rem 0.8rem;
    margin-bottom: 0.3rem;
    background: var(--nav-hover-bg);
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links a:hover {
    background: var(--accent-color);
    color: var(--card-bg);
    transform: translateX(5px) scale(1.02);
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--card-bg);
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1.2rem;
    color: var(--accent-color);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.mobile-toggle:hover {
    background: var(--accent-color);
    color: var(--card-bg);
}

/* Main Content */
.main-content {
    margin-left: 280px;
    background: var(--main-bg);
    min-height: 100vh;
    transition: all 0.3s ease;
}

.section {
    padding: 4rem 3rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section:nth-child(even) {
    background: var(--section-alt-bg);
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--skill-gradient);
    border-radius: 2px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hero-bg);
    position: relative;
    overflow: hidden;
    color: var(--hero-text);
    font-family: 'Montserrat', 'Segoe UI', 'Roboto', sans-serif;
    animation: fadeInBg 2s ease;
}

@keyframes fadeInBg {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, #74b9ff33 0%, transparent 60%),
        radial-gradient(circle at 70% 70%, #fdcb6e33 0%, transparent 60%);
    opacity: 0.7;
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 0 2rem;
    animation: fadeInUp 1.2s cubic-bezier(.77, 0, .175, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

.hero .section-title {
    color: var(--hero-text);
    font-size: 2.7rem;
    font-family: 'Montserrat', 'Segoe UI', 'Roboto', sans-serif;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: 1.2rem;
    background: none;
    -webkit-text-fill-color: unset;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #636e72;
    font-family: 'Montserrat', 'Segoe UI', 'Roboto', sans-serif;
    font-weight: 500;
    opacity: 0.95;
    animation: fadeInUp 1.8s cubic-bezier(.77, 0, .175, 1);
}

.hero-description {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: #636e72;
    opacity: 0.92;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    animation: fadeInUp 2.2s cubic-bezier(.77, 0, .175, 1);
}

.cta-button {
    background: linear-gradient(90deg, #6c5ce7 0%, #00b894 100%);
    color: #fff;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.12);
    transition: background 0.3s, transform 0.3s;
    display: inline-block;
    animation: fadeInUp 2.5s cubic-bezier(.77, 0, .175, 1);
}

.cta-button:hover {
    background: linear-gradient(90deg, #00b894 0%, #6c5ce7 100%);
    transform: translateY(-2px) scale(1.05);
}

/* About Section */
.about-content {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 900px;
    margin: 0 auto;
}

.about-content p {
    margin-bottom: 1.5rem;
}

.about-highlight {
    background: var(--skill-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.fun-fact {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid var(--accent-color);
    margin: 2rem 0;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.fun-fact:hover {
    transform: translateY(-5px) scale(1.02);
}

.fun-fact-title {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.emoji {
    font-size: 1.5rem;
    margin: 0 0.5rem;
}

/* Experience Timeline */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 2rem auto 0;
}

.timeline-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-color);
    transition: transform 0.3s ease;
}

.timeline-item:hover {
    transform: translateY(-5px) scale(1.02);
}

.timeline-item h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.timeline-item .company {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.timeline-item .duration {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.skill-category {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    border: 2px solid transparent;
}

.skill-category:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent-color);
}

.skill-category h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background: var(--skill-gradient);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
    font-weight: 500;
}

.skill-tag:hover {
    transform: scale(1.1) rotate(5deg);
}

.skill-tag i {
    font-size: 1.1rem;
}

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

.interest-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
    border: 2px solid transparent;
}

.interest-card:hover {
    transform: translateY(-5px) scale(1.05) rotate(2deg);
    border-color: var(--accent-secondary);
}

.interest-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--skill-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.interest-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Education Card */
.education-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 2rem auto 0;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.education-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent-color);
}

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

.education-card .company {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.education-card .duration {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Custom icons for specific technologies */
.icon-typescript::before {
    content: "TS";
    font-family: 'Segoe UI', sans-serif;
    font-weight: bold;
    font-size: 0.8em;
    background: #3178c6;
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
}

.icon-go::before {
    content: "Go";
    font-family: 'Segoe UI', sans-serif;
    font-weight: bold;
    font-size: 0.8em;
    background: #00add8;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
}

.icon-csharp::before {
    content: "C#";
    font-family: 'Segoe UI', sans-serif;
    font-weight: bold;
    font-size: 0.8em;
    background: #239120;
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Blinking Cursor Effect */
.blinking-cursor {
    font-weight: 600;
    font-size: 1.2em;
    color: var(--accent-color);
    margin-left: 2px;
    animation: blink 1s steps(2, start) infinite;
}

[data-theme="dark"] .blinking-cursor {
    color: var(--accent-secondary);
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-visible {
        transform: translateX(0);
    }

    .mobile-toggle {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .section {
        padding: 3rem 2rem;
    }

    .hero .section-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

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

    .theme-toggle {
        top: 1rem;
        right: 5rem;
    }
}

@media screen and (max-width: 768px) {
    .section {
        padding: 2rem 1rem;
    }

    .hero .section-title {
        font-size: 2.5rem;
        min-height: 4rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

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

    .skill-category {
        padding: 1.5rem;
    }

    .interests-grid {
        grid-template-columns: 1fr;
    }

    .theme-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media screen and (max-width: 700px) {
    .hero-content {
        padding: 0 0.5rem;
    }

    .hero .section-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }
}