:root {
    --bg: #f6f5f1;
    --paper: #fff;
    --soft: #eeece5;
    --ink: #161616;
    --muted: #66635d;
    --line: #d8d5cd;
    --accent: #6b69f7;
    --dark: #161719;
    --serif: "Fraunces", Georgia, serif;
    --sans: "DM Sans", Arial, sans-serif;
    --radius: 24px;
    --shadow: 0 18px 50px rgba(20, 20, 20, 0.08);
    --max: 1160px;
}

/* =========================
   RESET / BASE
========================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(var(--max), calc(100% - 40px));
    margin-inline: auto;
}

.section {
    padding: 120px 0;
}

.section-soft {
    background: var(--soft);
}

.section-dark {
    background: var(--dark);
    color: #fff;
}

/* =========================
   TEXT
========================= */

.eyebrow {
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
}

.section-dark .eyebrow {
    color: #aaa8a1;
}

h1,
h2 {
    letter-spacing: -0.045em;
    line-height: 1.05;
}

h1 {
    font-size: clamp(3.4rem, 7vw, 6.8rem);
    max-width: 820px;
    margin: 0 0 28px;
}

h2 {
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    max-width: 860px;
    margin: 0 0 22px;
}

h3 {
    line-height: 1.2;
}

em {
    font-family: var(--serif);
    font-weight: 500;
}

/* =========================
   ACCESSIBILITY
========================= */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================
   BUTTONS / LINKS
========================= */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 999px;
    padding: 14px 20px;
    font-weight: 700;
    transition: 0.25s ease;
    border: 1px solid transparent;
}

    .button:hover {
        transform: translateY(-2px);
    }

.button-dark {
    background: var(--ink);
    color: #fff;
}

.button-light {
    background: #fff;
    color: var(--ink);
}

.button-outline {
    border-color: var(--line);
    background: transparent;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    border-bottom: 1px solid currentColor;
    padding-bottom: 3px;
}

    .text-link span {
        transition: transform 0.2s;
    }

    .text-link:hover span {
        transform: translateX(4px);
    }

/* =========================
   HEADER / NAVIGATION
========================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(246, 245, 241, 0.86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(22, 22, 22, 0.06);
}

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

.brand {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.08em;
}

    .brand span {
        color: var(--accent);
    }

.site-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 0.95rem;
    font-weight: 600;
}

    .site-nav a:not(.nav-cta) {
        opacity: 0.78;
    }

    .site-nav a:hover {
        opacity: 1;
    }

.nav-cta {
    padding: 11px 16px;
    border-radius: 999px;
    background: #e7e5de;
}

.menu-toggle {
    display: none;
    background: none;
    border: 0;
    padding: 8px;
    cursor: pointer;
}

    .menu-toggle span:not(.sr-only) {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--ink);
        margin: 4px 0;
    }

/* =========================
   HERO
========================= */

.hero {
    padding-top: 85px;
    padding-bottom: 95px;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 70px;
    align-items: center;
}

.hero-lead {
    font-size: 1.18rem;
    max-width: 650px;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-top: 34px;
    flex-wrap: wrap;
}

.social-row {
    display: flex;
    gap: 18px;
    margin-top: 42px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--muted);
}

    .social-row a:hover {
        color: var(--ink);
    }

/* =========================
   HERO IMAGE / PORTRAIT
========================= */

.hero-art {
    min-height: 550px;
    position: relative;
    display: grid;
    place-items: center;
}

.portrait-card {
    position: relative;
    z-index: 3;
    width: min(390px, 72%);
    aspect-ratio: 4 / 5;
    border-radius: 46% 46% 22% 22% / 36% 36% 18% 18%;
    background: linear-gradient( 145deg, #232436, #8b89f4 68%, #d8d5ff );
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: rotate(4deg);
    overflow: hidden;
}

    /* Fotografia principal */
    .portrait-card img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 1;
    }

    /* Efeito circular sobre a fotografia */
    .portrait-card::before {
        content: "";
        position: absolute;
        inset: 12%;
        border: 1px solid rgba(255, 255, 255, 0.22);
        border-radius: 50%;
        z-index: 2;
        pointer-events: none;
    }

    .portrait-card p {
        position: absolute;
        bottom: 22px;
        z-index: 3;
        margin: 0;
        color: rgba(255, 255, 255, 0.8);
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.16em;
    }

