/* ==========================================================================
   CSS Variables & Theme Tokens
   ========================================================================== */
:root {
  --bg-deep: #000000;
  --bg-card: rgba(20, 22, 15, 0.92);
  --bg-card-hover: rgba(26, 29, 20, 0.96);
  --border-card: rgba(255, 255, 255, 0.085);
  --border-card-hover: rgba(217, 155, 82, 0.28);

  --text-white: #f7f8f5;
  --text-soft-white: #cbcdc4;
  --text-muted: #a3a69c;
  --text-dim: #85887e;

  --btn-bg: #484738;
  --btn-bg-hover: #5a5946;
  --btn-text: #f3f4ef;

  --accent-amber: #b86b23;
  --accent-gold: #e5a963;
  --accent-green: #34d399;

  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-deep);
  color: var(--text-white);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
}

/* Lock Desktop to 100vh with zero unnecessary scroll */
@media (min-width: 881px) and (min-height: 500px) {

  html,
  body {
    height: 100vh;
    overflow: hidden;
  }
}

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

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

/* ==========================================================================
   Background Layers (Desktop Studio Portrait + Ambient Glow)
   ========================================================================== */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-color: #000000;
}

.bg-desktop-image {
  position: absolute;
  inset: 0;
  background-image: url('assets/bg-desktop.png');
  background-repeat: no-repeat;
  /* Scale by 100% of viewport height so Dr. Fernando's head is never cropped at the top */
  background-size: auto 100%;
  background-position: left bottom;
  transition: opacity 0.4s ease;
}

@media (min-width: 881px) and (max-aspect-ratio: 16/9) {
  .bg-desktop-image {
    background-size: cover;
    background-position: center bottom;
  }
}

.bg-ambient-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 50%,
      rgba(35, 38, 24, 0.14) 0%,
      rgba(0, 0, 0, 0) 60%);
}

/* ==========================================================================
   Desktop Layout (> 880px) — Fits 100% of Chrome Tab Viewport with Zero Scroll
   ========================================================================== */
.mobile-topbar,
.mobile-hero-banner,
.mobile-social-pills,
.mobile-card-tag,
.mobile-footer {
  display: none;
}

.main-wrapper {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.layout-container {
  width: 100%;
  max-width: 1760px;
  height: 100vh;
  display: grid;
  grid-template-columns: max(43vw, 82vh) 1fr;
  align-items: center;
}

.profile-visual {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Right Column sized proportionally to vh & vw so all 4 cards + header fit 100vh without scroll */
.content-column {
  width: clamp(420px, min(42vw, 78vh), 580px);
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Intro / Header on Desktop */
.intro-header {
  margin-bottom: clamp(0.55rem, 1.45vh, 1rem);
}

.specialty-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-heading);
  font-size: clamp(0.64rem, min(0.75vw, 1.35vh), 0.74rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  background: rgba(184, 107, 35, 0.12);
  border: 1px solid rgba(217, 155, 82, 0.25);
  padding: 3.5px 11px;
  border-radius: 999px;
  margin-bottom: clamp(0.35rem, 0.9vh, 0.6rem);
}

.specialty-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-gold);
  box-shadow: 0 0 8px rgba(229, 169, 99, 0.8);
}

.intro-title {
  font-family: var(--font-heading);
  font-size: clamp(1.65rem, min(2.6vw, 4.5vh), 2.45rem);
  line-height: 1.1;
  letter-spacing: -0.022em;
  margin-bottom: clamp(0.32rem, 0.85vh, 0.58rem);
  font-weight: 500;
}

.title-strong {
  color: #ffffff;
  font-weight: 600;
}

.title-soft {
  color: #cbcec6;
  font-weight: 400;
}

.intro-bio {
  font-size: clamp(0.73rem, min(0.88vw, 1.62vh), 0.88rem);
  line-height: 1.38;
  color: var(--text-muted);
  font-weight: 400;
  max-width: 98%;
}

.bio-highlight {
  color: #dcdfd7;
  font-weight: 400;
}

/* Bento Grid of 4 Cards on Desktop */
.cards-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(0.45rem, 1.15vh, 0.72rem);
  width: 100%;
}

.link-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: clamp(0.7rem, 1.6vh, 1.05rem) clamp(0.9rem, 1.9vh, 1.25rem);
  display: flex;
  flex-direction: column;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.28s ease,
    background-color 0.28s ease,
    box-shadow 0.28s ease;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.link-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.card-whatsapp,
.card-google {
  grid-column: 1 / -1;
}

/* Horizontal layout option for top WhatsApp & bottom Google card on Desktop to save vertical height */
.card-google-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem;
}

.card-google-left {
  flex: 1;
  min-width: 0;
}

