/* ==========================================================================
   SUGATA MONDAL PORTFOLIO - CORE DESIGN SYSTEM & STYLES
   Inspired by palakonweb.in - Built with Vanilla HTML5/CSS3/JS
   ========================================================================== */

/* --- Google & Web Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400..700;1,400..700&family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;1,400;1,600&family=Satisfy&family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Yellowtail&display=swap');

/* --- CSS Variables & Color Tokens --- */
:root {
  /* Light Palette */
  --bg-primary: #fffefd;
  --bg-surface: #ffffff;
  --bg-surface-secondary: #fce7ec;
  --bg-surface-secondary-50: rgba(252, 231, 236, 0.5);
  --bg-surface-glass: rgba(255, 255, 255, 0.8);
  --bg-pill: rgba(0, 0, 0, 0.05);
  --bg-pill-hover: rgba(0, 0, 0, 0.08);

  --text-primary: #181818;
  --text-body: #3a3a3a;
  --text-secondary: #6b6b6b;
  --text-muted: #808080;
  --text-cherry: #c2185b;
  --text-cherry-light: #f3b9c8;

  --accent-pink: #f3b9c8;
  --accent-pink-subtle: #fce7ec;
  --accent-berry: #c2185b;
  --accent-verified: #3b9ef3;
  --accent-verified-bg: rgba(59, 158, 243, 0.12);

  --border-subtle: rgba(58, 58, 58, 0.08);
  --border-dashed: rgba(0, 0, 0, 0.12);
  --border-dashed-hover: rgba(0, 0, 0, 0.3);

  --shadow-soft: 0 10px 30px -4px rgba(0, 0, 0, 0.05), 0 2px 8px -2px rgba(0, 0, 0, 0.03);
  --shadow-soft-hover: 0 16px 36px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 8px 24px -4px rgba(0, 0, 0, 0.08), 0 2px 8px -2px rgba(0, 0, 0, 0.04);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-folder: 0 18px 45px rgba(0, 0, 0, 0.08);
  --shadow-folder-hover: 0 24px 55px rgba(0, 0, 0, 0.14);

  --calendar-c0: #ebedf0;
  --calendar-c1: #fce7ec;
  --calendar-c2: #f3b9c8;
  --calendar-c3: #d94a7a;
  --calendar-c4: #a01b4c;

  --scrollbar-track: rgba(247, 232, 236, 0.4);
  --scrollbar-thumb: #f3b9c8;
  --scrollbar-thumb-hover: #e8a2b5;

  --folder-fill: #ffffff;
  --folder-stroke: rgba(0, 0, 0, 0.06);

  --font-serif: 'Instrument Serif', 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-instrument: 'Instrument Sans', sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;
  --font-signature: 'Satisfy', 'Yellowtail', cursive;

  --theme-transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* --- Dark Theme Palette --- */
html.dark {
  --bg-primary: #0f0f10;
  --bg-surface: #18181a;
  --bg-surface-secondary: rgba(255, 255, 255, 0.04);
  --bg-surface-secondary-50: rgba(255, 255, 255, 0.04);
  --bg-surface-glass: rgba(24, 24, 26, 0.85);
  --bg-pill: rgba(255, 255, 255, 0.08);
  --bg-pill-hover: rgba(255, 255, 255, 0.14);

  --text-primary: #ffffff;
  --text-body: #e4e4e7;
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-muted: rgba(255, 255, 255, 0.4);
  --text-cherry: #ffb7c5;
  --text-cherry-light: #f3b9c8;

  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-dashed: rgba(255, 255, 255, 0.15);
  --border-dashed-hover: rgba(255, 255, 255, 0.35);

  --shadow-soft: 0 10px 30px -4px rgba(0, 0, 0, 0.4);
  --shadow-soft-hover: 0 18px 40px -4px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-folder: 0 20px 50px rgba(0, 0, 0, 0.6);
  --shadow-folder-hover: 0 25px 60px rgba(0, 0, 0, 0.8);

  --calendar-c0: #232326;
  --calendar-c1: #4a1d2e;
  --calendar-c2: #7e2648;
  --calendar-c3: #c2386c;
  --calendar-c4: #f3b9c8;

  --scrollbar-track: rgba(0, 0, 0, 0.3);
  --scrollbar-thumb: #7a2f4d;
  --scrollbar-thumb-hover: #a55f79;

  --folder-fill: #232325;
  --folder-stroke: rgba(255, 255, 255, 0.08);
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: linear-gradient(180deg, #fffefd 0%, rgba(243, 185, 200, 0.12) 45%, #fffefd 100%);
  background-color: var(--bg-primary);
  color: var(--text-body);
  min-height: 100vh;
  overflow-x: hidden;
  transition: var(--theme-transition);
}

html.dark body {
  background: #0f0f10;
}

::selection {
  background-color: #f3b9c8;
  color: #181818;
}

html.dark ::selection {
  background-color: #c2185b;
  color: #ffffff;
}

/* --- Custom Scrollbar --- */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}
html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Hide scrollbars for cleanly styled components */
.calendar-card,
.calendar-grid-container,
.marquee-container,
.mobile-dock {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.calendar-card::-webkit-scrollbar,
.calendar-grid-container::-webkit-scrollbar,
.marquee-container::-webkit-scrollbar,
.mobile-dock::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* --- Global Layout Container --- */
.container {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2.5rem;
  }
}

.container-wide {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Typography Helpers --- */
.font-serif { font-family: var(--font-serif); }
.font-instrument { font-family: var(--font-serif); }
.font-sans { font-family: var(--font-sans); }
.font-instrument-sans { font-family: var(--font-instrument); }
.font-mono { font-family: var(--font-mono); }
.font-signature { font-family: var(--font-signature); }

/* --- Special Animations & Effects --- */

/* 1. Liquid Chrome Animated Border */
@keyframes liquidChrome {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.liquid-chrome-border {
  background: linear-gradient(110deg, #e91e63 0%, #ff80ab 25%, #f06292 50%, #ff4081 75%, #e91e63 100%);
  background-size: 200% 200%;
  animation: liquidChrome 3.5s ease-in-out infinite;
  box-shadow: 0 4px 18px rgba(233, 30, 99, 0.28);
}

html.dark .liquid-chrome-border {
  background: linear-gradient(110deg, #c2185b 0%, #ffb7c5 25%, #7a2f4d 50%, #ffb7c5 75%, #c2185b 100%);
  background-size: 200% 200%;
  animation: liquidChrome 3.5s ease-in-out infinite;
  box-shadow: 0 4px 20px rgba(194, 24, 91, 0.35);
}

/* 2. Glare Button Sweep Effect */
.glare-button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.glare-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -85%;
  width: 45%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  transition: left 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.glare-button:hover::after {
  left: 135%;
}

/* 3. Dashed Border Interactive Animation */
.dashed-border-anim {
  background: transparent;
  border: 2px dashed var(--border-dashed);
  border-radius: 1.25rem;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.dashed-border-anim:hover {
  border-color: var(--border-dashed-hover);
}

/* 4. Pulse Dot */
@keyframes softPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.92); }
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  animation: softPulse 2s ease-in-out infinite;
}

/* --- View Transitions --- */
.view-section {
  display: none;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* --- Global Utilities --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.w-full { width: 100%; }
