/* ============================================
   MIRO-STYLE PORTFOLIO — Design System & Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- Design Tokens --- */
:root {
  --color-bg: #f8f8f8;
  --color-card-bg: #f5f0eb;
  --color-shadow: rgba(0, 0, 0, 0.08);
  --color-shadow-hover: rgba(0, 0, 0, 0.18);
  --color-text: #1a1a1a;
  --color-text-muted: #6b7280;
  --color-accent: #4f46e5;
  --color-accent-soft: #eef2ff;
  --color-dot: rgba(0, 0, 0, 0.08);
  --color-overlay: rgba(0, 0, 0, 0.55);

  --radius-card: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 4px 24px var(--color-shadow);
  --shadow-card-hover: 0 12px 48px var(--color-shadow-hover);

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --board-width: 3200px;
  --board-height: 2200px;

  --anim-duration: 900ms;
  --anim-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --blur-amount: 18px;
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--color-bg);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   LOADING SCREEN
   ============================================ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.loader-dots {
  display: flex;
  gap: 6px;
}

.loader-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-text);
  animation: loaderBounce 1.2s ease-in-out infinite;
}

.loader-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.loader-dot:nth-child(3) {
  animation-delay: 0.3s;
}

.loader-label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

@keyframes loaderBounce {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================
   FLOATING NAV
   ============================================ */
.floating-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 1rem;
  /* Matched to link gap for even spacing */
  padding: 0.6rem 1.4rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 100px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transform: translateX(-50%) translateY(-20px);
  transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}

.floating-nav.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.nav-brand {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 1rem;
  /* Matched to main nav gap for even spacing */
}

.nav-link {
  background: none;
  border: none;
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.04);
}

/* ============================================
   ABOUT MODAL
   ============================================ */
.about-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

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

.about-modal {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 3rem;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.15);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s var(--anim-ease);
}

.about-overlay.is-open .about-modal {
  transform: scale(1) translateY(0);
}

.about-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-text-muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}

.about-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-text);
}

.about-content {
  text-align: center;
}

.about-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--color-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.about-photo-placeholder {
  font-size: 2rem;
}

