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

:root {
  --bg-primary:   #050a0e;
  --bg-secondary: #0a1628;
  --bg-card:      #0d1f2d;
  --cyan:         #00d4ff;
  --cyan-dim:     #00a8cc;
  --cyan-glow:    rgba(0, 212, 255, 0.15);
  --cyan-glow-strong: rgba(0, 212, 255, 0.35);
  --text-primary: #e0f7ff;
  --text-muted:   #5a8a99;
  --text-mid:     #8ab8c8;
  --border:       rgba(0, 212, 255, 0.2);
  --border-hover: rgba(0, 212, 255, 0.6);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  line-height: 1.7;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--cyan-dim); border-radius: 3px; }

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5, 10, 14, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: var(--cyan);
  text-decoration: none;
  letter-spacing: 0.05em;
}
.nav-logo span { color: var(--text-muted); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-mid);
  text-decoration: none;
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--cyan);
  transition: width 0.3s;
}
.nav-links a:hover { color: var(--cyan); }
.nav-links a:hover::after { width: 100%; }

/* ─── LANGUAGE SWITCH ─── */
.nav-links a.lang-switch {
  color: var(--cyan);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.5rem;
}
.nav-links a.lang-switch::after { display: none; }
.nav-links a.lang-switch:hover { border-color: var(--border-hover); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: 0;
}
.hamburger span {
  width: 24px; height: 2px;
  background: var(--cyan);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ─── HERO ─── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#neural-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0.6;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 900px;
}

.hero-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--cyan);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: 2px;
  margin-bottom: 2rem;
  animation: fadeInDown 0.8s ease both;
}

.hero-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2.2rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease 0.2s both;
  position: relative;
}

.glitch {
  position: relative;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: var(--bg-primary);
}
.glitch::before {
  left: 2px;
  text-shadow: -2px 0 var(--cyan);
  clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
  animation: glitch1 4s infinite linear;
}
.glitch::after {
  left: -2px;
  text-shadow: 2px 0 #ff0080;
  clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
  animation: glitch2 4s infinite linear;
}

@keyframes glitch1 {
  0%, 92%, 100% { clip-path: polygon(0 0, 0 0, 0 0, 0 0); transform: none; }
  93% { clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%); transform: translate(-2px); }
  94% { clip-path: polygon(0 55%, 100% 55%, 100% 65%, 0 65%); transform: translate(2px); }
  96% { clip-path: polygon(0 5%, 100% 5%, 100% 15%, 0 15%); transform: translate(-1px); }
}
@keyframes glitch2 {
  0%, 92%, 100% { clip-path: polygon(0 0, 0 0, 0 0, 0 0); transform: none; }
  93% { clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%); transform: translate(2px); }
  95% { clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%); transform: translate(-2px); }
}

.hero-typewriter {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--cyan);
  min-height: 2em;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease 0.4s both;
}
.cursor {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--cyan);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-desc {
  color: var(--text-mid);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto 2.5rem;
  animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.8s both;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  background: transparent;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
  z-index: -1;
}
.btn-primary:hover {
  color: var(--bg-primary);
  box-shadow: 0 0 20px var(--cyan-glow-strong);
}
.btn-primary:hover::before { transform: scaleX(1); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  color: var(--text-mid);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  border-radius: 2px;
  transition: color 0.3s;
}
.btn-ghost:hover { color: var(--cyan); }

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  animation: fadeIn 1s 1.5s both;
}
.scroll-arrow {
  width: 20px; height: 20px;
  border-right: 1px solid var(--cyan);
  border-bottom: 1px solid var(--cyan);
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(6px); }
}

/* ─── SECTIONS ─── */
section { padding: 6rem 0; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}
.section-num {
  font-family: 'JetBrains Mono', monospace;
  color: var(--cyan);
  font-size: 0.9rem;
  opacity: 0.7;
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── ABOUT ─── */
#about { background: var(--bg-secondary); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.terminal {
  background: #020c14;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
}
.terminal-bar {
  background: #0a1628;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red   { background: #ff5f57; }
.dot-yellow{ background: #ffbd2e; }
.dot-green { background: #28c940; }
.terminal-filename {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.terminal-body {
  padding: 1.5rem;
  font-size: 0.82rem;
  line-height: 1.9;
}
.t-comment  { color: #3a6a7a; }
.t-key      { color: var(--cyan); }
.t-string   { color: #a8d8a8; }
.t-punct    { color: var(--text-muted); }
.t-value    { color: #f0c070; }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s;
  cursor: default;
}
.stat-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 20px var(--cyan-glow);
  transform: translateY(-3px);
}
.stat-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--cyan);
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ─── SKILLS ─── */
.skills-categories {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.skill-category-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--cyan);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.skill-category-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-mid);
  transition: all 0.25s;
  cursor: default;
}
.skill-tag:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-glow);
  box-shadow: 0 0 12px var(--cyan-glow);
  transform: translateY(-2px);
}
.skill-tag .dot-skill {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.7;
}

/* ─── EXPERIENCE ─── */
#experience { background: var(--bg-secondary); }

.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--cyan), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s, transform 0.5s;
}
.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -2.4rem;
  top: 0.35rem;
  width: 10px; height: 10px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan);
}
.timeline-dot.current {
  background: var(--cyan);
  box-shadow: 0 0 16px var(--cyan), 0 0 30px var(--cyan-glow-strong);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 10px var(--cyan); }
  50% { box-shadow: 0 0 20px var(--cyan), 0 0 40px var(--cyan-glow-strong); }
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.timeline-company {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.timeline-period {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.2rem 0.7rem;
  border-radius: 2px;
  white-space: nowrap;
}
.timeline-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--cyan);
  margin-bottom: 0.8rem;
}
.timeline-desc {
  color: var(--text-mid);
  font-size: 0.9rem;
  line-height: 1.7;
}
.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}
.timeline-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
}

/* ─── CERTIFICATIONS & EDUCATION ─── */
.cert-edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.card-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--cyan);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s;
  opacity: 0;
  transform: translateY(20px);
}
.card.visible {
  opacity: 1;
  transform: translateY(0);
}
.card:last-child { margin-bottom: 0; }
.card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 20px var(--cyan-glow);
}
.card-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}
.card-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ─── CONTACT ─── */
#contact { background: var(--bg-secondary); }

.contact-wrapper {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.contact-headline {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.contact-headline span { color: var(--cyan); }
.contact-sub {
  color: var(--text-mid);
  margin-bottom: 2.5rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.contact-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-mid);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  transition: all 0.3s;
  min-width: 130px;
}
.contact-link:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 20px var(--cyan-glow);
  transform: translateY(-4px);
}
.contact-link svg {
  width: 24px; height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}
footer span { color: var(--cyan); }

/* ─── REVEAL ANIMATION ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── KEYFRAMES ─── */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  nav { padding: 1rem; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    padding: 1.5rem;
    background: rgba(5, 10, 14, 0.97);
    border-top: 1px solid var(--border);
    gap: 1.5rem;
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }

  .about-grid    { grid-template-columns: 1fr; }
  .stats-grid    { grid-template-columns: 1fr 1fr; }
  .cert-edu-grid { grid-template-columns: 1fr; }
  .hero-btns     { flex-direction: column; align-items: center; }
  section        { padding: 4rem 0; }
  .contact-links { gap: 1rem; }
  .contact-link  { padding: 1.2rem 1.5rem; min-width: 110px; }
}

@media (max-width: 480px) {
  .stats-grid  { grid-template-columns: 1fr; }
  .timeline    { padding-left: 1.5rem; }
  .timeline-dot { left: -1.9rem; }
}
