:root {
    --color-primary: #2c3e50;
    --color-primary-dark: #1a252f;
    --color-text: #333;
    --color-text-muted: #5a6b7b;
    --color-bg: #f4f4f4;
    --color-border: #ccc;
    --color-accent: #5fd0ff;
    --color-accent-hover: #8adfff;
    --radius-sm: 4px;
    --radius-md: 6px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: var(--color-bg);
    color: #222;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-content {
    flex: 1 0 auto;
}

header {
    background-color: var(--color-primary);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 3px solid var(--color-accent);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
}

.brand:hover {
    text-decoration: underline;
}

.brand-icon {
    color: var(--color-accent);
    flex-shrink: 0;
}

nav a {
    color: white;
    margin-left: 1rem;
    text-decoration: none;
    padding-bottom: 2px;
}

nav a:hover {
    text-decoration: underline;
}

nav a.active {
    color: var(--color-accent);
    font-weight: bold;
    border-bottom: 2px solid var(--color-accent);
}

main {
    padding: 2rem;
}

/* Home page hero */
.hero {
    position: relative;
    min-height: 460px;
    display: flex;
    align-items: center;
    color: white;
    background-image:
        linear-gradient(90deg, rgba(8, 12, 18, 0.9) 0%, rgba(8, 12, 18, 0.55) 50%, rgba(8, 12, 18, 0.15) 100%),
        url("img/fundo.png");
    background-size: cover;
    background-position: center;
}

.hero-content {
    max-width: 620px;
    padding: 3rem 2rem;
}

.hero-tag {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.hero-content h2 {
    font-size: 2.1rem;
    line-height: 1.25;
    margin: 0 0 1rem 0;
}

.hero-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #e4e8ec;
    margin: 0 0 1.75rem 0;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
    background-color: var(--color-accent);
    color: #0b1420;
}

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

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Topic cards on the home page */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.card {
    background-color: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border-top: 3px solid var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.card h3 {
    margin-top: 0;
    color: var(--color-primary);
}

.card p {
    line-height: 1.5;
    color: var(--color-text);
    margin-bottom: 0;
}

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

    .hero-content h2 {
        font-size: 1.6rem;
    }
}

/* Shared "narrow content" layout: About, Projects and Contact pages */
.about,
.projects,
.contact {
    max-width: 700px;
    margin: 0 auto;
}

.about h2,
.projects h2,
.contact h2 {
    color: var(--color-primary);
    margin-top: 0;
}

.about h3,
.projects h3,
.contact h3 {
    color: var(--color-primary);
    margin-top: 2rem;
}

.about p,
.projects > p {
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: 1.25rem;
}

.profile-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

/* About page */
.about-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.about-header h1 {
    margin: 0 0 0.25rem 0;
    color: var(--color-primary);
}

.about-header .role {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 1.05rem;
}

.skills {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0;
    margin: 0;
}

.skills li {
    background-color: white;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.9rem;
    color: var(--color-primary);
}

.education {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.education-entry {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    background-color: white;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.education-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background-color: white;
    border: 1px solid #eee;
    border-radius: var(--radius-md);
    padding: 0.4rem;
    flex-shrink: 0;
}

.education-entry h3 {
    margin-top: 0;
}

.education-entry h3 a {
    color: inherit;
    text-decoration: none;
}

.education-entry h3 a:hover {
    text-decoration: underline;
}

.education-entry .period {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
}

.education-entry p:last-child {
    margin-bottom: 0;
}

/* Projects page */
.project-entry {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    background-color: white;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.project-media {
    width: 260px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.project-entry h3 {
    margin-top: 0;
}

.project-entry p {
    line-height: 1.7;
    color: var(--color-text);
}

.project-entry p:last-child {
    margin-bottom: 0;
}

.publications {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.publication {
    background-color: white;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.publication h3 {
    margin-top: 0;
    margin-bottom: 0.4rem;
}

.publication .pub-meta {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin: 0 0 0.75rem 0;
}

.publication p {
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.btn-download {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--color-primary);
    color: white;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}

.btn-download:hover {
    background-color: var(--color-primary-dark);
}

/* Contact page */
.contact-intro {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-intro p {
    line-height: 1.6;
    color: var(--color-text);
    margin: 0 0 0.75rem 0;
}

.contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.contact-info a {
    color: var(--color-primary);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Stack photo/logo + text on small screens (About and Contact) */
@media (max-width: 600px) {
    .about-header,
    .education-entry,
    .project-entry,
    .contact-intro {
        flex-direction: column;
        text-align: center;
    }

    .project-media {
        width: 100%;
    }
}

/* Contact form */
form {
    display: flex;
    flex-direction: column;
    max-width: 320px;
    gap: 0.25rem;
}

form label {
    font-weight: bold;
    margin-top: 0.75rem;
}

form input {
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

form button {
    margin-top: 1.5rem;
    padding: 0.6rem;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

form button:hover {
    background-color: var(--color-primary-dark);
}

.result {
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    background-color: white;
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-sm);
    max-width: 320px;
}

/* Footer */
footer {
    flex-shrink: 0;
    background-color: var(--color-primary);
    color: white;
    padding: 2rem;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.footer-brand .brand {
    font-size: 1.15rem;
}

.footer-tagline {
    margin: 0.4rem 0 0 0;
    color: #b9c3cc;
    font-size: 0.9rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    padding: 0;
    margin: 0;
}

.footer-links a {
    color: white;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-copy {
    max-width: 1100px;
    margin: 1.5rem auto 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: #b9c3cc;
    font-size: 0.85rem;
    text-align: center;
}
