:root{
  --bg: #0b0f19;
  --card: rgba(255,255,255,0.06);
  --card2: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.12);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.72);
  --muted2: rgba(255,255,255,0.56);
  --accent: #7c5cff;
  --accent2: #32d3a2;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(900px 500px at 10% 10%, rgba(124,92,255,0.25), transparent 55%),
    radial-gradient(700px 400px at 90% 15%, rgba(50,211,162,0.20), transparent 55%),
    radial-gradient(900px 650px at 50% 90%, rgba(255,255,255,0.08), transparent 60%),
    var(--bg);
}

a{ color: inherit; text-decoration: none; }

.container{
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(11,15,25,0.70);
  border-bottom: 1px solid var(--border);
}

.header-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand{
  font-weight: 800;
  letter-spacing: 0.2px;
}

.nav{
  display: flex;
  gap: 12px;
}

.nav-link{
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
}
.nav-link:hover{ border-color: var(--border); color: var(--text); }
.nav-link.active{
  background: rgba(124,92,255,0.18);
  border-color: rgba(124,92,255,0.35);
  color: var(--text);
}

.main{ padding: 28px 0 38px; }

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.card-mini{
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}

.hero{
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: center;
}

.title{
  font-size: clamp(28px, 3vw, 40px);
  margin: 10px 0 8px;
  line-height: 1.1;
}
.accent{ color: var(--accent2); }

.subtitle{
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
}

.pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font-size: 13px;
}
.pill.small{ font-size: 12px; padding: 5px 10px; }

.cta-row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.btn{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: transform 0.06s ease, background 0.15s ease, border-color 0.15s ease;
  font-weight: 700;
}
.btn:hover{
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.18);
}
.btn:active{ transform: translateY(1px); }

.btn.primary{
  background: rgba(124,92,255,0.18);
  border-color: rgba(124,92,255,0.35);
}
.btn.primary:hover{
  background: rgba(124,92,255,0.25);
  border-color: rgba(124,92,255,0.45);
}
.btn.ghost{ background: transparent; }

.hint{
  margin: 10px 0 0;
  color: var(--muted2);
  min-height: 18px;
  font-size: 13px;
}

.hero-right{
  display: grid;
  gap: 12px;
  justify-items: end;
}

.avatar{
  width: 120px;
  height: 120px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(124,92,255,0.35), rgba(50,211,162,0.28));
  border: 1px solid rgba(255,255,255,0.18);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 28px;
}

.mini-title{
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mini-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.mini-list li{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}
.k{ color: var(--muted2); }
.v{ color: var(--text); }

.grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.h2{
  margin: 0 0 8px;
  font-size: 18px;
}
.h3{
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--text);
}
.text{
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.list{
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
}

.chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(50,211,162,0.30);
  background: rgba(50,211,162,0.08);
  color: rgba(255,255,255,0.82);
}

.site-footer{
  border-top: 1px solid var(--border);
  background: rgba(11,15,25,0.65);
  backdrop-filter: blur(10px);
}
.footer-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  color: var(--muted2);
  gap: 12px;
}
.footer-link{
  color: var(--muted);
  border-bottom: 1px dashed rgba(255,255,255,0.20);
}
.footer-link:hover{ color: var(--text); }

.page-head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.filters{ min-width: 280px; }

.label{
  display: block;
  color: var(--muted2);
  font-size: 12px;
  margin-bottom: 6px;
}

.input{
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  outline: none;
}
.input::placeholder{ color: rgba(255,255,255,0.45); }
.input:focus{
  border-color: rgba(124,92,255,0.55);
  box-shadow: 0 0 0 4px rgba(124,92,255,0.15);
}

.projects{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.project-top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-section{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.cta-bottom{ margin-top: 14px; }

.letter{
  margin-top: 14px;
}
.letter-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.letter-body{
  color: var(--muted);
  line-height: 1.65;
}
.letter-body p{ margin: 0 0 12px; }

/* Responsive */
@media (max-width: 900px){
  .hero{ grid-template-columns: 1fr; }
  .hero-right{ justify-items: start; }
  .grid{ grid-template-columns: 1fr; }
  .projects{ grid-template-columns: 1fr; }
}

/* Make the whole project card clickable without looking like a link */
.card-link{
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-link .card{
  transition: transform 0.10s ease, border-color 0.15s ease, background 0.15s ease;
}

.card-link:hover .card{
  transform: translateY(-2px);
  border-color: rgba(124,92,255,0.45);
  background: rgba(255,255,255,0.075);
}

.open-hint{
  margin-top: 12px;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
}

/* Layout for detail page */
.project-detail-head{
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 14px;
}

.detail-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 12px;
}

@media (max-width: 900px){
  .detail-grid{ grid-template-columns: 1fr; }
}

.video-wrap{
  margin-top: 14px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}

.project-video{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px; /* safe even with overflow hidden */
}

/* Toggle Section */
.video-toggle-section{
  margin-top: 20px;
}

.toggle-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.toggle-container{
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-label{
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}

/* Switch */
.switch{
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input{
  opacity: 0;
  width: 0;
  height: 0;
}

.slider{
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255,255,255,0.2);
  border-radius: 26px;
  transition: 0.3s;
}

.slider:before{
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .slider{
  background-color: rgba(124,92,255,0.6);
}

input:checked + .slider:before{
  transform: translateX(24px);
}

/* Hide video */
.hidden{
  display: none;
}

/* Status Message */
.status-message{
    margin: 10px 0 14px 0;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    transition: 0.3s ease;
}

/* No Anti-Cheat = Red Warning */
.status-noac{
    background: rgba(255, 60, 60, 0.15);
    border: 1px solid rgba(255, 60, 60, 0.35);
    color: rgba(255, 150, 150, 0.95);
}

/* With Anti-Cheat = Green Success */
.status-ac{
    background: rgba(50, 211, 162, 0.15);
    border: 1px solid rgba(50, 211, 162, 0.35);
    color: rgba(120, 255, 200, 0.95);
}

/* Project Thumbnail */
.project-thumbnail{
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.08);
}

.project-thumbnail img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

/* Subtle zoom on hover */
.card-link:hover .project-thumbnail img{
  transform: scale(1.05);
}