:root {
    --background-color: white;
    --primary-color: green;
    --hover-color: lime;
    --navbar-bg: rgba(0, 255, 0, 0.3);
    --border-color: rgb(187, 179, 179);
    --button-border: lime;
    --button-bg: whitesmoke;
    --button-hover-bg: rgba(0, 255, 0, 0.3);
    --button-hover-color: green;
    --box-shadow-color: grey;
    --japanese-flag: rgba(255, 0, 0, 0.8);     /* red sun symbol */
    --spanish-flag: rgb(255, 187, 0, 1);    /* yellow from the flag */
    --french-flag: rgba(0, 89, 255, 0.8);
}

.darkmode {
    --background-color: #131313;
    --text-color: #dad6d6;
    --primary-color: rgb(117, 235, 71);    /* (for links/icons) */
    --hover-color: #aaffaa;                 /* hover color */
    --navbar-bg: rgba(53, 226, 18, 0.555);  /* navbar */
    --border-color: #333;                   /* border color */
    --button-border: #7cf97c;               /* green border */
    --button-bg: #1e1e1e;                   /* dark button */
    --button-hover-bg: rgba(0, 255, 0, 0.1);/* soft green hover glow */
    --button-hover-color: #bfff00;          /* vivid green-yellow on hover */
    --box-shadow-color: #000;               /* deep shadow */
    --japanese-flag: rgba(255, 255, 255, 1); /* white glow in dark */
    --spanish-flag: rgba(255, 0, 0, 1);      /* red glow in dark */    
    --french-flag: rgba(255, 255, 255, 1);
}

* {
    box-sizing: border-box;
    font-family: "Funnel Display", "Trebuchet MS";
    margin: 0;
    padding: 0;
}

input, textarea, select, p, h1, h2, h3 ::selection {
  cursor: text !important;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.4s ease, color 0.4s ease;
    cursor: url('./cursors/default.png'), auto;
}

html {
    scroll-behavior: smooth;
}

a, .icons {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.5s ease;
    cursor: url('./cursors/pointer.png'), auto;
}

a:hover, .icons:hover {
    transition: color 0.5s ease;
    color: var(--hover-color);
}

#theme-switch {
    color: black;
    height: 50px;
    width: 50px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: #dfdddd;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 80px;
    right: 20px;
    cursor: url('./cursors/pointer.png'), auto;
}

#theme-switch svg {
    fill: black;
}

#theme-switch svg:last-child {
    display: none;
}

.darkmode #theme-switch {
    background-color: rgb(231, 229, 229);
    fill: none;
}

.darkmode #theme-switch svg:first-child {
    display: none;
}

.darkmode #theme-switch svg:last-child {
    display: block;
}

.name {
    font-weight: 500;
    padding-left: 16px;
    margin: 0;
    cursor: url('./cursors/not-allowed.png'), auto;
}

.navbar {
    position: fixed;
    width: 100%;
    height: auto;
    background-color: var(--navbar-bg);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom-right-radius: 5px;
    border-bottom-left-radius: 5px;
    z-index: 10000;
}

.left {
    text-align: left;
    display: inline-block;
}

.right {
    text-align: right;
    display: inline-flex;
}

.right a {
    font-size: 20px;
    padding: 5px;
    margin-right: 18px;
    font-weight: 450;
    transition: transform 0.5s ease;
}

.right a:hover {
    transform: translateY(-2px) scale(1.03);
}

/* Main Body */
.intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: auto;
    width: 100%;
    height: auto;
    padding-top: 70px;
    overflow: hidden;
}

.intro p {
    width: 35%;
    text-align: center;
    font-weight: 200;
}

.face {
    padding-top: 40px;
    font-size: xx-large;
}

.pfp {
    border-radius: 50%;
    width: 10%;
    height: auto;
    margin: 20px;
    margin-top: 23px;
    margin-bottom: 33px;
    transition: transform 0.5s ease;
}

.pfp:hover {
    transform: translateY(-2px) scale(1.09);
    cursor: url('./cursors/pointer.png'), auto;
}

hr {
    margin-top: 20px;
    width: 4%;
    border: 0.5px solid var(--border-color);
    border-radius: 10px;
}

/* Icons */
.icons {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    margin: auto;
    width: 0;
    height: auto;
    color: var(--primary-color);
    padding-bottom: 0;
}

.languages {
    margin-bottom: 10px;
    margin-top: 0;
}

.fa-brands {
    transition: transform 0.5s ease;
    padding-right: 15px;
    padding-top: 22px;
}

.fa-brands:hover {
    transform: translateY(-2px) scale(1.09);
    cursor: url('./cursors/pointer.png'), auto;
}

