:root {
    --bg-main: #050816;
    --bg-elevated: #0f172a;
    --bg-elevated-soft: #020617;
    --accent: #3b82f6;
    --accent-soft: rgba(59, 130, 246, 0.15);
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --border-subtle: #1f2937;
    --danger: #f97373;
    --radius-big: 18px;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.85);
    --transition-fast: 150ms ease-out;
    --transition-soft: 220ms ease-out;
    scroll-behavior: smooth;
}

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

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: radial-gradient(circle at top left, #1e293b 0, #020617 40%, #000 100%);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout base */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.4rem;
}

/* Header / Nav */
header {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(16px);
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.88), transparent);
    border-bottom: 1px solid rgba(31, 41, 55, 0.8);
}

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

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-circle {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #f97316, #facc15, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.9), 0 0 30px rgba(56, 189, 248, 0.3);
}

.logo-circle span {
    color: #0b1120;
}

.nav-title {
    display: flex;
    flex-direction: column;
}

.nav-title strong {
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

.nav-title span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    font-size: 0.9rem;
}

.nav-links a {
    position: relative;
    padding-bottom: 0.1rem;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.2rem;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #38bdf8, #6366f1);
    border-radius: 999px;
    transition: width var(--transition-soft);
}

.nav-links a:hover {
    color: #e5e7eb;
}

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

.nav-cta {
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    background: linear-gradient(to right, #3b82f6, #6366f1);
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    white-space: nowrap;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.6);
}

/* Hero */
.hero {
    padding: 3.5rem 0 2.5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.2fr);
    gap: 2.5rem;
    align-items: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    border: 1px solid rgba(55, 65, 81, 0.8);
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.25), rgba(15, 23, 42, 0.9));
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}

.hero-eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.8);
}

.hero-title {
    font-size: clamp(2.1rem, 4vw, 2.7rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 0.7rem;
}

.hero-title span {
    background: linear-gradient(to right, #38bdf8, #818cf8, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 0.98rem;
    color: var(--text-muted);
    max-width: 34rem;
    margin-bottom: 1.4rem;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.6rem;
}

.chip {
    font-size: 0.74rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-muted);
}

.chip--accent {
    border-color: rgba(59, 130, 246, 0.9);
    background: rgba(30, 64, 175, 0.35);
    color: #e5e7eb;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.btn-primary,
.btn-ghost {
    font-size: 0.86rem;
    font-weight: 500;
    border-radius: 999px;
    padding: 0.55rem 1.2rem;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.6), rgba(99, 102, 241, 0.6));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 10px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    top: 0;
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.7), rgba(99, 102, 241, 0.7));
    transform: translateY(-2px);
    box-shadow:
        0 8px 12px rgba(0, 0, 0, 0.15),
        0 15px 25px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 4px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-ghost {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    top: 0;
}

