* {
  box-sizing: border-box;
}

:root {
  --bg: #050816;
  --bg-elevated: #0d1328;
  --bg-soft: rgba(13, 19, 40, 0.72);
  --blue: #2563eb;
  --blue-strong: #3b82f6;
  --text: #ffffff;
  --muted: #d1d5db;
  --border: rgba(148, 163, 184, 0.16);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  --glow: 0 0 0 1px rgba(37, 99, 235, 0.18), 0 0 30px rgba(37, 99, 235, 0.25), 0 0 80px rgba(37, 99, 235, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --container: 1180px;
  --header-height: 84px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(59, 130, 246, 0.14), transparent 25%),
    linear-gradient(180deg, #050816 0%, #050816 100%);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
}

input,
textarea,
select,
[contenteditable="true"] {
  user-select: text;
  -webkit-user-select: text;
}

img,
svg {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

a,
button,
input,
textarea,
select,
[contenteditable="true"] {
  pointer-events: auto;
}

body.menu-open {
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.08));
  opacity: 0.45;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 40%, rgba(5, 8, 22, 0.35) 100%);
  z-index: 0;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.page-shell {
  position: relative;
  z-index: 1;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: rgba(5, 8, 22, 0.72);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.nav-bar {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.9), rgba(37, 99, 235, 0.22));
  box-shadow: var(--glow);
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong,
.hero-content h1,
.section-heading h2,
.skill-card h3,
.project-topline h3,
.timeline-content h3,
.education-card h3,
.contact-card h3 {
  font-family: 'Poppins', sans-serif;
}

.brand-text strong {
  font-size: 1.02rem;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.78rem;
}

.terminal-brand .brand-mark {
  border-radius: 16px;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.terminal-brand .brand-text strong {
  letter-spacing: 0.03em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(13, 19, 40, 0.54);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.2);
}

.primary-nav a {
  position: relative;
  padding: 12px 16px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  border-radius: 999px;
  white-space: nowrap;
  transition: 0.3s ease;
}

.primary-nav a:hover,
.primary-nav a.active {
  color: var(--text);
  background: rgba(37, 99, 235, 0.16);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.28);
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  background: rgba(13, 19, 40, 0.54);
  flex: 0 0 auto;
}

.language-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: 700 0.72rem 'Inter', sans-serif;
  cursor: pointer;
  transition: 0.2s ease;
}

.language-button:hover,
.language-button.is-active {
  background: rgba(37, 99, 235, 0.22);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.35);
}

.language-button:focus-visible,
.menu-toggle:focus-visible {
  outline: 2px solid var(--blue-strong);
  outline-offset: 3px;
}

.menu-toggle {
  display: none;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(13, 19, 40, 0.7);
  color: var(--text);
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.section {
  position: relative;
  padding: 110px 0;
}

.section-surface {
  background: linear-gradient(180deg, rgba(13, 19, 40, 0.28), rgba(13, 19, 40, 0.1));
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + 28px);
  padding-bottom: 64px;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(12px);
  pointer-events: none;
}

.hero-glow-a {
  width: 420px;
  height: 420px;
  top: -140px;
  left: -80px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22), transparent 68%);
  animation: floatGlow 14s ease-in-out infinite;
}

.hero-glow-b {
  width: 320px;
  height: 320px;
  right: -90px;
  bottom: 50px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2), transparent 68%);
  animation: floatGlow 16s ease-in-out infinite reverse;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 86px 86px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent 82%);
  opacity: 0.35;
}

.particle-field {
  position: absolute;
  inset: 0;
}

.particle {
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.95), rgba(37, 99, 235, 0.08) 68%, transparent 70%);
  box-shadow: 0 0 18px rgba(37, 99, 235, 0.38);
  opacity: 0.45;
  animation: drift var(--duration) linear infinite, pulse 6s ease-in-out infinite;
  animation-delay: var(--delay);
}

.security-node {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 28px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: linear-gradient(145deg, rgba(13, 19, 40, 0.65), rgba(13, 19, 40, 0.22));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 0 36px rgba(37, 99, 235, 0.12);
  backdrop-filter: blur(10px);
  transform: rotate(12deg);
}

.security-node::before,
.security-node::after {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 20px;
  border: 1px dashed rgba(37, 99, 235, 0.24);
}

.security-node::after {
  inset: 34px;
}

.security-node-a {
  top: 12%;
  right: 12%;
}

.security-node-b {
  bottom: 14%;
  left: 10%;
}

