/* =====================================================================
   COLOURS
   The background is always white. Each palette below sets the same list
   of colours; the site uses whichever palette is active
   (<html data-palette="...">). The first block (:root) is the default.

   --nav-bg / --nav-text      top bar and its text
   --nav-line                 outline of the EN/PT button
   --nav-active(-text)        underline of the current page, button hover
   --accent                   dates, categories (text on white)
   --link, --btn              links; outlined buttons and icons
   --card, --card-line        boxes (Contact, Gallery)
   --chip-bg, --chip-line     research topic pills
   --tag-bg/-line/-text       Blog tags
   --badge-bg, --badge-text   "First author" label
   --ring1, --ring2           rings around the photo
   --heading-accent           small section headings in the CV
   --s1 … --s5                coloured stripes (top bar uses s1, s2, s4, s5)
   --tree-filter              recolours the white tree for light top bars
   ===================================================================== */

/* DEFAULT: Colorida 2 / Colorful 2 — forest green, terracotta, sand, gold, teal */
:root {
  --nav-bg: #1B4332; --nav-text: #ffffff; --nav-line: rgba(255,255,255,.6);
  --nav-active: #E9C46A; --nav-active-text: #1B4332;
  --accent: #C4512E; --link: #1F6F5B; --btn: #1F6F5B;
  --card: #F3F8F5; --card-line: #95D5B2;
  --chip-bg: #FDF0E6; --chip-line: #F4A261;
  --tag-bg: #FBF3DC; --tag-line: #E9C46A; --tag-text: #6B5216;
  --badge-bg: #E76F51; --badge-text: #ffffff;
  --ring1: #2A9D8F; --ring2: #E9C46A; --heading-accent: #1F6F5B;
  --s1: #E76F51; --s2: #F4A261; --s3: #264653; --s4: #E9C46A; --s5: #2A9D8F;
  --tree-filter: none;

  --text: #1d1d1f;
  --muted: #5f6368;
  --line: #e4e4e4;
  --max: 1060px;
}

/* Antiga / Previous (coral, mint, blue, yellow, lavender) */
html[data-palette="atual"] {
  --nav-bg: #004E8C; --nav-text: #ffffff; --nav-line: rgba(255,255,255,.6);
  --nav-active: #F7DA7C; --nav-active-text: #004E8C;
  --accent: #D64A2B; --link: #004E8C; --btn: #004E8C;
  --card: #EFFAF8; --card-line: #ADEAE2;
  --chip-bg: #EEEEFB; --chip-line: #CFCFF1;
  --tag-bg: #FDF3D3; --tag-line: #F7DA7C; --tag-text: #6B5A1E;
  --badge-bg: #F25F3D; --badge-text: #ffffff;
  --ring1: #ADEAE2; --ring2: #CFCFF1; --heading-accent: #004E8C;
  --s1: #F25F3D; --s2: #ADEAE2; --s3: #004E8C; --s4: #F7DA7C; --s5: #CFCFF1;
  --tree-filter: none;
}

/* 1. Simples / Simple — grayscale */
html[data-palette="simples"] {
  --nav-bg: #262626; --nav-text: #ffffff; --nav-line: rgba(255,255,255,.5);
  --nav-active: #BDBDBD; --nav-active-text: #262626;
  --accent: #4A4A4A; --link: #262626; --btn: #262626;
  --card: #F6F6F6; --card-line: #DDDDDD;
  --chip-bg: #F2F2F2; --chip-line: #D6D6D6;
  --tag-bg: #F2F2F2; --tag-line: #CFCFCF; --tag-text: #444444;
  --badge-bg: #4A4A4A; --badge-text: #ffffff;
  --ring1: #D9D9D9; --ring2: #9E9E9E; --heading-accent: #262626;
  --s1: #444444; --s2: #777777; --s3: #999999; --s4: #BBBBBB; --s5: #DDDDDD;
  --tree-filter: none;
}

/* 2. Colorida / Colorful — violet, raspberry, sunflower, teal, tangerine */
html[data-palette="colorida"] {
  --nav-bg: #3A1F7A; --nav-text: #ffffff; --nav-line: rgba(255,255,255,.6);
  --nav-active: #FFC43D; --nav-active-text: #3A1F7A;
  --accent: #D1105A; --link: #3A1F7A; --btn: #3A1F7A;
  --card: #FFF4F8; --card-line: #FFB3CF;
  --chip-bg: #E8F8F5; --chip-line: #1B998B;
  --tag-bg: #FFF3D1; --tag-line: #FFC43D; --tag-text: #7A5500;
  --badge-bg: #D1105A; --badge-text: #ffffff;
  --ring1: #1B998B; --ring2: #FFC43D; --heading-accent: #D1105A;
  --s1: #D1105A; --s2: #FFC43D; --s3: #3A1F7A; --s4: #1B998B; --s5: #F46036;
  --tree-filter: none;
}

