/* ═══════════════════════════════════════════════
   TOKENS
═══════════════════════════════════════════════ */
:root {
    --bg:          #080c14;
    --surface:     #0e1520;
    --text:        #e8ecf4;
    --muted:       #7a8ba8;
    --accent:      #4f8aff;
    --accent-dim:  rgba(79, 138, 255, 0.12);
    --border:      rgba(79, 138, 255, 0.1);

    --font-serif: 'Instrument Serif', Georgia, serif;
    --font-sans:  'Urbanist', -apple-system, sans-serif;

    --px:    clamp(1.25rem, 4vw, 3rem);
    --py:    clamp(5rem, 9vw, 9rem);

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --dur: 0.7s;
}

[data-theme="light"] {
    --bg:         #f0f4ff;
    --surface:    #e4eaff;
    --text:       #080c14;
    --muted:      #505e78;
    --accent:     #1a5ce8;
    --accent-dim: rgba(26, 92, 232, 0.08);
    --border:     rgba(26, 92, 232, 0.12);
}

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

html { font-size: clamp(15px, 1.1vw, 17px); scroll-behavior: auto; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-weight: 300;
    line-height: 1.65;
    overflow-x: hidden;
    cursor: none;
    transition: background-color 0.45s var(--ease-out), color 0.45s var(--ease-out);
}

/* hide scrollbar */
::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Focus visible — keyboard navigation */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 3px;
}

/* Restore cursor on touch/coarse-pointer devices */
@media (pointer: coarse) {
    body { cursor: auto; }
    .cursor { display: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .cursor { display: none; }
}

/* ═══════════════════════════════════════════════
   CURSOR
═══════════════════════════════════════════════ */
.cursor {
    position: fixed;
    top: 0; left: 0;
    width: 7px; height: 7px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 12px var(--accent);
    transition:
        width  0.35s var(--ease-out),
        height 0.35s var(--ease-out),
        opacity 0.3s;
}

.cursor--large {
    width: 44px;
    height: 44px;
    background: var(--accent-dim);
    box-shadow: 0 0 20px var(--accent);
    border: 1px solid var(--accent);
}

/* ═══════════════════════════════════════════════
   NAV
═══════════════════════════════════════════════ */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.6rem var(--px);
    transition: background 0.4s var(--ease-out), backdrop-filter 0.4s var(--ease-out);
}

.nav--scrolled {
    background: rgba(8, 12, 20, 0.88);
    backdrop-filter: blur(10px);
}

[data-theme="light"] .nav--scrolled {
    background: rgba(240, 244, 255, 0.88);
}

.nav__logo {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    color: var(--text);
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.nav__logo::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--text);
    transition: width var(--dur) var(--ease-out);
}
.nav__logo:hover::after { width: 100%; }

.nav__links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav__link {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--text);
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 1px;
    background: var(--text);
    transition: width var(--dur) var(--ease-out);
}
.nav__link:hover::after { width: 100%; }

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    cursor: none;
    width: 1.9rem; height: 1.9rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s, transform 0.5s var(--ease-out);
}
.theme-toggle:hover {
    transform: rotate(90deg);
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-dim);
}

.theme-toggle__dot {
    display: block;
    width: 0.55rem; height: 0.55rem;
    border-radius: 50%;
    background: var(--accent);
    transition: background 0.3s;
}

/* ═══════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════ */
.hero {
    height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 var(--px);
    position: relative;
    /* glow azul no canto inferior esquerdo */
    background:
        radial-gradient(ellipse 55% 40% at 10% 95%, rgba(79, 138, 255, 0.08) 0%, transparent 70%),
        var(--bg);
}

.hero__label {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.75rem;
}

.hero__name {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(4.5rem, 13vw, 15rem);
    line-height: 0.88;
    letter-spacing: -0.025em;
    margin-bottom: 2.5rem;
}

.hero__line {
    display: block;
    overflow: hidden;
}

.hero__line--indent {
    padding-left: 18vw;
}

.hero__line-inner {
    display: block;
}

.hero__line-inner--italic {
    font-style: italic;
}

.hero__sub {
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--muted);
    text-transform: uppercase;
}