.security-node-c {
  top: 52%;
  right: 4%;
  width: 90px;
  height: 90px;
  border-radius: 24px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 60px;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.profile-frame {
  position: relative;
  width: min(100%, clamp(290px, 34vw, 360px));
  aspect-ratio: 1;
  padding: 4px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.18), 0 18px 45px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.profile-frame::before {
  content: '';
  position: absolute;
  inset: -42%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(34, 211, 238, 0.95) 70deg, rgba(59, 130, 246, 1) 130deg, rgba(56, 189, 248, 0.95) 200deg, transparent 260deg, transparent 360deg);
  animation: neonSpin 4.5s linear infinite;
}

.profile-frame::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bg);
  z-index: 1;
}

.profile-image {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  border-radius: 50%;
  border: 0;
  background: #050816;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.38);
  transform: translateZ(0);
  transition: transform 0.35s ease;
  z-index: 2;
}

.profile-frame:hover .profile-image {
  transform: scale(1.04);
}

.profile-frame:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.28), 0 24px 55px rgba(0, 0, 0, 0.5);
}

.hero-terminal {
  width: min(100%, 400px);
  padding: 18px 20px 20px;
  display: grid;
  gap: 16px;
}

.terminal-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.terminal-dots {
  display: inline-flex;
  gap: 8px;
}

.terminal-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.32);
  box-shadow: 0 0 14px rgba(148, 163, 184, 0.16);
}

.terminal-dots i:nth-child(1) {
  background: #fb7185;
}

.terminal-dots i:nth-child(2) {
  background: #fbbf24;
}

.terminal-dots i:nth-child(3) {
  background: #22c55e;
}

.terminal-title {
  color: #8fb4ff;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.terminal-body {
  display: grid;
  gap: 12px;
  font-family: 'Poppins', sans-serif;
}

.terminal-line {
  margin: 0;
  display: grid;
  gap: 4px;
  opacity: 0;
  transform: translateY(8px);
  animation: terminalReveal 0.7s ease forwards;
}

.terminal-line-1 { animation-delay: 0.12s; }
.terminal-line-2 { animation-delay: 0.36s; }
.terminal-line-3 { animation-delay: 0.60s; }

.terminal-prompt {
  color: #93c5fd;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.terminal-line strong {
  display: inline-block;
  width: fit-content;
  white-space: nowrap;
}

.terminal-line-1 strong {
  max-width: 12.55ch;
  padding-right: 0.04em;
  border-right: 2px solid rgba(125, 211, 252, 0.9);
  overflow: hidden;
  animation: terminalTypingName 1.5s steps(13, end) forwards, terminalCursor 0.9s steps(1) infinite;
  animation-delay: 0.35s;
}

.terminal-line-2 strong { max-width: 27ch; }
.terminal-line-3 strong { max-width: 24ch; }

.terminal-line-1 strong,
.terminal-line-2 strong,
.terminal-line-3 strong {
  color: var(--text);
  font-size: 0.98rem;
  animation-fill-mode: forwards;
}

.terminal-line-3 {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.availability-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.availability-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.availability-signal {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.7);
  flex: none;
  animation: availabilityPulse 1.4s ease-in-out infinite;
}

.terminal-line-3 strong {
  max-width: 46ch;
}

.availability-details {
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

@keyframes availabilityPulse {
  0% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.65);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }
  100% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.hero-terminal:hover .terminal-line strong {
  border-right-color: rgba(147, 197, 253, 1);
}

.hero-terminal:hover {
  transform: translateY(-2px);
}

