/* Design System Variables */
:root {
    /* Colors - Rose Pine Dawn Palette */
    --bg-primary: #fffaf3;
    --bg-secondary: #f2e9e1;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #606060;
    --text-muted: #9ca3af;
    --accent-primary: #1d7373;
    --accent-secondary: #207d7d;
    --accent-light: #e0f2f1;
    --border-light: #e6e6e6;
    --border-medium: #d1d5db;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md:
        0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg:
        0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl:
        0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Typography */
    --font-sans:
        "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
    --font-mono: "Source Code Pro", "Fira Code", "Cascadia Code", monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Container */
    --container-max: 1200px;
    --container-padding: var(--space-lg);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    font-size: 16px;
    margin: 0;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--space-md);
}

h1 {
    font-size: 2.5rem;
}
h2 {
    font-size: 2rem;
}
h3 {
    font-size: 1.5rem;
}
h4 {
    font-size: 1.25rem;
}
h5 {
    font-size: 1.125rem;
}
h6 {
    font-size: 1rem;
}

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

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

a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* Navigation */
.topNav {
    background: linear-gradient(
        135deg,
        var(--accent-primary) 0%,
        var(--accent-secondary) 100%
    );
    box-shadow: var(--shadow-md);
    top: 0;
    z-index: 100;
    padding: 0;
}

.topNav a {
    display: inline-block;
    padding: var(--space-lg) var(--space-xl);
    color: white;
    font-weight: 500;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.topNav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.topNav a:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.topNav a:hover::after {
    width: 80%;
}

.topNav a:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: -2px;
    background: rgba(255, 255, 255, 0.1);
}

.topNav a:focus::after {
    width: 80%;
}

/* Page Layout */
#page {
    display: block;
    width: 100%;
}

/* Hero Section */
.hero {
    padding: var(--space-3xl) 0;
    background: linear-gradient(
        135deg,
        var(--bg-primary) 0%,
        var(--bg-secondary) 100%
    );
}

.hero-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(
        135deg,
        var(--accent-primary),
        var(--accent-secondary)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: var(--space-lg);
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: var(--space-xl);
    color: var(--text-secondary);
}

