
/* ─── CSS Variables ─────────────────────────────────────── */
:root {
  --accent:      #f28c28;
  --accent-glow: rgba(242, 140, 40, 0.22);
  --accent-soft: rgba(242, 140, 40, 0.10);
  --bg:          #13110f;
  --surface:     rgba(19, 17, 15, 0.78);
  --surface2:    rgba(28, 25, 23, 0.92);
  --border:      rgba(242, 140, 40, 0.18);
  --text:        #f3ece3;
  --text-muted:  #b7aca1;
  --nav-bg:      rgba(31, 28, 25, 0.42);
  --nav-shadow:  0 24px 60px rgba(0, 0, 0, 0.24);
  --sidebar-bg:  #201d1a;
  --content-bg:  #181614;
  --tag-bg:      rgba(242, 140, 40, 0.08);
  --radius:      14px;
  --transition:  0.28s cubic-bezier(.4,0,.2,1);
  --page-max-width: min(1320px, calc(100vw - 80px));
}

@media (min-width: 1600px) {
  :root { --page-max-width: min(60vw, 1320px); }
}

/* ─── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background:
    radial-gradient(circle at 16% 18%, rgba(242, 140, 40, 0.16), transparent 28%),
    radial-gradient(circle at 84% 16%, rgba(255, 255, 255, 0.06), transparent 24%),
    linear-gradient(135deg, #070707 0%, #12110f 56%, #1a140f 100%);
  color: var(--text);
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
  line-height: 1.65;
  font-size: 15px;
  position: relative;
  overflow-x: hidden;
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
body::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 88px 88px;
  opacity: 1;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 92%);
}
body::after {
  background:
    radial-gradient(circle at 22% 22%, rgba(255, 255, 255, 0.035), transparent 0 22%),
    radial-gradient(circle at 78% 12%, rgba(242, 140, 40, 0.08), transparent 0 20%);
  opacity: 1;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.58;
}

/* ─── Topbar ────────────────────────────────────────────── */
#topbar {
  position: relative;
  z-index: 100;
  padding: 18px 0 0;
  background: transparent;
  transition: background var(--transition), border-color var(--transition);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 0;
  width: min(var(--page-max-width), calc(100vw - 40px));
  margin: 0 auto;
  padding: 0 22px;
  min-height: 68px;
  border: none;
  border-radius: 20px;
  background: var(--surface);
  backdrop-filter: blur(24px) saturate(165%);
  -webkit-backdrop-filter: blur(24px) saturate(165%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    0 20px 48px rgba(7, 31, 36, 0.14);
}
.topbar-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  color: var(--text);
  flex-shrink: 0;
  margin-right: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-logo span {
  display: inline-block;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--accent);
  flex-shrink: 0;
}
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  list-style: none;
}
.topbar-nav > li { position: relative; }
.topbar-nav .nav-link,
.topbar-nav .nav-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.topbar-nav .nav-link:hover,
.topbar-nav .nav-btn:hover,
.topbar-nav .nav-link.active,
.topbar-nav .nav-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}
.topbar-nav .nav-link svg, .topbar-nav .nav-btn svg { width: 13px; height: 13px; }

/* Dropdown */
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.13);
  min-width: 200px;
  padding: 6px;
  z-index: 200;
  list-style: none;
}
.topbar-nav > li:hover .nav-dropdown-menu,
.topbar-nav > li.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.87rem;
  color: var(--text);
  transition: background var(--transition), color var(--transition);
}
.nav-dropdown-menu a:hover {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}
.study-dropdown-menu {
  min-width: 360px;
  max-width: min(480px, calc(100vw - 40px));
  max-height: min(70vh, 760px);
  overflow-y: auto;
  padding: 10px;
}
.study-dropdown-menu > li + li {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.study-module-launch {
  width: 100%;
  font-size: 0.9rem;
  font-weight: 600;
}
.study-dropdown-menu .smenu-children {
  padding-left: 8px;
}
.study-dropdown-menu .smenu-leaves {
  padding-left: 8px;
}
.caret { font-size: 0.7rem; opacity: 0.6; }

/* Topbar right */
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform 0.15s;
}
.theme-toggle:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); transform: scale(1.08); }

