/* ==========================================================================
   STYLE UI ARCHITECTURE FOR M. KHOIRUL RISQI PORTFOLIO
   Direction Source: DESIGN.md (Deep Cosmic Minimalism, Monochromatic Precision)
   ========================================================================== */

:root,
[data-theme="dark"] {
  /* Core Canvas & Surfaces (DESIGN.md Dark Theme) */
  --bg-canvas: #000000;
  --bg-surface: #0a0a0b;
  --bg-surface-raised: #141416;
  --bg-surface-interactive: rgba(255, 255, 255, 0.08);
  --bg-surface-hover: rgba(255, 255, 255, 0.16);
  --bg-header: rgba(0, 0, 0, 0.88);

  /* Typography Ink (Verified WCAG AA >= 4.5:1 against #000000 & #0a0a0b) */
  --text-primary: #ffffff;       /* 21.0:1 */
  --text-secondary: #d4d4d8;     /* 13.9:1 */
  --text-muted: #a1a1aa;         /* 8.16:1 */
  --text-on-primary: #0b0b0c;    /* 19.4:1 on #ffffff */

  /* Deliberate Single Accent (DESIGN.md Accent-1, used sparingly for status) */
  --accent-signal: #4ade80;      /* 11.8:1 on #000000 */
  --accent-signal-bg: rgba(74, 222, 128, 0.12);

  /* Borders (1px Hairline Architecture) */
  --border-subtle: rgba(255, 255, 255, 0.14);
  --border-accent: rgba(255, 255, 255, 0.32);
  --border-strong: rgba(255, 255, 255, 0.55);

  /* Progressive Shadow Ladder (Inset Highlight + Outset Depth from DESIGN.md) */
  --shadow-sm: rgba(255, 255, 255, 0.08) 0px 1px 0px 0px inset;
  --shadow-md: rgba(0, 0, 0, 0.45) 0px 4px 16px 0px;
  --shadow-lg: rgba(0, 0, 0, 0.35) 0px 4px 16px 0px;
  --shadow-xl: rgba(255, 255, 255, 0.22) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.65) 0px 12px 28px -6px;
  --shadow-card-hover: rgba(255, 255, 255, 0.18) 0px 0px 0px 1px inset, rgba(0, 0, 0, 0.7) 0px 12px 28px -4px;

  /* Focus Ring */
  --focus-ring: #ffffff;

  /* Spacing System (DESIGN.md 4px Base Unit, 10 Tokens) */
  --space-xxs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 20px;
  --space-xl: 28px;
  --space-xxl: 32px;
  --space-xxxl: 40px;
  --space-section: 44px;
  --space-band: 48px;

  /* Border Radius Scale (DESIGN.md Binary Scale: 0px Containers, 9999px Interactive) */
  --radius-none: 0px;
  --radius-xs: 6px;
  --radius-full: 9999px;

  /* Font Family */
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Derived Light Theme (DESIGN.md themes.light with WCAG AA Verified Contrast) */
[data-theme="light"] {
  --bg-canvas: #fbfbfb;
  --bg-surface: #f1f1f1;
  --bg-surface-raised: #e6e6e6;
  --bg-surface-interactive: rgba(0, 0, 0, 0.05);
  --bg-surface-hover: rgba(0, 0, 0, 0.11);
  --bg-header: rgba(251, 251, 251, 0.92);

  --text-primary: #141416;       /* 18.1:1 on #fbfbfb */
  --text-secondary: #2e2e33;     /* 12.8:1 on #fbfbfb */
  --text-muted: #52525b;         /* 7.45:1 on #fbfbfb */
  --text-on-primary: #ffffff;    /* 18.1:1 on #141416 */

  --accent-signal: #15803d;      /* 5.12:1 on #fbfbfb */
  --accent-signal-bg: rgba(21, 128, 61, 0.12);

  --border-subtle: #d4d4d8;
  --border-accent: #71717a;
  --border-strong: #18181b;

  --shadow-sm: rgba(255, 255, 255, 0.8) 0px 1px 0px 0px inset;
  --shadow-md: rgba(0, 0, 0, 0.08) 0px 4px 16px 0px;
  --shadow-lg: rgba(0, 0, 0, 0.12) 0px 4px 16px 0px;
  --shadow-xl: rgba(255, 255, 255, 0.6) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.14) 0px 10px 24px -6px;
  --shadow-card-hover: rgba(0, 0, 0, 0.25) 0px 0px 0px 1px inset, rgba(0, 0, 0, 0.12) 0px 12px 24px -4px;

  --focus-ring: #141416;
}

