/* ====================================
   Kirtan Teg Singh - Dynamic Portal
   Base CSS with Variables and Design System
   ==================================== */

@import url('https://fonts.googleapis.com/css2?family=El+Messiri:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=Noto+Sans+Gurmukhi:wght@400;500;600&display=swap');

:root {
  --bg-light: #F1F1F1;
  --surface: #FFFFFF;
  --text-dark: #101C2F;
  --text-medium: #2D3558;
  --primary: #325394;
  --secondary: #57C4DD;
  --accent: #EA428B;
  --muted: #9C9AAD;
  --dark-bg: #111B26;
  --border: #9C9AAD33;
  
  /* Dark mode variables */
  --bg-light-dark: #1a1a1a;
  --surface-dark: #2d2d2d;
  --text-dark-dark: #f5f5f5;
  --text-medium-dark: #d0d0d0;
  --border-dark: #404040;

  /* Reflection quote (light mode) */
  --reflection-quote-bg: #E8F8F9;
  --reflection-quote-color: var(--text-dark);
}

[data-theme="dark"] {
  --bg-light: var(--bg-light-dark);
  --surface: var(--surface-dark);
  --text-dark: var(--text-dark-dark);
  --text-medium: var(--text-medium-dark);
  --border: var(--border-dark);
  --reflection-quote-bg: #0d1f24;
  --reflection-quote-color: var(--text-dark-dark);
}

/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Responsive Typography with clamp() */
h1, h2, h3, h4, h5, h6 {
  font-family: 'El Messiri', serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 2rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }

p {
  font-size: clamp(1rem, 2vw, 1.125rem);
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* JavaScript required overlay (shown when JS disabled) */
#js-required-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: linear-gradient(180deg, #243871 0%, #101C2F 100%);
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'El Messiri', serif;
  text-align: center;
  padding: 2rem;
}

.no-js #js-required-overlay {
  display: flex;
}

.no-js .skip-link,
.no-js header,
.no-js main,
.no-js footer {
  display: none !important;
}

.js-required-inner h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
  color: white;
}

.js-required-inner p {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1rem, 2vw, 1.125rem);
  max-width: 400px;
  margin: 0 auto;
  opacity: 0.95;
}

.js-required-gurmukhi {
  font-family: 'Noto Sans Gurmukhi', 'El Messiri', serif !important;
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  max-width: 420px;
  margin: 1.5rem auto 0 !important;
  opacity: 0.9;
  font-style: italic;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(241, 241, 241, 0.9);
  backdrop-filter: blur(10px);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
  background: var(--surface);
  box-shadow: 0 2px 10px var(--border);
}

[data-theme="dark"] header {
  background: rgba(26, 26, 26, 0.9);
}

[data-theme="dark"] header.scrolled {
  background: var(--surface-dark);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'El Messiri', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--text-dark);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

