/* =========================================================
   Design tokens — monochrome, dua tema (dark default / light)
   ========================================================= */
:root,
html[data-theme="dark"] {
  --bg: #0A0A0B;
  --ink: #F5F5F5;
  --ink-muted: #8A8A8E;
  --border: rgba(255, 255, 255, 0.14);
  --border-soft: rgba(255, 255, 255, 0.08);

  --line: #FFFFFF;
  --terminal-text: #F5F5F5;
  --terminal-prompt: #6FD8B5;
  --terminal-check: #6FD8B5;

  --dot-grid: rgba(255, 255, 255, 0.16);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

html[data-theme="light"] {
  --bg: #FAFAF9;
  --ink: #14151A;
  --ink-muted: #6B6B70;
  --border: rgba(20, 21, 26, 0.14);
  --border-soft: rgba(20, 21, 26, 0.09);

  --line: #14151A;
  --terminal-text: #14151A;
  --terminal-prompt: #1F7A5C;
  --terminal-check: #1F7A5C;

  --dot-grid: rgba(20, 21, 26, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* =========================================================
   Background: subtle dot-grid, evokes network/server nodes
   ========================================================= */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dot-grid) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 40% 35%, #000 50%, transparent 85%);
  mask-image: radial-gradient(ellipse 80% 70% at 40% 35%, #000 50%, transparent 85%);
  pointer-events: none;
}

/* =========================================================
   Konten utama — dimulai dari atas (bukan center vertikal),
   supaya baris status terasa seperti posisi navbar
   ========================================================= */
.content-wrap {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  width: 100%;
  padding: clamp(1.75rem, 5vh, 3rem) clamp(1.1rem, 4vw, 3rem) clamp(2rem, 6vh, 4rem);
}

.page-inner {
  max-width: 1080px;
  width: 100%;
}

.panel {
  width: 100%;
}

.panel-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: clamp(10.75rem, 4vw, 2.75rem);
  padding-bottom: 1.1rem;
  border-bottom: 2px solid var(--border-soft);
  flex-wrap: wrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  box-shadow: 0 0 0 4px rgba(128, 128, 128, 0.18);
  flex: 0 0 auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
}

.server-clock {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* =========================================================
   Theme toggle
   ========================================================= */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--border-soft);
}

.theme-toggle .icon {
  flex: 0 0 auto;
}

html[data-theme="dark"] .icon-sun {
  display: none;
}

html[data-theme="dark"] .icon-moon {
  display: inline-block;
}

html[data-theme="light"] .icon-sun {
  display: inline-block;
}

html[data-theme="light"] .icon-moon {
  display: none;
}

@media (max-width: 400px) {
  .theme-toggle-label {
    display: none;
  }
}

/* =========================================================
   Layout — teks kiri, terminal kanan (stack di layar sempit)
   ========================================================= */
.layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
}

.layout-text {
  min-width: 0;
}

.layout-terminal {
  min-width: 0;
}

.heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 1.3rem + 2.4vw, 2.9rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  color: var(--ink);
}

.subheading {
  font-size: clamp(0.95rem, 0.4vw + 0.9rem, 1.05rem);
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 44ch;
  margin: 0 0 2rem;
}

/* =========================================================
   Terminal — the signature element (bordered, no fill)
   ========================================================= */
.terminal {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
}

.terminal-bar {
  display: flex;
  gap: 6px;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-soft);
}

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

.dot-red {
  background: #E5555A;
}

.dot-yellow {
  background: #E8B84B;
}

.dot-green {
  background: #4FBF83;
}

.terminal-body {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.9;
  color: var(--terminal-text);
  padding: 1.1rem 1.2rem 1.25rem;
  min-height: 180px;
}

.terminal-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-line .prompt {
  color: var(--terminal-prompt);
  margin-right: 0.4rem;
}

.terminal-line .check {
  color: var(--terminal-check);
  margin-left: 0.4rem;
}

.terminal-cursor {
  display: inline-block;
  width: 7px;
  height: 1em;
  background: var(--terminal-prompt);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

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

.progress-track {
  height: 2px;
  background: var(--border-soft);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--terminal-prompt), transparent);
  animation: sweep 1.8s ease-in-out infinite;
}

@keyframes sweep {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(320%);
  }
}

/* =========================================================
   Contact row
   ========================================================= */
.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--bg);
  background: var(--ink);
  padding: 0.6rem 1.15rem;
  border-radius: 6px;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.btn-contact:hover,
.btn-contact:focus-visible {
  opacity: 0.8;
}

.social-link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.social-link:hover,
.social-link:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
}

.footer-text {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin: 0.25rem 0 0;
}

/* Accessible focus ring for keyboard users */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {

  .progress-fill,
  .terminal-cursor {
    animation: none;
  }

  body {
    transition: none;
  }
}