.about-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.about-role {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.about-bio {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #374151;
  margin-bottom: 1.5rem;
}

.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.skill-tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.about-socials {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.social-link:hover {
  opacity: 0.7;
}

/* ============================================
   CONTACT MODAL
   ============================================ */
.contact-modal-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.contact-option-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  width: 100%;
  background: #f9fafb;
  border: none;
  border-radius: 16px;
  color: var(--color-text);
  text-decoration: none;
  transition: all 0.2s var(--anim-ease);
}

.contact-option-btn:hover {
  background: #f3f4f6;
  transform: translateY(-2px);
}

.contact-option-icon {
  font-size: 1.25rem;
}

.contact-option-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.contact-option-title {
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.contact-option-btn:hover .contact-option-title {
  background: linear-gradient(to right, #4f46e5, #9333ea, #ec4899, #4f46e5);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShiftLeftToRight 3s linear infinite;
}

.contact-option-subtext {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.15rem;
}

/* Specific colors on hover if desired */
.email-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.whatsapp-btn:hover {
  border-color: #25D366;
  color: #25D366;
}

.linkedin-btn:hover {
  border-color: #0A66C2;
  color: #0A66C2;
}

/* ============================================
   VIEWPORT (clips the board)
   ============================================ */
.viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  cursor: crosshair;
}

.viewport.is-dragging {
  cursor: grabbing;
}

.viewport.is-animating {
  cursor: default;
}

/* ============================================
   BOARD (the pannable canvas with dot grid)
   ============================================ */
.board {
  width: var(--board-width);
  height: var(--board-height);
  position: absolute;
  will-change: transform;
  transition: none;
  background-image: radial-gradient(circle, var(--color-dot) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ============================================
   PROJECT CARDS
   ============================================ */
.card {
  position: absolute;
  border-radius: var(--radius-card);
  overflow: visible;
  /* Changed so text can appear below the card */
  box-shadow: none;
  /* Changed since shadow goes on image now */
  background: transparent;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
  text-decoration: none;
  display: block;
  cursor: pointer;

  /* Entrance animation - start hidden */
  opacity: 0;
  transform: translateY(120vh);
  filter: blur(var(--blur-amount));
}

.card.animate-in {
  animation: flyUp var(--anim-duration) var(--anim-ease) forwards;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: scale(1.04) !important;
  z-index: 10;
}

.card img {
  width: 100%;
  height: 100%;
  background: var(--color-card-bg);
  box-shadow: var(--shadow-card);
  transition: transform 0.5s ease, box-shadow 0.35s ease;
}

.card:hover img {
  transform: scale(1.02);
  box-shadow: var(--shadow-card-hover);
}

.card.card-transparent {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

.card.card-transparent img {
  object-fit: contain;
  background: transparent;
  box-shadow: none;
}

.card.card-transparent:hover img {
  box-shadow: none;
}



/* --- Card Text Below Image --- */
.card-overlay {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 0.75rem 0.25rem 0 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
  pointer-events: none;
}

.card-tag {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.card-title {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

/* ============================================
   CONTACT CARD (on the board)
   ============================================ */
.contact-card {
  position: absolute;
  opacity: 0;
  transform: translateY(120vh);
  filter: blur(var(--blur-amount));
}

.contact-card.animate-in {
  animation: flyUp var(--anim-duration) var(--anim-ease) forwards;
}

.contact-card-inner {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 1.5rem 1.875rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  /* slightly stronger shadow for prominence */
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  min-width: 180px;
}

.contact-card-inner:hover {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
  transform: scale(1.02);
  cursor: grab;
}

.contact-emoji {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  /* Make the icon very dark to match the image */
}

.contact-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.1rem;
}

.text-gradient {
  background: linear-gradient(to right, #4f46e5, #9333ea, #ec4899, #4f46e5);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShiftLeftToRight 3s linear infinite;
}

.contact-email {
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-email:hover {
  color: var(--color-text);
}

@keyframes gradientShiftLeftToRight {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: -200% 50%;
  }
}

.contact-email:hover {
  opacity: 0.75;
}

/* ============================================
   INTRO CARD (on the board)
   ============================================ */
.intro-card {
  position: absolute;
  opacity: 0;
  transform: translateY(120vh);
  filter: blur(var(--blur-amount));
}

.intro-card.animate-in {
  animation: flyUp var(--anim-duration) var(--anim-ease) forwards;
}

.intro-card-inner {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  max-width: 320px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.intro-card-inner:hover {
  box-shadow: 0 10px 44px rgba(0, 0, 0, 0.1);
  transform: scale(1.02);
  cursor: pointer;
}

.intro-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  flex-shrink: 0;
  background: var(--color-accent-soft);
}

.intro-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.intro-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.intro-role {
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.intro-emoji {
  font-size: 0.85rem;
}

/* ============================================
   HELLO TEXT
   ============================================ */
.hello-text {
  position: absolute;
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
  white-space: nowrap;
  user-select: none;
  cursor: grab;

  /* Entrance animation - start hidden */
  opacity: 0;
  transform: translateY(120vh);
  filter: blur(var(--blur-amount));
}

.hello-text.animate-in {
  animation: flyUp var(--anim-duration) var(--anim-ease) forwards;
}

.hello-text .wave-emoji {
  position: absolute;
  display: inline-block;
  font-size: 2.8rem;
  margin-left: 0.15em;
  animation: none;
}

.hello-text.animate-in .wave-emoji {
  animation: wave 1.5s ease-in-out 2.5s 3;
}

/* ============================================
   KEYFRAMES
   ============================================ */
@keyframes flyUp {
  0% {
    opacity: 1;
    transform: translateY(120vh);
    filter: blur(var(--blur-amount));
  }

  60% {
    filter: blur(4px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes wave {
  0% {
    transform: rotate(0deg);
  }

  15% {
    transform: rotate(14deg);
  }

  30% {
    transform: rotate(-8deg);
  }

  45% {
    transform: rotate(14deg);
  }

  60% {
    transform: rotate(-4deg);
  }

  75% {
    transform: rotate(10deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

/* ============================================
   SCROLLBAR HIDE
   ============================================ */
.viewport::-webkit-scrollbar {
  display: none;
}

.viewport {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ============================================
   MOBILE RESPONSIVE — Grid Fallback
   ============================================ */
@media (max-width: 768px) {

  html,
  body {
    overflow: auto;
    background-color: var(--color-bg);
    background-image: radial-gradient(circle, var(--color-dot) 1px, transparent 1px);
    background-size: 24px 24px;
    background-attachment: fixed;
  }

  .viewport {
    height: auto;
    overflow: visible;
    cursor: default;
    padding: 7rem 1.5rem 6rem;
    /* 7rem top handles the fixed nav height + 4rem gap */
    display: flex;
    justify-content: center;
  }

  .board {
    position: relative;
    width: 100%;
    height: auto;
    background: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
    transform: none !important;
  }

  .hello-text {
    position: relative;
    left: auto !important;
    top: auto !important;
    grid-column: 1 / -1;
    text-align: center;
    font-size: 2.8rem;
    /* Make it bigger */
    margin: 0 !important;
    opacity: 1;
    transform: none;
    filter: none;
    width: auto !important;
    /* Stop inline width from breaking flex centering */
    padding-right: 1.25em;
    /* Create exact phantom space for the absolute wave emoji so the group centers */
  }

  .hello-text.animate-in {
    animation: none;
  }

  .card {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 450px;
    height: auto !important;
    aspect-ratio: auto;
    opacity: 1;
    transform: none;
    filter: none;
    margin: 0 0 3.5rem 0 !important;
    /* Exact height of the absolute text overlay, so the visual gap below the text perfectly matches the flex gap of 4rem */
  }

  .card.animate-in {
    animation: fadeInUp 0.5s ease forwards;
  }

  .card-overlay {
    opacity: 1;
    transform: translateY(0);
  }

  .contact-card {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    grid-column: 1 / -1;
    margin: 0 !important;
    opacity: 1;
    transform: none;
    filter: none;
  }

  .contact-card.animate-in {
    animation: none;
  }

  .intro-card {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    grid-column: 1 / -1;
    margin: 0 !important;
    opacity: 1;
    transform: none;
    filter: none;
  }

  .intro-card.animate-in {
    animation: none;
  }

  .floating-nav {
    top: 10px;
    padding: 0.5rem 1rem;
    gap: 1rem;
  }

  .nav-brand {
    font-size: 0.85rem;
  }

  .nav-link {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }

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

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }

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