/* ==========================================================================
   Minimalist Editorial Dark Theme - CV Muhammad Caesar Rifqi
   Consistent background, typography, surface tokens, navbar, table & form
   ========================================================================== */

:root {
  --bg-body: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-subtle: #161f30;
  --bg-surface-hover: #1c273d;
  --border-hairline: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --accent-border: rgba(56, 189, 248, 0.28);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-body);
  background-image: radial-gradient(ellipse 80% 40% at 50% -10%, rgba(56, 189, 248, 0.08), transparent);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover {
  color: #7dd3fc;
}

.site-shell {
  width: 100%;
  max-width: 1080px;
}

/* Header / Banner */
.site-header {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 1rem;
}

.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background-color: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.22);
  color: #6ee7b7;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.availability-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #34d399;
}

/* Navigation */
.site-nav {
  background-color: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-hairline);
  border-radius: 0.85rem;
}

.site-nav .navbar-brand {
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-nav .navbar-brand span {
  color: var(--accent);
}

.site-nav .nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.site-nav .nav-link:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

.site-nav .nav-link.active {
  color: var(--text-primary);
  background-color: rgba(56, 189, 248, 0.14);
  font-weight: 600;
}

.site-nav .navbar-toggler {
  border-color: var(--border-hairline);
}

.site-nav .navbar-toggler-icon {
  filter: invert(1);
}

/* Minimalist Cards */
.cv-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 1rem;
}

.cv-card-inner {
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: 0.75rem;
}

.section-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-hairline);
}

.section-heading i {
  color: var(--accent);
  font-size: 0.95rem;
}

/* Profile Photo */
.profile-photo-wrap {
  width: 120px;
  height: 120px;
  border-radius: 999px;
  padding: 3px;
  border: 1px solid var(--border-strong);
  background-color: var(--bg-surface-subtle);
  margin: 0 auto;
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
  display: block;
}

/* Minimal Role & Tech Pills */
.role-pill {
  display: inline-block;
  padding: 0.22rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 500;
  border-radius: 999px;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
}

.role-pill-primary {
  background-color: var(--accent-soft);
  border-color: var(--accent-border);
  color: #bae6fd;
}

.tech-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: 0.4rem;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-hairline);
  color: var(--text-primary);
}

/* Minimalist Bootstrap Tables */
.cv-table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-primary);
  --bs-table-border-color: var(--border-hairline);
  --bs-table-hover-bg: rgba(255, 255, 255, 0.025);
  --bs-table-hover-color: var(--text-primary);
  margin-bottom: 0;
  font-size: 0.92rem;
}

.cv-table thead th {
  background-color: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-strong);
  padding: 0.65rem 0.75rem;
}

.cv-table th,
.cv-table td {
  padding: 0.85rem 0.75rem;
  vertical-align: top;
}

.cv-table tbody tr:last-child td,
.cv-table tbody tr:last-child th {
  border-bottom: 0;
}

.cv-table tbody th {
  color: var(--text-secondary);
  font-weight: 500;
  width: 32%;
}

/* Minimalist Buttons & Nav Pills */
.btn-accent {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #082f49;
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-accent:hover,
.btn-accent:focus {
  background-color: #7dd3fc;
  border-color: #7dd3fc;
  color: #082f49;
}

.btn-ghost {
  background-color: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
}

.btn-ghost:hover,
.btn-ghost:focus {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-primary);
}

.chart-filter-pills .nav-link {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: 0.45rem;
  border: 1px solid transparent;
}

.chart-filter-pills .nav-link:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.04);
}

.chart-filter-pills .nav-link.active {
  background-color: var(--accent-soft);
  border-color: var(--accent-border);
  color: #bae6fd;
  font-weight: 600;
}

/* Forms */
.cv-form .form-label {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.86rem;
  margin-bottom: 0.4rem;
}

.cv-form .form-control {
  background-color: var(--bg-body);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  border-radius: 0.55rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.93rem;
  line-height: 1.5;
}

.cv-form .form-select {
  background-color: var(--bg-body);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  border-radius: 0.55rem;
  padding: 0.65rem 2.25rem 0.65rem 0.85rem;
  font-size: 0.93rem;
  line-height: 1.5;
  height: calc(1.5em + 1.3rem + 2px);
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}

.cv-form .form-select::picker-icon {
  display: none;
}

.cv-form .form-control::placeholder {
  color: var(--text-muted);
}

.cv-form .form-control:focus,
.cv-form .form-select:focus {
  background-color: var(--bg-body);
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.15);
}

/* Highcharts Container */
.chart-box {
  min-height: 340px;
  width: 100%;
}

/* Clean Hairline Timeline */
.timeline-item {
  position: relative;
  padding-left: 1.25rem;
  border-left: 1px solid var(--border-strong);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -4.5px;
  top: 0.45rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
}

/* Minimalist Sidebar Links */
.sidebar-list-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 0.55rem;
  color: var(--text-secondary);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.sidebar-list-link:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.sidebar-list-link i {
  color: var(--accent);
  flex-shrink: 0;
}

.sidebar-list-link > div {
  min-width: 0;
  flex: 1 1 auto;
}

.sidebar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.25rem;
}

@media (min-width: 992px) {
  .sidebar-sticky {
    position: sticky;
    top: 1.25rem;
  }
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-hairline);
  color: var(--text-muted);
  font-size: 0.86rem;
}

/* Utilities */
.text-secondary-custom {
  color: var(--text-secondary) !important;
}

.text-accent {
  color: var(--accent) !important;
}

.font-mono {
  font-family: "JetBrains Mono", monospace;
}

.prose-measure {
  max-width: 68ch;
}

/* Print */
@media print {
  body {
    background: #ffffff !important;
    color: #0f172a !important;
  }
  .site-nav,
  .no-print {
    display: none !important;
  }
  .cv-card,
  .site-header {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
  }
}
