/* --- NEO-BRUTALIST PALETTE & VARIABLES --- */
:root {
  --bg-primary:   #93c5fd; /* Soothing Light Blue */
  --brand-primary:#e84118; /* Pirate Red */
  --accent-yellow:#fbc531; /* Straw Hat Yellow */
  --bg-white: #ffffff;
  --bg-dark: #111111;
  
  --accent-green: #4cd137; /* Zoro Green */
  --accent-red:   #e84118;
  --accent-blue:  #00a8ff; /* Grand Line Cyan */

  --pure-black: #000000;
  --border-thick: 4px solid var(--pure-black);
  --shadow-thick: 8px 8px 0px 0px var(--pure-black);
  --shadow-sm:    4px 4px 0px 0px var(--pure-black);
}

/* --- RESET & BASE --- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html, body {
  width:100%; min-height:100vh;
  font-family:'Outfit', sans-serif;
  background-color: var(--bg-primary);
  background-image: radial-gradient(rgba(0,0,0,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--pure-black);
  overflow-x: clip;
}
/* Noise filter removed for performance on low-end devices */

/* --- HIDE NATIVE SCROLLBAR --- */
::-webkit-scrollbar {
  display: none;
}
html, body {
  scrollbar-width: none;
}

/* --- CUSTOM PISTON SCROLLBAR --- */
#custom-scrollbar-track {
  position: fixed;
  top: 8px; /* below progress bar */
  right: 0;
  width: 24px;
  height: calc(100vh - 8px);
  background: var(--bg-primary);
  border-left: 3px solid var(--pure-black);
  z-index: 9998;
}
#piston-head {
  width: 100%;
  height: 60px;
  background: var(--accent-yellow);
  border-bottom: 4px solid var(--pure-black);
  cursor: grab;
  position: absolute;
  top: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  transition: background 0.2s;
  will-change: transform;
}
#piston-head:active {
  cursor: grabbing;
  background: var(--brand-primary);
}
.piston-grip {
  width: 12px;
  height: 3px;
  background: var(--pure-black);
  border-radius: 2px;
}
#piston-spring {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: calc(100% - 60px);
  background: repeating-linear-gradient(
    0deg,
    var(--pure-black),
    var(--pure-black) 4px,
    #a4b0be 4px,
    #a4b0be 12px
  );
  border-left: 2px solid var(--pure-black);
  border-right: 2px solid var(--pure-black);
  z-index: 1;
  transform-origin: bottom;
  will-change: transform;
}
#spring-release-btn {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: var(--bg-white);
  border: 3px solid var(--pure-black);
  box-shadow: 2px 2px 0 var(--pure-black);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  z-index: 3;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s, box-shadow 0.1s;
}
#spring-release-btn.visible {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}
#spring-release-btn:active {
  transform: translateX(-50%) scale(0.9) translate(2px, 2px);
  box-shadow: 0 0 0 var(--pure-black);
}



/* --- SCROLL PROGRESS BAR --- */
#scroll-progress-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 8px;
  background: transparent;
  z-index: 9999;
  pointer-events: none;
}
#scroll-progress {
  height: 100%; width: 0%;
  background: var(--accent-red);
  border-right: 3px solid var(--pure-black);
  border-bottom: 3px solid var(--pure-black);
  border-bottom-right-radius: 4px;
  will-change: width;
}

