/* ------------------------------------
   Global Variables (Theme Colors, Sizes, Effects)
------------------------------------ */
:root {
  --bg: #0b0f17;
  --card: #111827;
  --muted: #6b7280;
  --txt: #e5e7eb;
  --brand: #60a5fa;
  --brand-2: #a78bfa;
  --ring: #1f2937;
  --radius: 18px;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  --transition-speed: 0.8s;
  --btn-hover: rgb(241, 243, 143);
  --input-color: #0f172a;
}

/* ------------------------------------
   Reset and Base Styles
------------------------------------ */
* {
  box-sizing: border-box;
  user-select: none;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background-color: #0a0d14;
  color: var(--txt);
  background-image: radial-gradient(
      1200px 600px at 80% -10%,
      rgba(96, 165, 250, 0.08),
      transparent 60%
    ),
    radial-gradient(
      900px 500px at 10% -10%,
      rgba(167, 139, 250, 0.08),
      transparent 55%
    );
  background-repeat: no-repeat;
  background-attachment: fixed;
}

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

/* ------------------------------------
   Layout Containers
------------------------------------ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px;
}

/* ------------------------------------
   Header and Navigation
------------------------------------ */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(1.2) blur(10px);
  background: linear-gradient(
    to bottom,
    rgba(11, 15, 23, 0.8),
    rgba(11, 15, 23, 0.4)
  );
  border-bottom: 1px solid var(--card);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.brand .logo {
  width: 34px;
  height: 34px;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.brand .logo span {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--bg);
}

.menu {
  display: flex;
  gap: 1.1rem;
}

.menu a {
  padding: 10px 14px;
  border-radius: 1rem;
  color: #cbd5e1;
}

.menu a:hover {
  background: var(--card);
  color: #8995fa;
}

#menu-toggle {
  display: none;
  font-size: 1.4rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

#close-menu {
  display: none;
  font-size: 1.4rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  margin: 0.5rem;
}

/* ------------------------------------
   Buttons
------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--bg);
  font-weight: 700;
  border: 0;
}

.btn.ghost {
  background: var(--bg);
  color: var(--txt);
  border: 1px solid var(--ring);
}

.btn:hover {
  background: var(--btn-hover);
  color: #1045b9;
}

/* ------------------------------------
   Sections
------------------------------------ */
section {
  padding: 30px 0;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(75, 74, 69, 0);
  /* transition: transform 0.5s ease, box-shadow 0.5s ease,
    background-color 0.5s ease; */
  transition: var(--transition-speed);
  position: relative;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.5rem;
  position: relative;
  display: inline-block;
}

.section-head h2::after {
  content: "";
  display: block;
  height: 2px;
  width: 0;
  background-color: currentColor;
  margin: auto;
  transition: width var(--transition-speed) ease;
}

.section-head:hover h2::after {
  width: 80%;
}

.grid {
  display: grid;
  gap: 1.1rem;
}

/* ==== Projects Section ===== */
.projects {
  grid-template-columns: repeat(3, 1fr);
}

.project {
  overflow: hidden;
}

.project img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.project img:hover {
  transform: scale(1.1);
  transition: var(--transition-speed);
}

.project-title-block {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.project .body {
  padding: 1rem;
}

.project .body:hover {
  transform: translateY(-15px);
  transition: var(--transition-speed);
}

.tag {
  font-size: 0.8rem;
  color: #93c5fd;
  border: 1px solid var(--ring);
  background: var(--input-color);
  padding: 5px 8px;
  border-radius: 999px;
}

.tag:hover {
  background: #e9c70a;
  color: blue;
  transition: var(--transition-speed);
}

/* ==== Skills Section ===== */
#skills {
  margin: auto;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section-head {
  text-align: center;
  margin-bottom: 2rem;
}

.skill-category {
  margin-bottom: 2rem;
}

.skill-category h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100px;
}

.skill-item img {
  width: 40px;
  height: 40px;
  margin-bottom: 0.5rem;
  filter: saturate(1.05) contrast(1.03);
}

.skill-item img:hover {
  transform: scale(1.4);
  transition: var(--transition-speed);
}

.skill-item span {
  font-size: 1rem;
  text-align: center;
}

