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

:root {
    --color-text: #1a1a1a;
    --color-text-light: #555;
    --color-bg: #fafafa;
    --color-bg-alt: #f0f0f0;
    --color-accent: #2a7d6e;
    --color-accent-hover: #1f5f54;
    --color-accent-light: #e8f4f2;
    --color-highlight: #d4a574;
    --color-border: #ddd;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-serif: Georgia, 'Times New Roman', serif;
    --max-width: 1100px;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Header & Navigation */
header {
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    padding-bottom: 0.25rem;
    border-bottom: 2px solid var(--color-highlight);
}

.logo:hover {
    color: var(--color-accent);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav ul a {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

nav ul a:hover {
    color: var(--color-accent);
}

nav ul a.active {
    color: var(--color-accent);
    font-weight: 500;
}

/* Main Content */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    border-bottom: 3px solid var(--color-accent);
    margin-bottom: 3rem;
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.hero h1::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--color-highlight);
    opacity: 0.4;
    z-index: -1;
}

.tagline {
    font-size: 1.25rem;
    color: var(--color-text-light);
    max-width: 600px;
}

/* Page Headers */
.page-header {
    padding: 3rem 0;
    border-bottom: 3px solid var(--color-accent);
    margin-bottom: 3rem;
}

.page-header h1 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.page-header h1::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--color-highlight);
    opacity: 0.4;
    z-index: -1;
}

/* Sections */
section {
    margin-bottom: 4rem;
}

section h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.note {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.article-card {
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #fff;
    border-left: 3px solid transparent;
}

.article-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border-left-color: var(--color-accent);
    transform: translateY(-2px);
}

.article-card .category {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

.article-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.article-card h3 a {
    color: var(--color-text);
}

.article-card h3 a:hover {
    color: var(--color-accent);
}

.article-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

.article-card .date {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: 1rem;
}

/* Featured Cards with Images */
.featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.featured-card {
    padding: 0;
    overflow: hidden;
    border-left: none;
}

.featured-card:hover {
    border-left-color: transparent;
}

.featured-card .card-image {
    display: block;
    overflow: hidden;
}

.featured-card .card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-card:hover .card-image img {
    transform: scale(1.05);
}

.featured-card .card-content {
    padding: 1.25rem;
}

.featured-card .card-content h3 {
    margin-bottom: 0.5rem;
}

.featured-card .card-content p {
    font-size: 0.85rem;
}

.view-all {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    background: var(--color-accent-light);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.view-all:hover {
    background: var(--color-accent);
    color: #fff;
}

/* Loading & Error States */
.loading {
    text-align: center;
    color: var(--color-text-light);
    padding: 3rem;
    grid-column: 1 / -1;
}

.error {
    text-align: center;
    padding: 2rem;
    background: var(--color-bg-alt);
    border-radius: 8px;
}

/* Videos Page */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.video-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.video-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.video-card h3 {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 1.1rem;
}

.video-card p {
    padding: 0 1.5rem 1.5rem;
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.video-card .video-date {
    font-size: 0.8rem;
    padding-bottom: 0.5rem;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-placeholder {
    aspect-ratio: 16/9;
    background: var(--color-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--color-border);
}

.video-card.placeholder {
    border-style: dashed;
}

/* CV Page */
.cv-content {
    max-width: 700px;
}

.cv-section {
    margin-bottom: 3rem;
}

.cv-section h2 {
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-sans);
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-accent);
    color: var(--color-accent);
}

.cv-item {
    margin-bottom: 2rem;
}

.cv-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.25rem;
}

.cv-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.cv-date {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.cv-role {
    font-style: italic;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.cv-bullets {
    margin-top: 0.75rem;
    margin-left: 1.25rem;
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.cv-bullets li {
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

.skills-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skills-list li {
    background: var(--color-accent-light);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid var(--color-accent);
    color: var(--color-accent-hover);
}

/* Contact Page */
.contact-content {
    max-width: 600px;
}

.contact-item {
    margin-bottom: 2.5rem;
}

.contact-item h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    color: var(--color-accent);
    font-weight: 600;
}

.contact-item p,
.contact-item a {
    font-size: 1.1rem;
}

.social-links {
    list-style: none;
}

.social-links li {
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    border-top: 3px solid var(--color-accent);
    padding: 2rem;
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.85rem;
    background: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    nav {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        gap: 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1.1rem;
    }

    main {
        padding: 1.5rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .cv-header {
        flex-direction: column;
    }

    .cv-date {
        margin-top: 0.25rem;
    }
}
