﻿
:root {
  --bg:        #060810;
  --bg2:       #0b0f1a;
  --surface:   #0f1525;
  --border:    rgba(80,160,255,0.12);
  --accent:    #3af0c8;
  --accent2:   #4a8fff;
  --accent3:   #ff4e6a;
  --accent4:   #ff9a3c;
  --text:      #d4dff5;
  --muted:     #5a6a8a;
  --font-mono: 'JetBrains Mono', monospace;
  --font-disp: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background:  var(--bg);
  color:       var(--text);
  font-family: var(--font-body);
  font-size:   16px;
  line-height: 1.6;
  overflow-x:  hidden;
}

body::after {
  content:    '';
  position:   fixed;
  inset:      0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.05) 2px,
    rgba(0,0,0,0.05) 4px
  );
  pointer-events: none;
  z-index:        1;
}

h1 {
  font-family:    var(--font-disp);
  font-weight:    800;
  font-size:      clamp(42px, 5vw, 68px);
  line-height:    1.0;
  letter-spacing: -0.02em;
  color:          #fff;
}

h2 {
  font-family:    var(--font-disp);
  font-weight:    800;
  font-size:      clamp(28px, 3.5vw, 40px);
  color:          #fff;
  letter-spacing: -0.02em;
}

h4 {
  font-family:    var(--font-mono);
  font-size:      10px;
  color:          var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom:  10px;
}

strong {
  color:       var(--text);
  font-weight: 500;
}

.section-label {
  font-family:    var(--font-mono);
  font-size:      11px;
  color:          var(--accent);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  display:        flex;
  align-items:    center;
  gap:            10px;
}

.section-label::before {
  content:    '';
  display:    inline-block;
  width:      28px;
  height:     1px;
  background: var(--accent);
}

@keyframes orbit-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

}

@keyframes lb-in {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.fade-in {
  opacity:    0;
  transform:  translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity:   1;
  transform: translateY(0);
}

#stars-canvas {
  position:       fixed;
  inset:          0;
  z-index:        0;
  pointer-events: none;
  opacity:        0.5;
}

.wrapper {
  position:   relative;
  z-index:    2;
  max-width:  1100px;
  margin:     0 auto;
  padding:    0 32px;
}

nav {
  position:        fixed;
  top:             0;
  left:            0;
  right:           0;
  z-index:         100;
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  padding:         18px 40px;
  border-bottom:   1px solid var(--border);
  background:      rgba(6,8,16,0.8);
  backdrop-filter: blur(12px);
}

.nav-logo {
  font-family:    var(--font-mono);
  font-size:      13px;
  color:          var(--accent);
  letter-spacing: 0.15em;
  text-decoration: none;
}

.nav-links {
  display:     flex;
  gap:         32px;
  list-style:  none;
}

.nav-links a {
  font-family:     var(--font-mono);
  font-size:       12px;
  color:           var(--muted);
  text-decoration: none;
  letter-spacing:  0.1em;
  text-transform:  uppercase;
  transition:      color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

#hero {
  min-height:  100vh;
  display:     flex;
  align-items: center;
  padding-top: 80px;
  position:    relative;
}

.hero-grid {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   60px;
  align-items:           center;
  width:                 100%;
}

.hero-desc {
  font-size:   15px;
  color:       var(--muted);
  max-width:   440px;
  line-height: 1.75;
  margin:      24px 0 36px;
}

.hero-tags {
  display:    flex;
  flex-wrap:  wrap;
  gap:        8px;
  margin-bottom: 40px;
}

.hero-visual {
  position:        relative;
  display:         flex;
  justify-content: center;
  align-items:     center;
  height:          320px;
}

.orbit-ring {
  position:      absolute;
  border-radius: 50%;
  border:        1px solid;
  animation:     orbit-rotate linear infinite;
}

.orbit-ring:nth-child(1) {
  width:            300px;
  height:           300px;
  border-color:     rgba(58,240,200,0.15);
  animation-duration: 20s;
}

