:root {
  --bg: #020403;
  --panel: #08110a;
  --line: #164424;
  --text: #b9fdd0;
  --muted: #5bc47f;
  --accent: #2fff86;
  --accent-2: #8cffb5;
  --glass: rgba(2, 4, 3, 0.88);
  --glass-border: rgba(47, 255, 134, 0.28);
  --shadow-neon: 0 0 24px rgba(47, 255, 134, 0.2);
  --font-sans: "Share Tech Mono", monospace;
  --font-display: "Orbitron", "Share Tech Mono", monospace;
  --font-mono: "Share Tech Mono", monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 64px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Share Tech Mono", monospace;
  color: var(--text);
  background: radial-gradient(circle at 20% 10%, #0b1f11, var(--bg) 45%);
  min-height: 100vh;
  overflow-x: hidden;
  text-shadow: 0 0 6px rgba(47, 255, 134, 0.2);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.16) 100%);
  z-index: 3;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(47, 255, 134, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 255, 134, 0.1) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: -1;
}

.hud-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.22;
  background-image: linear-gradient(rgba(140, 255, 181, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 255, 181, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
}

.hud-overlay::before {
  content: "X:122 Y:087  GRID::SECURE  00:14:22  THREAT:LOW  NET:STABLE  ";
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  color: rgba(140, 255, 181, 0.42);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  white-space: nowrap;
  animation: hudScroll 26s linear infinite;
}

.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.1;
  background: repeating-linear-gradient(
    to bottom,
    rgba(140, 255, 181, 0.08) 0px,
    rgba(140, 255, 181, 0.08) 1px,
    transparent 2px,
    transparent 4px
  );
  animation: crtFlicker 7s steps(2, end) infinite;
}

.topbar {
  position: sticky;
  top: 0;
  min-height: var(--nav-h);
  background: rgba(2, 4, 3, 0.97);
  border-bottom: 1px solid rgba(47, 255, 134, 0.42);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 5vw;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(47, 255, 134, 0.18), 0 6px 28px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.3s var(--ease-out);
}

.topbar.is-scrolled {
  box-shadow: 0 1px 0 rgba(47, 255, 134, 0.28), 0 8px 32px rgba(47, 255, 134, 0.1);
}

.brand {
  font-family: "Orbitron", "Share Tech Mono", monospace;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(47, 255, 134, 0.5), 0 0 18px rgba(47, 255, 134, 0.22);
  transition: text-shadow 0.25s var(--ease-out);
}

.brand:hover {
  text-shadow: 0 0 12px rgba(47, 255, 134, 0.85), 0 0 26px rgba(47, 255, 134, 0.4);
}

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

.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 8px 32px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 32px;
}

nav a {
  color: var(--accent);
  text-decoration: none;
  margin-left: 0;
  padding: 6px 2px;
  font-size: 0.82rem;
  font-family: "Orbitron", "Share Tech Mono", monospace;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(47, 255, 134, 0.55), 0 0 18px rgba(47, 255, 134, 0.22);
  border-radius: 0;
  background: transparent;
  position: relative;
  transition: color 0.22s var(--ease-out), text-shadow 0.22s var(--ease-out);
}

nav a::after {
  display: none;
}

nav a:hover {
  color: var(--accent-2);
  background: transparent;
  text-shadow: 0 0 12px rgba(47, 255, 134, 0.9), 0 0 28px rgba(47, 255, 134, 0.45);
}

nav a.is-active {
  color: var(--accent-2);
  background: transparent;
  box-shadow: none;
  text-shadow: 0 0 14px rgba(47, 255, 134, 1), 0 0 32px rgba(47, 255, 134, 0.5);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

main {
  width: min(1100px, 90vw);
  margin: 36px auto 80px;
}

.hero {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.hero .profile-card {
  overflow: visible;
}

.hero .status-card {
  overflow: visible;
}

.hero .terminal {
  overflow: visible;
}

.terminal,
.status-card,
.panel {
  background: linear-gradient(160deg, rgba(8, 17, 10, 0.96), rgba(5, 11, 7, 0.86));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-neon), inset 0 0 26px rgba(47, 255, 134, 0.07);
}

.panel-glass {
  background: var(--glass);
}

.terminal {
  padding: 24px;
  font-family: "Share Tech Mono", monospace;
}

.terminal h1 {
  margin: 10px 0 2px;
  font-size: clamp(1.8rem, 5vw, 3rem);
}

.typing {
  color: var(--accent);
  min-height: 1.4em;
}

.blink {
  color: var(--accent-2);
  animation: blink 1.2s step-end infinite;
}

.status-card {
  padding: 24px;
}

.profile-card {
  padding: 10px 10px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(160deg, rgba(8, 17, 10, 0.96), rgba(5, 11, 7, 0.86));
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 0 24px rgba(47, 255, 134, 0.2), inset 0 0 26px rgba(47, 255, 134, 0.07);
}

.profile-image {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  border-radius: 10px;
  border: 1px solid rgba(116, 255, 214, 0.58);
  box-shadow: 0 0 14px rgba(47, 255, 134, 0.3), 0 0 22px rgba(81, 235, 255, 0.14);
}

.scanline-image {
  position: relative;
  overflow: hidden;
}

.scanline-image::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(140, 255, 181, 0.04) 0px,
    rgba(140, 255, 181, 0.04) 1px,
    transparent 2px,
    transparent 4px
  );
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0.4;
}

