/* ==========================================================================
   bartoloilliano.it — foglio di stile unico
   Tema terminale: scuro, monospace, accento verde fosforo.
   Nessuna dipendenza esterna: font di sistema, niente CDN.
   ========================================================================== */

:root {
  --bg: #0a0f14;
  --surface: #101823;
  --text: #d3dde8;
  --text-muted: #8294a8;
  --accent: #3fe081;
  --accent-soft: rgba(63, 224, 129, .1);
  --amber: #e5c07b;
  --border: #1e2936;
  --shadow: 0 1px 3px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .35);
  --radius: 8px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --font: var(--mono);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

h1, h2, h3 { line-height: 1.3; letter-spacing: -.01em; }

code {
  font-family: var(--mono);
  font-size: .92em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: .12em .4em;
  border-radius: 4px;
}

/* prompt shell riutilizzabile: la parte verde prima del comando */
.prompt {
  color: var(--accent);
  font-weight: 700;
}

.output { color: var(--text-muted); }

/* cursore lampeggiante */
.cursor {
  display: inline-block;
  width: .6em;
  height: 1.15em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
  html { scroll-behavior: auto; }
}

/* --- layout ------------------------------------------------------------- */

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: start;
  padding: 48px 0 80px;
}

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; padding-top: 24px; }
}

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

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}
.brand::before { content: "~/"; color: var(--accent); }
.brand:hover { text-decoration: none; color: var(--accent); }

.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }

.site-nav a {
  color: var(--text-muted);
  font-size: .9rem;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--accent); text-decoration: none; }
.site-nav a[aria-current="page"]::before { content: "> "; }

/* --- finestra terminale (hero) ------------------------------------------ */

.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 56px;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #0c1219;
  border-bottom: 1px solid var(--border);
}

.terminal-bar .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
}
.terminal-bar .dot:nth-child(1) { background: #ff5f57; }
.terminal-bar .dot:nth-child(2) { background: #febc2e; }
.terminal-bar .dot:nth-child(3) { background: #28c840; }

.terminal-title {
  margin-left: 8px;
  font-size: .8rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 20px 22px;
  font-size: .92rem;
  overflow-x: auto;
}

.terminal-body p { margin: 0 0 4px; white-space: nowrap; }
.terminal-body p + p:has(.prompt) { margin-top: 14px; }

/* --- box avatar (sidebar) ------------------------------------------------ */

.profile-card {
  position: sticky;
  top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  text-align: center;
}

@media (max-width: 820px) {
  .profile-card { position: static; }
}

.profile-card .avatar {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 18px;
  border: 2px solid var(--accent);
}

.profile-card h1 {
  font-size: 1.3rem;
  margin: 0 0 4px;
}

.profile-card .role {
  color: var(--accent);
  font-size: .88rem;
  margin: 0 0 14px;
}
.profile-card .role::before { content: "< "; color: var(--text-muted); }
.profile-card .role::after { content: " />"; color: var(--text-muted); }

.profile-card .bio {
  color: var(--text-muted);
  font-size: .88rem;
  margin: 0 0 20px;
}

.profile-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: .88rem;
  transition: border-color .15s, background .15s;
}

.profile-links a:hover {
  text-decoration: none;
  border-color: var(--accent);
  background: var(--accent-soft);
}

.profile-links a.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #08130c;
  font-weight: 700;
}
.profile-links a.primary:hover { opacity: .9; background: var(--accent); }

.profile-links svg { width: 17px; height: 17px; fill: currentColor; flex: none; }

/* --- contenuto principale ------------------------------------------------ */

.content section + section { margin-top: 56px; }

.content h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 6px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}

.section-sub {
  color: var(--text-muted);
  margin: 10px 0 24px;
  font-size: .92rem;
}

.lead { font-size: 1.02rem; }

.content strong, .lead strong { color: var(--accent); }

/* --- competenze ----------------------------------------------------------- */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tags li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 14px;
  font-size: .85rem;
  color: var(--text-muted);
}
.tags li::before { content: "▹ "; color: var(--accent); }

/* --- card progetti ---------------------------------------------------------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  color: var(--text);
  transition: transform .15s, border-color .15s;
}

.project-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  border-color: var(--accent);
}

.project-card h3 { margin: 0; font-size: 1rem; color: var(--accent); overflow-wrap: anywhere; }
.project-card h3::after { content: "/"; color: var(--text-muted); }

.project-card p { margin: 0; color: var(--text-muted); font-size: .88rem; flex: 1; }

.project-card .meta {
  font-size: .78rem;
  color: var(--amber);
}

/* --- pagina progetto -------------------------------------------------------- */

.project-page { max-width: 720px; margin: 0 auto; padding: 48px 0 80px; }

.breadcrumb {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.breadcrumb::before { content: "$ pwd → "; color: var(--accent); }

.project-page h1 { font-size: 1.6rem; margin: 0 0 8px; overflow-wrap: anywhere; }

.project-page h2 { font-size: 1.05rem; margin-top: 40px; }
.project-page h2::before { content: "## "; color: var(--accent); }

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 32px;
}

.project-meta span {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 12px;
  font-size: .82rem;
}

.project-page ul li::marker { color: var(--accent); }

.repo-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #08130c;
  border-radius: 6px;
  padding: 11px 20px;
  font-weight: 700;
  font-size: .9rem;
  margin-top: 8px;
}
.repo-button:hover { text-decoration: none; opacity: .9; }
.repo-button svg { width: 18px; height: 18px; fill: currentColor; }

/* --- footer ----------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: .82rem;
}

/* --- 404 ---------------------------------------------------------------------- */

.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

.error-page .code {
  font-size: 5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
}

.error-page .term-line { margin: 4px 0; }