.btn-ghost:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(148, 163, 184, 0.5);
    color: #e5e7eb;
    transform: translateY(-2px);
    box-shadow:
        0 8px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-ghost:active {
    transform: translateY(2px);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-primary-icon {
    font-size: 1rem;
}

/* Hero card derecha */
.hero-card {
    background: radial-gradient(circle at top, rgba(59, 130, 246, 0.5), transparent 55%), var(--bg-elevated);
    border-radius: 24px;
    padding: 1.4rem 1.2rem;
    border: 1px solid rgba(51, 65, 85, 0.9);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.profile {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.profile-avatar {
    width: 62px;
    height: 62px;
    border-radius: 999px;
    background: #101e47;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: radial-gradient(circle at 30% 0%, #111827, #020617);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
    color: #e5e7eb;
}

.profile-meta span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.profile-meta strong {
    font-size: 0.95rem;
}

.profile-meta small {
    font-size: 0.74rem;
    color: var(--accent);
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    font-size: 0.78rem;
}

.metric {
    border-radius: 14px;
    padding: 0.6rem 0.45rem;
    border: 1px solid rgba(51, 65, 85, 0.9);
    background: rgba(15, 23, 42, 0.95);
}

.metric span {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.metric strong {
    font-size: 0.9rem;
}

.hero-github {
    font-size: 0.8rem;
    border-radius: 14px;
    padding: 0.65rem 0.6rem;
    background: rgba(15, 23, 42, 0.98);
    border: 1px dashed rgba(55, 65, 81, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-muted);
}

.hero-github span strong {
    color: #e5e7eb;
}

.hero-github a {
    font-size: 0.76rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 1);
    border: 1px solid rgba(55, 65, 81, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.hero-github a:hover {
    border-color: rgba(148, 163, 184, 0.9);
}

/* Secciones generales */
section {
    padding: 1.5rem 0 0.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
    gap: 1rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
}

.section-title span {
    width: 7px;
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(to bottom, #3b82f6, #a855f7);
}

.section-title h2 {
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: #9ca3af;
}

.section-subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Sobre mí */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.3fr);
    gap: 1.5rem;
}

.card {
    border-radius: var(--radius-big);
    background: var(--bg-elevated-soft);
    border: 1px solid var(--border-subtle);
    padding: 1.1rem 1.2rem;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.7);
    font-size: 0.9rem;
    color: var(--text-muted);
    position: relative;
    /* Ensure relative for absolute children */
    overflow: hidden;
    /* Clip background icon */
}

/* Enhanced About Me Card */
.about-card-enhanced {
    border-left: 3px solid var(--accent);
}

.about-card-bg-icon {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 180px;
    height: 180px;
    color: var(--accent);
    opacity: 0.03;
    /* Very subtle */
    pointer-events: none;
    z-index: 0;
    transform: rotate(-15deg);
}

.about-card-bg-icon svg {
    width: 100%;
    height: 100%;
}

.lead {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 1rem;
    position: relative;
    /* Ensure text is above icon */
    z-index: 1;
}

.card p {
    position: relative;
    z-index: 1;
}

.card p+p {
    margin-top: 0.5rem;
}

.list-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.7rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(51, 65, 85, 0.9);
    color: var(--text-muted);
}

.pill--highlight {
    border-color: rgba(59, 130, 246, 0.85);
    color: #e5e7eb;
    background: rgba(30, 64, 175, 0.4);
}

/* Experiencia */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.timeline-item {
    position: relative;
    padding-left: 1.4rem;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 0.45rem;
    top: 0.1rem;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, #3b82f6, transparent);
    opacity: 0.5;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 10px;
    height: 10px;
    justify-content: center;
}

.profile-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: radial-gradient(circle at 30% 0%, #111827, #020617);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
    color: #e5e7eb;
}

.profile-meta span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.profile-meta strong {
    font-size: 0.95rem;
}

.profile-meta small {
    font-size: 0.74rem;
    color: var(--accent);
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    font-size: 0.78rem;
}

.metric {
    border-radius: 14px;
    padding: 0.6rem 0.45rem;
    border: 1px solid rgba(51, 65, 85, 0.9);
    background: rgba(15, 23, 42, 0.95);
}

.metric span {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.metric strong {
    font-size: 0.9rem;
}

.hero-github {
    font-size: 0.8rem;
    border-radius: 14px;
    padding: 0.65rem 0.6rem;
    background: rgba(15, 23, 42, 0.98);
    border: 1px dashed rgba(55, 65, 81, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-muted);
}

.hero-github span strong {
    color: #e5e7eb;
}

.hero-github a {
    font-size: 0.76rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 1);
    border: 1px solid rgba(55, 65, 81, 0.9);
}

.hero-github a:hover {
    border-color: rgba(148, 163, 184, 0.9);
}

/* Secciones generales */
section {
    padding: 1.5rem 0 0.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
    gap: 1rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
}

.section-title span {
    width: 7px;
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(to bottom, #3b82f6, #a855f7);
}

.section-title h2 {
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: #9ca3af;
}

.section-subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Sobre mí */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.3fr);
    gap: 1.5rem;
}

.card {
    border-radius: var(--radius-big);
    background: var(--bg-elevated-soft);
    border: 1px solid var(--border-subtle);
    padding: 1.1rem 1.2rem;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.7);
    font-size: 0.9rem;
    color: var(--text-muted);
    position: relative;
    /* Ensure relative for absolute children */
    overflow: hidden;
    /* Clip background icon */
}