.profile-label {
  margin-bottom: 0;
  color: var(--accent-2);
}

.status-card h2,
.panel h2 {
  margin-top: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-family: "Share Tech Mono", monospace;
}

.glitch-soft {
  animation: softGlitch 9s steps(2, end) infinite;
}

.panel h2:hover,
.status-card h2:hover {
  animation: hoverGlitch 0.22s steps(2, end) 1;
}

.status-card ul {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}

.status-card li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed var(--line);
  padding: 11px 0;
  gap: 10px;
}

.status-card span {
  color: var(--muted);
  flex: 0 0 150px;
  min-width: 150px;
  white-space: nowrap;
}

.online {
  color: #84ffa4;
}

.online-pulse {
  animation: onlinePulse 2.8s ease-in-out infinite;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-left: 8px;
  vertical-align: middle;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(47, 255, 134, 0.65);
  animation: dotBlink 1s step-end infinite;
}

.panel {
  margin-top: 22px;
  padding: 24px;
}

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

/* Altri progetti: riga 1 (3 lab), riga 2 Static PE + ThreatLens affianco */
.cards--other-projects {
  grid-template-columns: repeat(2, 1fr);
}

.cards--other-projects > .card-project {
  min-height: 100%;
}

.cards--other-projects > .card-project:nth-child(5) {
  grid-column: 1 / -1;
}

@media (min-width: 720px) {
  .cards--other-projects {
    grid-template-columns: repeat(6, 1fr);
    align-items: stretch;
  }

  .cards--other-projects > .card-project:nth-child(5) {
    grid-column: 5 / 7;
    grid-row: 1;
  }

  .cards--other-projects > .card-project:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 1;
  }

  .cards--other-projects > .card-project:nth-child(2) {
    grid-column: 3 / 5;
    grid-row: 1;
  }

  .cards--other-projects > .card-project:nth-child(3) {
    grid-column: 1 / 4;
    grid-row: 2;
  }

  .cards--other-projects > .card-project:nth-child(4) {
    grid-column: 4 / 7;
    grid-row: 2;
  }
}

.skills-dashboard {
  display: grid;
  gap: 10px;
}

.skills-subtitle {
  color: var(--muted);
  margin-top: -6px;
  margin-bottom: 14px;
  font-family: "Share Tech Mono", monospace;
}

.about p,
.about-list,
.panel p,
.lab-meta dd,
.project-features,
.card-desc {
  font-family: "Share Tech Mono", monospace;
}

.skills-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.skill-group {
  background: rgba(5, 11, 7, 0.72);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}

.skill-group h3 {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.skill-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}

.skill-bar-text {
  color: var(--accent-2);
  text-shadow: 0 0 8px rgba(47, 255, 134, 0.35);
  white-space: nowrap;
}

.system-logs {
  display: grid;
  gap: 6px;
  color: var(--accent-2);
  text-shadow: 0 0 8px rgba(47, 255, 134, 0.28);
  margin: 10px 0 6px;
  font-size: 0.9rem;
}

.system-logs:empty {
  margin: 0;
}

.system-log-line {
  opacity: 0.9;
}

.log-panel h2 {
  letter-spacing: 0.09em;
}

.terminal-btn {
  display: inline-block;
  border: 1px solid var(--line);
  background: rgba(5, 11, 7, 0.9);
  color: var(--accent-2);
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  font-family: "Share Tech Mono", monospace;
}

.terminal-btn:hover {
  color: var(--accent);
  box-shadow: 0 0 14px rgba(47, 255, 134, 0.25);
}

.contact-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.contact-form label {
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  background: rgba(2, 7, 3, 0.85);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 10px;
  font-family: "Share Tech Mono", monospace;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 1px solid var(--accent);
  box-shadow: 0 0 10px rgba(47, 255, 134, 0.2);
}

.terminal-output {
  margin-top: 12px;
  color: var(--accent-2);
  min-height: 1.2em;
  text-shadow: 0 0 8px rgba(47, 255, 134, 0.3);
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  line-height: 1.65;
}

.card {
  background: rgba(5, 11, 7, 0.82);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  top: -120%;
  left: -35%;
  width: 18%;
  height: 340%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(47, 255, 134, 0.1) 40%,
    rgba(47, 255, 134, 0.52) 50%,
    rgba(81, 235, 255, 0.35) 55%,
    transparent 100%
  );
  transform: rotate(24deg);
  animation: borderSweep 5s linear infinite;
}

.card h3 {
  margin-top: 0;
  color: var(--accent-2);
  font-family: "Share Tech Mono", monospace;
}

.about p {
  color: var(--muted);
  line-height: 1.7;
}

.about-direct {
  margin-top: 6px;
}

.about-direct h2 {
  color: var(--accent);
  margin-bottom: 10px;
}

.about-direct p {
  color: var(--text);
  line-height: 1.75;
  margin: 0 0 12px;
}

