html {
    font-family: 'Lato', sans-serif;
    font-size: larger;
    font-weight: 300;

    font-size: 18px;
    line-height: 1.6;
}

body {
    padding-top: 20px;
}

h1 {
    font-family: "Caveat", cursive;
    font-size: 2.8rem;
    line-height: 0.8;
}

p {
    font-size: 1rem;
    line-height: 1.8;
}

.name-container {
    display: flex;
    justify-content: center;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: -30px;
}

.pronunciation {
    font-family: 'Georgia', serif;
    font-style: italic;
    color: #555;
    margin-top: -30px;
    font-size: 0.9rem;
    display: inline-block;
    margin-left: auto;
    align-self: flex-end;
}


a {
    text-decoration: none;
    color: #1565c0;
    transition: color 0.3s ease;
}

a:hover {
    color: #217ee7;
}

#content {
    text-align: center;
    max-width: 540px;
    padding: 32px;
    line-height: 1.6em;
    margin: auto;
    /* Center content horizontally */
}

.university {
    font-family: 'Georgia', serif;
}

.arrow {
    margin: 0.2px;
}

#content p {
    text-align: justify;
}

#content p.ending {
    text-align: center;
}

.avatar {
    border-radius: 50%;
    width: 200px;
}

/* Avatar card flip animation */
.avatar-card {
    background-color: transparent;
    width: 200px;
    height: 200px;
    perspective: 1000px;
    margin: 0 auto 20px auto;
}

.avatar-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.avatar-card:hover .avatar-card-inner {
    transform: rotateY(180deg);
}

.avatar-card-front, .avatar-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.avatar-card-back {
    transform: rotateY(180deg);
}

.avatar-card-front .avatar,
.avatar-card-back .avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icons {
    list-style-type: none;
    font-size: xx-large;
    padding: 0;
    display: flex;
    justify-content: space-between;
    max-width: 320px;
    margin: 1em auto;
}

.icons li {
    display: inline;
    width: 42px;
}

.icons a {
    color: black;
}

.icons a:hover {
    color: #1565c0;
}

body .barca {
    color: #990d0d;
    font-style: italic;
}

/* Dark mode styles */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode a {
    color: #bb86fc;
}

body.dark-mode a:hover {
    color: #bb86fc;
}

body.dark-mode .icons a {
    color: #e0e0e0;
}

body.dark-mode .icons a:hover {
    color: #bb86fc;
}

body.dark-mode .barca {
    color: #ffc107;
    font-style: italic;
}

/* Dark mode toggle button styles */
#dark-mode-toggle {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: black;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
    transition: opacity 0.3s ease-in-out;
}

#dark-mode-toggle.hidden {
    opacity: 0;
    pointer-events: none;
}

#dark-mode-toggle:hover {
    color: #1565c0;
}

body.dark-mode #dark-mode-toggle {
    color: #e0e0e0;
}

body.dark-mode #dark-mode-toggle:hover {
    color: #bb86fc;
}

@media screen and (max-width: 600px) {
    #content {
        padding: 16px;
    }
}

/* Justify text for larger screens */
@media screen and (min-width: 768px) {
    #content p {
        text-align: justify;
    }
}

/* Center text for smaller screens */
@media screen and (max-width: 767px) {
    #content p {
        text-align: center;
    }
}