/* ==========================================================================
   SUGATA MONDAL PORTFOLIO - COMPONENTS STYLESHEET
   ========================================================================== */

/* --- 1. Top Navigation Bar (Desktop & Mobile Brand) --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background-color: rgba(255, 254, 253, 0.8);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  pointer-events: auto;
  transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

html.dark .site-header {
  background-color: rgba(15, 15, 16, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

@media (min-width: 768px) {
  .site-header {
    padding: 1.15rem 3.5rem;
  }
}

@media (min-width: 1200px) {
  .site-header {
    padding: 1.15rem 5rem;
  }
}

.nav-logo {
  position: static;
  font-family: var(--font-signature);
  font-size: 1.55rem;
  line-height: 1;
  color: var(--text-primary);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (min-width: 768px) {
  .nav-logo {
    font-size: 1.85rem;
  }
}

.nav-logo:hover {
  opacity: 0.75;
  transform: translateY(-1px);
}

.desktop-nav {
  position: static;
  display: none;
  align-items: center;
  gap: 2.25rem;
  pointer-events: auto;
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
  }
}

.nav-link {
  position: relative;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0;
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-pink);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(243, 185, 200, 0.75);
  transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  opacity: 0;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
  opacity: 1;
}

/* --- Theme Toggle Switch Button --- */
.theme-toggle-btn {
  position: relative;
  width: 50px;
  height: 28px;
  border-radius: 9999px;
  background-color: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  pointer-events: auto;
  box-sizing: border-box;
}

html.dark .theme-toggle-btn {
  background-color: rgba(255, 255, 255, 0.1);
}

.theme-toggle-pill {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
  color: #e8a33d;
}

html.dark .theme-toggle-pill {
  transform: translateX(22px);
  background-color: #232326;
  color: #ffffff;
}

.mobile-theme-wrapper {
  position: static;
  display: flex;
  align-items: center;
  pointer-events: auto;
}

@media (min-width: 768px) {
  .mobile-theme-wrapper {
    display: none;
  }
}

/* --- 2. Mobile Floating Bottom Navigation Dock --- */
.mobile-dock-wrapper {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 110;
  display: block;
}

@media (min-width: 768px) {
  .mobile-dock-wrapper {
    display: none;
  }
}

.mobile-dock {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.4rem;
  border-radius: 32px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-glass);
}

.dock-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 0.85rem;
  border-radius: 24px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.dock-item.active {
  background-color: var(--bg-pill-hover);
  color: var(--text-primary);
  padding: 0 1rem;
}

.dock-item .dock-label {
  display: none;
  margin-left: 0.4rem;
}

.dock-item.active .dock-label {
  display: inline;
}

/* --- 3. Master Canvas Frame (Signature Cutout Frame) & Hero --- */
.main-canvas-wrapper {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  padding: 5rem 0.85rem 3.5rem;
  position: relative;
  z-index: 10;
}

@media (min-width: 768px) {
  .main-canvas-wrapper {
    padding: 6.75rem 2rem 4.5rem;
  }
}

.main-canvas-border {
  border-radius: 1.75rem;
  width: 100%;
  overflow: hidden;
}

.main-canvas-inner {
  background-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 1.75rem;
  padding: 1.25rem 1rem 1.75rem;
  transition: background-color 0.4s ease;
}

@media (min-width: 768px) {
  .main-canvas-inner {
    padding: 2.25rem 2.5rem 2.25rem;
  }
}

html.dark .main-canvas-inner {
  background-color: rgba(24, 24, 26, 0.65);
}

.hero-wrapper {
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 2rem;
  position: relative;
}

@media (min-width: 768px) {
  .hero-wrapper {
    margin-bottom: 3.5rem;
  }
}

.banner-container {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background-color: #f7e8ec;
  --parallax-x: 0px;
  --parallax-y: 0px;
}

@media (min-width: 768px) {
  .banner-container {
    aspect-ratio: 3 / 1;
  }
}

@keyframes bannerBreathe {
  0%, 100% {
    transform: scale(1.02) translate3d(var(--parallax-x, 0px), var(--parallax-y, 0px), 0);
  }
  50% {
    transform: scale(1.06) translate3d(calc(var(--parallax-x, 0px) - 3px), calc(var(--parallax-y, 0px) - 2px), 0);
  }
}