/* Enhanced About Me Card */
.about-card-enhanced {
    border-left: 3px solid var(--accent);
}

.about-card-bg-icon {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 180px;
    height: 180px;
    color: var(--accent);
    opacity: 0.03;
    /* Very subtle */
    pointer-events: none;
    z-index: 0;
    transform: rotate(-15deg);
}

.about-card-bg-icon svg {
    width: 100%;
    height: 100%;
}

.lead {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 1rem;
    position: relative;
    /* Ensure text is above icon */
    z-index: 1;
}

.card p {
    position: relative;
    z-index: 1;
}

.card p+p {
    margin-top: 0.5rem;
}

.list-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.7rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(51, 65, 85, 0.9);
    color: var(--text-muted);
}

.pill--highlight {
    border-color: rgba(59, 130, 246, 0.85);
    color: #e5e7eb;
    background: rgba(30, 64, 175, 0.4);
}

/* Experiencia */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.timeline-item {
    position: relative;
    padding-left: 1.4rem;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 0.45rem;
    top: 0.1rem;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, #3b82f6, transparent);
    opacity: 0.5;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #3b82f6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.9);
}

.timeline-role {
    font-size: 0.95rem;
    font-weight: 600;
}

.timeline-company {
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* --- Projects Carousel --- */
.carousel-container {
    position: relative;
    width: 100%;
}

.projects-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.projects-grid::-webkit-scrollbar {
    display: none;
}

.project-card {
    min-width: 85%;
    /* Mobile default */
    max-width: 85%;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 60%), #020617;
    padding: 1.2rem;
    gap: 0.8rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.8);
    transition: transform var(--transition-soft), box-shadow var(--transition-soft), border-color var(--transition-soft);
}

@media (min-width: 768px) {
    .project-card {
        min-width: 400px;
        max-width: 400px;
    }
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.9);
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.55);
}

/* Carousel Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(5px);
    z-index: 10;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.carousel-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.carousel-btn.prev {
    left: -20px;
}

.carousel-btn.next {
    right: -20px;
}

@media (max-width: 768px) {
    .carousel-btn {
        display: none;
    }
}

.project-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.project-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(51, 65, 85, 0.96);
    color: var(--text-muted);
}

.project-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px dashed rgba(30, 64, 175, 0.5);
}

.project-links {
    display: flex;
    gap: 0.5rem;
}

.link-pill {
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.7);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.link-pill:hover {
    border-color: var(--accent);
    color: #fff;
    background: rgba(59, 130, 246, 0.1);
}

/* Habilidades - Infinite Marquee */
.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    padding: 1rem 0;
}

.marquee-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

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

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

.skill-chip {
    font-size: 0.9rem;
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--text-main);
    white-space: nowrap;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-fast);
}

.skill-chip:hover {
    border-color: var(--accent);
}

.form-field label {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--text-muted);
}

.form-field input,
.form-field textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(51, 65, 85, 0.9);
    background: #020617;
    padding: 0.45rem 0.6rem;
    font-family: inherit;
    font-size: 0.82rem;
    color: var(--text-main);
    outline: none;
    transition: border-color var(--transition-soft), box-shadow var(--transition-soft), background var(--transition-soft);
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: rgba(59, 130, 246, 0.95);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.7);
    background: #020617;
}

