:root {
  --bg: #0b0710;
  --panel: rgba(255,255,255,0.03);
  --muted: #bfc0c8;
  --text: #eef0f6;
  --accent-1: #2b076e;
  --accent-2: #6441a5;
  --accent-purple-1: rgba(120, 60, 200, 0.95);
  --accent-purple-2: rgba(90, 40, 160, 0.95);
  --accent-glow: rgba(156, 102, 255, 0.18);
  --card-bg-bottom: rgba(255,255,255,0.01);
  --card-bg-top: rgba(255,255,255,0.02);
  --card-bg: rgba(255,255,255,0.03);
  --card-border: rgba(255,255,255,0.04);
  --brand-green: #093f03;
  --brand-green-light: #92d121;
  --transition: 300ms cubic-bezier(.2,.9,.3,1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  /* Category color variables (change here to recolor categories) */
  --cat-discord: #1fb6ff; 
  --cat-pc: #9b6bff;     
  --cat-mobile: #57b967;  
  --cat-other: #d4af37;  
}

/* ========== Base / Reset ========== */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; -ms-overflow-style: none; scrollbar-width: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html, body { overflow-x: hidden; } 
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(180deg,#06040a 0%, #2b076e 90%);
  color: var(--text);
  line-height: 1.45;
  font-size: 16px;
}

/* Make all hyperlinks use the brand/green colors by default */
a { color: var(--brand-green); text-decoration: none; }
a:hover, a:focus { color: var(--brand-green-light); text-decoration: underline; }

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  min-height: 72px;
  display: block;
  backdrop-filter: blur(6px);
  background: linear-gradient(180deg, rgba(10,6,14,1), rgba(10,6,14,1));
  border-bottom: 2px solid rgba(255,255,255,0.03);
}

/* header inner / page-container row for brand + nav */
.page-container.header-row {
  width: 100%;
  max-width: 100%;
  padding: 12px 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  margin: 0 !important;
}

/* mobile menu button (hidden desktop) */
.mobile-menu-btn {
  display: none;
  background: none;
  border: 0;
  color: var(--text);
  padding: 6px;
  border-radius: 8px;
  flex: 0 0 auto;
  cursor: pointer;
}

/* brand block */
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 340px;
  justify-content: flex-start;
  color: inherit;
  text-decoration: none;
}
.brand:hover,
.brand:focus-visible {
  opacity: 0.9;               
  text-decoration: none;
}
.brand-favicon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.brand-title { font-weight: 700; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-tag { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* centered top nav */
.top-nav {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  gap: 20px;
  align-items: center;
  width: max-content;
  pointer-events: auto;
}
.top-nav .nav-link {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  transition: var(--transition);
  white-space: nowrap;
}
.top-nav .nav-link:hover {
  color: var(--text);
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  box-shadow: 0 6px 20px var(--accent-glow);
  transform: translateY(-2px);
}

/* ========== Mobile Menu ========== */
#mobile-menu {
  position: absolute;
  width: 220px;
  max-width: calc(100vw - 48px);
  padding: 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.03);
  box-shadow: 0 12px 40px rgba(6,6,12,0.6);
  transform-origin: top left;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 200ms ease, transform 200ms cubic-bezier(.2,.9,.3,1);
  z-index: 1200;
  outline: none;
  display: none;
}
#mobile-menu.open { display: block; opacity: 1; transform: translateY(0) scale(1); }
#mobile-menu[hidden] { display: none !important; opacity: 0 !important; pointer-events: none; }

/* mobile menu link */
#mobile-menu .mobile-link {
  display: block;
  padding: 10px 8px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  transition: background 180ms ease, color 180ms ease;
}
#mobile-menu .mobile-link:hover,
#mobile-menu .mobile-link:focus {
  color: var(--text);
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
}