/* hamburger */
.hamburger {
  display: none;
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background var(--transition);
}
.hamburger span {
  display: block; width: 18px; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile nav */
#mobile-nav {
  display: none;
  flex-direction: column;
  width: min(var(--page-max-width), calc(100vw - 40px));
  margin: 10px auto 0;
  background: var(--surface);
  border: none;
  border-radius: 18px;
  padding: 10px 16px 14px;
  gap: 4px;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--nav-shadow);
}
#mobile-nav.open { display: flex; }
#mobile-nav a, #mobile-nav button {
  display: block; width: 100%;
  text-align: left;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  border: none; background: transparent; font-family: inherit; cursor: pointer;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
#mobile-nav a:hover, #mobile-nav button:hover, #mobile-nav a.active { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
#mobile-nav .mobile-submenu { padding-left: 14px; }

/* ─── Hero ──────────────────────────────────────────────── */
#hero {
  position: relative;
  overflow: hidden;
  padding: 64px 48px 56px;
  background: var(--surface);
  width: min(var(--page-max-width), calc(100vw - 40px));
  margin: 22px auto 0;
  border: none;
  border-radius: 28px;
  box-shadow: 0 24px 56px rgba(7, 31, 36, 0.14);
}
.hero-bg-word {
  position: absolute;
  right: -0.04em;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(8rem, 18vw, 22rem);
  color: var(--accent);
  opacity: 0.05;
  letter-spacing: -0.05em;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.hero-inner {
  max-width: 100%;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero-badge::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 6px var(--accent); }
  50%       { opacity: 0.6; transform: scale(1.3); box-shadow: 0 0 14px var(--accent); }
}
.hero-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(3.2rem, 7.5vw, 7.5rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
  color: var(--text);
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.81rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: border-color var(--transition), color var(--transition);
}
.hero-tag:hover { border-color: var(--accent); color: var(--accent); }
.hero-tag svg { width: 13px; height: 13px; color: var(--accent); }

/* ─── Layout ────────────────────────────────────────────── */
#app {
  width: min(var(--page-max-width), calc(100vw - 40px));
  margin: 22px auto 0;
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - 60px);
  gap: 22px;
}

/* ─── Sidebar ───────────────────────────────────────────── */
#sidebar {
  background: var(--surface);
  border: none;
  border-radius: 24px;
  padding: 20px 12px;
  position: sticky;
  top: 96px;
  height: calc(100vh - 118px);
  overflow-y: auto;
  transition: background var(--transition), border-color var(--transition);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 18px 44px rgba(7, 31, 36, 0.12);
}
#sidebar::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 8px 10px 4px;
  margin-bottom: 2px;
}
.sidebar-menu { list-style: none; }
.sidebar-menu > li { margin-bottom: 2px; }

/* top-level accordion */
.smenu-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left;
  padding: 8px 10px;
  border-radius: 9px;
  border: none; background: transparent;
  font-family: inherit; font-size: 0.88rem; font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.smenu-btn:hover { background: var(--accent-soft); color: var(--accent); }