/* --- SIDEBAR --- */
.sidebar {
  position: fixed; top: 32px; left: 24px; height: calc(100vh - 64px);
  width: 220px;
  background: var(--brand-primary);
  border: var(--border-thick);
  border-radius: 24px;
  box-shadow: var(--shadow-thick);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 32px 16px;
  z-index: 100;
}
.nav-title {
  font-weight: 900; font-size: 28px; font-style: italic; letter-spacing: 1px;
  color: var(--bg-white);
  text-shadow: 2px 2px 0 var(--pure-black);
  text-align: center;
}
.nav-links {
  display: flex; flex-direction: column; gap: 16px; width: 100%;
}
.nav-btn {
  width: 100%; text-align: center;
  background: var(--bg-white);
  border: 3px solid var(--pure-black);
  border-radius: 25px;
  padding: 10px 16px; font-weight: 800; font-size: 14px;
  cursor: pointer; transition: all 0.1s;
  text-decoration: none; color: var(--pure-black);
  box-shadow: 4px 4px 0 var(--pure-black);
}
.nav-btn:hover {
  background: var(--accent-yellow);
}
.nav-btn:active, .nav-btn.active {
  background: var(--accent-yellow);
}
.nav-date, .nav-clock {
  background: var(--accent-yellow);
  border: 3px solid var(--pure-black);
  border-radius: 4px;
  padding: 10px; font-weight: 800; font-size: 14px;
  font-family: 'JetBrains Mono', monospace;
  display: flex; align-items: center; gap: 8px; width: 100%;
  justify-content: center;
  box-shadow: 4px 4px 0 var(--pure-black);
}
.nav-clock { background: var(--accent-blue); color: var(--bg-white); text-shadow: 2px 2px 0 var(--pure-black); }
.nav-date::before { content: '📅'; font-size: 14px; text-shadow: none; }
.nav-clock::before { content: '⏰'; font-size: 14px; text-shadow: none; }

/* --- GRID LAYOUT --- */
.dashboard {
  margin: 40px auto;
  padding-left: 260px; /* Reduced from 280px to shift closer to sidebar */
  padding-right: 32px;
  width: 100%; max-width: 1560px; /* Increased from 1480px for a broader layout */
  display: grid;
  grid-template-columns: 320px 1fr; /* Reduced from 380px to make right column broader */
  gap: 40px; /* Increased gap slightly for better breathing room */
}
/* --- CARDS & WIDGETS --- */
.brutal-card {
  border: var(--border-thick);
  box-shadow: var(--shadow-thick);
  border-radius: 16px;
  position: relative;
}
/* io-hidden for IntersectionObserver Entrance */
.io-hidden {
  opacity: 0 !important;
  transform: translateY(50px) !important;
  box-shadow: 0 0 0 0 var(--pure-black) !important;
}

/* ── Left Profile Card ── */
.flip-container {
  position: sticky; top: 100px; height: fit-content; align-self: start;
  perspective: 1000px;
  width: 100%; z-index: 10;
}
.flipper {
  position: relative; width: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}
