* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 89vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, #1d2b3a, #0a0e17);
    font-family: 'Courier New', monospace;
    color: #c5d4e2;
    overflow-x: hidden;
    letter-spacing: 0.05em;
    transition: all 0.5s ease;
    position: relative;
}

.container {
    max-width: 987px;
    margin: 89px auto 0;
    padding: 21px;
    z-index: 1;
}

h1, h2, h3 {
    font-weight: 377;
    letter-spacing: -0.1em;
}

h1 {
    font-size: 3rem;
    margin-bottom: 21px;
    text-align: center;
}

h2 {
    font-size: 2rem;
    margin: 34px 0 13px;
}

h3 {
    font-size: 1rem;
    margin: 21px 0 8px;
}

p {
    margin-bottom: 13px;
    line-height: 1;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 21px;
    z-index: 2;
}

.menu-left {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 13px;
    padding-top: 34px;
    margin-left: 34px;
}

.menu-right {
    margin-left: auto; /* Spinge il menu-right verso destra */
    display: flex;
    align-items: center;
}

.menu-item {
    margin: 0 21px;
    text-decoration: none;
    color: #c5d4e2;
    position: relative;
    cursor: pointer;
}

.menu-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #c5d4e2;
    transition: width 0.3s ease;
}

.menu-item:hover::after {
    width: 89%;
}

.icon-container {
    display: flex;
    gap: 21px; 
}

.icon {
    width: 21px;
    height: 21px;
    margin: 0 13px;
    cursor: pointer;
    display: flex; 
    justify-content: center; 
    align-items: center; 
}

.icon svg {
    fill: #c5d4e2; 
    transition: fill 0.3s ease;
}

#themeToggle {
    margin-left: 89px; 
    width: 34px;
    height: 34px;
    background-color: #c5d4e2;
    border: none;
    cursor: pointer;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
}

a:hover, button:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.light-theme {
    background: radial-gradient(circle, #f0f0f0, #d3d3d3);
    color: #1d2b3a;
}

.light-theme .menu-item {
    color: #1d2b3a;
    text-decoration: none;
}

.light-theme .menu-item::after {
    background-color: #1d2b3a;
    text-decoration: none;
}

.light-theme #themeToggle {
    background-color: #1d2b3a;
}

.light-theme .icon svg {
    stroke: #1d2b3a;
    fill: #1d2b3a; 
} 

.light-theme #cursor {
    background-color: #1d2b3a;
}

.post-meta {
    font-size: 0.8rem;
    color: #96a1af;
    margin-bottom: 21px;
    text-align: center;
}

.article-image {
    width: 100%;
    height: 377px;
    background: url('https://via.placeholder.com/800x300') no-repeat center center;
    background-size: cover;
    margin-bottom: 21px;
    position: relative;
    overflow: hidden;
}

.article-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(29, 43, 58, 0.5), rgba(10, 14, 23, 0.5));
}

.highlight-box {
    background-color: rgba(197, 212, 226, 0.1);
    border-left: 4px solid #c5d4e2;
    padding: 13px;
    margin: 21px auto;  
}

.light-theme .highlight-box {
    background-color: rgba(102, 155, 188, 0.3);
    border-left-color: #1d2b3a;
}

#background-effect {
    position: fixed;
    top: 13%;
    left: 3%;
    width: 89%; 
    height: 55%;
    pointer-events: none;
    z-index: 0;
}

.dna-helix {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 233px;
    height: 233px;
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 15px;
        margin-top: 150px; 
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        width: 100%;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    .columns {
        display: flex;
        flex-direction: column;
    }

    .header {
        flex-direction: column;
        align-items: center;
        padding: 10px;
        background: radial-gradient(circle, #1d2b3a, #0a0e17);
    }

    .light-theme .header {
        background: radial-gradient(circle, #f0f0f0, #d3d3d3);
    }

    .menu-left {
        flex-direction: row;
        justify-content: center;
        width: 100%;
        margin-left: 0;
        padding-top: 10px;
        gap: 10px;
    }

    .menu-right {
        margin-top: 15px;
        width: 100%;
        justify-content: center;
    }

    .menu-item {
        margin: 0 10px;
        font-size: 0.9em;
    }

    .icon-container {
        gap: 15px;
    }

    .icon {
        width: 21px;
        height: 21px;
    }

    #themeToggle {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .menu-item {
        padding: 5px;
        margin: 5px;
    }

    .container {
        padding: 10px;
    }
}

body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

a {
    color: #8cd9e0; 
    text-decoration: none; 
    transition: color 0.3s ease, text-decoration 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

a:hover {
    color: #66b3ba; 
    text-decoration: underline; 
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.light-theme a {
    color: #1c7fcc;
}

.light-theme a:hover {
    color: #2C3C55;
    text-decoration: underline;
}

body:not(.light-theme) .menu-item {
    color: #c5d4e2;
}

body:not(.light-theme) .menu-item:hover {
    text-decoration: none;
}