/* =========================================================
   CSS Custom Properties (theme)
   ========================================================= */
:root {
  --color-bg: #0a0e1a;
  --color-bg-alt: #0d1220;
  --color-surface: #121826;
  --color-surface-hover: #161f33;
  --color-border: #232c42;
  --color-text: #e6ebf5;
  --color-text-muted: #94a1b8;
  --color-accent: #3ea6ff;
  --color-accent-2: #22d3ee;
  --gradient-accent: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --container-width: 1100px;
  --radius: 14px;
  --transition: 0.25s ease;
  --banner-height: 38px;
  --navbar-height: 72px;
}

/* =========================================================
   Reset & Base
   ========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--banner-height) + var(--navbar-height) + 8px);
}

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

img {
  max-width: 100%;
  display: block;
}

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

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  position: relative;
  overflow: hidden;
  padding: 100px 0;
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section > .container {
  position: relative;
  z-index: 1;
}

/* Subtle per-section ambient background — same visual language as the hero
   (soft color blobs + faint grid) but static and low-opacity so it never
   competes with card/text content. Color shifts gently section to section. */
.section::before,
.section::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.section::after {
  background-image:
    linear-gradient(rgba(148, 161, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 161, 184, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

#about::before {
  background: radial-gradient(circle at 92% 8%, rgba(62, 166, 255, 0.12), transparent 45%);
}

#skills::before {
  background:
    radial-gradient(circle at 6% 92%, rgba(34, 211, 238, 0.1), transparent 45%),
    radial-gradient(circle at 96% 12%, rgba(124, 58, 237, 0.08), transparent 40%);
}

#experience::before {
  background: radial-gradient(circle at 90% 88%, rgba(124, 58, 237, 0.12), transparent 45%);
}

#projects::before {
  background:
    radial-gradient(circle at 8% 15%, rgba(62, 166, 255, 0.1), transparent 45%),
    radial-gradient(circle at 92% 90%, rgba(34, 211, 238, 0.08), transparent 40%);
}

#contact::before {
  background: radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.1), transparent 50%);
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
  position: relative;
}

.section__title::after {
  content: '';
  display: block;
  width: 56px;
  height: 4px;
  margin: 16px auto 0;
  border-radius: 4px;
  background: var(--gradient-accent);
}

.section__subtitle {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 48px;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.btn--primary {
  background: var(--gradient-accent);
  color: #05070d;
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(62, 166, 255, 0.35);
}

.btn--outline {
  border-color: var(--color-border);
  color: var(--color-text);
  background: transparent;
}

.btn--resume {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn--outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

.btn--block {
  width: 100%;
  border: none;
  font-family: inherit;
}

/* =========================================================
   Navbar
   ========================================================= */
.top-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  height: var(--banner-height);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #7c3aed, #3ea6ff, #22d3ee);
  background-size: 200% 100%;
  animation: bannerShift 8s ease infinite;
}

@keyframes bannerShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.top-banner p {
  color: #05070d;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  padding: 0 16px;
}

.top-banner a {
  color: #05070d;
  text-decoration: underline;
  font-weight: 700;
}

.navbar {
  position: fixed;
  top: var(--banner-height);
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 14, 26, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--color-border);
  background: rgba(10, 14, 26, 0.92);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.navbar__logo {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.5px;
}

.navbar__logo .dot {
  color: var(--color-accent-2);
}

.navbar__nav {
  display: flex;
  gap: 36px;
}

.nav-link {
  position: relative;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  transition: color var(--transition);
  padding: 4px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.navbar__toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.navbar__toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--banner-height) + var(--navbar-height));
  background:
    radial-gradient(circle at 15% 20%, rgba(62, 166, 255, 0.14), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(34, 211, 238, 0.12), transparent 45%);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 40px;
}

.hero__eyebrow {
  color: var(--color-accent-2);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.hero__name {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero__role {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 600;
  margin-bottom: 20px;
  min-height: 1.6em;
}

.typed {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  border-right: 2px solid var(--color-accent-2);
  padding-right: 4px;
}

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

.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.voice-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(62, 166, 255, 0.1);
  border: 1px solid var(--color-accent);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 10px 20px 10px 16px;
  cursor: pointer;
  margin-bottom: 28px;
  transition: background var(--transition), transform var(--transition);
}

.voice-cta:hover {
  background: rgba(62, 166, 255, 0.2);
  transform: translateY(-2px);
}

.voice-cta__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent-2);
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.6);
  animation: voiceCtaPulse 1.8s ease-out infinite;
  flex-shrink: 0;
}

@keyframes voiceCtaPulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.hero__socials {
  display: flex;
  gap: 16px;
}

.hero__socials a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: all var(--transition);
}

.hero__socials a:hover {
  color: #05070d;
  background: var(--gradient-accent);
  border-color: transparent;
  transform: translateY(-3px);
}

