/* =========================
   GLOBAL SECTION RULES
========================= */

/* Default spacing only */
section {
  padding: 100px 32px;
}

/* Limit width for NON-HERO sections */
section:not(.hero-full) {
  max-width: 1400px; /* Significantly wider */
  width: 95%; /* Occupy almost full width on smaller screens */
  margin: auto;
}

/* =========================
   HERO BASE
========================= */

.hero {
  display: block;
}

.hero h1 span {
  color: var(--accent);
}

/* =========================
   FULL SCREEN HERO
========================= */

.hero-full {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  padding-top: 120px; /* space for navbar */
  padding-bottom: 80px;
}

/* Centered content container */
.hero-container {
  width: 100%;
  max-width: 1400px; /* Matches section width */
  margin: auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

/* Layout */
.hero-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 48px;
}

/* =========================
   HERO TEXT
========================= */

.hero-title {
  font-size: clamp(2.6rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
}

.hero-subtitle {
  margin-top: 12px;
  font-size: 1.4rem;
  color: var(--muted);
}

.hero-description {
  margin-top: 20px;
  max-width: 620px;
  line-height: 1.7;
  color: var(--muted);
}

.hero-description strong {
  color: var(--text);
}

.accent {
  color: var(--accent);
}
.hero-content {
  display: flex;
  flex-direction: column;
  gap: 18px; /* controls vertical spacing */
}

/* Ensure buttons always sit at the bottom */
.hero-actions {
  margin-top: 28px;
}
.hero-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   HERO HIGHLIGHTS
========================= */

.hero-highlights {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.hero-highlights span {
  padding: 8px 14px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

/* =========================
   LIQUID GLASS BUTTONS
========================= */

/* =========================
   REFINED LIQUID GLASS BUTTONS
========================= */

.btn {
  position: relative;
  padding: 12px 24px;
  border-radius: 12px; /* Professional radius */
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  overflow: hidden;
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

/* Primary */
.btn.primary {
  color: white;
  background: linear-gradient(
    135deg,
    rgba(124, 124, 255, 0.55),
    rgba(124, 124, 255, 0.25)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 10px 24px rgba(124, 124, 255, 0.3);
}

/* Secondary */
.btn.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Subtle reflection (FIXED) */
.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 120%;
  height: 100%;
  background: linear-gradient(
    110deg,
    transparent 35%,
    rgba(255, 255, 255, 0.18),
    transparent 65%
  );
  transform: translateX(0);
  opacity: 0;
  transition:
    opacity 0.25s ease,
    transform 0.4s ease;
}

/* Hover */
.btn:hover {
  transform: translateY(-1px);
}

.btn:hover::before {
  opacity: 1;
  transform: translateX(60%);
}

/* Active */
.btn:active {
  transform: translateY(0);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
  .hero-actions {
    justify-content: center;
  }
}

/* =========================
   HERO IMAGE
========================= */

.hero-image {
  display: flex;
  justify-content: center;
}

.image-gradient {
  padding: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at top, var(--accent), transparent 70%);
}

.image-gradient img {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-soft);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

/* =========================
   FLOATING ICONS
========================= */

.floating-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.floating-icons i {
  position: absolute;
  font-size: 2rem;
  color: var(--accent);
  opacity: 0.25;
}

/* Positions */
.floating-icons i:nth-child(1) {
  top: 15%;
  left: 8%;
}
.floating-icons i:nth-child(2) {
  top: 25%;
  right: 10%;
}
.floating-icons i:nth-child(3) {
  bottom: 20%;
  left: 18%;
}
.floating-icons i:nth-child(4) {
  bottom: 15%;
  right: 22%;
}
.floating-icons i:nth-child(5) {
  top: 50%;
  left: 5%;
}
.floating-icons i:nth-child(6) {
  top: 60%;
  right: 6%;
}
.floating-icons i:nth-child(7) {
  top: 40%;
  right: 35%;
}
.floating-icons i:nth-child(8) {
  bottom: 35%;
  left: 40%;
}

/* Floating animation */
.float {
  animation: floatY 6s ease-in-out infinite;
}

.float.slow {
  animation-duration: 8s;
}
.float.medium {
  animation-duration: 6s;
}
.float.fast {
  animation-duration: 4.5s;
}

@keyframes floatY {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

/* =========================
   OTHER SECTIONS
========================= */

.skills {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.skills span {
  padding: 10px 16px;
  background: var(--bg-soft);
  border-radius: var(--radius);
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  padding: 24px;
  background: var(--bg-soft);
  border-radius: var(--radius);
}
/* =========================
   HERO STATS
========================= */

/* =========================
   EXPERIENCE SECTION
========================= */

.experience-timeline {
  position: relative;
  max-width: 800px;
  margin: auto;
}

.experience-timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.experience-card {
  margin-left: 24px;
  position: relative;
  border-left: 4px solid var(--accent);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.exp-date {
  font-size: 0.85rem;
  padding: 4px 12px;
  background: rgba(124, 124, 255, 0.15);
  color: var(--accent);
  border-radius: 99px;
  font-weight: 600;
}

.company {
  color: var(--text);
  margin-bottom: 12px;
  font-weight: 500;
}

/* =========================
   SKILLS GRID
========================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.skill-category h3 {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 1.2rem;
}

/* =========================
   HERO STATS
========================= */

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 28px;
}

.stat h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
}

.stat p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* =========================
   CERTIFICATES (Flip Cards)
========================= */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 2rem;
  perspective: 1000px;
}

.cert-card {
  background-color: transparent;
  width: 100%;
  aspect-ratio: 4 / 3; /* Standard certificate aspect ratio */
  perspective: 1000px;
  cursor: pointer;
}

.cert-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border-radius: var(--radius);
}

.cert-card:hover .cert-inner {
  transform: rotateY(180deg);
}

.cert-front,
.cert-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden; /* Safari */
  backface-visibility: hidden;
  border-radius: var(--radius);
  overflow: hidden;
}

.cert-front {
  background-color: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.cert-back {
  background-color: var(--bg-soft);
  color: var(--text);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border: 1px solid var(--accent);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.cert-back h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.cert-back p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
  .hero-wrapper {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .floating-icons {
    display: none;
  }
}
/* =========================
   CONTACT MODAL
========================= */

.contact-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 2000;
}

.contact-modal.active {
  opacity: 1;
  pointer-events: all;
}

.contact-card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
  border-radius: 20px;
  color: var(--text);
  position: relative;
}

/* Close */
.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

/* Form */
.contact-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.contact-card input,
.contact-card textarea {
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.contact-card input::placeholder,
.contact-card textarea::placeholder {
  color: var(--muted);
}
