/* =========================================================
   MAIN CONTENT
========================================================= */

.main-content {
  flex: 1;
  min-width: 0;
  padding: clamp(12px, 1.5vw, 24px);
  overflow-y: auto;
  position: relative;
  isolation: isolate;
  background: var(--bg-main);
  padding-bottom: 100px;
}

.main-content::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: clamp(220px, 40vw, 580px);
  height: clamp(380px, 65vw, 950px);
  background: url("../images/batikkawung.svg") no-repeat right bottom / contain;
  opacity: 0.65;
  pointer-events: none;
  z-index: -1;
}

/* Dark mode */
[data-theme="dark"] .main-content::before {
  filter: brightness(1.5) saturate(0.7);
  opacity: 0.45;
}

/* =========================================================
   HERO BANNER
========================================================= */

.banner-hero {
  width: calc(100% - 40px);
  max-width: 1400px;
  margin: 20px auto;
  overflow: hidden;
  border-radius: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.banner-hero img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* =========================
   PROMO BANNER MODERN SAAS 2026 + TYPING EFFECT
   ======================== */

.promo-banner {
  position: relative;
  padding: clamp(1rem, 2.5vw, 1.75rem) clamp(1rem, 3vw, 2rem);
  border-radius: var(--radius-lg, 16px);
  margin-bottom: clamp(1rem, 3vw, 2rem);
  overflow: hidden;

  background: linear-gradient(
    135deg,
    rgba(5, 150, 105, 0.08) 0%,
    rgba(5, 150, 105, 0.02) 100%
  );

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(5, 150, 105, 0.2);

  animation: bannerSlideFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;

  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.promo-banner::before {
  content: "";
  position: absolute;
  top: clamp(-40px, -3vw, -20px);
  right: clamp(-40px, -3vw, -20px);
  width: clamp(90px, 12vw, 140px);
  height: clamp(90px, 12vw, 140px);
  background: var(--emerald-primary);
  opacity: 0.15;
  filter: blur(clamp(25px, 3.5vw, 40px));
  border-radius: 50%;
  pointer-events: none;
}

.promo-banner:hover {
  transform: translateY(-2px);
  border-color: rgba(5, 150, 105, 0.4);
  box-shadow: 0 12px 30px -10px rgba(5, 150, 105, 0.15);
}

.promo-banner h2 {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: clamp(0.35rem, 0.8vw, 0.5rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-align: center;
}

.promo-banner p.typing-text {
  color: var(--text-muted);
  font-size: clamp(0.78rem, 1.2vw, 0.95rem);
  line-height: 1.6;
  max-width: 90%;
  width: fit-content;
  margin-inline: auto;
  display: block;
  text-align: center;
}

/* Kursor Kedip */
.promo-banner p.typing-text::after {
  content: "|";
  display: inline-block;
  margin-left: 3px;
  color: var(--emerald-primary);
  font-weight: 700;
  animation: blinkCursor 0.8s infinite;
}

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

@keyframes bannerSlideFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

[data-theme="dark"] .promo-banner {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.12) 0%,
    rgba(16, 185, 129, 0.03) 100%
  );
  border-color: rgba(16, 185, 129, 0.25);
}

/* =========================================================
   SECTION HEADING
========================================================= */

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 1.75rem;
}

.section-heading {
  max-width: 750px;
}

.section-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--emerald-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
}

.section-heading h1 {
  margin: 0;
  color: var(--text-main);
  font-size: clamp(25px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1px;
}

.badge-count {
  flex-shrink: 0;
  background: var(--emerald-light);
  color: var(--emerald-primary);
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* =========================================================
   PROJECT GRID
========================================================= */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}

/* =========================================================
   PROJECT CARD
========================================================= */

.project-card {
  container-type: inline-size;

  min-width: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);

  padding: clamp(8px, 4cqi, 1.25rem);

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  transition: var(--transition);
  opacity: 0;
  transform: translateY(15px);
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--emerald-primary);
}

