:root {
  --bg: #01030a;
  --bg-deep: #020617;
  --panel: rgba(7, 15, 32, 0.85);
  --card: rgba(11, 23, 48, 0.9);
  --line: rgba(0, 245, 255, 0.35);
  --accent: #00f5ff;
  --accent-strong: #18bfff;
  --accent-soft: #4dd6ff;
  --magenta: #d848fe;
  --text: #e5f4ff;
  --muted: rgba(229, 244, 255, 0.7);
  --shadow: 0 25px 60px rgba(0, 0, 0, 0.65);
  --radius: 22px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", "Chakra Petch", sans-serif;
  color: var(--text);
  background: linear-gradient(160deg, var(--bg), var(--bg-deep));
  min-height: 100vh;
  overflow-x: hidden;
}

#matrix-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 0.25;
}

.cyber-grid {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(0, 245, 255, 0.1), transparent 45%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: cover, 80px 80px, 80px 80px;
  z-index: -1;
  pointer-events: none;
}

main {
  width: min(1200px, 94vw);
  margin: 0 auto;
  padding: 140px 0 120px;
}

section {
  margin-bottom: 140px;
  position: relative;
}

.about {
  background: rgba(2, 7, 18, 0.92);
  padding: 50px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  align-items: center;
}

.about-copy h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.about-copy p {
  color: var(--muted);
  margin-bottom: 20px;
}

.directives {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.directives li {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(0, 245, 255, 0.08);
}

.directives i {
  color: var(--accent);
  font-size: 1.2rem;
}

.about-card {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 24px;
  padding: 24px;
  border: 1px solid rgba(0, 245, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.portrait {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

.portrait .glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(0, 245, 255, 0.25), transparent 65%);
  filter: blur(20px);
}

.portrait img {
  width: 100%;
  display: block;
  border-radius: 20px;
  position: relative;
  z-index: 1;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 12px;
}

.about-stats div {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
}

.about-stats p {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-stats h3 {
  font-size: 1.5rem;
}

.section-heading {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 32px;
}

.section-heading h2 {
  text-transform: none;
  letter-spacing: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-top: 10px;
  color: var(--text);
  font-weight: 600;
}

.cyber-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 5vw;
  background: rgba(1, 3, 10, 0.8);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(0, 245, 255, 0.12);
  z-index: 1000;
}

.logo-mark {
  display: flex;
  gap: 12px;
  align-items: center;
}

.logo-mark .glyph {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(0, 245, 255, 0.6);
  display: grid;
  place-items: center;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.logo-mark .name {
  font-weight: 600;
  font-size: 1rem;
}

.logo-mark .role {
  font-size: 0.75rem;
  color: var(--muted);
}

.cyber-nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
}

.cyber-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  transition: color 0.3s ease;
}

.cyber-nav a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 0;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
}

.header-socials a {
  color: var(--accent-soft);
  margin-left: 16px;
  font-size: 1.2rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

.header-socials a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 60px;
  align-items: center;
  padding: 60px;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-depth {
  position: absolute;
  inset: -50% auto auto -30%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 245, 255, 0.2), transparent 65%);
  filter: blur(40px);
  z-index: 0;
}

.hero-content, .hero-visual {
  position: relative;
  z-index: 1;
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2.5rem, 4vw, 3.4rem);
  line-height: 1.2;
  margin-bottom: 24px;
}

.hero h1 span {
  color: var(--accent);
}

.lede {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 40px;
}

.btn {
  border: 1px solid rgba(0, 245, 255, 0.4);
  border-radius: 999px;
  padding: 14px 26px;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.btn.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #04121c;
  box-shadow: 0 10px 30px rgba(0, 245, 255, 0.3);
}

.btn.ghost {
  background: transparent;
}

.btn:hover {
  transform: translateY(-4px);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}

