/* -----------------------------------------------------------------------------
   GLOBAL & RESET
----------------------------------------------------------------------------- */
:root {
  --color-bg: #fbfbfb;
  --color-surface: rgba(255, 255, 255, 0.7);
  --color-surface-solid: #ffffff;
  --color-text-primary: #1d1d1f;
  --color-text-secondary: #86868b;
  --color-accent: #0071e3;
  --color-accent-dark: #0077ed;
  --color-border: rgba(0, 0, 0, 0.04);

  --font-main: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 10px 30px -4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 50px -10px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.05);

  --max-width: 1200px;
  --nav-height: 60px;
}

/* Dark Mode Preference (Optional Enhancement) */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #101010;
    --color-surface: rgba(28, 28, 30, 0.7);
    --color-surface-solid: #1c1c1e;
    --color-text-primary: #f5f5f7;
    --color-text-secondary: #a1a1a6;
    --color-border: rgba(255, 255, 255, 0.08);
    --shadow-md: 0 10px 30px -4px rgba(0, 0, 0, 0.3);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

img {
  display: block;
  max-width: 100%;
}

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

/* -----------------------------------------------------------------------------
   NAVIGATION (Glassmorphism)
----------------------------------------------------------------------------- */
.glass-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  padding: 0 24px;
  height: var(--nav-height);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-content {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

.logo-title,
.logo-divider {
  display: inline;
}

@media (max-width: 600px) {

  .logo-title,
  .logo-divider {
    display: none;
    /* Hide subtitle on mobile to save space */
  }
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.nav-links a:hover {
  color: var(--color-text-primary);
}

.nav-btn {
  background: var(--color-text-primary);
  color: var(--color-bg) !important;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.nav-btn:hover {
  transform: scale(1.05);
}

/* -----------------------------------------------------------------------------
   HERO SECTION & 3D CARD
----------------------------------------------------------------------------- */
.hero-section {
  min-height: 100vh;
  padding: 120px 24px 60px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-container {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text-content {
  max-width: 560px;
}

.eyebrow {
  display: block;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  color: var(--color-accent);
  margin-bottom: 16px;
}

h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-text-content p {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
  font-weight: 400;
}

.btn-primary {
  background: var(--color-accent);
  color: white;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  box-shadow: 0 8px 20px rgba(0, 113, 227, 0.3);
  transform: translateY(-2px);
}

/* --- 3D Card Scene --- */
.card-scene-container {
  display: flex;
  justify-content: center;
  perspective: 1200px;
}

.card-scene {
  width: 320px;
  height: 480px;
  position: relative;
}

.business-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  /* No transition here - JS handles smooth lerped animation */
  border-radius: var(--radius-md);
  cursor: grab;
}

.business-card:active {
  cursor: grabbing;
}

/* Card Faces */
.card-face {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  background: var(--color-surface-solid);
  display: flex;
  flex-direction: column;
  z-index: 1;
  /* Safari iOS fix: properly clip rounded corners with 3D transforms */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
}

/* Specific fix for backface visibility on iOS */
.card-back {
  transform: rotateY(180deg);
}

/* Front Face Styles */
.card-front {
  background: var(--color-surface-solid);
  border-radius: 20px;
  overflow: hidden;
  /* Safari iOS fix: use mask to properly clip rounded corners with 3D transforms */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
}

/* Molten Liquid Background */
.liquid-bg {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  /* Light Mode Liquid */
  background: radial-gradient(circle at 50% 50%, #eeedff 0%, #dfe9f3 25%, #dcecfb 50%, var(--color-surface-solid) 100%);
  filter: blur(40px);
  z-index: 0;
  animation: liquidMove 10s infinite alternate ease-in-out;
}

@media (prefers-color-scheme: dark) {
  .liquid-bg {
    /* Dark Mode Liquid */
    background: radial-gradient(circle at 50% 50%, #2c2c2e 0%, #1c1c1e 40%, #000000 100%);
  }
}

@keyframes liquidMove {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  100% {
    transform: translate(-20px, 20px) rotate(5deg);
  }
}

.card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: auto;
}

.card-logo-img {
  height: 48px;
  /* Adjust as needed */
  width: auto;
  object-fit: contain;
}

.card-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.profile-img-container {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 24px;
  border: 4px solid var(--color-surface-solid);
  box-shadow: var(--shadow-md);
}


.card-profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  text-align: center;
  margin-bottom: auto;
}

.card-name {
  font-size: 1.75rem;
  /* Increased from 1.5rem */
  font-weight: 800;
  /* Extra bold */
  color: var(--color-text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

.card-role {
  font-size: 1.1rem;
  /* Increased from 1rem */
  font-weight: 500;
  color: var(--color-text-secondary);
}

.card-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  opacity: 0.7;
}

/* Back Face Styles */
.card-back {
  background: #1d1d1f;
  color: white;
  transform: rotateY(180deg);
  justify-content: center;
  align-items: center;
}

.back-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  gap: 16px;
  padding: 20px;
  /* Keep content inside card boundaries */
  box-sizing: border-box;
}

.qr-container {
  background: white;
  padding: 12px;
  border-radius: 16px;
}

.qr-code {
  width: 140px;
  height: 140px;
  display: block;
}

/* Contact item text overflow handling */
.contact-item span {
  word-break: break-all;
  /* allow long email to wrap */
  overflow-wrap: anywhere;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  /* Prevent overflow */
}

/* Pointer Events Logic for Faces */
.card-front {
  pointer-events: auto;
}

/* Ensure back face is visible when flipped */
.card-back {
  pointer-events: none;
  transform: rotateY(180deg);
  z-index: 2;
  /* sit above front when flipped */
  opacity: 0;
  /* hidden by default */
}

.business-card.is-flipped .card-front {
  pointer-events: none;
  opacity: 0;
  /* Hide front content completely when flipped */
  transition: opacity 0.2s step-end;
  /* Instant hide after half flip? No, keep it simple */
  transition: opacity 0.3s ease;
}

.business-card.is-flipped .card-back {
  pointer-events: auto;
  opacity: 1;
  /* make back visible when flipped */
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-size: 0.85rem;
  color: white;
  transition: background 0.2s;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  /* Clip any overflow */
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.2);
}

.contact-item i {
  font-size: 1.1rem;
}

.flip-back-btn {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  text-decoration: underline;
}

/* Glare Effect */
.glare {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 60%);
  border-radius: var(--radius-md);
  pointer-events: none;
  z-index: 5;
  opacity: 0.5;
  mix-blend-mode: overlay;
}

.business-card.is-flipped {
  transform: rotateY(180deg);
}

/* -----------------------------------------------------------------------------
   PROJECTS SECTION (BENTO GRID)
----------------------------------------------------------------------------- */
.projects-section {
  padding: 80px 24px;
  background: var(--color-bg);
  /* Seamless transition */
}

.section-header {
  max-width: var(--max-width);
  margin: 0 auto 60px;
  text-align: center;
}

.section-header h2 {
  font-size: 3rem;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--color-text-primary);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  grid-auto-flow: dense;
}

.bento-card {
  position: relative;
  background: var(--color-surface-solid);
  /* Card needs to pop against BG */
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  height: 360px;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  /* Silky smooth Apple-like spring */
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  will-change: transform;
}

.bento-card:hover {
  transform: translateY(-8px) scale(1.025);
  /* The "Bulge" / Lift effect */
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.25);
  /* Deep, soft shadow */
  z-index: 10;
  border-color: rgba(255, 255, 255, 0.4);
  /* Subtle highlight */
}

