*, *::after, *::before {
    box-sizing: border-box;
    margin: 0;
}

:root {
    --bg-color: #ffffff;
    --text-color: #121212;
    --card-font-size: auto;
}

:root[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #ffffff;
}


@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

@media (max-width: 600px) {
    :root {
        --card-font-size: 12px;
    }
}


body {
    background: var(--bg-color);
    color: #ffffff;
    font-family: 'Roboto Slab', sans-serif;
    overflow-x: hidden;
    transition: background-color 0.3s ease;
    padding-top: max(10vh, 80px);
}

header, main {
    padding: 20px;
    overflow: hidden;
}


/* Hero */
#hero {
    color: var(--text-color);
    display: flex;
    flex-flow: row-reverse wrap;
    justify-content: center;
    align-items: center;
}

#hero .profile-pic {
    animation: roll 2s ease-in-out both, box-shadow-spin 3s ease-in-out infinite;
}

#outerScrollWordList {
    display: inline-block;
    height: 50px;
    border-bottom: 2px solid rgb(0, 60, 150);
    overflow: hidden;
    vertical-align: middle;
}

#scrollWordList { 
    display: flex;
    flex-direction: column;
    transition: transform 0.8s ease-in-out;
}

.scrollWord {
    height: 50px;
    line-height: 50px; 
}

.hero-btn {
    width: 100%;
    height: auto;
    text-align: center;
    text-decoration: none;
    font-family: 'Geist Mono', 'Lora';
    font-size: 20px;
    font-weight: bold;
    color: white;
    background:dodgerblue;
    border: 3px solid darkblue;
    border-radius: 20px;
    padding: 20px;
    margin: 20px auto;
    cursor: pointer;
    box-shadow: 5px 5px 10px rgba(0, 0, 225, 0.8);
}

.hero-btn:hover {
    background: deepskyblue;
}

.hero-btn img {
    margin: 10px;
}

@media (min-width: 750px) {
    h1 {
        font-size: 50px;
    }

    h1 .code-bg {
        font-size: 80px;
    }

    #hero ul {
        margin-bottom: 0 !important;
    }

    #outerScrollWordList {
        height: 70px;
    }

    .scrollWord {
        height: 70px;
        line-height: 70px;
    }
}


h1 {
    font-family: 'Geist Pixel', 'Arial';
    width: 100%;
    color: #fff;
    background: #252525;
    border: 3px solid dodgerblue;
    border-radius: 20px;
    box-shadow: 3px 5px 5px dodgerblue;
    margin-bottom: 80px;
    padding: 15px;
    text-shadow: 0 5px 5px #5c6ac4;
}

h2 {
    color: dodgerblue;
    font-family: 'Montenegrin Gothic One', sans-serif;
    text-shadow: 1px 1px 5px dodgerblue;
}

hr {
    width: 100%;
    background: dodgerblue;
    border: none;
    border-radius: 10px;
    margin-bottom: 20px;
    padding: 5px;
    box-shadow: 3px 3px 5px dodgerblue;
}


/* Button */
button, a {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

button:focus-visible {
    outline: 2px solid #5c6ac4;
    outline-offset: 2px;
}


/* With Code Text Background */
.code-bg {
    font-family: Arial, sans-serif;
    font-size: 50px;
    background-image: url("assets/img/code.jpg");
    background-size: contain;
    background-position:  center;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color:transparent;
    color: transparent;
    -webkit-text-stroke: 0.2px white;
    text-shadow: none;
}


/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 500;
    width: 100vw;
    height: 5vh;
    min-height: 60px;
    border-radius: 0 0 20px 20px;
    color:white;
    border: 3px solid darkblue;
    border-top: 0;
    background: rgba(0, 0, 200, 0.8);
    box-shadow: 0 10px 20px rgba(0, 0, 225, 0.8);
}

#open-sidebar-btn {
    position: absolute;
    top: 5px;
    left: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 20px;
    background: none;
}

.navbar #toggle-theme-row {
    position: absolute;
    top: 5px;
    right: 5px;
}

