@font-face {
    font-family: VT323;
    src: url(./fonts/VT323-Regular.ttf);
    
}
:root {
  --size: 20px;
  --bg-color: #2c1e3d;
  --player-bg: #4d3d60;
  --screen-bg: #3c6b49;
  --screen-text: #1b2601;
  --pixel-border: #000000;
  --btn-face: #bcbcc4;
  --btn-face-accent: #ff4757;
  --font-family: 'Press Start 2P', monospace;
  --text-main: #fff;
  --text-muted: #ccc;
  --page-bg: radial-gradient(circle at top left, rgba(152, 78, 208, 0.22), transparent 24%), radial-gradient(circle at 80% 20%, rgba(255, 192, 90, 0.16), transparent 18%), linear-gradient(180deg, #08040f 0%, #140b25 50%, #090410 100%);
  --overlay-bg: rgba(2, 2, 8, 0.78);
  --panel-bg: rgba(0,0,0,0.7);
  --card-bg: #111;
  --input-bg: #111;
  --input-text: #fff;
  --nav-link-bg: #111;
  --nav-link-fg: #fff;
  --header-avatar-bg: rgba(0,0,0,0.55);
  --title-color: #f5d25c;
  --subtitle-color: #d8c46c;
  --intro-color: #fff;
  --book-bg: #111;
  --highlight-color: #b8ffb8;
  --track-bg: #222;
  --thumb-bg: #fff;
  --sidebar-bg: linear-gradient(180deg,#20162a,#2c2136);
  --social-bg: #111;
  --social-fg: #fff;
  --resume-link-bg: #111;
  --resume-link-fg: #fff;
  --nav-link-hover: #2b2b2b;
  --preloader-bg: #000;
  --preloader-text: #fff;
  --btn-text: #000;
  --accent-btn-text: #fff;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #2b0b0b;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff4d4d, #d10000);
  border-radius: 10px;
  box-shadow: inset 0 0 4px rgba(255,255,255,0.35);
}

html {
    scroll-behavior: smooth;
    scrollbar-color: #d10000 #2b0b0b;
    scrollbar-width: thin;
}
#layout-usage-exit-layout-animation .is-hidden {
  display: none;
}

body {
    justify-content: center;
    align-items: center;
    margin: 0;
    min-height: 100vh;
    display: grid;
    background: var(--page-bg);
    color: var(--text-main);
    overflow-x: hidden;
    font-family: VT323, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    transition: background 0.45s ease, color 0.45s ease;
}

body, .sidebar, .main-box, .pixel-player, .pixel-box, .album-container, .nav-link, .contact-box, .resume-section, .game-card, .retro-btn, .accent-btn, .contact-form input, .contact-form textarea, .social-link, .book, .header-text h1, .header-text h2, .pixel-avatar {
  transition: background 0.45s ease, color 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}

.el {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    inset: 0;
    z-index: -1;
    background-image:
      linear-gradient(90deg, rgba(218, 171, 59, 0.18) 1px, transparent 1px),
      linear-gradient(180deg, rgba(218, 171, 59, 0.18) 1px, transparent 1px),
      linear-gradient(90deg, rgba(120, 63, 172, 0.12) 1px, transparent 1px),
      linear-gradient(180deg, rgba(120, 63, 172, 0.12) 1px, transparent 1px),
      radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.08), transparent 12%),
      radial-gradient(circle at 75% 22%, rgba(189, 167, 224, 0.08), transparent 12%),
      linear-gradient(180deg, rgba(15, 8, 23, 0.95), rgba(20, 10, 35, 0.92));
    background-size: 36px 36px, 36px 36px, 18px 18px, 18px 18px, 100% 100%, 100% 100%, 100% 100%;
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
    animation: pixel-shift 16s linear infinite;
    image-rendering: pixelated;
}

@keyframes pixel-shift {
  0% {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  }
  50% {
    background-position: 18px 18px, -18px -18px, 9px -9px, -9px 9px, 0 0, 0 0, 0 0;
  }
  100% {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  }
}
p {
    font-size: 22px;
    color: var(--text-main);
    text-align: justify;
    justify-content: center;
    margin: 1em;
}
.intro {
    font-size: 30px;
    font-weight: bold;
    color: var(--intro-color);
}

