/* ───────────────────────────────────────────────────────────────
   Andrea Rossi — Portfolio v2
   Aesthetic: developer-tools (VS Code / n8n inspired)
   Palette: navy + red, plexus background
─────────────────────────────────────────────────────────────── */

:root {
  --bg-0: #050811;
  --bg-1: #070b14;
  --bg-2: #0d1422;
  --bg-3: #131a2a;
  --bg-card: rgba(8, 12, 22, 0.55);
  --bg-card-solid: #0a0f1c;

  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.10);
  --line-red: rgba(230, 57, 70, 0.32);

  --fg: #ffffff;
  --fg-2: rgba(255, 255, 255, 0.72);
  --fg-3: rgba(255, 255, 255, 0.48);
  --fg-4: rgba(255, 255, 255, 0.28);
  --muted: #8a9bb5;

  --red: #e63946;
  --red-2: #ff5563;
  --red-soft: rgba(230, 57, 70, 0.12);
  --green: #3ddc84;
  --amber: #f5b14c;
  --blue: #7ec8e3;
  --purple: #b48cf2;

  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "Inter", system-ui, sans-serif;
  --font-data: "DM Mono", ui-monospace, monospace;

  --nav-h: 64px;
  --status-h: 28px;
}

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

html { scroll-behavior: smooth; }
html, body { background: var(--bg-0); color: var(--fg); }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 700px at 88% 60%, rgba(230,57,70,0.18) 0%, transparent 60%),
    linear-gradient(180deg, #050811 0%, #07091a 100%);
  animation: page-fade 0.7s ease both;
}

@keyframes page-fade { from { opacity: 0; } to { opacity: 1; } }

/* Plexus background — fixed full viewport */
.plexus-bg {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
  opacity: 0.85;
  pointer-events: none;
}
.plexus-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5,8,17,0.55) 0%, rgba(5,8,17,0.55) 60%, rgba(5,8,17,0.85) 100%),
    radial-gradient(800px 600px at 12% 14%, rgba(5,8,17,0.85) 0%, transparent 70%);
}

/* Fine grid noise overlay */
.grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 1;
  mask-image: radial-gradient(circle at 50% 40%, black 30%, transparent 90%);
}

/* canvas hero */
#hero-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: screen;
}

/* ───────────────── Top bar — minimal & editorial ─────────────────  */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(24px, 5vw, 56px);
  gap: 28px;
  background: rgba(5, 8, 17, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--fg);
}
.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--red);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: white;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-text .nm {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--fg);
}
.brand-text .rl {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* nav links — clean and professional */
.nav {
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav a {
  position: relative;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--fg-3);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav a:hover { color: var(--fg); }
.nav a.active { color: var(--fg); }
.nav a.active::after,
.nav a:hover::after { transform: scaleX(1); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav-cta:hover { border-color: var(--red); background: rgba(230,57,70,0.06); }
.nav-cta .pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.lang-toggle {
  position: absolute;
  right: clamp(24px, 5vw, 56px);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--line);
  padding: 5px 10px;
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--fg-3);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.lang-toggle:hover { border-color: var(--line-strong); color: var(--fg); }
#lang-active { color: var(--fg); font-weight: 500; }
.lang-sep { color: var(--fg-4); }

/* ───────────────── Status bar (bottom, VS Code) ───────────────── */

.statusbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--status-h);
  z-index: 50;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 18px;
  background: rgba(230, 57, 70, 0.95);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.92);
}
.statusbar .sep { width: 1px; height: 14px; background: rgba(255,255,255,0.22); }
.statusbar .item { display: inline-flex; align-items: center; gap: 6px; }
.statusbar .item.right { margin-left: auto; }
.statusbar .item svg { width: 12px; height: 12px; }

/* ───────────────── Page layout ───────────────── */

main {
  position: relative;
  z-index: 5;
  padding-top: var(--nav-h);
}

.section {
  position: relative;
  padding: 90px clamp(40px, 8vw, 120px) 110px;
  max-width: 1480px;
  margin: 0 auto;
}

.section-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 56px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.section-meta .num {
  color: var(--red);
  font-weight: 700;
}
.section-meta .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-red), transparent);
  max-width: 280px;
}

/* ───────────────── Hero ───────────────── */

