/* ==========================================================================
   MALHAR JANI — MINIMAL CREAMY WHITE PORTFOLIO (WORK IN PROGRESS)
   ========================================================================== */

:root {
  --bg-cream: #F7F3EA;
  --bg-surface: rgba(255, 253, 249, 0.78);
  --bg-capsule: rgba(255, 254, 250, 0.86);
  --ink-primary: #1C1915;
  --ink-secondary: #655E54;
  --ink-muted: #968E82;
  --accent-warm: #B8643E;
  --accent-gold: #D49B63;
  --accent-green: #2E6F4E;
  --border-subtle: rgba(28, 25, 21, 0.09);
  --border-hover: rgba(28, 25, 21, 0.2);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Complete reset for native button styling so no browser default ever leaks */
button {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  outline: none;
}

html,
body {
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-cream);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  position: relative;
}

::selection {
  background: var(--ink-primary);
  color: var(--bg-cream);
}

/* Fullscreen Canvas for Shooting Star & Trail */
#star-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

/* Soft Archival Paper Grain */
.paper-grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Main Shell */
.shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Top Bar & Premium MJ Monogram Lockup */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink-primary);
}

.mj-crest {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #24201B 0%, #151310 100%);
  color: var(--bg-cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 20px -6px rgba(28, 25, 21, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
  transition: transform 0.45s var(--ease-out-expo), box-shadow 0.45s var(--ease-out-expo);
}

.mj-svg {
  width: 38px;
  height: 38px;
}

.mj-star-dot {
  transform-origin: 32.8px 9.2px;
  transition: transform 0.55s var(--ease-out-expo), fill 0.3s ease;
}

.brand-lockup:hover .mj-crest {
  transform: translateY(-1.5px) rotate(-3deg) scale(1.04);
  box-shadow:
    0 12px 26px -6px rgba(184, 100, 62, 0.32),
    0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

.brand-lockup:hover .mj-star-dot {
  transform: rotate(90deg) scale(1.22);
  fill: #E8B178;
}

.brand-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink-primary);
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
  margin-top: 0.1rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-secondary);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-warm);
  box-shadow: 0 0 0 3px rgba(184, 100, 62, 0.14);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Centered Stage */
.center-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 620px;
  margin: auto;
  padding: 2rem 0;
}

/* Interactive 4-Point Star Emblem */
.star-emblem {
  color: var(--accent-warm);
  margin-bottom: 1.4rem;
  padding: 0.45rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s var(--ease-out-expo), color 0.3s ease;
}

.star-emblem svg {
  animation: floatStar 5s ease-in-out infinite;
}

.star-emblem:hover {
  transform: rotate(90deg) scale(1.15);
  color: var(--ink-primary);
}

@keyframes floatStar {
  0%, 100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.06);
  }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.95rem;
}

.headline {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(3rem, 7.5vw, 5.4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--ink-primary);
  margin-bottom: 1.15rem;
}

.headline .serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1em;
  color: var(--accent-warm);
  padding-right: 0.06em;
}

.subtext {
  font-size: clamp(0.98rem, 1.35vw, 1.1rem);
  line-height: 1.65;
  color: var(--ink-secondary);
  font-weight: 300;
  max-width: 42ch;
  margin-bottom: 2.1rem;
}

/* ==========================================================================
   UNIFIED SLEEK CONTACT CAPSULE (NO BULKY SEPARATE BUTTONS)
   ========================================================================== */
.contact-capsule {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.32rem 0.32rem 1.05rem;
  border-radius: 999px;
  background: var(--bg-capsule);
  border: 1px solid var(--border-subtle);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 12px 32px -10px rgba(28, 25, 21, 0.07),
    0 2px 6px -1px rgba(28, 25, 21, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s ease, box-shadow 0.35s var(--ease-out-expo), transform 0.35s var(--ease-out-expo);
}

.contact-capsule:hover {
  border-color: var(--border-hover);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 16px 38px -10px rgba(28, 25, 21, 0.1),
    0 4px 10px -2px rgba(28, 25, 21, 0.04);
}

.capsule-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.55rem 0.42rem 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-secondary);
  transition: color 0.25s ease;
}

