/* ========== RESET & GLOBAL ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0f172a;
  --bg-light: rgba(30, 41, 59, 0.6);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #6366f1;
  --accent-grad: linear-gradient(135deg, #38bdf8, #6366f1);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --radius: 1.2rem;
  --transition: all 0.35s ease;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Subtle gradient background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top left, #1e3a8a33, transparent 60%),
              radial-gradient(circle at bottom right, #0ea5e933, transparent 60%);
  z-index: -1;
}

img {
  max-width: 100%;
  display: block;
  border-radius: var(--radius);
}

section {
  padding: 6rem 8% 3rem;
  animation: fadeUp 1s ease both;
}

/* ========== HEADER ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 8%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: var(--transition);
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  color: transparent;
  cursor: pointer;
  transition: var(--transition);
}

.logo:hover {
  transform: scale(1.05) rotate(-2deg);
}

.navbar {
  display: flex;
  gap: 1.8rem;
}

.navbar a {
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  position: relative;
  padding: 0.2rem 0;
  transition: var(--transition);
}

.navbar a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: 0.3s;
}

.navbar a:hover::after,
.navbar a.active::after {
  width: 100%;
}

#menu-icon {
  display: none;
  font-size: 2rem;
  color: var(--text);
  cursor: pointer;
}

/* ========== HOME ========== */
.home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
  padding-top: 7rem;
}

.home-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  color: transparent;
}

.home-content h3 {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--accent);
}

.home-content p {
  margin-top: 1rem;
  max-width: 520px;
  color: var(--muted);
}

.social-media {
  margin-top: 2rem;
  display: flex;
  gap: 1.2rem;
}

.social-media a {
  font-size: 1.5rem;
  color: var(--accent);
  transition: var(--transition);
}

.social-media a:hover {
  transform: translateY(-3px) scale(1.2);
  color: #fff;
  text-shadow: 0 0 12px var(--accent);
}

.home-img img {
  width: 340px;
  border-radius: 50%;
  border: 4px solid var(--accent);
  box-shadow: var(--shadow), 0 0 25px rgba(56, 189, 248, 0.4);
  transition: var(--transition);
}

.home-img img:hover {
  transform: scale(1.08) rotate(2deg);
}

/* ========== BUTTON ========== */
.btn {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.9rem 1.8rem;
  border-radius: 50px;
  background: var(--accent-grad);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.4);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, #fff5, transparent);
  transform: translateX(-100%);
  transition: 0.6s;
}

.btn:hover::before {
  transform: translateX(100%);
}

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

/* ========== CARDS / SECTIONS ========== */
.project-box,
.card {
  background: var(--bg-light);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-box:hover,
.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45),
              0 0 20px rgba(56, 189, 248, 0.3);
}

/* ========== SKILLS ========== */
.skills-grid span {
  padding: 0.7rem 1.3rem;
  background: var(--bg-light);
  border-radius: 30px;
  font-size: 0.95rem;
  transition: var(--transition);
  box-shadow: inset 0 0 0 0 var(--accent);
}

.skills-grid span:hover {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: inset 200px 0 0 0 var(--accent-2);
  transform: translateY(-3px);
}

/* ========== CONTACT ========== */
.contact input,
.contact textarea {
  padding: 1rem;
  border: none;
  border-radius: var(--radius);
  background: var(--bg-light);
  color: var(--text);
  outline: none;
  resize: none;
  transition: var(--transition);
}

.contact input:focus,
.contact textarea:focus {
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

/* ========== FOOTER ========== */
.footer {
  padding: 2rem;
  text-align: center;
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(12px);
  color: var(--muted);
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer .socials a:hover {
  color: #fff;
  transform: scale(1.25);
  text-shadow: 0 0 10px var(--accent);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  #menu-icon {
    display: block;
  }

  .navbar {
    position: absolute;
    top: 100%;
    right: -100%;
    flex-direction: column;
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius);
    transition: 0.4s ease;
    backdrop-filter: blur(16px);
  }

  .navbar.active {
    right: 5%;
  }

  .home {
    flex-direction: column-reverse;
    text-align: center;
  }

  .home-img img {
    width: 260px;
  }
}