/* 3. Pastel — light blue bar, pink, mint, butter, lilac */
html[data-palette="pastel"] {
  --nav-bg: #DCEBF5; --nav-text: #2E3A4F; --nav-line: rgba(46,58,79,.35);
  --nav-active: #E8A0BF; --nav-active-text: #2E3A4F;
  --accent: #A8507A; --link: #3F6E91; --btn: #5B7FA3;
  --card: #F6FAF4; --card-line: #CFE8C9;
  --chip-bg: #F9EEF4; --chip-line: #F1C9DC;
  --tag-bg: #FFF8DC; --tag-line: #F6E3A1; --tag-text: #6E5E2A;
  --badge-bg: #E8A0BF; --badge-text: #3B2330;
  --ring1: #F1C9DC; --ring2: #CFE8C9; --heading-accent: #5B7FA3;
  --s1: #F4B6C2; --s2: #BFE3C8; --s3: #BFD7EA; --s4: #FBE7A1; --s5: #D9C8F0;
  --tree-filter: brightness(0) opacity(.72);
}

/* 4. Daltônicos / Colour-blind safe — Okabe–Ito palette */
html[data-palette="daltonicos"] {
  --nav-bg: #0072B2; --nav-text: #ffffff; --nav-line: rgba(255,255,255,.7);
  --nav-active: #F0E442; --nav-active-text: #000000;
  --accent: #B34D00; --link: #0072B2; --btn: #0072B2;
  --card: #EEF7FC; --card-line: #56B4E9;
  --chip-bg: #E6F5EF; --chip-line: #009E73;
  --tag-bg: #FDF9D6; --tag-line: #F0E442; --tag-text: #5C5500;
  --badge-bg: #D55E00; --badge-text: #ffffff;
  --ring1: #56B4E9; --ring2: #E69F00; --heading-accent: #0072B2;
  --s1: #E69F00; --s2: #56B4E9; --s3: #0072B2; --s4: #009E73; --s5: #D55E00;
  --tree-filter: none;
}

/* 5. Colorida 2 / Colorful 2 — forest green, terracotta, sand, gold, teal */
html[data-palette="colorida2"] {
  --nav-bg: #1B4332; --nav-text: #ffffff; --nav-line: rgba(255,255,255,.6);
  --nav-active: #E9C46A; --nav-active-text: #1B4332;
  --accent: #C4512E; --link: #1F6F5B; --btn: #1F6F5B;
  --card: #F3F8F5; --card-line: #95D5B2;
  --chip-bg: #FDF0E6; --chip-line: #F4A261;
  --tag-bg: #FBF3DC; --tag-line: #E9C46A; --tag-text: #6B5216;
  --badge-bg: #E76F51; --badge-text: #ffffff;
  --ring1: #2A9D8F; --ring2: #E9C46A; --heading-accent: #1F6F5B;
  --s1: #E76F51; --s2: #F4A261; --s3: #264653; --s4: #E9C46A; --s5: #2A9D8F;
  --tree-filter: none;
}

/* Palette picker (preview tool — remove once a palette is chosen) */
.palette-picker { position: fixed; left: 16px; bottom: 16px; z-index: 90; font-size: 14px; }
.palette-picker > button { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; box-shadow: 0 2px 10px rgba(0,0,0,.15); font: inherit; cursor: pointer; }
.palette-picker ul { list-style: none; margin: 0 0 8px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.18); display: none; }
.palette-picker.open ul { display: block; }
.palette-picker li button { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 6px 8px; border-radius: 6px; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.palette-picker li button:hover, .palette-picker li button.on { background: #f1f1f1; }
.palette-picker li button.on { font-weight: 700; }
.swatches { display: inline-flex; }
.swatches i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); margin-right: -3px; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Lato", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: #ffffff;
  line-height: 1.6;
  font-size: 17px;
}
a { color: var(--link); }
a:hover { color: var(--accent); }
img { max-width: 100%; }

