/* Mobile layout overrides: phones up to 640px. */
.container { padding-inline: 20px; }
.section { padding-block: 44px; }
.section-header { margin-bottom: 18px; }
.section-title { font-size: clamp(1.5rem, 6.4vw, 1.75rem); text-align: left; }
.section-subtitle { font-size: 0.9rem; }

.btn, .btn-watch, .filter-pill, .lang-switch, .menu-btn, .modal-close,
.footer-top-btn, .footer-change-view, .contact-btn-card { min-height: 44px; }

/* Mobile menu remains full-screen. */
.navbar { justify-content: space-between; }
.menu-btn { display: inline-flex; align-items: center; justify-content: center; }
.nav-panel {
  position: fixed; top: var(--header-h); left: 0; right: 0; margin: 0;
  height: calc(100dvh - var(--header-h)); background-color: var(--bg);
  border-top: 1px solid var(--line); padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  display: none; overflow-y: auto; z-index: 150;
}
.nav-panel.is-open { display: block; }
.nav-links { flex-direction: column; align-items: stretch; gap: 0.25rem; }
.nav-link { padding: 0.9rem 0.25rem; border-bottom: 1px solid var(--line); font-size: 22px; font-weight: 600; color: var(--text); }

/* Beranda: centered single column with photo first. */
.hero { padding-top: 24px; padding-bottom: 40px; }
.hero-layout { display: flex; flex-direction: column; align-items: center; gap: 0; text-align: center; }
.hero-content { display: contents; }
.hero-preview { order: 0; display: block; width: clamp(180px, 52vw, 220px); max-width: none; margin: 0 0 20px; }
.hero-photo-raw { width: 100%; max-width: none; aspect-ratio: 2582 / 3703; border: 0; border-radius: 0; margin: 0; }
.hero-label { order: 1; color: var(--accent); font-size: 0.8rem; line-height: 1.4; margin-bottom: 8px; }
.hero-title { order: 2; width: 100%; font-size: clamp(1.9rem, 8.4vw, 2.4rem); line-height: 1.08; margin-bottom: 12px; overflow-wrap: break-word; }
.hero-statement { order: 3; font-size: 1.05rem; line-height: 1.42; margin-bottom: 12px; }
.hero-desc { order: 4; max-width: 36ch; font-size: 15px; line-height: 1.6; margin: 0 auto 24px; color: var(--muted); }
.hero-buttons { order: 5; display: flex; flex-direction: column; width: 100%; gap: 12px; }
.hero-buttons .btn { width: 100%; min-height: 44px; font-size: 0.9rem; }
.hero-facts { order: 6; width: 100%; margin-top: 28px; padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: center; }
.fact-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-width: 0; padding: 14px 8px; text-align: center; }
.fact-item:nth-child(2), .fact-item:nth-child(3) { border-left: 1px solid var(--line); }
.fact-item:last-child { border-right: 0; margin: 0; }
.fact-number { display: block; font-size: 1.5rem; line-height: 1.25; }
.fact-text { font-size: 0.74rem; line-height: 1.35; overflow-wrap: anywhere; }