.about-list {
  color: var(--muted);
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(47, 255, 134, 0.28);
}

.card-project {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-color: rgba(47, 255, 134, 0.45);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card-project .card-desc {
  flex: 1;
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 14px;
}

.card-project:hover,
.card-project:focus-visible {
  border-color: rgba(47, 255, 134, 0.95);
  box-shadow: 0 0 28px rgba(47, 255, 134, 0.35), inset 0 0 18px rgba(47, 255, 134, 0.08);
}

.card-project:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.card-github-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 9px 12px;
  border: 1px solid rgba(47, 255, 134, 0.55);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(47, 255, 134, 0.14), rgba(5, 11, 7, 0.88));
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 0 14px rgba(47, 255, 134, 0.18);
  animation: cardCtaPulse 2.4s ease-in-out infinite;
}

.github-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(47, 255, 134, 0.45));
}

.card-github-arrow {
  margin-left: auto;
  color: var(--accent-2);
  transition: transform 0.2s ease;
}

.card-project:hover .card-github-cta,
.card-project:focus-visible .card-github-cta {
  color: var(--accent-2);
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(47, 255, 134, 0.28), rgba(5, 11, 7, 0.92));
  box-shadow: 0 0 22px rgba(47, 255, 134, 0.42);
  animation: none;
}

.card-project:hover .card-github-arrow,
.card-project:focus-visible .card-github-arrow {
  transform: translateX(4px);
}

@keyframes cardCtaPulse {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(47, 255, 134, 0.16);
    opacity: 0.88;
  }
  50% {
    box-shadow: 0 0 20px rgba(47, 255, 134, 0.38);
    opacity: 1;
  }
}

.footer {
  text-align: center;
  border-top: 1px solid var(--line);
  padding: 22px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid rgba(47, 255, 134, 0.58);
  margin-top: 26px;
  padding: 16px 10px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-family: "Orbitron", "Share Tech Mono", monospace;
  letter-spacing: 0.05em;
  text-shadow: 0 0 6px rgba(47, 255, 134, 0.25);
  box-shadow: 0 -8px 16px rgba(47, 255, 134, 0.1);
}

.site-footer p {
  margin: 5px 0;
}

.inline-link {
  color: var(--accent-2);
  text-decoration: none;
}

.inline-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.education-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 170px;
  gap: 16px;
  align-items: start;
}

.cert-column {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.cert-link {
  display: block;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 11, 7, 0.82);
  color: var(--accent-2);
  text-decoration: none;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.35;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cert-link-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.cert-link-featured {
  position: relative;
  overflow: hidden;
  border-color: rgba(47, 255, 134, 0.85);
  background: linear-gradient(180deg, rgba(47, 255, 134, 0.2), rgba(5, 11, 7, 0.92));
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 0 22px rgba(47, 255, 134, 0.35);
  animation: certFeaturedPulse 2.4s ease-in-out infinite;
}

.cert-link-featured::after {
  content: "";
  position: absolute;
  top: 0;
  left: -35%;
  width: 28%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(47, 255, 134, 0.24), transparent);
  animation: borderSweep 3.2s linear infinite;
  pointer-events: none;
}

.cert-link-featured > * {
  position: relative;
  z-index: 1;
}

.cert-link-title {
  display: block;
  font-size: 1.05rem;
}

.cert-link-cta {
  display: block;
  margin-top: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-2);
  animation: certCtaPulse 1.6s ease-in-out infinite;
}

.education-cert-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 28px 16px 32px;
  margin: 6px 0 8px;
}

.education-cert-featured {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 14px 16px;
  text-align: center;
}

.cert-link-featured:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 34px rgba(47, 255, 134, 0.5);
}

.cert-link:hover {
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(47, 255, 134, 0.25);
}

.typing-static {
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  border-right: 1px solid rgba(140, 255, 181, 0.7);
  color: var(--accent-2);
  margin: 8px 0 0;
  animation: typeLine 4.8s steps(42, end) forwards, caretBlink 0.8s step-end infinite;
}

.typing-static.delay {
  animation-delay: 0.9s;
}

.labs-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.labs-anchor {
  text-decoration: none;
  color: var(--accent-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.labs-anchor:hover {
  color: var(--accent);
  box-shadow: 0 0 12px rgba(47, 255, 134, 0.24);
}

.labs-section {
  border-top: 1px solid rgba(47, 255, 134, 0.22);
}

.labs-section h2 {
  margin-bottom: 12px;
}

.labs-section .about-list {
  line-height: 1.9;
}

.ascii-icon {
  color: var(--accent-2);
  margin-right: 6px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 18px;
  border-left: 1px solid rgba(47, 255, 134, 0.28);
  display: grid;
  gap: 14px;
}

.timeline li {
  position: relative;
  color: var(--muted);
  line-height: 1.75;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(47, 255, 134, 0.42);
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.week-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(5, 11, 7, 0.62);
  color: var(--muted);
  line-height: 1.6;
  box-shadow: inset 0 0 10px rgba(47, 255, 134, 0.08);
}

.week-card strong {
  color: var(--accent-2);
}

.week-card .about-list {
  margin-top: 8px;
  border-top: 1px solid rgba(47, 255, 134, 0.2);
  padding-top: 8px;
  line-height: 1.65;
}

.edu-timeline .week-grid {
  position: relative;
}

.edu-timeline .week-grid::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(47, 255, 134, 0.16), rgba(47, 255, 134, 0.58), rgba(47, 255, 134, 0.16));
  animation: timelineGlow 3s ease-in-out infinite;
}

