*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #0a0a0f;
  color: #fff;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

#scene-container {
  position: fixed;
  inset: 0;
  z-index: 1;
}
#scene-container canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
#scene-container.blurred {
  filter: blur(16px);
  -webkit-filter: blur(16px);
}

.hint {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: 'XBAND Rough','Oswald','Impact',sans-serif;
  font-size: 28px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow:
    0 0 8px rgba(255,255,255,0.6),
    0 0 24px rgba(255,255,255,0.3),
    0 0 60px rgba(255,255,255,0.1);
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.hint.hidden { opacity: 0; }

#loading {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0a0a0f;
  transition: opacity 0.5s ease;
}
#loading.hidden { opacity: 0; pointer-events: none; }
#loading .spinner {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255,255,255,0.08);
  border-top-color: #a78bfa;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
#loading p {
  font-family: 'XBAND Rough','Oswald','Impact',sans-serif;
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-top: 20px;
}
.dots span { animation: pulse 1.2s ease-in-out infinite; opacity: 0.2; }
.dots span:nth-child(1) { animation-delay: 0s; }
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse { 0%,100% { opacity: 0.2; } 50% { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
.page-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  opacity: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(0, 0, 0, 0.45);
  transition: opacity 0.4s ease;
}
.page-overlay.active {
  pointer-events: auto;
  opacity: 1;
}

.page-overlay .back-btn {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 60;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  font-family: 'Inter', sans-serif;
}
.page-overlay .back-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.3);
  transform: scale(1.06);
}

/* ─── CMS content fetch status (shows while the API is loading) ── */
.page-items-loading {
  text-align: center;
  padding: 60px 20px;
  font-family: 'Highway Gothic', 'Oswald', 'Impact', sans-serif;
  font-size: 18px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}
.page-items-loading .pulse-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fb923c;
  margin-right: 10px;
  animation: pulse 0.9s ease-in-out infinite;
}
.page-items-loading.err { color: #ff6b6b; }
.page-items-loading button {
  margin-left: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
}
.page-items-loading button:hover { background: rgba(255,255,255,0.16); }

.page-overlay .page-inner {
  max-width: 1000px;
  width: 100%;
  padding: 200px 60px 80px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100vh;
}

.page-overlay .page-header {
  font-family: 'XBAND Rough','Oswald','Impact',sans-serif;
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 8px;
  color: #fb923c;
}
.page-overlay .page-sub {
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  color:#fb923c;
  margin-bottom: 40px;
}

/* ─── Cards ─── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 24px 22px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  cursor: pointer;
}
.card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-2px);
}
.card h3 {
  font-family: 'XBAND Rough','Oswald','Impact',sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.card p {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.6);
  font-weight: 300;
}
.card .tag {
  display: inline-block;
  font-family: 'XBAND Rough','Oswald','Impact',sans-serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(255,255,255,0.07);
  margin-top: 12px;
  color: rgba(255,255,255,0.45);
}
.card-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
  opacity: 0;
  margin-top: 0;
}
.card.expanded .card-detail {
  max-height: 600px;
  opacity: 1;
  margin-top: 18px;
}
.card-detail-inner {
  padding: 18px 0 0;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.card-detail-inner h4 {
  font-family: 'XBAND Rough','Oswald','Impact',sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: rgba(255,255,255,0.9);
}
.card-detail-inner p {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  font-weight: 300;
  margin-bottom: 10px;
}
.card-detail-inner .tag { margin-top: 10px; }

/* ─── About ─── */
.about-bio {
  max-width: 620px;
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255,255,255,0.65);
  font-weight: 300;
}
.about-bio strong { color: rgba(255,255,255,0.95); font-weight: 500; }
.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}
.skill-pills span {
  font-family: 'XBAND Rough','Oswald','Impact',sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 8px 20px;
  border-radius: 100px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.65);
}
.about-sections { margin-top: 40px; display: flex; flex-direction: column; gap: 36px; }
.about-section h2 {
  font-family: 'XBAND Rough','Oswald','Impact',sans-serif;
  font-size: 22px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #fb923c;
  margin-bottom: 18px;
}
.focus-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.focus-item {
  position: relative;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 22px 20px;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: default;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.08);
}
.focus-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.focus-item:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.12);
}
.focus-item:hover::before {
  background: linear-gradient(135deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.02) 50%);
}
.focus-icon { font-size: 28px; opacity: 0.3; display: block; margin-bottom: 10px; }
.focus-item h3 {
  font-family: 'XBAND Rough','Oswald','Impact',sans-serif;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.85);
}
.focus-item p { font-size: 14px; line-height: 1.6; color: rgb(255, 255, 255); font-weight: 300; }

.timeline-item {
  position: relative;
  display: flex;
  gap: 18px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  border-left: 2px solid rgba(255,255,255,0.10);
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: default;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.06);
}
.timeline-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 50%);
  pointer-events: none;
}
.timeline-item:hover {
  background: rgba(255,255,255,0.07);
  border-left-color: rgba(255,255,255,0.22);
  transform: translateX(4px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.10);
}
.timeline-item:hover::before {
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 50%);
}
.timeline-year {
  font-family: 'XBAND Rough','Oswald','Impact',sans-serif;
  font-size: 15px;
  letter-spacing: 2px;
  color: #60a5fa;
  white-space: nowrap;
  min-width: 72px;
}
.timeline-desc { font-size: 14px; line-height: 1.6; color: rgb(255, 255, 255); font-weight: 300; }

