:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --accent-color: #f5f5f5;
    --header-bg: #dddddd;
    --header-text: #000000;
}

[data-theme="dark"] {
    --bg-color: #000000;
    --text-color: #f0f0f0;
    --accent-color: #1f1f1f;
    --header-bg: #121212;
    --header-text: #ffffff;
}

/* General Styles */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

/* Topbar */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--header-bg);
    color: var(--header-text);
    position: relative;
    z-index: 1000;
    transition: background-color 0.3s, color 0.3s;
}

.toggle-btn,
.hamburger {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: inherit;
    cursor: pointer;
}

/* Hamburger Menu */
.menu {
    display: none;
    flex-direction: column;
    background: var(--header-bg);
    position: absolute;
    right: 1rem;
    top: 4rem;
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s;
}

.menu a {
    padding: 1rem;
    text-decoration: none;
    color: var(--header-text);
    transition: background 0.3s, color 0.3s;
}

.menu a:hover {
    background: var(--accent-color);
}

.menu.show {
    display: flex;
}

/* Hero Section */
.hero {
    position: relative;
    height: 90vh;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    text-align: right;
    padding-right: 5%;
    color: var(--text-color);
    transition: color 0.3s, background-color 0.3s;
    overflow: hidden;
}

/* Parallax image layer */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: url('/static/Women-left.png') left center/cover no-repeat fixed;
    background-attachment: fixed;
    background-position: left center;
    background-repeat: no-repeat;
    background-size: contain;
    z-index: 1;
    opacity: 0.9;
}

/* Hero Content (only text fades) */
.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Text */
.hero h1,
.hero p {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    margin: 0;
}

.hero p {
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

/* Move text lower on mobile */
@media (max-width: 767px) {
    .hero-content {
        margin-top: 12rem;
    }
}

/* Articles Section */
.articles {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 2rem;
}

.article {
    padding: 1rem;
    background: var(--accent-color);
    color: var(--text-color);
    border-radius: 8px;
    transition: background 0.3s, color 0.3s;
}

@media (min-width: 768px) {
    .articles {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Terminal Section */
.terminal {
    background: #000;
    color: #0f0;
    padding: 1rem;
    margin: 2rem;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

/* Terminal Button */
.terminal button {
    background: none;
    border: 1px solid #0f0;
    color: #0f0;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
}

.terminal button:hover {
    background: #0f0;
    color: #000;
}

/* Terminal Content */
.terminal-content {
    display: none;
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
    transition: max-height 0.5s ease;
}

.terminal-content.show {
    display: block;
}

/* Typed Welcome Text */
#typedText {
    margin-bottom: 1rem;
    white-space: pre-wrap;
}

/* Blinking Cursor */
#blinkingCursor {
    font-weight: bold;
    color: #0f0;
    animation: blink 1s step-start infinite;
    margin-left: 2px;
    display: none;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Terminal Form */
#terminalForm {
    display: flex;
    align-items: center;
    margin-top: 1rem;
    font-family: 'Courier New', Courier, monospace;
}

#terminalForm span {
    margin-right: 0.5rem;
}

#terminalForm input {
    background: none;
    border: none;
    color: #0f0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    outline: none;
    width: 100%;
    caret-color: #0f0;
}

/* Terminal Response Section */
#terminalResponse {
    margin-top: 1rem;
}

#terminalResponse p {
    margin: 0.5rem 0;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    background-color: var(--header-bg);
    color: var(--header-text);
    font-size: 0.8rem;
    transition: background-color 0.3s, color 0.3s;
}

/* Theme Toggle Switch */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Switch updated for inside label text */
.switch {
    position: relative;
    display: inline-block;
    width: 100px; /* Wider to fit text */
    height: 30px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: black;
    padding: 0 10px;
}

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

input:checked + .slider {
    background-color: #111111;
    color: #ffffff;
}

input:checked + .slider:before {
    transform: translateX(70px);
}

/* Text inside slider */
.slider-text {
    position: relative;
    z-index: 2;
    pointer-events: none;
}
