/* ============================================================
   Bruno Ganontha — Portfolio Website
   Stylesheet: Dark/Light mode, Amber accent, Responsive
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Amber/Gold accent palette */
  --accent:        #F59E0B;
  --accent-light:  #FCD34D;
  --accent-dark:   #D97706;
  --accent-subtle: rgba(245, 158, 11, 0.12);
  --accent-border: rgba(245, 158, 11, 0.30);

  /* Light mode */
  --bg:            #F8FAFC;
  --bg-card:       #FFFFFF;
  --bg-nav:        rgba(248, 250, 252, 0.85);
  --bg-code:       #F1F5F9;
  --text:          #0F172A;
  --text-secondary:#475569;
  --text-muted:    #94A3B8;
  --border:        #E2E8F0;
  --shadow:        0 1px 3px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.05);
  --shadow-lg:     0 4px 24px rgba(0,0,0,0.10);

  /* Spacing & shape */
  --radius:   10px;
  --radius-lg:16px;
  --nav-h:    64px;
  --max-w:    1100px;

  /* Transitions */
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --bg:            #0F172A;
  --bg-card:       #1E293B;
  --bg-nav:        rgba(15, 23, 42, 0.88);
  --bg-code:       #0D1829;
  --text:          #F1F5F9;
  --text-secondary:#94A3B8;
  --text-muted:    #64748B;
  --border:        #334155;
  --shadow:        0 1px 3px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.2);
  --shadow-lg:     0 4px 24px rgba(0,0,0,0.35);
}

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

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-light); }

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

ul { list-style: none; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

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

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav__logo span { color: var(--accent); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav__link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.nav__link:hover,
.nav__link.active {
  color: var(--accent);
  background: var(--accent-subtle);
}

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

/* Theme toggle button */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.theme-toggle:hover { background: var(--accent-subtle); border-color: var(--accent-border); color: var(--accent); }

/* Hamburger (mobile) */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: none;
  background: none;
}
.nav__hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Mobile nav overlay */
.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 20px;
  flex-direction: column;
  gap: 4px;
  z-index: 99;
}
.nav__mobile.open { display: flex; }
.nav__mobile .nav__link { font-size: 1rem; padding: 10px 14px; }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.page-content {
  padding-top: calc(var(--nav-h) + 56px);
  padding-bottom: 80px;
  min-height: 100vh;
}

.section { margin-bottom: 64px; }

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  color: var(--text);
}
.section-title span { color: var(--accent); }

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.section-divider {
  width: 40px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 8px 0 28px;
}

/* ============================================================
   HERO / HOME
   ============================================================ */
.hero {
  padding-top: calc(var(--nav-h) + 72px);
  padding-bottom: 72px;
}

.hero__inner {
  display: flex;
  align-items: center;
  gap: 56px;
}

.hero__text { flex: 1; }

.hero__greeting {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero__name {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 8px;
  color: var(--text);
}

.hero__title {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 24px;
  line-height: 1.6;
}
.hero__title strong { color: var(--accent); font-weight: 600; }

.hero__bio {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 32px;
  line-height: 1.75;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero__socials {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Social pills */
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all var(--transition);
}
.social-link:hover {
  border-color: var(--accent-border);
  background: var(--accent-subtle);
  color: var(--accent);
}
.social-link svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Hero avatar */
.hero__avatar {
  flex-shrink: 0;
  width: 240px; height: 240px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent-border);
  box-shadow: 0 0 0 8px var(--accent-subtle), var(--shadow-lg);
  transition: box-shadow var(--transition);
}
.hero__avatar:hover { box-shadow: 0 0 0 10px var(--accent-subtle), var(--shadow-lg); }
.hero__avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #0F172A;
}
.btn-primary:hover {
  background: var(--accent-light);
  color: #0F172A;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent-border);
  background: var(--accent-subtle);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ============================================================
   CARDS (Research, Blog, Video)
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  box-shadow: var(--shadow);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-border);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: var(--accent-subtle);
  color: var(--accent-dark);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
[data-theme="dark"] .card__badge { color: var(--accent-light); }

.card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.card__desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.tag {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--bg-code);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}
.card__link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition);
}
.card__link:hover { color: var(--accent-light); }

/* ============================================================
   BLOG
   ============================================================ */
.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.blog-card:hover {
  transform: translateX(4px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-lg);
}

