/* ===== Variables ===== */
:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a26;
  --border: #1e1e2e;
  --text: #e4e4e7;
  --text-muted: #71717a;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --red: #ef4444;
  --gradient: linear-gradient(135deg, var(--blue), var(--purple), var(--red));
  --radius: 12px;
  --radius-lg: 20px;
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --header-h: 72px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Background Glows ===== */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.bg-glow--blue {
  width: 500px;
  height: 500px;
  background: var(--blue);
  top: -100px;
  right: -100px;
}

.bg-glow--purple {
  width: 400px;
  height: 400px;
  background: var(--purple);
  bottom: 20%;
  left: -150px;
}

.bg-glow--red {
  width: 300px;
  height: 300px;
  background: var(--red);
  bottom: -50px;
  right: 20%;
  opacity: 0.1;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.header.scrolled {
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav__dot {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}

.nav__link:hover,
.nav__link.active {
  color: var(--text);
}

.nav__link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 1px;
}

.nav__link--cta {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  transition: border-color var(--transition), background var(--transition);
}

.nav__link--cta:hover {
  border-color: var(--purple);
  background: rgba(139, 92, 246, 0.08);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.nav__toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  min-height: 100vh;
  padding-top: var(--header-h);
}

.hero__greeting {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.hero__title {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero__desc {
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 2rem;
  font-size: 1rem;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--gradient);
  color: #fff;
}

.btn--primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.25);
}

.btn--outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}

.btn--outline:hover {
  border-color: var(--purple);
  background: rgba(139, 92, 246, 0.06);
}

.hero__stats {
  display: flex;
  gap: 2.5rem;
}

.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero__image-wrap {
  position: relative;
  justify-self: center;
}

.hero__image-glow {
  position: absolute;
  inset: -20px;
  background: var(--gradient);
  border-radius: var(--radius-lg);
  opacity: 0.2;
  filter: blur(40px);
}

.hero__image {
  position: relative;
  width: 340px;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  filter: grayscale(100%);
  transition: filter var(--transition);
}

.hero__image-wrap:hover .hero__image {
  filter: grayscale(30%);
}

/* ===== Sections ===== */
.section {
  position: relative;
  z-index: 1;
  padding: 6rem 0;
}

.section__header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 3rem;
}

.section__tag {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--purple);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ===== About ===== */
.about__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about__text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.about__text strong {
  color: var(--text);
}

.about__cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.info-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(139, 92, 246, 0.3);
}

.info-card__icon {
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 10px;
}

.info-card h3 {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 0.15rem;
}

.info-card p {
  font-weight: 500;
  font-size: 0.95rem;
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline__item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gradient);
  border: 3px solid var(--bg);
}

.timeline__date {
  font-size: 0.8rem;
  color: var(--purple);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0.4rem 0 0.5rem;
}

.timeline__desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== Skills ===== */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: var(--transition);
}

.skill-category:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.skill-category__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-category__title::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  font-size: 0.85rem;
  padding: 0.4rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  transition: var(--transition);
}

.skill-tag:hover {
  color: var(--text);
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.08);
}

/* ===== Projects ===== */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.project-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.project-card__icon {
  font-size: 1.75rem;
}

.project-card__status {
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--purple);
  font-weight: 500;
}

.project-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.project-card__desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1.25rem;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-card__tags span {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  color: var(--text-muted);
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__made {
  opacity: 0.7;
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
    padding-top: calc(var(--header-h) + 2rem);
    min-height: auto;
    padding-bottom: 4rem;
  }

  .hero__desc {
    margin-inline: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__stats {
    justify-content: center;
  }

  .hero__image-wrap {
    order: -1;
  }

  .hero__image {
    width: 260px;
    height: 320px;
  }

  .about__grid {
    grid-template-columns: 1fr;
  }

  .skills__grid {
    grid-template-columns: 1fr;
  }

  .projects__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
  }

  .nav__menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}
