:root {
    --bg: #f5f8f9;
    --panel: #ffffff;
    --ink: #152129;
    --ink-soft: #44555f;
    --line: #dce4e8;
    --teal: #0e6e78;
    --teal-deep: #0a4c54;
    --teal-darker: #073a40;
    --amber: #d99a3d;
    --mono: "IBM Plex Mono", monospace;
    --sans: "IBM Plex Sans", sans-serif;
    --display: "Archivo", sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--teal);
    color: #fff;
}

.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- NAV ---------- */
nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--teal-deep);
    box-shadow: 0 2px 14px rgba(7, 58, 64, 0.25);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.nav-logo b {
    color: var(--amber);
    font-weight: 500;
}

.nav-links {
    display: flex;
    gap: 26px;
}

.nav-links a {
    text-decoration: none;
    color: #bfd9dc;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: #fff;
}

a:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 3px;
    border-radius: 2px;
}

@media (max-width: 700px) {
    .nav-links {
        display: none;
    }
}

/* ---------- HERO ---------- */
header {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

#net {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.55;
}

.hero {
    position: relative;
    z-index: 1;
    padding: 88px 24px 84px;
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 56px;
    align-items: center;
}

@media (max-width: 860px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 56px 24px 64px;
        gap: 44px;
    }
}

.eyebrow {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--teal-deep);
    letter-spacing: 0.06em;
    margin-bottom: 18px;
}

.hero h1 {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(2.8rem, 7vw, 4.8rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
}

.hero h1 span {
    color: var(--teal);
}

.hero-text p {
    margin-top: 24px;
    max-width: 52ch;
    font-size: 1.08rem;
    color: var(--ink-soft);
}

.hero-tags {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    font-family: var(--mono);
    font-size: 0.78rem;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink-soft);
    padding: 6px 12px;
    border-radius: 999px;
}

.hero-cta {
    margin-top: 36px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 22px;
    border-radius: 8px;
    transition:
        transform 0.15s,
        box-shadow 0.15s;
}

.btn-primary {
    background: var(--teal);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(14, 110, 120, 0.28);
}

.btn-ghost {
    border: 1px solid var(--line);
    color: var(--ink);
    background: var(--panel);
}

.btn-ghost:hover {
    border-color: var(--teal);
    color: var(--teal);
}

/* ---------- PHOTO ---------- */
.portrait {
    position: relative;
    justify-self: center;
    width: min(300px, 72vw);
}

.portrait::before {
    content: "";
    position: absolute;
    inset: -14px -14px auto auto;
    width: 64%;
    height: 64%;
    border: 2px solid var(--amber);
    border-radius: 18px;
    z-index: 0;
}

.portrait::after {
    content: "";
    position: absolute;
    bottom: -14px;
    left: -14px;
    width: 52%;
    height: 44%;
    background: var(--teal);
    opacity: 0.12;
    border-radius: 18px;
    z-index: 0;
}