.form-hint {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

footer {
    padding: 1.3rem 0 1.1rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(31, 41, 55, 0.9);
    margin-top: 2rem;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.footer-links a {
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(55, 65, 81, 0.9);
}

.footer-links a:hover {
    border-color: rgba(148, 163, 184, 0.9);
    color: #e5e7eb;
}

/* Animaciones simples */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

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

main {
    animation: fadeInUp 0.6s ease-out;
}

/* --- ICONS --- */
.skill-icon {
    width: 1.5em;
    height: 1.5em;
    margin-right: 0.5rem;
    fill: currentColor;
    vertical-align: middle;
}

.contact-icon {
    width: 1.5em;
    height: 1.5em;
    margin-right: 0.5rem;
    fill: var(--text-main);
    vertical-align: middle;
    transition: fill 0.3s ease;
}

.contact-list li:hover .contact-icon {
    fill: var(--accent);
}

/* Responsivo */
@media (max-width: 900px) {

    .hero-grid,
    .about-grid,
    .projects-grid,
    .skills-grid,
    .contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero {
        padding-top: 2.5rem;
    }

    .hero-card {
        order: -1;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(5, 8, 22, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        gap: 1.2rem;
        border-left: 1px solid rgba(59, 130, 246, 0.3);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 50;
        display: flex;
    }

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

    .nav-links a {
        font-size: 1.05rem;
        padding: 0.5rem 0;
        width: 100%;
        border-bottom: 1px solid rgba(31, 41, 55, 0.5);
    }

    .nav-links .cyber-toggle-wrapper {
        transform: scale(0.8) !important;
        margin: 0.5rem 0 !important;
    }

    .nav-links .nav-cta {
        margin-top: 0.5rem;
        text-align: center;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 700px) {
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .skills-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 500px) {
    .projects-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .skills-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* --- ENHANCED CONTACT SECTION --- */

/* Desktop Grid Layout */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2.5rem;
    align-items: start;
}

/* Contact List Cards */
.contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.contact-list li {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 16px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.contact-card-link {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1rem 1.2rem;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.contact-list li:hover {
    border-color: var(--accent);
    background: rgba(30, 64, 175, 0.15);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.contact-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.2s;
}

.contact-list li:hover::before {
    opacity: 1;
}

.contact-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    margin-bottom: 0.2rem;
}

.contact-value a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    display: block;
    word-break: break-all;
}

.contact-value a:hover {
    color: var(--accent);
}

/* Form Enhancements */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    background: rgba(15, 23, 42, 0.8);
}

/* Mobile Responsive Override */
@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-list li:hover {
        transform: none;
    }
}

/* --- HERO CARD ICONS --- */
.card-icon {
    width: 1em;
    height: 1em;
    color: var(--accent);
    opacity: 0.9;
    vertical-align: text-bottom;
}

.metric span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}






/* --- LIGHT MODE (Rich Slate & Indigo) --- */
.light-mode {
    /* Backgrounds with subtle blue tint */
    --bg-main: #f0f7ff;
    --bg-elevated: #ffffff;
    --bg-elevated-soft: #eef6ff;

    /* Text colors - Deep Slate instead of pure black */
    --text-main: #0f172a;
    /* Slate 900 */
    --text-muted: #475569;
    /* Slate 600 */

    /* Borders with blue hint */
    --border-subtle: #cbd5e1;
    /* Slate 300 */

    /* Shadows with blue tint */
    --shadow-soft: 0 4px 20px rgba(15, 23, 42, 0.08);

    /* Accent */
    --accent: #2563eb;
    /* Royal Blue */
    --accent-soft: rgba(37, 99, 235, 0.1);
}

/* GLOBAL OVERRIDES */
body.light-mode {
    /* Richer gradient background for light mode */
    background: radial-gradient(circle at top left, #dbeafe 0%, #eff6ff 50%, #ffffff 100%) !important;
    background-attachment: fixed !important;
    color: var(--text-main);
}

.light-mode header {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.light-mode .hero-card,
.light-mode .card,
.light-mode .project-card,
.light-mode .contact-list li {
    background: linear-gradient(145deg, #ffffff 0%, #e0f2fe 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 10px 30px -5px rgba(37, 99, 235, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.light-mode .hero-card:hover,
.light-mode .card:hover,
.light-mode .project-card:hover,
.light-mode .contact-list li:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    border-color: #94a3b8;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
}

/* Tooltip Fix for Light Mode */
.light-mode .icon-tooltip {
    color: #f1f5f9;
    /* Force light text */
    background-color: rgba(15, 23, 42, 0.95);
    /* Keep dark background */
    border-color: rgba(51, 65, 85, 0.9);
}

/* Metrics and secondary cards */
/* Metrics and secondary cards */
.light-mode .metric,
.light-mode .hero-github {
    background: linear-gradient(to bottom right, #f8fafc, #f1f5f9);
    border: 1px solid #cbd5e1;
    color: #0f172a;
    /* Force dark text */
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05);
}

.light-mode .hero-github strong {
    color: #0f172a;
    /* Ensure strong text is also dark */
}

/* Pills and Tags */
.light-mode .pill,
.light-mode .chip,
.light-mode .project-tag,
.light-mode .skill-chip {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-main);
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.light-mode .chip--accent,
.light-mode .pill--highlight {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #bfdbfe;
    color: #1e40af;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

/* Inputs */
.light-mode .form-field input,
.light-mode .form-field textarea {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-main);
}

.light-mode .form-field input:focus,
.light-mode .form-field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Buttons */
.light-mode .btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
}

.light-mode .btn-ghost:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

/* Profile Avatar */
.light-mode .profile-avatar-inner {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

/* Icons */
.light-mode .contact-icon {
    fill: var(--text-muted);
}

.light-mode .card-icon {
    color: var(--accent);
}

/* Typography Overrides */
.light-mode h1,
.light-mode h2,
.light-mode h3,
.light-mode strong {
    color: #0f172a;
    /* Deep Slate */
}

.light-mode .hero-subtitle {
    color: #334155;
    /* Slate 700 */
}

.light-mode a:hover {
    color: var(--accent);
}

/* GitHub Button */
.light-mode .hero-github a {
    background: #0f172a;
    color: #ffffff;
    border: none;
}

.light-mode .hero-github a:hover {
    background: #1e293b;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

/* Hero Eyebrow Light Mode Override */
.light-mode .hero-eyebrow {
    background: #eff6ff;
    /* Blue 50 */
    border-color: #bfdbfe;
    /* Blue 200 */
    color: #1e40af;
    /* Blue 800 */
    box-shadow: none;
}

/* Profile Avatar Image */
.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}

/* Profile Photo Improvements */
.profile {
    flex-direction: column;
    text-align: center;
    gap: 1.2rem;
}

.profile-avatar {
    width: 140px;
    /* Increased from 62px */
    height: 140px;
    margin: 0 auto;
    /* Center horizontally */
    padding: 4px;
    /* Slightly thicker border gap */
}

.profile-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.profile-meta span[style*="display:flex"] {
    justify-content: center;
}

/* Adjust hero card to accommodate larger content */
.hero-card {
    gap: 1.5rem;
    padding-top: 2rem;
}

/* Project Thumbnails */
.project-card {
    padding: 0;
    /* Remove padding to let image bleed */
    overflow: hidden;
    /* Clip image corners */
    gap: 0;
    /* Reset gap */
}

.project-thumbnail {
    width: 100%;
    height: 160px;
    background: #e2e8f0;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-thumbnail img {
    transform: scale(1.05);
}

.project-content {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
}

/* Adjustments for content inside card */
.project-label {
    margin-bottom: 0.4rem;
    display: inline-block;
}

.project-tags {
    margin: 0.5rem 0;
}

/* Fix GitHub button alignment */
.hero-github a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Shiny GitHub Button */
.github-shiny-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    background-color: #000;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.github-shiny-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
    box-shadow: 0 0 0 2px #000, 0 0 0 4px rgba(255, 255, 255, 0.8);
}

.shiny-element {
    position: absolute;
    right: 0;
    top: -3rem;
    height: 8rem;
    width: 2rem;
    transform: translateX(3rem) rotate(12deg);
    background-color: #fff;
    opacity: 0.1;
    transition: all 1s ease-out;
    pointer-events: none;
}

.github-shiny-btn:hover .shiny-element {
    transform: translateX(-15rem) rotate(12deg);
}


/* Shiny Effect Modifications */
.btn-primary,
.btn-ghost,
.nav-cta {
    position: relative;
    overflow: hidden;
}

.btn-primary:hover .shiny-element,
.btn-ghost:hover .shiny-element,
.nav-cta:hover .shiny-element {
    transform: translateX(-15rem) rotate(12deg);
}

/* Custom Send Button */
.btn-send {
    font-family: inherit;
    font-size: 1rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 0.7em 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.btn-send:hover {
    transform: translateY(-3px);
    box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.3);
}

.btn-send:active {
    transform: scale(0.95);
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-send span {
    display: block;
    margin-left: 0.4em;
    transition: all 0.3s;
}

.btn-send svg {
    width: 18px;
    height: 18px;
    fill: white;
    transition: all 0.3s;
}

.btn-send .svg-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    margin-right: 0.5em;
    transition: all 0.3s;
}

.btn-send:hover .svg-wrapper {
    background-color: rgba(255, 255, 255, 0.5);
}

.btn-send:hover svg {
    transform: rotate(45deg);
}

.btn-send:hover .shiny-element {
    transform: translateX(-20rem) rotate(12deg);
}


/* Icon Tooltip Buttons */
.icon-btn-group {
    position: relative;
    display: inline-block;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.2s ease;
}

.icon-btn:hover {
    transform: scale(1.25);
    color: #3b82f6;
}

.icon-btn svg {
    width: 1.7rem;
    height: 1.7rem;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) scale(0);
    transform-origin: bottom center;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    background-color: rgba(15, 23, 42, 0.95);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 20;
    white-space: nowrap;
    pointer-events: none;
    margin-bottom: 0.5rem;
    backdrop-filter: blur(4px);
}

.icon-btn-group:hover .icon-tooltip {
    transform: translateX(-50%) scale(1);
}

/* Cyber Toggle */
.cyber-toggle-wrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 15px;
}

.cyber-toggle-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cyber-toggle {
    position: relative;
    display: inline-block;
    width: 64px;
    height: 32px;
    cursor: pointer;
}

.cyber-toggle-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.5),
        inset 0 0 4px rgba(0, 0, 0, 0.8);
    transition: all 0.4s cubic-bezier(0.3, 1.5, 0.7, 1);
}

