@import url("https://fonts.googleapis.com/css2?family=Open+Sans&display=swap");

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

:root {
    --HEADER-BGCOLOR: #000;
    --HEADER-COLOR: whitesmoke;
    --TEXT-COLOR: #111;
    --FOOTER-BGCOLOR: #000;
    --FOOTER-COLOR: whitesmoke;
    --HEADER-HEIGTH: 50px;
}

html {
    font-size: 1.3rem;
    font-family: "Open Sans", sans-serif;
    line-height: 1.5rem;
}

body {
    background-color: #888;
    min-height: 100vh;
    display: flex;
    flex-flow: column nowrap;
    padding-bottom: 80px; /* Space for fixed footer */
}

header {
    color: var(--HEADER-COLOR);
    position: sticky;
    top: 0;
    z-index: 1;
}

.header-title-line {
    background-color: var(--HEADER-BGCOLOR);
    padding: 0 0.5rem;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
}

.menu-button {
    background-color: transparent;
    border: none;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.closeMenuBtn {
    display: none;
    background-color: transparent;
    outline: none;
    /* border: 1px solid red; */
    border: none;
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
    width: 48px;
    height: 48px;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
    background-color: var(--HEADER-COLOR);
    width: 40px;
    height: 5px;
    border-radius: 5px;
    position: absolute;
    transition: all 0.5s;
}

.menu-icon::before,
.menu-icon::after {
    content: "";
}

.menu-icon::before {
    transform: translate(-20px, -12px);
}

.menu-icon::after {
    transform: translate(-20px, 12px);
}

.header-title-line:focus-within .menu-icon {
    background-color: transparent;
    transform: rotate(720deg);
}

.header-title-line:focus-within .menu-icon::before {
    transform: translateX(-20px) rotate(45deg);
}

.header-title-line:focus-within .menu-icon::after {
    transform: translateX(-20px) rotate(-45deg);
}

nav {
    display: none;
    position: relative;
    min-height: var(--HEADER-HEIGTH) + 0px;
}

header:focus-within nav {
    display: block;
    transform-origin: top center;
    animation: showMenu 0.5s ease-in-out forwards;
}

header:focus-within .closeMenuBtn {
    display: block;
}

header:focus-within .closeMenuBtn:focus {
    transform: translateX(-50px);
}

.closeMenuBtn:focus + nav {
    transform-origin: top center;
    animation: hideMenu 0.5s ease forwards;
}

@keyframes showMenu {
    0% {
        transform: scaleY(0);
    }

    80% {
        transform: scaleY(1.2);
    }

    100% {
        transform: scaleY(1);
    }
}

@keyframes hideMenu {
    0% {
        transform: scaleY(1);
    }

    20% {
        transform: scaleY(1.2);
    }

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

nav ul {
    background-color: var(--HEADER-BGCOLOR);
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 1;
    list-style-type: none;
    display: flex;
    flex-flow: column nowrap;
}

nav li {
    padding: 0.5rem;
    /*border-top: 1px solid var(--HEADER-COLOR);*/
}

nav a {
    display: block;
    text-align: center;
    width: 80%;
    margin: auto;
}

nav a:any-link {
    color: var(--HEADER-COLOR);
    font-weight: bold;
    text-decoration: none;
}

nav a:hover,
nav a:focus {
    transform: scale(1.2);
    transition: all 0.3s;
}

main {
    margin-top: var(--HEADER-HEIGTH);
}

main {
    flex-grow: 1;
    min-height: 100vh;
    scroll-padding-top: 82px; /* Height of the header */
    scroll-behavior: smooth;
}

.hero-image {
    display: flex;
    align-items: center;
    padding: 0 15vw;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
}

/* Place text in the middle of the image */
.hero-text {
    padding-top: 50px;
}
.hero-text,
.email-link,
.avatar-container {
    text-align: center;
    color: var(--HEADER-COLOR);
    width: 100%; /* Ensure text block takes full width up to max-width */
    transform: none;
}

.avatar {
    height: 40vh;
    margin: 30px 0 0 0;
    border-radius: 10px;
}

.email-link,
.email-link a {
    font-size: 0.8rem;
    margin-top: 20px;
    text-decoration: none;
    color: var(--HEADER-COLOR);
    padding: 1rem 0;
}

#about h2 {
    margin-top: 3rem;
    text-align: center;
    margin-bottom: 25px;
    color: var(--HEADER-COLOR);
    padding-bottom: 10px;
}

#bio {
    text-align: justify;
    width: 100%;
    margin-bottom: 50px;
    text-indent: 2em;
    padding: 1rem 2rem;
}