.edu-timeline .week-card {
  position: relative;
  opacity: 0;
  transform: translateY(8px);
  animation: timelineFade 0.7s ease forwards;
}

.edu-timeline .week-card::before {
  content: "";
  position: absolute;
  top: 14px;
  right: -16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(47, 255, 134, 0.52);
}

.edu-timeline .week-card:nth-child(1) { animation-delay: 0.08s; }
.edu-timeline .week-card:nth-child(2) { animation-delay: 0.16s; }
.edu-timeline .week-card:nth-child(3) { animation-delay: 0.24s; }
.edu-timeline .week-card:nth-child(4) { animation-delay: 0.32s; }
.edu-timeline .week-card:nth-child(5) { animation-delay: 0.4s; }
.edu-timeline .week-card:nth-child(6) { animation-delay: 0.48s; }

.cyber-badge {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid rgba(47, 255, 134, 0.72);
  border-radius: 999px;
  color: var(--accent-2);
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  background: rgba(5, 11, 7, 0.75);
  text-shadow: 0 0 8px rgba(140, 255, 181, 0.35);
  box-shadow: 0 0 18px rgba(47, 255, 134, 0.24), inset 0 0 10px rgba(47, 255, 134, 0.12);
}

.contact-icon {
  color: var(--accent-2);
  margin-right: 7px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}

.qr-placeholder {
  display: grid;
  place-items: center;
  width: min(220px, 100%);
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 10px auto 0;
  overflow: hidden;
  padding: 6px;
  background-image: linear-gradient(45deg, rgba(140, 255, 181, 0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(140, 255, 181, 0.08) 25%, transparent 25%);
  background-size: 14px 14px;
  box-shadow: inset 0 0 14px rgba(47, 255, 134, 0.1);
}

.qr-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(47, 255, 134, 0.5);
  box-shadow: 0 0 14px rgba(47, 255, 134, 0.22);
}

.night-toggle {
  border: 1px solid rgba(47, 255, 134, 0.45);
  background: rgba(2, 4, 3, 0.9);
  color: var(--accent);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.68rem;
  cursor: pointer;
  font-family: "Orbitron", "Share Tech Mono", monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(47, 255, 134, 0.45);
}

.night-toggle:hover {
  color: var(--accent);
  box-shadow: 0 0 12px rgba(47, 255, 134, 0.26);
}

.diagnostics-grid,
.badge-grid,
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.diag-card,
.skill-badge,
.tool-item,
.clearance-card {
  background: rgba(5, 11, 7, 0.76);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  color: var(--muted);
}

.diag-card strong,
.tool-item strong {
  color: var(--accent-2);
}

.diag-card {
  animation: diagPulse 3.2s ease-in-out infinite;
}

.skill-badge {
  text-align: center;
  color: var(--accent-2);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  animation: onlinePulse 2.8s ease-in-out infinite;
}

.tools-grid .tool-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tools-grid .tool-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 14px rgba(47, 255, 134, 0.24);
}

.threat-map {
  position: relative;
  height: 200px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(2, 7, 3, 0.9), rgba(5, 11, 7, 0.66));
  overflow: hidden;
}

.threat-map::before {
  content: "GLOBAL THREAT OVERVIEW";
  position: absolute;
  top: 8px;
  left: 10px;
  color: rgba(140, 255, 181, 0.46);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.threat-map::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 90%, rgba(47, 255, 134, 0.1), transparent 60%);
  pointer-events: none;
}

.threat-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.42;
}

.threat-link {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(47, 255, 134, 0.55), transparent);
  transform-origin: left center;
  animation: linkPulse 3.4s ease-in-out infinite;
}

.threat-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(47, 255, 134, 0.6);
  animation: dotPulse 3s ease-in-out infinite;
}

.terminal-ai-input {
  width: 100%;
  background: rgba(2, 7, 3, 0.92);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 10px;
  font-family: "Share Tech Mono", monospace;
}

.terminal-ai-output {
  margin-top: 10px;
  min-height: 52px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--accent-2);
  line-height: 1.6;
}

.cmd-launch-wrap {
  display: flex;
  justify-content: flex-start;
}

.cmd-launch-btn {
  font-family: "Orbitron", "Share Tech Mono", monospace;
  letter-spacing: 0.06em;
}

.cmd-modal {
  position: fixed;
  inset: 0;
  background: rgba(1, 8, 4, 0.74);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 42;
  padding: 16px;
}

.cmd-modal.active {
  display: flex;
}

