@import url("site-lib/styles/theme.css");

:root {
  /* Core colors linked directly to site-lib/styles/theme.css */
  --bg: #272B34;
  --panel: #272B34;
  --panel-2: var(--background-secondary-alt, #1a1e24);
  --text: var(--text-normal, #DCDDDE);
  --muted: var(--text-muted, #888888);
  --accent: var(--text-accent, #61AFEF);
  --accent-light: var(--text-accent-hover, #70BDFC);
  --accent-dark: var(--text-accent, #4C79CD);
  --chip: var(--interactive-normal, #20242B);
  --chip-border: var(--background-modifier-border, #424958);
  --divider: var(--background-modifier-border, #404754);
  --card: var(--background-secondary, #252A32);
  --card-hover: var(--interactive-hover, #2D3138);
  --clickable-hover: var(--interactive-hover, #353B47);
  
  /* Complementary colors from Atom theme */
  --success: var(--green, #98C379);
  --warning: var(--yellow, #E5C07B);
  --error: var(--red, #E06C75);
  --info: var(--blue, #56B6C2);
  
  /* Typography - Standardized hierarchy */
  --font-h1: 44px;         /* Largest - Sidebar name */
  --font-h2: 32px;         /* Section titles */
  --font-h3: 18px;         /* Subsection titles, card titles */
  --font-h4: 16px;         /* Subheadings, tagline, category labels */
  --font-body: 15px;       /* Standard body text, paragraphs */
  --font-small: 14px;      /* Labels, secondary text, cards */
  --font-xs: 13px;         /* Chips, metadata */
  
  /* Font weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* UI variables */
  --radius: 6px;
  --gap: 24px;
  --shadow: 0 4px 12px rgba(0,0,0,0.3);
  --glow: 0 0 10px rgba(97, 175, 239, 0.15);
  --transition: all 0.2s ease-in-out;
  
  /* Special cases */
  --dropdown-bg: #3B3B3B;  /* specialization dropdown */
  --dropdown-text: #DCDDDE;
}

/* Development Modal */
.dev-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.dev-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.dev-modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--panel);
  border: 1px solid var(--chip-border);
  border-radius: 12px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease-out;
  z-index: 2001;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate(-50%, -45%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.dev-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dev-modal-close:hover {
  color: var(--text);
}

.dev-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dev-modal-body h2 {
  margin: 0;
  color: var(--text);
  font-size: var(--font-h3);
  font-weight: var(--font-weight-semibold);
}

.dev-modal-body p {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-body);
  line-height: 1.5;
}

.dev-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.dev-modal-feedback,
.dev-modal-dismiss {
  flex: 1;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: var(--font-small);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
}

.dev-modal-feedback {
  background: rgba(97, 175, 239, 0.15);
  border-color: rgba(97, 175, 239, 0.4);
  color: var(--accent);
}

.dev-modal-feedback:hover {
  background: rgba(97, 175, 239, 0.25);
  border-color: var(--accent);
}

.dev-modal-dismiss {
  background: var(--chip);
  border-color: var(--chip-border);
  color: var(--text);
}

.dev-modal-dismiss:hover {
  background: var(--clickable-hover);
  border-color: var(--accent);
}

.dev-modal.hidden {
  display: none;
}

@media (max-width: 640px) {
  .dev-modal-content {
    width: 95%;
    padding: 24px;
  }

  .dev-modal-body h2 {
    font-size: var(--font-h4);
  }

  .dev-modal-actions {
    flex-direction: column;
  }
}

/* Add this to your existing CSS */
body {
  position: relative;
  overflow-x: hidden; /* Prevent horizontal scrollbar */
  overflow-y: auto;   /* Keep vertical scrollbar when needed */
}

.cursor-halo {
  position: fixed;
  width: 180vmax; /* Uses viewport max dimension for responsive size */
  height: 180vmax;
  border-radius: 50%;
  background: radial-gradient(
    circle, 
    rgba(77, 159, 255, 0.02) 0%, 
    rgba(77, 159, 255, 0.008) 30%,
    rgba(77, 159, 255, 0) 70%
  );
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.6s ease;
  will-change: transform; /* Optimizes animation performance */
}

/* CV Modal Styles */
.cv-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cv-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

.cv-modal-content {
  position: relative;
  width: 90%;
  height: 90vh;
  max-width: 1000px;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 1001;
  display: flex;
  flex-direction: column;
}

.cv-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: var(--clickable-hover);
  border: none;
  border-radius: 50%;
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002;
  transition: var(--transition);
}

.cv-modal-close:hover {
  background: var(--accent);
  color: var(--bg);
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .cv-modal-content {
    width: 95%;
    height: 95vh;
  }
  
  .cv-modal-close {
    width: 36px;
    height: 36px;
    font-size: 24px;
  }
}

/* Only show halo on desktop */
@media (min-width: 981px) {
  body:hover .cursor-halo {
    opacity: 0.3; /* Very subtle visibility */
  }

  aside.sidebar {
    position: sticky;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure full viewport height */
  }
  
  .sidebar-content {
    position: relative;
    flex-grow: 1; /* Pushes icons to bottom */
  }
}

* { box-sizing: border-box }
html, body { height: 100% }
html { scroll-padding-top: 16px }
body{
  margin:0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: var(--font-body);
  font-weight: var(--font-weight-normal);
  color:var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* ---- Layout ---- */
.app {
  display: flex;
  min-height: 100vh;
  position: relative;
  background-color: #272B34;
  max-width: 1440px;
  margin: 0 auto;
}

/* Left side glow effect */
.app::before {
  content: "";
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, rgba(97, 175, 239, 0.3) 25%, rgba(97, 175, 239, 0.3) 75%, transparent 100%);
  box-shadow: 20px 0 40px rgba(97, 175, 239, 0.15), inset -20px 0 40px rgba(97, 175, 239, 0.1);
  pointer-events: none;
  z-index: 10;
}

/* Right side glow effect */
.app::after {
  content: "";
  position: fixed;
  right: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, rgba(97, 175, 239, 0.3) 25%, rgba(97, 175, 239, 0.3) 75%, transparent 100%);
  box-shadow: -20px 0 40px rgba(97, 175, 239, 0.15), inset 20px 0 40px rgba(97, 175, 239, 0.1);
  pointer-events: none;
  z-index: 10;
}

aside.sidebar {
  width: 32%;
  min-width: 320px;
  max-width: 440px;
  padding: 48px 28px 48px 36px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: #272B34 !important;
  flex-shrink: 0;
}

/* Sidebar content wrapper to push icons and last updated to bottom */
.sidebar-collapsible {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Add a small left offset to all sidebar content blocks except the icons row */
#sidebarContent > *:not(.icons-wrapper) {
  margin-left: 3px;
}

main.content {
  flex: 1 1 auto;
  min-height: 100vh;
  padding: 48px 48px 48px 48px;
  background-color: #272B34 !important;
}

/* ---- Sidebar ---- */
h1 {
  font-size: var(--font-h1);
  font-weight: var(--font-weight-bold);
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
  color: var(--text);
}

.title { 
  color: var(--muted); 
  margin: 0 0 24px 0; 
  font-size: clamp(0.78rem, 1.1vw, 0.95rem);
  font-weight: var(--font-weight-medium);
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 0.35em;
  align-items: center;
}

.subtitle-word {
  color: var(--muted);
  transition: color 0.6s ease;
}

.subtitle-word.active-cybersecurity {
  color: #4ade80; /* Clean terminal green */
}

.subtitle-word.active-it-support {
  color: #38bdf8; /* Clean data blue */
}

.subtitle-word.active-cloud {
  color: #fbbf24; /* Warm amber for cloud */
}

.subtitle-word.active-data-analyst {
  color: #c084fc; /* Purple for data */
}

.tagline { 
  color: var(--muted); 
  font-style: italic; 
  margin: 0 0 20px 0;
  font-size: var(--font-h4);
  font-weight: var(--font-weight-normal);
}

.field { 
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px 0;
}

.field label { 
  color: var(--muted); 
  font-size: var(--font-small);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.5px;
  white-space: nowrap;
  margin-bottom: 0;
}

.select {
  appearance: none;
  width: 100%;
  background: var(--chip, #20242B);
  color: var(--text, #DCDDDE);
  border: 1px solid var(--chip-border, #424958);
  padding: 10px 36px 10px 14px;
  border-radius: 8px;
  font-size: var(--font-small);
  background-image:
      linear-gradient(45deg, transparent 50%, #888888 50%),
      linear-gradient(135deg, #888888 50%, transparent 50%);
  background-position:
      calc(100% - 20px) 50%,
      calc(100% - 12px) 50%;
  background-size: 7px 7px, 7px 7px;
  background-repeat: no-repeat;
  transition: all 0.2s ease;
  min-width: 150px;
  cursor: pointer;
}

.select:hover:not(:focus) {
  background-color: var(--clickable-hover, #353B47);
  color: #FFFFFF;
  border-color: var(--accent, #61AFEF);
  background-image:
      linear-gradient(45deg, transparent 50%, #61AFEF 50%),
      linear-gradient(135deg, #61AFEF 50%, transparent 50%);
}

.select:focus {
  border-color: var(--accent, #61AFEF);
  box-shadow: 0 0 0 2px rgba(97, 175, 239, 0.2);
  outline: none;
}

/* Brittany Chiang Sticky In-Page Nav Menu */
.nav-menu {
  margin: 20px 0;
  display: block;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nav-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  padding: 4px 0;
  cursor: pointer;
  width: fit-content;
}

.nav-line {
  display: inline-block;
  width: 24px;
  height: 1px;
  background-color: var(--muted, #888888);
  margin-right: 12px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted, #888888);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover .nav-line,
.nav-link.active .nav-line {
  width: 48px;
  background-color: var(--text-accent, #61afef);
}

.nav-link:hover .nav-text,
.nav-link.active .nav-text {
  color: var(--text, #dcddde);
}

/* Portfolio Stats Container (Vertically centered in sidebar) */
#portfolioStatsContainer {
  margin-top: auto;
  margin-bottom: auto;
}

.portfolio-stats {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stats-title {
  font-size: var(--font-small);
  font-weight: var(--font-weight-semibold);
  color: var(--muted, #888888);
  margin: 0 0 6px 0;
  letter-spacing: 0.5px;
}

.stats-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-small);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.stat-label {
  color: var(--muted, #888888);
}

.stat-value {
  color: var(--text, #DCDDDE);
  font-weight: var(--font-weight-bold);
}

#lastUpdatedContainer {
  margin-top: auto;
  margin-bottom: 12px;
  font-size: var(--font-xs);
  color: var(--muted, #888888);
}

.icons-wrapper { 
  display: flex; 
  gap: 12px;
  padding-top: 12px;
  margin-top: 0;
  flex-direction: row;
  flex-shrink: 0;
  align-items: center;
}

.icons-wrapper > a.icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  padding: 8px;
  box-sizing: border-box;
  background: var(--chip, #20242B);
  border: 1px solid var(--chip-border, #424958);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text, #DCDDDE);
  transition: all 0.2s ease;
}

.icons-wrapper > a.icon:hover {
  background: var(--clickable-hover, #353B47);
  border-color: var(--accent, #61AFEF);
  color: var(--accent, #61AFEF);
  transform: translateY(-2px);
}

.icons-wrapper > button.icon {
  height: 42px;
  flex-grow: 1;
  padding: 0 16px;
  box-sizing: border-box;
  background: transparent;
  border: 1px solid var(--accent, #61AFEF);
  color: var(--accent, #61AFEF);
  border-radius: 8px;
  font-size: var(--font-small);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all 0.2s ease;
}

.icons-wrapper > button.icon:hover {
  background: var(--accent, #61AFEF);
  color: var(--bg, #272B34);
  box-shadow: 0 4px 12px rgba(97, 175, 239, 0.3);
  transform: translateY(-2px);
}

.icons-wrapper > a.icon svg {
  width: 20px;
  height: 20px;
}

.stats-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-line {
  display: flex;
  gap: 8px;
  font-size: var(--font-small);
  font-weight: var(--font-weight-bold);
}

.stats-grid {
  display: none;
}

.stat-item {
  display: none;
}

.stat-line {
  display: flex;
  gap: 8px;
  font-size: var(--font-body); /* slightly larger for readability */
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}

.stat-label {
  color: var(--muted);
  font-weight: inherit;
  flex-shrink: 0;
  text-align: right;
  white-space: pre;
}

.stat-value {
  color: var(--text);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-body);
}

.stats-updated {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: baseline;
  font-size: var(--font-small);
  margin-top: 16px;
}

.updated-label {
  color: var(--muted);
  font-size: var(--font-small);
  font-weight: var(--font-weight-normal);
}

.updated-date {
  color: var(--muted);
  font-size: var(--font-small);
  font-weight: var(--font-weight-normal);
  letter-spacing: normal;
}

/* Only icons-wrapper needs margin-top: auto !important in base styles */

@media (min-width: 981px) and (max-height: 800px) {
  /* Compact spacing for shorter screens */
  h1 { font-size: 36px; margin-bottom: 4px; }
  .title { font-size: 16px; margin-bottom: 8px; }
  .tagline { font-size: 14px; margin-bottom: 16px; }
  .field { margin: 12px 0 8px 0; }
  
  .icon {
    width: 38px; /* Slightly smaller icons */
    height: 38px;
  }
  
  .icon svg {
    width: 18px;
    height: 18px;
  }
}

.icon {
  width: 44px; 
  text-decoration: none;
  color: #888888;
  
  height: 44px; 
  border-radius: 6px;
  display: grid; 
  place-items: center;
  background: var(--chip);
  border: 1px solid var(--chip-border);
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  font: inherit;
  cursor: pointer;
  flex-shrink: 0; /* Keep icons at fixed square size */
  padding: 8px;
  box-sizing: border-box;
}

.icon svg {
  width: 22px;
  height: 22px;
  color: #888888;
  transition: color 0.2s ease;
}

.icon:hover {
  color: #DCDDDE;
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

.icon:hover svg {
  color: #DCDDDE;
}

.icon:focus {
  border-color: var(--accent);
  outline: none;
}

/* Allow View CV button to shrink while keeping icons at full size */
#download-cv {
  flex-grow: 1; /* Expand to fill available space */
  flex-shrink: 1;
  min-width: 75px !important; /* Allow shrinking but keep text on one line */
}

#download-cv:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

/* ---- Content / Sections ---- */
section{ 
  margin:0 0 56px 0;
  position: relative;
}

#about {
  padding-top: 6px;
}

@media (min-width: 981px) {
  #about {
    padding-top: 14px;
  }
}

.section-title{
  font-size: var(--font-h2);
  font-weight: var(--font-weight-bold);
  margin:0 0 20px 0;
  line-height:1.15;
  color: var(--text);
}

.muted{ color:var(--muted) }

.split-group{ display:grid; gap:16px; margin-bottom:20px }
.split-group h3{
  margin:0; 
  font-size: var(--font-h4);
  font-weight: var(--font-weight-medium);
  color:var(--muted);
  letter-spacing: 0.5px;
}
.tags{ display:flex; flex-wrap:wrap; gap:10px }
.chip{
  text-decoration: none;
  color: #DCDDDE;
  display:inline-flex; 
  align-items:center; 
  gap:8px;
  padding:8px 14px; 
  border-radius:6px;
  background:var(--chip);
  border:1px solid var(--chip-border);
  font-size: var(--font-xs);
  font-weight: var(--font-weight-normal);
  box-shadow: var(--shadow);
  white-space:nowrap;
  transition: all 0.2s ease;
}

#projects .chip {
    box-shadow: none;
  }

.chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

/* Category-specific chip styles */
.chip[data-kind="domain"] {
  color: #888888;
  border: 1px solid rgba(56, 139, 253, 0.4);
}

.chip[data-kind="domain"]:hover {
  color: #888888;
}

.chip[data-kind="concept"] {
  color: #888888;
  border: 1px solid rgba(187, 128, 247, 0.4);
}

.chip[data-kind="concept"]:hover {
  color: #888888;
}

.chip[data-kind="tool"] {
  color: #888888;
  border: 1px solid rgba(152, 195, 121, 0.5);
}

.chip[data-kind="tool"]:hover {
  color: #888888;
}

/* See-all/Show-less button styling */
.chip.see-all {
  font-style: italic;
  opacity: 0.8;
  cursor: pointer;
}

.chip.see-all[data-kind="domain"] {
  color: #888888;
  border: 1px solid rgba(56, 139, 253, 0.4);
}

.chip.see-all[data-kind="domain"]:hover {
  color: #888888;
  opacity: 1;
}

.chip.see-all[data-kind="concept"] {
  color: #888888;
  border: 1px solid rgba(187, 128, 247, 0.4);
}

.chip.see-all[data-kind="concept"]:hover {
  color: #888888;
  opacity: 1;
}

.chip.see-all[data-kind="tool"] {
  color: #888888;
  border: 1px solid rgba(152, 195, 121, 0.5);
}

.chip.see-all[data-kind="tool"]:hover {
  color: #888888;
  opacity: 1;
}

ul.clean{ 
  padding-left:20px; 
  margin:0; 
  display:grid; 
  gap:12px 
}
.card-grid{
  display:flex;
  flex-direction:column;
  gap:20px;
}
.card{
  display:grid;
  grid-template-columns: 120px 1fr;
  grid-template-rows: auto auto auto;
  gap:12px;
  transition: all 0.25s ease-in-out;
  padding: 16px 16px 16px 16px;
  background-color: transparent;
  border: 1px solid #232730;
  border-radius: var(--radius);
}

.card:hover {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: #232730;
  transform: none;
}
.thumb{
  border-radius:6px;
  background: linear-gradient(135deg, #0f1a34 0%, #1a2a4a 100%);
  aspect-ratio: 16 / 9;
  display:grid; 
  place-items:center;
  font-size:12px; 
  color:var(--muted);
  border:1px solid var(--chip-border);
  overflow: hidden;
  grid-row: 1 / 4;
  grid-column: 1;
  width: 120px;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb a {
  display: contents;
}
.card h3{ 
  margin:0; 
  font-size: var(--font-h3);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  grid-row: 1;
  grid-column: 2;
  align-self: flex-start;
}
.card p{ 
  margin:0; 
  color:var(--muted); 
  font-size: var(--font-small);
  font-weight: var(--font-weight-normal);
  line-height:1.5;
  grid-row: 2;
  grid-column: 2;
}
.card .tags{ 
  margin-top:0; 
  padding-top: 0;
  grid-row: 3;
  grid-column: 2;
}

/* Rainbow animated highlight */
.highlight {
  background: linear-gradient(
    90deg,
    #ff6b6b,
    #feca57,
    #48dbfb,
    #1dd1a1,
    #5f27cd,
    #ff6b6b
  );
  background-size: 400% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: bold;
  animation: rainbowMove 8s linear infinite;
}

/* Mobile styles 980px and below */
@media (max-width: 980px){
  body {
    background: var(--bg);
  }

  #portfolioStatsContainer,
  #lastUpdatedContainer,
  .nav-menu {
    display: none !important;
  }

  aside.sidebar{
    position:static;
    width:100%;
    max-width:none;
    padding:24px 16px;
    height:auto;
    display: block; /* Reset flex on mobile */
  }

  .sidebar-collapsible {
    display: block; /* Reset flex on mobile */
  }

  .icons-wrapper {
    position: static;
    margin-top: 40px;
    margin-bottom: 24px;
    padding-top: 0; /* Reset padding-top on mobile */
  }

  main.content{
    height:auto;
    overflow:visible;
    padding:24px 16px 64px 16px;
  }

  .app{ display:block }

  /* Card mobile styling */
  .card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    padding: 8px 8px;
    gap: 8px;
  }

  .thumb {
    grid-row: 1;
    grid-column: 1;
    width: 100%;
    height: auto;
  }

  .card h3 {
    grid-row: 2;
    grid-column: 1;
  }

  .card p {
    grid-row: 3;
    grid-column: 1;
  }

  .card .tags {
    grid-row: 4;
    grid-column: 1;
  }
}

/* collapsible sidebar on very small screens */
.sidebar-top{
  display:none;
  margin:12px 0 6px 0;
}

.toggle{
  display:none;
  border:1px solid var(--chip-border);
  background:var(--chip);
  color:#888888;
  padding:10px 14px;
  border-radius:6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle:hover {
  color: #DCDDDE;
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

@media (max-width: 640px){
  .sidebar-top{ 
    display:flex; 
    gap:10px; 
    align-items:center; 
    justify-content:space-between 
  }

  .toggle{ display:inline-block }
  .sidebar-collapsible[aria-hidden="true"]{ display:none }
}

/* motion respect */
@media (prefers-reduced-motion: no-preference){
  .card, .icon, .chip, .toggle, .select {
    transition: all 0.2s ease;
  }
}

/* Training list interactive links */
#trainingList li {
  transition: all 0.2s ease;
}

#trainingList a {
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s ease;
}

#trainingList a:hover {
  color: #FFFFFF;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-bg, rgba(255, 255, 255, 0.05));
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb-bg, rgba(255, 255, 255, 0.1));
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-active-thumb-bg, rgba(255, 255, 255, 0.2));
}