/* Reset and Base Styles */
:root {
    --bg: #f6f8fb;
    --surface: #ffffff;
    --surface-muted: #f1f5f9;
    --text: #18212f;
    --text-muted: #5d6b7d;
    --line: #d9e2ec;
    --accent: #008f8c;
    --accent-strong: #006d77;
    --accent-soft: #e6f7f6;
    --signal: #c47f00;
    --shadow: 0 18px 45px rgba(24, 33, 47, 0.08);
}

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

body {
    font-family: "Courier New", Courier, monospace;
    line-height: 1.6;
    color: var(--text);
    background:
        linear-gradient(rgba(0, 143, 140, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 143, 140, 0.035) 1px, transparent 1px),
        var(--bg);
    background-size: 48px 48px;
    text-rendering: optimizeLegibility;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
header {
    background-color: rgba(255, 255, 255, 0.92);
    color: var(--text);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(217, 226, 236, 0.9);
    backdrop-filter: blur(14px);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 750;
    letter-spacing: 0;
    color: var(--text);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.35rem;
}

.nav-links a {
    color: var(--text-muted);
    border-radius: 8px;
    padding: 0.45rem 0.7rem;
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 650;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover {
    color: var(--accent-strong);
    background-color: var(--accent-soft);
}

.nav-links a:focus-visible,
.profile-links a:focus-visible,
.project-link a:focus-visible,
.talk-description a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Sections */
.section {
    padding: 3rem 0;
    background-color: rgba(255, 255, 255, 0.72);
}

.section-alt {
    background-color: rgba(241, 245, 249, 0.78);
}

.section h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
    margin-bottom: 1.4rem;
    color: var(--text);
    text-align: center;
    letter-spacing: 0;
}

.section h3 {
    font-size: 1.55rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    gap: 2rem;
    align-items: start;
    max-width: 1040px;
    margin: 0 auto;
    font-size: 1.08rem;
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.about-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.profile-picture {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    box-shadow: 0 14px 30px rgba(24, 33, 47, 0.12);
}

.profile-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.profile-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text);
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.profile-links svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    fill: currentColor;
}

.profile-links a:hover {
    color: var(--accent-strong);
    border-color: var(--accent);
    background-color: var(--accent-soft);
}

/* CV Section */
.cv-section {
    max-width: 980px;
    margin: 0 auto 2rem;
}

.cv-section > h3 {
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.75rem;
}

.cv-item {
    margin-bottom: 0;
    padding: 0.9rem 0 0.9rem 1.1rem;
    border-bottom: 1px solid var(--line);
    border-left: 3px solid var(--accent-soft);
}

.cv-item:last-child {
    border-bottom: none;
}

.cv-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.cv-item h4 {
    font-size: 1.18rem;
    color: var(--text);
}

.cv-date {
    color: var(--signal);
    font-weight: 700;
    font-size: 0.92rem;
}

.cv-company {
    color: var(--accent-strong);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.cv-description {
    color: var(--text-muted);
}

.cv-subsection {
    margin-bottom: 1.5rem;
}

.cv-subsection h4 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.cv-subsection p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Skills */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background-color: var(--accent-soft);
    color: var(--accent-strong);
    border: 1px solid rgba(0, 143, 140, 0.18);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
}

.volunteering-list {
    color: var(--text-muted);
    line-height: 1.8;
    padding-left: 1.1rem;
}

.volunteering-list li {
    margin-bottom: 0.5rem;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.2rem;
    margin-top: 1.4rem;
}

.project-card {
    position: relative;
    background-color: var(--surface);
    padding: 1.15rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(24, 33, 47, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card::before {
    content: "";
    position: absolute;
    top: 1.15rem;
    right: 1.15rem;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background-color: var(--accent);
}

.section-alt .project-card {
    background-color: var(--surface);
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 143, 140, 0.42);
    box-shadow: var(--shadow);
}

.project-card h3 {
    font-size: 1.2rem;
    line-height: 1.25;
    padding-right: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.project-year {
    display: block;
    color: var(--signal);
    font-weight: 750;
    margin-bottom: 0.8rem;
    font-size: 0.86rem;
}

.project-link {
    margin-top: 0.8rem;
    font-size: 0.9rem;
}

.project-link a {
    color: var(--accent-strong);
    text-decoration: none;
    word-break: break-all;
    font-weight: 700;
}

.project-link a:hover {
    text-decoration: underline;
}

.project-description {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background-color: var(--surface-muted);
    color: var(--text);
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 650;
}

/* Talks Section */
.talks-list {
    max-width: 980px;
    margin: 0 auto;
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.talk-item {
    margin-bottom: 0;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--line);
}

.talk-item:last-child {
    border-bottom: none;
}

.talk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.talk-header h3 {
    font-size: 1.18rem;
    line-height: 1.25;
    color: var(--text);
    margin-bottom: 0;
}

.talk-date {
    color: var(--signal);
    font-weight: 750;
    font-size: 0.9rem;
}

.talk-venue {
    color: var(--accent-strong);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.talk-authors {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.talk-description {
    color: var(--text-muted);
    line-height: 1.6;
}

.talk-description a {
    color: var(--accent-strong);
    text-decoration: none;
    word-break: break-all;
    font-weight: 700;
}

.talk-description a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--text);
    color: rgba(255, 255, 255, 0.82);
    text-align: center;
    padding: 2rem 0;
    margin-top: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.35rem;
    }

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

    .about-content {
        grid-template-columns: 1fr;
        gap: 1.4rem;
        padding: 1.25rem;
    }

    .about-profile {
        max-width: 320px;
        margin: 0 auto;
    }

    .cv-item-header,
    .talk-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

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

@media (max-width: 480px) {
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .section {
        padding: 1.75rem 0;
    }

    .section h2 {
        font-size: 1.5rem;
    }

    .about-content {
        padding: 0.9rem;
    }

    .profile-links a {
        font-size: 0.84rem;
        padding: 0.35rem 0.55rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}