/* Bento Spans (Desktop) */
@media (min-width: 768px) {
  .span-2 {
    grid-column: span 2;
  }
}

.card-image-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.bento-card:hover .card-image-wrapper img {
  transform: scale(1.05);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 40%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  color: white;
  opacity: 1;
  /* Always visible for functional UX */
  transition: opacity 0.3s ease;
}

.featured-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(0, 0, 0, 0.4);
  /* Darker semi-transparent background */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 20;
  pointer-events: none;
  /* Let clicks pass through to card */
}

.featured-badge i {
  color: #fbbf24;
  /* Gold star color */
}

.card-overlay h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  /* Lift text off background */
}

.card-overlay p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 16px;
  line-height: 1.5;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.btn-text {
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.bento-card:hover .btn-text {
  opacity: 1;
  transform: translateY(0);
}

/* -----------------------------------------------------------------------------
   ABOUT SECTION
----------------------------------------------------------------------------- */
.about-section {
  padding: 120px 24px;
  background: var(--color-bg);
}

.about-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 80px;
}

.about-text h2 {
  font-size: 2.5rem;
  margin-bottom: 24px;
}

.stats-list {
  list-style: none;
  display: flex;
  gap: 40px;
  margin-top: 40px;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-accent);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.tech-stack h3 {
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tags span {
  padding: 8px 16px;
  background: var(--color-surface-solid);
  border-radius: 99px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

/* -----------------------------------------------------------------------------
   FOOTER
----------------------------------------------------------------------------- */
.site-footer {
  padding: 60px 24px;
  padding-bottom: 100px;
  /* Extra space for fixed FAB button */
  background: var(--color-surface-solid);
  border-top: 1px solid var(--color-border);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-text-secondary);
}

.socials {
  display: flex;
  gap: 20px;
  font-size: 1.25rem;
}

/* -----------------------------------------------------------------------------
   FAB & MODALS
----------------------------------------------------------------------------- */
.fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--color-surface-solid);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 16px 24px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  color: var(--color-text-primary);
  z-index: 900;
  transition: transform 0.3s ease;
  border: 1px solid var(--color-border);
}

