* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition-property: background-color;
    transition-duration: 1s;
}

body {
    font-family: Cindie Mono D, sans-serif;
    background-color: #CCD6E7;
    color: #111111;
}

html {
    scroll-behavior: smooth;
}

/*NAV*/

 nav ul {
    list-style-type: none;
    margin: 0px;
    padding: 0 40px;
    overflow: hidden;
    background-color: #5270A8;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    position: sticky;
    display: flex;
    justify-content: center; 
    align-items: center; 
    z-index: 100;
 }

 nav li:has(#darkBtn) {
    margin-left: auto; /* The secret sauce that pushes it to the right side */
    margin-right: 0;   /* Resets your standard 20px right margin if needed */
}

#darkBtn {
    cursor: pointer;
}

 nav li {
    margin: 0 20px;
    background-color: #5270A8;
    transition-property: background-color;
    transition-duration: 1s;
    border-radius: 10px;
}

nav li:hover{
  background-color: #1C437A;
}

nav li a{
    display: inline-block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-family:Krona One, sans-serif;
}

/*HEADER*/

header {
    width: 100%;
    min-height: 500px;
    background-image: url('Images/headerBanner.png');
    background-size: cover;       
    background-position: center;  
    background-attachment: fixed;
    color: white;

    display: flex;
    flex-direction: row;
    align-items: center;        /* Centers items vertically */
    justify-content: space-around; /* Spreads out PFP and Text evenly */
    padding: 40px;              /* Keeps content safely away from the browser edges */
    box-sizing: border-box;
}

#pfp {
    width: 300px;
    height: 300px;
    max-width: 40vw;   /* Scale down smoothly on medium screens */
    max-height: 40vw;  /* Keeps it a perfect square */
    border-radius: 50%;
    border: 10px #5270A8 solid;
}

#headerText {
    max-width: 500px;
}

#headerText h3 {
    font-size: clamp(24px, 3vw, 40px); 
    font-family:Krona One, sans-serif;
}

#headerText h1 {
    font-size: clamp(44px, 7vw, 96px);
    margin-top: 10px;
}

#headerText p {
    font-size: clamp(12px, 1.8vw, 18px);
    font-family:Krona One, sans-serif;
}

@media (max-width: 768px) {
    header {
        flex-direction: column; 
        text-align: center;     
        justify-content: center;
        gap: 30px;              
        min-height: auto;     
    }

    #headerText {
        max-width: 100%;
    }
}

/*MAIN BODY*/
body main {
    padding: 20px;
}

#about, #hobbies, #contact {
    background-color: white;
    padding: 20px;
    margin-bottom: 16px;
    border-radius: 40px;
}

h2 {
    color: #1C437A;
    margin-bottom: 10px;
    text-align: center;
}

/*ABOUT ME*/

#about p {
    font-size: clamp(12px, 1.8vw, 18px);
    font-family:Krona One, sans-serif;
    margin-bottom: 25px;;
}

/*FUN FACT*/

#funFact {
    text-align: center;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 40px;
    width: 100%
}

#buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 120px;
}

button {
    background-color: #5270A8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-family:Krona One, sans-serif;
    transition-property: background-color;
    transition-duration: 1s;
}

button:hover{
  background-color: #1C437A;
}

#displayBox {
    background-color: #1C437A;
    border-radius: 20px;
    width: 500px;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

#factText {
    color: white;
    font-size: clamp(18px, 2.2vw, 22px);
    line-height: 1.5;
    margin: 0;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes fadeIn {
    from {
        opacity: 0; /* Slight upward slide for a "lift" effect */
    }
    to {
        opacity: 1;
    }
}

.fade-in-text {
    animation: fadeIn 1s ease-out forwards;
}

@media (max-width: 768px) {
    .fact-container {
        flex-direction: column;
        gap: 25px;
    }
    
    #buttons {
        flex-direction: row; 
        justify-content: center;
        width: 100%;
    }
    
    #displayBox {
        width: 100%; 
        max-width: 400px;
    }
}

/*HOBBIES*/

#gallery {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  background-color: #1C437A;
  padding: 10px;
  border-radius: 20px;
}

.gallery-item {
  background-color: #5270A8;
  flex: 0 0 auto; 
  width: 400px;
  margin-right: 15px;
  border-radius: 10px;
}

.gallery-item img {
  width: 100%;
  height: 300px;
  border-radius: 10px;
  object-fit: cover; 
}

.gallery-item div.desc {
  padding: 15px;
  text-align: center;
  font-family: Krona One, sans-serif;
}

/*CONTACT*/

#contact p {
    font-family: Krona One, sans-serif;
    text-align: center;
}

#contact #backBtn {
    display: flex;
    align-items: center;
}

/*FOOTER*/

footer {
    background-color: #1C437A;
    padding: 30px;
}

footer p {
    color: white;
    text-align: center;
    font-family: Krona One, sans-serif;
}

/*DARK MODE*/

body.dark {
    background-color: #532E31;
    color: #ffffff;
}

body.dark nav ul {
    background-color: #C65234;
}

body.dark nav li {
    background-color: #C65234;
}

body.dark nav li:hover {
    background-color: #D87631;
}

body.dark #pfp {
    border: 10px #C65234 solid;
}

body.dark #about, body.dark #hobbies, body.dark #contact {
    background-color: rgb(42, 9, 9);
}

body.dark h2 {
    color: #D87631;
}

body.dark button {
    background-color: #c65234;
    color: white;
}

body.dark button:hover{
  background-color: #D87631;
}

body.dark #displayBox {
    background-color: #D87631;
}

body.dark #gallery {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  background-color: #D87631;
  padding: 10px;
  border-radius: 20px;
}

body.dark .gallery-item {
  background-color: #C65234;
  flex: 0 0 auto; 
  width: 400px;
  margin-right: 15px;
  border-radius: 10px;
}

body.dark footer {
    background-color: #D87631;
    padding: 30px;
}
