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

/* ===============================================================================================================================================================================
            PAGE LAYOUT
================================================================================================================================================================================ */
body {
    font-family: Arial, sans-serif;
    background-color: black;
    padding-top: 48px;
}

img {
    border-radius: 50%;
}

.page-container {
    display: flex;
    height: 93vh;
    /* Full viewport height */
}

/* ===============================================================================================================================================================================
            HEADER
================================================================================================================================================================================ */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: white;
    padding: 15px 20px 15px 0px;
    z-index: 1000;
    /* ensures it stays above other content */
}

/* ===============================================================================================================================================================================
                        NAVIGATION BAR ITEMS
================================================================================================================================================================================ */
.nav-links a {
    color: black;
    text-decoration: none;
    margin-left: 20px;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #60a5fa;
    /* light blue on hover */
}

/* ===============================================================================================================================================================================
            ASIDE (Sidebar)
================================================================================================================================================================================ */
.sidebar {
    width: 20%;
    background-color: white;
    color: black;
    padding: 25px;
    height: 93vh;
    position: sticky;
    text-align: center;
    opacity: 100%;
    padding-top: 60px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sidebar h1,
.sidebar h2,
.sidebar h3,
.sidebar h4,
.sidebar p {
    font-family: Arial, sans-serif;
}

/* Typography for Sidebar */
.sidebar h1 {
    font-size: 30px;
    font-weight: bold;
    line-height: 2em;
}

.sidebar h2,
.sidebar h3,
.sidebar h4 {
    font-size: 14px;
}

.sidebar h3 {
    font-weight: bold;
}

.sidebar p {
    font-size: 14px;
    line-height: 1.5em;
}

/* ===============================================================================================================================================================================
                        SOCIAL ICONS
================================================================================================================================================================================ */
.sidebar-social-icons {
    display: flex;
    justify-content: space-evenly;
    opacity: 75%;
    padding-top: 30px;
    filter: invert(1);
}

/* ===============================================================================================================================================================================
            MIDDLE BAR (Icons)
================================================================================================================================================================================ */
.middle-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 5%;
    background-color: #f3f3f3;
    padding-top: 100px;
    z-index: 999;
}

.icon-container {
    position: relative;
    margin: 15px 0;
}

.icon-container button {
    background: none;
    border: none;
    position: relative;
    cursor: pointer;
}

.icon-container img {
    width: 30px;
    height: 30px;
}

