/* ==========================================================================
   style.css — Gaya khusus halaman Home
   Dimuat terakhir. Berisi hero, penyesuaian tiap section, dan pengaman layout.
   ========================================================================== */

/* ---- Hero ---- */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.4;
  -webkit-mask-image: radial-gradient(
    ellipse 70% 80% at 30% 40%,
    #000 0%,
    transparent 72%
  );
  mask-image: radial-gradient(
    ellipse 70% 80% at 30% 40%,
    #000 0%,
    transparent 72%
  );
  pointer-events: none;
}

.hero__title {
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: var(--lh-display);
  letter-spacing: -0.035em;
}

.hero__title span {
  display: block;
}

.hero__statement {
  max-width: 46ch;
  color: var(--text-secondary);
  font-size: var(--fs-body-lg);
  line-height: 1.6;
}

.ambient {
  width: 100%;
  max-width: 520px;
  justify-self: end;
}

.ambient__focus {
  margin-top: var(--space-1);
}

@media (max-width: 1023px) {
  .ambient {
    justify-self: start;
  }
}

/* ---- Section head ---- */
.section-sub {
  max-width: 56ch;
  color: var(--text-secondary);
  font-size: var(--fs-body-lg);
}

/* ---- Selected Work: tautan "lihat semua" (Phase 3.2) ---- */
.section-cta {
  margin-top: var(--space-7);
}

/* ---- About ---- */
.about-body > * + * {
  margin-top: var(--space-4);
}

.about-body__lead {
  max-width: 56ch;
  color: var(--text-secondary);
  font-size: var(--fs-body-lg);
}

.about-body .meta-list {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

/* ---- Capabilities: menyambung About tanpa jarak ganda ---- */
#capabilities {
  padding-top: 0;
}

/* ---- Ecosystem ---- */
.eco-panel h3 {
  color: var(--text);
}

/* ---- Contact ---- */
.contact-tile__value {
  align-self: flex-start;
}

.contact .btn {
  min-width: 200px;
}

/* ---- Contact form (FINAL QA item #4 — Send Message) ---- */
.contact-form {
  max-width: 480px;
  margin-inline: auto;
  margin-top: var(--space-7);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-align: left;
}

.contact-form__field {
  display: block;
}

.contact-form__field > .meta {
  display: block;
  margin-bottom: var(--space-2);
}

.contact-form__field input,
.contact-form__field textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--text);
  font: inherit;
  transition: border-color var(--dur-fast) var(--ease);
}

.contact-form__field textarea {
  min-height: auto;
  resize: vertical;
  line-height: var(--lh-body);
}

.contact-form__field input:focus-visible,
.contact-form__field textarea:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
  border-color: var(--accent);
}

.contact-form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form__notice {
  max-width: 480px;
  margin-inline: auto;
  margin-bottom: var(--space-5);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--fs-small);
}

.contact-form__notice--success {
  border-color: var(--success);
  color: var(--success);
}

.contact-form__notice--error {
  border-color: var(--error);
  color: var(--error);
}

/* ---- Footer ---- */
.footer-copy {
  margin-bottom: 0;
}

/* ---- Pengaman: tidak ada horizontal scroll ---- */
.hero__content,
.about-body,
.card,
.eco-panel,
.contact-tile {
  min-width: 0;
}

.hero__title,
.project-card__title,
.contact-tile__label,
.contact-tile__value {
  overflow-wrap: anywhere;
}

/* ==========================================================================
   Phase 3.2 — Work index & Project detail
   ========================================================================== */

/* ---- Judul halaman (Work "Selected Work", Project detail title, 404) ---- */
.page-title {
  font-size: var(--fs-h1);
  font-weight: 600;
  line-height: var(--lh-heading);
  letter-spacing: -0.03em;
}

/* ---- Hero kecil (work.php) ---- */
.page-hero__subtitle {
  margin-top: var(--space-3);
  max-width: 56ch;
  color: var(--text-secondary);
  font-size: var(--fs-body-lg);
}

/* ---- Hero project detail (project.php via includes/project-header.php) ---- */
.project-hero__category {
  margin-bottom: var(--space-3);
}

.project-hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
}

.project-hero__summary {
  margin-top: var(--space-4);
  max-width: 65ch;
  color: var(--text-secondary);
  font-size: var(--fs-body-lg);
}

/* ---- 404 project.php ---- */
.notfound {
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
}

.notfound > * + * {
  margin-top: var(--space-4);
}

.notfound .btn {
  margin-top: var(--space-6);
}

/* ==========================================================================
   PHASE 5.3 — Project Gallery + Lightbox + Documentation attachments
   Scoped to .gallery-*/.attachment-list/.lightbox-overlay only — no
   existing selector touched, no layout/routing/SEO change.
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.gallery-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.gallery-item__link {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  aspect-ratio: 4 / 3;
  background: var(--card);
  transition: border-color var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease);
}

.gallery-item__link:hover,
.gallery-item__link:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow-soft);
}

.gallery-item__link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-fast) var(--ease);
}

.gallery-item__link:hover img {
  transform: scale(1.03);
}

.gallery-item__caption {
  line-height: 1.5;
}

.attachment-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.attachment-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
}

.attachment-list__type {
  flex: none;
}

/* ---- Lightbox overlay (injected by assets/js/lightbox.js) ---- */
html.lightbox-open {
  overflow: hidden;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: rgba(6, 7, 9, 0.92);
}

.lightbox-overlay__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  max-width: min(90vw, 1100px);
  max-height: 90vh;
}

.lightbox-overlay__img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: var(--radius-md);
  object-fit: contain;
}

.lightbox-overlay__caption {
  color: var(--text-secondary);
  font-size: var(--fs-small);
  text-align: center;
}

.lightbox-overlay__caption[hidden] {
  display: none;
}

.lightbox-overlay__close,
.lightbox-overlay__nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
}

.lightbox-overlay__close {
  top: var(--space-4);
  right: var(--space-4);
}

.lightbox-overlay__nav--prev {
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-overlay__nav--next {
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-overlay__close:hover,
.lightbox-overlay__nav:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
}

/* ---- Mobile ---- */
@media (max-width: 767px) {
  .hero__statement,
  .section-sub,
  .about-body__lead,
  .page-hero__subtitle,
  .project-hero__summary {
    font-size: var(--fs-body);
  }

  .contact .btn {
    width: 100%;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .lightbox-overlay {
    padding: var(--space-4);
  }

  .lightbox-overlay__nav {
    width: 36px;
    height: 36px;
  }
}

/* ==========================================================================
   PHASE 5.3 follow-up — Profile Photo di section About
   ========================================================================== */
.photo-placeholder__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}