/*======================================
//--//-->   BELT THEMES (dark base)
======================================

  Loaded after style.css. The site runs on a dark base and takes its accent
  from the belt selected in the nav (html[data-belt="..."]). The legacy
  --*-purple variables are remapped to the belt tokens so every existing rule
  in style.css follows the active belt.

  Which belts are offered is set in config/belts.php. The black belt palette
  below is ready — add 'black' to that config the day it is earned.
*/

:root {
  /* Dark base */
  --bg: #0b0b10;
  --bg-2: #101018;
  --surface: #15151f;
  --surface-2: #1c1c28;
  --border: rgba(255, 255, 255, 0.08);
  --text: #d9d9e3;
  --text-muted: #9393a6;
  --heading: #ffffff;

  /* Type */
  --font-display: 'Unbounded', 'Manrope', sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Belt accent (purple by default) */
  --belt: #8b5cf6;
  --belt-2: #a855f7;
  --belt-soft: #c4b5fd;
  --belt-ink: #ffffff;            /* text drawn on top of the belt colour */
  --belt-rgb: 139, 92, 246;
  --belt-bar: #111111;            /* the black rank bar on a belt */

  /* Remap the original theme variables onto the belt */
  --primary-purple: var(--belt);
  --secondary-purple: var(--belt-2);
  --light-purple: var(--belt-soft);
  --dark-purple: var(--belt);
  --purple-gradient: linear-gradient(135deg, var(--belt) 0%, var(--belt-2) 100%);
  --purple-light-bg: rgba(var(--belt-rgb), 0.12);
  --purple-shadow: rgba(var(--belt-rgb), 0.18);
}

html[data-belt="white"] {
  --belt: #f4f4f5;
  --belt-2: #d4d4d8;
  --belt-soft: #e4e4e7;
  --belt-ink: #111111;
  --belt-rgb: 244, 244, 245;
}

html[data-belt="blue"] {
  --belt: #3b82f6;
  --belt-2: #60a5fa;
  --belt-soft: #93c5fd;
  --belt-ink: #ffffff;
  --belt-rgb: 59, 130, 246;
}

html[data-belt="purple"] {
  --belt: #8b5cf6;
  --belt-2: #a855f7;
  --belt-soft: #c4b5fd;
  --belt-ink: #ffffff;
  --belt-rgb: 139, 92, 246;
}

html[data-belt="brown"] {
  --belt: #a16207;
  --belt-2: #ca8a04;
  --belt-soft: #d6b98c;
  --belt-ink: #ffffff;
  --belt-rgb: 161, 98, 7;
}

/* Black belt: pure black and white, the red bar of a black belt as the tip. */
html[data-belt="black"] {
  --bg: #000000;
  --bg-2: #050505;
  --surface: #0d0d0d;
  --surface-2: #161616;
  --belt: #ffffff;
  --belt-2: #e5e5e5;
  --belt-soft: #a3a3a3;
  --belt-ink: #000000;
  --belt-rgb: 255, 255, 255;
  --belt-bar: #dc2626;
}

/*--/ Base /--*/

html,
body {
  background-color: var(--bg);
  color: var(--text);
}

