/* ============================================================
   Vagner Teixeira — portfolio
   Cartographic system. Brown = relief (primary), blue = hydrography (links).
   Shared by index.html (PT) and english/english.html (EN).
   ============================================================ */

:root {
    --base:   #0e1417;   /* deep slate — the sheet */
    --base-2: #141d21;   /* raised panels */
    --card:   #101a1e;   /* project cards */
    --line:   #24313a;   /* hairlines */
    --line-2: #35464f;   /* stronger hairlines */

    --paper:  #e9e5da;   /* map paper — primary text */
    --muted:  #93a0a6;   /* secondary text */
    --faint:  #5f6d74;   /* captions, disabled */

    --contour: #cf9455;  /* relief / index contours — primary accent */
    --water:   #77b0c6;  /* hydrography — links & dates */
    --veg:     #8aa878;  /* vegetation — third category */

    --display: 'Spectral', Georgia, serif;
    --body:    'Public Sans', system-ui, sans-serif;
    --mono:    'IBM Plex Mono', ui-monospace, monospace;

    --wrap: 1160px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--base);
    color: var(--paper);
    font-family: var(--body);
    font-weight: 400;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

::selection { background: var(--contour); color: var(--base); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--base); }
::-webkit-scrollbar-thumb { background: var(--line-2); border: 3px solid var(--base); border-radius: 10px; }

:focus-visible { outline: 2px solid var(--water); outline-offset: 3px; }

/* ── shared eyebrow / data labels ── */
.eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--contour);
}