.cyber-toggle-track::before {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 14px;
    background: #222;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
    z-index: 0;
    transition: all 0.4s ease;
}

.cyber-toggle-track-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    opacity: 0;
    border-radius: 16px;
    z-index: 1;
    transition: all 0.4s ease;
}

.cyber-toggle-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    background: #151515;
    border-radius: 50%;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.3, 1.5, 0.7, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.cyber-toggle-thumb-shadow {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
            rgba(255, 255, 255, 0.1),
            transparent 70%);
    z-index: 1;
}

.cyber-toggle-thumb-highlight {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 70% 70%,
            rgba(0, 0, 0, 0.2),
            transparent 70%);
    z-index: 1;
}

.cyber-toggle-thumb-icon {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    opacity: 0.7;
    transition:
        opacity 0.4s ease,
        transform 0.4s ease;
}

.cyber-toggle-thumb-icon svg {
    width: 14px;
    height: 14px;
    fill: #555;
    transition:
        fill 0.4s ease,
        transform 0.4s ease;
}

.cyber-toggle-track-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 10px;
    z-index: 1;
}

.cyber-toggle-track-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #444;
    margin-left: 3px;
    opacity: 0.5;
    transition: all 0.4s ease;
}

.cyber-toggle-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.cyber-toggle-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #3b82f6;
    border-radius: 50%;
    opacity: 0;
    filter: blur(1px);
    transition: all 0.3s ease;
    box-shadow: 0 0 4px rgba(59, 130, 246, 0.8);
}