.orbit-ring:nth-child(2) {
  width:               220px;
  height:              220px;
  border-color:        rgba(74,143,255,0.12);
  animation-duration:  14s;
  animation-direction: reverse;
}

.orbit-ring:nth-child(3) {
  width:              150px;
  height:             150px;
  border-color:       rgba(58,240,200,0.08);
  animation-duration: 9s;
}

.orbit-dot {
  position:      absolute;
  width:         8px;
  height:        8px;
  border-radius: 50%;
  background:    var(--accent);
  box-shadow:    0 0 10px var(--accent), 0 0 20px rgba(58,240,200,0.4);
  top:           0;
  left:          50%;
  transform:     translateX(-50%);
}

.orbit-dot--alt {
  background: var(--accent2);
  box-shadow: 0 0 10px var(--accent2);
  top:        auto;
  bottom:     0;
}

.orbit-center {
  width:         60px;
  height:        60px;
  border-radius: 50%;
  background:    radial-gradient(circle at 35% 35%, #3af0c8, #1a6656);
  box-shadow:    0 0 30px rgba(58,240,200,0.3), 0 0 60px rgba(58,240,200,0.1);
  position:      relative;
  z-index:       2;
}

section {
  padding:  100px 0;
  position: relative;
  z-index:  2;
}

.section-header {
  display:       flex;
  align-items:   center;
  gap:           16px;
  margin-bottom: 60px;
}

.section-num {
  font-family:    var(--font-mono);
  font-size:      12px;
  color:          var(--accent);
  letter-spacing: 0.2em;
}

.section-line {
  flex:       1;
  height:     1px;
  background: var(--border);
  max-width:  200px;
}

.section-divider {
  width:      100%;
  height:     1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  position:   relative;
  z-index:    2;
}

#about {
  background:    linear-gradient(180deg, transparent, rgba(58,240,200,0.02) 50%, transparent);
  border-top:    1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   80px;
  align-items:           start;
}

.about-text p {
  font-size:     15px;
  color:         #8a9bc0;
  line-height:   1.8;
  margin-bottom: 20px;
}

.highlight-box {
  padding:       20px 24px;
  border-left:   2px solid var(--accent);
  background:    rgba(58,240,200,0.04);
  border-radius: 0 4px 4px 0;
  margin-top:    28px;
}

.highlight-box p {
  font-family:    var(--font-mono);
  font-size:      12px;
  color:          var(--accent);
  letter-spacing: 0.06em;
  line-height:    1.7;
}

.skills-grid {
  display: grid;
  gap:     24px;
}

.skill-items {
  display:   flex;
  flex-wrap: wrap;
  gap:       6px;
}

.skill-item {
  font-family:    var(--font-mono);
  font-size:      11px;
  color:          var(--muted);
  padding:        4px 10px;
  border:         1px solid var(--border);
  border-radius:  3px;
  transition:     border-color 0.2s, color 0.2s;
}

.skill-item:hover {
  border-color: rgba(58,240,200,0.25);
  color:        var(--text);
}

#contact {
  text-align:     center;
  padding-bottom: 120px;
}

.contact-sub {
  font-size:     15px;
  color:         var(--muted);
  margin:        0 auto 48px;
  max-width:     480px;
}

.contact-links {
  display:         flex;
  justify-content: center;
  gap:             16px;
  flex-wrap:       wrap;
}

footer {
  border-top:      1px solid var(--border);
  padding:         28px 40px;
  display:         flex;
  justify-content: center;
  align-items:     center;
  flex-wrap:       wrap;
  gap:            10px 24px;
  text-align:      center;
  font-family:    var(--font-mono);
  font-size:      11px;
  color:          var(--muted);
  letter-spacing: 0.06em;
  position:        relative;
  z-index:         2;
}

footer p {
  margin: 0;
}

