:root {
    --clr-bg: #FFFFFF;
    --clr-surface: #FFFFFF;
    --clr-text: #1f2933;
    --clr-accent: #214a57;
    --clr-highlight: #2e7680;
    --clr-divider: #d2dde6;
    --clr-nav-bg: #FEFCFD;
    --clr-nav-hover-bg: #FDF8FA;
    --clr-nav-active-bg: #F6E7EC;
    --clr-nav-active-text: #4f3f46;
    --clr-cta-bg: #5a3e4b;

    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;

    --text-xs: 0.72rem;
    --text-sm: 0.86rem;
    --text-base: 1rem;
    --text-md: 1.25rem;
    --text-lg: 2rem;
    --text-massive: clamp(2.6rem, 5.2vw, 4.8rem);

    --container-max: 1176px;
    --content-reading-width: 60ch;
    --outer-gutter: clamp(1.2rem, 3vw, 2.4rem);

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.8rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4.8rem;

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    min-width: 100%;
    font-size: 16px;
    scroll-behavior: smooth;
    background-color: var(--clr-bg);
}

body {
    width: 100%;
    min-width: 100%;
    height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    background-color: var(--clr-bg);
    color: var(--clr-text);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
}

.noise-overlay {
    display: none;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding-inline: var(--outer-gutter);
}

.section-padding {
    padding-block: var(--spacing-xl);
}

.main-nav {
    position: relative;
    z-index: 300;
    background: var(--clr-nav-bg);
    border-bottom: 1px solid var(--clr-divider);
    backdrop-filter: blur(8px);
}

.nav-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0.7rem var(--outer-gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
}

.nav-brand {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--clr-accent);
}

.nav-brand a {
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: var(--text-xs);
    font-weight: 600;
    color: #4d4b4d;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
    background-color: var(--clr-nav-hover-bg);
}

.nav-links a.is-active {
    color: var(--clr-nav-active-text);
    background-color: var(--clr-nav-active-bg);
}

.nav-links a:focus-visible,
.nav-brand a:focus-visible,
.massive-mailto:focus-visible,
.read-paper:focus-visible,
.link-arrow:focus-visible,
.gallery-cta:focus-visible,
.gallery-back-btn:focus-visible,
.cv-download-btn:focus-visible,
.social-links a:focus-visible {
    outline: 2px solid var(--clr-highlight);
    outline-offset: 2px;
}

main {
    width: 100%;
    margin-top: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.site-section {
    background-color: var(--clr-bg);
}

.site-section:nth-of-type(even) {
    background-color: var(--clr-surface);
}

.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 100%;
    min-height: 100%;
}

.hero-layout {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
}

.hero-section .container.hero-layout {
    max-width: none;
    margin: 0;
    padding-inline: 0;
}

.hero-text-content {
    position: relative;
    z-index: 3;
    width: min(var(--container-max), 100%);
    margin: 0 auto;
    max-width: none;
    padding-left: var(--outer-gutter);
    padding-right: var(--outer-gutter);
}

.massive-title {
    display: flex;
    flex-direction: column;
    width: fit-content;
    max-width: 65vw;
    font-family: var(--font-display);
    font-size: var(--text-massive);
    line-height: 1.05;
    font-weight: 500;
    color: var(--clr-accent);
    margin-bottom: var(--spacing-md);
    position: relative;
    z-index: 10;
}

.title-line {
    display: block;
}

.line-left {
    align-self: flex-start;
}

.line-right {
    text-align: right;
}

.line-right:last-child {
    font-style: italic;
}

.welcome-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    text-align: left;
}

.ampersand {
    font-style: italic;
    color: var(--clr-highlight);
}

.hero-subtext {
    max-width: 42ch;
}

.role-tag {
    font-size: var(--text-md);
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--clr-highlight);
    margin-bottom: var(--spacing-xs);
}

.institution {
    font-size: var(--text-xs);
    color: #5b6f7a;
}

.hero-visual {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    z-index: 1;
    pointer-events: none;
}

.hero-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.99) 0%,
            rgba(255, 255, 255, 0.94) 24%,
            rgba(255, 255, 255, 0.64) 48%,
            rgba(255, 255, 255, 0.24) 66%,
            rgba(255, 255, 255, 0.02) 84%,
            rgba(255, 255, 255, 0) 100%);
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    z-index: 1;
}

