/* ==========================================================================
   Premium Protected Project Gate
   - Minimal, corporate, premium aesthetic
   - Scoped class names to avoid conflicts with existing site CSS
   ========================================================================== */

:root {
  --premium-bg: #0b0d12;
  --premium-surface: rgba(255, 255, 255, 0.06);
  --premium-surface-2: rgba(255, 255, 255, 0.09);
  --premium-border: rgba(255, 255, 255, 0.12);
  --premium-text: rgba(255, 255, 255, 0.92);
  --premium-muted: rgba(255, 255, 255, 0.68);
  --premium-faint: rgba(255, 255, 255, 0.58); /* Fixed: was 0.42 (4.0:1) → 0.58 (5.7:1) for WCAG 1.4.3 */
  --premium-accent: #ffb646;
  --premium-danger: #ff5c7a;
  --premium-success: #39d98a;
  --premium-shadow: 0 24px 90px rgba(0, 0, 0, 0.45);
}

/* Section wrapper */
.premium-section {
  padding: 96px 0;
  background:
    radial-gradient(1200px 600px at 15% 10%, rgba(255, 182, 70, 0.18), transparent 55%),
    radial-gradient(900px 500px at 85% 0%, rgba(120, 150, 255, 0.12), transparent 50%),
    linear-gradient(180deg, #0b0d12 0%, #0b0d12 100%);
  color: var(--premium-text);
  position: relative;
  overflow: hidden;
}

.premium-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.premium-header {
  margin-bottom: 24px;
  text-align: center;
}

.premium-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--premium-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--premium-muted);
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-size: 12px;
}

.premium-title {
  margin: 14px 0 8px;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--premium-text);
}

.premium-subtitle {
  margin: 0 auto;
  max-width: 62ch;
  color: var(--premium-muted);
  font-size: 15px;
  line-height: 1.7;
}

.premium-container {
  margin-top: 22px;
  border-radius: 20px;
  border: 1px solid var(--premium-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.32);
  overflow: hidden;
  min-height: 320px;
}

/* Placeholder skeleton (no premium content in HTML) */
.premium-placeholder {
  padding: 28px;
}

.premium-skeleton-line {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.16), rgba(255,255,255,0.08));
  background-size: 200% 100%;
  animation: premiumShimmer 1.35s ease-in-out infinite;
  margin: 10px 0;
}

.premium-skeleton-line.w-60 { width: 60%; }
.premium-skeleton-line.w-80 { width: 80%; }
.premium-skeleton-line.w-90 { width: 90%; }

.premium-skeleton-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.premium-skeleton-card {
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  height: 120px;
  background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.12), rgba(255,255,255,0.06));
  background-size: 200% 100%;
  animation: premiumShimmer 1.35s ease-in-out infinite;
}

@keyframes premiumShimmer {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

@media (max-width: 860px) {
  .premium-skeleton-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Gate overlay + modal
   ========================================================================== */

.premium-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 260ms ease, transform 260ms ease;
}

.premium-gate.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}

