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

:root {
    /* Palette colori tema scuro (default) */
    --primary-bg: #0f0f23;
    --secondary-bg: #1a1a2e;
    --accent-color: #00d4aa;
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    --card-bg: #1e293b;
    --border-color: #334155;

    /* Font */
    --font-primary: 'Inter', sans-serif;

    /* Spaziature */
    --section-padding-vertical: 100px;
    --section-padding-vertical-medium: 60px;
    --section-padding-vertical-small: 40px;
    --container-max-width: 1200px;
    --container-max-width-medium: 1000px;
    --container-padding: 0 20px;
}

/* Tema chiaro */
[data-theme="light"] {
    --primary-bg: #ffffff;
    --secondary-bg: #f8fafc;
    --accent-color: #00b894;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
}

/* Bottone generico */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-color);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn:hover {
    background: #00a085;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 170, 0.4);
}
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

html {
    scroll-behavior: smooth;
}

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

/* ===== NAVIGATION BAR FISSA ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 15, 28, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}
[data-theme="light"] .navbar {
    background: rgba(248, 250, 252, 0.95);
}
.navbar.scrolled {
    background: rgba(10, 15, 28, 0.98);
    padding: 10px 0;
}
[data-theme="light"] .navbar.scrolled {
    background: rgba(248, 250, 252, 0.98);
}
.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--container-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: max-width 0.3s ease;
}
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}
.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}
.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ===== SWITCH TEMA E CONTROLLI NAVBAR ===== */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 60px;
    height: 30px;
    position: relative;
    transition: all 0.3s ease;
}
.theme-toggle:hover {
    border-color: var(--accent-color);
}
.theme-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    border-radius: 50%;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: white;
}
[data-theme="light"] .theme-toggle-slider {
    transform: translateX(30px);
}

/* Menu mobile */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}
.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: #00a085;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 212, 170, 0.4);
}

/* ===== SEZIONI GENERALI ===== */
.section {
    padding: var(--section-padding-vertical) 0;
    position: relative;
}
.section.medium {
    padding: var(--section-padding-vertical-medium) 0;
}
.section.small {
    padding: var(--section-padding-vertical-small) 0;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--container-padding);
    transition: max-width 0.3s ease;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-primary);
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

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

/* Effetto particelle di sfondo */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(0, 212, 170, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 212, 170, 0.05) 0%, transparent 50%);
    pointer-events: none;
}
[data-theme="light"] .hero::before {
    background-image:
        radial-gradient(circle at 20% 80%, rgba(0, 184, 148, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 184, 148, 0.05) 0%, transparent 50%);
}

/* Layout flessibile: da 2 colonne a 1 colonna automaticamente */
.hero-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    align-items: center;
    width: 100%;
}

/* Sezione testo Hero */
.hero-text {
    z-index: 2;
}
.hero-text h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hero-text .name {
    color: var(--accent-color);
    display: block;
}

.hero-text .title {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-text .description {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Immagine profilo Hero */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}
.profile-image {
    width: clamp(180px, 15vw, 250px);
    height: clamp(180px, 15vw, 250px);
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-color), #00a085);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 212, 170, 0.3);
}
.profile-image::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: var(--secondary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-image img {
    position: absolute;
    inset: 8px;
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
}

/* Social links Hero */
.social-links {
    display: flex;
    gap: 1rem;
}
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}
.social-link:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 212, 170, 0.3);
}

/* ===== CARD STYLING PER SEZIONI ===== */
.card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-color);
}
[data-theme="light"] .card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}
.card h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}
.card .date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ...existing code... */
/* Resto del CSS rimane invariato per brevità */
/* ===== SEZIONE ISTRUZIONE ===== */
.education-item {
    margin-bottom: 2rem;
}
.education-item h3 {
    color: var(--accent-color);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}
.education-item .institution {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}
.education-item .date {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===== SEZIONE COMPETENZE ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.skill-category h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}
.skill-list {
    list-style: none;
}
.skill-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}
.skill-list li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 0.8rem;
}

/* ===== SEZIONE PROGETTI ===== */
.projects-container {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    padding: 20px 0; /* Aggiunge spazio per l'effetto hover */
}

.projects-slider {
    display: flex;
    transition: transform 0.5s ease;
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    padding: 1.5rem; /* Ridotto da 2rem */
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex: 0 0 calc(33.333% - 1.333rem);
    min-height: 350px; /* Ridotto da 400px */
    max-height: 380px; /* Altezza massima */
}