@keyframes terminalReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes terminalTyping {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes terminalTypingName {
  from {
    width: 0;
  }
  to {
    width: 12.55ch;
  }
}

@keyframes terminalCursor {
  0%, 49% {
    border-right-color: rgba(147, 197, 253, 0.95);
  }
  50%, 100% {
    border-right-color: transparent;
  }
}

.hero-content {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: #8fb4ff;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(3.6rem, 9vw, 7.2rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.hero-content h1 span,
.section-heading h2 span {
  color: #7ba8ff;
}

.hero-subtitle {
  margin: 24px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-subtitle span,
.hero-points span,
.tech-tags span,
.timeline-meta {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(13, 19, 40, 0.72);
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.9rem;
}

.hero-description {
  margin: 28px 0 0;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  border: 1px solid transparent;
}

.button:hover,
.button:focus-visible,
.project-actions a:hover,
.project-actions a:focus-visible {
  transform: translateY(-3px);
}

.button-primary {
  background: linear-gradient(135deg, rgba(37, 99, 235, 1), rgba(59, 130, 246, 0.85));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.button-primary:hover {
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.42), var(--glow);
}

.button-secondary,
.button-tertiary {
  background: rgba(13, 19, 40, 0.76);
  border-color: rgba(148, 163, 184, 0.18);
  color: var(--text);
}

.button-secondary:hover,
.button-tertiary:hover {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: var(--glow);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.glass-card {
  background: linear-gradient(180deg, rgba(13, 19, 40, 0.86), rgba(13, 19, 40, 0.62));
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.03em;
}

.about-card {
  padding: 30px;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.about-media {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  max-width: 360px;
  width: 100%;
  justify-self: start;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.14), rgba(5, 8, 22, 0.78)),
    linear-gradient(135deg, rgba(147, 197, 253, 0.18), rgba(37, 99, 235, 0.02));
  box-shadow: 0 28px 60px rgba(2, 6, 23, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transform: translateZ(0);
}

.about-media::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(2, 6, 23, 0.3));
  z-index: 1;
}

.about-media::after {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.15),
    0 0 32px rgba(59, 130, 246, 0.14) inset;
  z-index: 2;
  pointer-events: none;
}

.about-media img {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  transform: scale(1.035);
  transition: transform 0.45s ease, filter 0.45s ease;
}

.about-media:hover img {
  transform: scale(1.07);
  filter: saturate(1.04) contrast(1.03);
}

.about-content {
  display: grid;
  gap: 18px;
  align-self: start;
}

.about-content > p {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 980px;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 8px;
}

.about-highlights article {
  padding: 20px;
  border-radius: 20px;
  background: rgba(5, 8, 22, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.11);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.about-highlights article:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.12);
}

.about-highlights strong,
.skill-card h3,
.timeline-content h3,
.education-card h3,
.contact-card h3 {
  display: block;
  font-size: 1.06rem;
  margin-bottom: 8px;
}

.about-highlights span,
.skill-list li,
.project-body p,
.timeline-content p,
.education-card p,
.contact-card p,
.stat-card span {
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 920px) {
  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-media {
    max-width: 420px;
    width: 100%;
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .about-card {
    padding: 22px;
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }
}

.cv-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cv-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cv-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 22, 0.28);
  backdrop-filter: blur(6px);
}

.cv-modal__panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(92vh, 920px);
  overflow: auto;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  background: transparent;
  box-shadow: none;
  padding: 16px;
}

/* Quando o modal estiver aberto, expandir o painel para full-screen e permitir que o PDF ocupe todo o espaço */
.cv-modal.is-open .cv-modal__panel {
  width: 100vw;
  height: 100vh;
  max-height: none;
  border-radius: 0;
  padding: 0;
}

.cv-modal__panel {
  display: flex;
  flex-direction: column;
}

.cv-modal__content {
  padding-top: 4px;
  flex: 1 1 auto;
  display: flex;
}

.cv-document {
  display: block;
  flex: 1 1 auto;
  gap: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.cv-pdf-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.cv-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.cv-modal__header h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
}

.cv-modal__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cv-modal__close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.18);
  color: var(--text);
  cursor: pointer;
  font-size: 1.35rem;
}

.cv-modal__back {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.08);
  color: var(--text);
  cursor: pointer;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .cv-modal__back {
    padding: 8px 10px;
    font-size: 0.9rem;
  }
}

.cv-modal__content {
  padding-top: 4px;
}

.cv-document {
  display: grid;
  gap: 18px;
  padding: 12px;
  border-radius: 18px;
  background: var(--bg-soft);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.cv-preview-empty {
  min-height: 320px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 16px;
  padding: 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(148, 163, 184, 0.24);
}

.cv-preview-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 420px;
}