footer a.footer-link,
footer a.footer-link:visited,
footer a.footer-link:hover,
footer a.footer-link:active,
footer a.footer-link:focus {
    color: inherit;
    text-decoration: none;
    outline: none;
    background: none;
    border: none;
    box-shadow: none;
    cursor: pointer;
    display: block;
}

footer a.footer-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.btn-primary {
  display:         inline-flex;
  align-items:     center;
  gap:             8px;
  font-family:     var(--font-mono);
  font-size:       12px;
  letter-spacing:  0.12em;
  text-transform:  uppercase;
  color:           var(--bg);
  background:      var(--accent);
  padding:         14px 28px;
  border-radius:   3px;
  text-decoration: none;
  border:          none;
  cursor:          pointer;
  transition:      background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: #5ff8d8;
  transform:  translateY(-2px);
  box-shadow: 0 8px 30px rgba(58,240,200,0.25);
}

.btn-secondary {
  display:         inline-flex;
  align-items:     center;
  gap:             8px;
  font-family:     var(--font-mono);
  font-size:       12px;
  letter-spacing:  0.12em;
  text-transform:  uppercase;
  color:           var(--muted);
  border:          1px solid var(--border);
  padding:         14px 28px;
  border-radius:   3px;
  text-decoration: none;
  transition:      border-color 0.2s, color 0.2s, transform 0.2s;
}

.btn-secondary:hover {
  border-color: rgba(58,240,200,0.3);
  color:        var(--accent);
  transform:    translateY(-2px);
}

.tag {
  font-family:    var(--font-mono);
  font-size:      11px;
  padding:        5px 12px;
  border:         1px solid var(--border);
  border-radius:  3px;
  color:          var(--muted);
  letter-spacing: 0.08em;
  background:     rgba(255,255,255,0.02);
  transition:     border-color 0.2s, color 0.2s, background 0.2s;
}

.tag:hover {
  border-color: rgba(58,240,200,0.3);
  color:        var(--accent);
  background:   rgba(58,240,200,0.05);
}

.chip {
  font-family:    var(--font-mono);
  font-size:      10px;
  padding:        3px 9px;
  border-radius:  2px;
  letter-spacing: 0.08em;
}

.chip--green {
  background: rgba(58,240,200,0.06);
  border:     1px solid rgba(58,240,200,0.15);
  color:      var(--accent);
}

.chip--blue {
  background: rgba(74,143,255,0.06);
  border:     1px solid rgba(74,143,255,0.15);
  color:      var(--accent2);
}

.chip--red {
  background: rgba(255,78,106,0.06);
  border:     1px solid rgba(255,78,106,0.15);
  color:      var(--accent3);
}

.chip--orange {
  background: rgba(255,154,60,0.06);
  border:     1px solid rgba(255,154,60,0.15);
  color:      var(--accent4);
}

.wip-badge {
  display:       inline-flex;
  align-items:   center;
  gap:           6px;
  font-family:   var(--font-mono);
  font-size:     10px;
  color:         var(--accent4);
  background:    rgba(255,154,60,0.08);
  border:        1px solid rgba(255,154,60,0.2);
  padding:       3px 10px;
  border-radius: 2px;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  width:         fit-content;
}

.wip-badge::before {
  content:       '';
  width:         6px;
  height:        6px;
  border-radius: 50%;
  background:    var(--accent4);
}