.cmd-window {
  width: min(860px, 96vw);
  height: min(520px, 82vh);
  border: 1px solid rgba(47, 255, 134, 0.55);
  border-radius: 12px;
  background: linear-gradient(170deg, rgba(3, 14, 8, 0.98), rgba(1, 8, 4, 0.95));
  box-shadow: 0 0 22px rgba(47, 255, 134, 0.2), inset 0 0 16px rgba(47, 255, 134, 0.08);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.cmd-header {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(47, 255, 134, 0.26);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--accent-2);
  font-size: 0.82rem;
  letter-spacing: 0.07em;
}

.cmd-close {
  border: 1px solid var(--line);
  background: rgba(6, 13, 9, 0.88);
  color: var(--accent-2);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}

.cmd-body {
  padding: 12px;
  overflow: auto;
  font-size: 0.9rem;
  color: var(--accent-2);
  line-height: 1.6;
}

.cmd-input-row {
  border-top: 1px solid rgba(47, 255, 134, 0.26);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
}

.cmd-prompt {
  color: var(--accent);
}

.cmd-input {
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-family: "Share Tech Mono", monospace;
  font-size: 0.9rem;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #010302;
  display: grid;
  place-items: center;
  animation: bootHide 1.5s ease forwards;
}

.boot-content {
  color: var(--accent-2);
  text-align: left;
  line-height: 1.8;
}

.breach-btn {
  margin-top: 10px;
}

.breach-flash {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(255, 36, 36, 0.2);
  pointer-events: none;
  opacity: 0;
}

.breach-flash.active {
  animation: breachFlash 1s ease;
}

.breach-alert {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 36;
  color: #ff7f7f;
  border: 1px solid rgba(255, 100, 100, 0.6);
  background: rgba(30, 4, 4, 0.85);
  padding: 10px 14px;
  border-radius: 8px;
  letter-spacing: 0.08em;
  opacity: 0;
}

.breach-alert.active {
  opacity: 1;
}

.system-log-feed {
  border-top: 1px solid rgba(47, 255, 134, 0.35);
  border-bottom: 1px solid rgba(47, 255, 134, 0.2);
  margin: 10px 0 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--accent-2);
  font-size: 0.76rem;
  padding: 8px 0;
}

.system-log-feed span {
  display: inline-block;
  padding-left: 100%;
  animation: feedScroll 24s linear infinite;
}

.rta-panel {
  display: grid;
  gap: 14px;
}

.rta-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.rta-header h2 {
  margin: 0;
}

.rta-badge {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid rgba(47, 255, 134, 0.55);
  border-radius: 999px;
  color: var(--accent-2);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  background: rgba(5, 11, 7, 0.72);
  text-shadow: 0 0 8px rgba(140, 255, 181, 0.35);
  box-shadow: 0 0 14px rgba(47, 255, 134, 0.22), inset 0 0 10px rgba(47, 255, 134, 0.1);
  animation: rtaBadgePulse 4s ease-in-out infinite;
}

.rta-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.rta-stat {
  position: relative;
  background: rgba(5, 11, 7, 0.78);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  overflow: hidden;
}

.rta-stat strong {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.rta-stat-value {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.98rem;
  text-shadow: 0 0 8px rgba(47, 255, 134, 0.32);
}

.rta-status-ok {
  color: #84ffa4;
  animation: onlinePulse 2.8s ease-in-out infinite;
}

.rta-medium { color: #ffd07a; }
.rta-high { color: #84ffa4; }

.rta-stat::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 35%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: rtaStatBar 3.4s linear infinite;
}

.rta-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 14px;
}

.rta-card {
  background: rgba(5, 11, 7, 0.62);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}

.rta-card h3 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.event-flow-svg {
  width: 100%;
  height: 110px;
  display: block;
}

.event-flow-line {
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: eventFlowPulse 3.6s ease-in-out infinite;
}

.event-flow-line.siem {
  stroke: var(--accent);
  filter: drop-shadow(0 0 4px rgba(47, 255, 134, 0.5));
}

.event-flow-line.endpoint {
  stroke: rgba(140, 255, 181, 0.85);
  animation-delay: 0.6s;
}

.event-flow-line.net {
  stroke: rgba(81, 235, 255, 0.8);
  animation-delay: 1.2s;
}

.event-flow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.event-flow-legend .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(47, 255, 134, 0.55);
}

.event-flow-legend .dot-endpoint {
  background: rgba(140, 255, 181, 0.85);
  box-shadow: 0 0 8px rgba(140, 255, 181, 0.55);
}

.event-flow-legend .dot-net {
  background: rgba(81, 235, 255, 0.85);
  box-shadow: 0 0 8px rgba(81, 235, 255, 0.5);
}

.threat-radar {
  position: relative;
  width: 100%;
  max-width: 230px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(47, 255, 134, 0.45);
  background:
    radial-gradient(circle, rgba(47, 255, 134, 0.07) 0%, transparent 72%),
    repeating-radial-gradient(circle at center, rgba(47, 255, 134, 0.18) 0 1px, transparent 1px 30px);
  overflow: hidden;
  box-shadow: 0 0 18px rgba(47, 255, 134, 0.16), inset 0 0 18px rgba(47, 255, 134, 0.1);
}

.threat-radar::before,
.threat-radar::after {
  content: "";
  position: absolute;
  background: rgba(47, 255, 134, 0.18);
}