.navbar button {
    cursor: pointer;
    border: 1px solid lightblue;
    background: linear-gradient(to right, purple, blue, purple);
    transition: background 3s ease;
    width: 40px;
    margin-top: 5px;
}

#theme-system {
    border-radius: 20px 0 0 20px;
    background: linear-gradient(to right, blue, purple);
}

#theme-dark {
    border-radius: 0 20px 20px 0;
    background: linear-gradient(to left, blue, purple);
}

.navbar .logo {
    margin-left: 50px;
}

.navbar .profile-pic {
    display: none;
}


/* Logo */
.logo {
    margin: 10px;
    font-family: 'Arial', sans-serif;
    font-size: 30px;
}

.logo #dawn {
    background-image: url('assets/img/sunset.png');
    background-size: cover; 
    background-position:  center;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 5px 5px 10px #FF4433;
}

.logo #fallz {
    color: cyan;
    text-shadow: 5px 5px 10px cyan;
}


/* Copy Text */
.copy-text {
    font-family: 'Geist Pixel', 'Lora', 'Arial', sans-serif;
    border-radius: 5px;
    background: grey;
    line-height: 2.0;
    padding: 3px;
}


/* Sidebar */
.sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 45%;
    height: 100%;
    min-height: 500px;
    border: 2px solid dodgerblue;
    border-left: none;
    border-radius: 0 20px 20px 0;
    background: darkblue;
    padding: 10px;
    transition: transform 0.3s ease;
    transform: translateX(-100%);
    z-index: 600;
}

.sidebar.open {
    transform: translateX(0);
}

@media (min-width: 1024px) {
    header, main, footer {
        width: 75vw !important;
        margin-left: auto;
    }
    #open-sidebar-btn {
        transform: scale(0);
    }

    #close-sidebar-btn {
        display: none;
    }

    .navbar {
        z-index: 700;
    }

    .navbar .logo {
        display: inline-block;
        font-size: 50px;
        position: absolute;
        top: 0;
        left: 6vw;
        margin: 0;
    }

    .navbar .profile-pic {
        display: inline-block;
        margin: 5px;
    }

    .sidebar {
        transform: translateX(0);
        width: 25vw;
        border-radius: 0;
        padding-top: 8vh;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar .logo {
        display: none;
        position: absolute;
        top: 0;
        left: 0;
        margin-left: 0;
    }

    .sidebar hr {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar {
        transition: none;
        transform: none;
    }

    .sidebar.open {
        transform: none;
    }
}

.sidebar a {
    color: white;
    text-decoration: none;
    font-size: 20px;
    display: block;
    margin: 10px;
}

@media (max-width: 600px) {
    .profile-pic {
        display: none;
    }

    .sidebar {
        width: 60%;
    }

    .sidebar .logo {
        margin-top: 50px;
    }
}

#open-sidebar-btn {
    position: absolute;
    top: 5px;
    left: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 20px;
    background: none;
}

#close-sidebar-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    color: white;
    border: none;
    background: transparent;
}


/* Toggler/Slider */
.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    -webkit-tap-highlight-color: transparent;
}

.switch:hover {
    background: none;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: grey;
    border-radius: 30px;
    transition: 0.4s;
}

.slider::before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
}

input[type="checkbox"]:checked + .slider {
    background-color: rgba(0, 0, 255, 0.8);;
}

input[type="checkbox"]:checked + .slider::before {
    transform: translateX(18px);
}


.no-glow * {
    box-shadow: none;
}


/* Github Profile button */
.github-profile-btn {
    width: 100%;
    height: auto;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    color: white;
    background:dodgerblue;
    border: 3px solid darkblue;
    border-radius: 20px;
    margin: 20px auto;
    cursor: pointer;
    box-shadow: 5px 5px 10px rgba(0, 0, 225, 0.8);
}

.github-profile-btn:hover {
    background: deepskyblue;
}

.github-profile-btn img {
    margin: 10px;
}