.project-card {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  min-height:            360px;
  background:            var(--surface);
  border:                1px solid var(--border);
  border-radius:         6px;
  overflow:              hidden;
  margin-bottom:         20px;
  transition:            border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.project-card:hover {
  border-color: rgba(58,240,200,0.2);
  box-shadow:   0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(58,240,200,0.05);
  transform:    translateY(-3px);
}

.project-card--reverse {
  direction: rtl;
}

.project-card--reverse > * {
  direction: ltr;
}

.project-cover {
  position:   relative;
  overflow:   hidden;
  background: var(--bg2);
  cursor:     pointer;
}

.project-cover__img {
  width:      100%;
  height:     100%;
  object-fit: cover;
  display:    block;
  transition: transform 0.5s ease;
}

.project-cover:hover .project-cover__img {
  transform: scale(1.04);
}

.project-cover__overlay {
  position:        absolute;
  inset:           0;
  background:      rgba(6,8,16,0.45);
  display:         flex;
  flex-direction:  column;
  align-items:     center;
  justify-content: center;
  gap:             10px;
  opacity:         0;
  transition:      opacity 0.25s;
}

.project-cover:hover .project-cover__overlay {
  opacity: 1;
}

.project-cover__play {
  width:           56px;
  height:          56px;
  border-radius:   50%;
  border:          1px solid rgba(58,240,200,0.6);
  background:      rgba(58,240,200,0.12);
  display:         flex;
  align-items:     center;
  justify-content: center;
  color:           var(--accent);
}

.project-cover__label {
  font-family:    var(--font-mono);
  font-size:      11px;
  color:          var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.project-cover__count {
  position:       absolute;
  top:            12px;
  right:          12px;
  font-family:    var(--font-mono);
  font-size:      10px;
  color:          var(--bg);
  background:     var(--accent);
  padding:        3px 8px;
  border-radius:  2px;
  letter-spacing: 0.08em;
}

.project-cover--empty {
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-family:     var(--font-mono);
  font-size:       11px;
  color:           var(--muted);
  letter-spacing:  0.1em;
  cursor:          default;
}

.project-info {
  padding:         44px;
  display:         flex;
  flex-direction:  column;
  justify-content: center;
}

.project-category {
  font-family:    var(--font-mono);
  font-size:      10px;
  color:          var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom:  12px;
}

.project-title {
  font-family:    var(--font-disp);
  font-weight:    800;
  font-size:      28px;
  color:          #fff;
  letter-spacing: -0.02em;
  margin-bottom:  4px;
}

.project-subtitle {
  font-family:    var(--font-mono);
  font-size:      11px;
  color:          var(--muted);
  letter-spacing: 0.06em;
  margin-bottom:  18px;
}

.project-desc {
  font-size:     14px;
  color:         var(--muted);
  line-height:   1.7;
  margin-bottom: 20px;
}

.project-bullets {
  list-style:    none;
  margin-bottom: 24px;
}

.project-bullets li {
  font-size:   13px;
  color:       #8a9bc0;
  padding:     4px 0 4px 16px;
  position:    relative;
  line-height: 1.5;
}

.project-bullets li::before {
  content:     '>';
  position:    absolute;
  left:        0;
  color:       var(--accent);
  font-family: var(--font-mono);
  font-size:   11px;
  top:         5px;
}

.project-stack {
  display:   flex;
  flex-wrap: wrap;
  gap:       6px;
}

.project-cover--repo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s, background 0.25s;
}

.project-cover--repo span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.project-cover--repo:hover {
  color: var(--accent);
  background: rgba(58,240,200,0.04);
}

.lightbox {
  position:        fixed;
  inset:           0;
  z-index:         1000;
  background:      rgba(6,8,16,0.96);
  display:         none;
  flex-direction:  column;
  align-items:     center;
  justify-content: center;
  overflow-y:      auto;
  backdrop-filter: blur(8px);
}

.lightbox.open {
  display: flex;
}

.lightbox__inner {
  position:       relative;
  width:          90vw;
  max-width:      1080px;
  display:        flex;
  flex-direction: column;
  gap:            14px;
  animation:      lb-in 0.2s ease;
  margin:         auto;
}

.lightbox__header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
}