.banner-img {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  object-fit: cover;
  object-position: top center;
  transition: opacity 0.5s ease;
  animation: bannerBreathe 18s ease-in-out infinite;
  will-change: transform;
}

.banner-light {
  opacity: 1;
}

.banner-dark {
  opacity: 0;
}

html.dark .banner-light {
  opacity: 0;
}

html.dark .banner-dark {
  opacity: 1;
}

/* Lantern Glowing Pulse */
.banner-lantern-glow {
  position: absolute;
  left: 20%;
  top: 42%;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 235, 170, 0.6) 0%, rgba(255, 193, 7, 0.2) 50%, transparent 75%);
  filter: blur(8px);
  animation: lanternPulse 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 15;
}

html.dark .banner-lantern-glow {
  left: 71%;
  top: 55%;
  width: 70px;
  height: 70px;
  background: radial-gradient(circle, rgba(255, 215, 120, 0.8) 0%, rgba(255, 160, 0, 0.35) 50%, transparent 80%);
  filter: blur(10px);
  animation: lanternPulse 2.4s ease-in-out infinite;
}

@keyframes lanternPulse {
  0%, 100% { opacity: 0.55; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.25); }
}

/* Canvas Particle Animation Layer */
.banner-anim-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

/* Avatar with Liquid Chrome & Story Tooltip */
.avatar-group {
  position: absolute;
  bottom: -3rem;
  left: 1.5rem;
  z-index: 30;
}

@media (min-width: 768px) {
  .avatar-group {
    left: 2rem;
    bottom: -3.5rem;
  }
}

.avatar-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(24, 24, 24, 0.88);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

html.dark .avatar-tooltip {
  background-color: rgba(255, 255, 255, 0.95);
  color: #181818;
}

.avatar-tooltip::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background-color: inherit;
}

.avatar-group:hover .avatar-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.avatar-btn {
  width: 6.25rem;
  height: 6.25rem;
  border-radius: 50%;
  padding: 3.5px;
  cursor: pointer;
  border: none;
  display: block;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.avatar-btn.liquid-chrome-border,
.liquid-chrome-border {
  background: linear-gradient(110deg, #f48fb1 0%, #ffcdd2 25%, #f06292 50%, #f8bbd0 75%, #f48fb1 100%) !important;
  background-size: 200% 200% !important;
  animation: liquidChrome 3.5s ease-in-out infinite;
  box-shadow: 0 4px 16px rgba(244, 143, 177, 0.45);
}

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

@media (min-width: 768px) {
  .avatar-btn {
    width: 7.25rem;
    height: 7.25rem;
  }
}

.avatar-btn:hover {
  transform: scale(1.05);
}

.avatar-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background-color: #ffffff;
  border: 4px solid #ffffff;
  transition: border-color 0.4s ease, background-color 0.4s ease;
}

html.dark .avatar-inner {
  background-color: #18181a;
  border: 4px solid #18181a;
}

.avatar-inner .avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.4s ease;
}

.avatar-inner .avatar-light {
  opacity: 1;
}

.avatar-inner .avatar-dark {
  opacity: 0;
}

html.dark .avatar-inner .avatar-light {
  opacity: 0;
}

html.dark .avatar-inner .avatar-dark {
  opacity: 1;
}

/* Action Buttons Under Banner (Desktop) */
.hero-actions-desktop {
  display: none;
  position: absolute;
  bottom: -3.25rem;
  right: 0;
  gap: 0.75rem;
  z-index: 20;
}

@media (min-width: 768px) {
  .hero-actions-desktop {
    display: flex;
  }
}

.btn-primary-pill {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  padding: 0.65rem 1.4rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-soft);
  gap: 0.4rem;
}

.btn-primary-pill:hover {
  box-shadow: var(--shadow-soft-hover);
  transform: translateY(-1px);
}

.btn-secondary-pill {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 0.65rem 1.4rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-soft);
  gap: 0.4rem;
}

.btn-secondary-pill:hover {
  box-shadow: var(--shadow-soft-hover);
  transform: translateY(-1px);
}

