/* DARK MODE STYLES */
body {
    background-color: #ffffff !important;
    color: #000000 !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

/* Text colors */
p, div, span, li, h1, h2, h3, h4, h5, h6 {
    color: #000000;
}

body.dark-mode p, 
body.dark-mode div, 
body.dark-mode span, 
body.dark-mode li, 
body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4, 
body.dark-mode h5, 
body.dark-mode h6 {
    color: #e0e0e0;
}

/* Links */
a {
    color: #000000;
}

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

/* Dark mode toggle container */
.dark-mode-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Bitter", system-ui;
    font-size: 1em;
    color: var(--text-color);
    cursor: pointer;
}

.dark-mode-toggle-container label {
    cursor: pointer;
    margin: 0;
}

/* Material UI-style Toggle Switch (33% smaller) */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 39px;
    height: 25px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.38);
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12.5px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 13px;
    width: 13px;
    left: 6px;
    bottom: 6px;
    background-color: #fafafa;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0px 2px 1px -1px rgba(0,0,0,0.2), 
                0px 1px 1px 0px rgba(0,0,0,0.14), 
                0px 1px 3px 0px rgba(0,0,0,0.12);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: rgba(25, 118, 210, 0.5);
}

body.dark-mode .toggle-switch input:checked + .toggle-slider {
    background-color: rgba(144, 202, 249, 0.5);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(13px);
    background-color: #1976d2;
}

body.dark-mode .toggle-switch input:checked + .toggle-slider:before {
    background-color: #90caf9;
}

body.dark-mode .toggle-slider {
    background-color: rgba(255, 255, 255, 0.38);
}

body.dark-mode .toggle-slider:before {
    background-color: #bdbdbd;
}

/* Desktop toggle positioning */
#dark-mode-toggle-desktop {
    margin-left: auto;
}

/* Mobile toggle styling */
#dark-mode-toggle-mobile {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Fix navbar toggler icon in dark mode only - keep Bootstrap's default centering */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

body.dark-mode .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(224, 224, 224, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* TYPOGRAPHY */
.main-headline {
    font-family: "Abril Fatface", system-ui;
    font-weight: 400;
    font-size: 3em;
    font-style: normal;
    letter-spacing: .04em;
    color: #000000;
  }

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

.header-text {
    font-family: "Bitter", system-ui;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    font-size: 1.8em;
    letter-spacing: .025em;
    line-height: 1.65em;
    word-spacing: .05em;
    color: #000000;
}

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

.subheader-text {
    font-family: "Bitter", system-ui;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    font-size: 1em;
    letter-spacing: .025em;
    line-height: 1em;
    word-spacing: .05em;
    color: #000000;
}

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

.body-text {
    font-family: "Bitter", system-ui;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: 1.1em;
    letter-spacing: .025em;
    line-height: 1.65em;
    word-spacing: .05em;
    color: #000000;
}

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

.josefin-sans-400 {
    font-family: "Josefin Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
  }

  @media (max-width: 950px) {
    .main-headline {
        font-size: 2em;
    }

    .header-text {
        font-size: 1.3em;
    }

    .subheader-text {
        font-size: 1em;
    }

    .body-text {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .main-headline {
        font-size: 1.75em;
    }

    .header-text {
        font-size: 1.2em;
    }

    .body-text {
        font-size: 0.95em;
        line-height: 1.55em;
    }
}


/* OVERALL SECTIONS, NAV, FOOTER */
body {
    margin: 0;
    position: relative;
    padding-left: 75px;
    padding-right: 75px;
}

#navbar {
    height: 100px;
    background-color: #ffffff !important;
    transition: background-color 0.3s ease;
}

body.dark-mode #navbar {
    background-color: #1a1a1a !important;
}

#navbar .navbar-brand,
#navbar .nav-link {
    color: #000000 !important;
}

body.dark-mode #navbar .navbar-brand,
body.dark-mode #navbar .nav-link {
    color: #e0e0e0 !important;
}

nav div ul {
    padding: 20px;
    margin-left: 20px;
    margin-right: 20px;
}

.main {
    margin-left: auto;
    margin-right: auto;
    max-width: 800px;
    padding-left: 20px;
    padding-right: 20px;
}

.header-text {
    margin-top: 50px;
    margin-bottom: 5px;
}

