:root {
  --bg: #080a0e;
  --card: #10141c;
  --text: #f3f5fa;
  --muted: #8993a5;
  --accent: #68dff1;
  --border: #202734;
}

/* ==============================
   GLOBAL
============================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: "Tektur", sans-serif !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

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

/* ==============================
   NAVBAR
============================== */

.navbar {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;

  width: 88%;
  max-width: 1450px;
  height: 76px;
  padding: 0 32px;

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

  background: rgba(18, 23, 33, 0.38);
  backdrop-filter: blur(25px) saturate(160%);
  -webkit-backdrop-filter: blur(25px) saturate(160%);

  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;

  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);

  transition: 0.35s ease;
}

.navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;

  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.09),
    transparent 35%,
    transparent 70%,
    rgba(104, 223, 241, 0.04)
  );
}

.logo {
  position: relative;
  z-index: 1;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -2px;
  color: #fff;
}

.logo span,
h2 span {
  color: var(--accent);
}

.nav-center {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 38px;
}

.nav-link {
  position: relative;
  color: rgba(230, 239, 255, 0.65);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.6px;
  transition: 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(104, 223, 241, 0.6);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-label,
footer {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 2px;
}

.github {
  font-size: 13px;
  color: var(--accent);
}

.github-top {
  position: relative;
  z-index: 1;
  width: 43px;
  height: 43px;

  display: grid;
  place-items: center;

  color: var(--accent);
  background: rgba(104, 223, 241, 0.08);
  border: 1px solid rgba(104, 223, 241, 0.25);
  border-radius: 12px;

  transition: 0.3s ease;
}

.github-top svg {
  width: 21px;
  height: 21px;
}

.github-top:hover {
  color: var(--bg);
  background: var(--accent);
  box-shadow: 0 0 25px rgba(104, 223, 241, 0.35);
  transform: translateY(-3px);
}

.navbar.scrolled {
  background: rgba(8, 10, 14, 0.78);
  border-color: rgba(104, 223, 241, 0.18);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* ==============================
   MAIN
============================== */

main {
  width: min(1120px, 86%);
  margin: auto;
}

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

.hero {
  position: relative;
  isolation: isolate;

  width: 100vw;
  min-height: 100vh;
  margin-left: calc(50% - 50vw);

  display: flex;
  align-items: center;

  padding: 100px max(8%, calc((100vw - 1120px) / 2));
  overflow: hidden;
}

.hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.hero-video-bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.video-overlay {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(90deg, rgba(8, 10, 14, 0.72), rgba(8, 10, 14, 0.2)),
    linear-gradient(0deg, #080a0e 0%, transparent 40%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1120px;
}

.hero h1 {
  font-size: clamp(55px, 9vw, 100px);
  line-height: 0.98;
  letter-spacing: -5px;
  font-weight: 700;
  margin: 25px 0;
}

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

.hero p {
  color: var(--muted);
  font-size: 15px;
}

.tag {
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
}

/* Typing animation */

#typing-text {
  color: var(--accent);
}

.typing-cursor {
  color: var(--accent);
  font-weight: 400;
  animation: blink 0.75s infinite;
}

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

/* Hero GitHub button */

.github-hero {
  display: inline-flex;
  align-items: center;
  gap: 11px;

  margin-top: 23px;
  padding: 12px 17px;

  border: 1px solid #293644;
  border-radius: 8px;
  background: var(--card);
  color: #dce8f5;

  font-size: 12px;
  font-weight: 600;
  transition: 0.3s;
}

.github-hero svg {
  width: 19px;
  height: 19px;
  color: var(--accent);
}

.github-hero .arrow {
  color: var(--accent);
  transition: transform 0.3s;
}

.github-hero:hover {
  border-color: var(--accent);
  background: #121d27;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px #0005;
}

.github-hero:hover .arrow {
  transform: translate(3px, -3px);
}

/* Statistics */

.stats {
  display: flex;
  gap: 55px;
  margin-top: 45px;
}

.stats div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.stats strong {
  font-size: 25px;
  font-weight: 600;
}

.stats small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 2px;
}

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

.work {
  padding-bottom: 100px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 30px;
  gap: 20px;
}

h2 {
  font-size: 32px;
  font-weight: 600;
  margin: 10px 0 0;
}

/* Filters */

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 30px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  transition: 0.3s;
}

.filter.active,
.filter:hover {
  background: var(--accent);
  color: #071016;
  border-color: var(--accent);
}

/* Project grid */

#projects-grid,
.work .project-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  gap: 24px !important;
  width: 100% !important;
  align-items: stretch !important;
}

/* Project cards */

#projects-grid > .project-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow: hidden;

  background: rgba(16, 21, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;

  transition:
    transform 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

#projects-grid > .project-card:hover {
  transform: translateY(-7px);
  border-color: rgba(104, 223, 241, 0.45);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* Project preview */

#projects-grid .preview {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #151c28;
}

#projects-grid .preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

#projects-grid .project-card:hover .preview img {
  transform: scale(1.04);
}

.preview-label {
  position: absolute;
  top: 13px;
  left: 13px;

  background: rgba(5, 10, 16, 0.85);
  color: var(--accent);

  padding: 7px 11px;
  font-size: 9px;
  letter-spacing: 1px;
  border-radius: 5px;
}

/* Project information */

#projects-grid .project-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px;
}