.smenu-btn.open { color: var(--accent); background: var(--accent-soft); }
.smenu-btn .smenu-icon { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.smenu-btn .smenu-caret {
  margin-left: auto; font-size: 0.65rem; color: var(--text-muted);
  transition: transform var(--transition);
}
.smenu-btn.open .smenu-caret { transform: rotate(90deg); }

/* sub accordion */
.smenu-children {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.32s cubic-bezier(.4,0,.2,1);
  list-style: none;
  padding-left: 10px;
}
.smenu-children.open { max-height: 2000px; }

.smenu-sub-btn {
  display: flex; align-items: center; gap: 7px;
  width: 100%; text-align: left;
  padding: 6px 10px;
  border-radius: 7px;
  border: none; background: transparent;
  font-family: inherit; font-size: 0.82rem; font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  margin: 2px 0;
  transition: background var(--transition), color var(--transition);
}
.smenu-sub-btn:hover { background: var(--accent-soft); color: var(--accent); }
.smenu-sub-btn.open { color: var(--accent); }
.smenu-sub-btn .smenu-caret { margin-left: auto; font-size: 0.6rem; transition: transform var(--transition); }
.smenu-sub-btn.open .smenu-caret { transform: rotate(90deg); }

.smenu-leaves {
  overflow: hidden; max-height: 0;
  transition: max-height 0.28s cubic-bezier(.4,0,.2,1);
  list-style: none; padding-left: 10px;
}
.smenu-leaves.open { max-height: 1000px; }

.menu-link {
  display: block; width: 100%; text-align: left;
  padding: 5px 10px;
  border-radius: 7px;
  border: none; background: transparent;
  font-family: inherit; font-size: 0.82rem; font-weight: 400;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.menu-link:hover { background: var(--accent-soft); color: var(--accent); }
.menu-link.active-page {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

[data-theme="dark"] .info-card { background: rgba(24,24,29,0.55); }

/* ─── Content Area ──────────────────────────────────────── */
#main-content-area {
  padding: 32px 0 48px;
  background: transparent;
  transition: background var(--transition);
  min-height: calc(100vh - 60px);
}

/* view cards */
.view { display: none; }
.view.active { display: block; }

/* ─── Bento Grid ─────────────────────────────────────────── */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: start;
}
.bento-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.bento-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 36px var(--accent-glow);
}

/* Profile card */
.b-profile {
  grid-column: 1 / 4;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 26px;
}
.profile-avatar {
  width: 58px; height: 58px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.01em;
  box-shadow: 0 6px 20px var(--accent-glow);
}
.profile-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.2;
}
.profile-name span { color: var(--accent); }
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-tag {
  font-size: 0.73rem;
  color: var(--text-muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 6px;
}


/* Stat cards */
.b-stat {
  padding: 24px 18px;
  text-align: center;
  cursor: default;
}
.bstat-val {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2.6rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 5px;
}
.bstat-lbl {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
}

/* Modules card */
.b-modules {
  grid-column: 1 / 4;
  padding: 22px;
}
.bento-section-label {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bento-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Module list (inside bento) */
.module-list { display: flex; flex-direction: column; gap: 8px; }
.mod-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform 0.15s;
}
.mod-card:hover {
  border-color: var(--accent);
  background: var(--surface);
  transform: translateX(4px);
}
.mod-icon {
  font-size: 1.25rem;
  width: 38px; height: 38px;
  background: var(--accent-soft);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mod-body { flex: 1; min-width: 0; }
.mod-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 3px;
}
.mod-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}
.mod-topics { display: flex; flex-wrap: wrap; gap: 4px; }
.mod-topic {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 999px;
}
.mod-count {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1.5px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 1px;
}

/* About list (reused in weather area) */
.about-list {}
.about-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  font-size: 0.79rem;
  border-bottom: 1px solid var(--border);
}
.about-row:last-child { border-bottom: none; }
.about-key { color: var(--text-muted); }
.about-val { font-weight: 600; color: var(--text); }