.hero {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
  padding: 60px clamp(40px, 8vw, 120px) 80px;
  max-width: 1480px;
  margin: 0 auto;
  position: relative;
}

.hero-left { position: relative; z-index: 3; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: rgba(8,12,22,0.5);
  margin-bottom: 32px;
  animation: title-in 0.8s ease both;
}
.hero-tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: clamp(4.5rem, 9.5vw, 8.4rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--fg);
  margin-bottom: 28px;
  text-shadow: 0 0 50px rgba(230,57,70,0.15);
}
.hero h1 .name-line { display: block; }
.hero h1 .name-line span {
  display: inline-block;
  opacity: 0;
  animation: letter-in 0.55s cubic-bezier(0.2, 1, 0.3, 1) calc(0.35s + var(--i) * 0.05s) forwards;
}
.hero h1 .accent {
  color: var(--red);
  font-style: italic;
  font-weight: 800;
}

@keyframes letter-in {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}
@keyframes title-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.hero-subline {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--fg-2);
  margin-bottom: 40px;
  max-width: 560px;
  line-height: 1.7;
  animation: title-in 0.9s ease 0.6s both;
}
.hero-subline .red { color: var(--red); }
.hero-subline strong { color: var(--fg); font-weight: 600; }

.hero-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 38px;
  margin-bottom: 44px;
  animation: title-in 0.9s ease 0.85s both;
}
.hero-meta-item .k {
  font-family: var(--font-mono);
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--fg-4);
  margin-bottom: 8px;
}
.hero-meta-item .v {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--fg);
  font-weight: 500;
}
.hero-meta-item .v .dim { color: var(--fg-3); font-weight: 400; }

.hero-actions {
  display: flex;
  gap: 14px;
  animation: title-in 0.9s ease 1s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--red);
  color: white;
  border-color: var(--red);
}
.btn-primary:hover { background: var(--red-2); transform: translateY(-2px); }
.btn-ghost {
  background: rgba(8,12,22,0.6);
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--red); color: var(--red); }
.btn .arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}
.btn:hover .arrow { transform: translateX(3px); }

/* Hero right column: IDE editor card */
.hero-right { position: relative; z-index: 3; }

.ide-card {
  width: 100%;
  background: rgba(7, 10, 20, 0.85);
  border: 1px solid var(--line-strong);
  box-shadow:
    0 30px 80px rgba(0,0,0,0.55),
    0 0 0 1px rgba(230,57,70,0.06);
  backdrop-filter: blur(12px);
  animation: title-in 1s ease 0.7s both;
  position: relative;
}
.ide-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(230,57,70,0.4), transparent 30%, transparent 70%, rgba(230,57,70,0.2)) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.ide-bar {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: rgba(0,0,0,0.4);
  border-bottom: 1px solid var(--line);
}
.ide-bar .dots {
  display: flex;
  gap: 6px;
  margin-right: 16px;
}
.ide-bar .dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.10);
}
.ide-bar .dots span:nth-child(1) { background: var(--red); }
.ide-bar .dots span:nth-child(2) { background: var(--amber); opacity: 0.7;}
.ide-bar .dots span:nth-child(3) { background: var(--green); opacity: 0.7;}
.ide-bar .ide-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
}

.ide-tabbar {
  display: flex;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--line);
}
.ide-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  border-right: 1px solid var(--line);
}
.ide-tab.active { color: var(--fg); background: rgba(255,255,255,0.025); border-bottom: 1px solid var(--red); margin-bottom: -1px; }
.ide-tab .lang-dot { width: 7px; height: 7px; border-radius: 50%; }

.ide-body {
  display: grid;
  grid-template-columns: 32px 1fr;
  padding: 16px 18px 18px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  min-height: 340px;
}
.gutter {
  text-align: right;
  padding-right: 14px;
  color: var(--fg-4);
  user-select: none;
}
.gutter div { padding-right: 0; }