.flipper.is-flipped {
  transform: rotateY(180deg);
}
.profile-card {
  background: #fef6e4;
  padding: 32px 24px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.front, .back {
  width: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  position: absolute; top: 0; left: 0;
}
.front {
  position: relative; 
  transform: rotateY(0deg);
  z-index: 2;
}
.back {
  transform: rotateY(180deg);
  height: 100%;
}
.hand-grip {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px; z-index: 20; align-items: flex-start;
}
.finger {
  width: 22px;
  background: #d4a373;
  border: 3px solid var(--pure-black);
  border-radius: 12px 12px 6px 6px;
  box-shadow: inset -3px -3px 0px rgba(0,0,0,0.15);
  transform-origin: top center;
}
.finger:nth-child(1) { height: 36px; margin-top: 4px; }
.finger:nth-child(2) { height: 46px; }
.finger:nth-child(3) { height: 42px; margin-top: 2px; }
.finger:nth-child(4) { height: 32px; margin-top: 8px; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.profile-pic {
  width: 140px; height: 140px; border-radius: 50%;
  border: var(--border-thick);
  background: var(--bg-white);
  margin-bottom: 16px; object-fit: cover;
  display: block;
  animation: bob 0.8s steps(2, end) infinite;
  image-rendering: pixelated;
}
.profile-name {
  font-size: 32px; font-weight: 900; font-style: italic; letter-spacing: 1px;
  margin-bottom: 8px;
}
.profile-title {
  background: var(--pure-black); color: var(--bg-white);
  padding: 4px 12px; border-radius: 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700;
  margin-bottom: 24px;
}

.badges {
  width: 100%; display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px;
}
.badge {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; font-family: 'JetBrains Mono', monospace;
  text-align: left;
}
.badge span {
  border: 2px solid var(--pure-black);
  padding: 2px 6px; border-radius: 4px;
}
.badge.yellow span { background: var(--accent-yellow); }
.badge.green span { background: var(--accent-green); }
.badge.blue span { background: var(--accent-blue); }
.badge.white span { background: var(--bg-white); }

.profile-btns {
  width: 100%; display: flex; flex-direction: column; gap: 12px;
}
.btn-solid {
  width: 100%; padding: 12px;
  border: 3px solid var(--pure-black);
  border-radius: 8px;
  font-weight: 900; font-size: 15px;
  cursor: pointer; transition: all 0.1s;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
/* Active state managed globally below */
.btn-green { background: var(--accent-green); }
.btn-red { background: var(--accent-red); }

/* ── Right Column ── */
.right-col {
  display: flex; flex-direction: column; gap: 32px; padding-bottom: 64px;
}
.brutal-section {
  scroll-margin-top: 100px;
  display: flex; flex-direction: column; gap: 32px;
}
.section-card {
  background: var(--bg-white);
  padding: 32px;
}
.section-card h2 {
  font-size: 32px; font-weight: 900; font-style: italic; margin-bottom: 24px;
  text-transform: uppercase; border-bottom: var(--border-thick); padding-bottom: 8px;
}
.section-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; margin-top: 16px; }
.section-card p { font-size: 16px; font-weight: 600; line-height: 1.6; margin-bottom: 8px; }

/* Intro Card */
.intro-card {
  background: var(--accent-yellow);
  padding: 32px;
}
.intro-card h1 {
  font-size: 40px; font-weight: 900; font-style: italic; margin-bottom: 16px;
}
.name-swap {
  display: inline-grid;
  grid-template-areas: "word";
  margin: 0 4px;
  text-align: center;
  justify-items: center;
  align-items: center;
  line-height: 1.1;
  color: var(--pure-black);
}
.name-swap > span {
  grid-area: word;
  display: block;
  animation: glitchWord 4s infinite linear;
}
.name-swap > span:nth-child(2) {
  animation-delay: -2s;
  color: var(--brand-primary);
}
@keyframes glitchWord {
  0%, 42% { opacity: 1; transform: translate(0, 0); }
  43% { opacity: 1; transform: translate(-4px, 2px) skewX(20deg); text-shadow: 2px 0 red, -2px 0 cyan; }
  44% { opacity: 1; transform: translate(4px, -2px) skewX(-20deg); text-shadow: -2px 0 red, 2px 0 cyan; }
  45% { opacity: 1; transform: translate(-2px, 4px) skewX(10deg); text-shadow: 2px 0 red, -2px 0 cyan; }
  46% { opacity: 1; transform: translate(2px, -4px) skewX(-10deg); text-shadow: none; }
  47%, 50% { opacity: 0; transform: translate(0, 0); }
  
  50.001%, 92% { opacity: 0; transform: translate(0, 0); }
  93% { opacity: 1; transform: translate(-4px, 2px) skewX(20deg); text-shadow: 2px 0 red, -2px 0 cyan; }
  94% { opacity: 1; transform: translate(4px, -2px) skewX(-20deg); text-shadow: -2px 0 red, 2px 0 cyan; }
  95% { opacity: 1; transform: translate(-2px, 4px) skewX(10deg); text-shadow: 2px 0 red, -2px 0 cyan; }
  96% { opacity: 1; transform: translate(2px, -4px) skewX(-10deg); text-shadow: none; }
  97%, 100% { opacity: 1; transform: translate(0, 0); }
}
.intro-card p {
  font-size: 18px; font-weight: 600; line-height: 1.6;
}
.hl {
  background: var(--bg-white);
  border: 2px solid var(--pure-black);
  padding: 2px 8px; border-radius: 4px;
  display: inline-block;
  box-shadow: 2px 2px 0px var(--pure-black);
}

/* Terminal Card */
.terminal-card {
  background: var(--bg-dark);
  color: #fff;
  display: flex; flex-direction: column;
  height: 450px; overflow: hidden;
}
.term-titlebar {
  background: #e2e8f0;
  border-bottom: var(--border-thick);
  padding: 10px 16px;
  display: flex; align-items: center; gap: 8px;
  color: var(--pure-black); font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 13px;
}
.term-titlebar .title { flex: 1; text-align: center; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--pure-black); }
.dot.r { background: var(--accent-red); }
.dot.y { background: var(--accent-yellow); }
.dot.g { background: var(--accent-green); }

#term-body {
  flex: 1; padding: 20px; overflow-y: auto;
  font-family: 'JetBrains Mono', monospace; font-size: 14px; line-height: 1.6;
}
#term-body::-webkit-scrollbar { width:8px; }
#term-body::-webkit-scrollbar-track { background:var(--bg-dark); border-left: 2px solid #333; }
#term-body::-webkit-scrollbar-thumb { background:#555; border-radius:4px; border: 2px solid var(--bg-dark); }