.lightbox__title {
  font-family:    var(--font-mono);
  font-size:      12px;
  color:          var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lightbox__counter {
  font-family:    var(--font-mono);
  font-size:      11px;
  color:          var(--muted);
  letter-spacing: 0.1em;
}

.lightbox__close {
  background:     none;
  border:         1px solid var(--border);
  color:          var(--muted);
  font-family:    var(--font-mono);
  font-size:      12px;
  padding:        6px 14px;
  cursor:         pointer;
  border-radius:  3px;
  letter-spacing: 0.1em;
  transition:     color 0.2s, border-color 0.2s;
}

.lightbox__close:hover {
  color:        var(--accent);
  border-color: rgba(58,240,200,0.3);
}

.lightbox__viewer {
  position:        relative;
  width:           100%;
  aspect-ratio:    16/9;
  background:      var(--bg2);
  border:          1px solid var(--border);
  border-radius:   4px;
  overflow:        hidden;
  display:         flex;
  align-items:     center;
  justify-content: center;
}

.lightbox__viewer img,
.lightbox__viewer video.lb-media-frame,
.lightbox__viewer iframe.lb-media-frame {
  width:      100%;
  height:     100%;
  object-fit: contain;
  border:     none;
  display:    block;
}

.lightbox__viewer iframe.lb-media-frame {
  object-fit: unset;
}

.lb-gist-frame {
  width:   100%;
  height:  100%;
  border:  none;
  display: block;
}

.lightbox__arrow {
  position:        absolute;
  top:             50%;
  transform:       translateY(-50%);
  background:      rgba(6,8,16,0.7);
  border:          1px solid var(--border);
  color:           var(--muted);
  font-family:     var(--font-mono);
  font-size:       18px;
  width:           40px;
  height:          40px;
  cursor:          pointer;
  border-radius:   3px;
  display:         flex;
  align-items:     center;
  justify-content: center;
  transition:      color 0.2s, border-color 0.2s, background 0.2s;
  z-index:         2;
}

.lightbox__arrow:hover {
  color:        var(--accent);
  border-color: rgba(58,240,200,0.3);
  background:   rgba(58,240,200,0.08);
}

.lightbox__arrow--prev {
  left: 12px;
}

.lightbox__arrow--next {
  right: 12px;
}

.lightbox__arrow[hidden] {
  display: none;
}

.lightbox__caption {
  text-align:     center;
  font-family:    var(--font-mono);
  font-size:      11px;
  color:          var(--muted);
  letter-spacing: 0.1em;
  min-height:     18px;
  padding:        2px 0;
}

.lightbox__thumbs {
  display:          flex;
  gap:              8px;
  overflow-x:       auto;
  padding-bottom:   4px;
  scrollbar-width:  thin;
  scrollbar-color:  var(--border) transparent;
}

.lightbox__thumb {
  flex-shrink:   0;
  width:         96px;
  height:        60px;
  border-radius: 3px;
  overflow:      hidden;
  border:        2px solid transparent;
  cursor:        pointer;
  position:      relative;
  transition:    border-color 0.2s;
  background:    var(--bg2);
}

.lightbox__thumb.active {
  border-color: var(--accent);
}

.lightbox__thumb:hover:not(.active) {
  border-color: rgba(58,240,200,0.3);
}

.lightbox__thumb img {
  width:      100%;
  height:     100%;
  object-fit: cover;
  display:    block;
}

.lightbox--thumb--video::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(6,8,16,0.4) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233af0c8'%3E%3Cpolygon points='8,5 19,12 8,19'/%3E%3C/svg%3E") center/20px no-repeat;
}

.lightbox--thumb--gist {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg2);
    border: 2px solid rgba(74,143,255,0.2);
    width: auto;
    min-width: 80px;
    padding: 0 12px;
}

.lightbox--thumb--gist span {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
}

.lightbox--thumb--gist.active {
  border-color: var(--accent2);
}

.lightbox--thumb--gist.active span {
  color: var(--accent2);
}

.lightbox--thumb--gist:hover:not(.active) {
  border-color: rgba(74,143,255,0.4);
}

