/* ═══════════════════════════════════════════════════
   rasheedstarlet.com — Metro UI Design System v2
   Catppuccin Frappé code theme · LigaLex Mono font
   ═══════════════════════════════════════════════════ */

/* ── FONT: LigaLex Mono (ligatures) ── */
@import url('https://fonts.googleapis.com/css2?family=Segoe+UI:wght@300;400;600&display=swap');

@font-face {
  font-family: 'LigaLex Mono';
  src: url('https://cdn.jsdelivr.net/gh/lemunozm/ligalex-mono@main/fonts/LigalexMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ── CATPPUCCIN FRAPPÉ PALETTE ── */
:root {
  /* Metro accent palette */
  --accent:   #0078d4;
  --green:    #008a00;
  --magenta:  #ac008c;
  --amber:    #e3a21a;
  --red:      #d13438;
  --teal:     #038387;
  --grape:    #5c2d91;

  /* Base */
  --bg:       #000;
  --text:     #fff;
  --dim:      rgba(255,255,255,0.45);
  --gap:      6px;

  /* Catppuccin Frappé */
  --ctp-base:    #303446;
  --ctp-mantle:  #292c3c;
  --ctp-crust:   #232634;
  --ctp-surface0:#414559;
  --ctp-surface1:#51576d;
  --ctp-overlay0:#737994;
  --ctp-text:    #c6d0f5;
  --ctp-subtext: #a5adce;
  --ctp-blue:    #8caaee;
  --ctp-lavender:#babbf1;
  --ctp-sapphire:#85c1dc;
  --ctp-sky:     #99d1db;
  --ctp-teal-c:  #81c8be;
  --ctp-green-c: #a6d189;
  --ctp-yellow:  #e5c890;
  --ctp-peach:   #ef9f76;
  --ctp-red-c:   #e78284;
  --ctp-pink:    #f4b8e4;
  --ctp-mauve:   #ca9ee6;
  --ctp-flamingo:#eebebe;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', 'Segoe WP', Tahoma, sans-serif;
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ══════════════════════════════════════
   PAGE WRAPPER — centers on desktop
══════════════════════════════════════ */
.page-wrap {
  max-width: 920px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  border-left:  1px solid #111;
  border-right: 1px solid #111;
}

/* ══════════════════════════════════════
   PER-PAGE BACKGROUND GLOWS
   Each top-level page has a unique
   radial glow that bleeds from top
══════════════════════════════════════ */
.page-wrap::before {
  content: '';
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
  filter: blur(80px);
  /* default — overridden per page */
  background: radial-gradient(circle, var(--page-glow, #0078d4) 0%, transparent 70%);
}

/* Home page — blue */
body.page-home   .page-wrap::before { --page-glow: #0078d4; opacity: 0.13; }
/* Blog page — magenta */
body.page-blog   .page-wrap::before { --page-glow: #ac008c; opacity: 0.11; }
/* Projects — green */
body.page-projects .page-wrap::before { --page-glow: #008a00; opacity: 0.12; }
/* Languages — amber */
body.page-languages .page-wrap::before { --page-glow: #e3a21a; opacity: 0.10; }
/* Posts — teal */
body.page-post   .page-wrap::before { --page-glow: #038387; opacity: 0.10; }

/* Ensure content sits above glow */
.page-wrap > * { position: relative; z-index: 1; }

/* ── STATUS BAR ── */
.status-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 7px 20px 4px;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
}
.status-bar .time { font-size: 14px; letter-spacing: 0.03em; }

/* ── NAV ── */
.metro-nav {
  display: flex;
  padding: 2px 20px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.metro-nav::-webkit-scrollbar { display: none; }
.metro-nav a {
  font-size: 13px;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: var(--dim);
  text-decoration: none;
  padding: 6px 14px 6px 0;
  white-space: nowrap;
  transition: color 0.15s;
}
.metro-nav a:hover  { color: var(--text); }
.metro-nav a.active { color: var(--text); border-bottom: 2px solid var(--accent); }

/* ── PANORAMA HEADER ── */
.panorama-header { padding: 14px 20px 6px; }
.panorama-title {
  font-size: clamp(2.8rem, 12vw, 6.5rem);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.025em;
  white-space: nowrap;
}
.panorama-title .accent { color: var(--accent); }
.panorama-subtitle {
  font-size: 12.5px;
  font-weight: 300;
  color: var(--dim);
  margin-top: 14px;
  max-width: 380px;
  line-height: 1.65;
}
.panorama-subtitle a { color: rgba(255,255,255,0.7); text-underline-offset: 3px; }

/* ── SECTION PIVOT ── */
.section-pivot {
  padding: 26px 20px 10px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.2em;
  color: var(--dim);
}

/* ── TILE GRID ── */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  padding: 0 20px;
}
@media (min-width: 520px) {
  .tile-grid { grid-template-columns: repeat(4, 1fr); }
  .tile-wide { grid-column: span 2 !important; }
  .identity-tile { grid-column: span 4 !important; }
}

/* ── BASE TILE ── */
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px 14px;
  min-height: 90px;
  text-decoration: none;
  color: #fff;
  overflow: hidden;
  border-radius: 0;
  animation: tile-in 0.38s ease both;
  transition: opacity 0.12s;
}
.tile::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.12s;
  pointer-events: none;
}
.tile:hover::after { background: rgba(255,255,255,0.09); }
.tile:active { opacity: 0.72; }

.tile-wide { grid-column: span 2; min-height: 100px; }
.tile-tall { min-height: 160px; }

.tile-glyph    { font-size: 2.4rem; line-height: 1; margin-bottom: 6px; z-index: 1; }
.tile-glyph-sm { font-size: 1.5rem; line-height: 1; margin-bottom: 4px; z-index: 1; }
.tile-title    { font-size: 13px; font-weight: 600; line-height: 1.3; z-index: 1; }
.tile-sub      { font-size: 10.5px; font-weight: 300; color: rgba(255,255,255,0.72); margin-top: 3px; z-index: 1; line-height: 1.4; }
.tile-corner   { position: absolute; top: 9px; right: 11px; font-size: 9.5px; font-weight: 600; color: rgba(255,255,255,0.45); text-transform: lowercase; z-index: 2; }

/* Tile colors */
.cb  { background: var(--accent);  }
.cg  { background: var(--green);   }
.cm  { background: var(--magenta); }
.ca  { background: var(--amber);   }
.cr  { background: var(--red);     }
.ct  { background: var(--teal);    }
.cgr { background: var(--grape);   }
.cd  { background: #222;           }

/* ── IDENTITY TILE ── */
.identity-tile {
  grid-column: span 2;
  min-height: 130px;
  background: var(--accent);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
  animation: tile-in 0.38s ease both;
}
.identity-tile::before {
  content: 'RS';
  position: absolute; right: -10px; bottom: -20px;
  font-size: 10rem; font-weight: 700;
  color: rgba(255,255,255,0.07);
  line-height: 1; letter-spacing: -0.05em;
  pointer-events: none;
}
.identity-tile .name { font-size: clamp(1.4rem,5vw,2rem); font-weight: 300; line-height: 1.1; }
.identity-tile .role { font-size: 11px; font-weight: 300; color: rgba(255,255,255,0.75); margin-top: 6px; letter-spacing: 0.04em; }

/* ── POST LIST ── */
.post-list {
  display: flex; flex-direction: column;
  gap: var(--gap);
  padding: 0 20px 60px;
}
.post-item {
  display: flex; align-items: stretch;
  min-height: 64px;
  text-decoration: none; color: var(--text);
  animation: tile-in 0.38s ease both;
}
.post-num-block {
  width: 48px; min-width: 48px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 300;
  color: rgba(255,255,255,0.25);
  background: #111; flex-shrink: 0;
}
.post-body {
  flex: 1; padding: 10px 14px;
  background: #111;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
  transition: background 0.12s;
}
.post-item:hover .post-body { background: #1a1a1a; }
.post-body::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--stripe-color, #444);
}
.post-title { font-size: 13px; font-weight: 600; line-height: 1.3; }
.post-sub   { font-size: 11px; font-weight: 300; color: var(--dim); margin-top: 3px; line-height: 1.4; }
.post-arrow {
  align-self: center; padding: 0 14px; font-size: 18px;
  color: rgba(255,255,255,0.2);
  background: #111; display: flex; align-items: center; height: 100%;
  transition: color 0.12s;
}
.post-item:hover .post-arrow { color: rgba(255,255,255,0.5); }

/* ── CONNECT TILES ── */
.connect-grid {
  display: grid; grid-template-columns: repeat(2,1fr);
  gap: var(--gap); padding: 0 20px;
}
.connect-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: #111; text-decoration: none; color: var(--text);
  font-size: 13px; font-weight: 600;
  border-left: 3px solid transparent;
  transition: background 0.12s; animation: tile-in 0.38s ease both;
}
.connect-tile:hover { background: #1c1c1c; }
.connect-tile .ct-icon  { font-size: 1.3rem; }
.connect-tile .ct-label { font-size: 11px; font-weight: 300; color: var(--dim); margin-top: 1px; }
.ct-twitter { border-left-color: #1d9bf0; }
.ct-mail    { border-left-color: var(--accent); }
.ct-github  { border-left-color: #f0f6fc; }
.ct-resume  { border-left-color: var(--green); }

/* ── INTERESTS ── */
.interests-list { display: flex; flex-direction: column; gap: var(--gap); padding: 0 20px; }
.interest-row {
  display: flex; align-items: center; min-height: 52px;
  text-decoration: none; color: var(--text);
  animation: tile-in 0.38s ease both;
}
.interest-num {
  width: 42px; min-width: 42px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 300;
  color: rgba(255,255,255,0.25);
  background: #111; align-self: stretch;
}
.interest-body {
  flex: 1; padding: 12px 16px; background: #111;
  position: relative; transition: background 0.12s;
}
.interest-row:hover .interest-body { background: #1c1c1c; }
.interest-body::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--stripe-color, #444);
}
.interest-name { font-size: 13px; font-weight: 600; }
.interest-arrow {
  padding: 0 14px; font-size: 18px;
  color: rgba(255,255,255,0.18); background: #111;
  align-self: stretch; display: flex; align-items: center;
  transition: color 0.12s;
}
.interest-row:hover .interest-arrow { color: rgba(255,255,255,0.5); }

/* ── PROJECTS / LANGUAGES CARDS ── */
.card-list { display: flex; flex-direction: column; gap: var(--gap); padding: 0 20px 60px; }
.card-item {
  display: flex; align-items: stretch; min-height: 70px;
  text-decoration: none; color: var(--text);
  background: #111; border-left: 3px solid var(--accent);
  transition: background 0.12s; animation: tile-in 0.38s ease both;
}
.card-item:hover { background: #1a1a1a; }
.card-body { flex: 1; padding: 14px 16px; }
.card-name { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.card-desc { font-size: 11px; font-weight: 300; color: var(--dim); line-height: 1.5; }
.card-arrow { padding: 0 14px; font-size: 18px; color: rgba(255,255,255,0.2); display: flex; align-items: center; transition: color 0.12s; }
.card-item:hover .card-arrow { color: rgba(255,255,255,0.5); }

/* ── LANG CHIPS ── */
.lang-section { padding: 0 20px 30px; }
.lang-chips   { display: flex; flex-wrap: wrap; gap: 6px; }
.lang-chip {
  padding: 6px 14px; font-size: 12px; font-weight: 600;
  background: #111; border-left: 3px solid var(--accent); white-space: nowrap;
}

/* ══════════════════════════════════════
   ARTICLE / POST PAGE LAYOUT
   Two-column: content + sticky ToC
══════════════════════════════════════ */
.article-page {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0 20px 80px;
  max-width: 920px;
}
@media (min-width: 780px) {
  .article-page {
    grid-template-columns: 1fr 220px;
    gap: 40px;
    padding: 0 20px 80px;
    align-items: start;
  }
}

/* Article content column */
.article-content {}

.article-meta {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: lowercase;
  color: var(--dim); padding-top: 20px; margin-bottom: 10px;
}
.article-title {
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  font-weight: 300; line-height: 1.05; letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.article-subtitle {
  font-size: 13px; font-weight: 300; color: var(--dim);
  margin-bottom: 32px; line-height: 1.6;
}

/* Article body typography */
.article-body {
  font-size: 15px; font-weight: 300;
  line-height: 1.85;
  color: rgba(255,255,255,0.88);
}
.article-body h2 {
  font-size: 1.2rem; font-weight: 600; color: var(--text);
  margin: 2.5rem 0 0.8rem;
  padding-bottom: 6px;
  border-bottom: 1px solid #1f1f1f;
  scroll-margin-top: 24px;
}
.article-body p       { margin-bottom: 1.1rem; }
.article-body ol,
.article-body ul      { padding-left: 1.4rem; margin-bottom: 1.1rem; }
.article-body li      { margin-bottom: 0.6rem; line-height: 1.75; }
.article-body a       { color: var(--accent); text-underline-offset: 3px; }
.article-body strong  { font-weight: 600; color: #fff; }
.article-body em      { color: rgba(255,255,255,0.7); }
.article-body hr      { border: none; border-top: 1px solid #1a1a1a; margin: 2rem 0; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 16px;
  margin: 1.5rem 0;
  color: rgba(255,255,255,0.6); font-style: italic;
}
.article-body img {
  max-width: 100%; border: 1px solid #222; margin: 1rem 0;
}

/* Post nav back link */
.post-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 48px; padding-top: 20px;
  border-top: 1px solid #1a1a1a;
}
.post-nav a {
  font-size: 12px; color: var(--dim); text-decoration: none;
  font-weight: 600; letter-spacing: 0.1em; text-transform: lowercase;
}
.post-nav a:hover { color: var(--text); }
.post-nav .post-num { font-size: 10px; color: var(--dim); letter-spacing: 0.15em; }

/* ══════════════════════════════════════
   TABLE OF CONTENTS SIDEBAR
══════════════════════════════════════ */
.toc-sidebar {
  display: none;
}
@media (min-width: 780px) {
  .toc-sidebar {
    display: block;
    position: sticky;
    top: 24px;
    align-self: start;
    padding-top: 20px;
  }
}

.toc-label {
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: lowercase;
  color: var(--dim); margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #1a1a1a;
}

.toc-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.toc-list li a {
  display: block;
  font-size: 11px; font-weight: 400;
  color: var(--dim);
  text-decoration: none;
  padding: 5px 10px 5px 8px;
  border-left: 2px solid transparent;
  line-height: 1.4;
  transition: color 0.12s, border-color 0.12s;
}
.toc-list li a:hover {
  color: var(--text);
  border-left-color: var(--accent);
}
.toc-list li a.active {
  color: var(--text);
  border-left-color: var(--accent);
}

/* ══════════════════════════════════════
   CODE BLOCKS — Catppuccin Frappé
   Font: LigaLex Mono with ligatures
══════════════════════════════════════ */
code, pre {
  font-family: 'LigaLex Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-variant-ligatures: contextual;
  font-feature-settings: "liga" 1, "calt" 1;
}

/* Inline code */
.article-body code:not(pre code) {
  background: var(--ctp-surface0);
  color: var(--ctp-peach);
  padding: 2px 6px;
  font-size: 0.87em;
  border-radius: 3px;
}

/* Block code */
pre.code-block {
  background: var(--ctp-mantle);
  border: 1px solid var(--ctp-surface0);
  border-radius: 0;
  padding: 20px 20px;
  overflow-x: auto;
  margin: 1.5rem 0;
  position: relative;
}
pre.code-block .code-lang {
  position: absolute; top: 8px; right: 12px;
  font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ctp-overlay0);
}

pre.code-block code {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ctp-text);
  display: block;
}

/* Syntax token colors — Catppuccin Frappé */
.tok-keyword  { color: var(--ctp-mauve); }    /* let, fn, pub, use */
.tok-fn       { color: var(--ctp-blue); }     /* function names */
.tok-type     { color: var(--ctp-yellow); }   /* String, Vec, i32 */
.tok-string   { color: var(--ctp-green-c); }  /* "strings" */
.tok-number   { color: var(--ctp-peach); }    /* 42, 3.14 */
.tok-comment  { color: var(--ctp-overlay0); font-style: italic; } /* // comment */
.tok-variable { color: var(--ctp-text); }
.tok-operator { color: var(--ctp-sky); }
.tok-macro    { color: var(--ctp-peach); }    /* println!, vec! */
.tok-attr     { color: var(--ctp-flamingo); } /* #[derive(...)] */
.tok-lifetime { color: var(--ctp-mauve); font-style: italic; } /* 'a */

/* ── FOOTER ── */
.metro-footer {
  padding: 28px 20px 48px;
  font-size: 11px; color: var(--dim);
  font-weight: 300; letter-spacing: 0.05em;
}

/* ── ANIMATION ── */
@keyframes tile-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.d1  { animation-delay: 0.04s; } .d2  { animation-delay: 0.09s; }
.d3  { animation-delay: 0.14s; } .d4  { animation-delay: 0.19s; }
.d5  { animation-delay: 0.24s; } .d6  { animation-delay: 0.29s; }
.d7  { animation-delay: 0.34s; } .d8  { animation-delay: 0.39s; }
.d9  { animation-delay: 0.44s; } .d10 { animation-delay: 0.49s; }
.d11 { animation-delay: 0.54s; } .d12 { animation-delay: 0.59s; }
