/* Color Palette & Variables */
:root {
    --bg-color: #fcfcfc;
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --placeholder-bg: #ededed;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Navigation */
header {
    padding: 4rem 0 3rem;
    margin-bottom: 4rem;
}

.header-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

h1 {
    font-size: 2.2rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.3s ease;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

nav a:hover {
    color: var(--text-muted);
}

/* Section Typography */
h2 {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

section {
    margin-bottom: 5rem;
}

.content-block p {
    max-width: 800px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Projects Gallery Grid */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: var(--placeholder-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.3s ease;
}

/* When you swap placeholders for actual <img> tags, this ensures they fit nicely */
.project-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.project-image-placeholder:hover {
    opacity: 0.8;
    cursor: pointer;
}

.project-card h3 {
    font-size: 1.1rem;
    font-weight: 500;
}

.project-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: left;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    header {
        padding: 3rem 0 2rem;
    }
}

/* --- Dark Mode Variables --- */
[data-theme="dark"] {
    --bg-color: #121212;
    --text-main: #f5f5f5;
    --text-muted: #a0a0a0;
    --border-color: #333333;
    --placeholder-bg: #222222;
}

/* Ensure smooth transition between themes */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- Theme Toggle Button --- */
.header-container {
    position: relative; /* Add this so the toggle positions correctly inside the header */
}

.theme-toggle {
    position: absolute;
    top: 0;
    right: 2rem;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--text-muted);
    transform: scale(1.1);
}

/* Icon toggling logic via CSS */
[data-theme="dark"] .moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: block !important;
}