/* =========================================================
   ICTSMANSAWI — style.css (versi final)
   Palette: navy #060B1F | blue #155EEF | cyan #22D3EE
            white #FFFFFF | ice #F0F6FF | slate #4B5A73
   ========================================================= */

:root {
  --navy: #060B1F;
  --navy-2: #0B1638;
  --blue: #155EEF;
  --blue-2: #3B82F6;
  --cyan: #22D3EE;
  --white: #FFFFFF;
  --ice: #F0F6FF;
  --slate: #4B5A73;
  --slate-light: #93A5C4;
  --border: rgba(21,94,239,0.14);
  --radius: 18px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  max-width: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--slate-light);
  background-color: #060814;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.045) 1px, transparent 1px),
    radial-gradient(ellipse 60% 40% at 12% 0%, rgba(21,94,239,0.30), transparent 60%),
    radial-gradient(ellipse 50% 40% at 92% 12%, rgba(34,211,238,0.16), transparent 55%),
    radial-gradient(ellipse 55% 45% at 15% 55%, rgba(21,94,239,0.18), transparent 60%),
    radial-gradient(ellipse 60% 45% at 90% 78%, rgba(34,211,238,0.14), transparent 60%),
    linear-gradient(180deg, #060814 0%, #0B1638 45%, #081029 100%);
  background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
  background-size: 26px 26px, cover, cover, cover, cover, cover;
  background-attachment: fixed, fixed, fixed, fixed, fixed, fixed;
  overflow-x: hidden;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(6,11,31,0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background .3s ease, box-shadow .3s ease;
}

.navbar.scrolled {
  background: rgba(6,11,31,0.85);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.5px;
}

.logo.small {
  font-size: 1rem;
}

.logo-bracket {
  color: var(--cyan);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--slate-light);
  position: relative;
  padding: 4px 0;
  transition: color .25s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: width .3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.burger span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: .3s ease;
}

.burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger.open span:nth-child(2) {
  opacity: 0;
}
.burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  max-height: 900px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  overflow: hidden;
}

@media (max-width: 760px) {
  .hero {
    height: auto;
    min-height: 100vh;
    max-height: none;
    padding: 110px 0 60px;
  }
}

#circuitCanvas,
#circuitCanvas2 {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.35;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
}

.glow-a {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(21,94,239,0.32), transparent 72%);
  top: -180px;
  left: -140px;
}

.glow-b {
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(34,211,238,0.24), transparent 72%);
  bottom: -160px;
  right: -100px;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 24px;
  display: flex;
  justify-content: center;
}

.terminal-window {
  width: 100%;
  max-width: 720px;
  background: rgba(11,22,56,0.75);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(34,211,238,0.05);
  backdrop-filter: blur(8px);
  overflow: hidden;
  animation: floatUp 1s ease both;
}

@keyframes floatUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot.red {
  background: #ff5f57;
}
.dot.yellow {
  background: #febc2e;
}
.dot.green {
  background: #28c840;
}

.terminal-title {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--slate-light);
}

.terminal-body {
  padding: 36px 30px 40px;
}