@media (max-width: 768px) {
  nav {
    padding: 16px 20px;
  }

  .nav-links {
    display: none;
  }

  .wrapper {
    padding: 0 20px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: none;
  }

  .project-card {
    grid-template-columns: 1fr;
    min-height:            auto;
  }

  .project-card--reverse {
    direction: ltr;
  }

  .project-cover {
    height: 220px;
  }

  .project-info {
    padding: 28px 24px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap:                   40px;
  }

  footer {
    flex-direction: column;
    gap:            10px;
    text-align:     center;
  }

  .lightbox__inner {
    width: 96vw;
  }

  .lightbox__thumb {
    width:  72px;
    height: 46px;
  }

  .lightbox-gist {
    padding: 20px 0;
  }
}

/* Snake highlights for attention */
.hl-word {
  display:    inline;
  position:   relative;
  border-radius: 3px;
  white-space: nowrap;
  transition: color 0.35s linear, text-shadow 0.35s linear;
}

.hl-word::before {
  content: '';
  position: absolute;
  inset: -2px;
  padding: 2px;
  border-radius: 5px;
  background: conic-gradient( from var(--snake-angle, 0deg), transparent 0%, transparent 55%, rgba(58,240,200,0.12) 67%, rgba(58,240,200,0.55) 80%, var(--accent) 92%, var(--accent) 100% );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.45s linear;
}

.hl-word.snake-active {
  color: var(--accent);
  text-shadow: 0 0 18px rgba(58,240,200,0.5);
}

.hl-word.snake-active::before {
  opacity: 1;
}

@keyframes snake-pop-out {
  0% {
      opacity: 1;
      filter: brightness(1);
  }
  
  30% {
      opacity: 1;
      filter: brightness(5) saturate(0.2);
  }
  
  100% {
      opacity: 0;
      filter: brightness(1);
  }
}

@keyframes snake-pop-in {
  0% {
      filter: brightness(5) saturate(0.2);
  }
  
  60% {
      filter: brightness(2);
  }
  
  100% {
      filter: brightness(1);
  }
}

@keyframes snake-word-pop-out {
  0% {
  }
  
  30% {
      color: #fff;
      text-shadow: 0 0 40px #fff, 0 0 70px rgba(58,240,200,0.9);
  }
  
  100% {
      color: var(--muted);
      text-shadow: none;
  }
}

@keyframes snake-word-pop-in {
  0% {
      color: #fff;
      text-shadow: 0 0 50px #fff, 0 0 90px rgba(58,240,200,1);
  }
  
  100% {
      color: var(--accent);
      text-shadow: 0 0 18px rgba(58,240,200,0.5);
  }
}

.hl-word.snake-flash-out {
  animation: snake-word-pop-out var(--flash-dur, 0.52s) linear forwards;
}

.hl-word.snake-flash-out::before {
  animation: snake-pop-out var(--flash-dur, 0.52s) linear forwards;
  transition: none;
}

.hl-word.snake-flash-in {
  animation: snake-word-pop-in var(--flash-dur, 0.52s) linear forwards;
}

.hl-word.snake-flash-in::before {
  animation: snake-pop-in var(--flash-dur, 0.52s) linear forwards;
  opacity: 1;
  transition: none;
}

/* Projects as two columns of tiles that open in place. The eight cards used to run as one alternating
   list four screens long, which put the last project below anything a visitor would scroll to. */
.project-columns {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   40px;
  align-items:           start;
}

.column-head {
  display:       flex;
  align-items:   center;
  gap:           14px;
  margin-bottom: 18px;
}

.column-head__n {
  font-family:    var(--font-mono);
  font-size:      11px;
  letter-spacing: 0.2em;
  color:          var(--accent2);
}

.column-head__t {
  font-family: var(--font-disp);
  font-weight: 700;
  font-size:   17px;
  color:       var(--text);
}

.column-head__line {
  flex:       1;
  height:     1px;
  background: var(--border);
}