.portrait-frame {
    position: relative;
    z-index: 1;
    aspect-ratio: 4/5;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(160deg, #dfebec, #c4d8db);
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(7, 58, 64, 0.16);
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portrait-info {
    margin-top: 26px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.portrait-info strong {
    font-family: var(--display);
    font-weight: 700;
    font-size: 0.98rem;
}

.portrait-info span {
    font-family: var(--mono);
    font-size: 0.73rem;
    color: var(--ink-soft);
}

/* Celular: card compacto com foto à esquerda e textos à direita */
@media (max-width: 860px) {
    .portrait {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 18px;
        background: var(--panel);
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 14px;
        box-shadow: 0 8px 24px rgba(7, 58, 64, 0.08);
    }

    .portrait::before,
    .portrait::after {
        display: none;
    }

    .portrait-frame {
        flex: 0 0 auto;
        width: 104px;
        aspect-ratio: 4/5;
        border-radius: 10px;
        box-shadow: none;
    }

    .portrait-info {
        margin-top: 0;
        text-align: left;
        gap: 5px;
        min-width: 0;
    }

    .portrait-info strong {
        font-size: 1.02rem;
    }
}

/* ---------- SECTIONS ---------- */
section {
    padding: 84px 0;
}

section+section {
    border-top: 1px solid var(--line);
}

.sec-label {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--teal-deep);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

h2 {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.7rem, 3.4vw, 2.3rem);
    letter-spacing: -0.01em;
    margin-bottom: 28px;
}

.lead {
    max-width: 64ch;
    color: var(--ink-soft);
}

.lead+.lead {
    margin-top: 16px;
}

.lead strong {
    color: var(--ink);
}

/* ---------- STATS ---------- */
.stats {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 720px;
}

@media (max-width: 640px) {
    .stats {
        grid-template-columns: 1fr 1fr;
    }
}

.stat {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px 22px;
}

.stat b {
    font-family: var(--display);
    font-weight: 800;
    font-size: 1.9rem;
    color: var(--teal);
    display: block;
    line-height: 1.1;
}

.stat span {
    font-size: 0.85rem;
    color: var(--ink-soft);
}

/* ---------- RESEARCH CARDS ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 12px;
}

@media (max-width: 820px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 26px;
    transition:
        border-color 0.15s,
        transform 0.15s;
}

.card:hover {
    border-color: var(--teal);
    transform: translateY(-2px);
}

.card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(14, 110, 120, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--teal);
}

.card .card-mono {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--amber);
    margin-bottom: 10px;
}

.card h3 {
    font-family: var(--display);
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.card p {
    font-size: 0.94rem;
    color: var(--ink-soft);
}

/* ---------- TIMELINE ---------- */
.timeline {
    margin-top: 8px;
    border-left: 2px solid var(--line);
    padding-left: 28px;
}

.t-item {
    position: relative;
    padding-bottom: 34px;
}

.t-item:last-child {
    padding-bottom: 0;
}

.t-item::before {
    content: "";
    position: absolute;
    left: -35px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg);
    border: 2.5px solid var(--teal);
}

.t-item.t-now::before {
    background: var(--amber);
    border-color: var(--amber);
}

.t-item .t-when {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.t-item h3 {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.05rem;
    margin: 4px 0 4px;
}

.t-item p {
    font-size: 0.94rem;
    color: var(--ink-soft);
    max-width: 58ch;
}

/* ---------- PUBLICATIONS ---------- */
.pub {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 22px 26px;
    margin-bottom: 14px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    transition: border-color 0.15s;
}

.pub:hover {
    border-color: var(--teal);
}

.pub-year {
    flex: 0 0 auto;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--amber);
    margin-top: 3px;
    min-width: 44px;
}

.pub h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.pub p {
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.note {
    margin-top: 18px;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--ink-soft);
}

.note a {
    color: var(--teal);
}

/* ---------- AWARDS ---------- */
.awards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 12px;
}

@media (max-width: 700px) {
    .awards {
        grid-template-columns: 1fr;
    }
}

.award {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 24px 26px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.award svg {
    flex: 0 0 auto;
    color: var(--amber);
    margin-top: 2px;
}

.award h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.award p {
    font-size: 0.9rem;
    color: var(--ink-soft);
}

/* ---------- CONTACT ---------- */
.contact-box {
    background: var(--teal-deep);
    color: #eaf4f5;
    border-radius: 16px;
    padding: 52px 46px;
    display: flex;
    flex-wrap: wrap;
    gap: 36px;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 640px) {
    .contact-box {
        padding: 36px 26px;
    }
}

.contact-box h2 {
    color: #fff;
    margin-bottom: 10px;
}

.contact-box p {
    max-width: 42ch;
    color: #bfd9dc;
    font-size: 0.98rem;
}

.socials {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.social {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 11px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition:
        background 0.15s,
        border-color 0.15s,
        transform 0.15s;
}

.social:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--amber);
    transform: translateY(-1px);
}

.social svg {
    flex: 0 0 auto;
}

.contact-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-mail {
    font-family: var(--mono);
    font-size: 0.9rem;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    padding-bottom: 6px;
    width: fit-content;
    transition: border-color 0.15s;
}

.contact-mail:hover {
    border-color: var(--amber);
}

footer {
    padding: 34px 0 46px;
    color: var(--ink-soft);
    font-family: var(--mono);
    font-size: 0.78rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
        animation: none !important;
    }
}