.cv-document__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.cv-document__header h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.cv-document__header p,
.cv-document__meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.cv-document__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.cv-section h4 {
  margin: 0 0 10px;
  color: #93c5fd;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.cv-section p,
.cv-section li {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.cv-section ul {
  margin: 0;
  padding-left: 18px;
}

.cv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cv-tags span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(37, 99, 235, 0.24);
  color: var(--text);
  font-size: 0.9rem;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .cv-modal {
    padding: 12px;
  }

  .cv-modal__panel {
    padding: 18px;
  }

  .cv-modal__header,
  .cv-document__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .cv-document__meta {
    align-items: flex-start;
  }

  .cv-document {
    padding: 18px;
  }
}

@media print {
  body {
    background: #fff;
    color: #111;
  }

  .site-header,
  .hero,
  .section,
  .site-footer,
  .cv-modal__actions,
  .cv-modal__backdrop {
    display: none !important;
  }

  .cv-modal {
    position: static;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    padding: 0;
  }

  .cv-modal__panel {
    box-shadow: none;
    border: 0;
    max-height: none;
    overflow: visible;
    background: #fff;
    width: 100%;
    padding: 0;
  }

  .cv-document {
    background: #fff;
    border: 0;
    padding: 0;
    gap: 12px;
  }

  .cv-document__header {
    border-color: #ccc;
  }

  .cv-tags span {
    background: #f3f4f6;
    color: #111;
    border-color: #d1d5db;
  }
}

.skills-grid,
.projects-grid,
.stats-grid,
.contact-grid {
  display: grid;
  gap: 22px;
}

.skills-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skill-card {
  padding: 28px;
  min-height: 100%;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.skill-card:hover,
.project-card:hover,
.timeline-content:hover,
.education-card:hover,
.contact-card:hover {
  transform: translateY(-8px);
  border-color: rgba(37, 99, 235, 0.36);
  box-shadow: var(--glow), var(--shadow);
}

.skill-icon,
.contact-icon,
.education-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.24), rgba(13, 19, 40, 0.72));
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: #93c5fd;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.skill-icon svg,
.contact-icon svg,
.education-icon svg,
.timeline-marker svg {
  width: 24px;
  height: 24px;
}

.skill-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-list-numbered {
  display: grid;
  gap: 12px;
  counter-reset: soft-skill;
}

.skill-list-numbered li {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  font-size: 0.96rem;
}

.skill-list-numbered li::before {
  counter-increment: soft-skill;
  content: counter(soft-skill, decimal-leading-zero);
  min-width: 2.2rem;
  font-weight: 700;
  color: #93c5fd;
}

.skill-list li {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(5, 8, 22, 0.42);
  font-size: 0.92rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.skill-list li:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(37, 99, 235, 0.18);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.18), 0 0 18px rgba(37, 99, 235, 0.28);
  color: #eff6ff;
}

.skill-list-numbered li:hover {
  transform: translateY(-3px);
}

.skill-list-numbered li:hover::before {
  color: #dbeafe;
  text-shadow: 0 0 12px rgba(147, 197, 253, 0.7);
}

.skill-bucket + .skill-bucket {
  margin-top: 18px;
}

.skill-bucket strong {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: #e2e8f0;
}

.projects-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
}

.project-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-filter {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(13, 19, 40, 0.72);
  color: var(--muted);
  cursor: pointer;
  transition: 0.25s ease;
}

.project-filter:hover,
.project-filter:focus-visible,
.project-filter[aria-pressed="true"] {
  border-color: rgba(59, 130, 246, 0.48);
  background: rgba(37, 99, 235, 0.18);
  color: #dbeafe;
}

.project-count {
  flex: none;
  color: var(--muted);
  font-size: 0.88rem;
}

.project-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  transform-style: preserve-3d;
}

.project-card-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  margin-bottom: 2px;
}

.project-card-featured .project-media {
  aspect-ratio: auto;
  min-height: 410px;
}

.project-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.project-card:hover .project-media img {
  transform: scale(1.08);
  filter: saturate(1.1) contrast(1.05);
}

.project-overlay {
  position: absolute;
  inset: auto 18px 18px 18px;
  display: flex;
  justify-content: flex-start;
}

.project-overlay span {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(5, 8, 22, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #dbeafe;
  font-size: 0.88rem;
}

.project-body {
  padding: 24px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.project-card-featured .project-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 38px;
}

.featured-label {
  width: fit-content;
  margin-bottom: 14px;
  color: #93c5fd;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-category {
  margin: 0 0 6px !important;
  color: #93c5fd !important;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-privacy {
  margin-top: 14px !important;
  padding: 12px 14px;
  border-left: 3px solid rgba(59, 130, 246, 0.72);
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.08);
  color: #b9cce4 !important;
  font-size: 0.82rem;
  line-height: 1.55 !important;
}

.project-topline {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.project-topline h3 {
  margin: 0;
  font-size: 1.4rem;
}

.project-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(37, 99, 235, 0.14);
  border: 1px solid rgba(37, 99, 235, 0.24);
  color: #c7d2fe;
  font-weight: 700;
  flex: none;
}

.project-body p {
  margin: 16px 0 0;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.project-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 22px;
}

.project-actions a {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 19, 40, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.16);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.project-actions a:last-child {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(59, 130, 246, 0.72));
}

.timeline {
  position: relative;
  display: grid;
  gap: 22px;
  padding-left: 16px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 40px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.68), rgba(37, 99, 235, 0.08));
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.timeline-marker {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.28), rgba(13, 19, 40, 0.88));
  border: 1px solid rgba(37, 99, 235, 0.28);
  color: #93c5fd;
  position: relative;
  z-index: 1;
}

