html,
body {
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --bg-main: #0d0d0d;
  --bg-card: #151515;
  --bg-header: #0f0f0f;
  --bg-footer: #111827;
  --bg-hero-start: #313131;
  --bg-hero-end: #0c0c0c;

  --text-main: #ffffff;
  --text-muted: #b0b3b8;

  --accent: #00ff85;
  --accent-hover: #00cc6a;
  --accent-blue: #00bcd4;
  --accent-cyan: #00e1ff;
  --accent-cyan-hover: #04c3dc;
  --accent-soft: #66e3f3;
  --accent-glow: #00bbd494;

  --link-color: #1e90ff;

  /* Typography */
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;

  --fs-base: 1rem;
  --fs-sm: 0.9rem;
  --fs-nav: 0.95rem;
  --fs-lg: 1.4rem;
  --fs-xl: 2rem;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;

  /* Layout */
  --max-width: 1100px;
  --radius-sm: 8px;
  --radius-md: 12px;

  /* Effects */
  --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 0 15px var(--accent-glow);
  --transition-fast: 0.25s ease;
  --transition-mid: 0.5s ease;
}

body {
  font-family: var(--font-main);
  background: var(--bg-main);
  color: var(--text-main);
}

main {
  margin: 10px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  max-width: 95vw;
  height: 50px;
  position: sticky;
  top: 0;
  z-index: 2;

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

  background: var(--bg-header);
  padding: var(--space-sm) var(--space-md);
  margin: 10px auto;
  border-radius: 4px;
  font-weight: 700;
}

header h1 {
  color: var(--accent-blue);
}

a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

nav {
  display: flex;
  justify-content: space-around;
}

nav a {
  font-size: var(--fs-nav);
  margin-left: 20px;
  color: var(--accent-cyan);
}

nav a:hover {
  color: var(--accent-cyan-hover);
}

#hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 0 10px;
  margin: 5px auto;

  font-size: var(--fs-xl);
  text-align: center;

  background: linear-gradient(145deg, var(--bg-hero-start), var(--bg-hero-end));

  border-radius: 10px;
}

section {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 90dvh;
  width: 80%;
  margin-top: 10px;
  max-width: 100vw;
  animation: slideIn 2s ease;
}
@keyframes slideIn {
  from {
    transform: translateY(-30px);
  }
  to {
    transform: translateY(0);
  }
}
#about {
  padding: 0 100px;
}

.cards {
  display: none;
  background: var(--bg-card);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  max-width: var(--max-width);
  margin: var(--space-lg) auto;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);

  background: var(--accent);
  color: #000;
  font-weight: 600;

  transition: var(--transition-fast);
}

.btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

footer {
  text-align: center;
  padding: 20px;
  font-size: var(--fs-sm);

  background: var(--bg-footer);
  color: var(--text-muted);
}

#projects-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.project {
  width: 280px;
  padding: 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-blue);
  text-align: left;
  transition: var(--transition-fast);
}

.project:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.project .btn {
  font-size: var(--fs-lg);
}

#contact a {
  color: var(--accent-soft);
}

h2 {
  text-align: center;
  color: #89cff0;
}

#hero h2 span {
  background-image: url("space.jpg");
  background-clip: text;
  color: transparent;
  animation: moveImg 20s linear infinite;
}

@keyframes moveImg {
  to {
    background-position: -400%;
  }
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.skills-list div {
  background: #fff;
  color: #000;
  border-radius: 10px;
  padding: 3px;
  text-align: center;
  transition: var(--transition-mid);
}

.skills-list div:hover {
  transform: scale(1.05);
  animation: moveImg 10s linear infinite;
  background-image: url("space.jpg");
  color: var(--text-muted);
}
#contact p a:hover {
color: #00cc6a;
}

#contact .contactLinks a:nth-child(1):hover {
  color: #fafbfc;
}
#contact .contactLinks a:nth-child(2):hover {
  color: lightgray;
}
#contact .contactLinks a:nth-child(3):hover {
  color: #0077B5;
}
/* Mobile */
#menuicon {
  display: none;
}

@media (min-width: 800px) {
  .sidebar {
    display: none;
  }
}

@media (max-width: 800px) {
  header {
    justify-content: flex-start;
    padding: 0;
  }

  #nav-links {
    display: none;
  }

  #menuicon,
  #cancelIcon {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    margin: 0 10px;
  }

  #menuicon span,
  #cancelIcon span {
    width: 30px;
    height: 5px;
    margin: 0 3px 5px 5px;
    border-radius: 15px;
    background: beige;
  }
  #middle-bar {
    display: none;
  }
  #top-bar {
    transform: rotate(45deg) translate(7px);
  }
  #bottom-bar {
    transform: rotate(-45deg) translate(7px);
  }
  .sidebar nav {
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    gap: 40px;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100dvh;
    padding: 20px 0;
    z-index: 9999;

    opacity: 0;
    backdrop-filter: blur(50px) brightness(80%);
    transition: left 0.6s ease, opacity 0.6s ease;
  }
  .sidebar.show {
    left: 0;
    opacity: 1;
  }
  #about {
    padding: 0 20px;
  }
}

@media (max-width: 600px) {
  #hero {
    width: 99%;
  }
  .project {
    width: 95%;
    padding: 5px;
  }
}