.code .line { white-space: pre; min-height: 1.7em; }
.code .k { color: var(--red); }
.code .key { color: var(--blue); }
.code .str { color: #98c379; }
.code .num { color: var(--amber); }
.code .fn { color: var(--purple); }
.code .cmt { color: var(--fg-4); font-style: italic; }
.code .punct { color: var(--fg-3); }
.code .ident { color: var(--fg); }
.code .arr { color: var(--fg-3); }

/* ───────────────── Hero right — Profile Dossier ─────────────────
   Editorial card with portrait placeholder + typographic manifest
─────────────────────────────────────────────────────────────────── */

.dossier {
  position: relative;
  background: rgba(7, 10, 20, 0.72);
  border: 1px solid var(--line-strong);
  padding: 22px 22px 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  backdrop-filter: blur(12px);
  animation: title-in 1s ease 0.7s both;
  overflow: hidden;
}

/* corner crosshairs */
.dossier::before,
.dossier::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--red);
  opacity: 0.65;
}
.dossier::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.dossier::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.dossier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-4);
  margin-bottom: 18px;
}
.dossier-head .red { color: var(--red); }
.dossier-head .right { display: inline-flex; gap: 14px; }

.dossier-portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,0.025) 0 6px,
      transparent 6px 12px
    ),
    linear-gradient(180deg, rgba(230,57,70,0.10), rgba(7,10,20,0.6));
  border: 1px solid var(--line);
  margin-bottom: 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
/* big initials watermark behind */
.dossier-portrait .initials {
  font-family: var(--font-body);
  font-size: clamp(8rem, 18vw, 14rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  color: rgba(255,255,255,0.04);
  line-height: 0.85;
  -webkit-text-stroke: 1px rgba(230,57,70,0.18);
}
.dossier-portrait .ph-label {
  position: absolute;
  bottom: 10px; left: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-4);
}
.dossier-portrait .ph-coord {
  position: absolute;
  top: 10px; right: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--fg-4);
}

/* portrait ruler ticks */
.dossier-portrait::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.18) 1px, transparent 1px);
  background-size: 20px 100%;
  opacity: 0.4;
}

.dossier-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}
.dossier-row .k {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-4);
  margin-bottom: 4px;
}
.dossier-row .v {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.dossier-row .v .dim { color: var(--fg-3); font-weight: 400; }

.dossier-now {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.dossier-now .lbl {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
}
.dossier-now .val { color: var(--fg-2); }
.dossier-now .val::after {
  content: "";
  display: inline-block;
  width: 6px; height: 1em;
  background: var(--red);
  vertical-align: text-bottom;
  margin-left: 4px;
  animation: blink 1s step-end infinite;
}

/* ───────────────── About right — Skills Board ─────────────────
   Editorial level-bars + weekly heatmap + now-learning highlight
─────────────────────────────────────────────────────────────── */

.skills-board {
  background: rgba(7, 10, 20, 0.72);
  border: 1px solid var(--line-strong);
  padding: 26px 28px 28px;
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  position: relative;
}
.skills-board::before,
.skills-board::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--red);
  opacity: 0.55;
}
.skills-board::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.skills-board::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.sb-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 26px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.sb-head .ttl { color: var(--fg-2); }
.sb-head .ttl span { color: var(--red); margin-right: 8px; }
.sb-head .yr { color: var(--fg-4); }

/* Level meter rows */
.lvl-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lvl {
  display: grid;
  grid-template-columns: 110px 1fr 42px;
  align-items: center;
  gap: 18px;
}
.lvl .name {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}
.lvl .name .dot {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}
.lvl .track {
  height: 8px;
  background: rgba(255,255,255,0.04);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}
.lvl .track::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 10% 100%;
}
.lvl .fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, var(--red) 0%, #ff7a87 100%);
  transform: scaleX(0);
  transform-origin: left;
  animation: fill-in 1.2s cubic-bezier(0.2,0.8,0.2,1) 0.8s forwards;
}
@keyframes fill-in {
  to { transform: scaleX(1); }
}
.lvl .pct {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  text-align: right;
  letter-spacing: 0.04em;
}

/* divider */
.sb-divider {
  height: 1px;
  background: var(--line);
  margin: 26px 0 22px;
  position: relative;
}
.sb-divider span {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  background: var(--bg-card-solid);
  padding-right: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-4);
}

/* Weekly activity heatmap */
.heat {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: center;
}
.heat-days {
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--fg-4);
  letter-spacing: 0.1em;
}
.heat-grid {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  grid-auto-rows: 1fr;
  gap: 5px;
}
.heat-cell {
  aspect-ratio: 1 / 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}