/* ===== Top bar ===== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  color: var(--nav-text);
}
.topbar .inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px;
  padding: 0 20px; height: 58px;
}
.brand { color: var(--nav-text); text-decoration: none; font-size: 20px; white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; }
.brand-tree { height: 38px; width: 38px; filter: var(--tree-filter); }
.brand:hover { color: var(--nav-text); opacity: .85; }
.menu { display: flex; gap: 22px; margin-left: 8px; }
.menu a { color: var(--nav-text); text-decoration: none; font-size: 16px; opacity: .85; padding: 4px 0; border-bottom: 2px solid transparent; }
.menu a:hover, .menu a.active { opacity: 1; border-bottom-color: var(--nav-active); }
.topbar { border-bottom: 4px solid transparent; border-image: linear-gradient(90deg, var(--s1) 0 25%, var(--s2) 25% 50%, var(--s4) 50% 75%, var(--s5) 75% 100%) 1; }
.icons { margin-left: auto; display: flex; gap: 16px; align-items: center; }
.icons a { color: var(--nav-text); font-size: 20px; opacity: .85; text-decoration: none; }
.icons a:hover { opacity: 1; color: var(--nav-text); }
.burger { display: none; background: none; border: 0; color: var(--nav-text); font-size: 26px; cursor: pointer; }
.lang-toggle { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--nav-text); border: 1px solid var(--nav-line); border-radius: 999px; padding: 3px 12px; font: inherit; font-size: 14px; font-weight: 700; letter-spacing: .05em; cursor: pointer; }
.lang-toggle:hover { background: var(--nav-active); border-color: var(--nav-active); color: var(--nav-active-text); }

/* Language switch: show one language, hide the other */
html:not(.lang-en) .en, html.lang-en .pt { display: none !important; }

@media (max-width: 860px) {
  .topbar .inner { flex-wrap: wrap; height: auto; min-height: 58px; padding: 10px 16px; gap: 12px; }
  .burger { display: block; }
  .lang-toggle { margin-left: auto; }
  .menu, .icons { display: none; width: 100%; order: 5; }
  .topbar.open .menu { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 0; }
  .topbar.open .icons { display: flex; margin: 8px 0 6px; }
}

/* ===== Page layout ===== */
main { max-width: var(--max); margin: 0 auto; padding: 32px 16px 64px; }
.page-title { font-size: clamp(34px, 6vw, 58px); font-weight: 700; margin: 8px 0 6px; line-height: 1.1; }
.page-lead { color: var(--muted); margin: 0 0 24px; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 20px 0 32px; }
h2.section { font-size: 26px; margin: 40px 0 12px; }

/* ===== Home ===== */
.hero { text-align: center; padding-top: 12px; }
.avatar { width: 190px; height: 190px; border-radius: 50%; object-fit: cover; }
.hero h1 { font-size: clamp(32px, 5vw, 44px); font-weight: 400; margin: 14px 0 2px; }
.hero .role { color: var(--muted); margin: 0; }
.quote { font-style: italic; color: var(--muted); max-width: 620px; margin: 14px auto 0; }
.bio { max-width: 760px; margin: 28px auto 0; text-align: left; }
.bio + .bio { margin-top: 12px; }
.hero .place { font-size: 15px; margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0 0; padding: 0; list-style: none; }
.chips li { background: var(--chip-bg); border: 1px solid var(--chip-line); border-radius: 999px; padding: 3px 14px; font-size: 15px; }
.profile-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 26px 0 0; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 6px; border: 1px solid var(--btn); color: var(--btn); text-decoration: none; font-size: 15px; background: #fff; }
.btn:hover { background: var(--btn); color: #fff; }
.contact { text-align: center; margin-top: 18px; color: var(--muted); font-size: 15px; }
.home-grid { max-width: 760px; margin: 0 auto; }

/* ===== Publications ===== */
.pub-layout { display: grid; grid-template-columns: 1fr 200px; gap: 40px; }
.pub-layout > *, .pub > * { min-width: 0; }
.pub, .card { overflow-wrap: anywhere; }
@media (max-width: 860px) { .pub-layout { grid-template-columns: 1fr; } .pub-side { order: -1; } }
.pub-side h3 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 6px 0 8px; }
.filters { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 860px) { .filters { flex-direction: row; flex-wrap: wrap; gap: 6px 14px; } }
.filters button { background: none; border: 0; padding: 0; font: inherit; font-size: 15px; color: var(--accent); cursor: pointer; text-align: left; }
.filters button.on { color: var(--text); font-weight: 700; }
.filters .n { color: var(--muted); }
.pub-side .stat { color: var(--muted); font-size: 14px; margin-top: 18px; }