/* Tools strip. */
.tools-strip-inner { flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.tools-strip-label, .tools-strip-list { font-size: 14px; text-align: center; }
.tools-strip-list { line-height: 1.6; }

/* Project filter and swipe carousel. */
.filter-bar { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; padding: 0 24px 4px 0; margin-bottom: 22px; -webkit-mask-image: linear-gradient(to right, #000 85%, transparent 100%); mask-image: linear-gradient(to right, #000 85%, transparent 100%); }
.filter-bar::-webkit-scrollbar, .works-grid::-webkit-scrollbar { display: none; }
.filter-pill { scroll-snap-align: start; min-height: 40px; padding: 0.4rem 0.8rem; font-size: 0.84rem; }
.works-grid { display: flex; flex-wrap: nowrap; align-items: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scrollbar-width: none; -ms-overflow-style: none; margin-inline: -20px; padding: 0 20px 4px; scroll-padding-inline: 20px; }
.work-card { flex: 0 0 clamp(176px, 50vw, 208px); scroll-snap-align: start; display: flex; flex-direction: column; gap: 12px; padding: 0.7rem; margin: 0; max-height: 680px; border-radius: 14px; }
.works-grid .work-card.reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
.work-thumb-box { width: 100%; max-width: none; margin: 0; border-radius: 10px; flex-shrink: 0; }
.work-meta-top { flex-wrap: wrap; margin-bottom: 0.2rem; min-width: 0; }
.work-category { font-size: 0.72rem; }
.work-title { font-size: 0.95rem; line-height: 1.25; margin-bottom: 0.3rem; min-width: 0; overflow-wrap: break-word; }
.work-desc { font-size: 0.78rem; line-height: 1.4; margin-bottom: 0.2rem; min-width: 0; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.work-details { margin-top: auto; margin-bottom: 0; padding-top: 0.5rem; gap: 0.25rem; font-size: 0.74rem; }
.detail-line { grid-template-columns: 1fr; gap: 0.1rem; }
.btn-watch { width: 100%; min-height: 44px; padding: 0.5rem 0.6rem; font-size: 0.8rem; flex-shrink: 0; }
.works-dots { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 10px; }
.works-dot { width: 6px; height: 6px; border-radius: 50%; background-color: var(--line2); padding: 0; border: 0; cursor: pointer; transition: background-color 0.2s var(--ease-out), transform 0.2s var(--ease-out); }
.works-dot.is-active { background-color: var(--accent); }

/* Video modal. */
.modal { padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.modal-dialog { width: min(92vw, calc(85dvh * 9 / 16)); max-width: 100%; padding: 0.75rem; }
.modal-close { padding: 0.5rem 1rem; font-size: 0.9rem; }
.modal-video-box { max-height: none; }

/* Process list. */
.process-grid { display: grid; grid-template-columns: 1fr; }
.process-step { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; padding: 16px 0; border: 0 !important; border-top: 1px solid var(--line) !important; }
.process-step + .process-step { border-top: 1px solid var(--line) !important; }
.process-num { grid-column: 1; grid-row: span 2; color: var(--accent); font-size: 1.6rem; }
.process-step-title { grid-column: 2; font-size: 1rem; }
.process-step-desc { grid-column: 2; color: var(--muted); font-size: 15px; }

/* About and resume. */
.about-top { grid-template-columns: 1fr; padding: 20px; gap: 24px; margin-bottom: 24px; }
.about-photo-frame-wrap { max-width: 200px; margin-inline: auto; }
.photo-frame-offset { display: block; border: 1px solid var(--accent); transform: translate(6px, 6px); }
.about-photo-box { max-width: 200px; border: 1px solid var(--accent); }
.about-story { text-align: left; }
.about-name { font-size: 1.3rem; }
.about-bio { font-size: 15px; line-height: 1.6; margin-bottom: 20px; }
.skills-list { gap: 8px; }
.skill-tag { font-size: 0.78rem; }
.resume-grid { grid-template-columns: 1fr; gap: 12px; }
.resume-card { padding: 16px; }
.resume-card-header h3 { font-size: 1.05rem; }
.resume-list li { font-size: 0.88rem; }

/* Contact rows without a containing card. */
.contact-panel { background: transparent; border: 0; padding: 0; border-radius: 0; }
.contact-header { text-align: center; margin-bottom: 20px; }
.contact-eyebrow { display: inline-block; color: var(--accent); background: none; border: 0; padding: 0; font-size: 0.8rem; }
.contact-subtitle { font-size: 15px; }
.contact-grid { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.contact-btn-card { display: flex; align-items: center; gap: 14px; min-height: 56px; height: auto; padding: 14px 4px; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; transform: none; }
.contact-btn-card:active { transform: none; }
.contact-icon-box { width: 28px; height: 28px; flex: 0 0 28px; background: none; border: 0; color: var(--accent); }
.contact-icon-box svg { width: 22px; height: 22px; color: var(--accent); }
.contact-btn-label { font-size: 0.74rem; color: var(--muted); }
.contact-btn-value { font-size: clamp(14px, 4.2vw, 16px); overflow-wrap: anywhere; word-break: break-word; }
.contact-btn-arrow { display: inline-flex; color: var(--muted); }
.contact-cv-bar { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 24px; padding: 0; background: none; border: 0; text-align: center; }
.contact-cv-btn { width: 100%; }

/* Footer. */
.site-footer { padding-top: 24px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.footer-inner { flex-direction: column; align-items: center; text-align: center; }
.footer-view-switcher { justify-content: center; }
.view-mode-btn, .view-switcher-label, .view-dot-sep { font-size: 0.74rem; }
.footer-copy { font-size: 0.8rem; }
.footer-tagline { font-size: 0.76rem; }

/* Requested mobile refinements. */
.hero-facts { align-items: stretch; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact-item { justify-content: center; align-items: center; min-height: 72px; padding: 12px 8px; text-align: center; text-wrap: balance; border: 0; }
.fact-item:nth-child(2), .fact-item:nth-child(3) { border-left: 1px solid var(--line); }
.fact-item:last-child { margin: 0; border-right: 0; }
.fact-number { font-size: 1.5rem; line-height: 1; margin-bottom: 4px; }
.fact-text { font-size: 0.78rem; line-height: 1.3; }

.work-card { flex-basis: clamp(208px, 60vw, 240px); gap: 0; padding: 0.65rem; border-radius: 14px; scroll-snap-align: start; }
.work-thumb-box { width: 100%; max-width: none; margin: 0 auto 0.55rem; }
.work-thumb-box[style*="aspect-ratio: 9 / 16"] { max-width: 168px; }
.work-thumb-box[style*="aspect-ratio: 3 / 4"] { max-width: 186px; }
.work-thumb-box[style*="aspect-ratio: 4 / 5"] { max-width: 196px; }
.work-meta-top { margin-bottom: 0.16rem; }
.work-category { font-size: 0.7rem; }
.work-title { font-size: 0.92rem; line-height: 1.22; margin-bottom: 0.24rem; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.work-desc { font-size: 0.76rem; line-height: 1.38; margin-bottom: 0.16rem; -webkit-line-clamp: 2; line-clamp: 2; }
.work-details { margin-bottom: 0.25rem; padding-top: 0.4rem; gap: 0.2rem; font-size: 0.72rem; }
.detail-line { grid-template-columns: 44px minmax(0, 1fr); gap: 0.25rem; }
.detail-val { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.btn-watch { padding: 0.45rem 0.6rem; font-size: 0.78rem; }

.about-name, .about-role, .sub-heading { text-align: center; }
.about-bio { text-align: justify; hyphens: auto; text-wrap: pretty; line-height: 1.6; }
.skills-list { justify-content: center; }

.contact-grid { gap: 12px; border-top: 0; }
.contact-btn-card { min-height: 56px; padding: 0 16px; border: 1px solid var(--line2); border-radius: 14px; background: var(--surface); gap: 14px; transform: none; }
.contact-btn-card:active { transform: scale(0.98); }
.contact-icon-box { width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid var(--accent); border-radius: 50%; background: transparent; color: var(--accent); }
.contact-icon-box svg { width: 18px; height: 18px; color: var(--accent); }
.contact-btn-label { font-size: 0.74rem; }
.contact-btn-value { font-size: 0.95rem; font-weight: 700; overflow-wrap: anywhere; }
.contact-btn-arrow { margin-left: auto; color: var(--muted); }
.contact-btn-card[href*="wa.me"] { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.contact-btn-card[href*="wa.me"] .contact-icon-box { border-color: var(--ink); color: var(--ink); }
.contact-btn-card[href*="wa.me"] .contact-icon-box svg,
.contact-btn-card[href*="wa.me"] .contact-btn-label,
.contact-btn-card[href*="wa.me"] .contact-btn-value,
.contact-btn-card[href*="wa.me"] .contact-btn-arrow { color: var(--ink); }
.contact-cv-btn { width: 100%; }
@media (hover: hover) {
  .contact-btn-card:hover { transform: none; background: var(--surface); border-color: var(--accent); }
  .contact-btn-card:hover .contact-icon-box { background: transparent; border-color: var(--accent); color: var(--accent); }
  .contact-btn-card:hover .contact-btn-arrow { color: var(--muted); transform: none; }
  .contact-btn-card[href*="wa.me"]:hover { background: var(--accent); border-color: var(--accent); }
  .contact-btn-card[href*="wa.me"]:hover .contact-icon-box { border-color: var(--ink); color: var(--ink); }
  .contact-btn-card[href*="wa.me"]:hover .contact-icon-box svg,
  .contact-btn-card[href*="wa.me"]:hover .contact-btn-label,
  .contact-btn-card[href*="wa.me"]:hover .contact-btn-value,
  .contact-btn-card[href*="wa.me"]:hover .contact-btn-arrow { color: var(--ink); }
}
