:root {
    --favorite-purple: #6D2EAD;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #383438;
    color: #ffffff;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
    min-height: 800px;
}

/* Header styles updated for flexbox layout */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    color: white;
    padding: 10px 20px;
    min-height: 70px;
    flex-wrap: wrap;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 30px; /* Space between nav and clock */
}

a {
    color: #87aacc;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

a:hover {
    color: #6d8ca8;
    text-decoration: underline;
}

header h1 {
    font-family: 'Merriweather', serif;
    margin: 0;
    font-size: 1.5em;
}

header h1 a {
    color: white;
    text-decoration: none;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
    transition: color 0.3s ease-in-out;
}

nav ul li a:hover, header .highlight, header .current a {
    color: var(--favorite-purple);
    font-weight: bold;
}

/* === Homepage Profile Section Styles === */
.profile-container {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-top: 40px;
}

.profile-pic {
    width: 480px;
    max-width: 100%;
    height: auto;
    border-radius: 15px;
}

.text-container {
    display: flex;
    flex-direction: column;
}

h2.description {
    font-size: 48px;
    margin: 8px 0;
}

p.description {
    font-size: 16px;
    color: lightgray;
    margin: 8px 0;
}

.rainbow-text {
    background-image: linear-gradient(90deg, rgba(255,59,116,1) 5%, rgba(226,47,177,1) 32%, rgba(210,53,233,1) 58%, rgba(135,70,187,1) 87%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 8px rgba(255, 255, 0, 0.2);
}

.text-container > :last-child {
    margin-bottom: 0;
}

/* === Clock & Switch Widget Styles === */
.clock-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.clock-link {
    display: block;
    width: 390px;
    height: 60px;
}

.clock-link:hover {
    text-decoration: none;
}

.clock-iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}

.switch-container {
    position: relative;
    display: inline-block;
    width: 24px;  /* Swapped from 50px */
    height: 50px; /* Swapped from 24px */
}

.mode-switch-checkbox {
    opacity: 0;
    width: 0;
    height: 0;
}

.mode-switch-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: .4s;
    border-radius: 24px;
}

.mode-switch-label:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.mode-switch-checkbox:checked + .mode-switch-label {
    background-color: #555;
}

.mode-switch-checkbox:checked + .mode-switch-label:before {
    transform: translateY(-26px); /* Changed from translateX(26px) */
}

/* === Generic Element Styles === */
p {
    margin-bottom: 20px;
    line-height: 25px;
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 10px;
}

/* === Footer Styles === */
footer {
    padding: 20px;
    margin-top: 20px;
    color: #ccc;
    background: none;
    text-align: center;
}

/* === Responsive Adjustments === */
@media (max-width: 960px) {
    header {
        flex-direction: column;
        justify-content: center;
        gap: 20px;
    }

    .profile-container {
        flex-direction: column;
        text-align: center;
    }
}