.hero-metrics article {
  background: rgba(4, 10, 24, 0.65);
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(0, 245, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero-metrics h3 {
  font-size: 2rem;
  margin-bottom: 6px;
}

.hero-visual {
  display: grid;
  place-items: center;
}

.shield {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.shield .pulse {
  position: absolute;
  inset: 25%;
  border-radius: 50%;
  border: 1px solid rgba(0, 245, 255, 0.6);
  animation: pulse 4s infinite;
}

.shield .ring {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  animation: rotate 16s linear infinite;
}

.shield-core {
  background: rgba(0, 0, 0, 0.7);
  padding: 30px;
  border-radius: 50%;
  text-align: center;
  border: 1px solid rgba(0, 245, 255, 0.4);
}

.shield-core p {
  color: var(--magenta);
  letter-spacing: 0.4em;
  font-size: 0.7rem;
  margin-bottom: 12px;
}

.shield-core h3 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.floating-snippets {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 32px;
}

.floating-snippets code {
  background: rgba(3, 13, 30, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 18px;
  border-radius: 12px;
  font-family: "Chakra Petch", monospace;
  font-size: 0.85rem;
  color: var(--accent);
  animation: float 6s ease-in-out infinite;
}

.skills {
  background: rgba(5, 11, 26, 0.92);
  padding: 50px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.skill-card {
  padding: 24px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid rgba(0, 245, 255, 0.08);
  min-height: 170px;
  position: relative;
  transition: transform 0.4s ease, border 0.3s ease, box-shadow 0.3s ease;
  perspective: 800px;
}

.skill-card i {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 16px;
  display: inline-block;
}

.skill-card::after {
  content: attr(data-skill);
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.35);
}

.skill-card:hover {
  transform: translateY(-10px) rotateX(6deg);
  border-color: rgba(0, 245, 255, 0.4);
  box-shadow: 0 25px 40px rgba(0, 245, 255, 0.2);
}

.skill-card h3 {
  margin-bottom: 12px;
}

.skill-card small {
  color: var(--muted);
  display: block;
  margin-top: 10px;
}

.projects {
  background: rgba(2, 7, 18, 0.9);
  padding: 50px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.project-card {
  position: relative;
  padding: 32px;
  min-height: 320px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: radial-gradient(circle at top right, rgba(0, 245, 255, 0.18), rgba(1, 4, 10, 0.9));
  transition: transform 0.5s ease, box-shadow 0.4s ease;
}

.project-card:hover {
  transform: translateY(-18px) scale(1.02);
  box-shadow: 0 35px 60px rgba(0, 0, 0, 0.6), 0 0 50px rgba(0, 245, 255, 0.15);
}

.project-thumb {
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 20px rgba(0, 245, 255, 0.05);
}

.project-thumb img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  filter: saturate(1.15);
}

.project-card.expanded {
  transform: scale(1.03);
  box-shadow: 0 30px 55px rgba(0, 0, 0, 0.55), 0 0 40px rgba(0, 245, 255, 0.12);
}

.project-card .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0, 245, 255, 0.15), transparent);
  mix-blend-mode: screen;
  pointer-events: none;
}

.project-card .tag {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--magenta);
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-card h3 {
  font-size: 1.7rem;
  margin: 12px 0;
}

.project-card p {
  color: var(--muted);
  margin-bottom: 18px;
}

.project-card ul {
  list-style: none;
  color: var(--accent-soft);
}

.project-card li + li {
  margin-top: 6px;
}

.project-modal {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(18px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.project-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.project-modal .modal-content {
  background: rgba(1, 6, 18, 0.95);
  padding: clamp(24px, 4vw, 38px);
  border-radius: 24px;
  width: min(520px, 90vw);
  border: 1px solid rgba(0, 245, 255, 0.2);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-tag {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--magenta);
  font-size: 0.75rem;
}

.modal-title {
  font-size: 2rem;
  margin: 10px 0;
}

.modal-body,
.modal-stack {
  color: var(--muted);
  margin-bottom: 10px;
}

.modal-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(0, 245, 255, 0.3);
  color: var(--text);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  transition: background 0.3s ease, transform 0.3s ease;
}

.modal-link::after {
  content: "\\2197";
  font-size: 0.9rem;
}

.modal-link:hover {
  background: rgba(0, 245, 255, 0.08);
  transform: translateY(-2px);
}

.modal-link.is-hidden {
  display: none;
}

.timeline {
  padding: 0 10px;
}

.timeline-track {
  position: relative;
  padding-left: 80px;
}

.timeline-line {
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), transparent);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.5);
}