nav a {
  font-weight: 500;
  color: var(--text-medium);
  transition: color 0.3s ease;
}

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

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: var(--text-dark);
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--surface);
  box-shadow: -2px 0 10px var(--border);
  padding: 5rem 2rem;
  transition: right 0.3s ease;
  z-index: 1000;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu ul {
  flex-direction: column;
  gap: 1.5rem;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
  background: none;
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: var(--text-dark);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Main Content */
main {
  margin-top: 80px;
  min-height: calc(100vh - 80px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Hero Section */
.hero {
  background: linear-gradient(180deg, #243871 0%, #101C2F 100%);
  color: white;
  padding: 6rem 2rem;
  text-align: center;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero h1 {
  color: white;
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.hero-quote {
  font-family: 'El Messiri', serif;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-style: italic;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.95;
}

/* Grid System */
.grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Cards */
.card {
  background: var(--surface);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 10px var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px var(--border);
}

.card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.card-title {
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.card-excerpt {
  color: var(--text-medium);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Blog Filters */
.blog-filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  justify-content: center;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  color: var(--text-medium);
}

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

/* Blog Post Detail Styles */
.blog-detail {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.blog-header {
  text-align: center;
  margin-bottom: 3rem;
}

.blog-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.blog-content {
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.8;
}

/* Interview Format */
.interview-question {
  font-weight: 600;
  color: var(--primary);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.interview-answer {
  border-left: 4px solid var(--secondary);
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

/* Review Format */
.review-rating {
  display: flex;
  gap: 5px;
  margin: 1rem 0;
}

.star {
  width: 20px;
  height: 20px;
  fill: var(--muted);
}

.star.filled {
  fill: var(--accent);
}

.review-pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.pros, .cons {
  padding: 1.5rem;
  border-radius: 8px;
}

.pros {
  background: #E8F8F9;
  border-left: 4px solid var(--secondary);
}

.cons {
  background: #FFF5F8;
  border-left: 4px solid var(--accent);
}

.pros h4, .cons h4 {
  margin-bottom: 1rem;
}

/* Reflection Format */
.reflection-quote {
  background: var(--reflection-quote-bg);
  color: var(--reflection-quote-color);
  padding: 2rem;
  border-radius: 12px;
  margin: 2rem 0;
  border-left: 4px solid var(--primary);
  font-family: 'El Messiri', serif;
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  font-style: italic;
  text-align: center;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Casual/Tarot Format */
.tarot-card-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin: 2rem 0;
}

.tarot-card-img {
  flex-shrink: 0;
  width: 200px;
  aspect-ratio: 3 / 5;
  object-fit: cover;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .tarot-card-layout {
    flex-direction: column;
  }
  
  .tarot-card-img {
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
  }
  
  .review-pros-cons {
    grid-template-columns: 1fr;
  }
}

/* Comments System */
.comments-section {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.comment-form {
  background: var(--surface);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.comment-textarea {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  resize: vertical;
  margin-bottom: 1rem;
  transition: border-color 0.3s ease;
}

.comment-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.comment-textarea.warning {
  border-color: var(--accent);
}

.char-counter {
  text-align: right;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.char-counter.warning {
  color: var(--accent);
}

.comment-input-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.comment-input {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
}

.comment-input:focus {
  outline: none;
  border-color: var(--primary);
}

.comment-submit {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.comment-submit:hover:not(:disabled) {
  background: var(--accent);
}

.comment-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.comment {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1rem;
}

.comment-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.2rem;
}

.comment-body {
  flex: 1;
}

.comment-author {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.comment-text {
  color: var(--text-medium);
  margin-bottom: 0.5rem;
}

.comment-date {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Discography */
.discography-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.album-card {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px var(--border);
  transition: transform 0.3s ease;
}

.album-card:hover {
  transform: translateY(-5px);
}

.album-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.album-info {
  padding: 1.5rem;
}

.album-title {
  margin-bottom: 0.5rem;
}

.album-year {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.album-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.album-btn {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--text-dark);
}

.album-btn:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.album-btn svg {
  width: 20px;
  height: 20px;
}

/* Biography */
.biography-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
  margin: 3rem 0;
}

.bio-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 5px 20px var(--border);
}

.bio-text {
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.8;
}

.bio-text h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.timeline {
  margin-top: 4rem;
  padding: 2rem 0;
}

.timeline-title {
  text-align: center;
  margin-bottom: 2rem;
}

.timeline-scroll {
  overflow-x: auto;
  padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
}

.timeline-track {
  display: flex;
  gap: 2rem;
  min-width: fit-content;
}

.timeline-item {
  min-width: 250px;
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--border);
  border-left: 4px solid var(--primary);
}

.timeline-year {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.timeline-event {
  color: var(--text-medium);
}

/* Cloud Reflection Section */
.cloud-section {
  background: var(--surface);
  padding: 3rem;
  border-radius: 12px;
  text-align: center;
  margin-top: 3rem;
  box-shadow: 0 2px 10px var(--border);
}

.cloud-section button.cloud-btn,
button.cloud-btn {
  background: #325394 !important;
  color: white !important;
  border: none !important;
  padding: 1rem 2rem !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  margin-top: 2rem !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 6px rgba(50, 83, 148, 0.3) !important;
  font-family: 'El Messiri', serif !important;
  display: inline-block !important;
  text-align: center !important;
}

.cloud-section button.cloud-btn:hover,
button.cloud-btn:hover {
  background: #EA428B !important;
  box-shadow: 0 6px 12px rgba(234, 66, 139, 0.4) !important;
  transform: translateY(-2px) !important;
  color: white !important;
}

.cloud-section button.cloud-btn:active,
button.cloud-btn:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 4px rgba(234, 66, 139, 0.3) !important;
  background: #EA428B !important;
  color: white !important;
}

.cloud-section button.cloud-btn:focus,
button.cloud-btn:focus {
  outline: 2px solid #EA428B !important;
  outline-offset: 2px !important;
}

.cloud-result {
  margin-top: 2rem;
  padding: 2rem;
  background: var(--bg-light);
  border-radius: 12px;
}

.cloud-phrase {
  display: grid;
  gap: 0.75rem;
  text-align: center;
}

.cloud-gurmukhi {
  font-family: 'Noto Sans Gurmukhi', 'El Messiri', serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--text-dark);
}

.cloud-romanized {
  font-family: 'El Messiri', serif;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: var(--text-medium);
  font-style: italic;
}

.cloud-english {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-medium);
  line-height: 1.6;
}

/* Footer */
footer {
  background: var(--surface);
  padding: 2rem;
  text-align: center;
  color: var(--text-medium);
  margin-top: 4rem;
  border-top: 1px solid var(--border);
}

/* Filter Dropdown */
.filter-select {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-dark);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  margin-bottom: 2rem;
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Transitions */
.fade-enter-active, .fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from, .fade-leave-to {
  opacity: 0;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .biography-layout {
    grid-template-columns: 1fr;
  }
  
  .bio-photo {
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  nav ul {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .header-content {
    padding: 1rem;
  }
  
  .container {
    padding: 1rem;
  }
  
  .hero {
    padding: 4rem 1rem;
    min-height: 60vh;
  }
  
  .comment-input-group {
    flex-direction: column;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }

/* Loading State */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
}

/* Container Queries Support */
@container (min-width: 600px) {
  .card {
    padding: 2.5rem;
  }
}