/* <details> and not a click handler: it opens with no JavaScript, it is reachable from the keyboard,
   and a browser's find-in-page can still see the text inside a closed one. */
.tile {
  border:        1px solid var(--border);
  border-radius: 3px;
  background:    var(--surface);
  margin-bottom: 10px;
}

.tile[open] {
  border-color: var(--accent2);
}

.tile__head {
  display:     flex;
  align-items: center;
  gap:         12px;
  padding:     14px 16px;
  cursor:      pointer;
  list-style:  none;
}

.tile__head::-webkit-details-marker { display: none; }

/* The marker is drawn rather than taken from the browser, so it can turn with the tile. */
.tile__head::after {
  content:    '';
  margin-left: auto;
  width:      7px;
  height:     7px;
  border-right:  1px solid var(--muted);
  border-bottom: 1px solid var(--muted);
  transform:  rotate(45deg);
  transition: transform .18s ease, border-color .18s ease;
}

.tile[open] .tile__head::after {
  transform:     rotate(-135deg);
  border-color:  var(--accent);
}

.tile__head:hover { background: rgba(80,160,255,0.04); }

.tile__title {
  display:     flex;
  align-items: center;
  flex-wrap:   wrap;
  gap:         8px 10px;
  font-family: var(--font-disp);
  font-weight: 600;
  font-size:   15px;
  color:       var(--text);
}

.tile__sub {
  font-family: var(--font-mono);
  font-size:   11px;
  color:       var(--muted);
  margin-top:  4px;
}