.hero-stats {
    display: flex;
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.stat {
    text-align: left;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.headshot {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-xl);
    border: 4px solid white;
    transition: transform 0.3s ease;
}

.headshot:hover {
    transform: scale(1.05) rotate(4deg);
}

/* Section Styles */
section {
    padding: var(--space-3xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-2xl);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Skills Section */
.skills-section {
    background: var(--bg-card);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.skill-category {
    background: var(--bg-primary);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.skill-category h3 {
    color: var(--accent-primary);
    margin-bottom: var(--space-lg);
    font-size: 1.25rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.skill-tag {
    background: var(--accent-light);
    color: var(--accent-primary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.skill-tag:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

/* Experience Section */
.experience-card,
.education-card {
    background: var(--bg-card);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    max-width: 800px;
    margin: 0 auto;
}

.experience-header {
    margin-bottom: var(--space-lg);
}

.experience-header h3 {
    color: var(--accent-primary);
    margin-bottom: var(--space-sm);
}

.company,
.university {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: var(--space-md);
}

.duration,
.gpa,
.graduation {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.experience-highlights {
    list-style: none;
    padding: 0;
}

.experience-highlights li {
    padding: var(--space-sm) 0;
    padding-left: var(--space-lg);
    position: relative;
    color: var(--text-secondary);
}

.experience-highlights li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

.experience-highlights strong {
    color: var(--accent-primary);
    font-weight: 600;
}

/* Education Section */
.education-section {
    background: var(--bg-secondary);
}

.education-details {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    align-items: center;
    margin-top: var(--space-md);
}

/* Contact Section */
.contact-links {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-card);
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-weight: 500;
}

.contact-link:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    background: var(--accent-primary);
    color: white;
}

.contact-icon {
    font-size: 1.2rem;
}

/* Status Section */
.status-section {
    background: var(--accent-light);
    padding: var(--space-xl) 0;
}

.status-card {
    background: var(--bg-card);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    text-align: center;
    border-left: 4px solid var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.status-card p {
    margin: 0;
    color: var(--text-secondary);
}

/* Cookie Notice */
#cookies {
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    position: fixed;
    bottom: var(--space-md);
    right: var(--space-md);
    max-width: 300px;
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    z-index: 1000;
}

.close_cookies_btn {
    position: absolute;
    top: var(--space-xs);
    right: var(--space-sm);
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.close_cookies_btn:hover {
    color: var(--text-primary);
}

/* Articles Page Styles */
.article_list {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-xl) 0;
}

.article_thumbnail {
    background: var(--bg-card);
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.3s ease;
}

.article_thumbnail:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.article_thumbnail_title {
    background: var(--bg-secondary);
    padding: var(--space-lg);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

.article_thumbnail_teaser {
    padding: var(--space-lg);
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Articles Header Section */
.articles-header {
    background: linear-gradient(
        135deg,
        var(--bg-primary) 0%,
        var(--bg-secondary) 100%
    );
    padding: var(--space-2xl) 0;
    text-align: center;
}

.articles-description {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.articles-section {
    padding: var(--space-2xl) 0;
}

/* Article Section Wrapper */
.article-section {
    background: var(--bg-primary);
    padding: var(--space-2xl) 0;
    min-height: 70vh;
}

/* Article Content Styles */
.article {
    max-width: 800px;
    margin: var(--space-xl) auto;
    padding: var(--space-xl);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    line-height: 1.7;
    position: relative;
}

.article-date {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 400;
    text-align: right;
}

.article h1,
.article h2,
.article h3,
.article h4,
.article h5,
.article h6 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.article h1 {
    border-bottom: 2px solid var(--accent-primary);
    padding-bottom: var(--space-sm);
}

.article blockquote {
    margin: var(--space-lg) 0;
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent-primary);
    border-radius: var(--radius-md);
    font-style: italic;
}

.article code {
    background: var(--bg-secondary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.article pre {
    background: var(--bg-secondary);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: var(--space-lg) 0;
}

.article pre code {
    background: none;
    padding: 0;
}

/* Animations */
@keyframes slideInFromUnder {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.headshot_txt > div > div {
    opacity: 0;
    animation: slideInFromUnder 0.6s ease forwards;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-xl);
    }

    .hero-title {
        font-size: 3rem;
    }

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

@media (max-width: 768px) {
    :root {
        --container-padding: var(--space-md);
    }

    .hero {
        padding: var(--space-xl) 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        justify-content: center;
        gap: var(--space-lg);
    }

    .headshot {
        width: 200px;
        height: 200px;
    }

    .section-title {
        font-size: 2rem;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .topNav {
        text-align: center;
    }

    .topNav a {
        padding: var(--space-md) var(--space-lg);
        font-size: 1rem;
    }

    section {
        padding: var(--space-xl) 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .experience-card,
    .education-card {
        padding: var(--space-lg);
    }

    .article-date {
        position: static;
        text-align: center;
        margin-bottom: var(--space-md);
        padding-bottom: var(--space-sm);
        border-bottom: 1px solid var(--border-light);
    }

    .education-details {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    #cookies {
        left: var(--space-sm);
        right: var(--space-sm);
        max-width: none;
    }
}

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

    .topNav,
    #cookies,
    .status-section {
        display: none;
    }

    .hero {
        background: white;
    }

    .article {
        box-shadow: none;
        background: white;
    }
}

/* Focus States for Accessibility */
a:focus,
button:focus,
.contact-link:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --bg-primary: #ffffff;
        --bg-secondary: #f5f5f5;
        --text-primary: #000000;
        --text-secondary: #333333;
        --accent-primary: #0066cc;
        --border-light: #666666;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
