:root{
  /* Text / UI (WHITE) */
  --fg: #ffffff;
  --fg-rgb: 255,255,255;

  --muted: rgba(var(--fg-rgb), .72);
  --muted2: rgba(var(--fg-rgb), .55);
  --line: rgba(var(--fg-rgb), .14);

  /* Brand accent (PURPLE) */
  --accent: #6262f6;
  --accent-rgb: 81,0,89;

  --max: 1200px;
  --pad: 28px;
}

/* --- Projects controls (Manhwa/Manhua) --- */
.projects-controls{
  display:flex;
  gap:10px;
  margin: 10px 0 14px;
  flex-wrap: wrap;
}

.pill{
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: inherit;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.pill.is-active{
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.28);
}


/* --- Dots --- */
.dots{
  display:flex;
  justify-content:center;
  align-items:center;
  gap: 8px;
  margin-top: 10px;
  user-select:none;
}

.dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: rgba(255,255,255,.35);
  padding: 0;
}

.dot.is-active{
  width: 22px;                 /* active dot dài hơn để dễ nhận biết */
  background: rgba(255,255,255,.85);
}


*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--fg);
  font-size: 18px;
  line-height: 1.65;
  overflow-x:hidden;
}

/* Background */
.bg{
  position:fixed;
  inset:0;
  background-image: url("./assets/bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index:-3;
}
.bg-overlay{
  position:fixed;
  inset:0;
  background:
    radial-gradient(1200px 600px at 15% 15%, rgba(var(--fg-rgb), .18), transparent 60%),
    radial-gradient(900px 500px at 85% 25%, rgba(var(--fg-rgb), .12), transparent 55%),
    linear-gradient(to bottom, rgba(0,0,0,.40), rgba(0,0,0,.68));
  z-index:-2;
}

/* Header */
.topbar{
  position:sticky;
  top:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 18px;
  padding: 16px var(--pad);
  background: rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 240px;
}

.logo{
  width:342px;
  height:142px;
  place-items:center;
  overflow:hidden;
  border-radius: 6px;
}
.logo img{
  width:100%;
  height:100%;
  object-fit: contain;
}

.brand-name{
  font-weight: 800;
  letter-spacing: .3px;
}
.brand-sub{
  color: var(--muted);
  font-size: 14px;
  margin-top: 2px;
}

.nav{ display:flex; align-items:center; justify-content:flex-end; }

/* Buttons */
.btn{
  appearance:none;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.18);
  color: var(--fg);
  padding: 10px 14px;
  font-weight: 700;
  border-radius: 6px;
  text-decoration:none;
  cursor:pointer;
}
.btn:hover{ background: rgba(0,0,0,.28); }

.btn-primary{
  background: rgba(var(--fg-rgb), .16);
}
.btn-primary:hover{ background: rgba(var(--fg-rgb), .22); }

/* Layout */
.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--pad) 72px;
}

.kicker{
  margin: 0 0 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted2);
  font-size: 12px;
}

h1{
  margin: 0 0 12px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.08;
}
.accent{ color: var(--accent); }

.lead{
  margin: 0 0 14px;
  color: var(--muted);
  max-width: 78ch;
  font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.6;
}

.quick-links{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  align-items:center;
  margin-top: 12px;
  color: var(--muted);
}
.dot{ color: rgba(var(--fg-rgb), .22); }

.text-link{
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--fg-rgb), .20);
}
.text-link:hover{
  border-bottom-color: rgba(var(--fg-rgb), .55);
  color: var(--accent);
}

.hero{
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.section{
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}

.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-head h2{
  margin:0;
  font-size: 26px;
  letter-spacing: .2px;
}
.muted{
  margin:0;
  color: var(--muted);
  font-size: 15px;
}

/* Prose */
.prose{
  max-width: 90ch;
  color: rgba(var(--fg-rgb), .82);
}
.prose p{
  margin: 0 0 14px;
}

/* Projects strip */
.projects-strip{
  margin-top: 26px;
}

.covers{
  display:flex;
  gap: 14px;
  align-items:stretch;
  overflow-x:auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}
.covers::-webkit-scrollbar{ height: 8px; }
.covers::-webkit-scrollbar-thumb{ background: rgba(var(--fg-rgb), .14); }

.project-groups{
  display: grid;
  gap: 26px;
  margin-top: 18px;
}

.project-group-head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.project-group-head h3{
  margin: 0;
  font-size: 20px;
}

.carousel-hint{
  margin-top: 10px;
}

.all-projects-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.load-more-wrap{
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

.load-more-wrap .btn{
  min-width: 190px;
}


.cover{
  flex: 0 0 auto;
  width: min(220px, 42vw);
  aspect-ratio: 3 / 4;
  position: relative;
  text-decoration:none;
  border: 1px solid rgba(var(--fg-rgb), .10);
  border-radius: 6px;
  overflow:hidden;
  scroll-snap-align: start;

  background-image: url("./assets/featured-strip.png");
  background-repeat: no-repeat;
  background-size: 500% 100%;
  background-position: calc(var(--i) * 25%) 50%;
  filter: saturate(1.02) contrast(1.02);
}

.cover::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,0) 55%);
  opacity: 0;
  transition: opacity .18s ease;
}