/* Apenas mantém caso ainda tenhas GB nalgum sítio */
.portrait-initials {
    font-family: var(--serif);
    font-size: clamp(4.5rem, 10vw, 7.5rem);
    color: #fff;
    letter-spacing: -0.08em;
    position: relative;
    z-index: 3;
}

/* =========================
   HERO BLOBS
========================= */

.blob {
    position: absolute;
    border-radius: 50%;
}

.blob-one {
    width: 340px;
    height: 340px;
    background: #ddd8ff;
    top: 40px;
    left: 10px;
}

.blob-two {
    width: 240px;
    height: 240px;
    background: #e3d7c3;
    bottom: 25px;
    right: 10px;
}

/* =========================
   FLOATING NOTES
========================= */

.floating-note {
    position: absolute;
    z-index: 4;
    background: #fff;
    border: 1px solid var(--line);
    padding: 9px 13px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.note-one {
    top: 85px;
    right: 35px;
    transform: rotate(5deg);
}

.note-two {
    bottom: 120px;
    left: 15px;
    transform: rotate(-7deg);
}

.note-three {
    bottom: 30px;
    right: 85px;
    transform: rotate(4deg);
}

/* =========================
   TICKER
========================= */

.ticker {
    overflow: hidden;
    border-block: 1px solid var(--line);
    background: #ebe9e2;
}

.ticker-track {
    display: flex;
    align-items: center;
    gap: 24px;
    white-space: nowrap;
    width: max-content;
    padding: 16px 0;
    animation: marquee 28s linear infinite;
}

    .ticker-track span {
        font-size: 0.82rem;
        font-weight: 800;
        letter-spacing: 0.12em;
    }

    .ticker-track i {
        font-style: normal;
        color: var(--accent);
    }

@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-35%);
    }
}

/* =========================
   SECTION HEADINGS
========================= */

.section-heading {
    max-width: 850px;
    margin-bottom: 52px;
}

    .section-heading > p:last-child {
        color: var(--muted);
        font-size: 1.1rem;
        max-width: 720px;
    }

/* =========================
   SERVICES
========================= */

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.service-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 34px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 26px;
    min-height: 280px;
    transition: 0.25s ease;
}

    .service-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow);
    }

.service-number {
    font-weight: 800;
    color: var(--accent);
}

.service-card h3 {
    font-size: 1.6rem;
    margin: 0 0 12px;
}

.service-card p {
    color: var(--muted);
}

.service-tags {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    color: #87837b;
}

/* =========================
   ABOUT
========================= */

.about-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 95px;
    align-items: center;
}

.about-frame {
    background: #eceae3;
    border-radius: 36px;
    padding: 28px;
    transform: rotate(-3deg);
}

.about-avatar {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border-radius: 28px;
    background: linear-gradient( 160deg, #dbd7ff, #6f6cf6 68%, #242435 );
    display: grid;
    place-items: center;
}

    /* Fotografia da secção "Sobre mim" */
    .about-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.photo-caption {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 0.84rem;
    text-align: center;
}

.about-copy > p:not(.eyebrow) {
    font-size: 1.06rem;
    color: var(--muted);
    max-width: 700px;
}

/* =========================
   PROJECTS
========================= */

.projects-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 20px;
}

.project-card {
    background: #242528;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    overflow: hidden;
    display: block;
    transition: 0.3s ease;
}

    .project-card:hover {
        transform: translateY(-5px);
        background: #292b2f;
    }

.project-featured {
    grid-row: span 2;
}