.heat-cell.l1 { background: rgba(230,57,70,0.18); border-color: rgba(230,57,70,0.18); }
.heat-cell.l2 { background: rgba(230,57,70,0.40); border-color: rgba(230,57,70,0.40); }
.heat-cell.l3 { background: rgba(230,57,70,0.65); border-color: rgba(230,57,70,0.65); }
.heat-cell.l4 { background: var(--red); border-color: var(--red); }

.heat-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  margin-left: 42px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--fg-4);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.heat-legend .scale {
  display: inline-flex;
  gap: 3px;
}
.heat-legend .scale span {
  width: 10px; height: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}
.heat-legend .scale span.l1 { background: rgba(230,57,70,0.18); }
.heat-legend .scale span.l2 { background: rgba(230,57,70,0.40); }
.heat-legend .scale span.l3 { background: rgba(230,57,70,0.65); }
.heat-legend .scale span.l4 { background: var(--red); }

/* now learning card */
.now-learning {
  margin-top: 24px;
  padding: 16px 18px;
  background: rgba(230,57,70,0.05);
  border: 1px solid var(--line-red);
  display: flex;
  align-items: center;
  gap: 14px;
}
.now-learning .nl-icon {
  width: 36px; height: 36px;
  background: rgba(230,57,70,0.12);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.now-learning .nl-icon svg { width: 18px; height: 18px; stroke: var(--red); }
.now-learning .nl-body { display: flex; flex-direction: column; gap: 3px; }
.now-learning .nl-lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--red);
}
.now-learning .nl-val {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

/* keep old skills block hidden — replaced by board */
.skills-block { display: none; }

/* ───────────────── Hero right — Kinetic Manifesto ─────────────────
   Animated rotating phrase + ticking counters
─────────────────────────────────────────────────────────────────── */

.manifesto {
  position: relative;
  background: rgba(7, 10, 20, 0.72);
  border: 1px solid var(--line-strong);
  padding: 26px 30px 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  backdrop-filter: blur(12px);
  animation: title-in 1s ease 0.7s both;
  overflow: hidden;
}

/* corner crosshairs */
.manifesto::before,
.manifesto::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--red);
  opacity: 0.6;
}
.manifesto::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.manifesto::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* slow drifting ambient orbs behind content */
.manifesto .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.manifesto .orb-a {
  width: 280px; height: 280px;
  background: rgba(230,57,70,0.55);
  top: -80px; right: -80px;
  animation: drift-a 14s ease-in-out infinite alternate;
}
.manifesto .orb-b {
  width: 220px; height: 220px;
  background: rgba(120,84,255,0.35);
  bottom: -60px; left: -60px;
  animation: drift-b 18s ease-in-out infinite alternate;
}
@keyframes drift-a {
  from { transform: translate(0, 0); }
  to   { transform: translate(-30px, 40px); }
}
@keyframes drift-b {
  from { transform: translate(0, 0); }
  to   { transform: translate(40px, -30px); }
}

.manifesto > * { position: relative; z-index: 1; }

.m-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-4);
  margin-bottom: 36px;
}
.m-head .red { color: var(--red); margin-right: 6px; }

/* The kinetic stage */
.m-stage {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 42px;
}
.m-prefix {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.m-rotator {
  position: relative;
  height: clamp(3.2rem, 6vw, 4.4rem);
  overflow: hidden;
}
.m-word {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--fg);
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.7s ease;
}
.m-word.active {
  transform: translateY(0);
  opacity: 1;
}
.m-word.leaving {
  transform: translateY(-110%);
  opacity: 0;
}
.m-word .dot {
  color: var(--red);
  font-style: italic;
}

/* Counters */
.m-divider {
  height: 1px;
  background: var(--line);
  margin-bottom: 22px;
}

.m-counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 30px;
}
.m-counter .num {
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 6px;
  display: block;
}
.m-counter .num .red { color: var(--red); }
.m-counter .lbl {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-4);
}

/* Footer: pulse row + currently */
.m-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.pulse-row {
  display: inline-flex;
  gap: 5px;
}
.pulse-row span {
  width: 6px; height: 6px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
}
.pulse-row span.on {
  background: var(--red);
  box-shadow: 0 0 10px rgba(230,57,70,0.9);
}
.m-now {
  font-size: 12px;
  color: var(--fg-2);
  letter-spacing: 0.02em;
}
.m-now .lbl {
  color: var(--fg-4);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 10px;
  margin-right: 8px;
}
.m-now .val { color: var(--fg); font-weight: 500; }
.m-now .cur {
  display: inline-block;
  width: 7px; height: 0.85em;
  background: var(--red);
  vertical-align: text-bottom;
  margin-left: 3px;
  animation: blink 1s step-end infinite;
}