.cover-title{
  position:absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  color: var(--fg);
  font-weight: 800;
  letter-spacing: .2px;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
  text-shadow: 0 6px 18px rgba(0,0,0,.65);
}

.cover:hover::after,
.cover:focus-visible::after{ opacity: 1; }

.cover:hover .cover-title,
.cover:focus-visible .cover-title{
  opacity: 1;
  transform: translateY(0);
}

@media (hover: none){
  .cover::after{ opacity: .65; }
  .cover-title{ opacity: 1; transform:none; }
}

/* Genres list */
.genres{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 22px;
  max-width: 980px;
}
.genre{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 0;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--fg-rgb), .10);
}
.genre:hover,
.genre:focus-visible{
  color: var(--fg);
  text-decoration: none;
  border-bottom-color: rgba(var(--accent-rgb), .45);
}
.count{
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Contact list */
.contact-list{
  display:grid;
  gap: 12px;
  max-width: 760px;
}
.contact-item{
  display:flex;
  align-items:center;
  gap: 12px;
  text-decoration:none;
  color: var(--fg);
  padding: 12px 0;
  border-bottom: 1px solid rgba(var(--fg-rgb), .10);
}
.icon{
  width: 34px;
  height: 34px;
  display:grid;
  place-items:center;
  border: 1px solid rgba(var(--fg-rgb), .12);
  border-radius: 6px;
  color: var(--accent);
  background: rgba(0,0,0,.14);
}
.contact-text{ display:flex; flex-direction:column; gap: 2px; }
.label{ font-weight: 800; }
.value{ color: var(--muted); font-size: 15px; }

.footer{
  padding-top: 36px;
  display:flex;
  align-items:center;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 900px){
  .container{ padding: 32px 18px 64px; }
  .genres{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px){
  .genres{ grid-template-columns: 1fr; }
}

/* ===== Featured covers carousel (5 per view) ===== */
.carousel{
  position: relative;
   display: block;



  margin-top: 14px;
}

/* Bigger comeback intro text */
.prose .intro-lead{
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.5;
  margin-bottom: 14px;
}
.prose .intro-body,
.prose .intro-note{
  font-size: clamp(17px, 2.0vw, 20px);
  line-height: 1.75;
}
.prose .intro-note{
  opacity: 0.92;
}

.back-to-top{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;
  text-decoration: none;

  background: rgba(var(--fg-rgb), 0.12);
  border: 1px solid rgba(var(--fg-rgb), 0.18);
  backdrop-filter: blur(10px);

  color: var(--fg);
  font-size: 18px;
  line-height: 1;

  z-index: 9999;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.back-to-top:hover{
  transform: translateY(-2px);
  background: rgba(var(--fg-rgb), 0.18);
  border-color: rgba(var(--fg-rgb), 0.28);
}
.back-to-top:active{
  transform: translateY(0);
}

.carousel-viewport{
  overflow: hidden;
  border: 1px solid rgba(var(--fg-rgb), .10);
  border-radius: 10px;
  background: rgba(0,0,0,.10);
}

.carousel-track{
  display: flex;
  gap: 14px;
  padding: 14px;
  will-change: transform;
  transition: transform .35s ease;
}
.carousel-page{
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr));
  gap: 14px;
  min-width: 100%;
}

.cover-card{

  position: relative;
  height: clamp(320px, 32vw, 380px);
  border-radius: 12px;
  overflow: hidden;



  text-decoration: none;
    border: 1px solid rgba(var(--fg-rgb), .14);
  background: rgba(0,0,0,.14);
}

.cover-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;


}

.cover-card::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,0) 55%);


}

.cover-title{
  position:absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  color: var(--fg);
  font-weight: 800;
  letter-spacing: .2px;
 line-height: 1.25;



  text-shadow: 0 6px 18px rgba(0,0,0,.65);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}



























@media (max-width: 1200px){
  .carousel-track{ gap: 12px; padding: 12px; }





}