/* =============================================
   CUSTOM FONTS
   ============================================= */
@font-face {
  font-family: 'Z11-MyanSans';
  src: url('fonts/Z11-MyanSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Z11-MyanSans';
  src: url('fonts/Z11-MyanSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Z11-MyanSans';
  src: url('fonts/Z11-MyanSans-Thin.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary:    #0083ff;
  --primary-dk: #1d4ed8;
  --accent:     #f59e0b;
  --dark:       #111827;
  --mid:        #374151;
  --muted:      #6b7280;
  --light:      #f3f4f6;
  --white:      #ffffff;
  --border:     #e5e7eb;
  --radius:     12px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 10px 40px rgba(0,0,0,.14);
  --transition: .25s ease;
  --font-body:  'Noto Sans Myanmar', sans-serif;
  --font-head:  'Z11-MyanSans', 'Noto Sans Myanmar', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main#app { flex: 1; }

a { color: inherit; text-decoration: none; }

img { display: block; width: 100%; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  color: #0083ff;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0083ff;
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
}

.logo {
  cursor: pointer;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 64px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: .95rem;
  font-weight: 500;
  color: var(--white);
  position: relative;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--white);
  transition: width var(--transition);
}

.nav-links a:hover::after { width: 100%; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 36px;
  height: 36px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 12px 0;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  padding: 12px 24px;
  font-weight: 500;
  color: var(--mid);
  font-size: 1rem;
  transition: background var(--transition), color var(--transition);
}

.mobile-menu a:hover {
  background: var(--light);
  color: var(--primary);
}

/* =============================================
   HOME PAGE
   ============================================= */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #60a5fa 100%);
  color: var(--white);
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content { position: relative; z-index: 1; }

.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,.2);
  color: var(--white);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero p {
  font-size: clamp(.95rem, 2vw, 1.15rem);
  opacity: .85;
  max-width: 540px;
  margin: 0 auto;
}

/* Featured post strip */
.featured-strip {
  padding: 64px 0 24px;
}

.section-title {
  font-family: var(--font-head);
  font-size: 1.75rem;
  color: var(--dark);
  margin-bottom: 8px;
}

.section-sub {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 36px;
}

/* Category filter bar */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-btn {
  padding: 8px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.no-posts {
  color: var(--muted);
  font-size: 1rem;
  padding: 40px 0;
  grid-column: 1 / -1;
}

/* Blog grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  padding-bottom: 80px;
}

/* Blog card */
.blog-card {
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.blog-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.06);
}

.blog-card-category {
  background: var(--primary);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 5px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.blog-card-body {
  padding: 14px 0 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: .8rem;
  color: var(--muted);
}

.blog-card-meta .dot { font-size: .5rem; }

.blog-card-title {
  font-family: 'Z11-MyanSans', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.35;
  margin-bottom: 10px;
  transition: color var(--transition);
}

.blog-card:hover .blog-card-title { color: var(--primary); }

.blog-card-excerpt {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =============================================
   BLOG POST PAGE
   ============================================= */
.post-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: 28px;
  cursor: pointer;
  transition: color var(--transition);
  background: none;
  border: none;
}

.post-back:hover { color: var(--primary); }

.post-category-badge {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.post-title {
  font-family: 'Z11-MyanSans', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 16px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: .87rem;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.post-meta-divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
}

.post-hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 40px;
}

.post-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--mid);
}

.post-content h2 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--dark);
  margin: 36px 0 14px;
}

.post-content h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--dark);
  margin: 28px 0 10px;
}

.post-content p { margin-bottom: 20px; }

.post-content ul, .post-content ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.post-content li { margin-bottom: 8px; }

.post-content blockquote {
  border-left: 4px solid var(--primary);
  background: var(--light);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--dark);
  margin: 28px 0;
}

.post-content strong { color: var(--dark); font-weight: 600; }

.post-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.tag-chip {
  background: var(--light);
  color: #0083ff;
  font-size: .78rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
}

/* Suggestions */
.suggestions-section {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 2px solid var(--border);
}

.suggestions-section .section-title {
  font-size: 1.4rem;
  margin-bottom: 24px;
}

.suggestions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.suggestion-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition);
  background: var(--white);
}

.suggestion-card:hover {
  transform: translateY(-4px);
}

.suggestion-card-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.suggestion-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.suggestion-card:hover .suggestion-card-img img { transform: scale(1.07); }

.suggestion-card-body {
  padding: 14px;
}

.suggestion-card-title {
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 6px;
  transition: color var(--transition);
}

.suggestion-card:hover .suggestion-card-title { color: var(--primary); }

.suggestion-card-date {
  font-size: .78rem;
  color: var(--muted);
}

/* =============================================
   FOOTER — CASSETTE PLAYER
   ============================================= */
.site-footer {
  background: #0e0a06;
  overflow: hidden;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 52px 20px 36px;
  gap: 20px;
}

.cassette-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  user-select: none;
}

.cassette-svg {
  width: 300px;
  max-width: 88vw;
  filter: drop-shadow(0 10px 32px rgba(0,0,0,0.75));
  transition: transform .25s ease, filter .25s ease;
}

.cassette-player:hover .cassette-svg {
  transform: translateY(-5px);
  filter: drop-shadow(0 18px 40px rgba(180,110,40,.4));
}

.cassette-hint {
  color: rgba(255,255,255,.35);
  font-size: .78rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  transition: color .3s;
}

.cassette-player:hover .cassette-hint {
  color: rgba(212,137,58,.75);
}

.cassette-player.playing .cassette-hint {
  color: #d4893a;
  animation: hintPulse 2s ease-in-out infinite;
}

/* Reel spin */
#reelL, #reelR {
  transform-box: fill-box;
  transform-origin: center;
}

.cassette-player.playing #reelL {
  animation: spinReel 2s linear infinite;
}

.cassette-player.playing #reelR {
  animation: spinReel 2.4s linear infinite;
}

@keyframes spinReel {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes hintPulse {
  0%, 100% { opacity: .7; }
  50%       { opacity: 1; }
}

.footer-copy {
  background: #0e0a06;
  text-align: center;
  padding: 14px 0 20px;
  border-top: 1px solid rgba(200,130,50,.08);
  width: 100%;
}

.footer-copy p {
  color: rgba(255,255,255,.22);
  font-size: .78rem;
}

/* =============================================
   PAGE TRANSITIONS
   ============================================= */
.page-enter {
  animation: fadeSlideUp .35s ease forwards;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .filter-bar { flex-wrap: nowrap; }

  .hero { padding: 56px 0 48px; }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .post-page { padding: 32px 16px 60px; }

  .post-meta { gap: 10px; }

  .suggestions-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .suggestions-grid {
    grid-template-columns: 1fr 1fr;
  }
}
