/* ==========================================================================
   MAHFUZ RAHMAN PORTFOLIO — ADVANCED MINIMALIST LIQUID DESIGN SYSTEM
   Linear & Framer Engineering • 100% Vector Motion • Pure Digital Precision
   ========================================================================== */

:root {
  --bg-base: #08080a;
  --bg-surface: #111216;
  --bg-surface-elevated: #16181f;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.18);
  --accent-glow: rgba(255, 255, 255, 0.05);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  font-size: 16px;
  background-color: var(--bg-base);
  color: #e2e8f0;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: #cbd5e1;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Minimalist Scrollbar */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: #08080a;
}
::-webkit-scrollbar-thumb {
  background: #1e2029;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Liquid Canvas (Subtle Calm Water Surface & Interactive Ripples) */
#liquid-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

/* Ambient Liquid Cursor Spotlight */
#liquid-ambient-spotlight {
  background: radial-gradient(650px circle at var(--mouse-x, 50%) var(--mouse-y, 30%), rgba(255, 255, 255, 0.038), transparent 45%);
  transition: opacity 0.3s ease;
}

/* Minimalist Navigation Bar */
.nav-glass {
  background: rgba(17, 18, 22, 0.88);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  transition: border-color 0.25s ease;
}
.nav-glass:hover {
  border-color: var(--border-highlight);
}

.nav-link {
  color: #94a3b8;
  padding: 6px 13px;
  border-radius: 9999px;
  transition: all 0.2s ease;
  text-decoration: none;
}
.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}
.nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Minimalist Buttons */
.btn-primary-minimal {
  background: #ffffff;
  color: #08080a;
  border: 1px solid #ffffff;
  border-radius: 9999px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-primary-minimal:hover {
  background: #e2e8f0;
  border-color: #e2e8f0;
  color: #08080a;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.15);
}

.btn-subtle {
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-subtle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-highlight);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Magnetic Element Physics */
.magnetic-elem {
  will-change: transform;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Minimalist Liquid Avatar */
.liquid-avatar-container {
  position: relative;
  width: 146px;
  height: 146px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.liquid-avatar-inner {
  position: relative;
  z-index: 2;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: #111216;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.liquid-avatar-container:hover .liquid-avatar-inner {
  transform: scale(1.03);
}
.liquid-avatar-rim {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
  animation: pulseRim 6s ease-in-out infinite alternate;
}
@keyframes pulseRim {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.04); opacity: 0.9; }
}

/* Professional Liquid Icons (Apple/Framer Squircle Bevel) */
.liquid-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12), 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-minimal:hover .liquid-icon-box,
.contact-pill:hover .liquid-icon-box,
.experience-card:hover .liquid-icon-box {
  border-color: var(--border-highlight);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
  transform: translateY(-1px);
}

/* ==========================================================================
   LINEAR-STYLE DYNAMIC BORDER SPOTLIGHT & 3D PERSPECTIVE TILT
   ========================================================================== */
.card-minimal,
.experience-card,
.contact-pill,
.telem-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px;
  overflow: hidden;
  will-change: transform;
  transform-style: preserve-3d;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

/* Dynamic Radial Border Gleam */
.card-minimal::before,
.experience-card::before,
.contact-pill::before,
.telem-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(380px circle at var(--card-x, -500px) var(--card-y, -500px), rgba(255, 255, 255, 0.22), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.card-minimal:hover::before,
.experience-card:hover::before,
.contact-pill:hover::before,
.telem-card:hover::before {
  opacity: 1;
}

.card-minimal:hover,
.experience-card:hover,
.contact-pill:hover,
.telem-card:hover {
  background: var(--bg-surface-elevated);
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.6);
}

/* Tag Minimal */
.tag-minimal {
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  padding: 2px 7px;
  border-radius: 5px;
}

.badge-status-online {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #34d399;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 2px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.link-action {
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.link-action:hover {
  opacity: 0.8;
}

/* Experience Cards */
.experience-card {
  border-radius: 14px;
  padding: 20px 24px;
}

/* Contact Pills */
.contact-pill {
  padding: 14px 16px;
  border-radius: 12px;
  text-decoration: none;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.2s ease;
}
.social-btn:hover {
  color: #ffffff;
  border-color: var(--border-highlight);
  background: var(--bg-surface-elevated);
  transform: translateY(-1px);
}

/* Minimal Form Inputs */
.input-minimal {
  background: #08080a;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 9px 12px;
  color: #f1f5f9;
  font-size: 13px;
  width: 100%;
  outline: none;
  transition: border-color 0.2s ease;
}
.input-minimal:focus {
  border-color: var(--border-highlight);
}

/* ==========================================================================
   INFINITE MONOCHROME TECH MARQUEE
   ========================================================================== */
.marquee-mask {
  mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeFlow 42s linear infinite;
  will-change: transform;
}
.marquee-track:hover {
  animation-play-state: paused;
}
@keyframes marqueeFlow {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.marquee-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 12px;
  font-family: var(--font-mono);
  white-space: nowrap;
  transition: all 0.2s ease;
}
.marquee-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ==========================================================================
   PROJECT CATEGORY TABS & FILTERING
   ========================================================================== */
.project-tabs-container {
  background: rgba(17, 18, 22, 0.85);
  border: 1px solid var(--border-subtle);
}

.project-tab {
  border-radius: 9999px;
  transition: color 0.2s ease;
  cursor: pointer;
  background: transparent;
  border: none;
  outline: none;
}
.project-tab.active {
  color: #ffffff;
}

.project-card-wrapper {
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card-wrapper.is-hidden {
  opacity: 0;
  transform: scale(0.96) translateY(8px);
  position: absolute;
  pointer-events: none;
  visibility: hidden;
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* ==========================================================================
   COMMAND PALETTE MODAL (⌘K / Ctrl+K)
   ========================================================================== */
.palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.palette-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.palette-modal {
  width: 92%;
  max-width: 600px;
  background: rgba(17, 18, 22, 0.96);
  border: 1px solid var(--border-highlight);
  border-radius: 18px;
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transform: scale(0.96) translateY(-8px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.palette-overlay.open .palette-modal {
  transform: scale(1) translateY(0);
}
.palette-input-wrap {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}
.palette-input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 14px;
  width: 100%;
  outline: none;
  font-family: var(--font-sans);
}
.palette-input::placeholder {
  color: #64748b;
}
.palette-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 10px;
}
.palette-group-title {
  font-size: 10px;
  font-family: var(--font-mono);
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 10px 4px 10px;
}
.palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.palette-item:hover, .palette-item.selected {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}
.palette-footer {
  padding: 8px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-family: var(--font-mono);
  color: #64748b;
  background: rgba(255, 255, 255, 0.01);
}

/* ==========================================================================
   HERO BIO TEXT CARD & HIGH-CONTRAST TYPOGRAPHY
   ========================================================================== */
.hero-bio-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 12px 35px -10px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-bio-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

/* Reveal Transitions — Hero elements always immediately visible */
#hero [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Minimal Toast */
.toast-msg {
  background: #16181f;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 8px;
}
