/* ================================================
   THE NICHE — Main Stylesheet
   Edit variables at the top to change colors.
   ================================================ */

/* ---------- GOOGLE FONTS ---------- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ---------- CSS VARIABLES (Light Mode) ---------- */
:root {
  --primary:        #4f46e5;
  --primary-hover:  #4338ca;
  --primary-light:  rgba(79, 70, 229, 0.1);
  --accent:         #f59e0b;
  --accent-hover:   #d97706;
  --accent-light:   rgba(245, 158, 11, 0.1);
  --bg:             #f8fafc;
  --bg-card:        #ffffff;
  --text:           #1e293b;
  --text-muted:     #64748b;
  --border:         #e2e8f0;
  --nav-bg:         rgba(255,255,255,0.95);
  --shadow:         0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --radius:         12px;
  --radius-sm:      8px;
}

/* ---------- CSS VARIABLES (Dark Mode) ---------- */
html.dark {
  --bg:        #0f172a;
  --bg-card:   #1e293b;
  --text:      #f1f5f9;
  --text-muted:#94a3b8;
  --border:    #334155;
  --nav-bg:    rgba(15, 23, 42, 0.95);
  --shadow:    0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

/* ---------- LAYOUT ---------- */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.page {
  flex: 1;
  padding: 5rem 0 4rem;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.5s ease both;
}

.fade-up-1 { animation-delay: 0.05s; }
.fade-up-2 { animation-delay: 0.12s; }
.fade-up-3 { animation-delay: 0.19s; }
.fade-up-4 { animation-delay: 0.26s; }

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
}

.nav-logo-icon {
  width: 34px;
  height: 34px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: monospace;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-link:hover { color: var(--text); background: var(--primary-light); }
.nav-link.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

/* Language Toggle */
.lang-btn {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: none;
  cursor: pointer;
  padding: 0;
}

.lang-btn span {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  transition: background 0.2s, color 0.2s;
  color: var(--text-muted);
}

.lang-btn span.lang-active {
  background: var(--primary);
  color: #fff;
}

/* Dark Mode Toggle */
.dark-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.2s;
}

.dark-btn:hover { background: var(--primary-light); }

.dark-btn .icon-moon { display: none; }
html.dark .dark-btn .icon-sun  { display: none; }
html.dark .dark-btn .icon-moon { display: block; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.5rem;
  cursor: pointer;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
}

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Mobile Nav */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    box-shadow: var(--shadow-md);
  }

  .nav-links.open { display: flex; }

  .nav-link { width: 100%; padding: 0.5rem 0.75rem; }
}

/* ---------- HERO SECTION ---------- */
.hero { padding: 2rem 0 3rem; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.hero-sub {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
}

.hero-intro {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 1.75rem;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,0.3); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { background: var(--accent-hover); }

/* ---------- CARD ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(79,70,229,0.25);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.card-icon.indigo  { background: var(--primary-light); }
.card-icon.amber   { background: var(--accent-light); }
.card-icon.emerald { background: rgba(16,185,129,0.1); }

/* ---------- SECTION HEADING ---------- */
.page-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.page-heading h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-intro {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* ---------- BADGE ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.badge-amber  { background: var(--accent-light); color: var(--accent); }
.badge-muted  { background: rgba(100,116,139,0.1); color: var(--text-muted); }
.badge-primary{ background: var(--primary-light); color: var(--primary); }

/* ---------- CHECKLIST ---------- */
.checklist { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text);
}

.checklist li::before {
  content: '✓';
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.checklist.amber li::before { color: var(--accent); }

/* ---------- GRID ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

/* ---------- ABOUT PAGE ---------- */
.about-intro {
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

.about-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.about-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.about-card-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
}

.card p { color: var(--text-muted); line-height: 1.7; margin-bottom: 0.75rem; }
.card p:last-child { margin-bottom: 0; }

/* ---------- BLOG ---------- */
.blog-post-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.blog-post-card h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  transition: color 0.2s;
}

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

.post-date { font-size: 0.8rem; color: var(--text-muted); }
.post-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

.read-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.read-link:hover { text-decoration: underline; }

/* Blog post page */
.post-page { max-width: 680px; }
.post-page h1 { font-size: clamp(1.5rem, 4vw, 2.25rem); margin-bottom: 0.5rem; }
.post-body { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.25rem; }
.post-body p { color: var(--text-muted); line-height: 1.8; font-size: 0.975rem; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 2rem;
}
.back-link:hover { text-decoration: underline; }

/* ---------- PROJECTS ---------- */
.project-card {
  display: flex;
  flex-direction: column;
}

.project-card-body { flex: 1; margin-bottom: 1rem; }

.project-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.project-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.project-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.project-link:hover { text-decoration: underline; }

.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(100,116,139,0.1);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

/* ---------- SERVICES ---------- */
.service-card {
  display: flex;
  flex-direction: column;
}

.service-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.service-items {
  flex: 1;
  margin-bottom: 1rem;
}

.service-items li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.service-items li::before {
  content: '✓';
  color: var(--primary);
  font-weight: 700;
  font-size: 0.75rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.price-tag {
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-top: auto;
}

.cta-box {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin-top: 2rem;
}

.cta-box h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.cta-box p {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-bottom: 1.25rem;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.cta-box .btn-outline {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.cta-box .btn-outline:hover { background: rgba(255,255,255,0.25); }

/* ---------- CONTACT ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

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

.contact-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-info-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.contact-info-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  word-break: break-all;
}

.contact-info-value a { color: var(--primary); }
.contact-info-value a:hover { text-decoration: underline; }

/* Form */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

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

.form-btn {
  width: 100%;
  justify-content: center;
  padding: 0.7rem;
  font-size: 0.925rem;
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.alert-success {
  background: rgba(16,185,129,0.1);
  color: #059669;
  border: 1px solid rgba(16,185,129,0.2);
}

.alert-error {
  background: rgba(239,68,68,0.1);
  color: #dc2626;
  border: 1px solid rgba(239,68,68,0.2);
}

/* ---------- VOCAB APP ---------- */
.vocab-levels {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.level-btn {
  padding: 0.6rem 1.5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Outfit', sans-serif;
}

.level-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.vocab-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.vocab-word {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.vocab-meaning {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.vocab-example {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
  border-left: 3px solid var(--primary);
  padding-left: 0.75rem;
  text-align: left;
}

.vocab-hidden { display: none; }

.vocab-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.vocab-score {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.vocab-score span { font-weight: 700; }
.score-correct { color: #059669; }
.score-wrong   { color: #dc2626; }

.vocab-result {
  text-align: center;
  padding: 2rem;
}

.vocab-result h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.vocab-result p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ---------- FOOTER ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.footer-tagline { font-size: 0.8rem; color: var(--text-muted); }
.footer-copy    { font-size: 0.8rem; color: var(--text-muted); }

/* ---------- DIVIDER ---------- */
.divider { height: 1px; background: var(--border); margin: 2rem 0; }

/* ---------- UTILITY ---------- */
.text-primary { color: var(--primary); }
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-muted); }
.font-heading { font-family: 'Outfit', sans-serif; }
.mt-1  { margin-top: 0.25rem; }
.mt-2  { margin-top: 0.5rem; }
.mt-3  { margin-top: 0.75rem; }
.mb-1  { margin-bottom: 0.25rem; }
.mb-2  { margin-bottom: 0.5rem; }
.mb-3  { margin-bottom: 0.75rem; }
.gap-2 { gap: 0.5rem; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; }
  .btn       { justify-content: center; }
  .vocab-actions { flex-direction: column; }
  .vocab-actions .btn { width: 100%; }
}
