* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: #fff;
  background: #050914;
}

/* =========================
       BACKGROUND
    ========================= */

body::before {
  content: "";
  position: fixed;
  inset: 0;

  background:
    linear-gradient(rgba(2, 7, 20, 0.58), rgba(2, 7, 20, 0.78)),
    url("./bg.png") center / cover no-repeat;

  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;

  background: radial-gradient(
    circle at 70% 20%,
    rgba(50, 100, 255, 0.12),
    transparent 35%
  );

  z-index: -1;
  pointer-events: none;
}

/* =========================
       NAVBAR
    ========================= */
header {
  position: sticky;
  top: 0;
  z-index: 1;
}

header.scrolled {
  background: rgba(3, 7, 18, 0.5);
  backdrop-filter: blur(12px);
}

nav {
  width: min(1100px, 90%);
  height: 75px;

  margin: auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  font-weight: bold;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -1px;
}

.logo span {
  color: #628cff;
}

nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
}

nav a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;

  transition: 0.25s;
}

nav a:hover {
  color: #fff;
}

nav a {
  position: relative;
  color: #aeb8cc;
  text-decoration: none;
  padding: 8px 0;
  transition: 0.25s;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: #7195ff;
  transition: width 0.25s ease;
}

nav a.active {
  color: white;
}

nav a.active::after {
  width: 100%;
}

/* =========================
       HERO
    ========================= */

.hero {
  width: min(1100px, 90%);
  min-height: calc(100vh - 75px);

  margin: auto;

  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 650px;
}

.terminal {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  margin-bottom: 25px;

  padding: 8px 13px;

  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;

  background: rgba(5, 10, 25, 0.55);
  backdrop-filter: blur(10px);

  color: #8da8ff;
  font-family: monospace;
  font-size: 13px;
}

.terminal::before {
  content: ">";
  content: "$";

  color: #61dafb;
}

h1 {
  font-size: clamp(45px, 7vw, 80px);
  line-height: 0.95;
  letter-spacing: -4px;

  margin-bottom: 25px;
}

h1 span,
font {
  color: #7195ff;
}

.hero p {
  max-width: 550px;

  color: #b8c1d3;
  font-size: 17px;
  line-height: 1.7;

  margin-bottom: 35px;
}

.buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  padding: 13px 20px;

  border-radius: 7px;

  text-decoration: none;
  font-size: 14px;

  transition: 0.25s;

  font-weight: bold;
  padding: 1em 2.5em;
  border-radius: 1em;
}

.btn-primary {
  color: white;
  background: #4f73e8;

  color: black;
}

.btn-primary:hover {
  background: #6386f5;
  transform: translateY(-2px);

  outline: 0.25em solid hsl(from #6386f5 h s l / 25%);
}

.btn-secondary {
  color: #dbe4ff;

  border: 1px solid rgba(255, 255, 255, 0.15);

  background: rgba(5, 10, 25, 0.45);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);

  outline: 0.25em solid hsl(0 0% 100% / 5%);
}

/* =========================
       SECTIONS
    ========================= */

section {
  width: min(1100px, 90%);
  margin: auto;
  padding: 100px 0;
}

.section-title {
  margin-bottom: 40px;
}

.section-title span {
  color: #7195ff;
  font-family: monospace;
  font-size: 13px;
}

.section-title h2 {
  margin-top: 8px;

  font-size: 35px;
  letter-spacing: -1px;
}

/* =========================
       ABOUT
    ========================= */

.about-box {
  padding: 35px;

  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;

  background: rgba(4, 9, 22, 0.55);
  backdrop-filter: blur(12px);
}

.about-box p {
  max-width: 750px;

  color: #b9c1d0;
  line-height: 1.8;
}

/* =========================
       PROJECTS
    ========================= */

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.project {
  padding: 25px;

  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;

  background: rgba(3, 8, 20, 0.58);
  backdrop-filter: blur(12px);

  transition: 0.3s;

  display: flex;
  flex-direction: column;
}

.project:hover {
  transform: translateY(-5px);

  border-color: rgba(113, 149, 255, 0.4);
}