.fab:hover {
  transform: scale(1.05);
}

/* Form Modal */
.modal-form-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-form-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-form-card {
  background: var(--color-surface-solid);
  /* Adaptive background */
  padding: 40px;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--color-border);
  /* Add border for definition */
}

.modal-form-overlay.active .modal-form-card {
  transform: translateY(0);
}

.close-form-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 24px;
  color: var(--color-text-secondary);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.contact-form input,
.contact-form textarea {
  padding: 16px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  /* Brighter surface for input */
  color: var(--color-text-primary);
  /* Adaptive text color (Black on Light, White on Dark) */
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--color-accent);
  border-color: transparent;
}

.btn-submit {
  background: var(--color-accent);
  color: white;
  padding: 16px;
  border-radius: 12px;
  font-weight: 600;
}

/* Project Modal */
.project-modal {
  z-index: 3000;
  position: fixed;
  inset: 0;
  background: var(--color-surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* Full screen distinct feel */
  display: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* Momentum scroll on iOS */
  scroll-behavior: smooth;
}

.project-modal.active {
  display: block;
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.project-modal-content {
  max-width: 1000px;
  margin: 60px auto;
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  /* Add Slide Up for premium feel */
  animation: slideUpModal 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform: translateY(40px);
}

@media (max-width: 768px) {
  .project-modal-content {
    margin: 0;
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    /* Simplify animation on mobile */
    animation: none;
  }

  .project-modal {
    padding: 0;
    overflow-y: scroll;
    /* Force native scroll behavior */
  }

  .project-info {
    padding: 24px;
    /* More reasonable padding for mobile */
    padding-bottom: 80px;
    /* Space for close button */
  }
}

@keyframes slideUpModal {
  to {
    transform: translateY(0);
  }
}

/* Hero image layout - image on top, text below */
.project-modal-body {
  display: flex;
  flex-direction: column;
}

.project-media {
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  max-height: 60vh;
  /* Limit height so text is visible without scrolling */
  overflow: hidden;
}

.project-media img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 55vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.project-info {
  padding: 48px;
  /* Remove nested scroll so whole modal scrolls */
  color: var(--color-text-primary);
}

/* Hide duplicate title if markdown provides it */
.project-info>h3 {
  display: none;
}

.close-project {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 24px;
  color: var(--color-text-primary);
  /* Adaptive color */
  z-index: 10;
  cursor: pointer;
  background: var(--color-surface);
  /* Adaptive background */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.close-project:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

/* Markdown Content Styling */
.markdown-content h1 {
  font-family: 'Inter', sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  line-height: 1.2;
  color: var(--color-text-primary);
}

.markdown-content h2 {
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
  /* Divider line */
  color: var(--color-text-primary);
}

.markdown-content p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.markdown-content ul {
  padding-left: 20px;
  margin-bottom: 24px;
}

.markdown-content li {
  margin-bottom: 10px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  position: relative;
}

.markdown-content li::marker {
  color: var(--color-accent);
  /* Color accents for bullets */
}

.markdown-content strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

.btn-link {
  display: inline-block;
  padding: 12px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  /* Pill shape */
  font-weight: 600;
  font-size: 0.9rem;
  margin-right: 12px;
  margin-top: 32px;
  text-decoration: none;
  transition: all 0.2s ease;
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
}

.btn-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-text-primary);
}

/* --- Scroll Animations --- */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  /* Subtle scale for depth */
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
  /* "Apple-style" ease-out */
  filter: blur(4px);
  /* Blur-in effect */
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* Staggered Delays */
.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

/* --- Smooth Hero Entrance --- */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* Skeleton Loading State (Premium UX) */
.skeleton-loader {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.skeleton-text {
  height: 16px;
  background: #e0e0e0;
  border-radius: 4px;
  width: 100%;
  animation: shimmer 1.5s infinite linear;
  background: linear-gradient(to right, #eeeeee 8%, #dddddd 18%, #eeeeee 33%);
  background-size: 800px 104px;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-text.title {
  height: 24px;
  width: 40%;
  margin-bottom: 8px;
}

@keyframes shimmer {
  0% {
    background-position: -468px 0;
  }

  100% {
    background-position: 468px 0;
  }
}

@media (prefers-color-scheme: dark) {
  .skeleton-text {
    background: #2c2c2e;
    background: linear-gradient(to right, #2c2c2e 8%, #3a3a3c 18%, #2c2c2e 33%);
  }
}

/* Responsive Tweeks */
@media (max-width: 860px) {

  .hero-container,
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  /* Center the education block on mobile */
  .education-block {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .education-block i {
    margin-bottom: 8px;
    /* Stack icon above text on mobile */
  }

  .stats-list {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.85rem;
  }

  .hero-text-content {
    margin: 0 auto;
    order: 2;
  }

  .card-scene-container {
    order: 1;
    padding-bottom: 40px;
  }

  .nav-links {
    display: flex;
    /* Show them! */
    gap: 12px;
    /* Tighter gap */
    font-size: 0.85rem;
    /* Smaller font */
  }

  .nav-btn {
    padding: 6px 12px;
    /* Smaller button */
    font-size: 0.8rem;
  }

  .nav-container {
    flex-direction: column;
    gap: 16px;
  }

  /* Scale card down for small mobile screens to prevent overflow */
  .card-scene {
    width: 280px;
    height: 420px;
  }

  .card-logo-img {
    height: 48px !important;
    /* Force smaller size on mobile */
    max-width: 48px;
    object-fit: contain;
  }

  .card-name {
    font-size: 1.5rem;
  }

  /* On mobile, use CSS transition for flip since JS lerp is disabled */
  .business-card {
    transition: transform 0.5s ease;
  }

  /* Smaller QR code on mobile */
  .qr-code {
    width: 100px;
    height: 100px;
  }

  .qr-container {
    padding: 8px;
  }

  /* Ensure rounded corners on card faces */
  .card-face,
  .card-front,
  .card-back {
    border-radius: 16px !important;
    overflow: hidden !important;
  }
}