/* =========================================================
   TOKENS
========================================================= */
:root {
  --ink: #0f1115;
  --ink-2: #161923;
  --ink-3: #1e222f;
  --paper: #ece8de;
  --muted: #8b92a5;
  --signal: #e8a33d;
  --signal-dim: #6b5230;
  --ok: #7fe7a3;
  --warn: #e8a33d;
  --border: #262b39;

  --font-display: "JetBrains Mono", ui-monospace, monospace;
  --font-body: "Inter", system-ui, sans-serif;

  --max: 1040px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.01em;
}

.accent {
  color: var(--signal);
}

/* subtle scanline texture over the whole page */
.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.012) 0px,
    rgba(255, 255, 255, 0.012) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* =========================================================
   STATUS DOTS
========================================================= */
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
}
.dot--ok {
  background: var(--ok);
  box-shadow: 0 0 6px rgba(127, 231, 163, 0.7);
}
.dot--warn {
  background: var(--warn);
  box-shadow: 0 0 6px rgba(232, 163, 61, 0.6);
}

/* =========================================================
   NAV
========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(15, 17, 21, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--paper);
}
.nav__menu {
  display: flex;
  gap: 28px;
}
.nav__menu a {
  font-family: var(--font-display);
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}
.nav__menu a:hover,
.nav__menu a:focus-visible {
  color: var(--signal);
}
.nav__menu .idx {
  font-size: 0.7rem;
  color: var(--signal-dim);
}
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav__toggle span {
  width: 20px;
  height: 2px;
  background: var(--paper);
  display: block;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* =========================================================
   HERO
========================================================= */
.hero {
  position: relative;
  padding: 72px 24px 96px;
  overflow: hidden;
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232, 163, 61, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 163, 61, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 20%, black, transparent);
}
.hero__inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 40px;
}

/* fake terminal */
.terminal {
  background: var(--ink-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  max-width: 560px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--ink-3);
  border-bottom: 1px solid var(--border);
}
.tb-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.tb-red {
  background: #e5645a;
}
.tb-yellow {
  background: #e6b450;
}
.tb-green {
  background: #7fe7a3;
}
.terminal__path {
  margin-left: 8px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--muted);
}
.terminal__body {
  padding: 20px 18px 24px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  min-height: 190px;
}
.terminal__body p {
  margin: 0 0 10px;
}
.prompt {
  color: var(--signal);
  margin-right: 8px;
}
.out {
  color: var(--paper);
  padding-left: 22px;
  min-height: 1.4em;
}
.line-cursor {
  margin-top: 4px;
}
.cursor {
  display: inline-block;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero__meta {
  max-width: 560px;
}
.eyebrow {
  font-family: var(--font-display);
  color: var(--paper);
  font-size: 1.15rem;
  line-height: 1.5;
  margin: 0 0 20px;
}
.status-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
}
.status {
  font-size: 0.85rem;
  color: var(--paper);
  display: flex;
  align-items: center;
}
.status--muted {
  color: var(--muted);
  padding-left: 20px;
}

.hero__cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-display);
  font-size: 0.8rem;
  padding: 12px 22px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  border: 1px solid transparent;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
  cursor: pointer;
}
.btn--solid {
  background: var(--signal);
  color: #1a1204;
  font-weight: 700;
}
.btn--solid:hover {
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--border);
}
.btn--ghost:hover {
  border-color: var(--signal);
  color: var(--signal);
}

/* =========================================================
   SECTIONS (shared)
========================================================= */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 88px 24px;
  border-top: 1px solid var(--border);
}
.section__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 40px;
}
.idx--lg {
  font-family: var(--font-display);
  color: var(--signal-dim);
  font-size: 0.9rem;
}
.section h2 {
  font-size: 1.6rem;
  color: var(--paper);
}

/* ABOUT */
.about__grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}
.about__photo-wrap {
  aspect-ratio: 1 / 1;
  border-radius: 100%;
  overflow: hidden;
  border: 5px solid var(--signal);
  background: var(--ink-2);
  transition: border-color 0.5s ease-in-out;
}
.about__photo-wrap:hover {
  border-color: var(--border);
  cursor: pointer;
}
.about__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.5s ease-in-out;
  filter: grayscale(100);
}
.about__photo:hover {
  filter: grayscale(0);
}
.about__text {
  display: grid;
  gap: 20px;
}
.about__lead {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--paper);
  margin: 0;
  line-height: 1.5;
}
.about__body {
  color: var(--muted);
  margin: 0;
  font-size: 1rem;
}