.retro-rc {
    
    font-family: VT323;
  font-size: 20px;
  padding: 10px 0;
  border: 4px solid var(--pixel-border);
  background: var(--btn-face);
  color: var(--input-text);
  cursor: pointer;
  outline: none;
  flex-grow: 1;
  position: relative;
  
  /* Pixel art extrusion look using standard box shadows */
  box-shadow: 
    inset -4px -4px 0 #5f5d5d,
    inset 4px 4px 0 #fff;
    align-items: baseline;
    
    
}
.container {
    direction: rtl;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    flex-grow: 1;
    justify-content: flex-start;
    
}

* {
  box-sizing: border-box;
  color: white;
}

@keyframes flicker {
  to {
    mask-position: 50% 50%, 0 50%;
  }
}
/* Main Cabinet Wrapper */
.pixel-player {
   margin-top: 30px;
  background: var(--player-bg);
  padding: 24px;
  width: 320px;
  box-shadow: 
    0 8px 0 0 #312440,
    0 -8px 0 0 #695582,
    8px 0 0 0 #695582,
    -8px 0 0 0 #312440,
    inset 0 0 0 4px var(--pixel-border);
  border: 4px solid var(--pixel-border);
  position: relative;
 
}

/* Shared Pixel Layout Boxes (NES style edges) */
.pixel-box {
  border: 4px solid var(--pixel-border);
  box-shadow: inset 4px 4px 0 rgba(0,0,0,0.2);
  margin-bottom: 20px;
  background: var(--card-bg);
}

/* Green Gameboy LCD Screen */
.screen {
  background: var(--screen-bg);
  padding: 12px;
  color: var(--screen-text);
  overflow: hidden;
}

.marquee-container {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  margin-bottom: 6px;
}

.pixel-text {
  font-size: 10px;
  line-height: 1.4;
  image-rendering: pixelated;
}

#track-title {
  display: inline-block;
  font-size: 12px;
  animation: marquee 8s linear infinite;
}

.sub-text {
  font-size: 8px;
  opacity: 0.8;
}

/* Marquee Scroll Animation */
@keyframes marquee {
  0% { transform: translate3d(100%, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

/* Album Art Framing */
.album-container {
  height: 160px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--card-bg);
}

.album-art {
  width: 120px;
  height: 120px;
  background-size: cover;
  background-position: center;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border: 4px solid var(--pixel-border);
}

/* Timeline & Progress Bar */
.progress-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.timestamp {
  font-size: 8px;
  color: var(--text-main);
  width: 45px;
}

.slider-wrapper {
  flex-grow: 1;
  margin: 0 8px;
  height: 12px;
  position: relative;
}

/* Custom 8-bit Progress Bar Slider */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
  margin: 0;
}

input[type="range"]:focus {
  outline: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 12px;
  background: var(--track-bg);
  border: 2px solid var(--pixel-border);
}

input[type="range"]::-webkit-slider-thumb {
  height: 16px;
  width: 10px;
  background: var(--thumb-bg);
  border: 2px solid var(--pixel-border);
  -webkit-appearance: none;
  margin-top: -4px;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.75);
}

/* Hardware Controls Layout */
.controls-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* Modular Pixel Push-Buttons */
.retro-btn {
  font-family: var(--font-family);
  font-size: 14px;
  flex-grow: 1;
  padding: 10px 0;
  border: 4px solid var(--pixel-border);
  background: var(--btn-face);
  color: var(--btn-text);
  cursor: pointer;
  outline: none;
  position: relative;
  /* Pixel art extrusion look using standard box shadows */
  box-shadow: 
    inset -4px -4px 0 #85858b,
    inset 4px 4px 0 #fff;
}

.retro-btn:active {
  box-shadow: 
    inset 4px 4px 0 #85858b,
    inset -4px -4px 0 transparent;
  padding-top: 12px;
  padding-bottom: 8px;
}