footer {
    height: 100px;
    align-content: center;
}

footer p {
    color: #000000;
}

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

/* 
Only use for single page layout:

button, a {
    cursor: pointer;
} 
*/

@media (max-width: 950px) {
    body {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .main {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Fix navbar spacing on mobile */
    #navbar {
        height: auto;
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        left: 0 !important;
        right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }
    
    #navbar .navbar-brand {
        padding-left: 0 !important;
        margin-left: 0 !important;
    }
    
    #navbar .navbar-collapse {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    nav div ul {
        padding: 10px 0;
        margin-left: 0;
        margin-right: 0;
    }
    
    .header-text {
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    body {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Fix navbar spacing on small mobile */
    #navbar {
        padding-left: 15px !important;
        padding-right: 15px !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        left: 0 !important;
        right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }
    
    .header-text {
        margin-top: 25px;
        margin-bottom: 10px;
    }
    
    footer {
        height: auto;
        padding: 20px 0;
    }
}


/* HEADER SECTIONS */
.header {
    padding-top: 50px; 
    padding-bottom: 50px;
    background-color: #fafafa; 
    width: 100vw;
    margin-top: 100px;  
    margin-left: -75px;
    position: relative;
    left: 0;
    transition: background-color 0.3s ease;
}

body.dark-mode .header {
    background-color: #0a0a0a;
}

.header-content {
    display: flex;
    margin-left: auto;
    margin-right: auto;
    max-width: 800px;
    padding-left: 75px;
    padding-right: 75px;
}

.headline {
    margin-right: 50px;
    min-width: 200px; 
}

#index-header .header-content {
    align-items: center;
    justify-content: flex-start;
}

#resume-header .header-content {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

@media (max-width: 950px) {
    .header {
        margin-left: -20px;
        margin-top: 70px;
        padding-top: 30px;
        padding-bottom: 30px;
    }
    
    .header-content {
        padding-left: 20px;
        padding-right: 20px;
        margin-left: 0;
        margin-right: 0;
        margin-top: 0;
        margin-bottom: 0;
        flex-wrap: wrap;
        flex-direction: column-reverse;
    }
    
    .headline {
        margin-right: 0;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .header {
        margin-left: -15px;
        margin-top: 60px;
        padding-top: 20px;
        padding-bottom: 20px;
    }
    
    .header-content {
        padding-left: 15px;
        padding-right: 15px;
    }
}


/* MAIN SECTIONS */
/* Index */
#see-more ul {
    list-style-type: none;
    margin-left: -35px;
}

.index-links ul li a {
    color: #000000;
    text-decoration: underline;
}

body.dark-mode .index-links ul li a {
    color: #e0e0e0;
}

a:hover {
    opacity: 0.8;
}

#contact-form div {
    margin-top: 0;
    margin-bottom: 10px;
}

#message {
    width: 90%;
    max-width: 400px;
}

#index-image {
    margin: 20px;
}

#index-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 950px) {
    #index-image {
        margin: 0 0 20px 0;
        width: 100%;
        text-align: center;
    }
    
    #index-image img {
        max-width: 250px;
        margin: 0 auto;
    }
    
    #see-more ul {
        margin-left: 0;
        padding-left: 20px;
    }
}

@media (max-width: 480px) {
    #index-image img {
        max-width: 200px;
    }
    
    #contact-form input[type="email"],
    #contact-form input[type="text"],
    #message {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Goals removed */

/* Resume */
.position {
    margin-bottom: 75px;
}

.position-info {
    margin-bottom: 30px;
}

.summary p {
    margin-top: 0;
}

hr.divider {
    border: 0;
    border-top: 1px solid #ddd;
    margin: 0 0 50px 0;
}

body.dark-mode hr.divider {
    border-top: 1px solid #444;
}

@media (max-width: 950px) {
    .position {
        margin-bottom: 40px;
    }
    
    .position-info {
        margin-bottom: 20px;
    }

    hr.divider {
        margin: 0 0 30px 0;
    }
}

@media (max-width: 480px) {
    .position {
        margin-bottom: 35px;
    }
    
    .position-info {
        margin-bottom: 15px;
    }

    hr.divider {
        margin: 0 0 25px 0;
    }
}