/* ========== Footer ========== */
.site-footer {
  width: 100%;
  border-top: 2px solid rgba(255,255,255,0.08);
  margin-top: 40px;
  padding: 20px 0;
  color: var(--muted);
  background: linear-gradient(180deg, #120624, #10061d);
  position: fixed;
  bottom: 0;
  flex-shrink: 0;
  z-index: 140;
  backdrop-filter: blur(6px);
  box-sizing: border-box;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}
.footer-left {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.footer-icon { width: 28px; height: 28px; border-radius: 6px; object-fit: contain; }
.footer-right { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.footer-right a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color 180ms ease, transform 180ms ease;
}
.footer-right a:hover { color: var(--text); transform: translateY(-2px); }
body, #about-page { padding-bottom: var(--site-footer-height); }

/* ========== Hide Scrollbars ========== */
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }
html, body { -ms-overflow-style: none; scrollbar-width: none; }

/* ========== Page Layout ========== */
.page-container{
  max-width:1200px;
  margin: 36px auto;
  padding: 0 20px;
  padding-bottom: 105px;
}

/* page hero */
.page-hero{ text-align:center; margin-bottom:28px; }
.page-title{ font-size:32px; margin:6px 0 6px; font-weight:800; letter-spacing:-0.02em; }
.lead{ color:var(--muted); margin-top:6px; }

/* category nav */
.category-nav{ display:flex; gap:10px; justify-content:center; margin:18px 0 28px; flex-wrap:wrap; }
.cat-btn{
  background: transparent;
  border:1px solid rgba(255,255,255,0.04);
  color:var(--text);
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
  font-weight:700;
}
.cat-btn.active{ box-shadow: 0 6px 18px rgba(110,88,255,0.12); border-color: rgba(255,255,255,0.08); }

/* section header */
.section-header{ margin: 28px 0 12px; }
.section-header h2{ margin:0; font-size:20px; font-weight:800;}
.section-desc{ color:var(--muted); margin-top:6px; }

/* ----------------- deep-card style (used by cards + expand panel) ----------------- */
.deep-card{
  background: linear-gradient(180deg, var(--card-bg-top), var(--card-bg-bottom));
  border: 1px solid var(--card-border);
  border-radius:16px;
  padding:16px;
  box-shadow: 0 10px 30px rgba(6,6,12,0.5);
  transition: transform 220ms ease, box-shadow 220ms ease;
  color:var(--text);
}

/* hover lift + shadow will use category-specific shadow via inline class */
.project-card:hover{ transform: translateY(-6px); }

/* ----------------- project grid & card (collapsed) ----------------- */
.project-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 per row desktop */
  gap: 18px;
}

/* Card (collapsed) — small centered layout: title / emoji / desc */
.project-card{
  cursor:pointer;
  text-align:center;
  padding:18px;
  min-height:150px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  user-select:none;
  outline: none;
}
.project-card .card-title{ font-size:16px; font-weight:800; margin:0; }
.project-card .card-emoji{ font-size:36px; line-height:1; }
.project-card .card-excerpt{ color:var(--muted); font-size:13px; margin:0; }

/* each project card sits inside deep-card visual */
.project-card{ background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border-radius:12px; border:1px solid var(--card-border); padding:14px; }

/* left/top accent: top stripe per your choice */
.project-card::before{
  content:"";
  height:6px;
  display:block;
  width:100%;
  border-top-left-radius:12px;
  border-top-right-radius:12px;
  margin:-14px 0 8px -14px;
  transform:translateY(-8px);
  pointer-events:none;
  opacity:0.95;
}

/* category shadow on hover: specific selectors by section */
.project-section[data-category="discord"] .project-card:hover::before{ background: linear-gradient(90deg, var(--cat-discord), rgba(255,255,255,0)); }
.project-section[data-category="pc"] .project-card:hover::before{ background: linear-gradient(90deg, var(--cat-pc), rgba(255,255,255,0)); }
.project-section[data-category="mobile"] .project-card:hover::before{ background: linear-gradient(90deg, var(--cat-mobile), rgba(255,255,255,0)); }
.project-section[data-category="other"] .project-card:hover::before{ background: linear-gradient(90deg, var(--cat-other), rgba(255,255,255,0)); }

/* colored shadow (soft glow) applied on hover using box-shadow */
.project-section[data-category="discord"] .project-card:hover{ box-shadow: 0 16px 48px rgba(31,182,255,0.12); }
.project-section[data-category="pc"] .project-card:hover{ box-shadow: 0 16px 48px rgba(155,107,255,0.12); }
.project-section[data-category="mobile"] .project-card:hover{ box-shadow: 0 16px 48px rgba(87,185,103,0.12); }
.project-section[data-category="other"] .project-card:hover{ box-shadow: 0 16px 48px rgba(212,175,55,0.12); }

/* ----------------- expand panel (inserted into slot) ----------------- */
.project-expand{
  margin-top:18px;
  border-radius:12px;
  overflow:hidden;
  transition: max-height 300ms ease, opacity 260ms ease, transform 260ms ease;
  opacity:0;
  transform: translateY(-6px);
  max-height:0; /* JS will set precise maxHeight when opening */
}