/* Hover effect: Show label */
.icon-label {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    background-color: black;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.icon-container button:hover .icon-label {
    opacity: 1;
    transform: translateY(-50%) translateX(10px);
}

/* ===============================================================================================================================================================================
            MAIN CONTENT
================================================================================================================================================================================ */
.main {
    width: 80%;
    padding: 40px 40px 40px 10px;
    background-color: #f3f3f3;
    color: #111827;
    overflow-y: auto;
}

/* Typography for Main */
.main h1 {
    font-size: 35px;
    font-weight: bold;
    line-height: 1.5em;
    text-align: center;
}

.main h2 {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.5em;
}

.main h3 {
    font-size: 16px;
    font-style: italic;
    font-weight: normal;
}

.main p {
    font-size: 18px;
    line-height: 1.5em;
}

.main a {
    color: black;
}

.main strong {
    font-weight: bold;
}

.main ul {
    list-style-type: disc;
    padding-left: 20px;
}

.main li {
    padding-top: 5px;
    padding-left: 5px;
    line-height: 1.5em;
}

/* Horizontal line style */
.styled-line {
    border: none;
    height: 1.5px;
    background-color: black;
}

.extra-line {
    border: none;
    border-top: 3px none #000;
    margin: 10px 0;
}

.code-language {
    font-weight: normal;
    font-style: italic;
}

.text-align-center {
    text-align: center;
}

/* ===============================================================================================================================================================================
                        RESUME CONTACTS
================================================================================================================================================================================ */
.main-contact {
    display: flex;
    align-items: center;
    padding: 0 50px;
}

.main-contact-items {
    display: flex;
    align-items: center;
    padding: 10px;
    gap: 15px;
}

/* ===============================================================================================================================================================================
                        GRID CONTAINER
================================================================================================================================================================================ */
.grid-container {
    display: grid;
    grid-template-columns: 60% 40%;
    /* Two columns */
    width: 100%;
}

.left-text {
    justify-self: start;
}

.right-text {
    justify-self: end;
}

/* ===============================================================================================================================================================================
                        NEW CATEGORY / SECTION
================================================================================================================================================================================ */
.main-resume-category {
    padding-top: 20px;
}

/* ===============================================================================================================================================================================
                        RELEVANT COURSE LISTING
================================================================================================================================================================================ */
.course-listing-ul {
    display: flex;
    text-align: center;
    flex-wrap: wrap;
}

.course-listing-li {
    list-style-type: none;
    flex: 1 0 25%;
    padding-top: 10px;
}

/* ===============================================================================================================================================================================
                        CONTACT FORM
================================================================================================================================================================================ */
.contact-form {
    max-width: 600px;
    margin: 30px auto;
    padding: 20px;
    background-color: #f3f3f3;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(30px);
    animation: slideIn 0.8s ease-out forwards;
    animation-delay: 1.5s;
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.contact-form button {
    padding: 10px 20px;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.contact-form button:hover {
    background-color: #003d80;
}


/* Keyframes for sliding in */
@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===============================================================================================================================================================================
                        SCROLL TO REVEAL
================================================================================================================================================================================ */
.reveal {
    opacity: 0;
    transform: translateX(-50px);
    /* start from left */
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateX(0);
}

/* delay per element */
.reveal.delay {
    transition-delay: 0.5s;
}

/* ===============================================================================================================================================================================
                        BACK TO TOP BUTTON
================================================================================================================================================================================ */
/* Back to Top Button inside .main */
.main #backToTopBtn {
    position: absolute;
    bottom: 30px;
    right: 30px;
    padding: 10px 15px;
    font-size: 20px;
    background-color: #f3f3f3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: none;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.main #backToTopBtn:hover {
    opacity: 1;
}

/* ===============================================================================================================================================================================
                        TYPE WRITER
================================================================================================================================================================================ */
#typewriter::after {
    content: '|';
    animation: blink 0.7s infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* ===============================================================================================================================================================================
                        DARK MODE SETUP
================================================================================================================================================================================ */
/* TOGGLE SWITCH */
.toggle-switch {
    position: absolute;
    right: 20px;
    display: inline-block;
    width: 50px;
    height: 20px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    z-index: 2;
    cursor: pointer;
}

.slider {
    position: relative;
    background-color: #f3f3f3;
    border-radius: 30px;
    transition: background-color 0.4s;
    height: 100%;
    width: 100%;
}

.slider .icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    pointer-events: none;
}

.slider .sun {
    left: 5px;
    opacity: 1;
}

.slider .moon {
    right: 40px;
    opacity: 0;
}

.toggle-switch input:checked+.slider {
    background-color: black;
}

.toggle-switch input:checked+.slider .sun {
    opacity: 0;
    left: 5px;
    transition: left 0.4s, opacity 0.4s;
}

.toggle-switch input:checked+.slider .moon {
    opacity: 1;
    right: 10px;
    transition: right 0.4s, opacity 0.4s;
}

/* ===============================================================================================================================================================================
                                    DARK MODE ACTIVATED
================================================================================================================================================================================ */
/* DARK MODE STYLES */
body.dark-mode {
    background-color: black;
    color: #F9FAFB;
}

body.dark-mode .main {
    background-color: black;
    color: #F9FAFB;
}

body.dark-mode .main-header {
    background-color: black;
    color: #F9FAFB;
}

body.dark-mode .sidebar {
    background-color: black;
    color: #F9FAFB;
}

body.dark-mode .middle-bar {
    background-color: black;
    color: #F9FAFB;
}

body.dark-mode a {
    color: white;
}

body.dark-mode a:hover {
    color: #d1d5db;
    /* light gray for hover */
    text-decoration: underline;
}

body.dark-mode .middle-bar img {
    filter: invert(1);
}

body.dark-mode .main img {
    filter: invert(1);
}

body.dark-mode .main hr {
    filter: invert(1);
}

body.dark-mode .main #backToTopBtn {
    background-color: #f3f3f3;
    color: black;
}

/* ===============================================================================================================================================================================
                                    PREVENT FLASHING WHEN CHANGING PAGES
================================================================================================================================================================================ */
html.dark-mode,
body.dark-mode {
    background-color: black;
    color: #F9FAFB;
}

html.dark-mode .main,
body.dark-mode .main {
    background-color: black;
    color: #F9FAFB;
}

html.dark-mode .sidebar,
body.dark-mode .sidebar {
    background-color: black;
    color: #F9FAFB;
}

html.dark-mode .middle-bar,
body.dark-mode .middle-bar {
    background-color: black;
    color: #F9FAFB;
}

html.dark-mode a,
body.dark-mode a {
    color: white;
}

html.dark-mode a:hover,
body.dark-mode a:hover {
    color: #d1d5db;
    text-decoration: underline;
}

/* ===============================================================================================================================================================================
                    TOOLTIP FOR DARK MODE
================================================================================================================================================================================ */
/* Tooltip */
.toggle-switch .tooltip {
    position: absolute;
    top: 35px;
    right: 0;
    background-color: black;
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(5px);
}

.toggle-switch:hover .tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* ===============================================================================================================================================================================
                    TOOLTIP FOR SCROLL TOP
================================================================================================================================================================================ */
/* Tooltip inside the back-to-top button */
#backToTopBtn .tooltip {
    position: absolute;
    bottom: 120%;
    /* place above the button */
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background-color: black;
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 100;
}

#backToTopBtn:hover .tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}