/* Action Buttons (Mobile) */
.hero-actions-mobile {
  display: flex;
  gap: 0.75rem;
  margin-top: 4.25rem;
  margin-bottom: 2rem;
  width: 100%;
}

@media (min-width: 768px) {
  .hero-actions-mobile {
    display: none;
  }
}

.btn-mobile-pill {
  flex: 1;
  height: 44px;
  border-radius: 18px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-mobile-white {
  background: #ffffff;
  color: #181818;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

html.dark .btn-mobile-white {
  background: #ffffff;
  color: #181818;
}

.btn-mobile-dark {
  background: #1f1f1f;
  color: #ffffff;
}

html.dark .btn-mobile-dark {
  background: #232326;
  color: #ffffff;
}

/* Hero Header Info (Name, Verified, Counter, Typing Title) */
.hero-identity {
  margin-top: 4.5rem;
  margin-bottom: 3.5rem;
}

@media (min-width: 768px) {
  .hero-identity {
    margin-top: 4.75rem;
  }
}

.hero-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.hero-name-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .hero-name {
    font-size: 2.75rem;
  }
}

.verified-badge {
  color: var(--accent-verified);
  fill: var(--accent-verified-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-counter {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-typing-wrap {
  min-height: 2.2rem;
  display: flex;
  align-items: center;
  gap: 2px;
}

.hero-typing-text {
  font-family: var(--font-instrument);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--accent-berry);
  line-height: 1.2;
}

@media (min-width: 768px) {
  .hero-typing-text {
    font-size: 1.85rem;
  }
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.25rem;
  background-color: var(--accent-berry);
  margin-left: 2px;
  border-radius: 1px;
  animation: typingBlink 0.85s steps(2, start) infinite;
  vertical-align: middle;
}

@media (min-width: 768px) {
  .typing-cursor {
    height: 1.55rem;
  }
}

@keyframes typingBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-meta {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* --- 4. Section Titles & Typography --- */
.section-block {
  width: 100%;
  margin-bottom: 4rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.15rem;
  }
}

/* Bio Text */
.bio-text {
  font-family: var(--font-instrument);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .bio-text {
    font-size: 1.06rem;
  }
}

.bio-text strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* --- 5. Tech Stack Marquee --- */
.marquee-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent 0%, black 50px, black calc(100% - 50px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 50px, black calc(100% - 50px), transparent 100%);
  padding: 0.5rem 0;
}

.marquee-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  will-change: transform;
}

.tech-pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease, border-color 0.2s ease;
  user-select: none;
}

.tech-pill:hover {
  transform: translateY(-2px);
  border-color: var(--accent-pink);
}

.tech-pill-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech-pill-name {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* --- 6. Freelancing Box --- */
.freelance-card {
  background: var(--bg-surface-secondary-50);
  border-radius: 1.15rem;
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: background-color 0.3s ease;
}

@media (min-width: 768px) {
  .freelance-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2.25rem 2.5rem;
  }
}

.freelance-text {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-body);
  max-width: 500px;
}

@media (min-width: 768px) {
  .freelance-text {
    font-size: 1rem;
  }
}

.freelance-btn {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 0.85rem 1.75rem;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-soft);
  gap: 0.5rem;
  flex-shrink: 0;
}

.freelance-btn:hover {
  box-shadow: var(--shadow-soft-hover);
  transform: translateY(-1px);
}

/* --- 7. Experience-Style Project List (Home Page) & Projects Grid --- */
.exp-list-card {
  background-color: var(--bg-surface);
  border-radius: 1.25rem;
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.exp-item {
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.25s ease;
}

.exp-item:last-child {
  border-bottom: none;
}

.exp-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 1rem;
  transition: background-color 0.2s ease;
  font-family: inherit;
}

@media (min-width: 768px) {
  .exp-header {
    padding: 1.4rem 1.75rem;
  }
}

.exp-header:hover {
  background-color: var(--bg-surface-secondary-50);
}