/* ==========================================================================
   BASE RESET & ACCESSIBILITY AFFORDANCES (R-32, R-39)
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  overflow-x: clip;
  min-height: 100vh;
  transition: background-color 0.2s ease, color 0.2s ease;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* R-39: Base cursor pointer on all enabled interactive elements */
a[href],
button:not(:disabled),
summary,
select:not(:disabled),
label[for],
input[type="checkbox"]:not(:disabled),
input[type="radio"]:not(:disabled),
[role="button"]:not([aria-disabled="true"]),
[role="tab"]:not([aria-disabled="true"]),
[role="switch"]:not([aria-disabled="true"]) {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

/* R-32: High-contrast visible focus indicator */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

/* Skip Link for Keyboard Navigation */
.skip-link {
  position: fixed;
  top: -100px;
  left: var(--space-lg);
  z-index: 100;
  background-color: var(--text-primary);
  color: var(--text-on-primary);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.skip-link:focus {
  top: var(--space-md);
}

/* ==========================================================================
   TYPOGRAPHY ROLES (DESIGN.md Section 3 & Section 8 Responsive Scaling)
   ========================================================================== */

.display-xl {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4.2vw + 1rem, 4.25rem); /* 32px mobile -> 68px XL desktop */
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.028em; /* -1.7px at 68px */
  color: var(--text-primary);
}

.display-lg {
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 3.2vw + 0.85rem, 3.5rem); /* 28px mobile -> 56-60px desktop */
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.032em; /* -2.1px at 60px */
  color: var(--text-primary);
}

.heading-md {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.heading-sm {
  font-size: 1.0625rem; /* 17px DESIGN.md Heading */
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.17px;
  color: var(--text-primary);
}

.body-xl {
  font-size: 1rem; /* 16px */
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0px;
}

.body-lg {
  font-size: 0.95rem; /* 15.2px */
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.23px;
}

.body-md {
  font-size: 0.925rem;
  font-weight: 400;
  line-height: 1.65;
}

.body-sm {
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.55;
}

.body-xs {
  font-size: 0.8rem; /* 12.8px */
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.13px;
}

.muted-copy {
  color: var(--text-muted);
}

.inline-link {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 500;
}

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

/* ==========================================================================
   LAYOUT CONTAINERS & SECTION RHYTHM (DESIGN.md Section 5)
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: var(--space-lg); /* 20px mobile */
}

@media (min-width: 1024px) {
  .container {
    padding-inline: var(--space-xxl); /* 32px desktop */
  }
}

section {
  padding-block: var(--space-band); /* 48px band */
  border-bottom: 1px solid var(--border-subtle);
}

@media (min-width: 1024px) {
  section {
    padding-block: calc(var(--space-band) * 1.5); /* 72px desktop vertical rhythm */
  }
}

.section-header-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xxxl);
  align-items: end;
}

@media (min-width: 1024px) {
  .section-header-split {
    grid-template-columns: 7fr 5fr;
    gap: var(--space-xxl);
  }
}

.section-index {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.section-intro {
  color: var(--text-secondary);
}

/* ==========================================================================
   INTERACTIVE PILL CONTROLS & BUTTONS (DESIGN.md Section 4 + R-03 44px Target)
   ========================================================================== */

.btn-primary,
.btn-filled,
.pill-link,
.pill-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 44px; /* R-03 Minimum Tap Target */
  padding: var(--space-xs) var(--space-lg);
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.825rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.12px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

/* Primary Button (Pure White Fill in Dark Mode, Black Fill in Light Mode) */
.btn-primary {
  background-color: var(--text-primary);
  color: var(--text-on-primary);
  border: 1px solid var(--text-primary);
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn-primary:active {
  transform: translateY(0px);
}

/* Filled Dark Button with Sculpted Inset Highlight (DESIGN.md button-filled) */
.btn-filled {
  background-color: var(--bg-surface-raised);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xl);
}

.btn-filled:hover {
  transform: translateY(-2px);
  border-color: var(--border-accent);
  background-color: var(--bg-surface-hover);
}

.btn-filled:active {
  transform: translateY(0px);
}

/* Pill Link / Control (Subtle Overlay + Hairline Border) */
.pill-link,
.pill-control {
  background-color: var(--bg-surface-interactive);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.pill-link:hover,
.pill-control:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface-hover);
  border-color: var(--border-accent);
  transform: translateY(-1px);
}

