﻿:root {
  --bg: #101317; /* deep charcoal, not pure black */
  --bg-2: #161a20; /* raised surface */
  --bg-3: #1c222a; /* card hover / nav */
  --line: #262d36; /* hairlines */
  --ink: #e9ebee; /* primary text */
  --muted: #8b929d; /* secondary text */
  --faint: #5d646e; /* labels */
  --accent: #54d0c0; /* phosphor teal */
  --accent-dim: #2f6f68; /* teal at rest */
  --amber: #e0a85a; /* sparing warm accent */
  --glow: rgba(84, 208, 192, 0.35);
  --radius: 5px; /* per brief */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a {
  color: inherit;
  text-decoration: none;
}

/* ---------- layout shell ---------- */
.shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  max-width: 1320px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ---------- sidebar ---------- */
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 48px 36px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
}
.brand .name {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 1.65rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.brand .role {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--glow);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* nav card seperator */
.relative-box {
  position: relative;
  width: 100%; /* Changed from 200px to fill the container */
  height: 20px;
  /* border: 1px solid var(--accent); */
  display: flex;
  justify-content: center;
  align-items: center;
}

.absolute-circle {
  width: 10px;
  height: 10px;
  background-color: var(--accent);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(
    -50%,
    -50%
  ); /* Pulls the object's true center onto the mark */
}

/* nav card & the rounded rectangle per brief */
nav.navcard {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
}
nav.navcard a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.95rem;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}
nav.navcard a .idx {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--faint);
}
nav.navcard a:hover,
nav.navcard a:focus-visible {
  background: var(--bg-3);
  color: var(--ink);
  outline: none;
}
nav.navcard a.active {
  color: var(--accent);
  text-shadow:
    0 0 8px rgba(84, 208, 192, 0.45),
    0 0 18px rgba(84, 208, 192, 0.25);
  background: var(--bg-3);
}
nav.navcard a.active .idx {
  color: var(--accent-dim);
}

.sidebar .spacer {
  flex: 1;
}
.social {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.social a {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--faint);
  transition: color 0.18s ease;
}
.social a:hover,
.social a:focus-visible {
  color: var(--accent);
  text-shadow:
    0 0 8px rgba(84, 208, 192, 0.45),
    0 0 18px rgba(84, 208, 192, 0.25);
  outline: none;
}

.social a[href*="github.com"],
.social a[href*="linkedin.com"],
.social a[href*="deviantart.com"] {
  color: #ff4fa3;
  text-shadow:
    0 0 8px rgba(255, 79, 163, 0.45),
    0 0 18px rgba(255, 79, 163, 0.25);
}

.social a[href*="github.com"]:hover,
.social a[href*="github.com"]:focus-visible,
.social a[href*="linkedin.com"]:hover,
.social a[href*="linkedin.com"]:focus-visible,
.social a[href*="deviantart.com"]:hover,
.social a[href*="deviantart.com"]:focus-visible {
  color: #ff79bc;
  text-shadow:
    0 0 10px rgba(255, 121, 188, 0.55),
    0 0 24px rgba(255, 121, 188, 0.35);
}

/* ---------- main ---------- */
main {
  padding: 64px 56px 96px;
  max-width: 920px;
}
section {
  scroll-margin-top: 48px;
}
section + section {
  margin-top: 88px;
}

.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin-bottom: 18px;
}

/* hero */
.hero h1 {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero p.lede {
  margin-top: 22px;
  max-width: 54ch;
  color: var(--muted);
  font-size: 1.05rem;
}

/* keyword readout */
.keywords {
  margin-top: 38px;
  background:
    linear-gradient(var(--bg-2), var(--bg-2)) padding-box,
    linear-gradient(120deg, transparent, var(--accent-dim), transparent)
      border-box;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 22px 26px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.86rem;
  line-height: 2.1;
}
.kw-group {
  display: block;
}
.kw-cat {
  color: var(--accent);
  font-weight: 500;
}
.kw-items {
  color: var(--ink);
}
.kw-pipe {
  color: var(--faint);
  padding: 0 14px;
  user-select: none;
}
.cursor {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  background: var(--accent);
  vertical-align: -2px;
  margin-left: 4px;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* projects */
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 26px;
}
.sec-head h2 {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}
.sec-head .count {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  color: var(--faint);
}

.cards {
  color: var(--accent);
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.cards::-webkit-scrollbar {
  height: 8px;
}
.cards::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 99px;
}
.card {
  scroll-snap-align: start;
  flex: 1 1 0;
  min-width: 188px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}
.card:hover,
.card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent-dim);
  background: var(--bg-3);
  outline: none;
}
.card .cat {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.card h3 {
  font-family: "Syne", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.2;
}
.card p {
  font-size: 0.88rem;
  color: var(--muted);
  flex: 1;
}
.card .stack {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--accent-dim);
}