.blog-card__meta {
  flex-shrink: 0;
  width: 80px;
  text-align: center;
}
.blog-card__date-block {
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 8px 10px;
  display: inline-block;
  text-align: center;
}
.blog-card__date-month {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: block;
}
.blog-card__date-day {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  display: block;
  line-height: 1;
}
.blog-card__date-year {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.blog-card__content { flex: 1; }
.blog-card__category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 6px;
}
.blog-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}
.blog-card__excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__footer {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.blog-card__read-more {
  margin-left: auto;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
}

/* ============================================================
   BLOG POST (single page)
   ============================================================ */
.post-header {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 32px;
}
.post-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}
.post-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text);
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  align-items: center;
}
.post-meta span { display: flex; align-items: center; gap: 5px; }

.post-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
  max-width: 760px;
}
.post-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 40px 0 12px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.post-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 28px 0 10px;
  color: var(--text);
}
.post-body p { margin-bottom: 20px; }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-body ul, .post-body ol {
  padding-left: 24px;
  margin-bottom: 20px;
  color: var(--text-secondary);
}
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li { margin-bottom: 6px; }
.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 24px 0;
  background: var(--accent-subtle);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
  font-style: italic;
}
.post-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
  background: var(--bg-code);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--accent-dark);
}
[data-theme="dark"] .post-body code { color: var(--accent-light); }

.post-body pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  line-height: 1.6;
}
.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

/* KaTeX display math centering */
.post-body .katex-display {
  margin: 28px 0;
  overflow-x: auto;
  overflow-y: hidden;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  transition: color var(--transition);
}
.back-link:hover { color: var(--accent); }

/* ============================================================
   VIDEOS
   ============================================================ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.video-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-border);
}
.video-card__embed {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  background: #000;
}
.video-card__embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}
.video-card__info { padding: 16px 20px 20px; }
.video-card__title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.4;
}
.video-card__desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================================
   INTERESTS / ABOUT GRID
   ============================================================ */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.interest-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color var(--transition), transform var(--transition);
}
.interest-item:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}
.interest-icon {
  margin-bottom: 10px;
  line-height: 1;
}
.interest-icon svg { width: 26px; height: 26px; color: var(--accent); }
.interest-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.interest-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================
   STATS / HIGHLIGHTS ROW
   ============================================================ */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 48px;
}
.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  flex: 1;
  min-width: 140px;
  text-align: center;
}
.stat-item__value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-item__label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  padding: 32px 0;
  text-align: center;
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.footer__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.footer__name span { color: var(--accent); }
.footer__links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.footer__links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--accent); }
.footer__copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================================
   EMPTY / PLACEHOLDER STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-secondary);
}
.empty-state__icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state__text { font-size: 0.95rem; }

/* ============================================================
   PAGE HEADER (for inner pages)
   ============================================================ */
.page-header {
  padding-top: calc(var(--nav-h) + 48px);
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.page-header__label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 10px;
}
.page-header__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 10px;
}
.page-header__subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.65;
}

/* ============================================================
   FILTER TABS
   ============================================================ */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.filter-tab {
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all var(--transition);
}
.filter-tab:hover { border-color: var(--accent-border); color: var(--accent); }
.filter-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0F172A;
  font-weight: 600;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero__inner { flex-direction: column-reverse; align-items: flex-start; gap: 32px; }
  .hero__avatar { width: 160px; height: 160px; align-self: center; }
  .cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }

  .hero { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 48px; }
  .hero__name { font-size: 2rem; }
  .hero__avatar { width: 130px; height: 130px; }

  .blog-card { flex-direction: column; gap: 12px; }
  .blog-card__meta { width: auto; }
  .blog-card__date-block { display: flex; gap: 6px; align-items: center; padding: 5px 12px; }
  .blog-card__date-day { font-size: 1.1rem; }

  .page-header { padding-top: calc(var(--nav-h) + 28px); padding-bottom: 28px; margin-bottom: 32px; }
  .post-title { font-size: 1.5rem; }

  .stats-row { gap: 12px; }
  .stat-item { padding: 16px 20px; }
  .stat-item__value { font-size: 1.5rem; }

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

/* ============================================================
   ABOUT / CV PAGE
   ============================================================ */

/* Timeline */
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  margin-bottom: 36px;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  outline: 2px solid var(--accent);
}
.timeline-item__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}
.timeline-item__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}
.timeline-item__period {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  background: var(--accent-subtle);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  flex-shrink: 0;
}
.timeline-item__org {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 6px;
}
.timeline-item__desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Skills grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}
.skills-category__name {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 10px;
}