.capsule-copy:hover {
  color: var(--ink-primary);
}

.copy-icon-wrap {
  position: relative;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  transition: color 0.25s ease;
}

.capsule-copy:hover .copy-icon-wrap {
  color: var(--accent-warm);
}

.icon-copy,
.icon-check {
  position: absolute;
  transition: opacity 0.25s ease, transform 0.25s var(--ease-out-expo);
}

.icon-check {
  opacity: 0;
  transform: scale(0.6);
  color: var(--accent-green);
}

.capsule-copy.copied {
  color: var(--accent-green);
}

.capsule-copy.copied .icon-copy {
  opacity: 0;
  transform: scale(0.6);
}

.capsule-copy.copied .icon-check {
  opacity: 1;
  transform: scale(1);
}

/* Nested Dark Pill Trigger Inside the Capsule */
.capsule-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.56rem 1.05rem;
  border-radius: 999px;
  background: var(--ink-primary);
  color: var(--bg-cream);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s var(--ease-out-expo);
}

.capsule-action:hover {
  background: var(--accent-warm);
}

.capsule-action svg {
  transition: transform 0.3s var(--ease-out-expo);
}

.capsule-action:hover svg {
  transform: translate(1.5px, -1.5px);
}

/* ==========================================================================
   BORDERLESS EDITORIAL STATUS WHISPER (QUIRKY CYCLER)
   ========================================================================== */
.status-whisper {
  margin-top: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  color: var(--ink-muted);
}

.whisper-label {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.64rem;
  color: var(--accent-warm);
  opacity: 0.9;
}

.whisper-sep {
  opacity: 0.4;
}

.whisper-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  color: var(--ink-secondary);
  padding: 0.15rem 0;
  border-bottom: 1px dashed rgba(28, 25, 21, 0.22);
  transition: color 0.25s ease, border-color 0.25s ease;
}

.whisper-trigger:hover {
  color: var(--ink-primary);
  border-bottom-color: var(--accent-warm);
}

.whisper-text {
  display: inline-block;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.whisper-text.is-flipping {
  opacity: 0;
  transform: translateY(-4px);
}

.whisper-icon {
  color: var(--ink-muted);
  transition: transform 0.45s var(--ease-out-expo), color 0.25s ease;
}

.whisper-trigger:hover .whisper-icon {
  transform: rotate(180deg);
  color: var(--accent-warm);
}

/* ==========================================================================
   MINIMAL FOOTER COLOPHON
   ========================================================================== */
.bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.colophon-nudge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  color: var(--ink-muted);
  padding: 0.25rem 0.5rem;
  transition: color 0.25s ease;
}

.colophon-nudge:hover {
  color: var(--ink-primary);
}

.colophon-nudge kbd {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  padding: 0.1rem 0.38rem;
  border-radius: 4px;
  background: rgba(28, 25, 21, 0.05);
  border: 1px solid rgba(28, 25, 21, 0.12);
  color: var(--ink-secondary);
}

.nudge-spark {
  color: var(--accent-warm);
  font-size: 0.72rem;
  transition: transform 0.35s var(--ease-out-expo);
}

.colophon-nudge:hover .nudge-spark {
  transform: rotate(90deg) scale(1.2);
}

.footer-link {
  color: var(--ink-secondary);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer-link:hover {
  color: var(--accent-warm);
}

/* Silky Reveal Transition after Shooting Star Passes */
.reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.99);
  filter: blur(8px);
  transition: opacity 1s var(--ease-out-expo),
              transform 1s var(--ease-out-expo),
              filter 1s var(--ease-out-expo);
  transition-delay: var(--d, 0s);
}

body.is-ready .reveal {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0px);
}

@media (max-width: 640px) {
  .contact-capsule {
    flex-direction: column;
    border-radius: 20px;
    padding: 0.5rem;
    width: 100%;
    max-width: 340px;
    gap: 0.4rem;
  }

  .capsule-copy {
    padding: 0.4rem 0.5rem;
    justify-content: center;
    width: 100%;
  }

  .capsule-action {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
  }

  .status-whisper {
    flex-wrap: wrap;
    justify-content: center;
  }

  .bottom-bar {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}
