*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #090c10;
  --bg2: #0e1117;
  --bg3: #141922;
  --surface: #1a2233;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 159, 159, 0.3);
  --accent: #fc6767;
  --accent2: #ff9f9f;
  --accent3: #f72585;
  --text: #6b7a99;
  --muted: #6b7a99;
  --mono: "Space Mono", monospace;
  --sans: "DM Sans", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 4rem;
  background: rgba(9, 12, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--mono);
  font-weight: bolder;
  font-size: 1.2rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.nav-logo-alter {
  font-size: 0.8rem;
  font-weight: lighter;
  color: #ffffff;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.82rem;
  font-family: var(--mono);
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8rem 4rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 159, 159, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 159, 159, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(
    ellipse 80% 60% at 50% 40%,
    black 30%,
    transparent 100%
  );
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(255, 159, 159, 0.03) 0%,
    transparent 70%
  );
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 780px;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

.hero h1 {
  font-family: var(--sans);
  font-size: clamp(2.8rem, 4.5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.15rem;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s ease 0.1s forwards;
}

.hero h1 span {
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-role {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin: 1.4rem 0 1.8rem;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.25s forwards;
}

.role-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(99, 230, 190, 0.5);
  animation: sonar 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes sonar {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 230, 190, 0.5);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(99, 230, 190, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(99, 230, 190, 0);
  }
}

.role-text::after {
  content: "|";
  color: var(--accent);
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 3rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.55s forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-primary {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  background: var(--accent);
  color: #090c10;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #4edaa8;
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  border: 1px solid var(--border-hover);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.2s;
}

.btn-outline:hover {
  background: rgba(99, 230, 190, 0.07);
  transform: translateY(-1px);
}

.hero-visual {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 480px;
}

#constellation {
  width: 100%;
  height: 100%;
  min-height: 480px;
  display: block;
}

.hero-scroll {
  position: absolute;
  bottom: 3rem;
  left: 4rem;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-line {
  width: 40px;
  height: 1px;
  background: var(--muted);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%,
  100% {
    width: 40px;
    opacity: 1;
  }

  50% {
    width: 60px;
    opacity: 0.4;
  }
}

/* SECTIONS */
section {
  padding: 6rem 4rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 3.5rem;
}

.section-title strong {
  font-weight: 600;
}

/* ABOUT */
.about {
  background: var(--bg2);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-size: 1.02rem;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.stat-card:hover {
  border-color: var(--border-hover);
}

.stat-num {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.highlight {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.2s;
}

.highlight:hover {
  border-color: var(--border-hover);
}

.highlight-icon {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  background: rgba(99, 230, 190, 0.1);
  padding: 0.6rem;
  border-radius: 5px;
  white-space: nowrap;
}

.highlight-icon-style {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.highlight h4 {
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.highlight p {
  font-size: 0.82rem;
  color: var(--muted);
}

/* SKILLS */
.skills {
  background: var(--bg);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.skill-group {
  background: var(--bg2);
  padding: 1.75rem 1.5rem;
  transition: background 0.2s;
}

.skill-group:hover {
  background: var(--surface);
}

.skill-group-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 0.3rem 0.65rem;
  border-radius: 2px;
  transition: all 0.15s;
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(99, 230, 190, 0.06);
}

/* PROJECTS */
.projects {
  background: var(--bg2);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.25s;
  cursor: pointer;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity 0.25s;
}

.project-card:hover {
  border-color: rgba(99, 230, 190, 0.2);
  transform: translateY(-3px);
}

.project-card:hover::before {
  opacity: 1;
}

.project-link {
  text-decoration: none;
}

.project-number {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.project-card h3 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.project-card p {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent2);
  background: rgba(76, 201, 240, 0.08);
  border: 1px solid rgba(76, 201, 240, 0.2);
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
}

/* CONTACT */
.contact {
  background: var(--bg);
}

.contact-desc {
  font-size: 1.02rem;
  color: var(--muted);
  margin-bottom: 3rem;
  line-height: 1.75;
  max-width: 560px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 2rem 1.75rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all 0.25s;
}

.contact-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity 0.25s;
}

.contact-card:hover {
  border-color: var(--border-hover);
  background: var(--surface);
  transform: translateY(-3px);
}

.contact-card:hover::before {
  opacity: 1;
}

.contact-card-icon {
  color: var(--accent);
  background: rgba(252, 103, 103, 0.1);
  border: 1px solid rgba(252, 103, 103, 0.2);
  padding: 0.6rem;
  border-radius: 5px;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-card-body {
  flex: 1;
}

.contact-card-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.contact-card-handle {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.contact-card-arrow {
  font-family: var(--mono);
  font-size: 1.8rem;
  color: var(--muted);
  margin-top: auto;
  transition:
    color 0.2s,
    transform 0.2s;
}

.contact-card:hover .contact-card-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* FOOTER */
footer {
  padding: 2.5rem 4rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
}

.footer-left {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.footer-left span {
  color: var(--accent);
}

.footer-right {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
}

@media (max-width: 768px) {
  nav {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    display: none;
  }

  section,
  .hero {
    padding: 5rem 1.5rem 4rem;
  }

  .hero-visual {
    display: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  footer {
    padding: 2rem 1.5rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
