/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #F5F1EB;
  color: #343F4B;
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  overflow-x: hidden;
  position: relative;
}

/* ===== Background: Corner Blobs ===== */
.blobs {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.blobs__shape {
  position: absolute;
}

/* Top-left: dusty sage, spilling into card area */
.blobs__shape--tl {
  width: 55vw;
  height: 65vh;
  top: -10vh;
  left: -8vw;
  background: #7A9E8C;
  opacity: 0.45;
  filter: blur(90px);
  border-radius: 70% 30% 60% 40% / 50% 60% 40% 50%;
}

/* Bottom-right: smoky slate, spilling into card area */
.blobs__shape--br {
  width: 60vw;
  height: 65vh;
  bottom: -10vh;
  right: -8vw;
  background: #6B7F94;
  opacity: 0.40;
  filter: blur(90px);
  border-radius: 40% 60% 35% 65% / 60% 40% 65% 35%;
}

/* Center: connecting glow */
.blobs__shape--center {
  width: 35vw;
  height: 35vw;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #A0B5A8;
  opacity: 0.25;
  filter: blur(120px);
  border-radius: 50%;
}

@media (max-width: 768px) {
  .blobs__shape--tl {
    width: 70vw; height: 40vh; filter: blur(80px);
  }
  .blobs__shape--br {
    width: 80vw; height: 45vh; filter: blur(90px);
  }
  .blobs__shape--center {
    width: 50vw; height: 50vw; filter: blur(120px);
  }
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 2.5rem;
  background-color: rgba(245, 241, 235, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header__name {
  font-family: 'Manrope', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.header__description {
  font-size: 0.9rem;
  color: #555;
  text-align: center;
  transition: opacity 0.3s ease;
}

.header__about-btn {
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  min-width: 7.5rem;
  padding: 0.55rem 2.25rem;
  border: 1.5px solid #343F4B;
  border-radius: 100px;
  background: transparent;
  color: #343F4B;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
}

.header__about-btn:hover {
  background-color: #343F4B;
  color: #F5F1EB;
}

/* Active state when overlay is open */
.header__about-btn--active {
  background-color: #343F4B;
  color: #F5F1EB;
}

/* ===== About Overlay ===== */
.about-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6rem 2.5rem 3rem;
  background-color: rgba(245, 241, 235, 0.97);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.about-overlay--visible {
  opacity: 1;
  visibility: visible;
}

.about-overlay__content {
  max-width: 700px;
  font-family: 'Playfair Display', serif;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.7;
  color: #343F4B;
}

.about-overlay__content p {
  margin-bottom: 1.5em;
}

.about-overlay__content p:last-child {
  margin-bottom: 0;
}

.about-overlay__content a {
  color: #4A7C6F;
  text-decoration: underline;
  text-decoration-color: rgba(74, 124, 111, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}
.about-overlay__content a:hover {
  color: #3A6A5D;
  text-decoration-color: rgba(74, 124, 111, 0.7);
}

/* ===== Cards ===== */
.cards {
  flex: 1;
  display: flex;
  align-items: center;
  align-content: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3vw;
  padding: 6rem 2.5rem 3rem;
}

.card {
  /* Size & shape */
  width: min(28vh, 280px);
  height: min(28vh, 280px);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;

  /* Layout */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-decoration: none;
  color: #343F4B;
  cursor: pointer;

  /* Base glass — transparent, glassy */
  background: radial-gradient(
    ellipse at 30% 20%,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.08) 35%,
    rgba(255, 255, 255, 0.02) 60%,
    transparent 100%
  );
  backdrop-filter: blur(24px) saturate(200%) brightness(1.05);
  -webkit-backdrop-filter: blur(24px) saturate(200%) brightness(1.05);

  /* Thin glassy border — brighter on top, fading at bottom */
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-top-color: rgba(255, 255, 255, 0.7);
  border-bottom-color: rgba(255, 255, 255, 0.2);

  /* Shadow: glossy outer glow + inner light rim */
  box-shadow:
    0 8px 60px rgba(0, 0, 0, 0.06),
    0 2px 20px rgba(0, 0, 0, 0.03),
    inset 0 2px 30px rgba(255, 255, 255, 0.3),
    inset 0 -2px 20px rgba(255, 255, 255, 0.05);

  /* Animation */
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.6s ease,
              backdrop-filter 0.6s ease,
              -webkit-backdrop-filter 0.6s ease;

  overflow: hidden;
}

/* === Rainbow / iridescent sheen === */
.card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background:
    conic-gradient(
      from 200deg,
      rgba(255, 200, 210, 0.0) 0deg,
      rgba(180, 210, 255, 0.3) 50deg,
      rgba(180, 255, 220, 0.25) 110deg,
      rgba(255, 240, 200, 0.2) 170deg,
      rgba(210, 190, 255, 0.3) 230deg,
      rgba(180, 235, 255, 0.25) 290deg,
      rgba(255, 200, 210, 0.0) 360deg
    ),
    radial-gradient(
      ellipse at 70% 80%,
      rgba(180, 220, 255, 0.2) 0%,
      transparent 60%
    );
  opacity: 0.8;
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

/* === Top-left highlight (glossy light reflection) === */
.card::after {
  content: '';
  position: absolute;
  width: 50%;
  height: 38%;
  top: 6%;
  left: 10%;
  background: radial-gradient(
    ellipse at 45% 40%,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.45) 30%,
    rgba(255, 255, 255, 0.1) 55%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

/* === Muted / frozen card === */
.card--muted { pointer-events: none; opacity: 0.7; }
.card--muted::before { opacity: 0.3; }
.card--muted .card__text { color: #9AAAB8; }
.card--muted .card__badge { display: block; font-size: 0.7rem; font-weight: 400; color: #9AAAB8; margin-top: 0.35rem; letter-spacing: 0.03em; }

/* === Hover === (main rule moved after animation declarations for specificity) */

.card:hover::before {
  opacity: 1;
  transform: rotate(30deg);
}

/* === Floating animation === */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Float animation on wrapper — independent from card transform */
.card-float { display: inline-block; }
.card-float:nth-child(1) { animation: float 6s ease-in-out infinite; }
.card-float:nth-child(2) { animation: float 7s ease-in-out 0.5s infinite; }
.card-float:nth-child(3) { animation: float 5.5s ease-in-out 1s infinite; }

/* Hover scale on the card itself — no conflict with float */
.card:hover {
  transform: scale(1.08);
  box-shadow:
    0 20px 80px rgba(0, 0, 0, 0.08),
    0 8px 30px rgba(0, 0, 0, 0.05),
    inset 0 2px 40px rgba(255, 255, 255, 0.45),
    inset 0 -2px 30px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(30px) saturate(220%) brightness(1.08);
  -webkit-backdrop-filter: blur(30px) saturate(220%) brightness(1.08);
}

.card__text {
  position: relative;
  z-index: 2;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  font-weight: 300;
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

/* Fallback for browsers without backdrop-filter */
@supports not (backdrop-filter: blur(20px)) {
  .card {
    background: rgba(240, 235, 225, 0.92);
  }
  .header {
    background-color: rgba(245, 241, 235, 0.95);
  }
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 1.5rem 2.5rem;
}

.footer__email {
  font-size: 0.85rem;
  color: #888;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer__email:hover {
  color: #343F4B;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header {
    padding: 1rem 1.25rem;
  }

  .header__description {
    display: none;
  }

  .cards {
    flex-direction: column;
    flex-wrap: nowrap;
    flex: 0;
    gap: 1.25rem;
    padding: 5rem 1rem 1.5rem;
    align-items: center;
    justify-content: flex-start;
  }

  .card {
    width: 160px;
    height: 160px;
    padding: 1.25rem;
  }

  .card__text {
    font-size: 1rem;
  }

  .card:nth-child(1),
  .card:nth-child(2),
  .card:nth-child(3) {
    animation-duration: 4s;
  }

  .about-overlay {
    padding: 5rem 1.25rem 2rem;
  }

  .about-overlay__content {
    font-size: 1rem;
  }

  .footer {
    padding: 1rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .header__name {
    font-size: 1rem;
  }

  .header__about-btn {
    font-size: 0.8rem;
    padding: 0.45rem 1.5rem;
  }

  .card {
    width: 140px;
    height: 140px;
    padding: 1rem;
  }

  .card__text {
    font-size: 0.9rem;
  }
}