.pill-link:active,
.pill-control:active {
  transform: translateY(0px);
}

/* ==========================================================================
   HEADER & NAVIGATION (DESIGN.md Section 4 & 8)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: var(--space-md);
}

.brand-identity {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--text-primary);
  min-height: 44px;
}

.brand-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-accent);
  background-color: var(--bg-surface-raised);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.site-nav {
  display: none;
}

@media (min-width: 1024px) {
  .site-nav {
    display: block;
  }
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--space-md);
  font-size: 0.825rem; /* 13.2px DESIGN.md nav */
  font-weight: 500;
  letter-spacing: 0.13px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.nav-link:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface-interactive);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-sm);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Theme Toggle Icons */
[data-theme="dark"] .icon-moon {
  display: none;
}

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

.theme-label {
  display: none;
}

@media (min-width: 640px) {
  .theme-label {
    display: inline;
  }
}

.header-cv-btn {
  display: none;
}

@media (min-width: 768px) {
  .header-cv-btn {
    display: inline-flex;
  }
}

.mobile-menu-btn {
  display: inline-flex;
}

@media (min-width: 1024px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* Mobile Drawer */
.mobile-drawer {
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  padding: var(--space-lg);
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--space-md);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-canvas);
}

.mobile-nav-link:hover {
  border-color: var(--border-accent);
  background-color: var(--bg-surface-hover);
}

.mobile-full-btn {
  width: 100%;
}

/* ==========================================================================
   SECTION 1: HERO & ARCHITECTURAL DOSSIER
   ========================================================================== */

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xxxl);
  align-items: start;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 7fr 5fr;
    gap: var(--space-band);
  }
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: var(--accent-signal);
  box-shadow: 0 0 0 4px var(--accent-signal-bg);
  flex-shrink: 0;
}

.hero-lead {
  color: var(--text-secondary);
  margin-top: var(--space-xl);
  max-width: 66ch;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-xxl);
}

/* Dossier Metrics Strip */
.dossier-metrics {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  margin-top: var(--space-xxxl);
}

@media (min-width: 640px) {
  .dossier-metrics {
    grid-template-columns: repeat(3, 1fr);
  }
}

.metric-cell {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
}

@media (min-width: 640px) {
  .metric-cell {
    border-bottom: none;
    border-right: 1px solid var(--border-subtle);
  }
  .metric-cell:last-child {
    border-right: none;
  }
}

.metric-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-xxs);
}

.metric-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.metric-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: var(--space-xxs);
}

/* Hero Right Column: Portrait Dossier */
.dossier-card {
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
}

.portrait-frame {
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-surface-raised);
  aspect-ratio: 4 / 4.3;
  overflow: hidden;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.portrait-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xs) var(--space-md);
  background-color: rgba(0, 0, 0, 0.82);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.dossier-table {
  display: flex;
  flex-direction: column;
}

.dossier-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.825rem;
}

.dossier-row:last-child {
  border-bottom: none;
}

.dossier-key {
  color: var(--text-muted);
  font-weight: 500;
}

.dossier-val {
  color: var(--text-primary);
  font-weight: 500;
}

/* ==========================================================================
   SECTION 2: BANPANG MOBILE WEB INTERACTIVE CASE STUDY WORKBENCH
   ========================================================================== */

.banpang-workbench {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
}

@media (min-width: 1024px) {
  .banpang-workbench {
    grid-template-columns: 5fr 7fr;
  }
}

.workbench-controls {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

@media (min-width: 1024px) {
  .workbench-controls {
    border-bottom: none;
    border-right: 1px solid var(--border-subtle);
  }
}

.workbench-panel {
  padding: var(--space-xl);
}

.screen-tabs {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: var(--space-lg);
}

.screen-tab {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  min-height: 54px;
  padding: var(--space-sm) var(--space-md);
  background-color: var(--bg-canvas);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-none);
  text-align: left;
  font-family: var(--font-sans);
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.screen-tab:hover {
  border-color: var(--border-accent);
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
  transform: translateX(3px);
}

.screen-tab.active {
  background-color: var(--text-primary);
  color: var(--text-on-primary);
  border-color: var(--text-primary);
}

.tab-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid currentColor;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.tab-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tab-text strong {
  font-size: 0.875rem;
  font-weight: 600;
}

.tab-text span {
  font-size: 0.76rem;
  opacity: 0.82;
}

.tech-spec-box {
  padding: var(--space-lg) var(--space-xl);
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-canvas);
}