.accent-btn {
  background: var(--btn-face-accent);
  color: var(--accent-btn-text);
  box-shadow: 
    inset -4px -4px 0 #b31929,
    inset 4px 4px 0 #ff7685;
}

.accent-btn:active {
  box-shadow: 
    inset 4px 4px 0 #b31929,
    inset -4px -4px 0 transparent;
}
.side {
  justify-content: center;
  align-items: center;
}

/* Sidebar navigation (fixed left) */
.sidebar {
  position: fixed;
  left: 1rem;
  top: 1rem;
  bottom: 1rem;
  width: 340px;
  min-height: calc(100vh - 2rem);
  background: var(--sidebar-bg);
  border: 4px solid var(--pixel-border);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  overflow-y: auto;
  z-index: 20;
}
.nav-link{
  display: inline-block;
  padding: 8px 6px;
  color: var(--nav-link-fg);
  text-decoration: none;
  border: 3px solid var(--pixel-border);
  background: var(--nav-link-bg);
  font-family: var(--font-family);
  font-size: 11px;
  text-align: center;
}
.sidebar .logo-small{
  font-family: var(--font-family);
  font-size: 14px;
  color: gold;
  margin: 0 0 12px 0;
}
.sidebar nav{
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.sidebar-player{
  width: 100%;
  margin-top: 16px;
}
.sidebar-player-title{
  font-family: var(--font-family);
  font-size: 12px;
  color: gold;
  margin-bottom: 10px;
  text-align: center;
}
.sidebar .pixel-player{
  width: 100%;
  max-width: 320px;
  padding: 14px;
}
.sidebar .album-art{
  width: 92px;
  height: 92px;
}
.sidebar .progress-container{
  gap: 6px;
}
.sidebar .controls-row{
  flex-wrap: wrap;
  gap: 6px;
}
.sidebar .retro-btn{
  padding: 8px 0;
  font-size: 12px;
}
.nav-link{
  display: inline-block;
  padding: 8px 6px;
  color: var(--nav-link-fg);
  text-decoration: none;
  border: 3px solid var(--pixel-border);
  background: var(--nav-link-bg);
  font-family: var(--font-family);
  font-size: 11px;
  text-align: center;
}
.nav-link:focus,.nav-link:hover{
  outline: none;
  background: var(--nav-link-hover);
}

/* Centered main boxed layout */
.main-box{
  margin: 2rem auto;
  margin-left: calc(340px + 2rem);
  max-width: 960px;
  padding: 24px;
  background: var(--overlay-bg);
  border: 4px solid var(--pixel-border);
  box-shadow: 8px 8px 0 rgba(0,0,0,0.6);
}
/* Center text and elements inside main box */
.main-box { text-align: center }

.header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.header-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.pixel-avatar {
  width: 112px;
  height: 112px;
  padding: 10px;
  background: var(--header-avatar-bg);
  border: 4px solid var(--pixel-border);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,0.06);
}

.pixel-avatar svg {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.header-text h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin: 0;
  color: var(--title-color);
  text-shadow: 0 0 0.25em rgba(255,255,255,0.12);
}

.header-text h2 {
  margin: 8px 0 0;
  font-size: 1rem;
  color: var(--subtitle-color);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Scrolling pixelated library */
.library-scroll{
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 12px 6px;
}
.library-scroll::-webkit-scrollbar{ height:10px }
.book{
  width: 120px;
  flex: 0 0 auto;
  text-align: center;
  border: 4px solid var(--pixel-border);
  background: var(--book-bg);
  padding: 6px;
}
.book img{
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  display: block;
  border: 3px solid var(--pixel-border);
}
.book-title{
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-main);
  font-family: var(--font-family);
}


.resume-section{
  background: var(--card-bg);
  border: 4px solid var(--pixel-border);
  padding: 16px;
  margin-top: 24px;
  text-align: center;
}

.resume-section a{
  display: inline-block;
  margin-top: 12px;
  padding: 10px 16px;
  color: var(--resume-link-fg);
  border: 3px solid var(--pixel-border);
  background: var(--resume-link-bg);
  text-decoration: none;
  font-family: var(--font-family);
}

