/* ==================================================
   StarArchive
   Kim Yoon Sik Personal Website
   base.css — Base styles, Navigation, Global Components
   ================================================== */


/* ==================================================
   Base
   ================================================== */

* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {

    margin: 0;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Noto Sans SC",
        "PingFang SC",
        "Microsoft YaHei",
        sans-serif;

    color: #102a43;

    background: #eaf4fb;

    -webkit-font-smoothing: antialiased;
}



/* ==================================================
   Navigation
   ================================================== */

.navbar {

    height: 76px;

    padding: 0 7%;

    display: flex;

    align-items: center;

    justify-content: space-between;

    background: rgba(255, 255, 255, 0.94);

    border-bottom: 1px solid #d4e5f2;

    position: sticky;

    top: 0;

    z-index: 100;

    backdrop-filter: blur(10px);
}


/* Logo */

.logo {

    width: 38px;

    height: 38px;

    display: flex;

    align-items: center;

    justify-content: center;

    border: 1px solid #173f5f;

    border-radius: 50%;

    color: #173f5f;

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 1px;

    transition:
        background 0.3s ease,
        color 0.3s ease;
}


.logo:hover {

    background: #173f5f;

    color: white;
}



/* Navigation */

nav {

    display: flex;

    align-items: center;

    gap: 34px;
}


nav a {

    display: flex;

    flex-direction: column;

    gap: 3px;

    color: #173f5f;

    text-decoration: none;

    font-size: 13px;

    letter-spacing: 1px;

    transition: color 0.3s ease;
}


nav a span {

    font-size: 8px;

    letter-spacing: 1.5px;

    color: #7396b3;

    transition: color 0.3s ease;
}


nav a:hover {

    color: #3f82b5;
}


nav a:hover span {

    color: #3f82b5;
}



/* ==================================================
   General Sections
   ================================================== */

.timeline-section,
.about-section {

    max-width: 1050px;

    margin: 0 auto;

    padding: 130px 40px;
}



/* ==================================================
   Section Title
   ================================================== */

.section-title p {

    margin: 0;

    font-size: 10px;

    letter-spacing: 4px;

    color: #6d94ae;
}


.section-title p span {

    margin-left: 10px;

    font-size: 0.9em;

    letter-spacing: 1px;

    color: #82a2b7;
}


.section-title h2 {

    margin: 15px 0 0;

    font-size: 50px;

    line-height: 1.2;

    color: #173f5f;

    letter-spacing: -2px;
}


.section-title h2 span {

    margin-left: 12px;

    font-size: 16px;

    font-weight: 400;

    color: #82a2b7;

    letter-spacing: 1px;
}



/* ==================================================
   Footer
   ================================================== */

footer {

    min-height: 120px;

    padding: 20px 7%;

    display: flex;

    align-items: center;

    justify-content: space-between;

    background: #173f5f;

    color: white;

}


/* Official Contact */

.footer-contact {

    display: flex;

    align-items: baseline;

    gap: 28px;

}


/* OFFICIAL */

.footer-label {

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 2px;

    white-space: nowrap;
}


/* Email */

.footer-contact a {

    color: white;

    font-size: 11px;

    font-weight: 400;

    letter-spacing: 0.5px;

    opacity: 0.75;

    transition:
        opacity 0.3s ease;
}


.footer-contact a + a {

    margin-left: 18px;

}


.footer-contact a:hover {

    opacity: 1;

}


/* Copyright */

.footer-copyright {

    font-size: 10px;

    letter-spacing: 1px;

    opacity: 0.65;

}



/* ==================================================
   Selection
   ================================================== */

::selection {

    background: #a9c8dc;

    color: #173f5f;
}



/* ==================================================
   Navigation Active State
   ================================================== */

nav a.active {

    color: #3f82b5;

}


nav a.active span {

    color: #3f82b5;

}



/* ==================================================
   Music Button
   ================================================== */

.music-button {

    position: fixed;

    right: 35px;

    bottom: 35px;

    width: 46px;

    height: 46px;

    border: 1px solid rgba(255, 255, 255, 0.5);

    border-radius: 50%;

    background: rgba(23, 63, 95, 0.75);

    color: white;

    font-size: 18px;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    backdrop-filter: blur(8px);

    transition:
        background 0.3s ease,
        transform 0.3s ease;
}


.music-button:hover {

    background: #2d628a;

    transform: scale(1.08);
}


.music-button.playing {

    animation: musicPulse 2s infinite;
}


@keyframes musicPulse {

    0% {

        box-shadow:
            0 0 0 0 rgba(255, 255, 255, 0.25);

    }

    70% {

        box-shadow:
            0 0 0 8px rgba(255, 255, 255, 0);

    }

    100% {

        box-shadow:
            0 0 0 0 rgba(255, 255, 255, 0);

    }

}



/* ==================================================
   Enter Screen
   ================================================== */

.enter-screen {

    position: fixed;

    inset: 0;

    z-index: 9999;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #173f5f;

    color: white;

    opacity: 1;

    visibility: visible;

    transition:
        opacity 0.9s ease,
        visibility 0.9s ease;
}


.enter-screen.hidden {

    opacity: 0;

    visibility: hidden;

    pointer-events: none;
}


.enter-content {

    text-align: center;

    animation:
        enterFadeIn 1.2s ease forwards;
}


.enter-label {

    margin: 0 0 28px;

    font-size: 9px;

    letter-spacing: 5px;

    color: rgba(255, 255, 255, 0.55);
}


.enter-content h1 {

    margin: 0;

    font-size: clamp(45px, 7vw, 90px);

    line-height: 0.95;

    letter-spacing: -3px;

    font-weight: 600;
}


.enter-content h1 span {

    display: block;

    margin-top: 5px;
}


.enter-button {

    margin-top: 60px;

    padding: 15px 30px;

    border: 1px solid rgba(255, 255, 255, 0.55);

    background: transparent;

    color: white;

    cursor: pointer;

    font-family: inherit;

    font-size: 10px;

    letter-spacing: 4px;

    transition:
        background 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease;
}


.enter-button span {

    margin-left: 8px;

    font-size: 9px;

    letter-spacing: 1px;

    opacity: 0.65;
}


.enter-button:hover {

    background: white;

    color: #173f5f;

    transform: translateY(-2px);
}


@keyframes enterFadeIn {

    from {

        opacity: 0;

        transform: translateY(20px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}



/* ==================================================
   Page Transition
   ================================================== */

.page-wrapper {

    opacity: 1;

    transform: translateY(0);

    transition:
        opacity 0.45s ease,
        transform 0.45s ease;

}


.page-wrapper.page-exit {

    opacity: 0;

    transform: translateY(12px);

}


.page-wrapper.page-enter {

    animation:
        pageFadeIn 0.55s ease forwards;

}


@keyframes pageFadeIn {

    from {

        opacity: 0;

        transform: translateY(12px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}