.threat-radar::before {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.threat-radar::after {
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
}

.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(47, 255, 134, 0.55), transparent 30%, transparent 100%);
  mix-blend-mode: screen;
  animation: radarSweep 3.6s linear infinite;
  pointer-events: none;
}

.radar-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(47, 255, 134, 0.7);
  animation: radarBlink 2.2s ease-in-out infinite;
  transform: translate(-50%, -50%);
}

.radar-dot:nth-child(2) { animation-delay: 0.5s; }
.radar-dot:nth-child(3) { animation-delay: 1s; }
.radar-dot:nth-child(4) { animation-delay: 1.5s; }

.radar-msg {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.radar-msg strong {
  color: var(--accent-2);
}

.rta-log-stream {
  height: 150px;
  overflow: hidden;
  position: relative;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.84rem;
  color: var(--accent-2);
  background: rgba(2, 7, 3, 0.6);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  line-height: 1.55;
}

.rta-log-line {
  display: block;
  opacity: 0;
  transform: translateY(6px);
  animation: rtaLogIn 0.45s ease forwards;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rta-log-line.alert {
  color: #ffb18a;
  text-shadow: 0 0 10px rgba(255, 130, 90, 0.45);
}

.rta-cta {
  display: flex;
  justify-content: flex-end;
}

.rta-cta-btn {
  font-family: "Orbitron", "Share Tech Mono", monospace;
  letter-spacing: 0.08em;
  text-decoration: none;
}

@keyframes rtaBadgePulse {
  0%, 100% { box-shadow: 0 0 12px rgba(47, 255, 134, 0.18), inset 0 0 8px rgba(47, 255, 134, 0.08); }
  50% { box-shadow: 0 0 22px rgba(47, 255, 134, 0.42), inset 0 0 14px rgba(47, 255, 134, 0.16); }
}

@keyframes rtaStatBar {
  0% { transform: translateX(-150%); }
  100% { transform: translateX(420%); }
}

@keyframes eventFlowPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes radarSweep {
  to { transform: rotate(360deg); }
}

@keyframes radarBlink {
  0%, 100% { opacity: 0.32; transform: translate(-50%, -50%) scale(0.92); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.18); }
}

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

body.night-vision {
  --bg: #000f08;
  --panel: #04180b;
  --line: #1d6e3c;
  --text: #d4ffe2;
  --muted: #8dffb5;
  --accent: #3cff9a;
  --accent-2: #c8ffe1;
  filter: saturate(1.12) contrast(1.08);
}

@keyframes blink {
  0%,
  48% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0.45;
  }
}

@keyframes hudScroll {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}

@keyframes crtFlicker {
  0%,
  100% {
    opacity: 0.08;
  }
  50% {
    opacity: 0.13;
  }
}

@keyframes onlinePulse {
  0%,
  100% {
    text-shadow: 0 0 6px rgba(132, 255, 164, 0.22);
  }
  50% {
    text-shadow: 0 0 12px rgba(132, 255, 164, 0.72);
  }
}

@keyframes dotBlink {
  0%,
  55% {
    opacity: 1;
  }
  56%,
  100% {
    opacity: 0.26;
  }
}

@keyframes softGlitch {
  0%,
  97%,
  100% {
    transform: translate(0, 0);
    text-shadow: 0 0 8px rgba(47, 255, 134, 0.2);
  }
  98% {
    transform: translate(0.6px, 0);
    text-shadow: -1px 0 rgba(81, 235, 255, 0.25), 1px 0 rgba(140, 255, 181, 0.2);
  }
  99% {
    transform: translate(-0.6px, 0);
    text-shadow: 1px 0 rgba(81, 235, 255, 0.22), -1px 0 rgba(140, 255, 181, 0.2);
  }
}

@keyframes hoverGlitch {
  0% {
    transform: translateX(0);
  }
  40% {
    transform: translateX(1px);
  }
  80% {
    transform: translateX(-1px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes borderSweep {
  0% {
    left: -35%;
  }
  100% {
    left: 140%;
  }
}

@keyframes certFeaturedPulse {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(47, 255, 134, 0.28);
    border-color: rgba(47, 255, 134, 0.75);
  }
  50% {
    box-shadow: 0 0 32px rgba(47, 255, 134, 0.52);
    border-color: rgba(47, 255, 134, 1);
  }
}

@keyframes certCtaPulse {
  0%,
  100% {
    opacity: 0.65;
  }
  50% {
    opacity: 1;
  }
}

@keyframes diagPulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 rgba(47, 255, 134, 0);
  }
  50% {
    box-shadow: inset 0 0 14px rgba(47, 255, 134, 0.1);
  }
}

@keyframes dotPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.35);
  }
}

@keyframes linkPulse {
  0%,
  100% {
    opacity: 0.28;
  }
  50% {
    opacity: 0.86;
  }
}