.hero-portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 48% 12%;
    opacity: 0.9;
    transform: scale(1.01);
    transform-origin: center center;
    border-radius: 0;
    border: none;
    -webkit-mask-image: none;
    mask-image: none;
    transition: transform 0.8s ease, opacity 0.8s ease;
}

.hero-portrait:hover {
    transform: scale(1.09);
    opacity: 1;
}

.section-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    color: var(--clr-accent);
    margin-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--clr-divider);
    padding-bottom: var(--spacing-xs);
}

/* Bio Section Styles */
.bio-section {
    background-color: var(--clr-bg);
}

.bio-content {
    max-width: var(--content-reading-width);
}

.bio-text {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
    color: var(--clr-text);
}

.bio-text em {
    color: var(--clr-highlight);
    font-style: italic;
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(80px, 0.75fr) minmax(280px, 1.25fr);
    gap: var(--spacing-md);
    align-items: start;
}

.about-empty-space {
    border-top: 2px solid var(--clr-divider);
    margin-top: 0.7rem;
}

.lead-text {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--clr-text);
    margin-bottom: var(--spacing-md);
}

.scholar-text {
    font-family: var(--font-body) !important;
    font-size: var(--text-base) !important;
    color: var(--clr-text) !important;
}

.scholar-text em {
    color: var(--clr-highlight);
    font-style: italic;
}

.accent-word {
    color: var(--clr-highlight);
    font-style: italic;
}

.body-text {
    max-width: var(--content-reading-width);
    margin-bottom: var(--spacing-md);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--clr-highlight);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: var(--text-sm);
    letter-spacing: 0.05em;
}

.publications-list {
    display: flex;
    flex-direction: column;
}

.pub-item {
    display: block;
    padding: 1rem;
    border: 1px solid var(--clr-divider);
    border-bottom: none;
    background-color: var(--clr-surface);
}

.pub-item:last-child {
    border-bottom: 1px solid var(--clr-divider);
}

.pub-details {
    width: 100%;
}

.pub-year {
    font-family: var(--font-display);
    font-size: var(--text-md);
    color: var(--clr-highlight);
    font-style: italic;
    display: inline-block;
    margin-right: var(--spacing-md);
}

.pub-title {
    font-family: var(--font-display);
    font-size: var(--text-md);
    color: var(--clr-accent);
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.pub-journal {
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4d606b;
}

.pub-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.read-paper {
    text-decoration: none;
    font-weight: 600;
    color: var(--clr-text);
    white-space: nowrap;
}

.arrow-icon {
    margin-left: 0.15rem;
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--spacing-md);
}

.area-card {
    position: relative;
    border: 1px solid var(--clr-divider);
    padding: var(--spacing-md);
    background-color: var(--clr-surface);
}

.area-number {
    position: absolute;
    top: -0.8rem;
    left: 0.8rem;
    font-family: var(--font-display);
    font-size: var(--text-md);
    color: #a4b4bf;
    background: var(--clr-surface);
    padding-inline: 0.35rem;
}

.area-name {
    font-family: var(--font-display);
    font-size: var(--text-md);
    color: var(--clr-accent);
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.area-desc {
    font-size: var(--text-sm);
}

.gallery-intro {
    max-width: 65ch;
    margin-bottom: var(--spacing-md);
    color: #536874;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-sm);
}

.gallery-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #dde5ec;
    border: 1px solid var(--clr-divider);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: none;
    transform: none;
}

.gallery-teaser-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 220px 220px;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.teaser-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--clr-divider);
    background: #dde5ec;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
}

.teaser-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    z-index: 2;
}

.teaser-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.teaser-item:hover img {
    transform: scale(1.05);
}

.teaser-1 {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.teaser-2 {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.teaser-3 {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
}

.teaser-4 {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

.teaser-1::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 10%, rgba(0, 0, 0, 0.52) 100%);
}

.teaser-label {
    position: absolute;
    left: 0.8rem;
    bottom: 0.8rem;
    color: #ffffff;
    font-size: var(--text-sm);
    letter-spacing: 0.03em;
    font-weight: 600;
}

.gallery-cta-wrap {
    display: flex;
    justify-content: center;
}

.gallery-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4rem;
    padding-inline: 1.1rem;
    border-radius: 999px;
    background: var(--clr-cta-bg);
    color: #ffffff;
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.03em;
}