/* Scroll indicator */
.hero__scroll {
    position: absolute;
    bottom: 2.25rem;
    right: var(--px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.hero__scroll-label {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    writing-mode: vertical-rl;
}

.hero__scroll-bar {
    width: 1px;
    height: 3.5rem;
    background: var(--border);
    overflow: hidden;
}

.hero__scroll-bar {
    box-shadow: 0 0 6px rgba(79, 138, 255, 0.2);
}

.hero__scroll-fill {
    width: 100%;
    height: 100%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    transform: translateY(-100%);
    animation: scrollFill 2.2s var(--ease-out) infinite;
}

@keyframes scrollFill {
    0%   { transform: translateY(-100%); }
    60%  { transform: translateY(0%); }
    100% { transform: translateY(100%); }
}

/* ═══════════════════════════════════════════════
   SHARED SECTION
═══════════════════════════════════════════════ */
.section {
    padding: var(--py) var(--px);
    border-top: 1px solid var(--border);
}

.section__header {
    display: flex;
    align-items: baseline;
    gap: 0.875rem;
    margin-bottom: clamp(3rem, 6vw, 6rem);
}

.section__num {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--muted);
    letter-spacing: 0.06em;
}

.section__title {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(1.5rem, 2.5vw, 2.25rem);
    letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════════════
   PLACEHOLDER (generic)
═══════════════════════════════════════════════ */
.placeholder {
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: background 0.45s, border-color 0.45s, box-shadow 0.45s;
}

.placeholder:hover {
    border-color: rgba(79, 138, 255, 0.25);
    box-shadow: inset 0 0 40px rgba(79, 138, 255, 0.04);
}

.placeholder span {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.placeholder--portrait  { aspect-ratio: 3 / 4; }
.placeholder--land      { aspect-ratio: 16 / 9; }

.info__photo-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* ═══════════════════════════════════════════════
   INFO
═══════════════════════════════════════════════ */
.info__grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: clamp(2.5rem, 7vw, 7rem);
    align-items: start;
}

.info__bio {
    font-size: clamp(0.95rem, 1.4vw, 1.15rem);
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

.info__details {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.info__row {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 1rem;
    padding: 1.1rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
}

.info__row:last-child { border-bottom: 1px solid var(--border); }

.info__row dt {
    color: var(--muted);
    font-weight: 400;
}
.info__row dd { color: var(--text); }

/* ═══════════════════════════════════════════════
   WORK / PROJECTS
═══════════════════════════════════════════════ */
.work__list {
    display: flex;
    flex-direction: column;
    gap: clamp(5rem, 9vw, 10rem);
}

.project {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    position: relative;
}

/* flip layout for even projects */
.project--flip {
    grid-template-columns: 1fr 1.15fr;
}
.project--flip .project__visual { order: 2; }
.project--flip .project__info   { order: 1; }

/* image zoom on hover */
.project__visual {
    overflow: hidden;
}

.project__visual img,
.project__visual .placeholder--land {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.9s var(--ease-out);
}
.project:hover .project__visual img,
.project:hover .placeholder--land {
    transform: scale(1.04);
}

/* info column */
.project__info {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.project__top {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.project__num {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 400;
    letter-spacing: 0.1em;
}

.project__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    border: 1px solid var(--border);
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    color: var(--muted);
    transition: border-color 0.35s, color 0.35s, box-shadow 0.35s, background 0.35s;
}
.project:hover .tag,
.case-hero__tags .tag {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
    box-shadow: 0 0 8px var(--accent-dim);
}

.project__title {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(2rem, 4vw, 4.5rem);
    line-height: 1;
    letter-spacing: -0.025em;
}

.project__desc {
    font-size: 0.83rem;
    color: var(--muted);
    line-height: 1.7;
    max-width: 34ch;
}

.project__link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--border);
    width: fit-content;
    margin-top: 0.4rem;
    transition: border-color 0.35s, gap 0.35s var(--ease-out), color 0.35s;
}
.project__link:hover {
    border-color: var(--accent);
    color: var(--accent);
    gap: 0.9rem;
}


/* Soon state */
.project--soon {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

.project__soon-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--border);
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    color: var(--muted);
    margin-top: 0.4rem;
}

/* ═══════════════════════════════════════════════
   ARCHIVE
═══════════════════════════════════════════════ */
.archive__list { display: flex; flex-direction: column; }

.archive__item {
    display: grid;
    grid-template-columns: 5rem 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1.3rem 0;
    border-top: 1px solid var(--border);
    cursor: none;
    transition: padding-left 0.45s var(--ease-out), color 0.3s;
}
.archive__item:last-child { border-bottom: 1px solid var(--border); }

.archive__item:hover {
    padding-left: 1.25rem;
    color: var(--accent);
}

.archive__year {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 400;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}

.archive__name {
    font-family: var(--font-serif);
    font-size: clamp(1.1rem, 1.8vw, 1.6rem);
    font-weight: 300;
    letter-spacing: -0.01em;
}

.archive__type {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 400;
    text-align: right;
    transition: color 0.3s;
}

/* ═══════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════ */
.contact__intro {
    font-family: var(--font-serif);
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    font-style: italic;
    font-weight: 300;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.contact__email {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(2rem, 6vw, 7rem);
    line-height: 1;
    letter-spacing: -0.03em;
    display: inline-block;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.08em;
    margin-bottom: 4rem;
    transition: color 0.4s, border-color 0.4s;
}
.contact__email:hover {
    color: var(--accent);
    border-color: var(--accent);
    text-shadow: 0 0 40px rgba(79, 138, 255, 0.2);
}

.contact__socials {
    display: flex;
    flex-direction: column;
}

.contact__social {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.1rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: padding-left 0.45s var(--ease-out), color 0.3s;
}
.contact__social:last-child { border-bottom: 1px solid var(--border); }
.contact__social:hover { padding-left: 1rem; color: var(--accent); }

.contact__social-num {
    font-size: 0.68rem;
    color: var(--muted);
    font-weight: 400;
    letter-spacing: 0.08em;
    transition: color 0.3s;
}

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
.footer {
    padding: 1.75rem var(--px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 400;
    letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════
   SCROLL-REVEAL STATES (GSAP sets these)
═══════════════════════════════════════════════ */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .nav__link { display: none; }
    .nav__links { gap: 1rem; }

    .info__grid {
        grid-template-columns: 1fr;
    }
    .info__photo { max-width: 55%; }

    .project,
    .project--flip {
        grid-template-columns: 1fr;
    }
    .project--flip .project__visual,
    .project--flip .project__info { order: unset; }

    .archive__item {
        grid-template-columns: 4.5rem 1fr;
    }
    .archive__type { display: none; }

    .contact__email {
        word-break: break-all;
    }
}

@media (max-width: 480px) {
    .hero__line--indent { padding-left: 8vw; }

    .info__row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .footer { flex-direction: column; gap: 0.4rem; text-align: center; }
}
