/* === Base === */
body {
    background-color: #0d0d0d;
    overflow: hidden;
}

/* === CRT scanlines overlay === */
body::before {
    content: "";
    display: block;
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.18) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    z-index: 1000;
}

/* === Title === */
.site-title {
    font-family: 'Handjet', monospace;
    font-size: clamp(2.5rem, 8vw, 7rem);
    font-weight: 300;
    letter-spacing: 0.12em;
    color: #cce8b0;
    text-transform: uppercase;
    animation: chromatic 5s ease-in-out infinite;
    user-select: none;
    margin: 0;
}

@keyframes chromatic {
    0%   { text-shadow:  0.4px 0 1px rgba(0, 30, 255, 0.35), -0.4px 0 1px rgba(255, 0, 80, 0.2), 0 0 6px rgba(180, 255, 130, 0.1); }
    25%  { text-shadow:  2.8px 0 1px rgba(0, 30, 255, 0.35), -2.8px 0 1px rgba(255, 0, 80, 0.2), 0 0 6px rgba(180, 255, 130, 0.1); }
    50%  { text-shadow:  0.1px 0 1px rgba(0, 30, 255, 0.35), -0.1px 0 1px rgba(255, 0, 80, 0.2), 0 0 6px rgba(180, 255, 130, 0.1); }
    75%  { text-shadow:  1.9px 0 1px rgba(0, 30, 255, 0.35), -1.9px 0 1px rgba(255, 0, 80, 0.2), 0 0 6px rgba(180, 255, 130, 0.1); }
    100% { text-shadow:  0.4px 0 1px rgba(0, 30, 255, 0.35), -0.4px 0 1px rgba(255, 0, 80, 0.2), 0 0 6px rgba(180, 255, 130, 0.1); }
}

/* === Nav links === */
.nav-link-item {
    font-family: 'Handjet', monospace;
    font-size: clamp(1.2rem, 3vw, 2.2rem);
    font-weight: 300;
    color: #8fba78;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    user-select: none;
    transition: opacity 200ms ease, color 200ms ease;
}

nav:has(.fancy:hover) .nav-link-item:not(:hover) {
    opacity: 0.2;
}

/* === Letter-split hover animation === */
.fancy > .letter {
    display: inline-block;
    transition: transform 350ms ease;
}

.fancy:hover > .letter {
    transition-duration: 600ms;
}

.fancy:hover > .letter:nth-child(1)  { transform: translate(-35%,  18%) rotate( 12deg); }
.fancy:hover > .letter:nth-child(2)  { transform: translate( 20%, -14%) rotate(-10deg); }
.fancy:hover > .letter:nth-child(3)  { transform: translate(-30%,  10%) rotate( 18deg); }
.fancy:hover > .letter:nth-child(4)  { transform: translate( 12%, -20%) rotate(-14deg); }
.fancy:hover > .letter:nth-child(5)  { transform: translate(-25%,  15%) rotate( 22deg); }
.fancy:hover > .letter:nth-child(6)  { transform: translate( 18%, -12%) rotate(-17deg); }
.fancy:hover > .letter:nth-child(7)  { transform: translate(-22%,  12%) rotate( 15deg); }
.fancy:hover > .letter:nth-child(8)  { transform: translate( 15%, -10%) rotate(-20deg); }

/* === Contact button (reset <button> defaults) === */
button.nav-link-item {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

/* === Quotes panel === */
#quotes-panel {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: min(440px, 90vw);
    background-color: #111;
    border: 1px solid rgba(143, 186, 120, 0.4);
    padding: 1.6rem 2.2rem 1.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 490;
    text-align: center;
}

#quotes-panel.open {
    transform: translateX(-50%) translateY(0);
}

#quotes-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: #8fba78;
    font-family: 'Handjet', monospace;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    opacity: 0.6;
    transition: opacity 150ms ease;
}

#quotes-close:hover {
    opacity: 1;
}

.quotes-text {
    font-family: 'Handjet', monospace;
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
    font-weight: 300;
    color: #cce8b0;
    letter-spacing: 0.06em;
    line-height: 1.55;
    margin: 0;
    transition: opacity 300ms ease;
}

.quotes-author {
    font-family: 'Handjet', monospace;
    font-size: clamp(0.8rem, 1.8vw, 0.95rem);
    font-weight: 300;
    color: rgba(143, 186, 120, 0.55);
    letter-spacing: 0.1em;
    margin: 0;
    min-height: 1.2em;
    transition: opacity 300ms ease;
}

/* === Contact panel === */
#contact-panel {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: min(360px, 90vw);
    background-color: #111;
    border: 1px solid #8fba78;
    border-bottom: none;
    padding: 2rem 2.5rem 1.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 500;
}

#contact-panel.open {
    transform: translateX(-50%) translateY(0);
}

#contact-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: #8fba78;
    font-family: 'Handjet', monospace;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    opacity: 0.6;
    transition: opacity 150ms ease;
}

#contact-close:hover {
    opacity: 1;
}

.contact-name {
    font-family: 'Handjet', monospace;
    font-size: 1.3rem;
    font-weight: 300;
    color: #cce8b0;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0;
}

.contact-email {
    font-family: 'Handjet', monospace;
    font-size: 1.1rem;
    font-weight: 300;
    color: #8fba78;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: opacity 150ms ease;
}

.contact-email:hover {
    opacity: 0.7;
}