.timeline-content,
.education-card,
.contact-card,
.stat-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.timeline-content {
  padding: 24px 26px;
}

.timeline-date {
  margin: 0 0 10px;
  color: #93c5fd;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.timeline-content p:last-child,
.education-card p:last-child {
  margin-bottom: 0;
}

.education-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px;
}

.education-icon {
  flex: none;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  padding: 30px 24px;
  text-align: center;
}

.stat-card strong {
  display: block;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1;
  font-family: 'Poppins', sans-serif;
  color: #eff6ff;
  text-shadow: 0 0 30px rgba(37, 99, 235, 0.28);
}

.stat-card span {
  display: block;
  margin-top: 12px;
  font-size: 1rem;
}

.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-card {
  padding: 26px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.contact-card:hover .contact-icon,
.skill-card:hover .skill-icon,
.education-card:hover .education-icon,
.timeline-content:hover .timeline-marker {
  box-shadow: var(--glow);
}

.contact-card h3 {
  margin: 0;
}

.contact-card p {
  margin: 6px 0 0;
}

.site-footer {
  padding: 26px 0 34px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(5, 8, 22, 0.8);
}

.footer-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.94rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.08s;
}

.delay-2 {
  transition-delay: 0.16s;
}

.delay-3 {
  transition-delay: 0.24s;
}

.delay-4 {
  transition-delay: 0.32s;
}

@keyframes floatGlow {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(14px, 16px, 0) scale(1.06);
  }
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(0.8);
  }
  25% {
    transform: translate3d(12vw, -7vh, 0) scale(1);
  }
  50% {
    transform: translate3d(24vw, 4vh, 0) scale(0.9);
  }
  75% {
    transform: translate3d(12vw, 12vh, 0) scale(1.04);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(0.8);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.28;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes neonSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1200px) {
  .hero-layout,
  .skills-grid,
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card {
    grid-column: span 1;
  }

  .project-card-featured {
    grid-column: 1 / -1;
  }

  .hero-layout {
    gap: 40px;
  }

  .hero-content h1 {
    font-size: clamp(3.2rem, 8vw, 6rem);
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  :root {
    --header-height: 76px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .primary-nav {
    position: fixed;
    top: var(--header-height);
    left: 16px;
    right: 16px;
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 24px;
    transform: translateY(-18px) scale(0.98);
    opacity: 0;
    pointer-events: none;
    transition: 0.28s ease;
  }

  .primary-nav.is-open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
  }

  .primary-nav a {
    padding: 14px 16px;
  }

  .hero-layout,
  .skills-grid,
  .projects-grid,
  .stats-grid,
  .contact-grid,
  .about-highlights {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card-featured {
    grid-column: 1;
  }

  .project-card-featured {
    display: flex;
  }

  .project-card-featured .project-media {
    aspect-ratio: 16 / 10;
    min-height: 0;
  }

  .project-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + 34px);
  }

  .hero-layout {
    justify-items: center;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-subtitle,
  .hero-points,
  .hero-actions,
  .tech-tags,
  .project-actions {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .timeline::before {
    left: 24px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-left: 4px;
  }

  .timeline-marker {
    margin-left: 0;
  }

  .education-card,
  .contact-card,
  .project-topline,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .section {
    padding: 88px 0;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 24px), var(--container));
  }

  .nav-bar {
    gap: 14px;
  }

  .language-switcher {
    margin-left: auto;
  }

  .language-button {
    width: 34px;
    height: 34px;
  }

  .brand-text small {
    display: none;
  }

  .hero-content h1 {
    font-size: clamp(3rem, 14vw, 4.4rem);
  }

  .hero-subtitle span,
  .hero-points span,
  .tech-tags span {
    font-size: 0.82rem;
    padding: 9px 12px;
  }

  .button {
    width: 100%;
  }

  .hero-actions,
  .project-actions {
    flex-direction: column;
    width: 100%;
  }

  .project-actions a {
    width: 100%;
  }

  .about-card,
  .skill-card,
  .timeline-content,
  .education-card,
  .stat-card,
  .contact-card,
  .project-body {
    padding: 22px;
  }

  .timeline {
    padding-left: 0;
  }

  .timeline::before {
    left: 21px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .timeline-content {
    margin-left: 0;
  }

  .footer-inner {
    text-align: left;
  }

  .hero-terminal {
    width: 100%;
  }

  .terminal-line strong {
    white-space: normal;
    overflow: visible;
    border-right: 0;
    animation: terminalReveal 0.7s ease forwards;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
