/* ----------------------------
   Base Styles
---------------------------- */
html, body {
    height: 100dvh;
    overflow: hidden;
    margin: 0;
    font-family: 'Lato', Arial, sans-serif;
    text-align: center;
    background-color: rgb(0, 0, 0);
    color: #ffffff;
}

body {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

body > img {
    justify-self: center;
    align-self: center;
    margin-top: 5vh;
    height: auto;
    width: auto;
    max-width: calc(100% - 40px);
    max-height: 80vh;
}

/* ----------------------------
   Canvas
---------------------------- */
.shootingStarsCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    color: rgba(255, 255, 255, 1);
    z-index: -2;
}

/* ----------------------------
   Container
---------------------------- */
.container {
    width: 60%;
    max-width: 800px;
    height: calc(100% - 20px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background-color: rgb(24, 24, 24);
    padding: 20px;
    z-index: 1;
    position: absolute;
    box-sizing: border-box;
    overflow: auto;
    border-radius: 8px;
}

/* ----------------------------
   Typography
---------------------------- */
h1, h2, p, input {
    border: none;
    display: block;
    width: calc(100% - 40px);
    margin: 10px auto;
    font-family: 'Lato', sans-serif;
    box-sizing: border-box;
    border-radius: 8px;
}

h1 {
    background-color: rgb(6, 6, 6);
    color: rgb(232, 232, 232);
    padding: 10px 20px;
    font-size: 2rem;
}

h2 {
    background-color: rgb(6, 6, 6);
    color: rgb(232, 232, 232);
    padding: 10px 20px;
    font-size: 1rem;
}

p {
    background-color: rgb(17, 17, 17);
    color: rgb(232, 232, 232);
    padding: 10px 20px;
    font-size: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

input {
     background-color: rgb(6, 6, 6);
    color: rgb(232, 232, 232);
    padding: 10px 20px;
    font-size: 1rem;
}

/* ----------------------------
   Lists
---------------------------- */
ul, ol {
    background-color: rgb(17, 17, 17);
    color: rgb(232, 232, 232);
    padding: 10px 20px;
    margin: 10px auto;
    width: calc(100% - 40px);
    box-sizing: border-box;
    border-radius: 8px;

    text-align: center;
    list-style-position: inside;
    font-size: 1rem;
}

li {
    margin: 5px 0;
}

/* ----------------------------
   Buttons & Links
---------------------------- */
button, a, .button-container button {
    transition: transform 0.2s ease, color 0.2s ease;
    font-family: 'Lato', sans-serif;
}

button {
    background-color: rgb(6, 6, 6);
    color: rgb(232, 232, 232);
    border: none;
    padding: 10px 20px;
    display: inline-block;
    margin: 5px;
    border-radius: 8px;
}

button:hover, #selected {
    background-color: rgb(40, 40, 40);
    transform: scale(1.05);
}

button:active {
    transform: scale(0.95);
    box-shadow: 0 0 5px rgba(0,0,0,0.2) inset;
}

a {
    display: inline-block;
    color: rgb(0, 140, 255);
}

a:hover {
    color: rgb(0, 120, 218);
    transform: scale(1.05);
}

a:active {
    transform: scale(0.95);
    box-shadow: 0 0 5px rgba(0,0,0,0.2) inset;
}

.easter-egg-hyperlink {
    color: rgb(232, 232, 232);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    font-family: 'Lato', sans-serif;
}

.easter-egg-hyperlink:hover {
    color: rgb(232, 232, 232);
    text-decoration: none;
    transform: scale(1.02);
}

strong {
    font-weight: 700;
}

em {
    font-style: italic;
}

strong em {
    font-weight: 700;
    font-style: italic;
}

button:hover, a:hover, .project-card:hover .easter-egg-hyperlink:hover .button-container button:hover {
    cursor: pointer
}

#selected {
    cursor: not-allowed;
}

/*-----------------------------
   Easter Eggs
---------------------------- */