/* Profile Picture */
.profile-pic {
    border: 3px solid dodgerblue;
    border-radius: 50%;
    animation: box-shadow-spin 2s ease-in-out infinite;
}


/* Github Icon */
.github-icon {
    border-radius: 50%;
    background: white;
}

/* Anchors */
.anchor {
    scroll-margin-top: 80px;
}

/* Small tag */
small {
    color: gray;
    font-family: 'Lora', 'Arial';
    margin: 5px;
}


/* Section tag */
section { 
    width: 100%;
    border: 3px solid dodgerblue;
    border-radius: 10px;
    background: linear-gradient(rgba(0, 0, 200, 0.7), purple);
    margin-bottom: 20vh;
    padding: 20px;
    animation: box-shadow-spin 3s ease-in-out infinite;
}

section p {
    margin: 10px;
}

section h3 {
    width: 100%;
    margin-top: 50px;
    border: 3px solid dodgerblue;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    padding: 10px;
    background: rgba(0, 0, 200, 0.7);
    box-shadow: 5px 5px cyan !important;
}

.list {
    list-style-type: "- ";
    width: 100%;
    border: 3px solid dodgerblue;
    border-radius: 0 0 10px 10px;
    padding: 20px;
    background: rgba(0, 0, 200, 0.7);
    box-shadow: 5px 5px cyan !important;
}

em {
    display: block;
    border-left: 5px solid dodgerblue;
    background: rgba(0, 0, 200, 0.7);
    margin: 10px;
    padding: 5px;
}


/* About me */
#about-me button {
    width: 100%;
    height: 30px;
    font-size: 12px;
    color: white;
    border: 1px solid dodgerblue;
    background: rgba(0, 0, 200, 0.7);
}

#quote {
    font-weight: bolder;
    border: 3px solid dodgerblue;
    border-left: 10px solid skyblue;
    background: rgba(0, 0, 200, 0.7);
    padding: 10px;
}


/* Main Skills */
#main-skills {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

#main-skills svg {
    width: 50px;
    height: 50px;
}

#main-skills div {
    border: 3px solid dodgerblue;
    border-radius: 20px;
    background: #CCCCCC;
    color: #121212;
    text-align: center;
    margin: 5px;
    padding: 10px;
    width: 45%;
    height: 45%;
    min-width: 110px;
    min-height: 110px;
    transition: background 0.5s ease-in, transform 0.5s ease-in-out, box-shadow 0.5s ease-in;
}

#main-skills div:hover {
    background: grey;
    transform: translate(5px, -5px);
    box-shadow: -5px 5px dodgerblue !important;
}


/* Learning Journey */
#learning-journey div {
    position: relative;
    padding-left: 50px;
}

#learning-journey div::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(blue, purple);
    border-radius: 3px;
}

#learning-journey h4 {
    font-family: 'Geist Pixel', 'Lora', 'Arial';
    position: relative;
    background: rgba(0, 0, 200, 0.8);
    border-radius: 10px;
    padding: 5px;
    margin: 40px 0 10px;
}

#learning-journey h4::before {
    content: "";
    position: absolute;
    left: -50px;
    top: 50%;
    transform: translateY(-50%);
    width: 25px;
    height: 25px;
    background: white;
    border: 5px solid dodgerblue;
    border-radius: 50%;
    z-index: 1;
}

#learning-journey ul {
    margin: 10px;
}


/* Stats */
#stats {
    display: flex;
    flex-flow: row wrap;
    text-align: center;
}

#stats h4 {
    border-bottom: 3px solid dodgerblue;
    border-radius: 12px 12px 0 0;
    background: skyblue;
    color: var(--text-color);
    font-size: 20px;
}

#stats div {
    border: 3px solid dodgerblue;
    border-radius: 15px;
    width: 44%;
    margin: 20px;
    transition: background 0.3s ease-in, transform 0.5s ease-in-out, box-shadow 0.5s ease-in;
}