.cyber-toggle-particle:nth-child(1) {
    top: 15%;
    right: 20%;
}

.cyber-toggle-particle:nth-child(2) {
    top: 45%;
    right: 30%;
}

.cyber-toggle-particle:nth-child(3) {
    top: 25%;
    right: 40%;
}

.cyber-toggle-particle:nth-child(4) {
    top: 60%;
    right: 15%;
}

.cyber-toggle-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.cyber-toggle-label-off {
    color: #555;
    transition: all 0.4s ease;
}

.cyber-toggle-label-on {
    color: #555;
    transition: all 0.4s ease;
}

/* Stati attivi */
.cyber-toggle-checkbox:checked+.cyber-toggle .cyber-toggle-track-glow {
    opacity: 0.5;
}

.cyber-toggle-checkbox:checked+.cyber-toggle .cyber-toggle-thumb {
    left: calc(100% - 28px);
    background: #222;
}

.cyber-toggle-checkbox:checked+.cyber-toggle .cyber-toggle-thumb-icon {
    transform: rotate(360deg);
}

.cyber-toggle-checkbox:checked+.cyber-toggle .cyber-toggle-thumb-icon svg {
    fill: #3b82f6;
}

.cyber-toggle-checkbox:checked+.cyber-toggle .cyber-toggle-track-dot {
    background: #3b82f6;
    box-shadow: 0 0 4px #3b82f6;
    opacity: 1;
}