.premium-gate__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.premium-gate__panel {
  position: relative;
  width: min(520px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(800px 260px at 30% 0%, rgba(255, 182, 70, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(18, 20, 28, 0.92), rgba(10, 12, 18, 0.92));
  box-shadow: var(--premium-shadow);
  padding: 26px 22px 22px;
  transform: translateY(0);
  animation: premiumGateIn 260ms ease both;
}

@keyframes premiumGateIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.premium-gate__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--premium-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.premium-gate__title {
  margin: 14px 0 8px;
  font-size: 18px;
  letter-spacing: -0.2px;
  color: var(--premium-text);
}

.premium-gate__text {
  margin: 0 0 14px;
  color: var(--premium-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ==========================================================================
   Form elements
   ========================================================================== */

.premium-form {
  display: grid;
  gap: 12px;
}

.premium-field {
  display: grid;
  gap: 8px;
}

.premium-label {
  color: var(--premium-faint);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.premium-input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--premium-text);
  outline: none;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.premium-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.premium-input:focus {
  border-color: rgba(255, 182, 70, 0.55);
  background: rgba(255, 255, 255, 0.08);
}

.premium-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 182, 70, 0.55);
  background: linear-gradient(180deg, rgba(255, 182, 70, 0.98), rgba(255, 167, 42, 0.98));
  color: rgba(15, 16, 20, 0.98);
  font-weight: 800;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, opacity 160ms ease;
}

.premium-btn:hover { transform: translateY(-1px); filter: brightness(1.02); }
.premium-btn:active { transform: translateY(0); }

.premium-btn[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

.premium-btn__spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.22);
  border-top-color: rgba(0, 0, 0, 0.72);
  display: none;
  animation: premiumSpin 900ms linear infinite;
}

.premium-btn.is-loading .premium-btn__spinner { display: inline-block; }
.premium-btn.is-loading .premium-btn__text { opacity: 0.88; }

@keyframes premiumSpin {
  to { transform: rotate(360deg); }
}

.premium-message {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.45;
  min-height: 18px;
  color: var(--premium-muted);
}

.premium-message.is-error { color: var(--premium-danger); }
.premium-message.is-success { color: var(--premium-success); }
.premium-message.is-info { color: var(--premium-muted); }

.premium-footnote {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  line-height: 1.5;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .premium-gate,
  .premium-gate__panel,
  .premium-skeleton-line,
  .premium-skeleton-card,
  .premium-btn__spinner {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   Hero Section — 2-Column Flow Layout (Text Left, Video Right)
   Uses Bootstrap grid (col-md-7 / col-md-5) with Flexbox alignment.
   NO position:absolute on the video — it sits in the normal document flow.
   ========================================================================== */

/* --- Overflow protection on the hero section --- */
.bg-secondary.position-relative.pt-140.pb-90 {
  overflow: hidden;
}

/* --- Hero row: Bootstrap row with vertical centering via align-items-center.
       min-height ensures the section feels substantial on large screens --- */
.hero-row {
  row-gap: 2rem; /* Spacing when columns stack on mobile */
}

/* --- Hero text column: ensure it layers above in case of overlap --- */
.hero-content-wrapper {
  position: relative;
  z-index: 1;
}

/* --- Video column: Flexbox centering, no absolute positioning --- */
.hero-video-col {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 0;
}

/* --- The video element: proportional scaling, no stretch/crop --- */
.hero-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: clamp(320px, 55vh, 700px); /* Responsive height cap */
  object-fit: contain;    /* Full character always visible */
  object-position: center;
}

/* --- Neutralize legacy .hero-image max-width rules from home.css --- */
.hero-image {
  max-width: none !important;
}

/* --- Contact spin badge: stays absolutely positioned relative to <section> --- */
.contact-spin {
  z-index: 2;
  pointer-events: auto;
}

/* ====================================================================
   Responsive Breakpoints
   ==================================================================== */

/* =======================================================================
   MOBILE (<768px) — Comprehensive Responsiveness Fixes
   - Hero video hidden (via d-none d-md-flex in HTML, no empty space)
   - Hero heading scaled down to fit viewport
   - About section profile info stacked vertically
   - Global horizontal overflow prevention
   ======================================================================= */
@media only screen and (max-width: 767.98px) {

  /* --- Global: prevent horizontal scrollbar on all pages --- */
  html,
  body {
    overflow-x: hidden !important;
  }

  /* --- Global: ensure all media stays within viewport --- */
  img,
  video,
  iframe,
  svg {
    max-width: 100%;
    height: auto;
  }

  /* --- Hero: reduce excessive top/bottom padding for mobile --- */
  .pt-140 {
    padding-top: 80px !important;
  }
  .pb-90 {
    padding-bottom: 50px !important;
  }

  /* --- Hero: remove row-gap since video column is hidden --- */
  .hero-row {
    row-gap: 0;
  }

  /* --- Hero: scale heading to fit mobile viewport ---
         80px default is way too large; clamp from 44px to 70px */
  .hero-title {
    font-size: clamp(44px, 11vw, 70px) !important;
    line-height: 1.05 !important;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* --- Hero: circle-shape decorative pseudo-element, scale down --- */
  .circle-shape::before,
  .section-title.circle-shape::before {
    width: 50px !important;
    height: 50px !important;
  }

  /* --- Hero: button wrapper spacing --- */
  .hero-btn-wraper {
    margin-bottom: 30px !important;
  }

  /* --- Hero: reduce large left/right margins on the divider --- */
  .mx-8 {
    margin-left: 12px !important;
    margin-right: 12px !important;
  }

  /* --- Hero: counter font size --- */
  .text-counter {
    font-size: 36px !important;
  }

  /* =================================================================
     About Section — Profile Info List
     Each <li> uses d-inline-flex with a fixed-width label (w-110px)
     and a large value (text-2xl). On mobile, stack vertically and
     enable word wrapping for long strings like email and LinkedIn.
     ================================================================= */

  /* Stack label + value vertically instead of side-by-side */
  #about_me_tab .tab-contents ul > li {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  /* Remove fixed label width on mobile */
  #about_me_tab .tab-contents .w-110px {
    width: auto !important;
    font-size: 14px !important;
  }

  /* Scale down value text and force word wrapping */
  #about_me_tab .tab-contents .text-2xl {
    font-size: clamp(16px, 4.5vw, 22px) !important;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
  }

  /* Ensure tab content container doesn't overflow */
  .tab-content,
  .tab-contents {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* --- About: based-in title responsive --- */
  .based-in-Pune-title-tab,
  .based-in-german-title-tab {
    font-size: 20px !important;
    line-height: 1.3 !important;
  }

  /* --- General: ensure all Bootstrap containers have mobile padding --- */
  .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* --- General: section horizontal overflow protection --- */
  section {
    overflow-x: hidden;
  }

  /* --- General: prevent long text from breaking layout --- */
  .paragraph,
  .text-lg,
  .text-xl,
  .text-2xl {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* --- Floating widgets: ensure they don't cover bottom content --- */
  .contact-spin {
    display: none !important;
  }
}

/* ----- Tablet (768px – 991px) ----- */
@media only screen and (min-width: 768px) and (max-width: 991px) {
  .hero-video {
    max-height: clamp(280px, 45vh, 480px);
  }
}

/* ----- Small Laptop (992px – 1199px) ----- */
@media only screen and (min-width: 992px) and (max-width: 1199px) {
  .hero-video {
    max-height: clamp(350px, 50vh, 560px);
  }
}

/* ----- Laptop (1200px – 1440px) ----- */
@media only screen and (min-width: 1200px) and (max-width: 1440px) {
  .hero-video {
    max-height: clamp(400px, 55vh, 620px);
  }
}

/* ----- Desktop (1441px – 1919px) ----- */
@media only screen and (min-width: 1441px) and (max-width: 1919px) {
  .hero-video {
    max-height: clamp(450px, 58vh, 700px);
  }
}

/* ----- Large Desktop / 4K (1920px+) ----- */
@media only screen and (min-width: 1920px) {
  .hero-video {
    max-height: clamp(500px, 60vh, 800px);
  }
}

/* --- Reduced motion preference --- */
@media (prefers-reduced-motion: reduce) {
  .hero-video {
    animation: none !important;
  }
}
