/* =====================================================================
   KELAS XI RPL 1 — STYLE.CSS
   Tema visual: "code editor" — terinspirasi dari editor kode (tab bar,
   status bar, syntax-highlight palette) karena ini website kelas RPL.
   ===================================================================== */

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

:root{
  /* ---- palet warna (terinspirasi syntax highlighting editor light) ---- */
  --bg: #F3F5F8;
  --panel: #FFFFFF;
  --panel-alt: #EFF2F7;
  --ink: #1B1F27;
  --ink-soft: #4B5468;
  --muted: #8188A0;
  --border: #E1E5EE;

  --accent-blue: #3355D8;     /* keyword */
  --accent-blue-ink: #1F3AA8;
  --accent-blue-bg: #EEF1FD;
  --accent-blue-border: #D7DEFB;
  --accent-green: #1E8E5A;    /* string / comment */
  --accent-green-bg: #E6F6EE;
  --accent-orange: #D9631A;   /* warning / highlight hari-ini */
  --accent-orange-bg: #FDECDD;
  --accent-purple: #7C4DD9;   /* function / aksen tambahan */

  --header-bg: rgba(255,255,255,.88);
  --shadow-card: 0 1px 2px rgba(20,24,38,.04), 0 6px 20px -8px rgba(20,24,38,.10);
  --shadow-pop: 0 20px 50px -12px rgba(20,24,38,.30);

  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --maxw: 1180px;
}

/* ---- tema gelap: diaktifkan lewat atribut data-theme="dark" di <html> ---- */
[data-theme="dark"]{
  --bg: #10121A;
  --panel: #191C26;
  --panel-alt: #20242F;
  --ink: #E8EBF3;
  --ink-soft: #B7BECF;
  --muted: #7C84A0;
  --border: #2A2F3D;

  --accent-blue: #6FA0FF;
  --accent-blue-ink: #9CC2FF;
  --accent-blue-bg: rgba(111,160,255,.16);
  --accent-blue-border: rgba(111,160,255,.34);
  --accent-green: #4FD897;
  --accent-green-bg: rgba(79,216,151,.13);
  --accent-orange: #FFA766;
  --accent-orange-bg: rgba(255,167,102,.15);
  --accent-purple: #B592FF;

  --header-bg: rgba(16,18,26,.86);
  --shadow-card: 0 1px 2px rgba(0,0,0,.35), 0 10px 26px -12px rgba(0,0,0,.55);
  --shadow-pop: 0 26px 60px -14px rgba(0,0,0,.65);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--bg);
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration: none; }
ul{ list-style: none; margin:0; padding:0; }
h1,h2,h3,h4{ font-family: var(--font-mono); margin: 0 0 .4em; letter-spacing: -0.01em; color: var(--ink); }
p{ margin: 0 0 1em; color: var(--ink-soft); }
button{ font-family: inherit; cursor: pointer; }