/* ── layout ── */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 6vw; }
main { padding-top: 68px; }
.section { padding: 104px 0; border-top: 1px solid var(--line); }
.section:first-child { border-top: 0; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 100;
    height: 68px;
    background: rgba(14,20,23,0.82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    max-width: var(--wrap); margin: 0 auto; height: 100%;
    padding: 0 6vw;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
    font-family: var(--mono); font-size: 14px; letter-spacing: 0.5px;
    display: flex; align-items: center; gap: 9px; color: var(--paper);
}
.brand b { font-weight: 600; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
    color: var(--muted); font-size: 13.5px; padding: 8px 13px;
    transition: color .18s;
}
.nav a:hover { color: var(--paper); }

/* language segmented control */
.lang-switch {
    display: inline-flex; border: 1px solid var(--line-2);
    font-family: var(--mono); font-size: 11px; letter-spacing: 1px;
}
.lang-switch a, .lang-switch span {
    padding: 6px 11px; color: var(--faint); transition: color .18s, background .18s;
}
.lang-switch a:hover { color: var(--paper); }
.lang-switch [aria-current="true"] { background: var(--contour); color: var(--base); font-weight: 600; }
.lang-switch a + a, .lang-switch a + span, .lang-switch span + a { border-left: 1px solid var(--line-2); }

.header-actions { display: flex; align-items: center; gap: 18px; }
.contact-link {
    font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.5px;
    color: var(--contour); border: 1px solid var(--contour);
    padding: 9px 15px; transition: background .18s, color .18s;
    white-space: nowrap;
}
.contact-link:hover { background: var(--contour); color: var(--base); }

.burger {
    display: none; background: none; border: none; cursor: pointer;
    color: var(--paper); font-size: 24px; line-height: 1;
}

/* ── mobile drawer ── */
.drawer {
    position: fixed; inset: 0 0 0 auto; z-index: 9999;
    width: min(78%, 320px); background: var(--base-2);
    border-left: 1px solid var(--line);
    transform: translateX(100%); transition: transform .38s cubic-bezier(.4,0,.2,1);
    padding: 26px 28px; display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer__close { align-self: flex-end; background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; }
.drawer nav { display: flex; flex-direction: column; margin-top: 24px; }
.drawer nav a {
    color: var(--paper); font-size: 17px; padding: 16px 0;
    border-bottom: 1px solid var(--line);
}
.drawer nav a:hover { color: var(--contour); }
.scrim {
    position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,.55);
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.scrim.open { opacity: 1; visibility: visible; }

/* ============================================================
   HERO — the thesis: a contour-relief sheet with a trig summit
   ============================================================ */
.hero { padding: 60px 0 96px; border-top: 0; }
.hero__grid {
    display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center;
}
.hero__eyebrow {
    display: flex; align-items: center; gap: 12px; margin-bottom: 26px;
    font-family: var(--mono); font-size: 11px; letter-spacing: 2px;
    text-transform: uppercase; color: var(--contour);
}
.hero__eyebrow::before { content: ''; width: 26px; height: 1px; background: var(--contour); }

.hero h1 {
    font-family: var(--display); font-weight: 400;
    font-size: clamp(38px, 5.4vw, 66px); line-height: 1.06;
    letter-spacing: -0.5px; color: var(--paper); margin-bottom: 28px;
}
.hero h1 em { font-style: italic; color: var(--water); font-weight: 400; }
.hero h1 .amp { color: var(--faint); font-style: italic; }

.hero__lead {
    color: var(--muted); font-size: 16px; line-height: 1.75;
    max-width: 40em; margin-bottom: 36px; font-weight: 300;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.btn {
    font-family: var(--mono); font-size: 12px; letter-spacing: 0.5px;
    padding: 13px 22px; display: inline-flex; align-items: center; gap: 9px;
    border: 1px solid transparent; transition: transform .18s, background .18s, color .18s, border-color .18s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--contour); color: var(--base); font-weight: 600; }
.btn--primary:hover { background: #dca767; }
.btn--ghost { color: var(--muted); border-color: var(--line-2); }
.btn--ghost:hover { color: var(--paper); border-color: var(--muted); }

/* toolkit badges */
.key__label {
    font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--faint); margin-bottom: 12px;
}
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badges a { display: inline-flex; transition: transform .15s, filter .15s; }
.badges a:hover { transform: translateY(-2px); filter: brightness(1.12); }
.badges img { height: 28px; display: block; filter: saturate(.85); }

/* ── contour signature ── */
.topo-figure { position: relative; display: flex; justify-content: center; }
.topo { width: min(440px, 100%); height: auto; display: block; overflow: visible; }
.topo .ct { fill: none; stroke: rgba(207,148,85,.22); stroke-width: 1; }
.topo .ct--index { stroke: rgba(207,148,85,.55); stroke-width: 1.5; }
.topo .grat { stroke: var(--line); stroke-width: 1; }
.topo .lbl { font-family: var(--mono); font-size: 11px; fill: var(--faint); letter-spacing: 1px; }
.topo__mark {
    position: absolute; top: 47%; left: 50%; transform: translate(-50%,-50%);
    width: 92px; height: 92px; filter: brightness(0) invert(1); opacity: .92;
    pointer-events: none;
}
.topo__stamp {
    position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
    font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.5px;
    color: var(--faint); white-space: nowrap;
}
.topo__stamp b { color: var(--contour); font-weight: 500; }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-head { margin-bottom: 52px; }
.section-head__top {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 20px; margin-bottom: 18px;
}
.section-head__ref { font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: 1px; }
.section-head h2 {
    font-family: var(--display); font-weight: 400;
    font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; color: var(--muted);
    letter-spacing: -0.3px;
}
.section-head h2 em { font-style: italic; color: var(--paper); }
.section-head__rule { height: 1px; background: var(--line); margin-top: 22px; }

/* ============================================================
   PROJECTS
   ============================================================ */
.projects {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.project {
    background: var(--card); padding: 32px 30px 28px;
    display: flex; flex-direction: column; gap: 14px;
    color: var(--paper); position: relative;
    transition: background .2s;
}
.project:hover { background: var(--base-2); }
.project__type {
    font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.5px;
    text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px;
    color: var(--muted);
}
.project__type::before { content: ''; width: 9px; height: 9px; background: var(--dot, var(--contour)); flex: none; }
.project--webgis  { --dot: var(--water); }
.project--webgis .project__type::before { border-radius: 50%; }
.project--plugin  { --dot: var(--contour); }
.project--dash    { --dot: var(--veg); }
.project--dash .project__type::before { transform: rotate(45deg); }

.project h3 { font-family: var(--display); font-size: 22px; font-weight: 500; line-height: 1.2; }
.project p { font-size: 13.5px; color: var(--muted); line-height: 1.65; font-weight: 300; }
.project__tech { font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: 0.3px; margin-top: 4px; }
.project__go {
    margin-top: auto; padding-top: 12px;
    font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.5px;
    color: var(--contour); display: flex; align-items: center; gap: 7px;
}
.project__go i { transition: transform .2s; }
.project:hover .project__go i { transform: translate(2px,-2px); }

/* ============================================================
   EXPERIENCE — survey stations on a rule
   ============================================================ */
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
    content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px;
    width: 1px; background: var(--line-2);
}
.station { position: relative; padding-bottom: 46px; }
.station:last-child { padding-bottom: 0; }
.station__node {
    position: absolute; left: -40px; top: 3px; width: 13px; height: 13px;
    border: 1.5px solid var(--faint); border-radius: 50%; background: var(--base);
}
.station--current .station__node { border-color: var(--contour); box-shadow: 0 0 0 4px rgba(207,148,85,.12); }
.station--current .station__node::after {
    content: ''; position: absolute; inset: 2.5px; border-radius: 50%; background: var(--contour);
}
.station__date { font-family: var(--mono); font-size: 11px; color: var(--water); letter-spacing: 0.5px; margin-bottom: 7px; }
.station__role { font-family: var(--display); font-size: 21px; font-weight: 500; line-height: 1.2; margin-bottom: 5px; }
.station__org { font-size: 13.5px; color: var(--muted); }
.station__place { font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: 0.3px; margin: 4px 0 13px; }
.station__desc { font-size: 13.5px; color: var(--muted); line-height: 1.75; max-width: 68ch; font-weight: 300; }
.station__tools { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 12px; }
.station__tools b { color: var(--contour); font-weight: 500; }
.station--brief .station__role { font-size: 18px; }

/* ============================================================
   ABOUT
   ============================================================ */
.about { display: grid; grid-template-columns: 220px 1fr; gap: 60px; align-items: start; }
.about__photo { position: relative; }
.about__photo img { display: block; width: 100%; border: 1px solid var(--line-2); filter: grayscale(30%) contrast(1.02); }
.about__photo figcaption {
    font-family: var(--mono); font-size: 10px; letter-spacing: 1px; color: var(--faint);
    margin-top: 10px; text-transform: uppercase;
}
.about__body p { color: var(--muted); font-size: 15px; line-height: 1.85; margin-bottom: 16px; font-weight: 300; }
.about__body strong { color: var(--paper); font-weight: 500; }
.about__body a { color: var(--water); }
.about__body a:hover { text-decoration: underline; text-underline-offset: 3px; }

.about__tools { margin: 26px 0 30px; }

.socials { display: flex; gap: 10px; }
.social {
    width: 40px; height: 40px; border: 1px solid var(--line-2); color: var(--muted);
    display: flex; align-items: center; justify-content: center; font-size: 17px;
    transition: color .18s, border-color .18s;
}
.social:hover { color: var(--contour); border-color: var(--contour); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { border-top: 1px solid var(--line); padding: 34px 6vw; }
.site-footer__inner {
    max-width: var(--wrap); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.site-footer p { font-family: var(--mono); font-size: 10.5px; color: var(--faint); letter-spacing: 0.5px; }
.site-footer .coord { color: var(--muted); }

/* ============================================================
   LANGUAGE MODAL (PT entry)
   ============================================================ */
.lang-modal {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(10,14,16,0.9); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center; padding: 24px;
    transition: opacity .35s, visibility .35s;
}
.lang-modal.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.lang-modal__card {
    width: min(400px, 100%); background: var(--base-2); border: 1px solid var(--line-2);
    padding: 40px 36px; text-align: center;
}
.lang-modal__coord { font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; color: var(--faint); margin-bottom: 22px; }
.lang-modal__title { font-family: var(--display); font-size: 23px; font-weight: 500; }
.lang-modal__title em { display: block; font-style: italic; font-weight: 400; font-size: 16px; color: var(--muted); margin-top: 4px; }
.lang-modal__opts { display: flex; gap: 12px; margin: 30px 0 20px; }
.lang-modal__opt {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 18px 10px; border: 1px solid var(--line-2); color: var(--paper); cursor: pointer;
    background: none; font: inherit; transition: border-color .18s, background .18s;
}
.lang-modal__opt:hover { border-color: var(--contour); background: rgba(207,148,85,.07); }
.lang-modal__opt b { font-family: var(--mono); font-size: 19px; color: var(--contour); font-weight: 600; }
.lang-modal__opt span { font-size: 12.5px; color: var(--muted); }
.lang-modal__skip {
    background: none; border: none; font-family: var(--mono); font-size: 11px; color: var(--faint);
    cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.lang-modal__skip:hover { color: var(--paper); }

/* ============================================================
   REVEAL + MOTION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .btn:hover, .project:hover .project__go i { transform: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
    .hero__grid { grid-template-columns: 1fr; gap: 48px; }
    .topo-figure { order: -1; }
    .topo { width: min(360px, 80%); }
    .projects { grid-template-columns: 1fr; }
    .about { grid-template-columns: 1fr; gap: 32px; }
    .about__photo { width: 190px; }
    .nav, .contact-link { display: none; }
    .burger { display: block; }
    .section { padding: 76px 0; }
}
@media (max-width: 520px) {
    .lang-modal__opts { flex-direction: column; }
    .section-head__top { flex-direction: column; gap: 8px; }
    .timeline { padding-left: 30px; }
    .station__node { left: -30px; }
}
