/* =========================================
   Áureo de Paula — Academic Website
   Clean, minimal design inspired by janeeckhout.com
   ========================================= */

:root {
    --color-bg: #fafaf8;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-text-secondary: #555555;
    --color-text-tertiary: #888888;
    --color-accent: #2c4a6e;
    --color-accent-hover: #1a365d;
    --color-accent-light: #e8eef5;
    --color-border: #e2e2de;
    --color-border-light: #eeeeea;
    --color-highlight: #f5f0e8;

    --font-display: 'Source Serif 4', 'Georgia', serif;
    --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;

    --max-width: 920px;
    --header-height: 64px;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 20px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

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

/* ---- HEADER ---- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-inner {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

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

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    transition: all 0.3s ease;
}

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

.nav-links a {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-accent);
    background: var(--color-accent-light);
}

/* ---- MAIN CONTENT ---- */
.page-content {
    flex: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
    width: 100%;
}

/* ---- HERO ---- */
.hero {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    margin-bottom: 3.5rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--color-border-light);
}

.hero-photo {
    flex-shrink: 0;
}

.photo-placeholder {
    width: 400px;
    height: 500px;
    background: var(--color-border-light);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-tertiary);
    gap: 0.5rem;
    border: 1px dashed var(--color-border);
}

.photo-placeholder span {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Photo styling */
.hero-photo img {
    width: 400px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.hero-text h1 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.affiliation {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.25rem;
}

.institutions {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.institutions a {
    color: var(--color-accent);
}

.fields {
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
    margin-bottom: 1.25rem;
    font-style: italic;
}

.hero-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    font-size: 0.825rem;
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    background: var(--color-accent);
    color: #fff;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

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

.btn-outline {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
}

.btn-outline:hover {
    background: var(--color-accent-light);
    color: var(--color-accent-hover);
}

/* ---- HOME SECTIONS ---- */
.home-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--color-border-light);
}

.home-section:last-child {
    border-bottom: none;
}

.home-section h2,
.page-section h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.home-section p {
    margin-bottom: 0.75rem;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.75;
}

/* Talks list */
.talks-list {
    list-style: none;
}

.talks-list li {
    font-size: 0.9rem;
    padding: 0.35rem 0;
    color: var(--color-text-secondary);
}

.talk-date {
    display: inline-block;
    width: 5.5rem;
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--color-text-tertiary);
    font-size: 0.85rem;
}

.see-all {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.75rem;
    color: var(--color-accent);
}

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

/* ---- PUBLICATIONS ---- */
.pub-item {
    margin-bottom: 1.5rem;
    padding-left: 0;
}

.pub-title {
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.2rem !important;
}

.pub-title a {
    color: var(--color-accent);
}

.pub-title a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.pub-authors {
    font-size: 0.875rem;
    color: var(--color-text-tertiary) !important;
    margin-bottom: 0.15rem !important;
}

.pub-journal {
    font-size: 0.875rem;
    color: var(--color-text-secondary) !important;
    margin-bottom: 0.15rem !important;
}

.pub-extra {
    font-size: 0.825rem;
    color: var(--color-text-tertiary) !important;
    margin-top: 0.25rem !important;
}

.pub-extra a {
    color: var(--color-accent);
    font-weight: 500;
}

/* ---- PAGE SECTIONS ---- */
.page-section {
    margin-bottom: 2.5rem;
}

.page-section h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text);
    margin-top: 2rem;
}

.page-section h3:first-child {
    margin-top: 0;
}

.page-section p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.page-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-tertiary);
    margin-bottom: 2.5rem;
    font-style: italic;
}

/* ---- TEACHING TABLE ---- */
.teaching-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.teaching-table th {
    text-align: left;
    font-weight: 500;
    color: var(--color-text-tertiary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.6rem 0.75rem;
    border-bottom: 2px solid var(--color-border);
}

.teaching-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--color-border-light);
    color: var(--color-text-secondary);
    vertical-align: top;
}

.teaching-table td:first-child {
    width: 14rem;
    white-space: nowrap;
}

.teaching-table tr:last-child td {
    border-bottom: none;
}

/* ---- CONTACT ---- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-block h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.contact-block p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* ---- CV PAGE ---- */
.cv-entry {
    margin-bottom: 1.25rem;
}

.cv-entry .cv-period {
    font-size: 0.825rem;
    color: var(--color-text-tertiary);
    font-weight: 500;
}

.cv-entry .cv-role {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
}

.cv-entry .cv-place {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* ---- FULL TALKS LIST ---- */
.talks-full-list {
    list-style: none;
    columns: 2;
    column-gap: 2rem;
}

.talks-full-list li {
    font-size: 0.875rem;
    padding: 0.3rem 0;
    color: var(--color-text-secondary);
    break-inside: avoid;
}

/* ---- FOOTER ---- */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 1.5rem 2rem;
    text-align: center;
    margin-top: auto;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.site-footer p {
    font-size: 0.8rem;
    color: var(--color-text-tertiary);
}

.footer-note {
    margin-top: 0.2rem;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .header-inner {
        padding: 0 1.25rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        padding: 1rem 1.25rem;
        gap: 0;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        display: block;
        padding: 0.6rem 0.75rem;
    }

    .page-content {
        padding: 2rem 1.25rem 3rem;
    }

    .hero {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        text-align: center;
    }

    .hero-photo {
        order: -1;
    }

    .photo-placeholder {
        width: 140px;
        height: 170px;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .hero-links {
        justify-content: center;
    }

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

    .talks-full-list {
        columns: 1;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.5rem;
    }

    .page-title {
        font-size: 1.6rem;
    }
}

/* ---- FADE-IN ANIMATION ---- */
.fade-in {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp 0.5s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero { animation-delay: 0.05s; }
.home-section:nth-child(2) { animation-delay: 0.15s; }
.home-section:nth-child(3) { animation-delay: 0.25s; }
.home-section:nth-child(4) { animation-delay: 0.35s; }

/* Ensure page sections also animate */
.page-section {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp 0.5s ease forwards;
}

.page-section:nth-child(1) { animation-delay: 0.1s; }
.page-section:nth-child(2) { animation-delay: 0.2s; }
.page-section:nth-child(3) { animation-delay: 0.3s; }
.page-section:nth-child(4) { animation-delay: 0.4s; }
.page-section:nth-child(5) { animation-delay: 0.5s; }