.gallery-back-wrap {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.gallery-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4rem;
    padding-inline: 1.1rem;
    border-radius: 999px;
    background: var(--clr-cta-bg);
    color: #ffffff;
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.03em;
}

.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.contact-prompt {
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #5b6f7a;
    margin-bottom: var(--spacing-md);
}

.cv-download-card {
    width: min(100%, 460px);
    border: 1px solid var(--clr-divider);
    background: var(--clr-surface);
    border-radius: 10px;
    padding: 1.2rem;
    margin-bottom: 1.1rem;
}

.cv-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--clr-accent);
    margin-bottom: 0.25rem;
}

.cv-subtitle {
    color: #5b6f7a;
    font-size: var(--text-sm);
    margin-bottom: 0.85rem;
}

.cv-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4rem;
    padding-inline: 1rem;
    border-radius: 999px;
    background-color: var(--clr-cta-bg);
    color: #ffffff;
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 600;
}

.mailto-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.massive-mailto {
    display: inline-block;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4.2vw, 2.25rem);
    line-height: 1.08;
    color: var(--clr-accent);
    text-decoration: none;
    border-bottom: 2px solid var(--clr-highlight);
    padding-bottom: 0.15rem;
}

.site-footer {
    position: relative;
    z-index: 250;
    border-top: 1px solid var(--clr-divider);
    background: var(--clr-nav-bg);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    min-height: 48px;
    padding-block: 0.15rem;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.social-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.social-links a {
    text-decoration: none;
    color: var(--clr-text);
}

@media (min-width: 1025px) {
    main {
        scroll-snap-type: y mandatory;
    }

    .site-section {
        min-height: 100%;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
}

@media (max-width: 1024px) {
    .nav-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-links {
        justify-content: flex-start;
    }

    .site-section {
        min-height: auto;
        scroll-snap-align: none;
    }

    .section-padding {
        padding-block: 3.1rem;
    }

    .hero-layout {
        min-height: 100svh;
        height: 100svh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding-top: 15vh;
        gap: var(--spacing-md);
        max-width: none;
        margin: 0;
        padding-inline: 0;
    }

    .hero-section {
        height: 100svh;
        min-height: 100svh;
    }

    .hero-text-content {
        width: 100%;
        margin: 0 auto;
        max-width: var(--container-max);
        padding-inline: var(--outer-gutter);
    }

    .hero-visual {
        position: absolute;
        inset: 0;
        display: flex;
        justify-content: center;
        align-items: flex-end;
        pointer-events: none;
        z-index: 1;
    }

    .hero-visual::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 70%;
        z-index: 2;
        background: linear-gradient(180deg,
            rgba(255, 255, 255, 1) 0%,
            rgba(255, 255, 255, 0.95) 30%,
            rgba(255, 255, 255, 0.6) 60%,
            rgba(255, 255, 255, 0) 100%);
    }

    .image-wrapper {
        width: 100%;
        height: 80%;
        aspect-ratio: auto;
        border-radius: 0;
        border: none;
        box-shadow: none;
        transition: none;
    }

    .image-wrapper:hover {
        transform: none;
        box-shadow: none;
    }

    .hero-portrait {
        object-position: center 10%;
        opacity: 1;
        transform: scale(1.02);
        transition: transform 0.8s ease;
        border-radius: 0;
        border: none;
    }
    
    .image-wrapper:hover .hero-portrait {
        transform: scale(1.02);
    }

    .massive-title {
        width: fit-content;
        max-width: 100%;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-empty-space {
        display: none;
    }

    .pub-item {
        display: block;
        padding: 1rem;
    }

    .pub-action {
        justify-content: flex-start;
    }

    .areas-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-teaser-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 150px 150px 150px;
    }

    .teaser-1 { grid-column: 1 / 3; grid-row: 1 / 2; }
    .teaser-2 { grid-column: 1 / 2; grid-row: 2 / 3; }
    .teaser-3 { grid-column: 2 / 3; grid-row: 2 / 4; }
    .teaser-4 { grid-column: 1 / 2; grid-row: 3 / 4; }

    .footer-content {
        font-size: 0.65rem;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding-block: 2.5rem;
    }

    .section-title {
        margin-bottom: 1.8rem;
    }

    .areas-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-links a {
        font-size: 0.64rem;
        padding: 0.28rem 0.52rem;
    }

    .massive-title {
        font-size: clamp(2.05rem, 10.2vw, 3rem);
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-teaser-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .teaser-1, .teaser-2, .teaser-3, .teaser-4 {
        grid-column: 1 / 2;
        grid-row: auto;
        height: 200px;
    }
    
    .teaser-1 {
        height: 280px;
    }

    .cv-download-card {
        padding: 1rem;
    }
}

body.gallery-page main {
    margin-top: 0;
    scroll-snap-type: none;
}

body.gallery-page .site-section {
    min-height: auto;
    scroll-snap-align: none;
}

body.gallery-page {
    grid-template-rows: minmax(0, 1fr) auto;
}

/* Research Section Styles */
.research-area {
    margin-bottom: var(--spacing-lg);
}

.research-subtitle {
        font-family: var(--font-display);
        font-size: var(--text-md);
        color: var(--clr-accent);
        margin-bottom: var(--spacing-md);
        padding-bottom: var(--spacing-xs);
        border-bottom: 1px solid var(--clr-divider);
    }
    
    .pub-item.highlight {
        background-color: var(--clr-surface);
        border-left: 4px solid var(--clr-highlight);
    }

.pub-desc {
    font-size: var(--text-sm);
    color: #536874;
    margin-top: var(--spacing-xs);
    max-width: var(--content-reading-width);
}

.pub-status {
    font-size: var(--text-sm);
    font-style: italic;
    color: var(--clr-highlight);
}

.pub-authors {
    font-size: var(--text-sm);
    color: #536874;
    margin-top: 0.2rem;
}

.presentation-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.presentation-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: var(--spacing-sm);
    border: 1px solid var(--clr-divider);
    background-color: var(--clr-surface);
}

.conf-year {
    font-family: var(--font-display);
    font-size: var(--text-base);
    color: var(--clr-highlight);
    font-style: italic;
}

.conf-name {
    font-weight: 600;
    color: var(--clr-accent);
}

.conf-paper {
    font-size: var(--text-sm);
    color: #536874;
    font-style: italic;
}

.grant-list,
.fieldwork-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.grant-item,
.fieldwork-item {
    display: flex;
    gap: var(--spacing-sm);
    align-items: baseline;
    padding: 0.5rem;
    border-bottom: 1px solid var(--clr-divider);
}

.grant-year,
.fw-year {
    font-family: var(--font-display);
    font-size: var(--text-base);
    color: var(--clr-highlight);
    font-style: italic;
    min-width: 80px;
}

.grant-name,
.fw-location {
    font-size: var(--text-sm);
}

/* Teaching Section Styles */
.teaching-intro {
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #536874;
    margin-bottom: var(--spacing-md);
}

.courses-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.course-card {
    border: 1px solid var(--clr-divider);
    padding: var(--spacing-md);
    background-color: var(--clr-surface);
}

.course-semester {
    display: inline-block;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--clr-highlight);
    background-color: var(--clr-nav-active-bg);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: var(--spacing-xs);
}