.card-google .card-desc {
  margin-bottom: 0;
}

.card-google .card-actions {
  margin-top: 0;
  flex-shrink: 0;
}

.card-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(320px circle at var(--mouse-x, 50%) var(--mouse-y, 0%),
      rgba(217, 155, 82, 0.08),
      transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.link-card:hover .card-glow {
  opacity: 1;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(0.3rem, 0.75vh, 0.52rem);
}

.card-google .card-top {
  justify-content: flex-start;
  gap: 0.6rem;
}

.card-icon-badge {
  width: clamp(26px, 3.6vh, 33px);
  height: clamp(26px, 3.6vh, 33px);
  border-radius: 50%;
  background-color: #0b0c08;
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.stars-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(229, 169, 99, 0.1);
  border: 1px solid rgba(229, 169, 99, 0.22);
}

.stars-icons {
  color: #f5b942;
  font-size: clamp(0.65rem, 1.3vh, 0.75rem);
  letter-spacing: 1px;
  line-height: 1;
}

.stars-label {
  font-size: clamp(0.62rem, 1.2vh, 0.7rem);
  color: #d4d6ce;
  font-weight: 500;
}

.card-title {
  font-family: var(--font-heading);
  font-size: clamp(0.88rem, min(1.15vw, 2.05vh), 1.1rem);
  font-weight: 500;
  line-height: 1.2;
  color: #f4f5f0;
  letter-spacing: -0.015em;
  margin-bottom: clamp(0.22rem, 0.55vh, 0.38rem);
}

.word-dim {
  color: #8c8f85;
  font-weight: 400;
}

.word-dim-subtle {
  color: #d6d8d0;
  font-weight: 400;
}

.card-desc {
  font-size: clamp(0.66rem, min(0.76vw, 1.38vh), 0.76rem);
  line-height: 1.36;
  color: #8f9288;
  margin-bottom: clamp(0.5rem, 1.25vh, 0.8rem);
}

.card-whatsapp .card-desc {
  max-width: 96%;
}

.card-actions {
  margin-top: auto;
  position: relative;
  z-index: 3;
}

.card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  font-family: var(--font-heading);
  font-size: clamp(0.68rem, min(0.8vw, 1.42vh), 0.78rem);
  font-weight: 500;
  padding: clamp(0.38rem, 0.92vh, 0.56rem) clamp(1.1rem, 2.4vh, 1.55rem);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: background-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
  white-space: nowrap;
}

.card-website .card-btn,
.card-instagram .card-btn {
  width: 100%;
}