/* inner card visuals */
.project-expand .expand-inner{
  display:flex;
  gap:18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border:1px solid var(--card-border);
  border-radius:12px;
  padding:18px;
  align-items:flex-start;
}
.project-expand .expand-left{ width:200px; flex:0 0 200px; display:flex; align-items:center; justify-content:center; }
.project-expand .expand-screenshot{ width:180px; height:120px; border-radius:8px; background: rgba(255,255,255,0.02); display:flex; align-items:center; justify-content:center; font-size:36px; }
.project-expand .expand-main{ flex:1; }
.project-expand .expand-main h3{ margin:0 0 8px; font-size:18px; }
.project-expand .expand-desc{ color:var(--muted); margin:6px 0 10px; }
.project-expand .expand-features{ margin:0 0 12px 18px; color:var(--muted); }
.project-expand .expand-links{ display:flex; gap:10px; }

/* close button */
.expand-close{
  background:transparent; border:0; font-size:18px; cursor:pointer; color:var(--muted);
  align-self:flex-start; margin-left:12px;
}

/* when visible (JS toggles these inline via style or classes) */
.project-expand.is-open{ opacity:1; transform:none; max-height:1000px; }

/* buttons */
.btn{
  display:inline-block;
  padding:8px 12px;
  border-radius:10px;
  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border:1px solid rgba(255,255,255,0.04);
  color:var(--text);
  text-decoration:none;
  font-weight:700;
}

/* small utility */
.hidden { display:none !important; }

/* ========== Responsive Mobile Rules ========== */
/* Small-screen tweaks */
@media (max-width: 520px) {
  .brand-title { font-size: 16px; }
  .brand-favicon { width: 40px; height: 40px; }
  .headline { font-size: 22px; }
}

/* Typical mobile phones */
@media (max-width: 800px) {
  .top-nav { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .page-container.header-row { padding-left: 12px; padding-right: 16px; overflow: visible !important; }

  /* mobile #mobile-menu becomes inline panel */
  #mobile-menu {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    margin: 8px 0 0 0 !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)) !important;
    border-top: 1px solid rgba(255,255,255,0.02) !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
    display: none !important;
  }
  #mobile-menu.open { display: block !important; }

  /* alternative top mobile nav element (if used) */
  nav#mobile-menu-top { display: block; width: 100%; box-sizing: border-box; margin: 0; padding: 0; overflow: hidden; max-height: 0; transition: max-height 260ms ease, padding 180ms ease, background 180ms ease; background: transparent; border-bottom: none; z-index: 999; }
  nav#mobile-menu-top.open { padding: 10px 14px; background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border-bottom: 1px solid rgba(255,255,255,0.02); max-height: 300px; padding-bottom: 165px; pointer-events: auto; }
  nav#mobile-menu-top .mobile-top-list { list-style: none; margin: 0; padding: 14px 0; display: flex; flex-direction: column; gap: 6px; }
  nav#mobile-menu-top .mobile-top-list li { margin: 0; }
  .mobile-top-link { display: block; padding: 12px 10px; border-radius: 10px; text-decoration: none; color: var(--text) !important; font-weight: 700; background: transparent !important; }
  nav#mobile-menu-top.open .mobile-top-link:hover,
  nav#mobile-menu-top.open .mobile-top-link:focus { background: linear-gradient(90deg, var(--accent-1), var(--accent-2)) !important; color: #ffffff !important; }

  /* defensive: prevent header clipping expanded menu */
  .site-header, .page-container.header-row { overflow: visible !important; }

  /* footer / background defensive rules on mobile */
  main, .page-container, .site-footer, .footer-inner { background: transparent !important; background-color: transparent !important; }
  .site-footer { color: var(--muted); background: linear-gradient(180deg, rgba(255,255,255,0.00), rgba(255,255,255,0.00)) !important; border-top: none !important; }
  ::-webkit-scrollbar { background: transparent; }
  body, html { overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }
  .site-footer * { background: transparent !important; }

  /* page specific rules */
  .page-container{ margin:20px auto; padding:0 12px; }
  .project-grid{ display:block; gap:12px; }
  .project-card{ min-height:110px; padding:12px; border-radius:12px; text-align:center; }
  .project-card .card-emoji{ font-size:32px; }
  .project-card .card-title{ font-size:15px; }
  .project-card .card-excerpt{ font-size:13px; }
  .project-expand .expand-inner{ flex-direction:column; gap:12px; padding:14px; }
  .project-expand .expand-left{ width:100%; flex-basis:auto; }
  .project-expand .expand-screenshot{ width:100%; height:160px; font-size:48px; border-radius:10px; }
  .project-expand .expand-main{ width:100%; }
  .project-expand{ opacity:1; transform:none; max-height:2000px; transition: max-height 340ms ease; }
  .page-title{ font-size:24px; }
  .category-nav{ gap:8px; margin:12px 0 18px; }
  
}