.course-code {
    font-family: var(--font-display);
    font-size: var(--text-md);
    color: var(--clr-accent);
    margin-bottom: 0.2rem;
}

.course-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--clr-text);
    margin-bottom: var(--spacing-xs);
}

.course-desc {
    font-size: var(--text-sm);
    color: #536874;
    line-height: 1.5;
}

.teaching-evaluations {
    margin-top: var(--spacing-lg);
}

.eval-title {
    font-family: var(--font-display);
    font-size: var(--text-md);
    color: var(--clr-accent);
    margin-bottom: var(--spacing-md);
}

.eval-quote {
    font-style: italic;
    color: #536874;
    padding: var(--spacing-sm);
    border-left: 3px solid var(--clr-highlight);
    margin-bottom: var(--spacing-sm);
    background-color: var(--clr-surface);
}

/* Personal Section Styles */
.personal-section {
    background-color: var(--clr-surface);
}

.personal-content {
    max-width: var(--content-reading-width);
}

.personal-content .body-text {
    margin-bottom: var(--spacing-sm);
}

/* CV Section Styles */
.cv-section {
    background-color: var(--clr-surface);
}

.cv-section .section-title {
    width: 100%;
    max-width: min(100%, 460px);
    text-align: center;
}

/* Contact Section Styles */
.contact-info {
    margin: var(--spacing-md) 0;
    text-align: center;
}