/* Projects */
.projects {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    padding: 20px 0;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.projects p {
    width: 35%;
    text-align: center;
    font-weight: 200;
    padding: 0;
    margin: 0;
}

.definition {
    position: relative;
    cursor: help !important;
    border-bottom: 2px dotted grey;
}

.definition::after {
    content: attr(define);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #222;
    color: #fff;
    padding: 6px 10px;
    border-radius: 10px;
    white-space: nowrap;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.definition:hover::after {
    opacity: 1;
}

.music-rows {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    max-width: 100%;
    margin: 0;
}

.row {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.music-card {
    flex: 1;
    width: 90vw;
    max-width: 400px;
    box-sizing: border-box;
    margin: 0 auto;
    background-color: var(--button-bg);
    border-color: var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 2px 2px 10px var(--box-shadow-color);
    transition: transform 0.3s ease;
    text-align: center;
}

.music-card:hover {
    transform: translateY(-5px);
    cursor: url('./cursors/pointer.png'), auto;
}

.music-title {
    font-weight: bold;
    padding-bottom: 10px;
    font-size: 20px;
}

.content {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

.content p {
    width: 100%;
    font-size: 16.5px;
}

.player {
    padding: 20px;
    margin-top: 10px;
}

.player audio { /* Fixing issues with display for mobile; hopefully easier to deal with */
    border: 2px solid var(--border-color);
    border-radius: 30px;
}

.progress {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background-color: var(--background-color);
    border-radius: 30px;
    cursor: url("./cursors/pointer.png"), auto !important;
    margin: 30px 0;
    margin-top: 0;
}

.progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    background-color: var(--primary-color);
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 3px solid rgba(245, 245, 245, 0.723);
    box-shadow: 0 0.1px 12px var(--box-shadow-color);
}


.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -10px;
}

.controls div {
    width: 60px;
    height: 60px;
    margin: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--primary-color);
    box-shadow: 0 10px 20px var(--box-shadow-color);
    cursor: url("./cursors/pointer.png"), auto !important;
    transform: scale(1.1);
}

.controls div:nth-child(2) {
    transform: scale(1.3);
    background-color: var(--primary-color);
    color: var(--background-color);
}


#untitled {
    height: 195px;
    margin-bottom: 10px;
}

#space {
    height: 195px;
    margin-bottom: 10px;
    width: 330px;
}

.displayer {
    display: flex;
    justify-content: center;
}

.displayer img {
    margin-bottom: 10px;
    border-radius: 13px;
}

.displayer #as-cover {
    width: 70%;
    height: 195px;
}

.ableton {
    width: 57px;
    height: 57px;
    position: relative;
    background-size: cover;
    background-position: center;
    cursor: url("./cursors/default.png"), auto;
}

.ableton::before, .ableton::after {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.5s ease;
}

/* Light mode default image */
.ableton::before {
    background-image: url("./etc/light\ mode.png");
    opacity: 1;
}

/* Light mode hover image */
.ableton::after {
    background-image: url("./etc/light\ mode\ hover.png");
    opacity: 0;
}

.ableton:hover::after {
    opacity: 1;
}

.ableton:hover::before {
    opacity: 0;
}

/* Dark Mode */
.darkmode .ableton::before {
    background-image: url("./etc/dark\ mode.png");
}

.darkmode .ableton::after {
    background-image: url("./etc/dark\ mode\ hover.png");
}



@media only screen and (max-width: 1030px) {
    .row {
        flex-direction: column;
        width: 100%;
        align-items: center;
    }

    .music-rows, .row {
        align-items: center;
        padding: 0;       /* Remove extra side padding */
        margin: 0 auto;   /* Center container horizontally */
    }

}

.lang {
    padding: 0;
}

.long {
    width: 80%;
    margin-bottom: 30px;
}

/* Skills */
.flags {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
}

.flag {
    aspect-ratio: 1 / 1;
    width: 4%;
    margin: 5px 13px 0 13px;
    border-radius: 30%;
    object-fit: cover;
}

.japanese:hover {
    box-shadow: 0 0 25px var(--japanese-flag);
    transition: box-shadow 0.3s ease;
}

.spanish:hover {
    box-shadow: 0px 0px 25px var(--spanish-flag);
    transition: box-shadow 0.3s ease;
}

.french:hover {
    box-shadow: 0 0 25px var(--french-flag);
    transition: box-shadow 0.3s ease;
}

.jp-text, .es-text, .fr-text {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 20px;
    max-width: 100%;
    margin: 0;
    align-items: stretch;
}