.timeline-entry {
  margin-bottom: 40px;
  padding: 18px 24px;
  border-radius: 18px;
  background: rgba(4, 10, 24, 0.85);
  border: 1px solid rgba(0, 245, 255, 0.08);
  position: relative;
}

.timeline-entry::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  top: 22px;
  left: -54px;
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.6);
}

.timeline-entry .year {
  font-size: 0.9rem;
  letter-spacing: 0.4em;
  color: var(--magenta);
}

.contact {
  background: rgba(1, 6, 18, 0.92);
  padding: 50px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
}

.contact-terminal {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 0 30px rgba(0, 245, 255, 0.04);
}

.contact-terminal header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
}

.contact-terminal .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--magenta);
}

.contact-terminal .dot:nth-child(2) {
  background: var(--accent);
}

.contact-terminal .dot:nth-child(3) {
  background: var(--accent-strong);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  font-family: "JetBrains Mono", "Chakra Petch", monospace;
}

.contact-form label {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px;
  color: var(--text);
  font-family: inherit;
  position: relative;
}

.terminal-line {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.terminal-line .cursor {
  display: inline-block;
  width: 8px;
  height: 1.2em;
  background: var(--accent);
  margin-left: 6px;
  animation: blink 1s steps(2) infinite;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(229, 244, 255, 0.4);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 1px solid var(--accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.15);
}

.contact-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 22px;
}

.contact-meta h3 {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.contact-meta a {
  color: var(--accent);
  text-decoration: none;
}

.social-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.solidarity {
  margin-top: -20px;
  background: linear-gradient(120deg, rgba(0, 245, 255, 0.15), rgba(216, 72, 254, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 48px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.solidarity-content h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 18px;
}

.solidarity-content p {
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 22px;
}

.solidarity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

.solidarity-badge {
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 245, 255, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.cyber-footer {
  text-align: center;
  padding: 30px;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.65);
}

.in-view {
  animation: fadeUp 0.9s ease forwards;
}

@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  50% { transform: scale(1); opacity: 0.2; }
  100% { transform: scale(0.8); opacity: 0.6; }
}

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

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 960px) {
  .cyber-nav ul {
    position: absolute;
    top: 80px;
    right: 5vw;
    flex-direction: column;
    background: rgba(1, 6, 18, 0.95);
    padding: 22px;
    border-radius: 22px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .cyber-nav.is-open ul {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle {
    display: flex;
  }

  .cyber-nav {
    position: relative;
  }
}

@media (max-width: 720px) {
  .hero,
  .skills,
  .about,
  .projects,
  .contact,
  .solidarity {
    padding: 32px;
  }

  .timeline-track {
    padding-left: 40px;
  }

  .timeline-entry::before {
    left: -34px;
  }
}

@media (max-width: 520px) {
  .cyber-header {
    flex-direction: column;
    gap: 16px;
  }

  .hero {
    padding: 24px;
  }

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

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

  .hero h1 {
    font-size: 2.2rem;
  }

  .skills,
  .projects,
  .contact,
  .solidarity {
    padding: 28px;
  }

  .project-modal {
    padding: 40px 16px;
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 0.95rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .solidarity-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .solidarity-badge {
    letter-spacing: 0.1em;
  }

  .timeline-track {
    padding-left: 24px;
  }

  .timeline-entry::before {
    left: -24px;
  }

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