.skill-item span:hover {
  transform: translateY(-5px);
  transition: var(--transition-speed);
}

/* ==== About Section ===== */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

#about_me:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  background-color: var(--hover-color);
}

.card-pad {
  padding: 1.5rem;
}

/* ==== Contact Form Section ===== */
.contact form {
  display: grid;
  gap: 0.8rem;
}

#contacts:hover {
  transform: translateY(-15px);
  background-color: #326bc015;
  color: #e9c70a;
}

input,
textarea {
  background: var(--input-color);
  border: 1px solid var(--ring);
  border-radius: 0.6rem;
  padding: 0.6rem;
  color: var(--txt);
}

input:focus,
textarea:focus {
  outline: 2px solid #334155;
}

/* ------------------------------------
   Hero Section
------------------------------------ */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: center;
  padding: 36px 0;
}

.card {
  background: linear-gradient(180deg, #0e1421, var(--bg));
  border: 1px solid var(--ring);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero .intro {
  padding: 2.1rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--input-color);
  border: 1px solid var(--ring);
  color: #93c5fd;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.eyebrow:hover {
  background-color: #8995fa;
  color: black;
  font-size: 0.8rem;
  transition: var(--transition-speed);
}

h1 {
  font-size: clamp(28px, 5vw, 44px);
  margin: 14px 0 10px;
}

.lead {
  color: #cbd5e1;
  line-height: 1.7;
}

.cta {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* === Stats inside Hero ==== */
.hero.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.hero.stats:hover {
  color: rgb(236, 113, 41);
  transition: var(--transition-speed);
}

.stat {
  background: var(--input-color);
  border: 1px solid var(--ring);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
}

.stat .n {
  font-size: 22px;
  font-weight: 800;
}

/* === Mock image card ==== */
.mock {
  padding: 0;
  overflow: hidden;
  position: relative;
}

.mock .bar {
  display: flex;
  gap: 6px;
  background: var(--input-color);
  padding: 10px;
  border-bottom: 1px solid var(--ring);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ef4444;
}

.dot:nth-child(2) {
  background: #f59e0b;
}

.dot:nth-child(3) {
  background: #10b981;
}

.mock img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(1.05) contrast(1.03);
}

.mock img:hover {
  transform: scale(1.2);
  transition: var(--transition-speed);
}

/* ------------------------------------
   Footer
------------------------------------ */
footer {
  border-top: 1px solid var(--card);
  margin-top: 2rem;
  max-width: 820px;
  margin: auto;
}

.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 1rem;
  padding: 24px 1rem;
  text-align: center;
  word-break: break-word;
}

.footer-column {
  margin-bottom: 1rem;
  max-width: 100%;
}

.send-email {
  text-decoration: underline;
  color: #8995fa;
}

.send-email:hover {
  text-decoration: none;
  color: #e9c70a;
}

.social {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.social a {
  margin: 0 8px;
  font-size: 1.5rem;
  color: var(--brand);
  text-decoration: none;
  transition: color 0.3s ease;
}

.social a:hover {
  color: var(--brand-2);
}

.footer-bootom {
  text-align: center;
  padding: 0.8rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0.8;
  width: 100%;
  font-size: 0.9rem;
}

/* ------------------------------------
   Toast Message
------------------------------------ */
#toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #10b981;
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  display: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ------------------------------------
   Responsive Design
------------------------------------ */
@media (max-width: 900px) {
  .projects {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  #menu-toggle {
    display: block;
  }

  #close-menu {
    display: block;
  }

  .menu {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -250px;
    width: 250px;
    height: 100%;
    background: var(--card);
    padding: 1rem;
    border-radius: 0 0 0 12px;
    box-shadow: var(--shadow);
    transition: right var(--transition-speed) ease-in-out;
    z-index: 999;
  }

  .menu.open {
    display: flex;
    right: 0;
  }

  #close-menu {
    display: block;
    align-self: flex-end;
    margin: 0.5rem;
  }

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

  .hero.stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (max-width: 600px) {
  .hero.stats {
    grid-template-columns: 1fr;
  }

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

  footer {
    max-width: 100%;
  }

  .foot {
    padding: 20px 1rem;
  }

  .send-email {
    display: inline-block;
    overflow-wrap: break-word;
  }
}