.spec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  list-style: none;
  margin-top: var(--space-sm);
}

.spec-pill {
  padding: 6px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  background-color: var(--bg-surface);
}

/* Right Stage Viewer */
.workbench-stage {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  background-color: var(--bg-canvas);
}

.stage-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.stage-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-signal);
  margin-bottom: var(--space-xxs);
}

.stage-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.stage-description {
  color: var(--text-secondary);
}

.stage-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-xxl);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  min-height: 220px;
}

.stage-status[hidden] {
  display: none;
}

.status-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--text-primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.stage-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: var(--space-md);
  min-height: 360px;
}

.stage-media-img {
  max-height: 560px;
  width: auto;
  object-fit: contain;
}

.stage-media-video {
  width: 100%;
  max-height: 560px;
  background-color: #000000;
}

.stage-media-img[hidden],
.stage-media-video[hidden] {
  display: none;
}

/* ==========================================================================
   SECTION 3: SELECTED PROJECTS ARCHIVE (ASYMMETRIC GRID + FILTER/SEARCH)
   ========================================================================== */

.archive-toolbar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding: var(--space-lg);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  margin-bottom: var(--space-md);
}

@media (min-width: 1024px) {
  .archive-toolbar {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.filter-btn.active {
  background-color: var(--text-primary);
  color: var(--text-on-primary);
  border-color: var(--text-primary);
}

.search-field-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  width: 100%;
  max-width: 420px;
}

.search-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.search-input-group {
  display: flex;
  gap: var(--space-xs);
}

.search-input {
  flex: 1;
  min-height: 44px;
  padding: var(--space-xs) var(--space-md);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-none);
  font-family: var(--font-sans);
  font-size: 0.875rem;
}

.search-input:focus {
  border-color: var(--text-primary);
}

.archive-count {
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.archive-empty-state {
  padding: var(--space-band) var(--space-xl);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
}

.archive-empty-state[hidden] {
  display: none;
}

/* Asymmetric Architectural Grid (R-14: Hierarchy & Variation) */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Sharp 0px Architectural Cards with Sculpted Hover (DESIGN.md Section 4 & 7) */
.project-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-none); /* Strictly 0px per DESIGN.md */
  background-color: var(--bg-surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-card-hover);
}

.project-card[hidden] {
  display: none;
}

/* Wide Featured Cards Span Full 2 Columns on Desktop */
@media (min-width: 1024px) {
  .project-card-wide {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 5fr 7fr;
  }
}

.project-media-wrap {
  background-color: var(--bg-surface-raised);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 1024px) {
  .project-card-wide .project-media-wrap {
    border-bottom: none;
    border-right: 1px solid var(--border-subtle);
    min-height: 360px;
  }
}

.project-media-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background-color: var(--border-subtle);
}

.project-media-compact {
  aspect-ratio: 16 / 10;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-body {
  padding: var(--space-xxl);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-md);
  flex: 1;
}

.project-meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-xs);
  font-size: 0.75rem;
  font-weight: 600;
}

.project-cat {
  color: var(--text-primary);
  letter-spacing: 0.06em;
}

.project-period {
  color: var(--text-muted);
}

.project-title {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.project-desc {
  color: var(--text-secondary);
}

.project-highlights {
  padding-left: var(--space-lg);
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: var(--space-xxs);
}

.live-url-preview {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-canvas);
  font-size: 0.85rem;
  font-weight: 600;
}

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

.url-domain {
  color: var(--text-primary);
}

.project-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.tech-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 4px 10px;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-canvas);
}

.card-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* ==========================================================================
   SECTION 4: VERIFIABLE CREDENTIALS & TRANSCRIPT LEDGER
   ========================================================================== */

.ledger-container {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
}

.ledger-item {
  border-bottom: 1px solid var(--border-subtle);
}

.ledger-item:last-child {
  border-bottom: none;
}