.contact-detail {
    font-size: var(--text-sm);
    margin-bottom: 0.3rem;
    color: #536874;
}

.contact-detail a {
    color: var(--clr-highlight);
    text-decoration: none;
}

.contact-detail a:hover {
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .courses-list {
        grid-template-columns: 1fr;
    }

    .grant-item,
    .fieldwork-item {
        flex-direction: column;
        gap: 0.2rem;
    }

    .grant-year,
    .fw-year {
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .presentation-item {
        padding: var(--spacing-xs);
    }
}

/* ─── MOBILE NAVIGATION (hamburger) ─── */
@media (max-width: 640px) {

    /* Esconde os links por padrão no mobile */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 200;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: var(--clr-nav-bg);
        border-bottom: 1px solid var(--clr-divider);
        padding: 0.5rem 0;
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    }

    /* Quando o menu está aberto */
    .nav-links.is-open {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        width: 100%;
        border-radius: 0;
        padding: 0.8rem 1.4rem;
        font-size: var(--text-sm);
        border-bottom: 1px solid rgba(0,0,0,0.04);
    }

    /* Torna a nav relativamente posicionada para o dropdown funcionar */
    .main-nav {
        position: relative;
    }

    /* Botão hamburguer */
    .hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 36px;
        height: 36px;
        padding: 6px;
        background: none;
        border: none;
        cursor: pointer;
        border-radius: 6px;
        transition: background 0.2s;
    }

    .hamburger-btn:hover {
        background: var(--clr-nav-active-bg);
    }

    .hamburger-btn span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--clr-accent);
        border-radius: 2px;
        transition: transform 0.3s ease, opacity 0.3s ease;
        transform-origin: center;
    }

    /* Animação X quando aberto */
    .hamburger-btn.is-open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .hamburger-btn.is-open span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    .hamburger-btn.is-open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* ─── HERO: imagem limpa no topo, texto compacto no rodapé ─── */

    .hero-section {
        height: 70vh;
        min-height: 70vh;
        display: flex;
        align-items: stretch;
        overflow: hidden;
    }

    .hero-visual::before {
        background: linear-gradient(
            to top,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 255, 255, 0.8) 10%,
            rgba(255, 255, 255, 0.4) 22%,
            rgba(255, 255, 255, 0) 35%
        );
        height: 100%;
    }

    .hero-layout {
        align-items: flex-start;
        justify-content: flex-end;
        height: 100%;
        min-height: 70vh;
        padding-top: 0;
        padding-bottom: 0;
        gap: 0;
        z-index: 3;
    }

    .hero-visual {
        inset: 0;
    }

    .image-wrapper {
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
        border-radius: 0;
    }

    .hero-portrait {
        object-position: center 10%;
    }

    .hero-text-content {
        padding-bottom: 0.5rem;
        padding-top: 0;
        z-index: 5;
        position: relative;
    }

    .massive-title {
        max-width: 90vw;
        margin-bottom: 0.35rem;
        line-height: 1.08;
        color: #163540;
        font-weight: 600;
    }

    .welcome-title {
        font-size: clamp(1.3rem, 6.5vw, 2rem);
        max-width: 90vw;
    }

    .hero-subtext .role-tag {
        font-size: var(--text-sm) !important;
        margin-bottom: 0.1rem;
        color: #145560 !important;
        font-weight: 600 !important;
    }

    .hero-subtext .institution {
        font-size: 0.68rem;
        color: #2a3d47;
        font-weight: 500;
    }
}

/* Esconde o botão hamburguer no desktop */
@media (min-width: 641px) {
    .hamburger-btn {
        display: none;
    }
}