/* ───────────────── About right — Tech marquee ─────────────────  */

.about-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}

.tech-marquee {
  width: 100%;
  margin-bottom: 0;
  padding-top: 0;
}

.mq {
  overflow: hidden;
  position: relative;
  margin: 0 0 12px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 4%, black 96%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, black 4%, black 96%, transparent 100%);
}
.mq-track {
  display: inline-flex;
  gap: 10px;
  padding: 2px 5px;
  animation: marquee 52s linear infinite;
  white-space: nowrap;
}
.mq-rev .mq-track { animation-direction: reverse; animation-duration: 62s; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.mq-chip {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 15px 22px;
  background: rgba(8,12,22,0.55);
  border: 1px solid var(--line);
  font-size: 17px;
  font-weight: 500;
  color: var(--fg-2);
  letter-spacing: -0.005em;
  flex-shrink: 0;
}
.mq-chip:hover { color: var(--fg); border-color: var(--line-red); }
.mq-chip .dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0;
}
.stack-label {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}
.cyber-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.mini-term {
  margin-top: 18px;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--line-strong);
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-2);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: title-in 1s ease 1.1s both;
}
.mini-term .prompt-dot {
  width: 8px; height: 8px;
  background: var(--green); border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}
.mini-term .prompt { color: var(--fg-4); }
.mini-term .typed { color: var(--fg); }
.mini-term .typed-result { color: var(--green); margin-left: auto; }
.mini-term .cur {
  display: inline-block;
  width: 8px; height: 1em;
  background: var(--red);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ───────────────── About ───────────────── */

#about { background: linear-gradient(180deg, transparent, rgba(7,10,20,0.5) 100%); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: center;
}

.about-bio h2 {
  font-family: var(--font-body);
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
}
.about-bio h2 .accent { color: var(--red); font-style: italic; font-weight: 700; }

.about-bio p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
  margin-bottom: 18px;
  padding-right: 32px;
}

.about-bio p strong { color: var(--fg); font-weight: 600; }

.about-quote {
  margin-top: 28px;
  padding: 16px 20px;
  border-left: 2px solid var(--red);
  background: rgba(230,57,70,0.04);
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--fg-2);
}
.about-quote span { color: var(--red); }

/* Right: profile.json IDE card */
.profile-card {
  background: rgba(7, 10, 20, 0.78);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}
.profile-card .ide-body { min-height: auto; padding: 18px 22px 22px 0; }

.skills-block {
  margin-top: 36px;
}
.skills-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-4);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.skills-label::before {
  content: ""; width: 6px; height: 6px; background: var(--red); border-radius: 1px;
}
.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.skill-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(8,12,22,0.5);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-2);
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.skill-chip:hover {
  border-color: var(--line-red);
  color: var(--fg);
  background: rgba(230,57,70,0.04);
}
.skill-chip .sk-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
}
.skill-chip .sk-lv {
  margin-left: auto;
  font-size: 10px;
  color: var(--fg-4);
}

/* ───────────────── Projects ───────────────── */

.projects-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: 15px;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 7px 14px;
  border: 1px solid var(--line);
  color: var(--fg-3);
  background: rgba(8,12,22,0.5);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.filter-chip:hover { color: var(--fg); border-color: var(--line-strong); }
.filter-chip.active { color: var(--fg); border-color: var(--red); background: rgba(230,57,70,0.08); }
.filter-chip .count { color: var(--fg-4); margin-left: 6px; }
.toolbar-spacer { flex: 1; }
.toolbar-meta { color: var(--fg-4); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

.proj-card {
  position: relative;
  background: rgba(8, 12, 22, 0.68);
  border: 1px solid var(--line-strong);
  padding: 24px 24px 22px;
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.proj-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 2px;
  background: var(--red);
  transition: width 0.4s ease;
}
.proj-card:hover {
  border-color: var(--line-red);
  transform: translateY(-4px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.5);
}
.proj-card:hover::before { width: 100%; }

.proj-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  gap: 16px;
}
.proj-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: rgba(230,57,70,0.08);
  border: 1px solid var(--line-red);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 16px;
  color: var(--red);
  flex-shrink: 0;
}
.proj-status {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--line);
  color: var(--fg-3);
}
.proj-status.live { color: var(--green); border-color: rgba(61,220,132,0.3); }
.proj-status.wip { color: var(--amber); border-color: rgba(245,177,76,0.3); }