.ledger-item-featured {
  background-color: var(--bg-surface-raised);
}

.ledger-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  padding: var(--space-xxl);
  align-items: start;
}

@media (min-width: 1024px) {
  .ledger-main {
    grid-template-columns: 240px 1fr auto;
    gap: var(--space-xxl);
  }
}

.ledger-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-xxs);
}

.ledger-year {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ledger-id {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.ledger-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xxs);
}

.ledger-org {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.ledger-desc {
  color: var(--text-secondary);
  max-width: 68ch;
}

.ledger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: center;
}

/* Collapsible Bangkit Transcript Table */
.transcript-drawer {
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-canvas);
  padding: var(--space-xl) var(--space-xxl);
}

.transcript-drawer[hidden] {
  display: none;
}

.transcript-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.transcript-summary-badge {
  padding: 6px 14px;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
}

.transcript-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.transcript-table th,
.transcript-table td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.transcript-table th {
  background-color: var(--bg-surface);
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.transcript-table td {
  color: var(--text-secondary);
}

.transcript-table tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   SECTION 5: EXPERIENCE, EDUCATION & SKILLS CHRONICLE
   ========================================================================== */

.chronicle-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xxxl);
}

@media (min-width: 1024px) {
  .chronicle-columns {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-band);
  }
}

.column-heading {
  font-size: 1.05rem;
  font-weight: 600;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-accent);
  margin-bottom: var(--space-xl);
  color: var(--text-primary);
}

.timeline-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.timeline-entry {
  padding: var(--space-xl);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
}

.timeline-entry-current {
  border-color: var(--border-accent);
  background-color: var(--bg-surface-raised);
}

.active-badge-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: var(--accent-signal);
  margin-right: var(--space-xs);
  vertical-align: middle;
}

.division-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-md);
}

.division-pill {
  padding: 4px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background-color: var(--bg-canvas);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.division-pill-highlight {
  border-color: var(--border-accent);
  color: var(--text-primary);
}

.division-breakdown {
  margin-top: var(--space-md);
  padding-left: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  color: var(--text-secondary);
}

.division-breakdown strong {
  color: var(--text-primary);
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
  font-size: 0.8rem;
}

.timeline-date {
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-company {
  color: var(--text-muted);
  font-weight: 500;
}

.timeline-role {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.timeline-body {
  color: var(--text-secondary);
}

/* Skills Matrix */
.skills-matrix-panel {
  margin-top: var(--space-xxxl);
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.skill-group {
  padding: var(--space-lg);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
}

.skill-group-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border-subtle);
}

.skill-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   SECTION 6: CONTACT & DISPATCH COMPOSER
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xxxl);
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 5fr 7fr;
    gap: var(--space-band);
  }
}

.direct-channels {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-xxl);
}

.channel-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
}

.channel-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.channel-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.channel-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

a.channel-value:hover {
  text-decoration: underline;
}

/* Dispatch Form */
.dispatch-form {
  padding: var(--space-xxl);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.field-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-primary);
}

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  min-height: 44px;
  padding: var(--space-sm) var(--space-md);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-none);
  font-family: var(--font-sans);
  font-size: 0.925rem;
}

.field-textarea {
  resize: vertical;
  min-height: 112px;
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  border-color: var(--text-primary);
}

.form-feedback {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border-accent);
  background-color: var(--bg-surface-raised);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
}

.form-feedback[hidden] {
  display: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ==========================================================================
   FOOTER (DESIGN.md Section 4)
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0 60px 0;
  background-color: var(--bg-canvas);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  justify-content: space-between;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
  }
}

.footer-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-sub {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: var(--space-xxs);
}

.footer-links-block {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--space-sm);
  font-size: 0.825rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* ==========================================================================
   MODAL LIGHTBOX VIEWER (R-26, R-32)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background-color: rgba(0, 0, 0, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-container {
  width: 100%;
  max-width: 960px;
  max-height: 92vh;
  overflow-y: auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-accent);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-canvas);
}

.modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.modal-img {
  max-height: 70vh;
  width: auto;
  object-fit: contain;
  border: 1px solid var(--border-subtle);
}

.modal-caption {
  color: var(--text-secondary);
  text-align: left;
  width: 100%;
}

/* ==========================================================================
   REDUCED MOTION SUPPORT (R-39)
   ========================================================================== */

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

