/* Home visual system: shared colors, fonts, spacing, and interaction states. */

:root {
  --color-bg: #0a0e1a;
  --color-surface: rgba(17, 24, 39, 0.72);
  --color-surface-strong: rgba(5, 10, 18, 0.82);
  --color-primary: #7c6fdc;
  --color-accent: #1d9bf0;
  --color-text: #e2e8f0;
  --color-text-muted: #94a3b8;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-accent: rgba(29, 155, 240, 0.58);
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.32);
  --shadow-glow: 0 18px 42px rgba(0, 0, 0, 0.38), 0 0 18px rgba(29, 155, 240, 0.10);
  --font-body: "Inter", Arial, sans-serif;
  --font-display: "Space Grotesk", "Inter", Arial, sans-serif;
  --radius-pill: 999px;
  --radius-card: 10px;
  --transition-fast: 0.22s ease;
  --transition-medium: 0.25s ease;
  --content-width: 1180px;
}

/* Base reset: removes default spacing and keeps sizing predictable. */

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

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
}

/* Visible focus: keeps keyboard navigation accessible. */

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
}

/* Particles background: keeps the cyber/tech background behind all content. */

#particles-js {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: auto;
  background:
    linear-gradient(rgba(10, 14, 26, 0.68), rgba(10, 14, 26, 0.86)),
    url("img/DATA_8.jpg") center / cover no-repeat;
}

/* Web-Stat tracking stays installed without showing a visible badge. */

.web-stat-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

/* Page shell: keeps the homepage content centered and readable. */

.page-shell {
  position: relative;
  z-index: 1;
  width: min(var(--content-width), calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 56px 0 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Main navigation: primary links to Projects and Blog. */

.main-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 86px;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  padding: 12px 24px;
  border: 1px solid rgba(124, 111, 220, 0.28);
  border-radius: var(--radius-pill);
  background: rgba(124, 111, 220, 0.78);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  transition:
    transform var(--transition-fast),
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.nav-button:hover {
  transform: translateY(-3px);
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #081018;
}

/* Hero section: contains the main title and professional summary. */

.hero {
  width: 100%;
  text-align: center;
}

.hero-title {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.54);
  animation: heroTitleEnter 0.9s ease both;
}

.hero-intro {
  display: inline-block;
  color: var(--color-accent);
}

.hero-name {
  display: block;
  color: var(--color-primary);
  animation: nameGlow 5.5s ease-in-out infinite;
}

/* Bio card: keeps the professional summary readable and polished. */

.bio-card {
  width: min(960px, calc(100% - 24px));
  margin: 34px auto 0;
  padding: 34px 38px;
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-card);
  background: var(--color-surface-strong);
  box-shadow: var(--shadow-soft);
  color: var(--color-text);
  text-align: left;
  backdrop-filter: blur(3px);
  transition:
    transform var(--transition-medium),
    border-color var(--transition-medium),
    box-shadow var(--transition-medium),
    background-color var(--transition-medium);
}

.bio-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-accent);
  background: rgba(5, 10, 18, 0.86);
  box-shadow: var(--shadow-glow);
}

.bio-card p {
  margin-bottom: 18px;
  color: var(--color-text);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.75;
}

.bio-card p:last-child {
  margin-bottom: 0;
}

/* Personal note: adds a more human explanation of the website purpose. */

.personal-note {
  width: min(860px, calc(100% - 24px));
  margin: 22px auto 0;
  color: var(--color-text-muted);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.7;
  text-align: center;
}

.personal-note p {
  margin: 0;
}

/* Credentials: compact badge cards for certifications and community recognition. */

.credentials-showcase {
  width: min(1040px, calc(100% - 24px));
  margin: 32px auto 0;
}

.credentials-title {
  margin: 0 0 18px;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1.08;
  text-align: center;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.54);
  animation: nameGlow 5.5s ease-in-out infinite;
}

.credentials-title span {
  color: var(--color-primary);
}