/* section-title kept for content view too */
.section-title {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.15rem;
  color: var(--text); margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.section-title::after {
  content: ''; flex: 1; height: 1.5px; background: var(--border);
}
.section-title--glow {
  color: var(--accent);
  text-shadow:
    0 0 8px rgba(101,163,13,0.7),
    0 0 20px rgba(101,163,13,0.4),
    0 0 40px rgba(101,163,13,0.2);
}
[data-theme="dark"] .section-title--glow {
  text-shadow:
    0 0 8px rgba(239,68,68,0.7),
    0 0 20px rgba(239,68,68,0.4),
    0 0 40px rgba(239,68,68,0.2);
}

/* ─── Content View ──────────────────────────────────────── */
#content-view .content-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid var(--border);
}
#content-view .content-back {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 0.83rem; font-weight: 500; color: var(--text-muted);
  cursor: pointer; font-family: inherit;
  transition: background var(--transition), color var(--transition);
}
#content-view .content-back:hover { background: var(--accent-soft); color: var(--accent); }
#content-view .content-title {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--text);
}
#content {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  line-height: 1.75;
  min-height: 300px;
  transition: background var(--transition), border-color var(--transition);
}
#content h1, #content h2, #content h3 {
  font-family: 'Syne', sans-serif; font-weight: 700;
  margin-top: 1.4em; margin-bottom: 0.5em;
  color: var(--text);
}
#content h1 { font-size: 1.5rem; color: var(--accent); }
#content h2 { font-size: 1.18rem; }
#content h3 { font-size: 1rem; }
#content p { margin-bottom: 0.9em; }
#content ul, #content ol { padding-left: 1.4em; margin-bottom: 0.9em; }
#content li { margin-bottom: 0.3em; }
#content pre {
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 14px 16px;
  overflow-x: auto; font-size: 0.85rem; margin-bottom: 1em;
}
#content code {
  font-family: 'Courier New', monospace;
  background: var(--surface2); padding: 2px 6px; border-radius: 4px; font-size: 0.85em;
}
#content pre code { background: transparent; padding: 0; }
#content table { width: 100%; border-collapse: collapse; margin-bottom: 1em; }
#content th, #content td { padding: 8px 12px; border: 1.5px solid var(--border); text-align: left; }
#content th { background: var(--surface2); font-weight: 600; }

.study-topic-menu {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.study-topic-intro {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1.5px solid var(--border);
}
.study-topic-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.study-topic-intro h2 {
  margin: 0 0 8px;
  color: var(--accent);
}
.study-topic-intro p {
  margin: 0;
  color: var(--text-muted);
}
.study-topic-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.study-topic-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.study-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.study-topic-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.study-topic-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}
.study-topic-card-title {
  font-weight: 600;
  line-height: 1.4;
}
.study-topic-card-arrow {
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}

/* content loading */
.content-loading {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-muted); font-size: 0.9rem; padding: 30px;
}
.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Gallery View ──────────────────────────────────────── */
.gallery-controls { margin-bottom: 20px; }
.gallery-controls-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.gallery-search {
  flex: 1;
  min-width: 160px;
  max-width: 380px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  font-family: inherit; font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.gallery-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.gallery-search::placeholder { color: var(--text-muted); }
.gallery-mgr-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  font-family: inherit; font-size: 0.87rem; font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.gallery-mgr-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.gallery-add-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: inherit; font-size: 0.87rem; font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.gallery-add-btn:hover { background: var(--accent); color: #fff; }

.gallery-cats, .gallery-subs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gallery-subs { margin-top: 6px; }
.gallery-cat-btn {
  padding: 4px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit; font-size: 0.8rem; font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.gallery-cat-btn:hover { border-color: var(--accent); color: var(--accent); }
.gallery-cat-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.gallery-sub-btn { font-size: 0.75rem; opacity: 0.85; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.gallery-item {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  aspect-ratio: 4/3;
  cursor: pointer;
  background: var(--surface2);
  transition: border-color var(--transition), box-shadow var(--transition), transform 0.15s;
}
.gallery-item:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 28px var(--accent-glow);
  transform: translateY(-3px);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1);
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.2s;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-label {
  position: absolute; bottom: 10px; left: 12px;
  color: #fff; font-size: 0.82rem; font-weight: 600;
  opacity: 0; transition: opacity 0.2s;
}
.gallery-item:hover .gallery-item-label { opacity: 1; }

.gallery-item-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 28px 12px 10px;
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; transition: opacity 0.2s;
  pointer-events: none;
}
.gallery-item:hover .gallery-item-info { opacity: 1; }
.gii-name { font-size: 0.82rem; font-weight: 700; color: #fff; line-height: 1.2; }
.gii-cat  { font-size: 0.72rem; color: rgba(255,255,255,0.72); }

.gallery-item-edit-btn {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff; border-radius: 6px;
  padding: 3px 8px; font-size: 0.82rem; cursor: pointer;
  opacity: 0; transition: opacity 0.15s, background 0.15s;
}
.gallery-item:hover .gallery-item-edit-btn { opacity: 1; }
.gallery-item-edit-btn:hover { background: var(--accent); border-color: var(--accent); }

/* Lightbox */
#lightbox {
  display: none;
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.88);
  align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: 90vw; max-height: 88vh;
  border-radius: var(--radius);
  box-shadow: 0 20px 80px rgba(0,0,0,0.6);
}
#lightbox-close {
  position: absolute; top: 20px; right: 24px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.1);
  color: #fff; font-size: 1.2rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.18s, transform 0.15s;
}
#lightbox-close:hover { background: rgba(255,255,255,0.2); transform: scale(1.1); }

