/* =====================
   GLOBAL STYLES
===================== */
:root {
  --bg-color: #0f172a;
  --card-bg: rgba(255,255,255,0.08);
  --text-color: #e5e7eb;
  --accent: #38bdf8;
  --border: rgba(255,255,255,0.15);
}

.light {
  --bg-color: #f8fafc;
  --card-bg: rgba(0,0,0,0.06);
  --text-color: #020617;
  --accent: #2563eb;
  --border: rgba(0,0,0,0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  font-family: "Segoe UI", sans-serif;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* =====================
   SECTIONS
===================== */
.section {
  min-height: 100vh;
  padding: 90px 10%;
}

.section-top {
  text-align: center;
  color: var(--accent);
}

h1, h2, h3 {
  text-align: center;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.4rem; margin-bottom: 20px; }
h3 { font-size: 1.4rem; }

/* =====================
   ICON NAVIGATION
===================== */
.icon-nav {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 18px;
  padding: 12px 22px;
  backdrop-filter: blur(15px);
  background: rgba(255,255,255,0.08);
  border-radius: 40px;
  border: 1px solid var(--border);
  z-index: 1000;
}

.icon-nav a {
  color: var(--text-color);
  font-size: 1.4rem;
  transition: 0.3s;
}

.icon-nav a:hover {
  color: var(--accent);
  transform: scale(1.2);
}

/* =====================
   HOME
===================== */
.home h4 { margin-top: 40px; }
.home h1 { margin: 10px 0; }
.home h3 { color: var(--accent); }

.buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 26px;
  border-radius: 30px;
  font-weight: 500;
  transition: 0.3s;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.btn.outline {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn.outline:hover {
  background: var(--accent);
  color: white;
}

.btn.filled {
  background: var(--accent);
  color: white;
}

.btn.filled:hover {
  opacity: 0.85;
}

.home-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 50px;
  gap: 30px;
}

.profile-circle {
  width: 280px;
  height: 280px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-circle img {
  width: 230px;
  border-radius: 50%;
}

.socials {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.socials a {
  font-size: 1.6rem;
  color: var(--text-color);
  transition: 0.3s;
}

.socials a:hover {
  color: var(--accent);
}

.scroll-down {
  writing-mode: vertical-rl;
  text-decoration: none;
  color: var(--accent);
}

/* =====================
   ABOUT
===================== */
.about-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 50px;
  align-items: center;
}

.about-img {
  width: 100%;
  border-radius: 20px;
}

.cards {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.card {
  flex: 1;
  min-width: 180px;
  background: var(--card-bg);
  padding: 20px;
  border-radius: 20px;
  text-align: center;
  transition: 0.3s;
}

.card:hover {
  background: transparent;
  border: 1px solid var(--border);
}

.about-text {
  margin: 20px 0;
}

/* =====================
   SKILLS
===================== */
.skills-boxes {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 30px;
}

.skill-box {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 25px;
  transition: 0.3s;
}

.skill-box:hover {
  background: transparent;
  border: 1px solid var(--border);
}

.skill-box ul {
  margin-top: 20px;
}

.skill-box li {
  margin-bottom: 10px;
}

/* =====================
   PROJECTS
===================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
  gap: 30px;
  justify-content: center; /* ✅ centers last row (Project 5 & 6) */
}

.project-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 25px;
  text-align: center;
  transition: 0.3s;
}

.project-card:hover {
  transform: translateY(-10px);
}

.project-card img {
  width: 100%;
  border-radius: 15px;
}

/* NEW: Buttons layout inside project cards */
.project-buttons {
  display: flex;
  flex-direction: row; /* ✅ side by side */
  gap: 12px;
  margin-top: 15px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

/* =====================
   SERVICES
===================== */
.service-card {
  max-width: 500px;
  margin: auto;
  background: var(--card-bg);
  border-radius: 30px;
  padding: 30px;
  transition: 0.3s;
}

.service-card:hover {
  background: transparent;
  border: 1px solid var(--border);
}

.service-card h3 {
  background: var(--accent);
  color: white;
  padding: 10px;
  border-radius: 20px;
}

/* =====================
   CONTACT CARDS
===================== */
.contact-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
}

.contact-card {
  padding: 32px 25px;
  border-radius: 28px;
  text-align: center;
  transition: all 0.4s ease;
  border: 1px solid transparent;
}

/* Common icon style */
.contact-card i {
  font-size: 2.6rem;
  margin-bottom: 15px;
}

.contact-card h4 {
  margin-bottom: 8px;
}

.contact-card p {
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.contact-card a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

/* =====================
   SUITABLE BACKGROUND COLORS
===================== */
.contact-card.email {
  background: rgba(56, 189, 248, 0.12);
}

.contact-card.whatsapp {
  background: rgba(34, 197, 94, 0.12);
}

.contact-card.call {
  background: rgba(249, 115, 22, 0.12);
}

.contact-card.instagram {
  background: rgba(236, 72, 153, 0.12);
}

.contact-card.linkedin {
  background: rgba(37, 99, 235, 0.12);
}

.contact-card.github {
  background: rgba(148, 163, 184, 0.12);
}

/* =====================
   HOVER EFFECT
===================== */
.contact-card:hover {
  background: transparent;
  border: 1px solid var(--border);
  transform: translateY(-10px);
}

/* Icon colors */
.contact-card.email i { color: #38bdf8; }
.contact-card.whatsapp i { color: #22c55e; }
.contact-card.call i { color: #f97316; }
.contact-card.instagram i { color: #ec4899; }
.contact-card.linkedin i { color: #2563eb; }
.contact-card.github i { color: #94a3b8; }

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 900px) {
  .contact-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills-boxes {
    grid-template-columns: 1fr;
  }

  .about-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .home-content {
    flex-direction: column;
    text-align: center;
  }

  .socials {
    flex-direction: row;
    justify-content: center;
  }

  .scroll-down {
    display: none;
  }
}

@media (max-width: 600px) {
  .contact-cards-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 70px 6%;
  }

  h1 { font-size: 2.3rem; }
  h2 { font-size: 1.9rem; }
}