.pre-jp, .post-jp, .pre-es, .post-es, .pre-fr, .post-fr {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.jp-text p, .es-text p, .fr-text p {
    width: 80%;
}

.vert {
    border: none;
    border-left: 2px solid var(--border-color);
    width: 0;
    margin: 0 1rem;
    align-self: stretch;
}

.advice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: auto;
    width: 100%;
    height: auto;
    padding-top: 30px;
    overflow: hidden;
}

.advice p {
    width: 60%;
}

/* Contact */
.contact {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    padding: 0;
    align-items: center;
    justify-content: center;
}

.contact p {
    padding-top: 20px;
    margin: 0;
    width: 35%;
    text-align: center;
    font-weight: 200;
}

.msg {
    padding: 0;
}

button {
    padding: 10px;
    margin-top: 30px;
    margin: 20px;
    border-radius: 30px;
    border: 2px solid var(--button-border);
    background-color: var(--button-bg);
    font-weight: 450;
    transition: transform 0.4s ease;
}

button:hover {
    color: var(--button-hover-color);
    background-color: var(--button-hover-bg);
    transform: translateY(-1px) scale(1.1);
    cursor: url('./cursors/pointer.png'), auto;
}

/* Footer */
footer {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    align-items: center;
    justify-content: center;
}

.copy {
    font-size: large;
    padding-bottom: 30px;
}

/* Adding mobile response */
@media only screen and (max-width: 768px) {
    .right, .projects, .contact {
        flex-direction: column;
        flex-wrap: wrap;  /* So items don't overflow */
        justify-content: space-between;  /* Adjust based on spacing needs */
        align-items: center;
    }

    .navbar {
        display: flex;
        flex-direction: row;
        height: 10%;
        width: 100%;
    }

    .navbar a {
        display: flex;
        flex-direction: row;
        font-size: 23px;
    }

    .navbar .right { /* To be fixed for mobile response */
        display: flex;
        flex-direction: row;   /* keep links in a horizontal row */
        justify-content: space-between; /* center them horizontally */
        gap: 1px;              /* space between links */
        margin-top: 1px;
        margin-left: -500px;
    }

    .navbar .left {
        display: flex;
        flex-direction: row;   /* keep links in a horizontal row */
        justify-content: left; /* center them horizontally */
        margin-top: 1px;
        width: 100%;
        font-size: 100%;
        margin-left: -10px;
    }

    .intro p, .projects p, .contact p {
        font-size: 17px;
        margin: 5px;
        padding: 5px;
        width: 80%;
    }

    .pfp {
        width: 25%;
    }

    button {
        width: auto;
        padding: 8px 12px;
        font-size: 14px;
    }

    .icons {
        justify-content: center;
        gap: 10px;
    }

    body {
        overflow-x: hidden;
        font-size: 90%;
    }

    .face {
        width: 85%;
        height: auto;
        text-align: center;
        font-size: 30px;
    }

    .title {
        font-size: 38px;
        width: 80%;
        height: 50%;
    }
}


@media only screen and (max-width: 767px) {
    .right, .projects, .contact {
        flex-direction: column;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }

    .navbar {
        display: flex;
        flex-direction: row;
        height: 5%;
        width: 100%;
        padding: 30px 10px 30px 30px;
    }

    .navbar a {
        display: flex;
        flex-direction: row;
        font-size: 18px; /* A middle ground between 12px and 23px */
    }

    .navbar .right {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
        margin-top: 10px;
}

    .navbar .left {
        display: flex;
        flex-direction: row;
        justify-content: left;
        margin-top: 1px;
        width: 100%;
        font-size: 100%;
        margin-left: -10px;
    }

    .intro {
        padding-top: 90px;
    }

    .intro p, .projects p, .contact p {
        font-size: 17px;
        margin: 5px;
        padding: 5px;
        width: 80%;
    }

    .pfp {
        width: 25%;
    }

    button {
        width: auto;
        padding: 8px 12px;
        margin-right: -5px;
        margin-top: 0;
        font-size: 14px;
    }

    .icons {
        justify-content: center;
        gap: 10px;
    }

    body {
        overflow-x: hidden;
        font-size: 90%;
    }

    .face {
        width: 85%;
        height: auto;
        text-align: center;
        font-size: 30px;
    }

    .title {
        font-size: 38px;
        width: 80%;
        height: 50%;
    }
}