/* ─── News ─── */
.news-item { cursor: pointer; }
.news-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
  opacity: 0;
  margin-top: 0;
  width: 100%;
}
.news-item.expanded .news-detail {
  max-height: 2000px;
  opacity: 1;
  margin-top: 12px;
}
.news-detail p {
  font-family: 'Highway Gothic','Oswald','Impact',sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
  font-weight: 300;
  margin-bottom: 10px;
}
.news-detail .tag { margin-top: 8px; }
.news-detail .post-body img,
.news-detail .post-body video {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 12px;
  display: block;
}
.news-detail .post-body p {
  font-family: 'Highway Gothic','Oswald','Impact',sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
  font-weight: 300;
  margin-bottom: 10px;
}
.news-detail .post-body h2,
.news-detail .post-body h3,
.news-detail .post-body h4 {
  font-family: 'Highway Gothic','Oswald','Impact',sans-serif;
  color: rgba(255,255,255,0.95);
  line-height: 1.3;
  margin: 16px 0 8px;
}
.news-detail .post-body h2 { font-size: 18px; }
.news-detail .post-body h3 { font-size: 16px; }
.news-detail .post-body h4 { font-size: 15px; }

.news-list { display: flex; flex-direction: column; gap: 14px; }
.news-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 22px;
  background: #0d0e12;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  transition: all 0.3s ease;
}
.news-item:hover {
  background: #14161c;
  border-color: rgba(255,255,255,0.18);
}
.news-date {
  font-family: 'XBAND Rough','Oswald','Impact',sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  min-width: 80px;
  padding-top: 2px;
}
.news-body { flex: 1; min-width: 0; }
.news-title {
  font-family: 'Highway Gothic','Oswald','Impact',sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: rgba(255,255,255,0.95);
  line-height: 1.5;
  padding-left: 4px;
}
.news-title .hl { color: rgba(255,255,255,0.35); font-weight: 300; }

/* Accent-colored links inside expanded post bodies */
.accent-blue   .news-detail a { color: #60a5fa; }
.accent-green  .news-detail a { color: #4ade80; }
.accent-orange .news-detail a { color: #fb923c; }
.accent-purple .news-detail a { color: #a78bfa; }
.accent-neon    .news-detail a { color: #39ff14; }
.accent-cyan    .news-detail a { color: #22d3ee; }

/* ─── RAM ─── */
.accent-blue   .page-header { color: #60a5fa; }
.accent-green  .page-header { color: #4ade80; }
.accent-orange .page-header { color: #fb923c; }
.accent-purple .page-header { color: #a78bfa; }
.accent-neon    .page-header { color: #39ff14; }
.accent-cyan    .page-header { color: #22d3ee; }

.accent-blue   .card { border-color: rgba(96,165,250,0.1); }
.accent-green  .card { border-color: rgba(74,222,128,0.1); }
.accent-orange .card { border-color: rgba(251,146,60,0.1); }
.accent-purple .card { border-color: rgba(167,139,250,0.1); }
.accent-neon    .card { border-color: rgba(57,255,20,0.1); }
.accent-cyan    .card { border-color: rgba(34,211,238,0.1); }

.accent-blue   .card:hover { border-color: rgba(96,165,250,0.25); }
.accent-green  .card:hover { border-color: rgba(74,222,128,0.25); }
.accent-orange .card:hover { border-color: rgba(251,146,60,0.25); }
.accent-purple .card:hover { border-color: rgba(167,139,250,0.25); }
.accent-neon    .card:hover { border-color: rgba(57,255,20,0.25); }
.accent-cyan    .card:hover { border-color: rgba(34,211,238,0.25); }

@media (max-width: 600px) {
  .page-overlay .page-inner { padding: 140px 24px 60px; }
  .page-overlay .back-btn { top: 14px; left: 14px; width: 38px; height: 38px; font-size: 16px; }
  .card-grid { grid-template-columns: 1fr; }
  .news-item { flex-direction: column; gap: 4px; }
}
.page-overlay::-webkit-scrollbar { width: 4px; }
.page-overlay::-webkit-scrollbar-track { background: transparent; }
.page-overlay::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

/* ─── Watermark ─── */
#watermark {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 100;
  pointer-events: none;
  max-width: 450px;
  height: auto;
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.4)) drop-shadow(0 0 24px rgba(255,255,255,0.15)) drop-shadow(0 0 6px rgba(251,146,60,0.3)) drop-shadow(0 0 20px rgba(251,146,60,0.1));
  transition: opacity 0.1s ease;
}
#watermark.fading {
  opacity: 0;
}
#watermark.at-header {
  bottom: auto;
  top: 24px;
  right: 24px;
}
@media (max-width: 768px) {
  .hint {
    top: 80px;
  }
  #watermark {
    bottom: 16px;
    right: 16px;
    max-width: 200px;
  }
  #watermark.at-header {
    bottom: auto;
    top: 16px;
    right: 16px;
    max-width: 160px;
  }
}

.page-items {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.page-items h2 {
  font-family: 'XBAND Rough','Oswald','Impact',sans-serif;
  font-size: 18px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0.6;
}
.pitem {
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 6px;
}
.pitem h3 { font-size: 14px; margin-bottom: 2px; }
.pitem a { color: inherit; opacity: 0.7; font-size: 13px; }
.pitem p { font-size: 13px; opacity: 0.7; }
.pitem .pimeta { font-size: 11px; opacity: 0.4; margin-top: 4px; }

/* Accessible, crawler-visible but visually hidden text (e.g. homepage h1) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