#java-easter-egg-notification {
    position: fixed;
    bottom: 20px;
    right: -600px;
    width: 450px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border-radius: 6px;
    transition: right 0.2s ease-out;
    z-index: 999999999;
    background: transparent;
    overflow: hidden;
}

#java-easter-egg-notification.show {
    right: 20px;
}

#java-easter-egg-notification img {
    width: 100%;
}

#java-easter-egg-notification .close-btn {
    position: absolute;
    top: 20px;
    right: 22px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0;
}

/* ----------------------------
   Button Containers
---------------------------- */
.button-container {
    background-color: rgb(6, 6, 6);
    display: flex;
    justify-content: center;
    align-items: center;
    width: calc(100% - 40px);
    margin: 5px auto;
    box-sizing: border-box;
    flex-wrap: wrap;
    border-radius: 8px;
}

.button-container button {
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
}

/* ----------------------------
   Projects Section
---------------------------- */
.projects-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px 0;
    align-items: center;
}

.project-card {
    display: flex;
    width: calc(100% - 40px);
    background-color: rgb(6, 6, 6);
    border-radius: 8px;
    transition: transform 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    transform: scale(1.02);
    text-decoration: none;
}

.project-tag,
.project-card:hover .project-tag {
    color: rgb(232, 232, 232);
}

.project-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    margin: auto;
    flex-shrink: 0;
    border-radius: 8px;
}

.project-text {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1;
    padding: 10px 20px;
    text-align: left;
}

.project-title {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: rgb(232, 232, 232);
}

.project-description {
    margin-bottom: 5px;
    font-size: 1rem;
    word-wrap: break-word;
    color: rgb(232, 232, 232);
}

.project-meta {
    display: flex;
    align-items: center;
    margin-top: auto;
    gap: 10px;
    flex-wrap: wrap;
}

.project-date {
    font-size: 0.75rem;
    color: rgb(170,170,170);
    white-space: nowrap;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.project-tag {
    background-color: rgb(17,17,17);
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.7rem;
    line-height: 1.2;
}

/* ----------------------------
   Daily Song
---------------------------- */
#daily-song {
    background-color: rgb(17, 17, 17);
    padding: 10px 20px;
    margin: 10px auto;
    width: calc(100% - 40px);
    box-sizing: border-box;
    border-radius: 8px;
}

#daily-song iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 6px;
    margin-top: 10px;
    margin-bottom: 5px;
}

/* ----------------------------
   Animations
---------------------------- */
@keyframes fadeSlideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0px);
        opacity: 1;
    }
}

/* ----------------------------
   Portrait Mode UI
---------------------------- */
@media screen and (max-width: 680px) {
    body {
        flex-direction: column;
        align-items: stretch;
        overflow-y: auto;
    }

    .container {
        width: 100%;
        padding: 10px;
        border-radius: 0px;
        height: 100dvh;
    }

    h1 {
        font-size: 1.3rem;
    }

    h2, p, button {
        font-size: 0.8rem;
        padding: 8px 15px;
    }

    .project-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: calc(100% - 60px);
        padding: 10px;
    }

    .project-image {
        width: 100px;
        height: 100px;
        margin-bottom: 10px;
    }

    .project-text {
        padding: 0;
    }

    .project-title {
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .project-description {
        font-size: 0.9rem;
    }

    #java-easter-egg-notification {
        width: 90vw;
        bottom: 30px;
        right: -100vw;
    }

    #java-easter-egg-notification.show {
        right: 5vw;
    }

    #java-easter-egg-notification img {
        width: 100%;
        height: auto;
    }
}

/* ----------------------------
   Fonts
---------------------------- */

@font-face {
    font-family: 'Lato';
    src: url('/assets/fonts/Lato-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Lato';
    src: url('/assets/fonts/Lato-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Lato';
    src: url('/assets/fonts/Lato-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Lato';
    src: url('/assets/fonts/Lato-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
}

/* ----------------------------
   Misc
---------------------------- */

br {
    margin: 0.5vh;
}