/* STACK — process list */
.proc {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.proc__row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  align-items: center;
}
.proc__row:last-child {
  border-bottom: none;
}
.proc__row--head {
  font-family: var(--font-display);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--ink-2);
}
.proc__row:not(.proc__row--head):hover {
  background: var(--ink-2);
}
.proc__name {
  font-family: var(--font-display);
  color: var(--paper);
}
.proc__tag {
  color: var(--muted);
}
.proc__status {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--paper);
  display: flex;
  align-items: center;
}

.deploys {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 2px 12px;
  cursor: grab;
}
.deploys::-webkit-scrollbar {
  display: none;
}
.deploys.is-hovering {
  scroll-snap-type: none;
}
.deploys.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}
.deploys.is-dragging .deploy {
  pointer-events: none;
}

.carousel__dots {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.carousel__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  padding: 0;
  cursor: pointer;
  opacity: 0.6;
  transition:
    background 0.15s ease,
    width 0.15s ease,
    height 0.15s ease,
    opacity 0.15s ease;
}
.carousel__dot:hover {
  background: var(--signal-dim);
}
.carousel__dot[data-distance="1"] {
  width: 8px;
  height: 8px;
  opacity: 0.8;
}
.carousel__dot[data-distance="0"],
.carousel__dot.is-active {
  width: 11px;
  height: 11px;
  background: var(--signal);
  opacity: 1;
}

/* WORK — deploy cards */
.deploy {
  background: var(--ink-2);
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
  flex: 0 0 300px;
  scroll-snap-align: start;
}
.deploy:hover {
  border-color: var(--signal-dim);
  transform: translateY(-2px);
}
.deploy__company {
  font-family: var(--font-display);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--signal-dim);
}
.deploy__body {
  padding: 20px;
  gap: 14px;
  display: flex;
  flex-direction: column;
}
.deploy__body h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--paper);
}
.deploy__desc {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

.deploy__toggle {
  margin-top: auto;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--signal);
  cursor: pointer;
}
.deploy__toggle:hover .deploy__toggle-label {
  text-decoration: underline;
}
.deploy__toggle-icon {
  display: inline-block;
  transition: transform 0.25s ease;
}
.deploy.is-open .deploy__toggle-icon {
  transform: rotate(180deg);
}

.deploy__full-inner {
  max-height: 4.8em; /* ~3 baris pada line-height 1.6 */
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.deploy.is-open .deploy__full-inner {
  max-height: 400px;
}

@media (prefers-reduced-motion: reduce) {
  .deploy__full-inner {
    transition: none;
  }
  .deploy__toggle-icon {
    transition: none;
  }
}

/* ---- Stack tag list: auto-scroll infinite kalau overflow ---- */
.deploy__stack {
  list-style: none;
  display: flex;
  overflow-x: scroll;
  gap: 8px;
  padding: 0;
  margin: 12px 0 0;
  -webkit-mask-image: none;
  mask-image: none;
}
.deploy__stack::-webkit-scrollbar {
  display: none;
}
.deploy__stack li {
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 4px;
  text-wrap: nowrap;
  flex-shrink: 0;
}

/* Dipasang lewat JS (initStackMarquee) — scroll infinite di-drive oleh JS (scrollLeft),
   bukan CSS animation, supaya konsisten dengan teknik infinite loop di carousel proyek */
.deploy__stack.is-marquee {
  cursor: default;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    black 24px,
    black calc(100% - 24px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    black 24px,
    black calc(100% - 24px),
    transparent 100%
  );
}

.deploy__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.deploys__empty {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.85rem;
  grid-column: 1 / -1;
}

/* CONTACT */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact__lead {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--paper);
  line-height: 1.5;
  margin: 0 0 24px;
}
.contact__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact__links a {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
}
.contact__links a:hover {
  color: var(--signal);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--muted);
}
.field input,
.field textarea {
  background: var(--ink-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.92rem;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--signal);
  outline: none;
}
.form__status {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--ok);
  min-height: 1.2em;
  margin: 0;
}

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px 40px;
  text-align: center;
}
.footer p {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 760px) {
  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ink-2);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav__menu.is-open {
    display: flex;
  }
  .nav__toggle {
    display: flex;
  }

  .about__grid {
    grid-template-columns: 1fr;
  }
  .about__photo-wrap {
    max-width: 160px;
  }
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .carousel__dots {
    display: flex;
  }

  .deploy {
    flex-basis: 78vw;
  }

  .section {
    padding: 64px 20px;
  }
  .hero {
    padding: 48px 20px 64px;
  }
}