/* about + contact */
.prose p {
  max-width: 60ch;
  color: var(--muted);
  margin-top: 14px;
}
.prose p:first-child {
  margin-top: 0;
}
.prose strong {
  color: var(--ink);
  font-weight: 500;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.contact-links a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--muted);
  transition:
    border-color 0.18s ease,
    color 0.18s ease;
}
.contact-links a:hover,
.contact-links a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

/* ---------- mobile ---------- */
.menu-btn {
  display: none;
}
@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 28px 24px;
  }
  .sidebar .spacer {
    display: none;
  }
  main {
    padding: 40px 24px 72px;
  }
  nav.navcard {
    display: none;
  }
  nav.navcard.open {
    display: block;
  }
  .menu-btn {
    display: inline-flex;
    align-self: flex-start;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    padding: 8px 14px;
    cursor: pointer;
  }
  .card {
    min-width: 78%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
     PROJECT CARDS — photo-led (added)
     Reuses the existing token system: --accent, --bg-2, --line,
     --radius, Syne / DM Sans / JetBrains Mono.
     ============================================================ */

/* override the old horizontal-scroll strip → vertical stack */
#projects .cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  overflow: visible;
  scroll-snap-type: none;
  padding-bottom: 0;
}

.pcard {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}
.pcard:hover {
  border-color: var(--accent-dim);
  transform: translateY(-3px);
}

/* ---- media (shared) ---- */
.pcard-media {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.pcard-media img {
  display: block;
  width: 100%;
  height: auto;
}
.media-tag {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  color: var(--accent);
  background: rgba(16, 19, 23, 0.66);
  border: 1px solid var(--accent-dim);
  border-radius: 4px;
  padding: 2px 7px;
}

/* ---- split (hardware: build | result) ---- */
.media-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  aspect-ratio: 2/1;
}
.media-split .pane {
  position: relative;
  min-height: 0;
  background: var(--bg);
}
.media-split .pane > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-split .pane-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}
.media-split .pane-result img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}

/* ---- phones (mobile apps: 3 screens) ---- */
.media-phones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}
.media-phones .ph {
  position: relative;
  background: #000;
}
.media-phones img {
  background: #000;
}

#p-litu .media-phones img {
  object-fit: fill;
}

#p-litu .media-split {
  aspect-ratio: auto;        /* stop forcing a fixed height */
  align-items: start;        /* top-align the two panes */
}
#p-litu .media-split .pane > img {
  height: auto;              /* natural height, no stretching */
  object-fit: contain;       /* show the whole image, no crop */
}

/* ---- hero (single screenshot) ---- */
.media-hero img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---- video hero (square demo footage, letterboxed on dark) ---- */
.pcard-media video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
  background: #000;
}

/* ---- feature (hero + thumb row) ---- */
.media-feature .feat-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}
.media-feature .feat-thumbs .t {
  position: relative;
  background: var(--bg);
}
.media-feature .feat-thumbs img {
  aspect-ratio: 16/10;
  object-fit: cover;
}
.media-feature .feat-thumbs .t span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  color: var(--ink);
  background: linear-gradient(transparent, rgba(16, 19, 23, 0.9));
  padding: 14px 6px 5px;
  text-align: center;
}

/* ---- body ---- */
.pcard-body {
  padding: 20px 22px 22px;
}
.pcard-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.pcard-head h3 {
  font-family: "Syne", sans-serif;
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.2;
}
.pcard-ctx {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--faint);
}

.pcard-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 11px 0 16px;
}
.pcard-tags span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}
.pcard-tags .pill {
  color: var(--accent);
  border-style: dashed;
  border-color: var(--accent-dim);
}

.pbi {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.pbi-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
}
.pbi-row dt {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-dim);
  padding-top: 2px;
  margin: 0;
}
.pbi-row dd {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.pcard-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
  transition:
    border-color 0.18s ease,
    color 0.18s ease;
}
.pcard-link:hover,
.pcard-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}
.pcard-link svg {
  width: 13px;
  height: 13px;
}

@media (max-width: 560px) {
  .media-split {
    grid-template-columns: 1fr;
    aspect-ratio: auto;
  }
  .pbi-row {
    grid-template-columns: 54px 1fr;
    gap: 10px;
  }
}

/* ---- projects sub-nav (sidebar) ---- */
.navcard .subnav {
  list-style: none;
  margin: 3px 0 7px 22px; /* indent to sit under the Projects label */
  padding: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
}
.navcard .subnav li {
  margin: 0;
}
.navcard .subnav a {
  display: block;
  margin-left: -1px;
  padding: 6px 12px;
  border-left: 2px solid transparent;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--faint);
  border-radius: 0;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}