.pub { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 600px) { .pub { grid-template-columns: 1fr; gap: 4px; } }
.pub-date { color: var(--accent); font-size: 15px; font-weight: 700; }
.pub h3 { font-size: 21px; line-height: 1.3; margin: 0 0 4px; }
.pub h3 a { color: var(--text); text-decoration: none; }
.pub h3 a:hover { color: var(--link); text-decoration: underline; }
.badge { display: inline-block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 3px; padding: 0 6px; margin-right: 6px; color: var(--muted); vertical-align: middle; }
.badge.first { border-color: var(--badge-bg); background: var(--badge-bg); color: var(--badge-text); }
.authors { font-size: 15px; color: var(--muted); margin: 6px 0 2px; }
.authors b { color: var(--text); }
.venue { font-size: 15px; margin: 0 0 8px; }
.venue i { color: var(--text); }
details.abstract { margin: 6px 0; }
details.abstract summary { cursor: pointer; color: var(--link); font-size: 15px; }
details.abstract p { margin: 8px 0 0; text-align: justify; font-size: 16px; }
.pub-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pub-links .btn { padding: 3px 12px; font-size: 14px; }

/* ===== Gallery (Outreach) ===== */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px; }
.gallery figure { margin: 0; text-align: center; }
.gallery .thumb { display: block; width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); box-shadow: 0 1px 4px rgba(0,0,0,.08); cursor: zoom-in; background: var(--card); }
.gallery .placeholder { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; aspect-ratio: 3/4; border: 2px dashed var(--card-line); background: var(--card); border-radius: 4px; color: var(--muted); font-size: 14px; padding: 12px; }
.gallery figcaption { color: var(--accent); font-size: 14px; margin-top: 8px; line-height: 1.35; }
.gallery figcaption span { display: block; color: var(--muted); }
.gallery.wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.gallery .thumb.wide { aspect-ratio: 16/9; object-position: top; }
.gallery .thumb { object-position: top; }
.gallery figcaption b { display: block; color: var(--text); font-weight: 700; }
.gallery figcaption span span { display: inline; }
.gallery figcaption .links { margin-top: 4px; }
.gallery figcaption .links a { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--link); }
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.video iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 4px; }
.video p { margin: 6px 0 0; font-size: 15px; }
.yt-thumb { position: relative; display: block; aspect-ratio: 16/9; border-radius: 4px; overflow: hidden; background: #000; }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.yt-thumb i { position: absolute; inset: 0; margin: auto; width: 1em; height: 1em; font-size: 64px; color: #ff0000; text-shadow: 0 2px 8px rgba(0,0,0,.4); }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.lightbox.show { display: flex; }
.lightbox img { max-height: 88vh; max-width: 92vw; border-radius: 4px; }
.lightbox .cap { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #fff; font-size: 15px; }
.lightbox button { position: absolute; top: 12px; right: 18px; background: none; border: 0; color: #fff; font-size: 34px; cursor: pointer; }

/* ===== Cards (Material variado) ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--card-line); border-radius: 8px; padding: 20px 22px; }
.card h3 { margin: 0 0 6px; font-size: 21px; }
.card p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.card ul { margin: 0; padding-left: 20px; }
.card li { margin: 4px 0; }
.note { font-size: 14px; color: var(--muted); }
.cards.media { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.cards.media a.card { display: flex; gap: 16px; text-decoration: none; color: var(--text); }
.cards.media a.card:hover { border-color: var(--btn); }
.cards.media a.card > i { font-size: 30px; color: var(--btn); margin-top: 4px; }
.cards.media h3 { font-size: 19px; line-height: 1.3; }
.cards.media .more { font-weight: 700; color: var(--link); font-size: 15px; }

/* ===== Blog ===== */
.post { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 600px) { .post { grid-template-columns: 1fr; gap: 4px; } }
.post > * { min-width: 0; }
.post h3 { font-size: 23px; margin: 0 0 4px; }
.post h3 a { color: var(--text); text-decoration: none; }
.cite-notice { background: #FFF8E6; border-left: 4px solid var(--nav-active); border-radius: 4px; padding: 10px 14px; margin: 0 0 4px; font-size: 15px; }
.cite-notice i { color: var(--accent); margin-right: 6px; }
.misc-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 6px; }
.misc-filters button { font: inherit; font-size: 15px; background: #fff; color: var(--btn); border: 1px solid var(--btn); border-radius: 999px; padding: 4px 14px; cursor: pointer; }
.misc-filters button .n { font-size: 12px; opacity: .75; margin-left: 2px; }
.misc-filters button:hover { background: var(--card); }
.misc-filters button.on { background: var(--btn); color: #fff; }
.post[hidden] { display: none; }
.post .post-when { display: block; color: var(--muted); font-weight: 400; font-size: 13px; margin-top: 2px; }
.post h3 a:hover { color: var(--link); text-decoration: underline; }
.post p { margin: 4px 0 10px; color: var(--muted); }
.post ul { margin: 6px 0 0; padding-left: 20px; }
.post li { margin: 3px 0; }
.tag { display: inline-block; font-size: 12px; background: var(--tag-bg); border: 1px solid var(--tag-line); border-radius: 999px; padding: 0 10px; margin-right: 6px; color: var(--tag-text); }

/* ===== Post pages (Miscellaneous) ===== */
.article { max-width: 780px; margin: 0 auto; }
.article .back { display: block; width: fit-content; font-size: 15px; margin-bottom: 12px; text-decoration: none; }
.article .page-title { font-size: clamp(30px, 5vw, 44px); }
.article .meta { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.article h2 { font-size: 23px; margin: 34px 0 10px; }
.article p, .article li { line-height: 1.7; }
.article ul.refs { padding-left: 20px; }
.article ul.refs li { margin: 0 0 12px; }
.article .callout { background: var(--card); border: 1px solid var(--card-line); border-radius: 8px; padding: 14px 18px; margin: 18px 0; font-size: 16px; }
.article pre { margin: 12px 0 0; border: 1px solid var(--line); border-radius: 8px; max-height: 720px; overflow: auto; font-size: 13.5px; line-height: 1.5; }
.article pre code.hljs { padding: 16px 18px; }
.article figure { margin: 24px 0; }
.article figure img { width: 100%; border: 1px solid var(--line); border-radius: 6px; display: block; }
.article figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.article table.data { border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.article table.data th, .article table.data td { border: 1px solid var(--line); padding: 4px 14px; text-align: center; }
.article table.data th { background: var(--card); }
.article h3 { font-size: 19px; margin: 24px 0 8px; }
.article .tip { background: #FFF8E6; border-left: 4px solid var(--nav-active); padding: 10px 14px; border-radius: 4px; margin: 12px 0; font-size: 16px; }
.article figure.small img { width: auto; max-width: 100%; }
.article kbd { font-family: inherit; font-size: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; white-space: nowrap; }
.article figcaption .cite { display: block; margin-top: 6px; font-size: 13px; }
.article .source { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 30px; }
.article .lead-quote { font-size: 15px; color: var(--muted); border-left: 3px solid var(--card-line); padding-left: 12px; margin: 0 0 22px; }
.series { background: var(--card); border: 1px solid var(--card-line); border-radius: 8px; padding: 16px 20px; margin: 36px 0 0; }
.series b { display: block; margin-bottom: 6px; }
.series ol { margin: 0; padding-left: 20px; }
.series li { margin: 4px 0; }
.series li.current { font-weight: 700; }
.series .nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 15px; }
.code-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.code-actions button.btn { font: inherit; font-size: 15px; cursor: pointer; }

/* ===== CV / Contact ===== */
.cv-top { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 8px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 165px 1fr; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 600px) { .timeline li { grid-template-columns: 1fr; gap: 2px; } }
.timeline .when { color: var(--accent); font-weight: 700; font-size: 15px; }
.timeline .what b { display: block; }
.timeline .what span { color: var(--muted); font-size: 15px; }
.timeline .what p { margin: 4px 0 0; font-size: 15px; }
h3.sub { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--heading-accent); margin: 26px 0 4px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.contact-grid a.card { text-decoration: none; color: var(--text); display: flex; gap: 14px; align-items: center; }
.contact-grid a.card:hover { border-color: var(--btn); }
.contact-grid a.card i { font-size: 30px; color: var(--btn); width: 34px; text-align: center; }
.contact-grid a.card b { display: block; }
.contact-grid a.card span { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.contact-grid a.card b span { color: inherit; font-size: inherit; }

footer { border-top: 4px solid transparent; border-image: linear-gradient(90deg, var(--s1) 0 20%, var(--s2) 20% 40%, var(--s3) 40% 60%, var(--s4) 60% 80%, var(--s5) 80% 100%) 1; text-align: center; color: var(--muted); font-size: 14px; padding: 20px 16px 28px; }