.project-icon {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  margin-bottom: 20px;

  border-radius: 8px;

  background: rgba(83, 116, 230, 0.15);

  color: #7195ff;

  font-family: monospace;
  font-size: 18px;
}

.project h3 {
  margin-bottom: 10px;
}

.project p {
  color: #929caf;
  font-size: 14px;
  line-height: 1.7;

  flex: 1;
}

.tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;

  margin-top: 20px;
}

.tag {
  padding: 5px 8px;

  border-radius: 5px;

  background: rgba(255, 255, 255, 0.06);

  color: #aab7d8;

  font-family: monospace;
  font-size: 11px;
}

/* =========================
       CONTACT
    ========================= */

.contact {
  text-align: center;
  padding-bottom: 120px;
}

.contact p {
  color: #aeb7c9;
  margin: 15px auto 25px;
}

.email {
  display: inline-block;

  color: #7195ff;

  font-family: monospace;
  text-decoration: none;

  border-bottom: 1px solid transparent;

  transition: 0.2s;
}

.email:hover {
  border-color: #7195ff;
}

/* =========================
       FOOTER
    ========================= */

footer {
  width: min(1100px, 90%);

  margin: auto;
  padding: 25px 0;

  border-top: 1px solid rgba(255, 255, 255, 0.08);

  color: #687287;

  font-size: 12px;
  text-align: center;
}

/* =========================
       MOBILE
    ========================= */

@media (max-width: 750px) {
  nav ul {
    display: none;
  }

  .hero {
    min-height: 85vh;
  }

  h1 {
    letter-spacing: -2px;
  }

  .hero p {
    font-size: 15px;
  }

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

  section {
    padding: 70px 0;
  }

  .about-box {
    padding: 25px;
  }
}

/* =========================
   MODERN LOADER
========================= */

.loader {
  position: fixed;
  inset: 0;

  z-index: 9999;

  display: grid;
  place-items: center;

  background: #030712;

  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
}

.loader.hide {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  width: 230px;

  display: flex;
  flex-direction: column;
  align-items: center;
}

/* CODE ICON */

.loader-code {
  margin-bottom: 25px;

  font-family: monospace;
  font-size: 42px;
  font-weight: bold;

  color: #fff;

  animation: codePulse 1.5s ease-in-out infinite;
}

.loader-code span:first-child,
.loader-code span:last-child {
  color: #7195ff;
}

.loader-bracket {
  color: #61dafb;
}

/* TEXT */

.loader-text {
  margin-bottom: 14px;

  color: #aeb8cc;

  font-family: monospace;
  font-size: 13px;
}

/* ANIMATED DOTS */

.dots::after {
  content: "";

  animation: dots 1.5s steps(4, end) infinite;
}

/* PROGRESS BAR */

.loader-bar {
  width: 100%;
  height: 3px;

  overflow: hidden;

  border-radius: 10px;

  background: rgba(255, 255, 255, 0.08);
}

.loader-progress {
  width: 40%;
  height: 100%;

  border-radius: inherit;

  background: #7195ff;

  box-shadow: 0 0 12px rgba(113, 149, 255, 0.8);

  animation: loading 1.2s ease-in-out infinite;
}

/* =========================
   ANIMATIONS
========================= */

@keyframes loading {
  0% {
    transform: translateX(-120%);
  }

  50% {
    transform: translateX(150%);
  }

  100% {
    transform: translateX(280%);
  }
}

@keyframes dots {
  0% {
    content: "";
  }

  25% {
    content: ".";
  }

  50% {
    content: "..";
  }

  75% {
    content: "...";
  }

  100% {
    content: "";
  }
}

@keyframes codePulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

#typing {
  color: inherit;
}

.cursor {
  color: #7195ff;
  animation: blink 0.7s infinite;
  display: inline-block;
}

@keyframes blink {
  50% {
    opacity: 0;
    scale: 1 0;
  }
}

.hide {
  opacity: 0;
  translate: 0 1rem;
  transition: .5s;
  visibility: hidden;
}

.show {
  opacity: 1;
  translate: 0;
  transition: .5s;
  visibility: visible;
}