.proj-title {
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.proj-slug {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg-4);
  margin-bottom: 18px;
}

.proj-desc {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 22px;
  flex-grow: 1;
}

.proj-stats {
  display: flex;
  gap: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg-3);
}
.proj-stats .stat { display: inline-flex; align-items: center; gap: 6px; }
.proj-stats svg { width: 12px; height: 12px; stroke: currentColor; }
.proj-stats .lang-dot {
  width: 9px; height: 9px; border-radius: 50%;
}

.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 22px;
}
.proj-tags span {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 4px 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
}

.proj-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.proj-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-2);
  text-decoration: none;
}
.proj-link:hover { color: var(--red); }
.proj-link .arr { transition: transform 0.2s ease; }
.proj-link:hover .arr { transform: translate(2px, -2px); }

.proj-actions { display: flex; gap: 8px; }
.proj-actions a {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  color: var(--fg-3);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.proj-actions a:hover { color: var(--red); border-color: var(--line-red); }
.proj-actions svg { width: 14px; height: 14px; }

/* ───────────────── Contacts ───────────────── */

.contacts-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 64px;
  align-items: start;
}

.contacts-info h2 {
  font-family: var(--font-body);
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}
.contacts-info h2 .accent { color: var(--red); font-style: italic; font-weight: 700; }
.contacts-info p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
  max-width: 480px;
  margin-bottom: 32px;
}

.signals {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 16px 28px;
  margin-bottom: 36px;
  font-family: var(--font-mono);
  font-size: 15px;
}
.signal { display: flex; align-items: center; gap: 10px; color: var(--fg-2); }
.signal .lbl { color: var(--fg-4); }
.signal .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

/* Contact links list */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(7,10,20,0.65);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(8px);
}
.contact-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background 0.25s ease;
}
.contact-row:last-child { border-bottom: none; }
.contact-row:hover { background: rgba(230,57,70,0.04); }
.contact-row .cr-label {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
}
.contact-row .cr-val {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--fg);
  letter-spacing: 0;
}
.contact-row .cr-arrow {
  color: var(--fg-3);
  transition: transform 0.2s ease, color 0.2s ease;
}
.contact-row:hover .cr-arrow {
  color: var(--red);
  transform: translate(3px, -3px);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  background: transparent;
  border: 1px solid var(--line);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg-3);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.copy-btn:hover { color: var(--red); border-color: var(--line-red); }

/* ───────────────── Footer ───────────────── */

footer {
  position: relative;
  z-index: 5;
  padding: 28px clamp(40px, 8vw, 120px);
  max-width: 1480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg-4);
}
footer .name { color: var(--fg-2); font-weight: 600; letter-spacing: 0.08em; }
footer a { color: var(--fg-3); text-decoration: none; margin-left: 18px; transition: color 0.2s ease;}
footer a:hover { color: var(--red); }

/* ───────────────── Reveal animation ───────────────── */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in-view { opacity: 1; transform: none; }
.reveal-d1.in-view { transition-delay: 0.05s; }
.reveal-d2.in-view { transition-delay: 0.15s; }
.reveal-d3.in-view { transition-delay: 0.25s; }
.reveal-d4.in-view { transition-delay: 0.35s; }

/* ───────────────── Responsive ───────────────── */

@media (max-width: 1024px) {
  .hero, .about-grid, .contacts-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .tabs { display: none; }
}

@media (max-width: 700px) {
  .topbar { padding: 0 16px; gap: 12px; }
  .cmd-k { display: none; }
  .lang-pill { display: none; }
  .section { padding: 60px 24px 80px; }
  .hero { padding: 40px 24px 60px; }
  .hero h1 { font-size: clamp(3.2rem, 14vw, 5rem); }
  .hero-meta-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
  .statusbar .item:nth-child(n+4) { display: none; }
  .contact-row { grid-template-columns: 1fr auto; }
  .contact-row .cr-label { grid-column: 1 / -1; }
}