.hero__photo {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero__photo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(380px, 80vw);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(62, 166, 255, 0.35), rgba(124, 58, 237, 0.15) 55%, transparent 75%);
  filter: blur(20px);
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

.hero__photo-ring {
  position: relative;
  width: min(320px, 70vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  padding: 8px;
  background: var(--gradient-accent);
  animation: floatY 5s ease-in-out infinite;
}

.hero__photo-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--color-bg);
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* =========================================================
   Animated hero background (blobs + grid)
   ========================================================= */
.hero__inner {
  position: relative;
  z-index: 2;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
}

.blob--1 {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -80px;
  background: radial-gradient(circle, #3ea6ff, transparent 70%);
  animation: blobDrift1 22s ease-in-out infinite;
}

.blob--2 {
  width: 380px;
  height: 380px;
  bottom: -140px;
  right: -100px;
  background: radial-gradient(circle, #22d3ee, transparent 70%);
  animation: blobDrift2 26s ease-in-out infinite;
}

.blob--3 {
  width: 300px;
  height: 300px;
  top: 40%;
  left: 55%;
  background: radial-gradient(circle, #7c3aed, transparent 70%);
  animation: blobDrift3 30s ease-in-out infinite;
}

@keyframes blobDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.15); }
}

@keyframes blobDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, -30px) scale(1.1); }
}

@keyframes blobDrift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 50px) scale(1.2); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 161, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 161, 184, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

@media (prefers-reduced-motion: reduce) {
  .blob, .hero__photo-glow, .hero__photo-ring, .top-banner {
    animation: none !important;
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--color-border);
  border-radius: 20px;
}

.scroll-indicator span {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent-2);
  animation: scrollDot 1.6s ease infinite;
}

@keyframes scrollDot {
  0% { opacity: 1; top: 8px; }
  70% { opacity: 0; top: 22px; }
  100% { opacity: 0; top: 8px; }
}

/* =========================================================
   About
   ========================================================= */
.about__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}

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

.about__text strong {
  color: var(--color-text);
}

.about__facts {
  display: flex;
  gap: 32px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.fact {
  display: flex;
  flex-direction: column;
}

.fact__num {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.fact__label {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.about__education h3 {
  margin-bottom: 24px;
  font-size: 1.2rem;
}

/* =========================================================
   Timeline (Education + Experience)
   ========================================================= */
.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  padding-left: 34px;
  margin-bottom: 32px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item__dot {
  position: absolute;
  left: 0;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 3px solid var(--color-accent);
}

.timeline-item__content h4 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.timeline-item__meta {
  color: var(--color-accent-2);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.timeline-item__desc {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* =========================================================
   Skills
   ========================================================= */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.skill-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.skill-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-accent);
  background: var(--color-surface-hover);
}

.skill-card__icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
}

.skill-card h3 {
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.tag-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.tag-list li::before {
  content: '▹ ';
  color: var(--color-accent-2);
}

.tag-list--pill {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-list--pill li {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.78rem;
}

.tag-list--pill li::before {
  content: '';
}

/* =========================================================
   Projects
   ========================================================= */
.projects__group-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-accent-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 48px 0 20px;
}

.projects__group-heading:first-of-type {
  margin-top: 0;
}

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

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-accent-2);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

.project-card__icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
}

.project-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.project-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.project-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--color-accent-2);
  font-weight: 600;
  font-size: 0.9rem;
}

.project-link:hover {
  text-decoration: underline;
}

/* =========================================================
   Contact
   ========================================================= */
.contact__grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact__item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--color-text-muted);
  font-size: 0.98rem;
}

.contact__item a:hover {
  color: var(--color-accent-2);
}

.contact__icon {
  font-size: 1.2rem;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-error {
  color: #ff6b6b;
  font-size: 0.8rem;
  min-height: 1em;
}

.form-note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-accent-2);
  min-height: 1em;
}

.form-note--error {
  color: #ff6b6b;
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 28px 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.footer__top {
  color: var(--color-accent-2);
  font-weight: 600;
}

/* =========================================================
   Scroll-in Animations
   ========================================================= */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__summary {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__cta,
  .hero__socials {
    justify-content: center;
  }

  .hero__photo {
    order: -1;
  }

  .about__grid,
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .about__facts {
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .navbar__nav {
    position: fixed;
    top: calc(var(--banner-height) + var(--navbar-height));
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
    border-bottom: 1px solid var(--color-border);
  }

  .navbar__nav.open {
    max-height: 400px;
  }

  .navbar__nav .nav-link {
    width: 100%;
    text-align: center;
    padding: 16px 0;
  }

  .navbar__toggle {
    display: flex;
  }

  .navbar__toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .navbar__toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .navbar__toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .section {
    padding: 72px 0;
  }
}

@media (max-width: 480px) {
  .hero__cta {
    flex-direction: column;
    width: 100%;
  }

  .hero__cta .btn {
    text-align: center;
  }

  .contact__form {
    padding: 22px;
  }
}