/* Awards list */
.award-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.award-item:last-child { border-bottom: none; }
.award-item__left { flex: 1; }
.award-item__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.award-item__org {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.award-item__year {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  background: var(--accent-subtle);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
}

@media (max-width: 640px) {
  .timeline-item__header { flex-direction: column; gap: 6px; }
  .award-item { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* Coming soon / placeholder state */
.coming-soon {
  text-align: center;
  padding: 80px 24px;
  max-width: 480px;
  margin: 0 auto;
}
.coming-soon__icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--accent);
}
.coming-soon__icon svg { width: 30px; height: 30px; }
.coming-soon__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.coming-soon__text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 28px;
}

/* Inline icon (clock, calendar, etc.) */
.icon-inline { display: inline-flex; align-items: center; gap: 4px; }
.icon-inline svg { width: 13px; height: 13px; flex-shrink: 0; }

/* Empty state icon */
.empty-state__icon svg { width: 40px; height: 40px; color: var(--text-muted); }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-muted); }
.mt-0  { margin-top: 0; }
.mb-0  { margin-bottom: 0; }
.hidden { display: none !important; }

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
.lang-switcher {
  position: relative;
}

.lang-switcher__btn {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}
.lang-switcher__btn:hover,
.lang-switcher.open .lang-switcher__btn {
  background: var(--accent-subtle);
  border-color: var(--accent-border);
  color: var(--accent);
}
.lang-switcher__btn svg { flex-shrink: 0; }

.lang-switcher__label { font-size: 0.82rem; font-weight: 700; }

.lang-switcher__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 130px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 200;
}
[dir="rtl"] .lang-switcher__dropdown { right: auto; left: 0; }

.lang-switcher.open .lang-switcher__dropdown { display: block; }

.lang-option {
  display: block;
  width: 100%;
  padding: 10px 14px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}
[dir="rtl"] .lang-option { text-align: right; }

.lang-option:hover { background: var(--accent-subtle); color: var(--accent); }
.lang-option.active { color: var(--accent); font-weight: 600; background: var(--accent-subtle); }

/* Mobile language row (inside .nav__mobile) */
.mobile-lang-row {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  flex-wrap: wrap;
}
.mobile-lang-btn {
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: inherit;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.mobile-lang-btn:hover { background: var(--accent-subtle); color: var(--accent); border-color: var(--accent-border); }
.mobile-lang-btn.active { background: var(--accent-subtle); color: var(--accent); border-color: var(--accent-border); font-weight: 600; }

/* ============================================================
   RTL OVERRIDES (Arabic)
   ============================================================ */
[dir="rtl"] body { font-family: 'Segoe UI', 'Noto Naskh Arabic', 'Inter', system-ui, sans-serif; }

[dir="rtl"] .nav__inner { flex-direction: row-reverse; }
[dir="rtl"] .nav__links { flex-direction: row-reverse; }
[dir="rtl"] .nav__actions { flex-direction: row-reverse; }

[dir="rtl"] .hero__inner { flex-direction: row-reverse; }

[dir="rtl"] .section-title { text-align: right; }
[dir="rtl"] .section-divider { margin-right: 0; }

[dir="rtl"] .timeline { padding-left: 0; padding-right: 28px; }
[dir="rtl"] .timeline::before { left: auto; right: 7px; }
[dir="rtl"] .timeline-item::before { left: auto; right: -24px; }

[dir="rtl"] .card__links { flex-direction: row-reverse; }

[dir="rtl"] .blog-card { flex-direction: row-reverse; }
[dir="rtl"] .blog-card__footer { flex-direction: row-reverse; }

[dir="rtl"] .filter-tabs { flex-direction: row-reverse; }
[dir="rtl"] .nav__mobile { text-align: right; }

[dir="rtl"] .post-body { text-align: right; }
[dir="rtl"] .post-body ul,
[dir="rtl"] .post-body ol { padding-right: 24px; padding-left: 0; }

[dir="rtl"] .footer__inner { flex-direction: row-reverse; }
[dir="rtl"] .footer__links { flex-direction: row-reverse; }

[dir="rtl"] .hero__socials { justify-content: flex-start; }
[dir="rtl"] .hero__actions { flex-direction: row-reverse; }

/* KaTeX math: force LTR inside RTL so formulas render correctly */
[dir="rtl"] .katex-display,
[dir="rtl"] .katex { direction: ltr; unicode-bidi: isolate; }

/* Chevron flip for RTL */
[dir="rtl"] .lang-switcher__btn svg:last-child { transform: scaleX(-1); }