@media (max-width: 1024px) {
    .project-card {
        flex: 0 0 calc(50% - 1rem);
        min-height: 320px;
        max-height: 350px;
    }
}

@media (max-width: 768px) {
    .project-card {
        flex: 0 0 calc(100% - 0rem);
        min-height: 300px;
        max-height: 330px;
    }
    .projects-slider {
        gap: 1rem;
    }
}

[data-theme="light"] .project-card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
.project-card:hover {
    transform: translateY(-8px); /* Ridotto da -10px */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2); /* Ridotto shadow */
    border-color: var(--accent-color);
}
[data-theme="light"] .project-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}
.project-image {
    text-align: center;
    margin-bottom: 1rem; /* Ridotto da 1.5rem */
}
.project-image i {
    font-size: 2.5rem; /* Ridotto da 3rem */
    color: var(--accent-color);
    background: rgba(0, 212, 170, 0.1);
    padding: 1.2rem; /* Ridotto da 1.5rem */
    border-radius: 50%;
    border: 2px solid var(--accent-color);
}
.project-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.8rem; /* Ridotto da 1rem */
    font-size: 1.2rem; /* Ridotto da 1.4rem */
    line-height: 1.3;
}
.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem; /* Ridotto da 1.5rem */
    line-height: 1.4; /* Ridotto da 1.6 */
    font-size: 0.9rem; /* Ridotto da 0.95rem */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limita a 3 righe */
    line-clamp: 3; /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem; /* Ridotto da 0.5rem */
    margin-bottom: 1rem; /* Ridotto da 1.5rem */
}
.tech-tag {
    background: rgba(0, 212, 170, 0.1);
    color: var(--accent-color);
    padding: 0.25rem 0.6rem; /* Ridotto padding */
    border-radius: 15px; /* Ridotto da 20px */
    font-size: 0.75rem; /* Ridotto da 0.8rem */
    font-weight: 500;
    border: 1px solid var(--accent-color);
}
.project-github {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem; /* Ridotto da 0.5rem */
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.85rem; /* Ridotto da 0.9rem */
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
}
.project-github:hover {
    color: var(--accent-color);
}

/* Controlli dello slider */
.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.slider-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 45px; /* Ridotto da 50px */
    height: 45px; /* Ridotto da 50px */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem; /* Ridotto da 1.2rem */
}

.slider-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: scale(1.05); /* Ridotto da 1.1 */
}

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

/* Indicatori */
.slider-indicators {
    display: flex;
    gap: 0.4rem; /* Ridotto da 0.5rem */
    margin: 0 1rem;
}

.indicator {
    width: 10px; /* Ridotto da 12px */
    height: 10px; /* Ridotto da 12px */
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--accent-color);
    transform: scale(1.1); /* Ridotto da 1.2 */
}

/* Play/Pause button */
.autoplay-btn {
    background: var(--accent-color);
    border: none;
    color: white;
    width: 45px; /* Ridotto da 50px */
    height: 45px; /* Ridotto da 50px */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem; /* Ridotto da 1rem */
    margin-left: 1rem;
}

.autoplay-btn:hover {
    background: #00a085;
    transform: scale(1.05); /* Ridotto da 1.1 */
}

.autoplay-btn.paused {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* ===== SEZIONE CV SEMPLIFICATA ===== */
.cv-section {
    background: var(--secondary-bg);
}
.cv-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 2rem;
}
.cv-preview {
    background: var(--card-bg);
    border-radius: 20px;
    border: 2px solid var(--accent-color);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    max-width: 350px;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .cv-preview {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
.cv-preview:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 212, 170, 0.3);
    border-color: var(--text-primary);
}
[data-theme="light"] .cv-preview:hover {
    box-shadow: 0 25px 50px rgba(0, 184, 148, 0.2);
}
.cv-preview-image {
    width: 160px;
    height: 220px;
    background: linear-gradient(45deg, #ffffff, #f8f9fa);
    border-radius: 10px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .cv-preview-image {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.cv-preview-image::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}
.cv-preview-image::after {
    content: '';
    position: absolute;
    top: 35px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background: repeating-linear-gradient(
        transparent,
        transparent 8px,
        rgba(0, 212, 170, 0.1) 8px,
        rgba(0, 212, 170, 0.1) 10px
    );
}
.cv-preview-icon {
    font-size: 3rem;
    color: var(--accent-color);
    z-index: 2;
    position: relative;
}
.cv-preview h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}
.cv-preview p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.cv-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.cv-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-color);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
}
.cv-download-btn:hover {
    background: #00a085;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 170, 0.4);
}