/* CARD BADGES */

.card-badge-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.card-badge {
  font-size: clamp(0.62rem, 3.2cqi, 0.72rem);
  padding: 2px clamp(5px, 2.5cqi, 8px);
  border-radius: var(--radius-sm);
  background: var(--emerald-light);
  color: var(--emerald-primary);
  font-weight: 600;
}

.card-badge.gold {
  background: rgba(200, 169, 81, 0.15);
  color: var(--gold-accent);
}

/* CARD TEXT */

.card-title {
  font-size: clamp(0.85rem, 5cqi, 1.1rem);
  line-height: 1.4;
  margin-bottom: 6px;
  font-weight: 700;
}

.card-desc {
  font-size: clamp(0.7rem, 3.8cqi, 0.88rem);
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: clamp(0.7rem, 4cqi, 1rem);

  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* PRICE */

.price-box {
  margin-bottom: clamp(0.7rem, 4cqi, 1rem);
}

.price-normal {
  text-decoration: line-through;
  font-size: clamp(0.68rem, 3.5cqi, 0.8rem);
  color: var(--text-muted);
}

.price-promo {
  font-size: clamp(0.95rem, 5.5cqi, 1.2rem);
  font-weight: 800;
  color: var(--emerald-primary);
}

/* TECH STACK */

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: clamp(0.8rem, 5cqi, 1.25rem);
}

.tech-tag {
  font-size: clamp(0.6rem, 3.2cqi, 0.7rem);
  background: var(--bg-main);
  padding: 2px clamp(4px, 2.5cqi, 6px);
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

/* CARD ACTIONS */

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(5px, 3cqi, 8px);
  margin-top: auto;
}

.btn {
  min-width: 0;
  padding: clamp(6px, 3cqi, 8px) clamp(4px, 4cqi, 12px);
  border-radius: var(--radius-sm);
  font-size: clamp(0.68rem, 3.8cqi, 0.85rem);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
}

.btn-emerald {
  background: var(--emerald-primary);
  color: #fff;
}

.btn-emerald:hover {
  background: var(--emerald-hover);
}

.btn-emerald-outline,
.icon-theme {
  border-color: var(--emerald-primary);
  color: var(--emerald-primary);
  background: transparent;
}

.btn-emerald-outline:hover {
  background: var(--emerald-light);
}
.btn-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-content i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
/* =========================================================
   CARD THUMBNAIL
========================================================= */

.card-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  background-color: var(--bg-sidebar);
}

.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.3s ease;
}

.project-card:hover .card-thumbnail img {
  transform: scale(1.05);
}

/* =========================================================
   TABLET
   768px - 1024px
========================================================= */

@media (min-width: 768px) and (max-width: 1024px) {
  .main-content {
    padding: 16px;
  }

  .projects-grid {
    gap: 1rem;
  }

  .section-title {
    gap: 14px;
  }
}

/* =========================================================
   LAPTOP
   1025px - 1499px
========================================================= */

@media (min-width: 1025px) and (max-width: 1499px) {
  .projects-grid {
    gap: 1rem;
  }
}

/* INFINITE VALUE TICKER */
.ticker-section {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-width);
  right: 0;
  z-index: 100;

  height: 54px;
  display: flex;
  align-items: center;
  overflow: hidden;

  background: var(--bg-sidebar);
  border-top: 1px solid var(--border-color);
  transition: left 0.3s ease;
}
.dashboard-wrapper.sidebar-collapsed .ticker-section {
  left: 76px;
}

.ticker-label {
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;

  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;

  color: var(--text-muted);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  z-index: 2;
}

.ticker-track-wrap {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 40px;
  white-space: nowrap;

  animation: scrollTicker 30s linear infinite;
}

.ticker-item {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
}

.ticker-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  background: var(--emerald-primary);
  border-radius: 50%;
}

@keyframes scrollTicker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-33.333333%);
  }
}