/* ─── Gallery Add Modal ─────────────────────────────────── */
#gallery-add-modal {
  display: none;
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.5);
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
#gallery-add-modal.open { display: flex; }
.gad-content {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  width: 440px; max-width: calc(100vw - 32px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
  overflow: hidden;
}
.gad-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1.5px solid var(--border);
}
.gad-title {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem; color: var(--text);
}
.gad-close {
  width: 30px; height: 30px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--surface2);
  color: var(--text-muted); cursor: pointer; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.gad-close:hover { background: var(--accent-soft); color: var(--accent); }
#gallery-add-form { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.gad-field { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.gad-row { display: flex; gap: 12px; }
.gad-label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }
.gad-input {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: inherit; font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.gad-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.gad-input::placeholder { color: var(--text-muted); }
.gad-error { font-size: 0.82rem; color: #ef4444; min-height: 18px; }
.gad-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 4px; }
.gad-btn {
  padding: 8px 20px; border-radius: 9px;
  font-family: inherit; font-size: 0.87rem; font-weight: 600;
  cursor: pointer; border: 1.5px solid var(--border);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.gad-btn-cancel { background: var(--surface2); color: var(--text-muted); }
.gad-btn-cancel:hover { border-color: var(--accent); color: var(--accent); }
.gad-btn-submit { background: var(--accent); color: #fff; border-color: var(--accent); }
.gad-btn-submit:hover { opacity: 0.88; }
.gad-btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Category Modal ─────────────────────────────────────── */
#cat-modal {
  display: none;
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.5);
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
#cat-modal.open { display: flex; }
.cat-modal-content { width: 480px; }
.cat-modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.cat-divider { height: 1.5px; background: var(--border); margin: 2px 0; }
.cat-add-heading {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.9rem;
  color: var(--text); margin-bottom: 2px;
}
#cat-add-form { display: flex; flex-direction: column; gap: 10px; }
.cat-list { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; }
.cat-list::-webkit-scrollbar { width: 4px; }
.cat-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.cat-empty { font-size: 0.84rem; color: var(--text-muted); padding: 6px 0; }
.cat-item {
  display: flex; flex-direction: column; gap: 5px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
}
.cat-item-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cat-item-name { font-weight: 700; font-size: 0.88rem; color: var(--text); }
.cat-delete-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 0.8rem; padding: 2px 5px; border-radius: 4px;
  transition: color .15s, background .15s;
}
.cat-delete-btn:hover { color: #e55; background: rgba(220,50,50,.08); }
.cat-item-subs { display: flex; flex-wrap: wrap; gap: 5px; }
.cat-sub-add-row { display: flex; gap: 6px; margin-top: 2px; }
.cat-sub-new-input { flex: 1; padding: 4px 8px; font-size: 0.8rem; }
.cat-sub-add-btn { padding: 4px 10px; font-size: 0.85rem; }
.cat-sub-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  font-size: 0.73rem; font-weight: 600; color: var(--accent);
}
.cat-no-subs { font-size: 0.75rem; color: var(--text-muted); font-style: italic; }

/* ─── Contacts View ─────────────────────────────────────── */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.contact-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.contact-card:hover { border-color: var(--accent); box-shadow: 0 4px 24px var(--accent-glow); }
.contact-card h3 {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 1rem; margin-bottom: 14px;
  color: var(--text);
}
.contact-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
  border-bottom: 1.5px solid var(--border);
  font-size: 0.9rem;
}
.contact-row:last-child { border-bottom: none; }
.contact-row svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.classmates-list { list-style: none; padding: 0; }
.classmates-list li { border-bottom: 1.5px solid var(--border); }
.classmates-list li:last-child { border-bottom: none; }
.classmates-list a {
  display: block; padding: 9px 4px;
  font-size: 0.88rem; color: var(--text);
  transition: color var(--transition);
}
.classmates-list a:hover { color: var(--accent); text-decoration: none; }