.credential-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.credential-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 170px;
  padding: 16px 14px;
  border: 1px solid rgba(192, 132, 252, 0.22);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 0%, rgba(192, 132, 252, 0.18), transparent 52%),
    linear-gradient(180deg, rgba(192, 132, 252, 0.10), rgba(3, 8, 14, 0.18)),
    rgba(3, 8, 14, 0.58);
  color: inherit;
  text-align: center;
  text-decoration: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 0 18px rgba(192, 132, 252, 0.05);
  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast),
    background-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.credential-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(192, 132, 252, 0.58), transparent 18%),
    radial-gradient(circle at top, rgba(192, 132, 252, 0.16), transparent 55%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

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

.credential-card:hover {
  transform: translateY(-2px);
  border-color: rgba(192, 132, 252, 0.50);
  background:
    radial-gradient(circle at 50% 0%, rgba(192, 132, 252, 0.24), transparent 56%),
    linear-gradient(180deg, rgba(192, 132, 252, 0.14), rgba(3, 8, 14, 0.24)),
    rgba(3, 8, 14, 0.70);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 24px rgba(192, 132, 252, 0.10);
}

.credential-card:hover::after {
  opacity: 0.18;
}

.credential-media {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin-bottom: 14px;
  border: 1px solid rgba(124, 111, 220, 0.28);
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 20%, rgba(29, 155, 240, 0.18), transparent 46%),
    linear-gradient(135deg, rgba(124, 111, 220, 0.20), rgba(29, 155, 240, 0.10)),
    rgba(5, 10, 18, 0.46);
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 12px 28px rgba(0, 0, 0, 0.24);
  color: inherit;
  text-decoration: none;
  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.credential-media:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: rgba(29, 155, 240, 0.56);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.045),
    0 14px 30px rgba(29, 155, 240, 0.12);
}

.credential-media img {
  position: absolute;
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.32));
}

.credential-media-light {
  border-color: rgba(226, 232, 240, 0.82);
  background:
    linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
  box-shadow:
    inset 0 0 0 1px rgba(124, 111, 220, 0.12),
    inset 0 -12px 22px rgba(124, 111, 220, 0.05),
    0 12px 28px rgba(0, 0, 0, 0.24);
}

.credential-media-light img {
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.18));
}

.credential-media-light:hover {
  border-color: rgba(29, 155, 240, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(29, 155, 240, 0.22),
    inset 0 -12px 22px rgba(124, 111, 220, 0.06),
    0 16px 34px rgba(29, 155, 240, 0.14);
}

.credential-mark {
  color: #b7f7ff;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.credential-card h2 {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.18;
}

/* Resume CTA: note, arrow, and button. */

.resume-link-wrapper {
  margin-top: 24px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.resume-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: 1.35rem;
  line-height: 1;
  margin-bottom: -2px;
  opacity: 0.95;
  animation: resumeArrowFloat 1.8s ease-in-out infinite;
}
.resume-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.28em;
  margin: 0;
  color: #b8c4d6;
  font-size: 0.95rem;
  text-align: center;
  perspective: 640px;
}

.resume-note-word {
  display: inline-block;
  transform-origin: left bottom;
  animation: resumeNoteDomino 0.62s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.resume-note-word:nth-child(2) {
  animation-delay: 0.06s;
}

.resume-note-word:nth-child(3) {
  animation-delay: 0.12s;
}

.resume-note-word:nth-child(4) {
  animation-delay: 0.18s;
}

.resume-note-word:nth-child(5) {
  animation-delay: 0.24s;
}

.resume-note-word:nth-child(6) {
  animation-delay: 0.30s;
}

.resume-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid rgba(29, 155, 240, 0.44);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(29, 155, 240, 0.14), rgba(124, 111, 220, 0.16)),
    rgba(5, 10, 18, 0.58);
  color: #b7f7ff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 18px rgba(29, 155, 240, 0.08);
  text-decoration: none;
  font-weight: 700;
  transition:
    transform 0.22s ease,
    background-color 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease;
}

