/* portfolio.gabrielesalati.eu — self-hosted, no CDN, no web fonts.
   Palette and base inherited from the main site for visual consistency. */

:root {
  --bg: #b8cfe5;
  --bg-alt: #9fb9d6;
  --panel: #f0f4f9;
  --panel-2: #c8dceb;
  --text: #0f1e30;
  --text-soft: #34465e;
  --rule: #7f9bbb;
  --accent: #0d3b66;
  --accent-soft: #8ab4d9;
  --ok: #1d6b3f;
  --bad: #9b2226;
  --code-bg: #1e1e22;
  --code-text: #e8e8ea;
  --max: 820px;
  --max-wide: 1100px;
}

* { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  /* System font stack on purpose: zero font downloads, nothing to fingerprint. */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.wide { max-width: var(--max-wide); }
a { color: var(--accent); }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: var(--panel-2); }
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.1rem 1.25rem; max-width: var(--max-wide); flex-wrap: wrap;
}
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--text); line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand-tag { font-size: 0.82rem; color: var(--text-soft); margin-top: 2px; }
.site-nav { display: flex; gap: 1.4rem; align-items: center; }
.site-nav a {
  color: var(--text-soft); text-decoration: none; font-weight: 500; font-size: 0.95rem;
  padding: 0.25rem 0; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a.active { color: var(--text); border-bottom-color: var(--accent); }
.lang-sep { color: var(--rule); user-select: none; }
.lang-switch {
  font-weight: 700; font-size: .82rem; letter-spacing: .06em; color: var(--accent) !important;
  border: 1.5px solid var(--accent); border-radius: 4px; padding: .2rem .5rem !important; text-decoration: none;
}
.lang-switch:hover { background: var(--accent); color: #fff !important; }

/* ---------- hero ---------- */
main { padding: 2.5rem 0 4rem; }
.hero { padding: 1rem 0 2rem; border-bottom: 1px solid var(--rule); margin-bottom: 2.5rem; }
.hero-eyebrow {
  font-size: .85rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent); font-weight: 600; margin: 0 0 .4rem;
}
.hero h1 { font-size: 2.4rem; line-height: 1.12; margin: 0 0 .7rem; letter-spacing: -0.02em; }
.hero .lede { font-size: 1.18rem; color: var(--text-soft); margin: 0; max-width: 680px; }

/* ---------- colophon sections ---------- */
.note { margin: 2.6rem 0; }
.note h2 { font-size: 1.5rem; margin: 0 0 .6rem; letter-spacing: -0.01em; }
.note h2 .num {
  display: inline-block; min-width: 1.6rem; color: var(--accent); font-variant-numeric: tabular-nums;
}
.note p { margin: .6rem 0; }
.note-top { margin-top: 3rem; }
.audit { margin-top: 1rem; font-weight: 600; }
.note p code, .note li code, .verify code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  background: var(--bg-alt); padding: .12em .4em; border-radius: 3px; font-size: 0.9em;
}
.note ul { padding-left: 1.3rem; }
.note li { margin: .3rem 0; }

.pointer {
  display: block; margin-top: .6rem; padding: .7rem .9rem;
  background: var(--panel); border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  border-radius: 4px; font-size: .92rem; color: var(--text-soft);
}
.pointer strong { color: var(--text); }

/* ---------- verify widget ---------- */
.verify {
  margin: 1rem 0 0; padding: 1.2rem 1.3rem; background: var(--panel);
  border: 1px solid var(--rule); border-radius: 8px;
}
.verify h3 { margin: 0 0 .4rem; font-size: 1.1rem; }
.verify .btn { margin: .6rem 0; }
.hdr-table { width: 100%; border-collapse: collapse; margin-top: .8rem; font-size: .9rem; }
.hdr-table th, .hdr-table td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.hdr-table th { color: var(--text-soft); font-weight: 600; white-space: nowrap; }
.hdr-table td code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .82rem; word-break: break-word;
}
.mark { font-weight: 700; }
.mark.ok { color: var(--ok); }
.mark.bad { color: var(--bad); }
.verify .fallback { font-size: .9rem; color: var(--text-soft); }
.verify pre {
  background: var(--code-bg); color: var(--code-text); padding: .7rem .9rem;
  border-radius: 5px; overflow-x: auto; font-size: .82rem; margin: .5rem 0 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; background: var(--accent); color: #fff !important;
  padding: .6rem 1.05rem; border-radius: 5px; text-decoration: none !important;
  font-weight: 600; font-size: .95rem; border: 0; cursor: pointer; font-family: inherit;
  transition: background .15s;
}
.btn:hover { background: #082240; }
.btn-ghost { background: transparent; color: var(--accent) !important; border: 1.5px solid var(--accent); }
.btn-ghost:hover { background: var(--accent); color: #fff !important; }

/* ---------- projects ---------- */
.proj-grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem; margin-top: 1.5rem; }
@media (min-width: 680px) { .proj-grid { grid-template-columns: 1fr 1fr; } }
.proj {
  display: flex; flex-direction: column; padding: 1.3rem 1.4rem;
  background: var(--panel); border: 1px solid var(--rule); border-radius: 8px;
}
.proj h3 { margin: 0 0 .15rem; font-size: 1.15rem; letter-spacing: -0.01em; }
.proj .lang {
  display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent); font-weight: 700; margin-bottom: .5rem;
}
.proj p { margin: 0 0 1rem; font-size: .94rem; color: var(--text-soft); line-height: 1.55; flex: 1; }
.proj .code-link { font-weight: 600; text-decoration: none; color: var(--accent); align-self: flex-start; }
.proj .code-link:hover { text-decoration: underline; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); margin-top: 4rem; padding: 1.5rem 0; background: var(--panel-2); }
.site-footer .container { max-width: var(--max-wide); }
.site-footer p { color: var(--text-soft); font-size: 0.85rem; margin: .2rem 0; }
.site-footer a { color: var(--text-soft); }

@media (max-width: 560px) {
  html { font-size: 16px; }
  .site-header .container { flex-direction: column; align-items: flex-start; }
  .hero h1 { font-size: 2rem; }
  .proj-grid { grid-template-columns: 1fr; }
}