.cyber-toggle-checkbox:checked~.cyber-toggle-labels .cyber-toggle-label-on {
    color: #3b82f6;
    text-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
}

.cyber-toggle-checkbox:not(:checked)~.cyber-toggle-labels .cyber-toggle-label-off {
    color: #aaa;
}

/* Animazione particelle quando attivo */
.cyber-toggle-checkbox:checked+.cyber-toggle .cyber-toggle-particle {
    opacity: 1;
    animation: cyber-toggle-float 3s infinite alternate;
}

.cyber-toggle-checkbox:checked+.cyber-toggle .cyber-toggle-particle:nth-child(1) {
    animation-delay: 0s;
}

.cyber-toggle-checkbox:checked+.cyber-toggle .cyber-toggle-particle:nth-child(2) {
    animation-delay: 0.5s;
}

.cyber-toggle-checkbox:checked+.cyber-toggle .cyber-toggle-particle:nth-child(3) {
    animation-delay: 1s;
}

.cyber-toggle-checkbox:checked+.cyber-toggle .cyber-toggle-particle:nth-child(4) {
    animation-delay: 1.5s;
}

/* Effetto hover */
.cyber-toggle:hover .cyber-toggle-track::before {
    background: #272727;
}

.cyber-toggle:hover .cyber-toggle-thumb {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.cyber-toggle-checkbox:checked+.cyber-toggle:hover .cyber-toggle-track-glow {
    opacity: 0.7;
}

/* Effetto focus per accessibilità */
.cyber-toggle-checkbox:focus+.cyber-toggle {
    outline: none;
}

.cyber-toggle-checkbox:focus+.cyber-toggle::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 20px;
    border: 2px solid rgba(59, 130, 246, 0.5);
    opacity: 0.5;
}

@keyframes cyber-toggle-float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }

    100% {
        transform: translateY(0);
    }
}

/* Status Indicators */
.project-status-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.status-dot--red {
    background-color: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.status-dot--green {
    background-color: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

/* --- Hamburger Menu Button --- */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid rgba(55, 65, 81, 0.6);
    border-radius: 8px;
    cursor: pointer;
    padding: 7px;
    transition: border-color 0.2s ease;
    z-index: 60;
}

.nav-hamburger:hover {
    border-color: var(--accent);
}

.nav-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 900px) {
    .nav-hamburger {
        display: flex;
    }
}

/* Light mode hamburger */
.light-mode .nav-hamburger span {
    background: #0f172a;
}

.light-mode .nav-links.nav-open {
    background: rgba(240, 247, 255, 0.98);
    border-left-color: rgba(59, 130, 246, 0.2);
}

.light-mode .nav-links.nav-open a {
    border-bottom-color: rgba(203, 213, 225, 0.5);
}