.card-btn:hover {
  background-color: var(--btn-bg-hover);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.card-btn:active {
  transform: scale(0.98);
}

.btn-arrow {
  display: none;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(28, 31, 22, 0.95);
  color: #f4f5f0;
  border: 1px solid rgba(217, 155, 82, 0.35);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 100;
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Medium / Compact Desktop Adjustments (881px – 1180px)
   ========================================================================== */
@media (min-width: 881px) and (max-width: 1180px) {
  .layout-container {
    grid-template-columns: 44% 56%;
  }

  .content-column {
    width: min(480px, 50vw);
  }
}

/* ==========================================================================
   Mobile Linktree View (<= 880px)
   Full-bleed large hero portrait at top + Linktree cards overlapping fade
   ========================================================================== */
@media (max-width: 880px) {

  html,
  body {
    height: auto;
    overflow-y: auto;
    background-color: #060704;
  }

  .bg-stage {
    background: #060704;
  }

  .bg-desktop-image {
    opacity: 0;
    pointer-events: none;
  }

  .bg-ambient-glow {
    background: radial-gradient(circle at 50% 60%,
        rgba(45, 48, 32, 0.15) 0%,
        rgba(6, 7, 4, 0) 70%);
  }

  /* Top Floating Utility Bar over Hero Image */
  .mobile-topbar {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 480px;
    padding: 16px 18px;
  }

  .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 13px;
    border-radius: 999px;
    background: rgba(14, 15, 10, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 0.73rem;
    font-weight: 500;
    color: #ecede8;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  }

  .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulseStatus 2.2s infinite ease-in-out;
  }

  @keyframes pulseStatus {

    0%,
    100% {
      transform: scale(1);
      opacity: 1;
    }

    50% {
      transform: scale(1.25);
      opacity: 0.65;
    }
  }

  .share-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(14, 15, 10, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #f4f5f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  }

  .share-btn:hover,
  .share-btn:active {
    background: rgba(34, 36, 26, 0.9);
    border-color: rgba(217, 155, 82, 0.45);
    transform: scale(1.05);
  }

  /* Main Container on Mobile */
  .main-wrapper {
    height: auto;
    min-height: 100vh;
    align-items: flex-start;
    padding: 0 0 40px;
    width: 100%;
  }

  .layout-container {
    width: 100%;
    max-width: 480px;
    height: auto;
    margin: 0 auto;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  /* Full-Bleed Large Hero Portrait at Top of Mobile Screen */
  .profile-visual {
    width: 100%;
    position: relative;
    z-index: 1;
    pointer-events: none;
  }

  .mobile-hero-banner {
    display: block;
    position: relative;
    width: 100%;
    height: clamp(540px, 140vw, 650px);
    overflow: hidden;
  }

  .mobile-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 12%;
    display: block;
  }

  /* Smooth dark fade at the bottom so text & cards sit seamlessly over it */
  .mobile-hero-fade {
    position: absolute;
    inset: 0;
    background:
      linear-gradient(180deg,
        rgba(6, 7, 4, 0.4) 0%,
        rgba(6, 7, 4, 0) 15%,
        rgba(6, 7, 4, 0) 58%,
        rgba(6, 7, 4, 0.45) 75%,
        rgba(6, 7, 4, 0.88) 88%,
        #060704 100%);
  }

  /* Content Column overlapping the bottom fade of the large portrait */
  .content-column {
    position: relative;
    z-index: 5;
    width: 100%;
    min-width: 0;
    margin-top: -30px;
    padding: 0 18px;
    align-items: center;
  }

  .intro-header {
    width: 100%;
    text-align: center;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .specialty-badge {
    font-size: 0.68rem;
    background: rgba(18, 15, 10, 0.78);
    border: 1px solid rgba(217, 155, 82, 0.34);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 4.5px 13px;
    margin-bottom: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  }

  .intro-title {
    font-size: clamp(1.65rem, 6.5vw, 2rem);
    margin-bottom: 8px;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
  }

  .intro-bio {
    font-size: 0.84rem;
    line-height: 1.48;
    max-width: 400px;
    color: #b8bbb1;
    margin-bottom: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
  }

  /* Linktree Stacked Cards on Mobile */
  .cards-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
    width: 100%;
  }

  .link-card {
    width: 100%;
    border-radius: 16px;
    padding: 17px 19px;
    background: linear-gradient(160deg, rgba(25, 28, 19, 0.94) 0%, rgba(15, 17, 12, 0.97) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.48),
      inset 0 1px 0 rgba(255, 255, 255, 0.07);
  }

  .card-whatsapp {
    background: linear-gradient(155deg, rgba(31, 34, 23, 0.96) 0%, rgba(17, 19, 13, 0.98) 100%);
    border-color: rgba(217, 155, 82, 0.26);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55),
      0 0 24px rgba(184, 107, 35, 0.09),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }

  /* Stack Google card vertically like the other Linktree cards on Mobile */
  .card-google-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .card-top {
    margin-bottom: 10px;
  }

  .card-google .card-top {
    justify-content: space-between;
  }

  .card-icon-badge {
    width: 38px;
    height: 38px;
    background-color: #0c0d09;
    border-color: rgba(255, 255, 255, 0.12);
  }

  .mobile-card-tag {
    display: inline-flex;
    align-items: center;
    padding: 3.5px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 500;
    color: #b8bbb0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
  }

  .card-whatsapp .mobile-card-tag {
    color: #e3a862;
    background: rgba(184, 107, 35, 0.14);
    border-color: rgba(217, 155, 82, 0.25);
  }

  .card-title {
    font-size: 1.08rem;
    margin-bottom: 5px;
  }

  .card-desc,
  .card-google .card-desc {
    font-size: 0.81rem;
    line-height: 1.46;
    color: #96998f;
    margin-bottom: 14px;
    max-width: 100%;
  }

  .card-actions {
    width: 100%;
  }

  .card-btn {
    width: 100%;
    padding: 11px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    background: linear-gradient(180deg, #525140 0%, #434234 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  }

  .card-whatsapp .card-btn {
    background: linear-gradient(180deg, #5b5a46 0%, #484738 100%);
    border-color: rgba(255, 255, 255, 0.14);
  }

  .btn-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
  }

  .card-btn:hover .btn-arrow,
  .card-btn:active .btn-arrow {
    transform: translateX(3px);
  }

  .mobile-social-pills {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
  }

  .social-pill {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(22, 25, 17, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e4e6df;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  }

  .social-pill:hover,
  .social-pill:active {
    transform: translateY(-2px);
    border-color: rgba(217, 155, 82, 0.45);
    background: rgba(34, 38, 26, 0.95);
    color: #ffffff;
  }

  .mobile-footer {
    display: block;
    margin-top: 18px;
    text-align: center;
    font-size: 0.73rem;
    color: #64675e;
  }
}