/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0f;
  --bg-panel: rgba(14, 14, 22, 0.85);
  --bg-card: rgba(18, 18, 30, 0.7);
  --border: rgba(0, 255, 210, 0.12);
  --border-hover: rgba(0, 255, 210, 0.35);
  --cyan: #00ffd2;
  --cyan-dim: rgba(0, 255, 210, 0.15);
  --magenta: #ff2d7b;
  --lime: #b4ff39;
  --text: #e0e6ed;
  --text-dim: #7a8494;
  --text-bright: #ffffff;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ===== CANVAS BACKGROUND ===== */
#grid-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* ===== SCANLINE OVERLAY ===== */
.scanline-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* ===== SECTION BASE ===== */
.section {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 0 auto;
  padding: 100px 24px;
}

.section--compact {
  padding: 60px 24px;
}

.section--contact {
  max-width: 100%;
  padding: 80px 24px;
  background: linear-gradient(180deg, transparent, rgba(0, 255, 210, 0.03));
  border-top: 1px solid var(--border);
}

.section__header {
  margin-bottom: 48px;
}

.section__label {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.02em;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 24px 40px;
}

.hero__inner {
  max-width: 800px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--cyan);
  text-transform: uppercase;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  margin-bottom: 32px;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--cyan); }
  50% { opacity: 0.6; box-shadow: 0 0 8px 4px rgba(0, 255, 210, 0.3); }
}

.hero__name {
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text-bright);
  margin-bottom: 16px;
}

/* Glitch effect */
.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.glitch::before {
  color: var(--cyan);
  clip-path: inset(0 0 65% 0);
  animation: glitch-top 4s steps(1) infinite;
}

.glitch::after {
  color: var(--magenta);
  clip-path: inset(65% 0 0 0);
  animation: glitch-bottom 4s steps(1) infinite;
}

@keyframes glitch-top {
  0%, 92%, 100% { transform: translate(0); }
  93% { transform: translate(-3px, -1px); }
  94% { transform: translate(3px, 1px); }
  95% { transform: translate(0); }
}

@keyframes glitch-bottom {
  0%, 94%, 100% { transform: translate(0); }
  95% { transform: translate(3px, 1px); }
  96% { transform: translate(-2px, -1px); }
  97% { transform: translate(0); }
}

.hero__role {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 16px;
}

.hero__tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--cyan);
  background: var(--cyan-dim);
}

.hero__summary {
  font-size: 0.95rem;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  animation: float-hint 3s ease-in-out infinite;
}

@keyframes float-hint {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 12px 24px;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: all 0.25s var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.btn--primary {
  background: var(--cyan);
  color: var(--bg);
  border-color: var(--cyan);
  font-weight: 700;
}

.btn--primary:hover {
  background: #33ffe0;
  box-shadow: 0 0 24px rgba(0, 255, 210, 0.3), inset 0 0 12px rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn--ghost {
  background: var(--bg-panel);
  color: var(--text);
  backdrop-filter: blur(12px);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 255, 210, 0.06);
  transform: translateY(-2px);
}

/* ===== FOCUS GRID ===== */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.focus-card {
  padding: 32px 28px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  transition: all 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.focus-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}

.focus-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 255, 210, 0.06);
}

.focus-card:hover::before {
  opacity: 1;
}

.focus-card__icon {
  color: var(--cyan);
  margin-bottom: 20px;
}

.focus-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 10px;
}

.focus-card__text {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ===== SKILLS MATRIX ===== */
.skills-matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.skill-group {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  transition: border-color 0.3s;
}

.skill-group:hover {
  border-color: var(--border-hover);
}

.skill-group__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 16px;
  letter-spacing: 0.01em;
}

.skill-group__marker {
  width: 3px;
  height: 18px;
  background: var(--cyan);
  border-radius: 2px;
  flex-shrink: 0;
}

.skill-group__items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.25s var(--ease-out);
  cursor: default;
}

.skill-tag:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-dim);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 210, 0.1);
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline__item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 24px;
  padding-bottom: 40px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 6px;
}

.timeline__marker-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--text-dim);
  background: var(--bg);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.timeline__marker-dot--active {
  border-color: var(--cyan);
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 255, 210, 0.4);
}

.timeline__line {
  flex: 1;
  width: 1px;
  background: var(--border);
  margin-top: 8px;
}

.timeline__content {
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
}

.timeline__item--primary .timeline__content {
  border-color: rgba(0, 255, 210, 0.2);
}

.timeline__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.timeline__date {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--cyan);
  letter-spacing: 0.05em;
}

.timeline__location {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.timeline__role {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 4px;
}

.timeline__company {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.timeline__summary {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.65;
}

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

.timeline__details li {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
  padding-left: 16px;
  position: relative;
}

.timeline__details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--cyan);
  transform: rotate(45deg);
}

/* ===== CERTIFICATIONS ===== */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.cert-card {
  display: flex;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  transition: all 0.3s var(--ease-out);
}

.cert-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 255, 210, 0.06);
}

.cert-card__badge {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--cyan-dim);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cyan);
  flex-shrink: 0;
}

.cert-card__body {
  min-width: 0;
}

.cert-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 2px;
}

.cert-card__issuer {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.cert-card__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cert-card__validity,
.cert-card__id {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

/* ===== EDUCATION ===== */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.edu-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}

.edu-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 6px;
}

.edu-card__detail {
  font-size: 0.88rem;
  color: var(--text-dim);
}

/* ===== CONTACT ===== */
.contact-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact__title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 28px;
}

.contact__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* ===== FOOTER ===== */
.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px;
  font-size: 0.75rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

/* ===== SCROLL REVEAL ===== */
.reveal,
.reveal-up {
  opacity: 0;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal {
  transform: translateY(12px);
}

.reveal-up {
  transform: translateY(28px);
}

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

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal-up {
    opacity: 1;
    transform: none;
  }

  .glitch::before,
  .glitch::after {
    display: none;
  }

  .scanline-overlay {
    display: none;
  }

  #grid-canvas {
    display: none;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .section {
    padding: 64px 20px;
  }

  .section--compact {
    padding: 40px 20px;
  }

  .focus-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .skills-matrix {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

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

  .timeline__item {
    grid-template-columns: 28px 1fr;
    gap: 16px;
  }

  .timeline__content {
    padding: 20px;
  }

  .hero {
    padding: 60px 20px 40px;
  }

  .hero__name {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .contact__actions {
    flex-direction: column;
    align-items: center;
  }

  .hero__scroll-hint {
    display: none;
  }

  .cert-card {
    gap: 14px;
    padding: 18px;
  }

  .cert-card__title {
    font-size: 0.88rem;
  }
}

@media (max-width: 480px) {
  .hero__summary {
    font-size: 0.85rem;
  }

  .timeline__role {
    font-size: 1rem;
  }

  .timeline__details li {
    font-size: 0.82rem;
  }

  .focus-card {
    padding: 24px 20px;
  }

  .skill-group {
    padding: 20px;
  }
}
