/* ciruzz00.it — stile terminale / tiling WM ispirato a Omarchy */

:root {
  /* default: gruvbox hard dark */
  --bg: #1d2021;
  --bg-alt: #141617;
  --surface: #32302f;
  --fg: #ebdbb2;
  --muted: #928374;
  --accent: #fe8019;
  --accent-2: #fabd2f;
  --green: #b8bb26;
  --yellow: #fabd2f;
  --red: #fb4934;
  --cyan: #8ec07c;
  --blue: #83a598;
  --border: #3c3836;
  --border-active: #fe8019;
  --gap: 12px;
  --radius: 0px;
  color-scheme: dark;
}

/* Temi selezionabili (comando `theme` nel terminale) */
:root[data-theme="matrix"] {
  --bg: #050805; --bg-alt: #000000; --surface: #0b140b; --fg: #b6f5b6; --muted: #3f7a3f;
  --accent: #39ff14; --accent-2: #7cff7c; --green: #39ff14; --yellow: #c6ff6b; --red: #ff5f5f;
  --cyan: #6bffb0; --border: #1e3d1e; --border-active: #39ff14;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.55;
  transition: background .25s ease, color .25s ease;
}

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

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

/* ───────────── Barra superiore stile waybar ───────────── */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 16px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.bar .workspaces { display: flex; gap: 4px; }
.bar .workspaces a {
  padding: 1px 10px;
  color: var(--muted);
  border: 1px solid transparent;
}
.bar .workspaces a.active {
  color: var(--accent);
  border-color: var(--accent);
}
.bar .workspaces a:hover { background: var(--surface); color: var(--fg); }
.bar .title { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .status { display: flex; gap: 14px; color: var(--muted); white-space: nowrap; }
.bar .status .ok { color: var(--green); }
.bar .theme-btn {
  font: inherit; color: var(--accent-2); background: none; border: none; cursor: pointer; padding: 0;
}
.bar .theme-btn:hover { text-decoration: underline; }

/* ───────────── Layout a tile ───────────── */
main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.hero {
  text-align: center;
  padding: 28px 0 22px;
}
.logo {
  display: inline-block;
  margin: 0;
  color: var(--accent);
  font-size: clamp(5px, calc((100vw - 40px) / 47), 15px);
  line-height: 1.1;
  text-align: left;
  white-space: pre;
  cursor: default;
  user-select: none;
  text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 35%, transparent);
}
.tagline {
  margin-top: 18px;
  color: var(--muted);
  min-height: 1.6em;
}
.tagline .typed { color: var(--fg); }
.cursor {
  display: inline-block;
  width: .6em;
  height: 1.1em;
  vertical-align: text-bottom;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.tiles {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}
.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }

@media (max-width: 860px) {
  .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; }
}

.win {
  position: relative;
  background: color-mix(in srgb, var(--bg) 85%, var(--surface));
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 18px 18px;
  min-width: 0;
  transition: border-color .15s ease;
}
.win:hover, .win:focus-within { border-color: var(--border-active); }
.win > .win-title {
  position: absolute;
  top: 6px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.win:hover > .win-title .name, .win:focus-within > .win-title .name { color: var(--accent); }
.win h2 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-2);
}
.win h2::before { content: "# "; color: var(--muted); }
.win p { margin: 0 0 10px; }
.win p:last-child { margin-bottom: 0; }

.prompt { color: var(--green); }
.prompt .host { color: var(--accent); }
.prompt .path { color: var(--accent-2); }
.dim { color: var(--muted); }
.hl { color: var(--yellow); }
.red { color: var(--red); }
.cyan { color: var(--cyan); }
.green { color: var(--green); }

/* ───────────── neofetch ───────────── */
.fetch {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.fetch pre.art {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  line-height: 1.15;
}
.fetch .info { flex: 1; min-width: 240px; }
.fetch .info div { white-space: normal; }
.fetch .k { color: var(--accent); font-weight: 700; }
.fetch .sep { color: var(--muted); }
.palette { display: flex; gap: 0; margin-top: 10px; }
.palette span { width: 26px; height: 14px; display: inline-block; }
.c-red { background: var(--red); } .c-green { background: var(--green); } .c-yellow { background: var(--yellow); }
.c-accent { background: var(--accent); } .c-accent-2 { background: var(--accent-2); } .c-cyan { background: var(--cyan); }
.c-fg { background: var(--fg); }

/* ───────────── link list ───────────── */
.links { list-style: none; padding: 0; margin: 0; }
.links li { padding: 3px 0; }
.links li::before { content: "› "; color: var(--muted); }
.links .label { display: inline-block; min-width: 9ch; color: var(--muted); }

/* ───────────── skill bars ───────────── */
.skills { list-style: none; padding: 0; margin: 0; }
.skills li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.skills .bar-ascii { color: var(--green); letter-spacing: -1px; white-space: nowrap; }
.skills .bar-ascii .empty { color: var(--border); }

/* ───────────── terminale interattivo ───────────── */
.term {
  height: 380px;
  overflow-y: auto;
  font-size: 14px;
  cursor: text;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.term .line { white-space: pre-wrap; word-break: break-word; }
.term .input-line { display: flex; gap: 8px; }
.term input {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: none;
  outline: none;
  caret-color: var(--accent);
  padding: 0;
}
.term pre { margin: 0; font: inherit; }

footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 18px 16px 30px;
}

@media (max-width: 600px) {
  html, body { font-size: 14px; }
  .bar .title { display: none; }
  .fetch pre.art { font-size: 10px; }
}

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