/* =========================================
   1. VARIABLES & DESIGN TOKENS
   ========================================= */
:root {
    /* Colors */
    --color-bg: #ffffff;
    --color-text: #1a1a1a;
    --color-text-light: #555555;
    --color-accent: #333333;
    --color-border: #e0e0e0;

    /* Typography */
    /* We'll use system fonts for now, but these variable allow easy switching later */
    --font-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-mono: 'Courier New', Courier, monospace;

    /* Spacing */
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;
    --spacing-xl: 64px;
}

[data-theme="dark"] {
    --color-bg: #1a1a1a;
    --color-text: #f0f0f0;
    --color-text-light: #aaaaaa;
    --color-accent: #cccccc;
    --color-border: #333333;
    --header-bg: rgba(26, 26, 26, 0.9)
}

/* =========================================
   2. RESET & BASE STYLES
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-weight: 400;
}

p {
    margin: 0 0 var(--spacing-md) 0;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================================
   3. LAYOUT & COMPONENTS
   ========================================= */
.container {
    max-width: 1200px;
    /* Wider container for editorial look */
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    /* Flexbox for layout structure */
    flex-direction: column;
    /* Mobile first stack */
}

@media (min-width: 768px) {
    .container {
        flex-direction: row;
        gap: var(--spacing-lg);
    }

    .left,
    .right {
        flex: 1;
    }

    .middle {
        flex: 3;
    }
}

/* Header */
header {
    /* Sticky Positioning */
    position: sticky;
    top: 0;
    z-index: 100;

    /* Visuals */
    background-color: var(--header-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    /* support Safari cuz its weird */
    border-bottom: 1px solid var(--color-border);

    /* Layout */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    /* Wraps on very small screens */

    padding: var(--spacing-md) var(--spacing-lg);
    /* Reduced vertical padding */
    margin-bottom: var(--spacing-xl);
}

header h1 {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    /* Slightly smaller for balance */
    margin-bottom: 0;
    /* Remove margin so it aligns with nav */
    letter-spacing: -1px;
    text-transform: uppercase;
}

header h1 a {
    color: var(--color-text);
}

nav ul {
    display: flex;
    gap: var(--spacing-lg);
}

nav a {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-light);
    transition: color 0.2s ease, text-decoration 0.2s ease;
    padding: 4px 0;
    /* Touch targets */
}

nav a:hover,
nav a.active {
    color: var(--color-text);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Articles */
article {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--color-border);
}

article:last-child {
    border-bottom: none;
}

article h2 {
    font-family: var(--font-sans);
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

article .meta {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
    display: block;
    /* Ensure it takes its own line */
}

/* Images */
article img {
    width: 100%;
    /* Responsive */
    max-height: 500px;
    object-fit: cover;
    /* Crop nicely */
    margin-bottom: var(--spacing-md);
    /* No utility classes like .type1 anymore */
}

/* Footer */
footer {
    border-top: 1px solid var(--color-border);
    padding: var(--spacing-lg);
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: var(--spacing-xl);
}

/* WORK PAGE */

/* Directory List (Work Page) */
.directory-list {
    margin-top: var(--spacing-lg);
    border-top: 1px solid var(--color-border);
}

.directory-list li {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--color-border);
    font-family: var(--font-mono);
    font-size: 0.95rem;
}

.directory-list .label {
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.directory-list .value {
    color: var(--color-text);
    text-align: right;
}

.directory-list .value:hover {
    text-decoration: underline;
}

.resume-actions {
    margin: 30px 0;
}

.download-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #2c3e50;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.download-btn:hover {
    background-color: #1a252f;
    transform: translateY(-2px); /* lift effect */
}

/* Container that splits the content into columns */
.resume-layout {
    display: flex;
    gap: 40px; /* Space between the text column and the image column */
    align-items: center; /* Vertically aligns the text with the center of the image */
    margin-top: 20px;
}

/* Give both columns equal weight, or adjust flex values as needed */
.resume-text {
    flex: 1;
}

.resume-image {
    flex: 1;
    display: flex;
    justify-content: center; /* Centers the image inside its column */
}

/* Ensures the image stays responsive and looks sharp */
.resume-image img {
    max-width: 100%;
    height: auto;
    max-height: 250px; 
    border-radius: 8px; /* Optional: gives the image soft, rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Optional: adds a soft drop shadow */
}

/* Mobile Responsive Fix: Stacks them on top of each other on smaller screens */
@media (max-width: 768px) {
    .resume-layout {
        flex-direction: column-reverse; /* Puts the image on top, text below on mobile */
        gap: 20px;
    }
    
    .resume-image img {
        max-height: 300px; /* Slightly smaller limit for mobile phones */
    }
}

.play-button {
    background: none;
    border: 2px solid var(--color-text);
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 8px 16px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.play-button:hover {
    background-color: var(--color-text);
    color: var(--color-bg);
}

.project-card img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    background: #f0f0f0;
    margin-bottom: var(--spacing-md);
}