.prompt-line { display:flex; align-items:center; flex-wrap:nowrap; }
.prompt-prefix { color: #48e285; font-weight: 700; }
.prompt-symbol { color: #fff; margin-right:8px; font-weight: 700;}
#cmd-input {
  flex:1; background:transparent; border:none; outline:none;
  font:inherit; font-size:14px; color:#fff;
  caret-color: #48e285;
}
.output-block { margin-bottom:12px; white-space:pre-wrap; word-break:break-word; }

/* ── Syntax Colors for Terminal ── */
.c-green   { color: #48e285; }
.c-blue    { color: #5a9df8; }
.c-mauve   { color: #b084f6; }
.c-peach   { color: #ff9d5c; }
.c-yellow  { color: #f4d03f; }
.c-red     { color: #ff7676; }
.c-teal    { color: #40e0d0; }
.c-pink    { color: #ff9ff3; }
.c-sky     { color: #48dbfb; }
.c-lavender{ color: #a29bfe; }
.c-dim     { color: #888888; }
.c-sub     { color: #bbbbbb; }
.c-bold    { font-weight: 700; }

/* --- MEDITATE MODE --- */
body.meditate-mode .dashboard > *:not(.terminal-card),
body.meditate-mode .sidebar {
  filter: grayscale(100%);
}
.dashboard > *, .sidebar { transition: filter 0.5s ease; }

.loading-bar-container {
  width: 100%; border: 2px solid var(--accent-green); height: 24px;
  margin-top: 12px; position: relative; overflow: hidden;
  background: var(--bg-dark);
}
.loading-bar-fill {
  height: 100%; background: var(--accent-green); width: 0%;
  transition: width 1s linear;
}
.breathe-text {
  position: absolute; width: 100%; text-align: center; left: 0; top: 0;
  line-height: 20px; font-weight: 900; color: var(--bg-white);
  animation: blink 1s infinite;
  mix-blend-mode: difference;
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px) rotate(-2deg); }
  75% { transform: translateX(8px) rotate(2deg); }
}

/* --- MODERN CSS UPGRADES --- */
/* 1. Text-box-trim */
.btn-solid, .badge span, .nav-btn, .profile-title {
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

/* 2. Cascading Entrance Animation */
@keyframes brutalPop {
  0% {
    opacity: 0;
    transform: translate(-12px, -12px);
    box-shadow: 0 0 0 var(--pure-black);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0);
    box-shadow: 2px 2px 0 var(--pure-black);
  }
}
#skills .badge {
  opacity: 0;
  animation: brutalPop 0.5s ease forwards;
}
#skills .badge:nth-child(1) { animation-delay: 100ms; }
#skills .badge:nth-child(2) { animation-delay: 200ms; }
#skills .badge:nth-child(3) { animation-delay: 300ms; }
#skills .badge:nth-child(4) { animation-delay: 400ms; }
#skills .badge:nth-child(5) { animation-delay: 500ms; }
#skills .badge:nth-child(6) { animation-delay: 600ms; }
#skills .badge:nth-child(7) { animation-delay: 700ms; }
#skills .badge:nth-child(8) { animation-delay: 800ms; }

/* 3. Terminal Block Fade-in */
.output-block {
  animation: termFadeIn 0.3s ease forwards;
}
@keyframes termFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* 4. Construction Section */
.construction-container {
  background: var(--bg-white); position:relative; overflow:hidden; display:flex; min-height: 400px; padding:0;
}
.construction-col {
  flex: 1; padding: 32px; display:flex; flex-direction:column; align-items:center; justify-content:center; position:relative;
}
.construction-divider {
  width: 4px; background: var(--pure-black); position:relative; z-index:2;
}
@media(max-width: 900px) {
  .construction-container { flex-direction: column; }
  .construction-divider { display: none; }
  .construction-col { min-height: 250px; }
}

/* --- Smooth Transitions --- */
/* Slow, buttery transition for cards (entrance animations & hover) */
.intro-card, .terminal-card, .section-card, .profile-pic {
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.8s ease, box-shadow 0.6s ease, background 0.4s ease, filter 0.3s ease !important;
}

/* Ultra-smooth, light, and responsive transitions for interactive buttons */
.btn-solid, .badge, .contact-icon, .nav-btn, .stat-link {
  transition: transform 0.1s ease-out, box-shadow 0.1s ease-out, background 0.15s ease-out !important;
}

.contact-icon {
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  border: 3px solid var(--pure-black);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--pure-black);
  color: var(--pure-black);
}
.contact-icon.gh { background: var(--bg-white); }
.contact-icon.li { background: #0A66C2; color: var(--bg-white); }

.intro-card:hover, .terminal-card:hover, .section-card:hover, .profile-pic:hover {
  transform: translateY(-6px) !important;
}

.badge:hover {
  transform: translateY(-4px) !important;
}

.btn-solid:hover, .nav-btn:hover, .stat-link:hover, .contact-icon:hover {
  transform: translate(-2px, -2px) !important;
  box-shadow: 6px 6px 0 var(--pure-black) !important;
}

.btn-solid:active, .nav-btn:active, .nav-btn.active, .stat-link:active, .contact-icon:active { 
  transform: translate(4px, 4px) !important; 
  box-shadow: 0px 0px 0px var(--pure-black) !important; 
}

/* --- MEDIA QUERIES (Overrides) --- */
@media(max-width: 1200px) {
  .dashboard { grid-template-columns: 1fr; }
  .flip-container { position: relative !important; top: 0 !important; margin-bottom: 32px; z-index: 1 !important; }
}
@media(max-width: 900px) {
  .sidebar { position: relative; width: 95%; height: auto; flex-direction: row; margin: 16px auto; top: 0; left: 0; padding: 16px; border-radius: 24px; flex-wrap: wrap; justify-content: center; }
  .nav-links { flex-direction: row; flex-wrap: wrap; justify-content: center; width: 100%; }
  .nav-btn { width: auto; flex: 1 1 calc(33% - 16px); min-width: 100px; }
  .dashboard { padding-left: 0; padding-right: 0; margin-left: auto; margin-right: auto; width: 95%; max-width: 100%; }
  
  /* Hide custom scrollbar elements completely on mobile devices */
  #custom-scrollbar-track, 
  #scroll-progress-container {
    display: none !important;
  }
}
@media(max-width: 600px) {
  .nav-title { font-size: 20px; }
  .nav-btn { flex: 1 1 45%; font-size: 12px; padding: 8px; }
  .profile-pic { width: 100px; height: 100px; margin-bottom: 8px; }
  .profile-name { font-size: 24px; }
  .section-card { padding: 20px; }
  .intro-card { padding: 20px; }
  .intro-card h1 { font-size: 28px; }
  .intro-card p { font-size: 16px; }
  .terminal-card { height: 500px; }
  #term-body pre { font-size: 9px !important; }
  .badge { font-size: 11px; flex-wrap: wrap; }
  .btn-solid { font-size: 13px; padding: 10px; }
  .flipper.is-flipped .back h2 { font-size: 20px !important; }
}

/* --- ACHIEVEMENT TOAST SYSTEM --- */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 12px; z-index: 10000;
  pointer-events: none;
}
.toast {
  background: var(--accent-yellow);
  border: 4px solid var(--pure-black);
  box-shadow: 6px 6px 0 var(--pure-black);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 16px;
  font-family: 'Outfit', sans-serif;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  animation: slideInToast 0.5s cubic-bezier(0.2, 0.8, 0.2, 1.15) forwards, slideOutToast 0.5s ease 4.5s forwards;
}
.toast .icon { font-size: 32px; }
.toast .title { font-weight: 900; font-size: 14px; text-transform: uppercase; margin-bottom: 4px; }
.toast .message { font-size: 16px; font-weight: 600; }

@keyframes slideInToast {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes slideOutToast {
  to { opacity: 0; transform: translateY(20px) scale(0.95); }
}

/* --- BOOT SEQUENCE --- */
body.is-booting { overflow: hidden; height: 100vh; }

#boot-sequence {
  position: fixed; inset: 0; z-index: 99999;
  background: #000; color: #fff;
  transition: opacity 0.5s ease;
  display: flex; flex-direction: column;
}

#skip-boot-btn {
  width: max-content;
}

/* GRUB Menu */
#boot-grub {
  padding: 24px; font-family: 'JetBrains Mono', monospace; font-size: 16px;
  width: 100%; height: 100%; display: flex; flex-direction: column;
}
.grub-header { text-align: center; margin-bottom: 24px; }
.grub-border {
  border: 2px solid #fff; padding: 2px;
  margin-bottom: 24px; flex-grow: 1; max-height: 400px;
}
.grub-option { padding: 4px 8px; }
.grub-active { background: #fff; color: #000; }
.grub-footer { font-size: 14px; color: #aaa; }

/* OS Boot Screen */
#boot-os {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  justify-content: center; align-items: center;
}
.boot-logo { width: 120px; height: 120px; border-radius: 50%; margin-bottom: 24px; }
.boot-name { font-family: 'Outfit', sans-serif; font-size: 28px; font-weight: 900; letter-spacing: 2px; }

.boot-spinner {
  position: relative; width: 40px; height: 40px; margin-top: 60px;
}
.boot-spinner .dot {
  position: absolute; width: 6px; height: 6px; background: #fff; border-radius: 50%;
  transform-origin: 20px 20px; animation: winspin 1.5s infinite cubic-bezier(0.53, 0.21, 0.29, 0.67);
  opacity: 0;
}
.boot-spinner .dot:nth-child(1) { animation-delay: 0.15s; }
.boot-spinner .dot:nth-child(2) { animation-delay: 0.3s; }
.boot-spinner .dot:nth-child(3) { animation-delay: 0.45s; }
.boot-spinner .dot:nth-child(4) { animation-delay: 0.6s; }
.boot-spinner .dot:nth-child(5) { animation-delay: 0.75s; }

@keyframes winspin {
  0% { transform: rotate(0deg); opacity: 1; }
  75% { transform: rotate(360deg); opacity: 1; }
  100% { transform: rotate(360deg); opacity: 0; }
}
@media(max-width: 600px) {
  #toast-container {
    bottom: 16px; right: 16px; left: 16px;
    align-items: center;
  }
  .toast { width: 100%; transform: translateY(120%); }
  @keyframes slideInToast { to { transform: translateY(0); opacity: 1; } }
  @keyframes slideOutToast { to { transform: translateY(120%); opacity: 0; } }

  /* Mobile GRUB screen responsive alignment fixes */
  #boot-grub {
    padding: 72px 16px 16px 16px; /* Extra top padding to clear the absolute skip button */
    font-size: 13px;
  }
  .grub-border {
    margin-bottom: 16px;
  }
  .grub-footer {
    font-size: 11px;
  }
  #skip-boot-btn {
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* --- Refactored Utility & Component Classes --- */
.bg-lavender { background: #a29bfe; }
.bg-light-green { background: #48e285; }
.bg-red { background: #e84118; }
.bg-yellow { background: #f4d03f; }
.col-start { justify-content: flex-start; gap: 24px; }

#skip-boot-btn {
  position: absolute; top: 16px; right: 16px; z-index: 100000;
  padding: 8px 16px; background: #fff; color: #000;
  font-family: 'JetBrains Mono', monospace; font-size: 14px;
  border: 2px solid #000; box-shadow: 4px 4px 0 #000;
  width: max-content;
}

#error-popup {
  position: fixed; top: 24px; right: 24px; z-index: 9999;
  background: var(--accent-red); color: var(--bg-white);
  padding: 16px 24px; border: 4px solid var(--pure-black);
  box-shadow: 8px 8px 0px 0px var(--pure-black);
  font-weight: 900; font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}

.nav-title {
  font-size: 24px; line-height: 1.1;
  font-weight: 900; font-style: italic; letter-spacing: 1px;
  color: var(--bg-white);
  text-shadow: 2px 2px 0 var(--pure-black);
  text-align: center;
}

.nav-clock-container { display: flex; flex-direction: column; gap: 8px; width: 100%; }

.stats-heading {
  font-size: 24px; font-weight: 900; font-style: italic;
  border-bottom: 4px solid var(--pure-black); padding-bottom: 8px;
  width: 100%; text-align: center; margin-bottom: 16px;
}

.profile-pic-back { animation: none; width: 100px; height: 100px; margin-bottom: 24px; }

.stats-links-container {
  width: 100%; text-align: left; display: flex; flex-direction: column;
  gap: 12px; margin-bottom: 24px; flex-grow: 1;
}

.stat-link {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-white); border: 3px solid var(--pure-black);
  border-radius: 8px; padding: 8px 16px; color: var(--pure-black);
  text-decoration: none; font-weight: 900; font-family: 'JetBrains Mono', monospace;
  font-size: 15px; box-shadow: 4px 4px 0 var(--pure-black);
  transition: all 0.1s;
}

.intro-card p { min-height: 100px; line-height: 1.6; }

.terminal-ascii-wrapper {
  display: flex; gap: 32px; margin-bottom: 16px;
  align-items: center; justify-content: center; flex-wrap: wrap;
}

.terminal-ascii {
  color: #51a2da; font-family: monospace; font-weight: bold;
  font-size: 11px; line-height: 1.15; margin: 0; padding-right: 16px;
  max-width: 100%; overflow: hidden;
}

.terminal-os-info {
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  line-height: 1.5; color: #fff;
}

.terminal-os-header {
  color: #51a2da; font-weight: bold; font-size: 15px; margin-bottom: 4px;
}

.terminal-os-grid {
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px;
}

.typing-stat-box {
  background: #fbc531; color: var(--pure-black); padding: 12px 20px;
  border: 3px solid var(--pure-black); box-shadow: 4px 4px 0 var(--pure-black);
  border-radius: 8px;
}

.typing-stat-label {
  display: block; font-size: 12px; font-weight: 900; text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 4px; opacity: 0.8;
  font-family: 'JetBrains Mono', monospace;
}

.typing-stat-value { font-size: 28px; font-weight: 900; }
.typing-stat-unit { font-size: 16px; opacity: 0.9; }

.test-yours-btn {
  background: #0984e3; color: #fff; text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  width: auto; padding: 12px 20px; font-weight: 900; font-size: 14px;
  text-transform: uppercase; letter-spacing: 1px;
}

.flex-wrap-gap16 { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.flex-col-gap16-mt24 { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }

.project-card {
  background: var(--bg-white); border: 4px solid var(--pure-black);
  padding: 20px; box-shadow: 6px 6px 0 var(--pure-black); width: 100%;
  text-align: left; transition: transform 0.15s ease;
}

.project-card:hover { transform: translateY(-4px); }

.project-card-title {
  margin: 0 0 8px 0; font-size: 20px; font-weight: 900; text-transform: uppercase;
}

.project-card-desc {
  margin: 0 0 12px 0; font-size: 14px; font-weight: 600; line-height: 1.4;
}

.badge-container { display: flex; gap: 8px; flex-wrap: wrap; }

.badge-small {
  font-size: 10px; padding: 4px 8px; box-shadow: 2px 2px 0 var(--pure-black);
}

.badge-math {
  font-size: 10px; padding: 4px 8px; box-shadow: 2px 2px 0 var(--pure-black);
  background: #e84118; color: #fff;
}

.experience-card {
  background: var(--accent-yellow); border: 4px solid var(--pure-black);
  padding: 32px 24px; box-shadow: 8px 8px 0 var(--pure-black); width: 100%;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 20px;
}

.experience-title {
  margin: 0; font-size: 26px; color: var(--pure-black);
  text-transform: uppercase; font-weight: 900; letter-spacing: 1px;
}

.experience-desc {
  margin: 0; font-size: 16px; font-weight: 700; text-align: center; opacity: 0.9;
}

.section-header-style {
  width: 100%; text-align: left; font-size: 32px; font-weight: 900;
  font-style: italic; text-transform: uppercase;
  border-bottom: 4px solid var(--pure-black); padding-bottom: 8px;
  margin: 0 0 8px 0;
}

.center-text { text-align: center; }
.contact-desc { font-size: 18px; margin-bottom: 24px; }
.contact-btn-style { max-width: 300px; margin: 0 auto; }
.contact-links-wrapper { display: flex; justify-content: center; gap: 32px; margin-top: 32px; }