/* ─── Projects View ─────────────────────────────────────── */
.projects-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.project-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition), transform var(--transition);
}
.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px var(--accent-glow);
  transform: translateY(-2px);
}
.project-card-lang {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.lang-js  { background: rgba(234,179,8,0.15);  color: #ca8a04; }
.lang-py  { background: rgba(59,130,246,0.15); color: #2563eb; }
.lang-cs  { background: rgba(139,92,246,0.15); color: #7c3aed; }
.project-card h4 {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem;
  color: var(--text); margin-bottom: 6px;
}
.project-card p { font-size: 0.84rem; color: var(--text-muted); }
.project-card-link { cursor: pointer; }
.project-open-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border);
  transition: background var(--transition), color var(--transition);
}
.project-card-link:hover .project-open-btn {
  background: var(--accent);
  color: #fff;
}

/* ─── Todo Toggle Button ────────────────────────────────── */
.todo-toggle-btn {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.todo-toggle-btn svg { width: 15px; height: 15px; }
.todo-toggle-btn:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.todo-toggle-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.todo-badge {
  display: none;
  position: absolute;
  top: -5px; right: -5px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem; font-weight: 700;
  border-radius: 999px;
  align-items: center; justify-content: center;
  line-height: 16px;
  text-align: center;
}
.todo-badge.visible { display: flex; }

/* ─── Todo Panel ────────────────────────────────────────── */
#todo-backdrop {
  display: none;
  position: fixed; inset: 0;
  z-index: 149;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
}
#todo-backdrop.open { display: block; }

#todo-panel {
  position: fixed;
  top: 50%; left: 50%;
  width: 456px;
  max-height: 90vh;
  z-index: 150;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  display: flex; flex-direction: column;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1), opacity 0.28s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 24px 64px rgba(0,0,0,0.22), 0 4px 16px rgba(0,0,0,0.10);
}
#todo-panel.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* ── Circular progress ────────────────────────────────── */
.todo-progress-wrap {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 20px 14px;
  border-bottom: 1.5px solid var(--border);
  flex-shrink: 0;
}
.todo-progress {
  position: relative;
  width: 86px; height: 86px; flex-shrink: 0;
}
.todo-progress-svg {
  width: 86px; height: 86px;
  transform: rotate(-90deg);
}
.todo-progress-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 2.8;
}
.todo-progress-bar {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.55s cubic-bezier(.4,0,.2,1);
}
.todo-progress-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1px;
}
.todo-progress-pct {
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1rem;
  color: var(--accent); line-height: 1;
}
.todo-progress-lbl {
  font-size: 0.6rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em;
}
.todo-progress-stats {
  font-size: 0.85rem; color: var(--text-muted); line-height: 1.5;
}

.todo-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 14px;
  border-bottom: 1.5px solid var(--border);
  flex-shrink: 0;
}
.todo-panel-title {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem;
  color: var(--text);
}
.todo-panel-close {
  width: 30px; height: 30px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--surface2);
  color: var(--text-muted); cursor: pointer; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.todo-panel-close:hover { background: var(--accent-soft); color: var(--accent); }