.project-info h3 {
  font-size: 19px;
  font-weight: 600;
  color: #f5f7ff;
  margin: 0 0 9px;
}

.project-info p {
  color: #929bad;
  font-size: 13px;
  line-height: 1.7;
  min-height: 40px;
}

.project-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 20px;
}

.category {
  color: var(--accent);
  font-size: 10px;
}

.visit {
  font-size: 11px;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
  transition: 0.3s;
}

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

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

footer {
  border-top: 1px solid var(--border);
  padding: 27px 8%;
  display: flex;
  justify-content: space-between;
}

/* ==============================
   TABLET
============================== */

@media (max-width: 850px) {
  #projects-grid,
  .work .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }

  #projects-grid .preview {
    height: 190px;
  }
}

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

@media (max-width: 700px) {
  .navbar {
    top: 10px;
    width: 94%;
    height: 65px;
    padding: 0 16px;
    border-radius: 15px;
  }

  .nav-label {
    display: none;
  }

  .nav-center {
    gap: 12px;
  }

  .nav-link {
    font-size: 9px;
    letter-spacing: 0.4px;
  }

  .github-top {
    width: 35px;
    height: 35px;
  }

  main {
    width: 90%;
  }

  .hero {
    min-height: 100svh;
    padding: 80px 5%;
  }

  .hero h1 {
    letter-spacing: -3px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats {
    gap: 30px;
  }

  footer {
    padding: 22px 5%;
    font-size: 8px;
  }

  .github-hero {
    margin-top: 20px;
  }
}

/* Small phones */

@media (max-width: 550px) {
  #projects-grid,
  .work .project-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  #projects-grid .preview {
    height: 220px;
  }
}

@media (max-width: 420px) {
  .nav-center {
    gap: 8px;
  }

  .nav-link {
    font-size: 8px;
  }
}

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

.about {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.about-heading {
  margin-bottom: 45px;
}

.about-heading h2 {
  font-size: 38px;
  margin-top: 12px;
}

.about-content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: start;
}

.about-label {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 2px;
}

.about-text h3 {
  font-size: clamp(27px, 4vw, 42px);
  line-height: 1.35;
  margin: 20px 0;
}

.about-text h3 span {
  color: var(--accent);
}

.about-text p {
  color: var(--muted);
  font-size: 13px;
  line-height: 2;
  max-width: 540px;
  margin-bottom: 15px;
}

.about-github {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 13px 18px;

  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 8px;

  font-size: 11px;
  letter-spacing: 1px;
  transition: 0.3s;
}

.about-github:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  transform: translateY(-3px);
}

.about-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about-card {
  position: relative;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: 0.3s;
}

.about-card:hover {
  transform: translateX(5px);
  border-color: var(--accent);
}

.about-number {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 2px;
}

.about-card h4 {
  font-size: 14px;
  margin: 14px 0 8px;
}

.about-card p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  margin: 0;
}

/* SKILLS */

.skills-area {
  margin-top: 65px;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.skills-list span {
  padding: 11px 17px;
  color: #cbd5e1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11px;
  transition: 0.3s;
}

.skills-list span:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
}

/* ABOUT RESPONSIVE */

@media (max-width: 700px) {
  .about {
    padding: 75px 0;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .about-heading h2 {
    font-size: 32px;
  }

  .skills-area {
    margin-top: 45px;
  }
}

/* =========================
   FLOATING MUSIC PLAYER
========================= */

.music-player {
  position: fixed;
  right: 25px;
  bottom: 25px;
  z-index: 9999;
  width: 290px;
  padding: 16px;
  background: rgba(16, 20, 28, 0.94);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  transition: 0.3s ease;
}

.music-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.music-cover {
  width: 45px;
  height: 45px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #152b37, #68dff1);
  color: #080a0e;
  border-radius: 10px;
  font-size: 25px;
}

.music-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.music-details strong {
  color: var(--text);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-details small {
  color: var(--muted);
  font-size: 10px;
}

.music-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.music-controls button {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s ease;
}

#music-play {
  flex: 1;
  color: var(--accent);
  font-size: 15px;
}

#music-close {
  width: 36px;
  font-size: 20px;
}

.music-controls button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.music-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
}

.music-progress span {
  color: var(--muted);
  font-size: 9px;
  min-width: 28px;
}

.music-progress input,
.music-volume input {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.music-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: var(--accent);
  font-size: 14px;
}

.music-volume input {
  max-width: 100px;
}

/* REOPEN MUSIC BUTTON */

.music-open {
  position: fixed;
  right: 25px;
  bottom: 25px;
  z-index: 9998;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--card);
  color: var(--accent);
  font-size: 23px;
  cursor: pointer;
  box-shadow: 0 5px 25px rgba(104, 223, 241, 0.15);

  animation: musicButtonSpin 3s linear infinite;
  animation-play-state: paused;
}

.music-open.spinning {
  animation-play-state: running;
}

.music-open:hover {
  background: var(--accent);
  color: #080a0e;
}

/* SPIN ANIMATION */

@keyframes musicButtonSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* HIDDEN STATE */

.music-player.hidden,
.music-open.hidden {
  display: none;
}

/* MOBILE */

@media (max-width: 550px) {
  .music-player {
    right: 15px;
    bottom: 15px;
    width: min(290px, calc(100vw - 30px));
  }

  .music-open {
    right: 15px;
    bottom: 15px;
  }
}
