/* Import color system */
@import url('colors.css');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-secondary: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* Default to light theme */
:root {
    data-theme: light;
}

/* When checkbox is checked, set dark theme on root */
:root:has(.theme-switch:checked) {
    data-theme: dark;
}

/* All colors come from colors.css */
body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-700);
    background-color: var(--background-50);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    grid-area: header;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--background-200);
    margin-bottom: 40px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo h1 {
    font-family: var(--font-secondary);
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--primary-600);
    letter-spacing: -0.02em;
}

.nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.nav a {
    text-decoration: none;
    color: var(--text-600);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    letter-spacing: -0.01em;
}

.nav a:hover {
    color: var(--primary-600);
}

/* Theme Toggle */
.theme-toggle {
    position: relative;
}

.theme-switch {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-label {
    background: var(--background-100);
    border: 1px solid var(--background-300);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    position: relative;
    overflow: hidden;
}

.theme-label:hover {
    background: var(--background-200);
    transform: scale(1.05);
}

.theme-icon {
    position: absolute;
    transition: all 0.3s ease;
}

.light-icon {
    opacity: 1;
    transform: translateY(0);
}

.dark-icon {
    opacity: 0;
    transform: translateY(20px);
}

/* When dark mode is active */
.theme-switch:checked+.theme-label .light-icon {
    opacity: 0;
    transform: translateY(-20px);
}

.theme-switch:checked+.theme-label .dark-icon {
    opacity: 1;
    transform: translateY(0);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: -0.01em;
}

.btn-primary {
    background-color: var(--primary-600);
    color: var(--background-50);
}

.btn-primary:hover {
    background-color: var(--primary-700);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-600);
    border: 2px solid var(--primary-600);
}

.btn-secondary:hover {
    background-color: var(--primary-600);
    color: var(--background-50);
    transform: translateY(-1px);
}

/* Image Placeholder */
.image-placeholder {
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

/* Footer */
.footer {
    grid-area: footer;
    background-color: var(--text-800);
    color: var(--background-100);
    padding: 50px 40px;
    margin: 40px -20px 0 -20px;
    border-radius: 16px 16px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1160px;
    margin: 0 auto;
}

.footer-section h4 {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--background-50);
    letter-spacing: -0.01em;
}

.footer-section p {
    font-size: 0.9rem;
    color: var(--background-300);
    line-height: 1.6;
    margin-bottom: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }

    .header-right {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }

    .nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .footer {
        padding: 40px 20px;
        margin: 40px -15px 0 -15px;
    }

    .image-placeholder {
        width: 200px !important;
        height: 200px !important;
    }

    .image-placeholder img {
        border-radius: 16px !important;
    }
}