@keyframes bootHide {
  0%,
  88% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes breachFlash {
  0%,
  100% {
    opacity: 0;
  }
  20%,
  75% {
    opacity: 1;
  }
}

@keyframes feedScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

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

@keyframes timelineGlow {
  0%,
  100% {
    box-shadow: 0 0 6px rgba(47, 255, 134, 0.18);
  }
  50% {
    box-shadow: 0 0 12px rgba(47, 255, 134, 0.34);
  }
}

@keyframes typeLine {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes caretBlink {
  0%,
  50% {
    border-color: rgba(140, 255, 181, 0.7);
  }
  51%,
  100% {
    border-color: transparent;
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .education-layout {
    grid-template-columns: 1fr;
  }

  .cert-column {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    flex-direction: column;
    gap: 10px;
  }

  nav a {
    margin: 0;
  }

  .profile-image {
    max-width: 100%;
    margin: 0 auto;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .week-grid {
    grid-template-columns: 1fr;
  }

  .edu-timeline .week-grid::before {
    left: 6px;
  }

  .edu-timeline .week-card::before {
    left: -14px;
    right: auto;
  }

  .night-toggle,
  .topbar-actions .night-toggle {
    width: 100%;
    margin-top: 6px;
  }

  .topbar-actions {
    width: 100%;
    flex-direction: column;
  }

  .skill-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .skills-groups {
    grid-template-columns: 1fr;
  }

  .skill-bar-text {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 2px;
  }

  .rta-grid {
    grid-template-columns: 1fr;
  }

  .rta-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .rta-cta {
    justify-content: stretch;
  }

  .rta-cta-btn {
    width: 100%;
    text-align: center;
  }

  .threat-radar {
    max-width: 200px;
  }

  .rta-log-stream {
    height: 130px;
    font-size: 0.78rem;
  }

  .rta-badge {
    font-size: 0.66rem;
    letter-spacing: 0.06em;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .project-showcase {
    grid-template-columns: 1fr;
  }

  .featured-projects-grid {
    grid-template-columns: 1fr;
  }

  .social-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-direction: column;
    gap: 8px;
  }
}

/* —— Hero extras (solo home, sotto i 3 box) —— */
.hero-extras {
  margin-top: 0;
}

#about {
  margin-top: 22px;
}

.hero-headline {
  font-family: "Orbitron", "Share Tech Mono", monospace;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--accent);
  margin: 0 0 10px;
  letter-spacing: 0.04em;
}

.hero-lead {
  font-family: "Share Tech Mono", monospace;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.65;
}

.hero-extras .hero-actions {
  margin: 0 0 14px;
}

.hero-extras .typing-static {
  margin: 6px 0 0;
}

/* —— Hero & CTA —— */
.hero-title {
  font-family: "Orbitron", "Share Tech Mono", monospace;
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  line-height: 1.25;
  margin: 8px 0 10px;
  color: var(--text);
  letter-spacing: 0.02em;
}

.hero-pipe {
  color: var(--accent-2);
  font-weight: 500;
}

.hero-subtitle {
  font-family: "Share Tech Mono", monospace;
  font-size: clamp(0.92rem, 2vw, 1.05rem);
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 18px;
  max-width: 42ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.88rem;
  text-decoration: none;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(47, 255, 134, 0.22), rgba(5, 11, 7, 0.9));
  border-color: rgba(47, 255, 134, 0.55);
  color: var(--accent);
  box-shadow: 0 0 20px rgba(47, 255, 134, 0.25);
}

.btn-secondary {
  background: rgba(47, 255, 134, 0.08);
  border-color: rgba(47, 255, 134, 0.4);
  color: var(--accent-2);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(47, 255, 134, 0.28);
}

.terminal h1.hero-title {
  font-family: "Orbitron", "Share Tech Mono", monospace;
}

.profile-image-wrap {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
}

.profile-image.is-missing {
  display: none;
}

.profile-placeholder {
  display: none;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  border: 1px dashed rgba(140, 255, 181, 0.45);
  background:
    linear-gradient(145deg, rgba(47, 255, 134, 0.06), rgba(140, 255, 181, 0.04)),
    repeating-linear-gradient(-45deg, transparent, transparent 8px, rgba(140, 255, 181, 0.04) 8px, rgba(140, 255, 181, 0.04) 9px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

.profile-placeholder.is-visible {
  display: flex;
}

.profile-placeholder-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(47, 255, 134, 0.45);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  color: var(--accent);
  box-shadow: 0 0 20px rgba(47, 255, 134, 0.25);
}

/* —— Scroll reveal —— */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}

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

/* —— Footer —— */
.footer-enhanced {
  padding: 28px 5vw 32px;
  background: linear-gradient(180deg, transparent, rgba(2, 4, 3, 0.95));
}

.footer-copy {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text);
  text-shadow: 0 0 12px rgba(47, 255, 134, 0.35);
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.2s var(--ease-out), text-shadow 0.2s var(--ease-out);
}

.footer-links a:hover {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(47, 255, 134, 0.5);
}

.footer-status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  opacity: 0.75;
  letter-spacing: 0.08em;
}

/* —— Project featured —— */
.featured-projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
  align-items: stretch;
}

.featured-projects-grid > .project-featured {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.featured-projects-grid > .project-featured .project-showcase {
  flex: 1 1 auto;
  min-height: 0;
}

.featured-projects-grid > .project-featured .project-cta-row {
  margin-top: auto;
  flex-shrink: 0;
  padding-top: 16px;
}

.project-featured {
  margin-top: 22px;
  border-color: rgba(47, 255, 134, 0.45);
  box-shadow: 0 0 40px rgba(47, 255, 134, 0.12);
}

.project-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(47, 255, 134, 0.5);
  background: rgba(47, 255, 134, 0.1);
  margin-bottom: 12px;
}

