/* ===== DESIGN TOKENS ===== */
:root {
  --void:       #0C0F1A;
  --signal:     #6366F1;
  --pulse:      #A5B4FC;
  --surface:    #161B2E;
  --light:      #E8EAFF;
  --muted:      rgba(232, 234, 255, 0.52);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --nav-h:    4rem;
  --max-w:    1100px;
  --radius:   0.75rem;
  --ease:     0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--void);
  color: var(--light);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

strong {
  font-weight: 600;
  color: var(--light);
}

/* ===== NAV ===== */
.l-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: transparent;
  transition: background var(--ease), border-color var(--ease);
  border-bottom: 1px solid transparent;
}

.l-header.scrolled {
  background: rgba(12, 15, 26, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(99, 102, 241, 0.15);
}

.nav {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--signal);
  letter-spacing: -0.02em;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--ease);
  position: relative;
}

.nav__link:hover,
.nav__link.active {
  color: var(--light);
}

.nav__link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--signal);
  border-radius: 2px;
}

.nav__link--accent {
  color: var(--pulse);
  font-weight: 600;
}

.nav__link--accent:hover {
  color: var(--light);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--light);
  border-radius: 2px;
  transition: var(--ease);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  padding: calc(var(--nav-h) + 2rem) 1.5rem 5rem;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 5rem;
  align-items: center;
}

.hero__eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--signal);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--light);
  margin-bottom: 1.25rem;
}

.hero__tagline {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 38ch;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero__social {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.hero__social a {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--muted);
  transition: all var(--ease);
}

.hero__social a:hover {
  border-color: var(--signal);
  color: var(--signal);
  background: rgba(99, 102, 241, 0.1);
}

.hero__ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__photo {
  width: 100%;
  aspect-ratio: 5 / 6;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.22);
  box-shadow: 0 0 90px rgba(99, 102, 241, 0.1);
}

.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.7rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn--primary {
  background: var(--signal);
  color: #fff;
  border-color: var(--signal);
}

.btn--primary:hover {
  background: var(--pulse);
  border-color: var(--pulse);
  color: var(--void);
}

.btn--ghost {
  border-color: rgba(99, 102, 241, 0.38);
  color: var(--light);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--signal);
  color: var(--signal);
  background: rgba(99, 102, 241, 0.08);
}

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

.section--dark {
  background: var(--surface);
}

.section__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--light);
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 2.25rem;
  height: 3px;
  background: var(--signal);
  border-radius: 2px;
}

/* ===== PROJECTS ===== */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(99, 102, 241, 0.12);
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.project-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.project-card__img {
  width: 100%;
  height: 100%;
}

.project-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.project-card:hover .project-card__img img {
  transform: scale(1.07);
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 15, 26, 0.94);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-card__overlay {
  opacity: 1;
}

.project-card__tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--signal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.project-card__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--light);
  margin-bottom: 0.45rem;
  line-height: 1.3;
}

.project-card__desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0.9rem;
}

.project-card__link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--pulse);
  transition: color var(--ease);
  align-self: flex-start;
}

.project-card:hover .project-card__link {
  color: var(--light);
}

/* ===== ACHIEVEMENTS ===== */
.achievements__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.achievement-card {
  display: block;
  background: rgba(12, 15, 26, 0.55);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--ease);
}

.achievement-card:hover {
  border-color: var(--signal);
  background: rgba(99, 102, 241, 0.07);
  transform: translateY(-3px);
}

.achievement-card__stat {
  display: block;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--signal);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.6rem;
}

.achievement-card__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--light);
  margin-bottom: 0.45rem;
}

.achievement-card__desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ===== ABOUT ===== */
.about__layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 4.5rem;
  align-items: start;
}

.about__photo {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.about__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.28rem 0.7rem;
  border-radius: 100px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: var(--pulse);
  letter-spacing: 0.02em;
}

.about__heading {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--light);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.about__right p {
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.about__list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.about__list li {
  font-size: 0.9rem;
  color: var(--muted);
  padding-left: 1.4rem;
  position: relative;
  line-height: 1.55;
}

.about__list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--signal);
}

.about__list a {
  color: var(--pulse);
  border-bottom: 1px solid rgba(165, 180, 252, 0.3);
  transition: color var(--ease), border-color var(--ease);
}

.about__list a:hover {
  color: var(--light);
  border-color: var(--light);
}

/* ===== BLOG ===== */
.blog__list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.blog-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  background: rgba(12, 15, 26, 0.55);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--ease);
}

.blog-card:hover {
  border-color: var(--signal);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.blog-card__img {
  overflow: hidden;
  height: 100%;
  min-height: 150px;
}

.blog-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.blog-card:hover .blog-card__img img {
  transform: scale(1.06);
}

.blog-card__img--placeholder {
  background: rgba(99, 102, 241, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card__img--placeholder span {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--signal);
  opacity: 0.55;
}

.blog-card__body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.blog-card__tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--signal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.blog-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--light);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.blog-card__desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ===== CONTACT ===== */
.contact__inner {
  text-align: center;
}

.contact__desc {
  font-size: 1rem;
  color: var(--muted);
  max-width: 44ch;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.contact__links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.contact__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.7rem 1.5rem;
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 0.5rem;
  color: var(--light);
  transition: all var(--ease);
}

.contact__link i {
  font-size: 1.1rem;
}

.contact__link:hover {
  border-color: var(--signal);
  color: var(--signal);
  background: rgba(99, 102, 241, 0.08);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--surface);
  border-top: 1px solid rgba(99, 102, 241, 0.1);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero__content {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero__photo {
    width: 220px;
    margin: 0 auto;
    aspect-ratio: 1;
  }

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

  .hero__social {
    justify-content: center;
  }

  .hero__ctas {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav__menu {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(12, 15, 26, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 2rem 1.5rem;
    transform: translateY(-110%);
    transition: transform 0.3s ease;
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
  }

  .nav__menu.show {
    transform: translateY(0);
  }

  .nav__list {
    flex-direction: column;
    gap: 1.25rem;
    align-items: flex-start;
  }

  .nav__toggle {
    display: flex;
  }

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

  .about__layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about__photo {
    width: 180px;
    margin: 0 auto;
  }

  .about__chips {
    justify-content: center;
  }

  .about__heading {
    text-align: center;
  }

  .blog-card {
    grid-template-columns: 1fr;
  }

  .blog-card__img {
    min-height: 160px;
    height: 160px;
  }
}

@media (max-width: 480px) {
  .projects__grid {
    grid-template-columns: 1fr;
  }

  .hero__photo {
    width: 180px;
  }

  .section {
    padding: 4rem 0;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  #hero-canvas {
    display: none;
  }
}
