/* ===== VARIABLES ===== */
:root {
  --bg:          #0a0a0a;
  --bg-alt:      #111111;
  --surface:     #161616;
  --border:      #222222;
  --text:        #e8e8e8;
  --text-muted:  #777777;
  --accent:      #64ffda;
  --accent-dim:  rgba(100, 255, 218, 0.08);
  --font:        'Inter', sans-serif;
  --mono:        'JetBrains Mono', monospace;
  --radius:      8px;
  --ease:        0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* ===== NAV ===== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease);
}

.nav.scrolled {
  border-bottom-color: var(--border);
}

.nav__logo {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.nav__links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav__links a {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--ease);
  letter-spacing: 0.05em;
}

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

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

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

/* ===== LAYOUT ===== */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container--narrow {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--ease);
  border: 1px solid transparent;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: transparent;
  color: var(--accent);
}

.btn--secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn--secondary:hover {
  background: var(--accent-dim);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 2.5rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.hero__content {
  max-width: 640px;
  position: relative;
  z-index: 1;
}

.hero__greeting {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 1.25rem;
  letter-spacing: 0.05em;
}

.hero__name {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1rem;
}

.hero__title {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero__bio {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

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

.hero__decoration {
  position: absolute;
  right: -50px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.hero__circle {
  position: absolute;
  border-radius: 50%;
}

.hero__circle--1 {
  width: 360px;
  height: 360px;
  top: -180px;
  right: 0;
  border: 1px solid var(--border);
}

.hero__circle--2 {
  width: 220px;
  height: 220px;
  top: -110px;
  right: 70px;
  border: 1px solid rgba(100, 255, 218, 0.06);
}

/* ===== SECTION ===== */
.section {
  padding: 7rem 0;
}

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

.section__title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 3.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  white-space: nowrap;
}

.section__title::after {
  content: '';
  display: block;
  height: 1px;
  width: 80px;
  background: var(--accent);
  opacity: 0.4;
  flex-shrink: 0;
}

/* ===== ABOUT ===== */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 4rem;
  align-items: start;
}

.about__text {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.about__text p {
  color: var(--text-muted);
  line-height: 1.85;
}

.about__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color var(--ease);
}

.about__card:hover {
  border-color: rgba(100, 255, 218, 0.3);
}

.about__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(100, 255, 218, 0.3);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.about__name {
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.4;
}

.about__role {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.about__links {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.about__link {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid rgba(100, 255, 218, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  transition: background var(--ease);
}

.about__link:hover {
  background: var(--accent-dim);
}

/* ===== SKILLS ===== */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
}

.skills__group-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

.skills__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: default;
  transition: all var(--ease);
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ===== PROJECTS ===== */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.project-card:hover {
  border-color: rgba(100, 255, 218, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.project-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-card__icon {
  color: var(--accent);
}

.project-card__links {
  display: flex;
  gap: 1rem;
}

.project-card__links a {
  color: var(--text-muted);
  transition: color var(--ease);
  display: flex;
  align-items: center;
}

.project-card__links a:hover {
  color: var(--accent);
}

.project-card__title {
  font-size: 1rem;
  font-weight: 600;
}

.project-card__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.75;
  flex: 1;
}

.project-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.project-card__tech span {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== CONTACT ===== */
.contact__desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.contact__btn {
  display: inline-flex;
  margin-bottom: 2rem;
}

.contact__socials {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.social-link {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  position: relative;
  transition: color var(--ease);
}

.social-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ease);
}

.social-link:hover {
  color: var(--accent);
}

.social-link:hover::after {
  transform: scaleX(1);
}

/* ===== FOOTER ===== */
.footer {
  padding: 2rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.footer span {
  color: var(--accent);
}

/* ===== 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: 768px) {
  .nav {
    padding: 1.25rem 1.5rem;
  }

  .nav__links {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(75vw, 280px);
    background: var(--bg-alt);
    border-left: 1px solid var(--border);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .nav__links.open {
    transform: translateX(0);
  }

  .nav__links a {
    font-size: 1rem;
  }

  .nav__toggle {
    display: flex;
  }

  .hero {
    padding: 8rem 1.5rem 4rem;
  }

  .hero__decoration {
    display: none;
  }

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

  .about__card {
    flex-direction: row;
    text-align: left;
    align-items: center;
  }

  .about__links {
    justify-content: flex-start;
  }

  .section {
    padding: 5rem 0;
  }

  .container,
  .container--narrow {
    padding: 0 1.5rem;
  }

  .contact__socials {
    gap: 1.5rem;
  }
}

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

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

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