/* Contact box styles */
.contact-box{
  display: block;
  margin: 20px auto;
  max-width: 820px;
  padding: 18px;
  position: relative;
  border: 5px solid var(--pixel-border);
  background: var(--panel-bg);
}
.contact-grid{
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
}
.contact-social{
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.social-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: var(--social-fg);
  text-decoration: none;
  border: 3px solid var(--pixel-border);
  background: var(--social-bg);
  font-family: var(--font-family);
}
.pixel-icon{
  width: 28px;
  height: 28px;
  display: inline-block;
  image-rendering: pixelated;
  background-size: 7px 7px;
}
.linkedin .pixel-icon, .linkedin-icon{ background-image: linear-gradient(90deg,#0a66c2 33%, transparent 33%), linear-gradient(#0a66c2 33%, transparent 33%)}
.email .pixel-icon, .email-icon{ background-image: linear-gradient(90deg,#ffcc00 33%, transparent 33%), linear-gradient(#ffcc00 33%, transparent 33%)}
.social-text{ font-size: 12px }

.contact-form{
  min-width: 260px;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
.contact-form label{ font-size: 12px; text-align: left }
.contact-form input, .contact-form textarea{
  font-family: VT323, var(--font-family);
  font-size: 14px;
  padding: 8px;
  border: 3px solid var(--pixel-border);
  background: var(--input-bg);
  color: var(--input-text);
}
.contact-form button{ width: 120px; align-self: center }
.contact-msg{ margin-top: 8px; color: var(--highlight-color); min-height: 1.4em }

@media (max-width: 900px){
  .sidebar{ position: relative; width: 100%; top:0; left:0; height: auto; min-height: unset; padding: 14px; }
  .sidebar .pixel-player{ padding: 12px; }
  .sidebar-player-title{ font-size: 11px; }
  .sidebar .album-art{ width: 80px; height: 80px; }
  .sidebar .retro-btn{ font-size: 12px; padding: 8px 0; }
  .main-box{ margin-left: 0; padding: 18px; }
  .book{ width: 110px; }
  .header-text h1{ font-size: clamp(2rem, 6vw, 3rem); }
  .header-text h2{ font-size: 0.95rem; }
  .library-scroll{ gap: 10px; }
  .contact-box{ padding: 16px; }
  .contact-form{ min-width: unset; max-width: 100%; }
}

@media (max-width: 700px){
  body{ display: block; }
  .sidebar{ margin-bottom: 18px; padding: 12px; }
  .main-box{ margin: 0; max-width: 100%; padding: 16px; }
  .header{ flex-direction: column; align-items: center; gap: 18px; }
  .header-brand{ flex-direction: column; align-items: center; gap: 12px; }
  .pixel-avatar{ width: 96px; height: 96px; padding: 8px; }
  .header-text h1{ font-size: 2rem; }
  .header-text h2{ font-size: 0.88rem; letter-spacing: 0.14em; }
  .library-scroll{ padding: 8px 4px; }
  .book{ width: 100px; }
  .contact-grid{ flex-direction: column; gap: 14px; }
  .contact-social, .contact-form{ width: 100%; }
  .contact-cat{ position: static; margin: 16px auto 0; transform: none; }
  .pixel-cat svg{ width: 88px; height: 88px; }
  .pixel-player{ width: 100%; padding: 16px; }
  .screen{ padding: 10px; }
  .album-container{ min-height: 100px; }
  .progress-container{ flex-direction: column; align-items: stretch; gap: 10px; }
  .timestamp{ width: auto; text-align: center; }
  .slider-wrapper{ margin: 0; }
  .contact-form button{ width: 100%; }
}

@media (max-width: 520px){
  .header-text h1{ font-size: 1.75rem; }
  .pixel-avatar{ width: 84px; height: 84px; padding: 6px; }
  .book{ width: 90px; }
  .library-scroll{ gap: 8px; padding: 8px 2px; }
  .nav-link{ font-size: 10px; padding: 6px 4px; }
  .sidebar{ padding: 10px; }
  .sidebar-player-title{ font-size: 10px; }
  .retro-btn, .accent-btn{ font-size: 11px; padding: 8px 0; }
  .contact-form input, .contact-form textarea{ font-size: 13px; padding: 6px; }
  .contact-cat svg{ width: 76px; height: 76px; }
  .pixel-cat svg{ width: 76px; height: 76px; }
  .main-box{ padding: 14px; }
  .contact-box{ padding: 14px; }
}

:root.light {
  --bg-color: #f1f0ef;
  --btn-text: #111;
  --accent-btn-text: #fff;
  --player-bg: #d4d3d2;
  --screen-bg: #e8e6e4;
  --screen-text: #333;
  --pixel-border: #1a1a1a;
  --btn-face: #ededed;
  --btn-face-accent: #2f2f2f;
  --text-main: #111;
  --text-muted: #444;
  --page-bg: radial-gradient(circle at top left, rgba(200, 150, 255, 0.18), transparent 24%), radial-gradient(circle at 82% 18%, rgba(255, 180, 90, 0.14), transparent 18%), linear-gradient(180deg, #f5f3f7 0%, #d8d4e4 50%, #f9f8fc 100%);
  --overlay-bg: rgba(240, 240, 245, 0.92);
  --panel-bg: rgba(255, 255, 255, 0.90);
  --card-bg: #ededed;
  --input-bg: #f7f7f7;
  --input-text: #111;
  --nav-link-bg: #f3f3f3;
  --nav-link-fg: #111;
  --header-avatar-bg: rgba(255,255,255,0.72);
  --intro-color: #111;
  --book-bg: #f6f5f5;
  --social-bg: #f4f4f4;
  --social-fg: #111;
  --resume-link-bg: #e3e3e3;
  --resume-link-fg: #111;
  --nav-link-hover: #d8d8d8;
  --sidebar-bg: linear-gradient(180deg,#ededed,#f1eff4);
  --preloader-bg: #f2f2f2;
  --preloader-text: #111;
}

:root.light body {
  color: var(--text-main);
}

:root.light .pixel-avatar {
  background: var(--header-avatar-bg);
}

:root.light .nav-link {
  background: var(--nav-link-bg);
  color: var(--nav-link-fg);
}

:root.light .main-box,
:root.light .contact-box,
:root.light .resume-section,
:root.light .game-card,
:root.light .pixel-box,
:root.light .album-container,
:root.light .contact-form input,
:root.light .contact-form textarea,
:root.light .sidebar {
  background: var(--panel-bg);
}

:root.light .retro-btn {
  background: var(--btn-face);
  color: var(--input-text);
}

:root.light .accent-btn {
  background: var(--btn-face-accent);
  box-shadow: inset -4px -4px 0 #333, inset 4px 4px 0 #fff;
}

:root.light .nav-link:hover,
:root.light .nav-link:focus {
  background: var(--nav-link-hover);
}

/* Preloader overlay */
.preloader{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--preloader-bg);
  z-index: 9999;
  color: var(--preloader-text);
}
.preloader-inner{ text-align: center }
.preloader-text{ font-family: var(--font-family); font-size: 20px; color: gold; margin-bottom: 12px }
.preloader.fade-out{ opacity: 0; transition: opacity 0.6s ease; pointer-events: none }
.preloader.hidden{ display: none; }

.pixel-cat svg{ width: 112px; height: 112px; image-rendering: pixelated }
.pixel-cat{ animation: cat-bounce 900ms ease-in-out infinite alternate, cat-wiggle 1600ms ease-in-out infinite alternate; transform-origin: center; }

@keyframes cat-bounce{
  from{ transform: translateY(0) }
  to{ transform: translateY(-10px) }
}

@keyframes cat-wiggle{
  from{ transform: rotate(0deg) }
  to{ transform: rotate(3deg) }
}

/* Contact cat positioned at right-bottom of contact box */
.contact-cat{ position: absolute; right: 10px; bottom: 10px; }



/* Ensure the page content does not go under the sidebar on small screens */
@media (max-width: 700px) {
  .sidebar{ position: relative; width: 100%; top:0; left:0; height: auto }
  .main-box{ margin-left: 0; padding: 12px }
}


