:root {
  --bg: #0d0f14;
  --surface: #161922;
  --surface-2: #1c202b;
  --border: #2a2f3d;
  --border-soft: #20242f;
  --text: #e8e9ed;
  --text-muted: #8891a3;
  --text-faint: #565d6d;
  --accent: #7ee7c7;
  --accent-dim: #4f8f7e;
  --accent-2: #e8b86d;
  --dot-red: #ef6461;
  --dot-yellow: #f4c95d;
  --dot-green: #6fcf97;
  --mono: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;
  --sans: 'IBM Plex Sans', -apple-system, sans-serif;
  --radius: 10px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(126, 231, 199, 0.06), transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(232, 184, 109, 0.05), transparent 45%);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  min-height: 100vh;
  padding: clamp(20px, 5vw, 64px) 20px 40px;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--accent);
  color: #0d0f14;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  max-width: 920px;
  margin: 0 auto;
}

/* ---------- terminal header ---------- */
.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot.red { background: var(--dot-red); }
.dot.yellow { background: var(--dot-yellow); }
.dot.green { background: var(--dot-green); }

.titlebar-label {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-faint);
}

.term-body {
  padding: clamp(24px, 5vw, 42px);
  font-family: var(--mono);
}

.prompt-line {
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.prompt-line .user { color: var(--accent); }
.prompt-line .path { color: var(--accent-2); }

.cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent);
  margin-left: 2px;
  animation: blink 1.1s step-end infinite;
  vertical-align: -3px;
}

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

h1 {
  font-family: var(--mono);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  margin-top: 18px;
  letter-spacing: -0.5px;
}

.role {
  color: var(--accent);
  font-family: var(--mono);
  font-size: clamp(14px, 2.4vw, 16px);
  margin-top: 8px;
}

.location {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 10px;
}

.location::before {
  content: "📍 ";
}

/* ---------- section label ---------- */
.section-label {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-faint);
  margin: 48px 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- project grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.5s ease forwards;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover,
.card:focus-within {
  border-color: var(--accent-dim);
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -20px rgba(126, 231, 199, 0.25);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-soft);
}

.card-bar .dot {
  width: 9px;
  height: 9px;
}

.addr {
  margin-left: 8px;
  flex: 1;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: 4px 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-name {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
}

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

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent-2);
  background: rgba(232, 184, 109, 0.08);
  border: 1px solid rgba(232, 184, 109, 0.25);
  padding: 3px 8px;
  border-radius: 20px;
}

.open-link {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--accent);
  align-self: flex-start;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, gap 0.2s ease;
}

.card:hover .open-link,
.open-link:hover {
  border-color: var(--accent);
  gap: 9px;
}

.card.placeholder {
  opacity: 0.6;
}

.card.placeholder .card-name::after {
  content: " · em breve";
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 400;
}

/* ---------- footer ---------- */
footer {
  margin-top: 56px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-faint);
}

footer a {
  color: var(--text-muted);
  border-bottom: 1px dotted var(--text-faint);
}

footer a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  *, .cursor, .card {
    animation: none !important;
    transition: none !important;
  }
}