body, .panel, .site-header, .site-footer, .tab, .theme-toggle, .menu-toggle,
.search-box, .count-pill, .filetag, .modal-box, .people-photo, .gallery-item,
.sched-row, .piket-chip, .video-card, .eyebrow, .today-badge{
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

:focus-visible{
  outline: 2.5px solid var(--accent-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.container{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-green);
  background: var(--accent-green-bg);
  border: 1px solid #CFEEDD;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.eyebrow::before{ content:"//"; color:#8FCBAA; }

.section-title{
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
}
.section-sub{
  color: var(--muted);
  font-size: 15px;
  max-width: 640px;
}

/* =====================================================================
   NAVBAR — tab bar ala code editor
   ===================================================================== */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.navwrap{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  display:flex;
  align-items:center;
  gap: 22px;
  height: 62px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
  white-space: nowrap;
}
.brand-mark{
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--accent-blue);
  color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-mono); font-weight:800; font-size: 11px;
  flex: none;
}
.brand small{
  display:block;
  font-family: var(--font-body);
  font-weight:500;
  font-size: 11px;
  color: var(--muted);
}

.tabbar{
  display:flex;
  align-items: stretch;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.tabbar::-webkit-scrollbar{ display:none; }
.tab{
  display:flex;
  align-items:center;
  gap:7px;
  padding: 0 14px;
  height: 62px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.tab .dot{ width:6px; height:6px; border-radius:50%; background: var(--border); flex:none; }
.tab:hover{ color: var(--ink); background: var(--panel-alt); }
.tab.active{
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
  background: var(--accent-blue-bg);
}
.tab.active .dot{ background: var(--accent-orange); }

.nav-actions{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-left: auto;
  flex: none;
}

.theme-toggle{
  width: 38px; height:38px;
  display:flex; align-items:center; justify-content:center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--ink-soft);
  flex: none;
}
.theme-toggle:hover{ color: var(--accent-blue); border-color: var(--accent-blue-border); background: var(--accent-blue-bg); }
.theme-toggle .icon-sun{ display:none; }
.theme-toggle .icon-moon{ display:block; }
[data-theme="dark"] .theme-toggle .icon-sun{ display:block; }
[data-theme="dark"] .theme-toggle .icon-moon{ display:none; }

.menu-toggle{
  display:none;
  width: 38px; height:38px;
  align-items:center; justify-content:center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel);
  flex: none;
}
.hamburger{ position:relative; width:16px; height:2px; background:var(--ink); }
.hamburger::before,.hamburger::after{ content:''; position:absolute; left:0; width:16px; height:2px; background:var(--ink); }
.hamburger::before{ top:-5px; }
.hamburger::after{ top:5px; }

/* =====================================================================
   FOOTER — status bar ala code editor (VS Code style)
   ===================================================================== */
.site-footer{
  margin-top: 64px;
  background: #0F1117;
  color: #C9D2E3;
}
.statusbar{
  max-width: var(--maxw);
  margin:0 auto;
  padding: 10px 20px;
  display:flex;
  align-items:center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  flex-wrap: wrap;
}
.statusbar .seg{
  display:flex; align-items:center; gap:6px;
  color:#C9D2E3;
}
.statusbar .seg b{ color:#fff; font-weight:600; }
.statusbar .sep{ opacity:.35; }
.statusbar .push{ margin-left:auto; }
.footer-main{
  background: #12151D;
  padding: 30px 20px 22px;
}
.footer-slogan{
  display:block;
  width:min(100%, 520px);
  height:auto;
  margin:0 auto 24px;
}
.footer-inner{
  max-width: var(--maxw);
  margin:0 auto;
  display:flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-inner .fcol h4{ color:#fff; font-size:13px; margin-bottom:10px; }
.footer-inner .fcol p, .footer-inner .fcol a{ color:#8B93A7; font-size:13px; }
.footer-inner .fcol a:hover{ color:#fff; }
.footer-inner .flinks{ display:flex; flex-direction:column; gap:6px; }

/* =====================================================================
   HERO umum (dipakai tiap halaman di bawah navbar)
   ===================================================================== */
.page-hero{
  padding: 44px 0 30px;
}
.page-hero h1{ font-size: clamp(26px,4vw,38px); }
.page-hero p{ max-width: 620px; }

/* =====================================================================
   PANEL / CARD dasar
   ===================================================================== */
.panel{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.panel-head{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.panel-head h3{ font-size: 14px; margin:0; }
.filetag{
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-blue);
  background: var(--accent-blue-bg);
  border: 1px solid var(--accent-blue-border);
  padding: 3px 8px;
  border-radius: 6px;
}

/* =====================================================================
   BERANDA
   ===================================================================== */
.hero-beranda{
  padding: 46px 0 10px;
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 30px;
  align-items:center;
}
.logo-row{
  display:flex; align-items:center; gap:14px; margin-bottom:20px;
}
.logo-badge{
  display:flex; flex-direction:column; align-items:center; gap:6px;
}
.logo-badge span{ font-family: var(--font-mono); font-size:10.5px; color:var(--muted); }
.hero-beranda h1{ font-size: clamp(28px,4.2vw,42px); line-height:1.15; }
.hero-beranda .accent{ color: var(--accent-blue); }

.terminal{
  background:#161A22;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  overflow:hidden;
  font-family: var(--font-mono);
}
.terminal-bar{
  display:flex; align-items:center; gap:7px;
  padding: 10px 14px;
  background:#20242E;
}
.terminal-bar i{ width:11px; height:11px; border-radius:50%; display:block; }
.terminal-bar i:nth-child(1){ background:#E4636B; }
.terminal-bar i:nth-child(2){ background:#E6B450; }
.terminal-bar i:nth-child(3){ background:#4FBF7C; }
.terminal-bar span{ margin-left:8px; color:#8B93A7; font-size:11.5px; }
.terminal-body{
  padding: 18px 18px 22px;
  min-height: 190px;
  font-size: 13.5px;
  color:#CFE7D8;
}
.terminal-body .prompt{ color:#6FB6FF; }
.terminal-body .out{ color:#B7C0D4; }
.terminal-cursor{
  display:inline-block; width:7px; height:15px; background:#CFE7D8;
  vertical-align:middle; margin-left:2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink{ 50%{ opacity:0; } }

.stat-row{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 26px 0;
}
.stat-card{
  padding: 16px 16px;
  text-align:left;
}
.stat-card .num{
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight:800;
  color: var(--accent-blue);
}
.stat-card .lbl{ font-size:12.5px; color: var(--muted); margin-top:2px; }

.marquee-wrap{
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
  background: var(--accent-green-bg);
  padding: 11px 0;
  overflow:hidden;
  margin: 8px 0 34px;
}
.marquee-track{
  display:flex;
  gap: 46px;
  white-space:nowrap;
  width: max-content;
  animation: scroll-left 38s linear infinite;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--accent-green);
}
.marquee-track span::before{ content:"// "; opacity:.6; }
@keyframes scroll-left{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}

.grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 40px;
}
.today-badge{
  display:inline-flex; align-items:center; gap:6px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight:600;
  color: var(--accent-orange);
  background: var(--accent-orange-bg);
  border:1px solid #F6D4B4;
  padding: 3px 9px;
  border-radius: 999px;
}
.today-badge .dot{ width:6px;height:6px;border-radius:50%; background: var(--accent-orange); }

.sched-list{ padding: 8px 8px 14px; }
.sched-row{
  display:grid;
  grid-template-columns: 92px 1fr auto;
  gap: 12px;
  align-items:center;
  padding: 10px 10px;
  border-radius: var(--radius-sm);
}
.sched-row + .sched-row{ border-top: 1px solid var(--border); }
.sched-row .time{ font-family: var(--font-mono); font-size:12px; color: var(--muted); }
.sched-row .mapel{ font-weight:600; font-size:14px; }
.sched-row .guru{ font-size:12px; color: var(--muted); }
.sched-row.break{
  background: var(--panel-alt);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size:12px;
  justify-content:center;
  text-align:center;
}
.piket-list{ padding: 14px 18px 18px; display:flex; flex-direction:column; gap:10px; }
.piket-chip{
  display:flex; align-items:center; gap:10px;
  padding: 10px 12px;
  background: var(--panel-alt);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight:600;
}
.piket-chip .idx{
  width:22px;height:22px;border-radius:6px;
  background: var(--accent-blue);
  color:#fff; font-family: var(--font-mono); font-size:11px; font-weight:700;
  display:flex; align-items:center; justify-content:center; flex:none;
}
.empty-note{
  padding: 26px 18px;
  text-align:center;
  color: var(--muted);
  font-size: 13.5px;
}

/* =====================================================================
   GRID KARTU (siswa & guru)
   ===================================================================== */
.toolbar-row{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  margin: 4px 0 22px;
  flex-wrap:wrap;
}
.search-box{
  display:flex; align-items:center; gap:8px;
  background: var(--panel);
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  min-width: 240px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.search-box input{
  border:none; outline:none; background:transparent; width:100%;
  font-family: inherit; font-size: 13px; color: var(--ink);
}
.search-box input::placeholder{ color: var(--muted); }
.count-pill{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-blue);
  background: var(--accent-blue-bg);
  border: 1px solid var(--accent-blue-border);
  padding: 6px 11px;
  border-radius: 999px;
  white-space:nowrap;
}

.people-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  padding-bottom: 54px;
}
.people-card{
  overflow:hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.people-card:hover{ transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.people-photo{
  width:100%; aspect-ratio: 4/3.1;
  background: var(--panel-alt);
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
  border-bottom:1px solid var(--border);
}
.people-photo img{ width:100%; height:100%; object-fit:cover; }
.people-body{ padding: 14px 16px 16px; }
.role-tag{
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-green);
  margin-bottom:6px;
  display:block;
}
.people-name{ font-family: var(--font-body); font-weight:700; font-size:15.5px; margin-bottom:8px; color:var(--ink); }
.people-meta{ display:flex; flex-direction:column; gap:5px; }
.people-meta .row{ display:flex; gap:7px; font-size:12.5px; color: var(--ink-soft); }
.people-meta .row b{ color: var(--muted); font-weight:600; min-width: 58px; flex:none; font-family: var(--font-mono); font-size:11px; text-transform:uppercase; letter-spacing:.03em; padding-top:1px; }
.portfolio-link{
  display:inline-flex;
  align-items:center;
  align-self:flex-start;
  margin-top:13px;
  padding:7px 10px;
  border:1px solid var(--accent-blue-border);
  border-radius:7px;
  color:var(--accent-blue);
  background:var(--accent-blue-bg);
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:600;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.portfolio-link:hover{
  color:#fff;
  background:var(--accent-blue);
  border-color:var(--accent-blue);
}
.portfolio-link--disabled{
  cursor:not-allowed;
  color:var(--muted);
  background:var(--panel-alt);
  border-color:var(--border);
  opacity:.8;
}

/* =====================================================================
   GALERI
   ===================================================================== */
.gallery-grid{
  display:grid;
  grid-template-rows: repeat(3, 200px);
  grid-auto-flow: column;
  grid-auto-columns: 220px;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 20px;
  scroll-snap-type: x proximity;
}
.gallery-item{
  position:relative;
  border-radius: var(--radius-md);
  overflow:hidden;
  border:1px solid var(--border);
  scroll-snap-align:start;
  background: var(--panel-alt);
}
.gallery-item img{ width:100%; height:100%; object-fit:cover; display:block; }
.gallery-item .cap{
  position:absolute; left:0; right:0; bottom:0;
  padding: 8px 10px 7px;
  background: linear-gradient(0deg, rgba(10,12,20,.82), rgba(10,12,20,0));
  color:#fff; font-size:11.5px; font-family: var(--font-mono);
  opacity:0; transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease;
}
.gallery-item:hover .cap{ opacity:1; transform:translateY(0); }
.gallery-hint{
  display:flex; align-items:center; gap:8px;
  color: var(--muted); font-size:12.5px; font-family: var(--font-mono);
  margin: -8px 0 18px;
}

/* =====================================================================
   VIDEO
   ===================================================================== */
.video-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  padding-bottom: 54px;
}
.video-card{ overflow:hidden; }
.video-frame{
  position:relative; width:100%; aspect-ratio:16/9; background:#000;
}
.video-frame iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }
.video-info{ padding: 13px 15px 15px; display:flex; gap:11px; }
.video-avatar{
  width:34px;height:34px;border-radius:50%;
  background: var(--accent-blue);
  color:#fff; display:flex; align-items:center; justify-content:center;
  font-family: var(--font-mono); font-size:12px; font-weight:700; flex:none;
}
.video-title{ font-weight:700; font-size:14px; line-height:1.35; margin-bottom:3px; }
.video-meta{ font-size:12px; color: var(--muted); }

/* =====================================================================
   KOMENTAR
   ===================================================================== */
.comments-layout{
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  gap:18px;
  align-items:start;
  margin-bottom:40px;
}
.comment-form{ padding:20px; }
.comment-form textarea{ min-height:96px; }
.comment-form label{
  display:block;
  font-family:var(--font-mono);
  font-weight:700;
  font-size:14px;
  margin-bottom:10px;
}
.comment-form textarea{
  width:100%;
  min-height:140px;
  resize:vertical;
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  background:var(--panel-alt);
  color:var(--ink);
  font:inherit;
  padding:12px;
}
.comment-form-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-top:10px;
  color:var(--muted);
  font-size:12px;
  font-family:var(--font-mono);
}
.comment-submit{
  border:0;
  border-radius:var(--radius-sm);
  padding:10px 14px;
  background:var(--accent-blue);
  color:#fff;
  font-weight:700;
}
.comment-submit:hover{ filter:brightness(1.08); }
.comment-submit:disabled{ cursor:not-allowed; opacity:.6; }
.comment-notice{
  min-height:1.5em;
  margin:10px 0 0;
  font-size:12px;
  color:var(--accent-green);
}
.comments-panel{ overflow:hidden; }
.comments-panel .panel-head{ position:sticky; top:0; z-index:2; background:var(--panel); }
.discussion-scroll{
  height:min(62vh, 680px);
  min-height:320px;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  scroll-behavior:smooth;
}
.comments-list{ padding:14px; }
.comment-card{
  padding:14px 0;
  border-bottom:1px solid var(--border);
}
.comment-card:first-child{ padding-top:2px; }
.comment-card:last-child{ border-bottom:0; padding-bottom:2px; }
.comment-card-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  font-size:12px;
}
.comment-card-head strong{ color:var(--accent-blue); }
.comment-card-head time{ color:var(--muted); font-size:11px; }
.comment-reply{ margin-left:22px; padding-left:12px; border-left:2px solid var(--accent-blue-border); }
.comment-reply-context{
  display:grid;
  gap:3px;
  margin:8px 0 0;
  padding:8px 10px;
  border-left:2px solid var(--accent-blue-border);
  border-radius:0 var(--radius-sm) var(--radius-sm) 0;
  background:var(--panel-alt);
  color:var(--ink-soft);
  font-size:12px;
  overflow-wrap:anywhere;
}
.comment-reply-label{ color:var(--muted); font-family:var(--font-body); font-size:11px; font-weight:600; }
.comment-actions{ display:flex; align-items:center; gap:12px; flex:none; }
.comment-reply-button, .reply-cancel{
  border:0;
  padding:0;
  background:transparent;
  color:var(--accent-blue);
  font:inherit;
  font-size:11px;
  font-weight:700;
}
.comment-reply-button:hover, .reply-cancel:hover{ text-decoration:underline; }
.replying-to{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
  padding:9px 11px;
  border-left:3px solid var(--accent-blue);
  border-radius:var(--radius-sm);
  background:var(--accent-blue-bg);
  color:var(--ink-soft);
  font-size:12px;
}
.comment-text{ margin:7px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.comments-empty{ margin:0; padding:8px 0; color:var(--muted); }
.comments-pagination{ display:flex; justify-content:center; padding:0 14px 14px; }
.recent-comments-panel{ margin-bottom:40px; }
.recent-comments-panel .panel-head{ gap:12px; }
.recent-comments-panel .filetag{ white-space:nowrap; }

/* modal */
.modal-backdrop{
  position:fixed; inset:0; background: rgba(15,17,24,.55);
  display:none; align-items:center; justify-content:center;
  padding: 20px; z-index: 1000;
}
.modal-backdrop.open{ display:flex; }
.modal-box{
  background: var(--panel); border-radius: var(--radius-lg);
  max-width: 480px; width:100%;
  box-shadow: var(--shadow-pop);
  overflow:hidden;
}
.modal-head{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 18px; border-bottom:1px solid var(--border);
}
.modal-head span{ font-family: var(--font-mono); font-size:12px; color: var(--muted); }
.modal-close{
  width:28px;height:28px; border-radius:7px; border:1px solid var(--border);
  background: var(--panel-alt); display:flex; align-items:center; justify-content:center;
  font-size:15px; color: var(--ink-soft);
}
.modal-body{ padding: 22px 22px 26px; }
.modal-body .name{ font-family: var(--font-mono); color: var(--accent-blue); font-size:13px; margin-bottom:10px; font-weight:700; }
.modal-body .quote{ font-size: 19px; font-weight:600; line-height:1.5; color: var(--ink); }
.modal-body .quote::before{ content:"“"; color: var(--accent-green); }
.modal-body .quote::after{ content:"”"; color: var(--accent-green); }
.gallery-modal img{ width:100%; display:block; }
.gallery-modal .modal-body{ padding:0; }
.gallery-modal .cap-line{ padding:14px 18px; font-size:13px; color: var(--ink-soft); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 900px){
  .stat-row{ grid-template-columns: 1fr 1fr 1fr; gap:10px; }
}

@media (max-width: 720px){
  .container{ padding-left:14px; padding-right:14px; }
  .navwrap{ padding-left:14px; padding-right:14px; gap:14px; }
  .brand{ gap:8px; font-size:13px; }
  .brand-mark{ width:28px; height:28px; font-size:10px; }
  .brand small{ font-size:9.5px; }
  .tab{ padding-left:10px; padding-right:10px; font-size:12px; }
  .hero-beranda{ gap:18px; }
  .grid-2{ gap:14px; }
  .stat-card{ padding:12px; }
  .stat-card .num{ font-size:24px; }
  .page-hero{ padding:30px 0 22px; }
  .page-hero h1{ font-size:clamp(25px, 5vw, 32px); }
  .page-hero p{ font-size:13.5px; line-height:1.55; }
  .toolbar-row{ gap:10px; margin-bottom:16px; }
  .search-box{ flex:1; min-width:0; padding:8px 10px; font-size:12px; }
  .search-box input{ font-size:12px; min-width:0; }
  .count-pill{ padding:6px 9px; font-size:11px; }
  .people-grid{ grid-template-columns:repeat(4, minmax(0, 1fr)); gap:10px; }
  .people-body{ padding:11px 12px 12px; }
  .role-tag{ font-size:10px; margin-bottom:5px; }
  .people-name{ font-size:14px; line-height:1.3; margin-bottom:7px; }
  .people-meta{ gap:4px; }
  .people-meta .row{ gap:5px; font-size:11.5px; line-height:1.4; }
  .people-meta .row b{ min-width:43px; font-size:9.5px; }
  .portfolio-link{ margin-top:10px; padding:6px 8px; font-size:10px; }
  .video-grid{ grid-template-columns:repeat(3, minmax(0, 1fr)); gap:14px; }
  .video-info{ padding:10px 11px 12px; gap:8px; }
  .video-title{ font-size:12px; }
  .video-meta{ font-size:10.5px; }
  .gallery-grid{ grid-template-rows:repeat(3, 145px); grid-auto-columns:160px; gap:10px; }
  .comments-layout{ grid-template-columns:1fr; }
}

@media (max-width: 520px){
  .navwrap{ height:56px; padding-left:14px; padding-right:14px; gap:10px; }
  .theme-toggle, .menu-toggle{ width:36px; height:36px; }
  .menu-toggle{ display:flex; }
  .tabbar{
    position:fixed;
    top:56px; left:0; right:0;
    background:var(--panel);
    border-bottom:1px solid var(--border);
    flex-direction:column;
    gap:0;
    max-height:0;
    overflow:hidden;
    transition:max-height .2s ease;
    box-shadow:0 12px 24px -12px rgba(20,24,38,.2);
  }
  .tabbar.open{ max-height:340px; overflow-y:auto; }
  .tab{ height:auto; padding:12px 16px; border-bottom:1px solid var(--border); border-left:3px solid transparent; font-size:12px; }
  .tab.active{ border-left-color:var(--accent-blue); border-bottom-color:var(--border); }
  .hero-beranda{ grid-template-columns:1fr; }
  .grid-2{ grid-template-columns:1fr; gap:12px; margin-bottom:24px; }
  .stat-row{ grid-template-columns:1fr; }
  .footer-inner{ flex-direction:column; gap:18px; }
  .footer-main{ padding:24px 14px 18px; }
  .footer-slogan{ margin-bottom:20px; }
  .statusbar{ font-size:11px; }
  .panel-head{ padding:11px 12px; }
  .panel-head h3{ font-size:12px; }
  .today-badge, .filetag{ font-size:10px; padding:3px 7px; }
  .sched-list{ padding:6px 6px 10px; }
  .sched-row{
    grid-template-columns:1fr auto;
    gap:3px 8px;
    padding:8px;
    margin-bottom:6px;
    border:1px solid var(--border);
    border-radius:8px;
    background:var(--panel-alt);
  }
  .sched-row + .sched-row{ border-top:1px solid var(--border); }
  .sched-row .time{ grid-column:1 / -1; font-size:10px; }
  .sched-row > span:nth-child(2){ grid-column:1; min-width:0; }
  .sched-row .mapel{ display:block; font-size:12px; line-height:1.35; }
  .sched-row .guru{ font-size:10px; }
  .sched-row > .filetag{ grid-column:2; grid-row:2; align-self:end; }
  .sched-row.break{ grid-template-columns:1fr; font-size:10px; }
  .piket-list{ padding:10px 12px 12px; gap:6px; }
  .piket-chip{ gap:8px; padding:8px 10px; font-size:12px; }
  .piket-chip .idx{ width:20px; height:20px; font-size:10px; }
  .people-grid{ grid-template-columns:1fr; gap:10px; }
  .people-card{ display:grid; grid-template-columns:110px minmax(0, 1fr); }
  .people-photo{ aspect-ratio:auto; min-height:140px; height:100%; border-bottom:0; border-right:1px solid var(--border); }
  .video-grid{ grid-template-columns:1fr; }
  .gallery-grid{ grid-template-rows:repeat(4, 112px); grid-auto-columns:132px; }
  .discussion-scroll{ height:60vh; min-height:260px; }
  .recent-comments-panel .panel-head{ align-items:flex-start; flex-direction:column; }
}

@media (max-width: 380px){
  .brand small{ display:none; }
  .people-photo{ aspect-ratio:auto; }
  .people-name{ font-size:13px; }
  .people-meta .row{ display:block; }
  .people-meta .row b{ display:block; margin-bottom:1px; }
}

@media (prefers-reduced-motion: reduce){
  .marquee-track, .terminal-cursor{ animation: none !important; }
}