.project-image {
    min-height: 235px;
    display: flex;
    align-items: flex-end;
    padding: 26px;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.project-featured .project-image {
    min-height: 330px;
}

.project-tipmolde {
    background: linear-gradient( 135deg, #202129, #6e69f5 70%, #d5d1ff );
}

.project-consulta {
    background: linear-gradient( 135deg, #263028, #73a57c 70%, #d5ead8 );
}

.project-paw {
    background: linear-gradient( 135deg, #29231f, #d28b52 70%, #ffe2c1 );
}

.project-image span {
    color: #fff;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.project-body {
    padding: 28px;
}

.project-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: #aaa;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.project-body h3 {
    font-size: 2rem;
    margin: 16px 0 10px;
}

.project-body p {
    color: #bab9b4;
    margin-bottom: 22px;
}

.project-link {
    font-weight: 800;
    color: #fff;
}

.center-link {
    display: flex;
    justify-content: center;
    margin-top: 44px;
}

/* =========================
   INTERESTS
========================= */

.interests-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 80px;
    align-items: start;
}

.interest-list {
    border-top: 1px solid var(--line);
}

.interest-item {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 18px;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}

    .interest-item > span {
        font-size: 1.5rem;
    }

    .interest-item strong {
        font-size: 1.08rem;
    }

    .interest-item p {
        margin: 4px 0 0;
        color: var(--muted);
    }

/* =========================
   TIMELINE
========================= */

.timeline {
    max-width: 960px;
}

.timeline-list {
    border-top: 1px solid var(--line);
}

.timeline-item {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 42px;
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
}

.timeline-year {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--muted);
}

.timeline-item h3 {
    margin: 0 0 6px;
    font-size: 1.35rem;
}

.timeline-item p {
    margin: 0;
    color: var(--muted);
}

/* =========================
   CONTACT
========================= */

.contact-section {
    padding-top: 70px;
    padding-bottom: 110px;
}

.contact-box {
    border: 1px solid var(--line);
    border-radius: 34px;
    background: #fff;
    padding: 52px;
    display: flex;
    justify-content: space-between;
    gap: 50px;
    align-items: flex-end;
}

    .contact-box h2 {
        max-width: 700px;
        margin-bottom: 14px;
    }

    .contact-box p:not(.eyebrow) {
        color: var(--muted);
    }

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
    min-width: 280px;
}

/* =========================
   FOOTER
========================= */

.site-footer {
    padding: 26px 0;
    border-top: 1px solid var(--line);
}

.footer-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    font-size: 0.82rem;
    color: var(--muted);
}

    .footer-wrap p {
        margin: 0;
    }

/* =========================
   SCROLL ANIMATIONS
========================= */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

    .reveal.visible {
        opacity: 1;
        transform: none;
    }

.delay-1 {
    transition-delay: 0.12s;
}

.delay-2 {
    transition-delay: 0.24s;
}

/* =========================
   TABLET
========================= */

@media (max-width: 980px) {
    .hero-grid,
    .about-grid,
    .interests-grid {
        grid-template-columns: 1fr;
    }

    .hero-art {
        min-height: 500px;
    }

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

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

    .project-featured {
        grid-row: auto;
    }

        .project-featured .project-image {
            min-height: 260px;
        }

    .contact-box {
        display: block;
    }

    .contact-actions {
        justify-content: flex-start;
        margin-top: 30px;
    }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 720px) {
    .container {
        width: min( var(--max), calc(100% - 28px) );
    }

    .section {
        padding: 82px 0;
    }

    .nav-wrap {
        height: 72px;
    }

    .menu-toggle {
        display: block;
        z-index: 12;
    }

    .site-nav {
        position: fixed;
        inset: 72px 14px auto 14px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 22px;
        padding: 18px;
        display: grid;
        gap: 6px;
        box-shadow: var(--shadow);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-12px);
        transition: 0.2s ease;
    }

        .site-nav.open {
            opacity: 1;
            pointer-events: auto;
            transform: none;
        }

        .site-nav a {
            padding: 12px 10px;
        }

    .nav-cta {
        text-align: center;
    }

    .hero {
        padding-top: 60px;
    }

    .hero-grid {
        gap: 30px;
    }

    .hero-art {
        min-height: 390px;
    }

    .portrait-card {
        width: 68%;
    }

    .blob-one {
        width: 240px;
        height: 240px;
    }

    .blob-two {
        width: 160px;
        height: 160px;
    }

    .social-row {
        flex-wrap: wrap;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .contact-box {
        padding: 34px 24px;
    }

    .footer-wrap {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================
   REDUCED MOTION
========================= */

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