/* Modal per visualizzazione CV a schermo intero */
.cv-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}
.cv-modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    margin: 5% auto;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.cv-modal-header {
    background: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cv-modal-close {
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.cv-modal-close:hover {
    opacity: 0.7;
}
.cv-modal-iframe {
    width: 100%;
    height: calc(100% - 70px);
    border: none;
}

/* ===== SEZIONE CONTATTI ===== */
.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.contact-info h3 {
    color: var(--accent-color);
    margin-bottom: 2rem;
    font-size: 1.5rem;
}
.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}
.contact-item i {
    color: var(--accent-color);
    font-size: 1.2rem;
    width: 20px;
}
.email-link {
    color: white !important;
    text-decoration: none;
}

.email-link:hover {
    color: #ccc;
    text-decoration: underline;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--secondary-bg);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}
.footer p {
    color: var(--text-muted);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1366px) {
    .nav-container {
        max-width: var(--container-max-width-medium);
    }
    .nav-menu {
        gap: 1.5rem;
    }
    .container {
        max-width: var(--container-max-width-medium);
    }
    .hero {
        padding-top: 140px;
    }
}

@media (max-width: 1200px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .hero-text h1 {
        font-size: clamp(2rem, 5vw, 3.5rem);
    }
    .hero-text .description {
        font-size: clamp(1rem, 3vw, 1.1rem);
        margin-bottom: 2rem;
        line-height: 1.6;
    }
    .section {
        padding: var(--section-padding-vertical-medium) 0;
    }
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .cv-preview {
        max-width: 300px;
    }
}

@media (max-width: 1024px) {
    .container {
        max-width: 800px;
    }
    .section {
        padding: var(--section-padding-vertical-medium) 0;
    }
    .cv-preview {
        max-width: 280px;
    }
    .cv-preview-image {
        width: 140px;
        height: 190px;
    }
    .hero-text {
        order: 2;
    }
    .hero-image {
        order: 1;
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--secondary-bg);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        border-top: 1px solid var(--border-color);
    }
    .nav-menu.active {
        display: flex;
    }
    .mobile-menu-toggle {
        display: flex;
    }
    .nav-controls {
        order: -1;
        margin-right: auto;
        margin-left: 1rem;
    }
    .hero-text {
        order: 2;
    }
    .hero-image {
        order: 1;
        margin-bottom: 1rem;
    }
    .hero-content {
        gap: 1.5rem;
    }
    .hero-text h1 {
        font-size: 2.5rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .profile-image {
        width: 180px;
        height: 180px;
    }
    .profile-image img {
        width: calc(100% - 16px);
        height: calc(100% - 16px);
    }
    .section {
        padding: var(--section-padding-vertical-small) 0;
    }
    .projects-grid,
    .skills-grid,
    .contact-content {
        grid-template-columns: 1fr;
    }
    .cv-modal-content {
        width: 95%;
        height: 95%;
        margin: 2.5% auto;
    }
    .cv-preview {
        max-width: 260px;
    }
    .cv-preview-image {
        width: 120px;
        height: 170px;
    }
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem;
    }
    .hero-text .title {
        font-size: 1.2rem;
    }
    .section {
        padding: 60px 0;
    }
    .container {
        padding: 0 15px;
    }
    .hero-text {
        order: 2;
    }
    .hero-image {
        order: 1;
        margin-bottom: 1rem;
    }
    .hero-text .description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    .card {
        padding: 1.25rem;
    }
    .project-card {
        padding: 1.5rem;
    }
    .contact-form {
        padding: 1.5rem;
    }
    .education-item h3,
    .skill-category h4,
    .project-content h3,
    .cv-preview h3 {
        font-size: 1.2rem;
    }
    .theme-toggle {
        width: 50px;
        height: 25px;
    }
    .theme-toggle-slider {
        width: 19px;
        height: 19px;
        font-size: 0.6rem;
    }
    [data-theme="light"] .theme-toggle-slider {
        transform: translateX(25px);
    }
}