/* ========================================================================
   Diogo Assis — portfolio
   Themes: mono (black & white, auto dark) · brasil (pastel green & yellow)
   ======================================================================== */

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #111111;
  --muted: #6b6b6b;
  --border: #e4e4e4;
  --accent: #111111;
  --accent-contrast: #fafafa;
  --accent-soft: #ededed;
  --accent-soft-2: #f4f4f4;
  --selection-bg: #111111;
  --selection-fg: #fafafa;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;

  --maxw: 960px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="brasil"]):not([data-theme="light"]) {
    --bg: #0e0e0e;
    --surface: #161616;
    --text: #f2f2f2;
    --muted: #9a9a9a;
    --border: #272727;
    --accent: #f2f2f2;
    --accent-contrast: #0e0e0e;
    --accent-soft: #1f1f1f;
    --accent-soft-2: #191919;
    --selection-bg: #f2f2f2;
    --selection-fg: #0e0e0e;
  }
}

:root[data-theme="dark"] {
  --bg: #0e0e0e;
  --surface: #161616;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --border: #272727;
  --accent: #f2f2f2;
  --accent-contrast: #0e0e0e;
  --accent-soft: #1f1f1f;
  --accent-soft-2: #191919;
  --selection-bg: #f2f2f2;
  --selection-fg: #0e0e0e;
}

:root[data-theme="brasil"] {
  --bg: #faf6e8;
  --surface: #fffdf4;
  --text: #22372b;
  --muted: #6d7d6f;
  --border: #e3dcc0;
  --accent: #3e7c59;
  --accent-contrast: #fdfbee;
  --accent-soft: #d9ecd9;
  --accent-soft-2: #f6ecc0;
  --selection-bg: #3e7c59;
  --selection-fg: #fdfbee;
}

/* ------------------------------------------------------------------ base */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

::selection { background: var(--selection-bg); color: var(--selection-fg); }

a { color: inherit; }

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

em {
  font-style: normal;
  font-weight: 600;
  background: var(--accent-soft-2);
  border-radius: 4px;
  padding: 0 4px;
  transition: background-color 0.5s var(--ease);
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: calc(var(--maxw) + 40px);
  margin: 0 auto;
  padding: 16px 20px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.5s var(--ease);
}

.brand {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 17px;
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

.site-nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
}

.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  transition: color 0.25s var(--ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -3px;
  height: 2px;
  background: var(--accent);
  transition: right 0.3s var(--ease);
}

.site-nav a:hover { color: var(--text); }
.site-nav a:hover::after { right: 0; }

/* theme + language switches */

.controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease);
}

.theme-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.15s var(--ease);
}

.theme-btn:active { transform: scale(0.94); }

.theme-btn:hover { color: var(--text); }

.theme-btn.is-active {
  background: var(--accent-soft);
  color: var(--text);
}

.theme-btn.icon-only { padding: 6px 9px; }

.theme-btn > svg {
  width: 15px;
  height: 15px;
  display: block;
}

.theme-btn .flag {
  width: 17px;
  height: 12px;
}

.theme-btn:not(.is-active) .flag {
  filter: grayscale(0.7);
  opacity: 0.75;
  transition: filter 0.3s var(--ease), opacity 0.3s var(--ease);
}

.theme-btn:hover .flag {
  filter: none;
  opacity: 1;
}

/* ------------------------------------------------------------------ hero */

.hero { padding: 96px 0 72px; }

.kicker {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(44px, 8.5vw, 84px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.hero-title .line { display: block; }

.accent-dot { color: var(--accent); transition: color 0.5s var(--ease); }

.hero-sub {
  max-width: 560px;
  margin-top: 26px;
  font-size: 18px;
  color: var(--muted);
}

.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s var(--ease), border-color 0.25s var(--ease),
              background-color 0.3s var(--ease), color 0.3s var(--ease),
              box-shadow 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 45%, transparent);
}

.btn:active { transform: translateY(0) scale(0.97); }

.btn-solid {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 48px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.meta-item { display: flex; flex-direction: column; }

.meta-num {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.meta-label { font-size: 13px; color: var(--muted); }

/* -------------------------------------------------------------- sections */

.section { padding: 56px 0; }

.section-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 36px;
}

.section-index {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  color: var(--accent);
}

.section-intro {
  max-width: 640px;
  margin: -16px 0 32px;
  font-size: 15.5px;
  color: var(--muted);
}

/* jobs / timeline */

.job {
  position: relative;
  padding: 0 0 44px 28px;
  border-left: 1px solid var(--border);
}

.job:last-child { padding-bottom: 8px; }

.job::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  transition: background-color 0.5s var(--ease), transform 0.3s var(--ease);
}

.job:hover::before { transform: scale(1.5); }

.job-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.job-role { font-size: 20px; font-weight: 650; letter-spacing: -0.015em; }

.job-org { color: var(--muted); font-size: 15px; }

.job-when {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.edu-head { align-items: center; }

.edu-main {
  display: flex;
  align-items: center;
  gap: 20px;
}

.edu-logo {
  flex-shrink: 0;
  display: block;
  width: 104px;
  height: 52px;
  background: var(--text);
  -webkit-mask: url("assets/puc-minas.png") no-repeat center / contain;
  mask: url("assets/puc-minas.png") no-repeat center / contain;
}

:root[data-theme="brasil"] .edu-logo { background: var(--accent); }

.job-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 15px;
  color: var(--muted);
}

.job-points li {
  position: relative;
  padding-left: 18px;
}

.job-points li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.job-stack {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}

/* cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease),
              box-shadow 0.25s var(--ease), background-color 0.5s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--accent) 50%, transparent);
}

.card-title { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }

.card-body { font-size: 14.5px; color: var(--muted); flex: 1; }

.card-stack {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  transition: color 0.25s var(--ease);
}

/* make the whole card clickable */
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card:has(.card-link):hover .card-link { color: var(--accent); }

.card-link .arr {
  transition: transform 0.25s var(--ease);
}

.card:hover .card-link .arr {
  transform: translate(2px, -2px);
}

/* skills */

.skill-group { margin-bottom: 28px; }

.skill-label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: default;
  transition: transform 0.2s var(--ease), border-color 0.25s var(--ease),
              background-color 0.3s var(--ease);
}

.chip:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.chip i {
  font-size: 17px;
  color: var(--muted);
  transition: color 0.25s var(--ease);
}

.chip svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: color 0.25s var(--ease);
}

.chip:hover i,
.chip:hover svg { color: var(--accent); }

/* contact */

.contact { padding: 88px 0 96px; text-align: center; }

.contact-title {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.contact-sub { margin-top: 14px; color: var(--muted); font-size: 17px; }

.contact .hero-links { justify-content: center; }

/* footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 20px 36px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

.footer-links { display: flex; gap: 16px; }

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.footer-links a:hover { color: var(--text); }

.footer-links svg {
  width: 15px;
  height: 15px;
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* ------------------------------------------------------------ animations */

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

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}

/* -------------------------------------------------------------- mobile */

@media (max-width: 640px) {
  .site-nav { display: none; }
  .controls { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
  .hero { padding: 64px 0 56px; }
  .hero-meta { gap: 20px 32px; }
  .job { padding-left: 22px; }
  .edu-main { gap: 14px; }
  .edu-logo { width: 88px; height: 44px; }
}