.comment {
    text-align: center;
    font-size: 0.75rem;
    font-style: italic;
    width: 100%;
    margin-bottom: 20px;
}

.experience-item a,
.experience-item li a {
    color: var(--TEXT-COLOR);
    text-decoration: none;
    transition: color 0.3s ease;
}

.experience-item a:hover {
    color: var(--HEADER-COLOR);
}

.experience-section {
    margin-bottom: 50px;
}

.experience-section h3 {
    margin-bottom: 30px;
    color: #eee;
    padding-bottom: 5px;
    text-align: center;
}

.experience-list {
    list-style: none;
}

.experience-item {
    padding: 15px;
    margin-bottom: 10px;
}

.experience-item .period {
    color: #ddd;
    margin-bottom: 9px;
    font-style: italic;
    margin-right: 15px; /* Space between date and content */
    flex-shrink: 0; /* Prevent date from shrinking */
    text-align: center;
}

.experience-item ul {
    list-style: none; /* Use discs for nested lists */
    flex-grow: 1; /* Allow nested list to take remaining space */
    margin-top: 5px; /* Add some space if it wraps */
}

#experience-teachers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    gap: 40px;
}

.experience-item ul li,
.experience-item p.item {
    margin-bottom: 5px; /* Spacing between nested list items */
    margin-left: 10px; /* Add some margin to the left of the nested list */
    text-align: center;
    text-wrap: wrap;
    word-wrap: anywhere;
}

#map {
    height: 400px;
    width: 90%; /* Ensure map takes full width */
    margin-top: 20px; /* Space above map */
    border-radius: 5px;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.5);
    z-index: 0;
    margin: 20px auto 0 auto;
}

.experience-section:nth-of-type(1) .experience-list {
    display: flex;
    justify-content: center;
}

.experience-section:nth-of-type(2) .experience-list {
    display: grid;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    text-align: center;
}
.experience-section:nth-of-type(2) .experience-item span {
    display: block;
}

#contact {
    margin-top: 5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .experience-item {
        flex-direction: column; /* Stack items vertically on small screens */
        align-items: center; /* Align items to the start */
    }
    .experience-item ul {
        width: 100%; /* Ensure nested list takes full width */
    }
}

/* Map Styles */
#map {
    min-height: 400px;
    height: 65vh;
}

/* Audio Player Styles */
.audio-player-container {
    margin: 2rem auto;
    padding: 0 1rem;
    height: 30vh;
}

#audio-players-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.audio-player {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    color: var(--HEADER-COLOR);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 3rem;
}

.track-info {
    margin-bottom: 1rem;
    text-align: center;
}

