@font-face {
  font-family: 'Outfit';
  src: url('/assets/fonts/outfit-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg-0: #ffffff;
  --bg-1: #fafafc;
  --bg-2: #f4f4f8;
  --bg-card: rgba(0, 0, 0, 0.025);
  --bg-card-hover: rgba(0, 0, 0, 0.05);
  --bg-glass: rgba(255, 255, 255, 0.6);

  --text-1: #06060b;
  --text-2: #4a4a60;
  --text-3: #8a8aa0;

  --accent:   #6366f1;
  --accent-2: #818cf8;
  --accent-3: #a78bfa;
  --pink:     #f472b6;
  --cyan:     #22d3ee;
  --green:    #34d399;
  --amber:    #fbbf24;

  --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
  --gradient-text:    linear-gradient(135deg, #818cf8 0%, #c084fc 40%, #f472b6 100%);
  --gradient-cyan:    linear-gradient(135deg, #6366f1, #22d3ee);

  --border:   rgba(0, 0, 0, 0.06);
  --border-2: rgba(0, 0, 0, 0.1);

  --glow: rgba(99, 102, 241, 0.15);

  --r:      16px;
  --r-sm:   10px;
  --r-full: 100px;

  --font-primary: 'Outfit', -apple-system, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-primary);
  background: var(--bg-0);
  color: var(--text-1);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
}

/* ── Animated aurora background ─────────────────────────────── */

.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}

.aurora-orb.indigo {
  width: 520px;
  height: 520px;
  top: -120px;
  right: -120px;
  background: radial-gradient(circle at center, rgba(99,102,241,0.6), rgba(99,102,241,0) 70%);
  animation: drift-1 32s ease-in-out infinite;
}

.aurora-orb.purple {
  width: 480px;
  height: 480px;
  bottom: -160px;
  left: -100px;
  background: radial-gradient(circle at center, rgba(168,85,247,0.5), rgba(168,85,247,0) 70%);
  animation: drift-2 38s ease-in-out infinite;
}

.aurora-orb.pink {
  width: 380px;
  height: 380px;
  top: 40%;
  left: 55%;
  background: radial-gradient(circle at center, rgba(244,114,182,0.4), rgba(244,114,182,0) 70%);
  animation: drift-3 28s ease-in-out infinite;
}

@keyframes drift-1 {
  0%, 100% { transform: translate3d(0, 0, 0)        scale(1);   }
  33%      { transform: translate3d(-60px, 80px, 0) scale(1.1); }
  66%      { transform: translate3d(40px, 160px, 0) scale(0.95);}
}

@keyframes drift-2 {
  0%, 100% { transform: translate3d(0, 0, 0)         scale(1);   }
  33%      { transform: translate3d(120px, -60px, 0) scale(1.05);}
  66%      { transform: translate3d(60px, -140px, 0) scale(0.9); }
}

@keyframes drift-3 {
  0%, 100% { transform: translate3d(0, 0, 0)         scale(1);   }
  50%      { transform: translate3d(-80px, -90px, 0) scale(1.15);}
}

/* ── Layout ─────────────────────────────────────────────────── */

main {
  width: 100%;
  max-width: 720px;
  padding: 48px 24px 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.logo {
  height: 48px;
  width: auto;
  margin-bottom: 40px;
}

h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

/* Animated gradient on the personalised name */
h1 .name {
  background-image: linear-gradient(
    100deg,
    #6366f1 0%,
    #818cf8 20%,
    #c084fc 40%,
    #f472b6 60%,
    #c084fc 80%,
    #6366f1 100%
  );
  background-size: 220% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hue-shift 7s ease-in-out infinite;
}

@keyframes hue-shift {
  0%, 100% { background-position: 0% 50%;   }
  50%      { background-position: 100% 50%; }
}

.subtitle {
  font-size: 1.125rem;
  color: var(--text-2);
  text-align: center;
  margin-bottom: 32px;
}

/* ── Tabs ────────────────────────────────────────────────────── */

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.tab {
  font-family: var(--font-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, border-color 0.2s;
  min-height: 44px;
  min-width: 44px;
}

.tab:hover {
  background: var(--bg-card-hover);
}

.tab.active {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px var(--glow);
}

/* ── Calendar with cross-fade ────────────────────────────────── */

.cal-container {
  width: 100%;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 8px 32px rgba(99,102,241,0.08);
  overflow: hidden;
  min-height: 700px;
  position: relative;
}

#cal-mount {
  width: 100%;
  min-height: 700px;
  position: relative;
}

#cal-mount iframe {
  width: 100%;
  border: 0;
  overflow: hidden;
  min-height: 700px;
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 380ms ease;
}

#cal-mount iframe.is-active {
  opacity: 1;
  position: relative;  /* the active one occupies the flow so the container sizes to it */
}

/* ── Footer ──────────────────────────────────────────────────── */

footer {
  width: 100%;
  max-width: 720px;
  padding: 32px 24px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.footer-contact {
  font-size: 0.875rem;
  color: var(--text-3);
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}

.footer-contact a {
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-contact a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  gap: 18px;
  align-items: center;
}

.footer-social a {
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}

.footer-social a:hover {
  color: var(--accent);
  background: var(--bg-card);
}

.footer-meta {
  font-size: 0.8125rem;
  color: var(--text-3);
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 20px;
  font-size: 0.8125rem;
}

.footer-links a {
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

@media (max-width: 480px) {
  main {
    padding: 32px 16px 24px;
  }

  .tabs {
    gap: 6px;
  }

  .tab {
    padding: 10px 18px;
    font-size: 0.875rem;
  }

  .aurora-orb.indigo {
    width: 380px;
    height: 380px;
  }

  .aurora-orb.purple {
    width: 340px;
    height: 340px;
  }

  .aurora-orb.pink {
    width: 280px;
    height: 280px;
  }
}

/* ── Reduced motion ──────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .aurora-orb,
  h1 .name,
  #cal-mount iframe {
    animation: none !important;
    transition: none !important;
  }

  h1 .name {
    background-position: 50% 50%;
  }
}