#stats div:hover {
    background: deepskyblue;
    transform: translate(5px, -5px);                                   box-shadow: -5px 5px dodgerblue !important;
}

@media screen and (max-width: 500px) {
   #stats div {
       width: 100%;
   } 
}


/* Certificates */
#certificates a {
    display: block;
    border: 3px solid dodgerblue;
    border-radius: 10px;
    background: rgb(0, 60, 150);
    color: white;
    padding: 5px;
    margin: 10px;
}


/* Fun Facts */
#fun-facts div {
    border-radius: 20px;
    background: #121212;
    padding: 30px;
    margin: 50px 10px;
    transition: transform 0.3s ease-in-out; 
    box-shadow: 10px 10px #303030 !important;
}

#fun-facts div:nth-child(odd) {
    transform: rotate(3deg);
}

#fun-facts div:nth-child(even) {
    transform: rotate(-3deg);
}

#fun-facts b {
    font-size: 30px;
}

#fun-facts div:hover {
    transform: rotate(0deg) scale(1.2) translate(3px, -3px);
}

/* Projects */
#projects {
    position: relative;
    overflow: hidden; 
}

#projects button {
    position: absolute;
    bottom: 5px;
    margin: 10px;
    padding: 10px 15px;
    font-size: 18px;
    cursor: pointer;
}

.deck {
    width: 100%;
    height: 350px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card {
    width: 100%;
    height: 100%;
    position: absolute;
    color: white;
    border: 3px solid dodgerblue;
    border-radius: 20px;
    padding: 5px;
    font-weight: bold;
}

table {
    position: absolute;
    left: 0;
    bottom: 50px;
    font-size: 14px;
    width: 100%;
    border: 3px solid dodgerblue;
    border-collapse: collapse;
    background: darkblue;
}

td {
    border: 3px solid dodgerblue;
    padding: 5px;
}

#projects button {
    position: absolute;
    bottom: 4%;
    color: dodgerblue;
    border: none;
    border-radius: 20px;
    background: darkblue;
    margin: 10px;
    padding: 10px 15px;
    font-size: 15px;
    z-index: 80;
    cursor: pointer;
}


/* Discord Link */
#discord-link {
    border: 3px solid dodgerblue;
    border-radius: 20px;
    color: black;
    background: lightskyblue;
    margin: 10px;
    padding: 10px;
}

#discord-link span {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    border-bottom: 3px solid dodgerblue;
}

#discord-link h2 {
    color: midnightblue;
    margin-left: 10px;
}

#discord-link p {
    margin: 20px;
}

#discord-link button {
    border: 3px solid midnightblue;
    border-radius: 20px;
    font-weight: bold;
    background: dodgerblue;
    width: 100%;
    height: 50px;
}


/* Socials */
#socials div {
    display: block;
    margin: 8px;
}

#socials a {
    color: ghostwhite;
    font-size: 20px; 
    margin-bottom: 5px;
    padding: 3px;
}


/* Contact Me */
#contact-me button {
    font-family: 'Lora', sans-serif;
    font-size: 1.2rem;
    color: white;
    border: 3px solid dodgerblue;
    border-radius: 20px;
    background: blue;
    width: 100%;
    padding: 10px;
}


/*  Footer */
footer {
    width: 100vw;
    text-align: center;
    padding: 10px;
}

footer p {
    display: block;
    margin: 30px;
    color: var(--text-color);
}

footer a {
    color: transparent;
    margin: 10px;
}


/* Animations */
@keyframes roll {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(360deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes box-shadow-spin {
    0% {
        box-shadow: 0 -15px 15px rgba(0, 0, 225, 0.8);
    }
    25% {
        box-shadow: 15px 0 15px rgba(0, 0, 225, 0.8);
    }
    50% {
        box-shadow: 0 15px 15px rgba(0, 0, 225, 0.8);
    }
    75% {
        box-shadow: -15px 0 15px rgba(0, 0, 225, 0.8);
    }
    100% {
        box-shadow: 0 -15px 15px rgba(0, 0, 225, 0.8);
    }
}