.track-title {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.track-artist {
    display: block;
    font-size: 0.9rem;
    color: #aaa;
}

.controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.play-pause {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.play-pause:hover {
    opacity: 0.5;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #fff;
    border-radius: 3px;
    width: 0%;
}

.time {
    display: flex;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #aaa;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.volume-percentage {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #fff;
    border-radius: 2px;
    width: 100%;
}

/* Section styles */
section {
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
}

/* Form */

form label {
    display: block;
    font-weight: 400;
    color: #363636;
    margin: 0 0 1em 0;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form select,
form textarea {
    -webkit-appearance: none;
    background: #f4f4f4;
    padding: 0.75em;
    width: 100%;
    -moz-transition: background-color 0.25s ease-in-out;
    -webkit-transition: background-color 0.25s ease-in-out;
    -ms-transition: background-color 0.25s ease-in-out;
    transition: background-color 0.25s ease-in-out;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form select {
    margin: 0;
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="password"]:focus,
form select:focus,
form textarea:focus {
    background: #f8f8f8;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form select {
    line-height: 1.35em;
}

form ::-webkit-input-placeholder {
    color: #999;
}

form :-moz-placeholder {
    color: #999;
}

form ::-moz-placeholder {
    color: #999;
}

form :-ms-input-placeholder {
    color: #999;
}

#collab-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}

.iframe-container {
    width: 100%;
    max-width: 700px;
    margin: 20px auto;
    min-height: 352px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
}

.bandcamp_embed.iframe-container {
    min-height: 152px;
}

.iframe-container:hover {
    cursor: pointer;
}

.load-iframe-btn {
    width: 100%;
    min-height: 352px;
    font-size: 1rem;
    color: var(--HEADER-COLOR);
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    /*
    border: 2px solid var(--HEADER-COLOR);
    border-radius: 4px;
    */
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-wrap: wrap;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    flex-grow: 1;
    display: flex; /* Use flexbox to align symbol and text */
    border: none;
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
    gap: 0.5rem; /* Space between symbol and text */
}

.load-iframe-btn::before {
    content: "▶"; /* Play symbol */
    font-size: 1.2em; /* Adjust size of the symbol */
    margin-right: 0.5rem; /* Space between symbol and text */
}

.load-iframe-btn:hover {
    opacity: 0.8;
}

/* If you want the symbol to change color on hover too, you might need this */
/* .load-iframe-btn:hover::before {
    color: var(--HEADER-BGCOLOR);
} */

.bandcamp_embed {
    max-width: 700px;
    min-width: 300px;
}

section h2 {
    font-size: 2rem;
    color: var(--HEADER-COLOR);
    margin-bottom: 1rem;
    text-align: center;
    white-space: normal;
    word-break: break-word;
}

#music,
#about,
#contact,
#collabs {
    padding: 1rem 2rem 0 2rem;
}

#music {
    padding-top: 3rem;
}

footer {
    background-color: var(--HEADER-BGCOLOR);
    color: var(--HEADER-COLOR);
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 40px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

#copyright {
    margin: 0;
    font-size: 0.5rem;
    color: var(--HEADER-COLOR);
}
#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
}

#contact-form h3 {
    margin: 0;
    color: var(--FOOTER-COLOR);
    font-size: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group textarea {
    padding: 0 0.5rem;
    border: 1px solid var(--HEADER-COLOR);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--FOOTER-COLOR);
    font-family: inherit;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.submit_container {
    display: flex;
    justify-content: center;
    margin-top: 1em;
}

.submit-btn {
    padding: 0.5rem 1rem;
    margin: 0 auto;
    background-color: var(--FOOTER-COLOR);
    color: var(--FOOTER-BGCOLOR);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.submit-btn:hover {
    opacity: 0.8;
}

#back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--HEADER-BGCOLOR);
    color: var(--HEADER-COLOR);
    border: 1px solid var(--HEADER-COLOR);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background-color: var(--HEADER-COLOR);
    color: var(--HEADER-BGCOLOR);
    transform: translateY(-3px);
}

#back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--FOOTER-COLOR);
    color: var(--FOOTER-BGCOLOR);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition:
        opacity 0.3s,
        transform 0.3s;
    transform: translateY(20px);
}

#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-5px);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1rem;
    }

    .footer-section {
        width: 100%;
    }

    #copyright {
        text-align: center;
    }

    #contact-form {
        width: 100%;
    }
}

@media (max-width: 480px) {
    section {
        padding: 2rem 0.5rem;
    }

    section h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    section h3 {
        font-size: 1.2rem;
        margin: 1.5rem 0;
    }

    .audio-player {
        padding: 1rem;
    }

    .controls {
        gap: 0.5rem;
    }

    .volume-container {
        display: none;
    }
}

@media screen and (max-width: 800px) {
    main {
        margin-top: 0; /* No margin-top, hero-image starts right after header-title-line */
    }
    .hero-text {
        padding: 1vw 0 0 0;
    }
}

@media screen and (min-width: 800px) {
    .menu-button {
        display: none;
    }

    nav {
        display: block;
    }

    nav ul {
        flex-flow: row nowrap;
        justify-content: space-evenly;
        /*border-top: 1px solid var(--HEADER-COLOR);*/
    }

    nav li {
        border-top: none;
    }

    header:focus-within nav {
        animation: none;
    }
}

@media screen and (max-width: 1200px) {
    .hero-image {
        flex-wrap: wrap;
    }

    .avatar {
        height: 45vh;
    }

    .experience-section:nth-of-type(1) .experience-list {
        flex-wrap: wrap;
    }
}

@media screen and (max-width: 600px) {
    .hero-image {
        padding: 0;
    }
    .hero-text {
        margin-top: 5px;
    }
    .avatar {
        width: 100%;
        height: 100%;
    }

    #bio {
        padding: 1rem 0;
    }

    .experience-item ul li,
    .experience-item p.item,
    .experience-item p.item a,
    .period,
    h3 {
        text-align: center;
    }

    .experience-item {
        align-items: center;
    }
    .experience-item .period {
        margin-right: 0;
    }

    #experience-teachers {
        gap: 0;
    }

    .experience-section:nth-of-type(2) .experience-list {
        display: grid;
        text-align: center;
        justify-content: center;
    }
    .audio-player-container {
        width: 100%;
    }
}