.exp-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.exp-title {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

@media (min-width: 768px) {
  .exp-title {
    font-size: 1.12rem;
  }
}

.exp-subtitle {
  font-family: var(--font-instrument-sans);
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.exp-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.exp-date {
  display: none;
}

@media (min-width: 560px) {
  .exp-date {
    display: inline-block;
  }
}

.exp-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.exp-item.open .exp-chevron {
  transform: rotate(180deg);
  color: var(--text-primary);
}

.exp-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.exp-item.open .exp-body {
  grid-template-rows: 1fr;
}

.exp-content {
  overflow: hidden;
  padding: 0 1.5rem;
  transition: padding 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
  .exp-content {
    padding: 0 1.75rem;
  }
}

.exp-item.open .exp-content {
  padding: 0.25rem 1.5rem 1.75rem;
}

@media (min-width: 768px) {
  .exp-item.open .exp-content {
    padding: 0.25rem 1.75rem 2rem;
  }
}

.exp-desc {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-body);
  margin-bottom: 1rem;
}

.exp-media-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.03);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-card);
}

html.dark .exp-media-wrap {
  background: rgba(255, 255, 255, 0.03);
}

.exp-media-wrap a {
  display: block;
}

.exp-media-wrap img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  object-position: top left;
  display: block;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.exp-media-wrap:hover img {
  transform: scale(1.015);
}

.exp-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.exp-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.exp-action-btn.primary {
  background-color: var(--text-primary);
  color: var(--bg-surface);
}

.exp-action-btn.secondary {
  background-color: var(--bg-pill);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.exp-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  background-color: var(--bg-surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: background-color 0.3s ease;
}

.project-preview-wrap {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.04);
  padding: 1.25rem 1.25rem 0;
  cursor: pointer;
}

html.dark .project-preview-wrap {
  background: rgba(255, 255, 255, 0.04);
}

.project-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-preview-wrap img {
  transform: translateY(-4px) scale(1.02);
}

.project-details {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.project-title {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.project-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.project-link-icon {
  color: var(--text-muted);
  transition: color 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-link-icon:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
}

.project-tagline {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  font-weight: 500;
}

.project-desc {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background-color: var(--bg-pill);
  color: var(--text-secondary);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}

/* --- 8. GitHub Activity Calendar --- */
.calendar-card {
  background-color: var(--bg-surface);
  border-radius: 1.25rem;
  padding: 1.25rem 1rem;
  box-shadow: var(--shadow-card);
  transition: background-color 0.3s ease;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .calendar-card {
    padding: 1.75rem 2.25rem;
  }
}

.calendar-scroll-wrap {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 0.25rem;
}

.calendar-scroll-wrap::-webkit-scrollbar,
.calendar-grid-container::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.calendar-grid-container {
  min-width: 620px;
  width: 100%;
}

@media (min-width: 768px) {
  .calendar-grid-container {
    min-width: auto;
    width: 100%;
  }
}

.calendar-months {
  display: grid;
  grid-template-columns: repeat(53, 1fr);
  gap: 3.5px;
  margin-bottom: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--text-muted);
  width: 100%;
}

.calendar-months span {
  white-space: nowrap;
}

.calendar-weeks {
  display: grid;
  grid-template-columns: repeat(53, 1fr);
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  gap: 3.5px;
  width: 100%;
}

.calendar-day {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 2.5px;
  background-color: var(--calendar-c0);
  transition: transform 0.15s ease, opacity 0.15s ease;
  cursor: pointer;
}

.calendar-day:hover {
  transform: scale(1.35);
  z-index: 10;
}

.calendar-day[data-level="1"] { background-color: var(--calendar-c1); }
.calendar-day[data-level="2"] { background-color: var(--calendar-c2); }
.calendar-day[data-level="3"] { background-color: var(--calendar-c3); }
.calendar-day[data-level="4"] { background-color: var(--calendar-c4); }

.calendar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  color: var(--text-muted);
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .calendar-footer {
    font-size: 0.78rem;
  }
}