.project-featured h2 {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  color: var(--text);
  margin: 0 0 14px;
  letter-spacing: 0.03em;
}

.featured-projects-grid .project-featured h2 {
  font-size: clamp(0.95rem, 1.9vw, 1.2rem);
}

.project-tagline {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.84rem;
  color: var(--accent-2);
  margin: -8px 0 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.project-tagline-spacer {
  color: transparent;
  user-select: none;
}

.featured-projects-grid > .project-featured .project-cta-row .btn.btn-primary {
  width: 100%;
  justify-content: center;
}

.project-features {
  margin: 0 0 20px;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.85;
}

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

.featured-projects-grid .project-showcase,
.project-showcase--featured-split {
  grid-template-columns: 1fr;
  gap: 10px;
}

.featured-projects-grid .showcase-demo,
.featured-projects-grid .showcase-code,
.featured-projects-grid .showcase-arch {
  min-height: 110px;
}

.featured-projects-grid .arch-svg {
  max-height: 100px;
}

.project-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.showcase-item {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: rgba(4, 12, 18, 0.85);
}

.showcase-item figcaption {
  padding: 8px 10px;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-top: 1px solid var(--glass-border);
  font-family: var(--font-mono);
}

.showcase-demo,
.showcase-code,
.showcase-arch {
  min-height: 140px;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.5;
  color: var(--accent-2);
}

.showcase-demo {
  background: linear-gradient(180deg, #030a06, #08110a);
  position: relative;
  overflow: hidden;
}

.demo-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(47, 255, 134, 0.03) 3px, rgba(47, 255, 134, 0.03) 4px);
  pointer-events: none;
}

.demo-line {
  display: block;
  opacity: 0;
  animation: demoType 0.4s ease forwards;
}

.demo-line:nth-child(1) { animation-delay: 0.2s; }
.demo-line:nth-child(2) { animation-delay: 0.6s; }
.demo-line:nth-child(3) { animation-delay: 1s; }
.demo-line:nth-child(4) { animation-delay: 1.4s; }

@keyframes demoType {
  to { opacity: 1; }
}

.showcase-code {
  background: #050c12;
  color: #8cffb5;
}

.showcase-code .kw { color: var(--accent); }
.showcase-code .fn { color: #ffd07a; }

.showcase-arch {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.arch-svg {
  width: 100%;
  max-height: 130px;
}

.project-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* —— Lab cards —— */
.lab-card {
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
  background: rgba(6, 14, 22, 0.65);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.lab-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(140, 255, 181, 0.12);
}

.lab-card h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--accent-2);
  letter-spacing: 0.04em;
}

.lab-meta {
  display: grid;
  gap: 10px;
}

.lab-meta dt {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.lab-meta dd {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* —— Education EPICODE —— */
.epicode-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
}

.epicode-logo {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.15));
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.module-chip {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(47, 255, 134, 0.06);
  font-family: "Share Tech Mono", monospace;
  font-size: 0.85rem;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.skill-group,
.skill-group h3,
.skill-row,
.skill-bar-text {
  font-family: "Share Tech Mono", monospace;
}

.module-chip:hover {
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(47, 255, 134, 0.15);
}

.future-certs {
  margin-top: 16px;
  padding: 14px;
  border-radius: 10px;
  border: 1px dashed rgba(140, 255, 181, 0.35);
  background: rgba(140, 255, 181, 0.05);
}

.future-certs h3 {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: var(--accent-2);
  letter-spacing: 0.06em;
}

/* —— Contact social —— */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 14px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s;
}

.social-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 36px rgba(47, 255, 134, 0.2);
}

.social-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(47, 255, 134, 0.1);
  font-size: 1.2rem;
  animation: socialPulse 3s ease-in-out infinite;
}

.social-card:nth-child(2) .social-icon { animation-delay: 0.4s; }
.social-card:nth-child(3) .social-icon { animation-delay: 0.8s; }
.social-card:nth-child(4) .social-icon { animation-delay: 1.2s; }

@keyframes socialPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(47, 255, 134, 0); }
  50% { box-shadow: 0 0 18px rgba(47, 255, 134, 0.35); }
}

.social-label {
  font-weight: 600;
  font-size: 0.88rem;
}

.social-handle {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  word-break: break-all;
}

.privacy-block {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
}

.privacy-block h2 {
  font-size: 0.95rem;
}

/* —— Skill bar visual —— */
.skill-bar-track {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 999px;
  background: rgba(140, 255, 181, 0.12);
  overflow: hidden;
  margin-top: 4px;
}

.skill-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px rgba(47, 255, 134, 0.45);
  transition: width 1s var(--ease-out);
}

.skill-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(140, 255, 181, 0.12);
}

.skill-row span:first-child {
  line-height: 1.45;
  padding-right: 8px;
}

.skill-row:last-child {
  border-bottom: 0;
}