.term-line {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 600;
  color: var(--white);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.prompt {
  color: var(--cyan);
}

.typed {
  background: linear-gradient(90deg, var(--cyan), var(--blue-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cursor {
  color: var(--cyan);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.term-sub {
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: 1.02rem;
  color: var(--slate-light);
  min-height: 1.6em;
}

.hero-buttons {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.btn-primary {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  color: var(--navy);
  box-shadow: 0 8px 24px rgba(21,94,239,0.35);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(34,211,238,0.4);
}

.btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--white);
  border-color: rgba(255,255,255,0.18);
}

.btn-ghost:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
  background: rgba(34,211,238,0.08);
}

.scroll-indicator {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 14px;
  z-index: 2;
}

.scroll-indicator span {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: var(--cyan);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollDown 1.6s ease infinite;
}

@keyframes scrollDown {
  0% {
    opacity: 1;
    top: 6px;
  }
  70% {
    opacity: 0;
    top: 20px;
  }
  100% {
    opacity: 0;
    top: 6px;
  }
}

/* ---------- SECTION SHARED ---------- */
.section {
  position: relative;
  padding: 110px 0;
  background: transparent;
}

.section-alt {
  background: transparent;
}

.section-dark {
  position: relative;
  background: transparent;
  color: var(--slate-light);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cyan);
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.eyebrow-light {
  color: var(--cyan);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}

.section-title.light {
  color: var(--white);
}

.section-desc {
  max-width: 620px;
  font-size: 1.05rem;
  color: var(--slate-light);
  margin-bottom: 50px;
}

.section-dark .section-desc {
  color: var(--slate-light);
}

/* ---------- MATERI CARDS ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 980px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(2,6,23,0.35);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
  opacity: 0;
  transform: translateY(24px);
}

.card.reveal {
  opacity: 1;
  transform: translateY(0);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .35s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 45px rgba(21,94,239,0.18);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--navy);
  margin: 8px 0 10px;
}

.card p {
  font-size: 0.94rem;
  color: var(--slate);
}

/* ---------- DOKUMENTASI / GALLERY (diperbaiki) ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--white);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item .placeholder {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: repeating-linear-gradient(135deg, rgba(21,94,239,0.05) 0 12px, rgba(21,94,239,0.09) 12px 24px);
  border: 2px dashed rgba(21,94,239,0.35);
  border-radius: 16px;
}

.gallery-item.no-image .placeholder {
  display: flex;
}

.gallery-item .placeholder svg {
  width: 34px;
  height: 34px;
}

.gallery-item .placeholder span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--blue);
}

.gallery-item.no-image {
  cursor: default;
}

.gallery-item.no-image .gallery-overlay {
  display: none;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(6,11,31,0) 40%, rgba(6,11,31,0.75) 100%);
  opacity: 0;
  transition: opacity .3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay span {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.5);
  padding: 8px 18px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(4px);
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(3,6,22,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 40px;
  opacity: 0;
  transition: opacity .25s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  transition: .2s ease;
}

.lightbox-close:hover {
  background: var(--cyan);
  color: var(--navy);
  border-color: var(--cyan);
}

/* ---------- ABOUT (diperbaiki) ---------- */
.about-wrap {
  position: relative;
  z-index: 2;
}

.comment-block {
  font-family: var(--font-mono);
  font-size: 0.98rem;
  line-height: 1.9;
  color: var(--slate-light);
  background: rgba(255,255,255,0.03);
  border-left: 2px solid var(--cyan);
  padding: 22px 26px;
  border-radius: 0 12px 12px 0;
  max-width: 760px;
  margin: 0 auto;
}

.comment-block .cmt {
  color: var(--cyan);
  opacity: 0.7;
}

.stat-row {
  display: flex;
  gap: 50px;
  margin-top: 44px;
  flex-wrap: wrap;
  justify-content: center;
}

.stat {
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(90deg, var(--cyan), var(--blue-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--slate-light);
}

/* ---------- QUIZ ---------- */
.quiz-box {
  max-width: 680px;
  background: var(--ice);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: 0 25px 60px rgba(2,6,23,0.4);
}

.quiz-progress {
  height: 6px;
  background: rgba(21,94,239,0.12);
  border-radius: 6px;
  margin-bottom: 26px;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: width .4s ease;
}

.quiz-question-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--blue);
  margin-bottom: 8px;
}

.quiz-question {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 20px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-option {
  text-align: left;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.96rem;
  color: var(--slate);
  cursor: pointer;
  transition: .2s ease;
}

.quiz-option:hover {
  border-color: var(--blue);
  background: #fff;
}

.quiz-option.correct {
  border-color: #22c55e;
  background: rgba(34,197,94,0.08);
  color: #15803d;
  font-weight: 600;
}

.quiz-option.wrong {
  border-color: #ef4444;
  background: rgba(239,68,68,0.08);
  color: #b91c1c;
  font-weight: 600;
}

.quiz-option[disabled] {
  cursor: default;
}

.quiz-next {
  margin-top: 24px;
}

.quiz-result {
  text-align: center;
  padding: 20px 0;
}

.quiz-result h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--navy);
  margin-bottom: 8px;
}

.quiz-result p {
  margin-bottom: 24px;
}

/* ---------- GAME ---------- */
.game-box {
  max-width: 680px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 25px 60px rgba(2,6,23,0.4);
}

.game-hud {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--navy);
}

.hud-item span {
  color: var(--blue);
  font-weight: 700;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.game-cell {
  aspect-ratio: 1;
  background: var(--ice);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  border: 1.5px solid var(--border);
  transition: transform .1s ease, background .15s ease;
}

.game-cell.active {
  background: rgba(21,94,239,0.08);
  transform: scale(1.05);
}

.game-cell:active {
  transform: scale(0.92);
}

.game-msg {
  font-size: 0.92rem;
  color: var(--slate);
  text-align: center;
}

/* ---------- CONTACTS (diperbaiki) ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.contact-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: .3s ease;
}

.contact-card:hover {
  transform: translateY(-6px);
  border-color: var(--cyan);
  background: rgba(34,211,238,0.05);
}

.contact-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
}

.contact-card h3 {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.contact-card p {
  font-size: 0.92rem;
  color: var(--slate-light);
}

.contact-number {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--cyan);
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: rgba(34,211,238,0.12);
  color: var(--cyan);
  padding: 3px 8px;
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ---------- FOOTER ---------- */
.footer {
  background: transparent;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 36px 0;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer p {
  font-size: 0.85rem;
  color: var(--slate-light);
}

/* ---------- RESPONSIVE NAV ---------- */
@media (max-width: 820px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(6,11,31,0.97);
    flex-direction: column;
    align-items: center;
    padding: 26px 0;
    gap: 20px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: .3s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .burger {
    display: flex;
  }
}