.todo-add-form {
  display: flex; gap: 8px;
  padding: 14px 14px 10px;
  flex-shrink: 0;
}
.todo-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: inherit; font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.todo-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.todo-input::placeholder { color: var(--text-muted); }
.todo-add-btn {
  width: 36px; height: 36px; border-radius: 8px;
  border: none; background: var(--accent); color: #fff;
  font-size: 1.3rem; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: opacity var(--transition), transform var(--transition);
}
.todo-add-btn:hover { opacity: 0.85; transform: scale(1.07); }

.todo-filters {
  display: flex; gap: 6px;
  padding: 0 14px 10px;
  flex-shrink: 0;
}
.todo-filter {
  padding: 4px 12px; border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent; color: var(--text-muted);
  font-family: inherit; font-size: 0.78rem; font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.todo-filter:hover { border-color: var(--accent); color: var(--accent); }
.todo-filter.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.todo-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding: 4px 14px 14px;
}
.todo-list::-webkit-scrollbar { width: 4px; }
.todo-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.todo-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  margin-bottom: 8px;
  transition: border-color var(--transition), opacity var(--transition);
}
.todo-item.done { opacity: 0.55; }
.todo-item.done .todo-item-text { text-decoration: line-through; color: var(--text-muted); }

.todo-check {
  width: 18px; height: 18px; flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), border-color var(--transition);
}
.todo-check:hover { border-color: var(--accent); }
.todo-item.done .todo-check { background: var(--accent); border-color: var(--accent); }
.todo-item.done .todo-check::after { content: '✓'; font-size: 0.65rem; color: #fff; }

.todo-item-text {
  flex: 1; font-size: 0.86rem; color: var(--text);
  word-break: break-word; line-height: 1.4;
}

.todo-delete {
  width: 24px; height: 24px; border-radius: 6px;
  border: none; background: transparent; color: var(--text-muted);
  cursor: pointer; font-size: 0.8rem; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: background var(--transition), color var(--transition), opacity var(--transition);
}
.todo-item:hover .todo-delete { opacity: 1; }
.todo-delete:hover { background: rgba(239,68,68,0.12); color: #ef4444; }

.todo-empty {
  display: none;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 32px 16px;
}
.todo-empty.visible { display: block; }

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  background: var(--surface);
  border: none;
  border-radius: 22px;
  width: min(var(--page-max-width), calc(100vw - 40px));
  margin: 0 auto 24px;
  padding: 20px 28px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: background var(--transition), border-color var(--transition);
  backdrop-filter: blur(20px) saturate(155%);
  -webkit-backdrop-filter: blur(20px) saturate(155%);
}
footer a { color: var(--accent); }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  :root { --page-max-width: calc(100vw - 56px); }
}
@media (max-width: 900px) {
  :root { --page-max-width: calc(100vw - 32px); }
  #topbar { padding-top: 12px; }
  .hamburger { display: flex; }
  #hero {
    padding: 44px 28px 38px;
    margin-top: 16px;
  }
  #app {
    margin-top: 16px;
    gap: 16px;
  }
  #main-content-area { padding: 18px 0 32px; }
  .contacts-grid { grid-template-columns: 1fr; }
  #content { padding: 18px 16px; }
}
@media (max-width: 600px) {
  .topbar-nav { display: none; }
  .topbar-inner {
    width: calc(100vw - 24px);
    min-height: 62px;
    padding: 0 16px;
  }
  #mobile-nav,
  #hero,
  #app,
  footer {
    width: calc(100vw - 24px);
  }
  .hero-title { font-size: 1.7rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-list { grid-template-columns: 1fr; }
  .bento-grid  { grid-template-columns: 1fr 1fr; }
  .b-profile, .b-modules { grid-column: 1 / 3; }

  #todo-panel        { transform: translate(-50%, -50%) scale(0.72); }
  #todo-panel.open   { transform: translate(-50%, -50%) scale(0.8);  }
}