.resume-link:hover {
  transform: translateY(-2px);
  background:
    linear-gradient(135deg, rgba(29, 155, 240, 0.22), rgba(124, 111, 220, 0.24)),
    rgba(5, 10, 18, 0.68);
  border-color: rgba(29, 155, 240, 0.78);
  color: #ffffff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.055),
    0 0 24px rgba(29, 155, 240, 0.14);
}

/* Social links: external GitHub and LinkedIn icons. */

.social-footer {
  margin-top: 34px;
  padding-bottom: 20px;
  display: flex;
  justify-content: center;
  gap: 18px;
}

.social-link {
  display: inline-flex;
  border-radius: 50%;
}

.social-icon {
  width: 40px;
  height: 40px;
  filter: saturate(1.15) brightness(1.08);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
  transition:
    transform var(--transition-medium),
    box-shadow var(--transition-medium),
    filter var(--transition-medium);
}

.social-link:hover .social-icon {
  transform: translateY(-3px) scale(1.08);
  filter: saturate(1.3) brightness(1.14);
  box-shadow: 0 12px 28px rgba(29, 155, 240, 0.18);
}

/* Hero motion: subtle entrance and soft glow. */

@keyframes heroTitleEnter {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes nameGlow {
  0%,
  100% {
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.54);
  }
  50% {
    text-shadow:
      0 8px 28px rgba(0, 0, 0, 0.54),
      0 0 14px rgba(124, 111, 220, 0.18);
  }
}

@keyframes resumeArrowFloat {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.75;
  }
  50% {
    transform: translateY(4px);
    opacity: 1;
  }
}

@keyframes resumeNoteDomino {
  0% {
    opacity: 0;
    transform: rotateX(72deg) translateY(-8px);
    filter: blur(2px);
  }
  55% {
    opacity: 1;
    transform: rotateX(-10deg) translateY(1px);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: rotateX(0) translateY(0);
    filter: blur(0);
  }
}

/* Responsive layout: keeps the homepage comfortable on tablets and phones. */

@media (max-width: 768px) {
  .page-shell {
    width: min(var(--content-width), calc(100% - 24px));
    padding-top: 32px;
  }

  .main-nav {
    margin-bottom: 58px;
    gap: 10px;
  }

  .nav-button {
    min-width: 96px;
    padding: 11px 18px;
    font-size: 0.92rem;
  }

  .hero-title {
    font-size: clamp(2.3rem, 13vw, 4rem);
    line-height: 1.02;
    padding: 0;
  }

  .bio-card {
    margin-top: 26px;
    padding: 22px;
  }

  .bio-card p {
    font-size: 0.96rem;
    line-height: 1.62;
  }

  .personal-note {
    width: 100%;
    margin-top: 20px;
    font-size: 0.94rem;
    line-height: 1.58;
  }

  .credentials-showcase {
    width: 100%;
    margin-top: 24px;
  }

  .credentials-title {
    margin-bottom: 16px;
    font-size: clamp(1.4rem, 8vw, 2rem);
  }

  .credential-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .resume-link-wrapper {
    margin-top: 22px;
    gap: 7px;
  }

  .resume-note {
    font-size: 0.92rem;
  }

  .resume-link {
    padding: 11px 16px;
    font-size: 0.95rem;
  }

  .social-footer {
    margin-top: 26px;
  }
}

@media (max-width: 420px) {
  .main-nav {
    margin-bottom: 48px;
  }

  .hero-title {
    font-size: clamp(2rem, 15vw, 3.2rem);
  }

  .bio-card {
    width: 100%;
    padding: 20px;
  }

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

  .credential-card {
    min-height: auto;
  }

  .resume-arrow {
    font-size: 1.05rem;
  }

  .resume-note {
    font-size: 0.9rem;
  }
}

/* Reduced motion: respects users who prefer less animation. */

@media (prefers-reduced-motion: reduce) {
  .hero-title,
  .hero-name,
  .bio-card,
  .credential-card,
  .nav-button,
  .social-icon,
  .resume-arrow,
  .resume-note-word {
    animation: none;
    transition: none;
  }
}
