/* CSS Variables for Theme Management */
:root {
    /* Dark theme (default) */
    --bg-color: #000000;
    --text-color: #ffffff;
    --link-color: #4a9eff;
    --link-hover-color: #6bb3ff;

    /* Typography */
    --font-mono: 'SF Mono', 'Monaco', 'Consolas', 'Courier New', Courier, monospace;
    --font-size-base: 16px;
    --line-height: 1.6;
    --font-weight-normal: 500;
    --font-weight-bold: 600;

    /* Spacing */
    --spacing-xs: 0.4rem;
    --spacing-sm: 0.65rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.4rem;
}

/* Light theme */
[data-theme="light"] {
    --bg-color: #ffffff;
    --text-color: #000000;
    --link-color: #0066cc;
    --link-hover-color: #0052a3;
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-mono);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height);
    transition: background-color 0.3s ease, color 0.3s ease;
    padding: 2.5rem 3rem;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.container {
    max-width: 850px;
    margin: 0 auto;
    width: 100%;
}

/* Typography */
p {
    margin-bottom: 0.5rem;
    font-weight: var(--font-weight-normal);
}

h2 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: underline;
    font-weight: var(--font-weight-normal);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--link-hover-color);
}

a:focus {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

/* Sections */
section {
    margin-bottom: var(--spacing-lg);
}

.intro {
    margin-bottom: var(--spacing-md);
    font-weight: var(--font-weight-bold);
}

.intro p {
    font-weight: var(--font-weight-bold);
}

.current-work {
    margin-bottom: var(--spacing-md);
}

.previous-work {
    margin-bottom: var(--spacing-md);
}

.social-links {
    margin-bottom: var(--spacing-lg);
}

.social-links p {
    margin-bottom: 0.3rem;
}

/* Projects */
.projects {
    margin-bottom: var(--spacing-lg);
}

/* Other Endeavours */
.other-endeavours {
    margin-bottom: var(--spacing-lg);
}

.project {
    margin-bottom: var(--spacing-md);
}

.project p {
    margin-bottom: 0.3rem;
}

.project-links {
    margin-top: 0.5rem;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.project-links a {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--link-color);
    text-decoration: none;
    line-height: 1.5;
    transition: all 0.2s ease;
}

.project-links a:hover {
    background-color: var(--link-color);
    color: var(--bg-color);
}

/* CTA */
.cta {
    margin-bottom: var(--spacing-md);
}

.cta a {
    text-decoration: underline;
    transition: color 0.2s ease;
}

/* Theme toggle button */
#theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-family: var(--font-mono);
    font-size: var(--font-size-base);
    cursor: pointer;
    padding: 0;
    margin-top: var(--spacing-lg);
    transition: color 0.2s ease;
    text-align: left;
}

#theme-toggle:hover {
    color: var(--link-color);
}

#theme-toggle:focus {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

footer {
    margin-top: var(--spacing-lg);
    padding-top: 0;
}

/* Responsive design */
@media (max-width: 768px) {
    :root {
        --font-size-base: 15px;
    }

    body {
        padding: 2rem 2rem;
    }
}

@media (max-width: 480px) {
    :root {
        --font-size-base: 14px;
    }

    body {
        padding: 1.5rem 1.5rem;
    }
}

/* Adjust for smaller viewports */
@media (max-height: 800px) {
    :root {
        --font-size-base: 15px;
        --spacing-lg: 1.2rem;
        --spacing-md: 0.8rem;
    }

    body {
        padding: 2rem 2.5rem;
    }
}

/* Larger screens - more generous spacing */
@media (min-height: 1000px) {
    :root {
        --font-size-base: 17px;
        --spacing-lg: 1.6rem;
    }

    body {
        padding: 3rem 3.5rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* Print styles */
@media print {
    body {
        background-color: white;
        color: black;
    }

    a {
        color: blue;
        text-decoration: underline;
    }

    #theme-toggle {
        display: none;
    }
}
