:root {
  --bg: #0f172a;
  --card: rgba(255,255,255,0.08);
  --accent: #38bdf8;
  --text: #e5e7eb;
  --muted: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, sans-serif;
  background: linear-gradient(135deg, #020617, #0f172a);
  color: var(--text);
  line-height: 1.6;
}

/* ================= HERO ================= */
header {
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  padding-top: 100px;
}

header h1 {
  font-size: 3.5rem;
}

header span {
  color: var(--accent);
}

header p {
  margin-top: 15px;
  color: var(--muted);
  font-size: 1.2rem;
}

/* ================= SECTIONS ================= */
section {
  padding: 80px 10%;
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 40px;
  text-align: center;
}

/* ================= ABOUT ================= */
.about {
  max-width: 900px;
  margin: auto;
  text-align: center;
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.9;
  letter-spacing: 0.3px;
}

/* ================= PROJECTS / SERVICES ================= */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.card h3 {
  margin-bottom: 10px;
  color: var(--accent);
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ================= CONTACT ================= */
.contact {
  text-align: center;
}

.contact a {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 30px;
  border-radius: 30px;
  background: var(--accent);
  color: #020617;
  text-decoration: none;
  font-weight: bold;
  transition: opacity 0.3s;
}

.contact a:hover {
  opacity: 0.8;
}

/* ================= FOOTER ================= */
footer {
  text-align: center;
  padding: 30px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ================= NAVBAR ================= */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 30px; /* closer to the edge */
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(10px);
  z-index: 1000;
}

body {
  padding-top: 80px;
}

.logo {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--accent);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  position: relative;
  transition: color 0.2s ease, transform 0.15s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a:active {
  transform: scale(0.95);
}

.nav-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

/* ================= MENU BUTTON (ENHANCED) ================= */
.menu-btn {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;

  font-size: 1.6rem;
  color: var(--text);
  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.menu-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.menu-btn:active {
  transform: scale(0.9);
  box-shadow: 0 0 12px rgba(56,189,248,0.4);
}

.menu-btn:focus-visible {
  outline: 2px solid var(--accent);
}

/* ================= MOBILE RESPONSIVE ================= */
@media (max-width: 768px) {

  .projects{
    justify-items: center;
  }

  /* NAVBAR */
  nav {
    padding: 15px 6%;
  }

  .menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(2, 6, 23, 0.95);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    transition: right 0.3s ease;
  }

  .nav-links.show {
    right: 0;
  }

  .nav-links a {
    font-size: 1.4rem;
  }
  

  /* HERO */
  header h1 {
    font-size: 2.2rem;
  }

  header p {
    font-size: 1rem;
  }

  /* SECTIONS */
  section {
    padding: 60px 6%;
  }

  h2 {
    font-size: 1.8rem;
  }

  /* ABOUT TEXT */
  .about {
    font-size: 1rem;
  }
  /* Card */
  .card {
    width: 100%;
    max-width: 420px;
  }
  .projects {
    grid-template-columns: 1fr;
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;

  background: var(--card);
  padding: 28px 25px 32px;
  border-radius: 18px;
  backdrop-filter: blur(12px);

  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 0 35px rgba(56,189,248,0.35);
}

.card:active {
  transform: translateY(-4px) scale(0.98);
}
.contact a {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 34px;
  border-radius: 999px;
  background: var(--accent);
  color: #020617;
  text-decoration: none;
  font-weight: bold;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.contact a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(56,189,248,0.45);
}

.contact a:active {
  transform: translateY(0) scale(0.95);
}

.contact a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 6px;
}

header,
section {
  scroll-margin-top: 80px;
}