.tile__body {
  padding:    0 16px 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.tile__body .project-cover {
  margin:        14px 0;
  border-radius: 2px;
  overflow:      hidden;
}

.tile__body .project-desc { margin-bottom: 0; }

@media (max-width: 900px) {
  .project-columns { grid-template-columns: 1fr; gap: 34px; }
}

/* The preview on a closed tile. Fixed size so the whole column lines up down its left edge, and 16:10
   because that is what a YouTube thumbnail and a screenshot both crop to without losing the subject. */
.tile__thumb {
  flex:          0 0 auto;
  width:         64px;
  height:        40px;
  border:        1px solid var(--border);
  border-radius: 2px;
  object-fit:    cover;
  background:    var(--bg2);
}

.tile__thumb--repo {
  display:         flex;
  align-items:     center;
  justify-content: center;
  color:           var(--muted);
}

.tile[open] .tile__thumb { border-color: var(--accent2); }

@media (max-width: 520px) {
  .tile__thumb { width: 48px; height: 30px; }
}

/* On hold reads as muted rather than as a warning. In development is orange because it is a promise;
   this one is the absence of one. */
.wip-badge--hold {
  color:        var(--muted);
  background:   rgba(90,106,138,0.08);
  border-color: rgba(90,106,138,0.22);
}

.wip-badge--hold::before { background: var(--muted); }

/* A fact about the project, next to the state badge. Quieter than IN DEVELOPMENT on purpose: that one is
   a warning, these are labels, and giving them the same weight makes neither of them read. */
.tile__tag {
  font-family:    var(--font-mono);
  font-size:      10px;
  color:          var(--accent);
  background:     rgba(58,240,200,0.07);
  border:         1px solid rgba(58,240,200,0.2);
  padding:        3px 9px;
  border-radius:  2px;
  letter-spacing: 0.1em;
  white-space:    nowrap;
}

/* Beside the tags in the header, because that is where a reader looks for something to click. Sized to
   match a tag so the row reads as one strip rather than a label and a button. */
.tile__repo {
  display:         inline-flex;
  align-items:     center;
  gap:             6px;
  padding:         3px 9px;
  border:          1px solid rgba(74,143,255,0.3);
  border-radius:   2px;
  background:      rgba(74,143,255,0.08);
  color:           var(--accent2);
  text-decoration: none;
  font-family:     var(--font-mono);
  font-size:       10px;
  letter-spacing:  0.1em;
  white-space:     nowrap;
}

.tile__repo:hover {
  border-color: var(--accent2);
  background:   rgba(74,143,255,0.18);
}

.tile__repo svg { width: 12px; height: 12px; }


/* The status badge carries a 16px bottom margin from the old card layout, where it sat above the
   category line. In the header row that margin is not spacing, it is a half-margin nudge upward against
   align-items:center - which is why ON HOLD floated 8px above the GITHUB button beside it. */
.tile__title .wip-badge {
  margin-bottom: 0;
}

/* One dropdown in the nav. A <details> rather than a click handler on a div: it opens from the keyboard,
   it needs no state of its own, and the only JS is the two things <details> genuinely cannot do - close
   when you click elsewhere, and close on Escape. */
.nav-drop {
  position: relative;
}

.nav-drop > summary {
  font-family:     var(--font-mono);
  font-size:       12px;
  color:           var(--muted);
  letter-spacing:  0.1em;
  text-transform:  uppercase;
  cursor:          pointer;
  list-style:      none;
  display:         flex;
  align-items:     center;
  gap:             7px;
  transition:      color 0.2s;
}

.nav-drop > summary::-webkit-details-marker { display: none; }

.nav-drop > summary::after {
  content:       '';
  width:         5px;
  height:        5px;
  border-right:  1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform:     rotate(45deg) translate(-1px, -1px);
  transition:    transform 0.18s ease;
}

.nav-drop[open] > summary::after { transform: rotate(-135deg) translate(-1px, -1px); }

.nav-drop > summary:hover,
.nav-drop[open] > summary { color: var(--accent); }

.nav-drop__menu {
  position:        absolute;
  top:             calc(100% + 14px);
  right:           0;
  min-width:       190px;
  padding:         6px;
  border:          1px solid var(--border);
  border-radius:   3px;
  background:      rgba(11,15,26,0.97);
  backdrop-filter: blur(12px);
}

.nav-drop__menu a {
  display:         flex;
  align-items:     baseline;
  justify-content: space-between;
  gap:             14px;
  padding:         9px 11px;
  border-radius:   2px;
  color:           var(--text);
  text-transform:  none;
  font-size:       12.5px;
  font-family:     var(--font-body);
  letter-spacing:  0;
}

.nav-drop__menu a:hover { background: rgba(80,160,255,0.08); color: var(--accent); }

.nav-drop__menu a span {
  font-family:    var(--font-mono);
  font-size:      10px;
  color:          var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-drop__head {
  padding:        8px 11px 4px;
  font-family:    var(--font-mono);
  font-size:      10px;
  color:          var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* The three plain links are inline, so their box is the glyphs; the Plugins summary is a flex box, so it
   fills the whole line. That is a 7px difference in where each one starts, and no amount of padding fixes
   it because the two are measured differently. Same display, same box, aligned by construction. */
.nav-links > li {
  display:     flex;
  align-items: center;
}

.nav-links > li > a,
.nav-drop > summary {
  display:     flex;
  align-items: center;
  line-height: 1;
}

/* Local videos use lightweight posters until the visitor presses play. */
.project-column,
.tile__head > div {
  min-width: 0;
}

.tile__head::after {
  flex-shrink: 0;
}

button.project-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  padding: 0;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
}

.project-cover--video .project-cover__overlay {
  opacity: 1;
  background: linear-gradient(transparent 50%, rgba(6,8,16,0.85));
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-end;
  padding: 16px;
}

.project-cover--video .project-cover__play {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: rgba(6,8,16,0.75);
}

.project-cover--video .project-cover__label {
  padding-bottom: 11px;
  letter-spacing: 0.06em;
}

button.project-cover:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.tile__body .project-desc + .project-desc {
  margin-top: 14px;
}

.tile__body .project-desc {
  color: #a5b1c9;
}

.lightbox__viewer video.lb-media-frame {
  background: #000;
}

.lightbox__caption {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: normal;
}