.navcard .subnav a:hover,
.navcard .subnav a:focus-visible {
  color: var(--ink);
  background: var(--bg-3);
  outline: none;
}
.navcard .subnav a.active {
  color: var(--accent);
  text-shadow:
    0 0 8px rgba(84, 208, 192, 0.45),
    0 0 18px rgba(84, 208, 192, 0.25);
  border-left-color: var(--accent);
  background: transparent;
}

/* anchor offset so a tapped project isn't hidden under the top edge */
.pcard {
  scroll-margin-top: 24px;
}


/* ===== Publication metrics banner ===== */
.pub-metrics {
  margin: 4rem 0;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.metricCard {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.1rem 0.75rem;
  border: 1px solid var(--border-color, rgba(46, 230, 192, 0.3));
  border-radius: 8px;
  background: var(--card-bg, rgba(46, 230, 192, 0.05));
}
.metricCard-value {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-color, #2ee6c0);
  line-height: 1.1;
}
.metricCard-label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-color, rgba(255, 255, 255, 0.6));
  margin-top: 0.35rem;
}

/* ===== Citation chart ===== */
.metrics-chart-container {
  padding: 1.25rem 1.5rem 1rem;
  border: 1px solid var(--border-color, rgba(46, 230, 192, 0.3));
  border-radius: 8px;
}
.chart-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.chart-header h4 {
  margin: 0;
  font-size: 0.95rem;
}
.chart-subtitle {
  font-size: 0.75rem;
  color: var(--muted-color, rgba(255, 255, 255, 0.55));
}
.metrics-bars {
  display: block;
  width: 100%;
  height: auto;
}
.metrics-bars .bar-link {
  cursor: pointer;
}
.metrics-bars .bar {
  fill: var(--accent-color, #2ee6c0);
  fill-opacity: 0.7;
  transition: fill-opacity 0.15s ease;
}

.metrics-bars .bar-name {
  fill: var(--muted-color, rgba(255, 255, 255, 0.65));
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  transition: fill 0.15s ease;
}
.metrics-bars .bar-link:hover .bar-name,
.metrics-bars .bar-link:focus .bar-name {
  fill: var(--accent-color, #2ee6c0);
}
.metrics-bars .bar-value {
  fill: var(--accent-color, #2ee6c0);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  text-anchor: start; /* was middle — values now sit to the right of bars */
}

/* ===== Landing highlight on the linked entry ===== */
html {
  scroll-behavior: smooth;
}
.pub-entry {
  scroll-margin-top: 5rem; /* adjust to your sticky header height */
}
.pub-entry:target {
  animation: pub-flash 1.6s ease-out;
}
@keyframes pub-flash {
  0%   { background: rgba(46, 230, 192, 0.16); }
  100% { background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pub-entry:target { animation: none; background: rgba(46, 230, 192, 0.1); }
}

/* ============================================================
   PUBLICATIONS (inline section, below Selected Projects)
   Reuses existing tokens + .eyebrow group labels.
   ============================================================ */

   .pub-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-around;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid rgba(46, 230, 192, 0.35);
  border-radius: 8px;
  background: rgba(46, 230, 192, 0.05);
}
.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.metric-value {
  font-family: monospace; /* swap for your existing mono stack */
  font-size: 1.9rem;
  font-weight: 700;
  color: #2ee6c0;
  line-height: 1.1;
}
.metric-label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0.3rem;
}

.metrics-bars .bar {
  fill: var(--accent-color, #2ee6c0);
  fill-opacity: 0.75;
  transition: fill-opacity 0.15s ease;
}
.metrics-bars .bar:hover { fill-opacity: 1; }
.metrics-bars .bar-values text {
  fill: var(--accent-color, #2ee6c0);
  font-family: monospace; /* your mono stack */
  font-size: 11px;
}

.pub-group + .pub-group {
  margin-top: 42px;
}
.pub-group .eyebrow {
  margin-bottom: 12px;
}

.pub-list {
  list-style: none;
}
.pub {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.pub:first-child {
  border-top: none;
  padding-top: 2px;
}
.pub-year {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--accent-dim);
  padding-top: 3px;
}
.pub-title {
  font-family: "Syne", sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.32;
  color: var(--ink);
}
.pub-authors {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 7px;
}
.pub-authors .me {
  color: var(--accent);
  font-weight: 500;
}
.pub-venue {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--faint);
  margin-top: 8px;
}
.pub-venue em {
  font-style: normal;
  color: var(--muted);
}
.pub-doi {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 5px 11px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--muted);
  transition:
    border-color 0.18s ease,
    color 0.18s ease;
}
.pub-doi:hover,
.pub-doi:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}
@media (max-width: 560px) {
  .pub {
    grid-template-columns: 46px 1fr;
    gap: 14px;
  }
}