@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .right, .projects, .contact {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        gap: 20px;
    }

    .navbar {
        display: flex;
        flex-direction: row;
        height: auto;
        width: 100%;
        padding: 20px 30px;
    }

    .navbar a {
        font-size: 20px;
    }

    .navbar .right {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        margin-left: auto;
        gap: 10px;
    }

    .navbar .left {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        width: auto;
    }

    .hard {
        margin-top: 10px;
        text-align: center;
    }

    h2 {
        text-align: center;
    }

    #theme-switch {
        top: 170px;
    }

    .intro p, .projects p, .contact p {
        font-size: 18px;
        width: 70%;
        margin: 10px auto;
    }

    .pfp {
        width: 20%;
    }

    button {
        padding: 10px 16px;
        font-size: 16px;
    }

    .icons {
        justify-content: center;
        gap: 15px;
    }

    body {
        overflow-x: hidden;
        font-size: 100%;
    }

    .face {
        width: 70%;
        font-size: 36px;
    }

    .title {
        font-size: 44px;
        width: 70%;
    }
}

@media only screen and (min-width: 361px) and (max-width: 767px) {
    .navbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-evenly;
        padding: 25px;
        width: 100%;
        margin-bottom: 0;   
    }

    .navbar a {
        font-size: 15px;
        white-space: nowrap;
    }

    .navbar .left:first-child {
        display: none;
    }

    .navbar .right {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        margin: 0px;
        margin-right: -30px;
        flex-wrap: wrap;
        gap: 5px
    }

    .navbar .left {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        width: auto;
    }

    .hard {
        margin-top: clamp(-60px, -45px, 10px)
    }

    #theme-switch {
        top: 170px;
    }

    .intro p, .projects p, .contact p {
        font-size: 15px;
        width: 90%;
    }

    .pfp {
        width: 28%;
    }

    button {
        font-size: 13px;
        padding: 8px 10px;
        width: auto;
    }

    .icons {
        justify-content: center;
        gap: 8px;
    }

    .face {
        font-size: 28px;
        width: 90%;
        text-align: center;
    }

    .title {
        font-size: 34px;
        width: 85%;
    }

    body {
        font-size: 85%;
        overflow-x: hidden;
    }

    /* //Important - To be changed */
    .music-rows {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 20px;
        max-width: 100%;
        margin: 0;
    }

    .controls {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: -10px;
    }
}


@media only screen and (min-width: 0px) and (max-width: 360px) {    /* Deal with navbar complications later */
    .navbar {
        display: flex;
        flex-direction: row;
        /* justify-content: space-evenly;  Figure this out*/ 
        align-items: center;
        padding: 25px;
        width: 100%;
        margin-bottom: 0;
    }

    .navbar a {
        font-size: 15.6px;
        white-space: nowrap;
    }

    .navbar .left:first-child {
        display: none;
    }

    .navbar .right {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        margin: 0px;
        margin-right: -33.5px;
        flex-wrap: wrap;
        gap: 5px
    }

    .navbar .left {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        width: auto;
    }

    .hard {
        margin-top: -40px;
    }

    #theme-switch {
        top: 170px;
        position: absolute;
    }

    .intro p, .projects p, .contact p {
        font-size: 15px;
        width: 90%;
    }

    .pfp {
        width: 28%;
    }

    button {
        font-size: 13px;
        padding: 8px 10px;
        width: auto;
    }

    .icons {
        justify-content: center;
        gap: 8px;
    }

    .face {
        font-size: 28px;
        width: 90%;
        text-align: center;
    }

    .title {
        font-size: 34px;
        width: 85%;
    }

    body {
        font-size: 85%;
        overflow-x: hidden;
    }
    /* //Important - To be added: .music-rows and .controls*/
}


@media only screen and (width: 344px) {
    .navbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-evenly;
        padding: 21.8px;
        width: 100%;
        margin-bottom: 0;
        
    }

    .navbar a {
        font-size: 15px;
        white-space: nowrap;
    }

    .navbar .left:first-child {
        display: none;
    }

    .navbar .right {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        margin: 0px;
        margin-right: -20px;
        flex-wrap: wrap;
        gap: 5px
    }

    .navbar .left {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        width: auto;
    }

    .hard {
        margin-top: -40px;
    }

    #theme-switch {
        top: 170px;
    }

    .intro p, .projects p, .contact p {
        font-size: 15px;
        width: 90%;
    }

    .pfp {
        width: 28%;
    }

    button {
        font-size: 13px;
        padding: 8px 10px;
        width: auto;
    }

    .icons {
        justify-content: center;
        gap: 8px;
    }

    .face {
        font-size: 28px;
        width: 90%;
        text-align: center;
    }

    .title {
        font-size: 34px;
        width: 85%;
    }

    body {
        font-size: 85%;
        overflow-x: hidden;
    }
}