body {
  transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4, h5, h6,
.title-a,
.title-left,
.card-blog .card-title,
.skill-mf span {
  color: var(--heading);
}

a {
  color: var(--text);
}

a:hover,
.card-blog .card-title a:hover {
  color: var(--belt);
}

.subtitle-a,
.color-text-a,
.lead {
  color: var(--text-muted);
}

::selection {
  background: var(--belt);
  color: var(--belt-ink);
}

/*--/ Typography /--*/

body,
.lead,
.btn,
.button {
  font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6,
.title-a,
.title-left,
.intro .intro-title,
.navbar-b .navbar-brand {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.title-a {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.intro .intro-title {
  font-weight: 700;
  line-height: 1.05;
}

.intro .display-6,
.intro .intro-subtitle {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.card-blog .card-title {
  font-weight: 700;
  font-size: 1.2rem;
}

.navbar-b .navbar-brand {
  font-size: 1.15rem;
  font-weight: 700;
}

.navbar-b .nav-link,
.card-blog .card-category .category,
.belt-switcher .belt-label,
.timeline-item .timeline-period,
.draft-badge,
.title-s {
  font-family: var(--font-mono);
}

.navbar-b.navbar-trans .nav-link,
.navbar-b.navbar-reduce .nav-link {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

/*--/ Belt motif: section underline drawn as a belt with its rank bar /--*/

.line-mf {
  position: relative;
  width: 140px;
  height: 10px;
  border-radius: 2px;
  background: var(--belt);
  box-shadow: 0 0 24px rgba(var(--belt-rgb), 0.35);
}

.line-mf::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 14px;
  width: 34px;
  /* the rank bar, with two white degree stripes */
  background:
    linear-gradient(90deg,
      transparent 0 9px, #fff 9px 12px,
      transparent 12px 17px, #fff 17px 20px,
      transparent 20px),
    var(--belt-bar);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.title-left:before {
  background: var(--belt);
  height: 4px;
}

/*--/ Surfaces /--*/

.box-shadow-full,
.card-blog,
.service-box,
.post-box {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.blog-mf,
.projects-mf {
  background: var(--bg-2);
}

.card-blog:hover {
  border-color: rgba(var(--belt-rgb), 0.45);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(var(--belt-rgb), 0.25);
}

.card-blog .card-description,
.card-blog .post-author a {
  color: var(--text-muted);
}

.card-blog .card-footer {
  border-top-color: var(--border);
}

.card-blog .card-category,
.button,
.btn-primary,
.button-a {
  background: var(--belt);
  color: var(--belt-ink);
}

.card-blog .card-category .category {
  color: var(--belt-ink);
}

.button:hover,
.btn-primary:hover {
  background: var(--belt-2);
  color: var(--belt-ink);
}

.button-ghost {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.button-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: inset 0 0 0 2px #fff;
}

/*--/ Navbar /--*/

.navbar-b,
.navbar-b.navbar-reduce {
  background: rgba(11, 11, 16, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--belt);
}

.navbar-b.navbar-reduce {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.navbar-b .nav-link:before,
.navbar-b.navbar-trans .nav-link:before {
  background: var(--belt);
}

.navbar-b .dropdown-menu {
  background: var(--surface);
  border: 1px solid var(--border);
}

.navbar-b .dropdown-item {
  color: var(--text);
}

.navbar-b .dropdown-item:hover,
.navbar-b .dropdown-item:focus {
  background: rgba(var(--belt-rgb), 0.15);
  color: var(--heading);
}

.contact-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
}

.contact-menu .dropdown-item ion-icon {
  font-size: 1.1rem;
  color: var(--belt);
}

/*--/ Belt switcher /--*/

.belt-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 0.75rem;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.belt-switcher .belt-label {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 2px;
}

.belt-option {
  position: relative;
  width: 34px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.belt-option::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 4px;
  width: 9px;
  background: #111;
}

.belt-option:hover,
.belt-option:focus-visible {
  opacity: 0.9;
  transform: translateY(-1px);
  outline: none;
}

.belt-option[aria-pressed="true"] {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--belt);
}

.belt-option[data-belt-option="white"]  { background: #f4f4f5; }
.belt-option[data-belt-option="blue"]   { background: #3b82f6; }
.belt-option[data-belt-option="purple"] { background: #8b5cf6; }
.belt-option[data-belt-option="brown"]  { background: #8b5a2b; }
.belt-option[data-belt-option="black"]  { background: #000; box-shadow: inset 0 0 0 1px #444; }
.belt-option[data-belt-option="black"]::after { background: #dc2626; }

@media (max-width: 767px) {
  .belt-switcher {
    margin: 0.75rem 0 0.25rem;
    align-self: flex-start;
  }
}

/*--/ Hero /--*/

/* style.css greyscales the whole hero, which also drains the belt colour from
   the text and buttons. Desaturate only the photo, via the overlay. */
#home.intro.bg-image {
  -webkit-filter: none !important;
  filter: none !important;
}

.intro .overlay-itro {
  -webkit-backdrop-filter: grayscale(100%) contrast(1.1);
  backdrop-filter: grayscale(100%) contrast(1.1);
}

.intro .overlay-itro {
  background:
    radial-gradient(ellipse at 50% 120%, rgba(var(--belt-rgb), 0.35) 0%, transparent 60%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(11, 11, 16, 0.95) 100%);
  opacity: 1;
}

.intro .intro-title .accent {
  color: var(--belt);
}

.intro .text-slider {
  color: var(--belt-soft);
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 2.5rem;
}

/*--/ About: capabilities /--*/

.capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0.75rem;
  padding: 0;
  list-style: none;
}

.capabilities li {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--heading);
  background: rgba(var(--belt-rgb), 0.1);
  border: 1px solid rgba(var(--belt-rgb), 0.35);
}

.capabilities-sm {
  gap: 8px;
}

.capabilities-sm li {
  padding: 4px 11px;
  font-size: 0.8rem;
}

.about-info p span:not(.title-s) {
  color: var(--text);
}

/*--/ Projects /--*/

.project-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.project-highlights li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.95rem;
}

.project-highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 12px;
  height: 4px;
  border-radius: 1px;
  background: var(--belt);
}

/*--/ Project illustrations (inline SVG, coloured by the active belt) /--*/

.project-art {
  position: relative;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 20%, rgba(var(--belt-rgb), 0.28) 0%, transparent 55%),
    radial-gradient(circle at 85% 90%, rgba(var(--belt-rgb), 0.16) 0%, transparent 50%),
    linear-gradient(135deg, var(--surface-2) 0%, var(--bg) 100%);
}

/* faint dot grid */
.project-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 16px 16px;
}

/* Keep the drawing clear of the category badge that overlaps the bottom
   edge of the card image, and centred at any card width. */
.project-art .art {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 14px 16px 30px;
  transform-origin: 50% 45%;
  transition: transform 0.6s ease;
}

.card-blog:hover .project-art .art {
  transform: scale(1.06) rotate(-1deg);
}

.art-fill     { fill: var(--belt); }
.art-fill-2   { fill: var(--belt-2); }
.art-soft     { opacity: 0.14; }
.art-ink      { fill: var(--heading); }
.art-on-belt  { fill: var(--belt-ink); }
.art-dark     { fill: var(--bg); }
.art-surface  { fill: var(--surface-2); }
.art-muted    { fill: var(--text-muted); opacity: 0.55; }
.art-bar      { fill: var(--belt-bar); }
.art-line     { fill: none; stroke: rgba(255, 255, 255, 0.16); stroke-width: 1.5; }
.art-surface.art-line,
.art-dark.art-line { fill: var(--surface-2); }
.art-dark.art-line { fill: var(--bg); }
.art-stroke   { fill: none; stroke: var(--belt); }
.art-check    { stroke: var(--bg); }
.art-dark-stroke { stroke: var(--bg); }
.art-cone     { opacity: 0.14; }

.art-spin     { animation: art-spin 40s linear infinite; }
.art-spin-rev { animation: art-spin 28s linear infinite reverse; }
.art-float    { animation: art-float 4s ease-in-out infinite; }
.art-pulse    { animation: art-pulse 2.4s ease-in-out infinite; }
.art-dash     { animation: art-dash 1.2s linear infinite; }
.art-bounce   { transform-box: fill-box; transform-origin: center; animation: art-bounce 3s ease-in-out infinite; }

@keyframes art-spin   { to { transform: rotate(360deg); } }
@keyframes art-float  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes art-pulse  { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes art-dash   { to { stroke-dashoffset: -28; } }
@keyframes art-bounce { 0%, 100% { transform: scale(1); opacity: 0.9; } 50% { transform: scale(0.7); opacity: 0.4; } }

@media (prefers-reduced-motion: reduce) {
  .art-spin, .art-spin-rev, .art-float, .art-pulse, .art-dash, .art-bounce {
    animation: none;
  }
}

/*--/ Experience timeline /--*/

.experience-mf {
  padding: 80px 0;
}

.timeline {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--belt), rgba(var(--belt-rgb), 0.1));
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding: 1.5rem 1.75rem;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 1.85rem;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--belt);
}

.timeline-item .timeline-period {
  display: inline-block;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--belt);
}

.timeline-item h4 {
  margin-bottom: 0.15rem;
  font-size: 1.3rem;
}

.timeline-item .timeline-org {
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.resume-extras {
  max-width: 852px;
  margin: 1rem auto 0;
}

.resume-extras .timeline-item {
  height: 100%;
  margin-bottom: 0;
}

.resume-extras .timeline-item::before {
  display: none;
}

.resume-extras .project-highlights a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--belt);
  text-underline-offset: 3px;
}

.resume-note {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.resume-note a {
  color: var(--belt);
}

.soon-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--belt);
  border: 1px dashed rgba(var(--belt-rgb), 0.6);
}

.timeline-tag {
  display: block;
  margin: 0.35rem 0 0.15rem;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--belt);
}

.timeline-item.is-draft {
  border-style: dashed;
  border-color: #f59e0b;
}

.draft-badge {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #111;
  background: #f59e0b;
}

/*--/ Socials & footer /--*/

.socials .ico-circle {
  color: var(--text);
  box-shadow: 0 0 0 2px rgba(var(--belt-rgb), 0.6);
}

.socials .ico-circle:hover {
  background: var(--belt);
  color: var(--belt-ink);
  box-shadow: 0 0 0 2px var(--belt);
}

footer {
  background: var(--bg-2);
  border-top: 3px solid var(--belt);
  color: var(--text-muted);
}

footer .credits a {
  color: var(--belt-soft);
}

.back-to-top {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1030;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 50px;
  text-align: center;
  cursor: pointer;
  color: var(--belt-ink);
  background: var(--belt);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  body,
  .belt-option,
  .card-blog {
    transition: none;
  }
}