.calendar-legend {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-box {
  width: 10px;
  height: 10px;
  border-radius: 2.5px;
}

/* Tooltip for Calendar */
.calendar-tooltip-bubble {
  position: fixed;
  z-index: 150;
  background-color: #181818;
  color: #ffffff;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.15s ease;
  transform: translate(-50%, -120%);
}

html.dark .calendar-tooltip-bubble {
  background-color: #ffffff;
  color: #181818;
}

/* --- 9. Social Links Row --- */
.socials-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background-color: var(--bg-surface);
  color: var(--text-body);
  border: 1px solid var(--border-subtle);
  padding: 0.65rem 1.25rem;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-pill:hover {
  transform: translateY(-2px);
  color: var(--text-primary);
  border-color: var(--accent-pink);
  box-shadow: var(--shadow-soft);
}

.social-pill .social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-pill .social-icon svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 640px) {
  .socials-grid {
    gap: 0.85rem;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
  }

  .social-pill {
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  }

  .social-pill .social-label {
    display: none;
  }

  .social-pill .social-icon svg {
    width: 22px;
    height: 22px;
  }
}

/* --- 10. Call to Action Footer --- */
.footer-cta-wrapper {
  margin-top: 5rem;
  padding-bottom: 6rem;
  text-align: center;
  position: relative;
}

@media (min-width: 768px) {
  .footer-cta-wrapper {
    margin-top: 6rem;
    padding-bottom: 5rem;
  }
}

.cta-heading {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.85rem;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 1.75rem;
}

@media (min-width: 768px) {
  .cta-heading {
    font-size: 2.25rem;
  }
}

.cta-btn {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-soft);
  gap: 0.5rem;
  margin-bottom: 3.5rem;
}

.cta-btn:hover {
  box-shadow: var(--shadow-soft-hover);
  transform: translateY(-1px);
}

.footer-signature {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-signature .heart {
  color: var(--accent-pink);
}

.footer-signature .author {
  font-family: var(--font-signature);
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-left: 0.25rem;
}

.footer-heart-bullet {
  color: var(--accent-pink);
  font-size: 0.85rem;
  margin-top: 1.25rem;
  opacity: 0.65;
  display: block;
}

/* --- 11. Projects View Page Header --- */
.view-header {
  padding-top: 7rem;
  margin-bottom: 3.5rem;
  text-align: center;
}

.view-badge {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.75rem;
}

.view-main-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .view-main-title {
    font-size: 3.5rem;
  }
}

.view-subtitle {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- 12. Contact & Talk View --- */
.contact-section-wrap {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 7rem;
  padding-bottom: 7rem;
}

.contact-card {
  width: 100%;
  max-width: 520px;
  background-color: var(--bg-surface);
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: background-color 0.3s ease;
}

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

.contact-card-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.contact-card-sub {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-input, .form-textarea {
  width: 100%;
  background-color: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-pink);
  box-shadow: 0 0 0 3px rgba(243, 185, 200, 0.25);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit-btn {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 12px;
  padding: 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-soft);
  transition: all 0.2s ease;
}

.form-submit-btn:hover {
  box-shadow: var(--shadow-soft-hover);
  transform: translateY(-1px);
}

.form-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* --- 13. Story Modal Popup --- */
.story-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  background-color: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.story-overlay.active {
  display: flex;
}

.story-box {
  width: 100%;
  max-width: 380px;
  height: 580px;
  background: #18181b;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
}

.story-progress-bar-wrap {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  overflow: hidden;
  z-index: 30;
}

.story-progress-fill {
  height: 100%;
  width: 0%;
  background: #ffffff;
  transition: width 0.05s linear;
}

.story-header {
  position: absolute;
  top: 24px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 30;
}

.story-author {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.story-author img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  object-fit: cover;
}

.story-avatar-dark {
  display: none;
}

html.dark .story-avatar-light {
  display: none;
}

html.dark .story-avatar-dark {
  display: block;
}

.story-author-name {
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
}

.story-time {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
}

.story-close-btn {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s ease;
}

.story-close-btn:hover {
  opacity: 1;
}

.story-media-wrap {
  width: 100%;
  height: 100%;
  position: relative;
}

.story-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-caption-overlay {
  position: absolute;
  inset-x: 0;
  bottom: 0;
  padding: 2rem 1.5rem 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  color: #ffffff;
  z-index: 30;
}

.story-badge {
  display: inline-block;
  background: var(--accent-berry);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.story-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.story-text {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
}
