/* ═══════════════════════════════════════════════
   ABHMDD — Portfolio Styles
   ═══════════════════════════════════════════════ */

/* ── BASE ─────────────────────────────────── */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background: #000;
  color: red;
  font-family: 'Roboto Mono', monospace;
  overflow: hidden;
}

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

/* ── FONTS ────────────────────────────────── */

@font-face {
  font-family: 'Maiden';
  src: url('fonts/maiden.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'WastedPunk';
  src: url('fonts/WastedPunk.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* ── TEXT DISPLAY ─────────────────────────── */

#text-display {
  position: absolute;
  top: 2rem;
  left: 5vw;
  width: 90vw;
  text-align: center;
  font-size: clamp(2.2rem, 8vw, 5.2rem);
  font-family: 'Maiden', 'WastedPunk', 'Jura', 'Roboto Mono', monospace;
  color: #de032a;
  -webkit-text-stroke: 1px white;
  line-height: 1.2;
  opacity: 1;
  visibility: hidden;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), filter 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── UTILITY ──────────────────────────────── */

.fade-out {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(-4px);
}
.fade-in {
  opacity: 1;
  filter: blur(0px);
  transform: translateY(0);
}

/* ── COPY BUTTON ──────────────────────────── */

.copy-btn {
  background: none;
  border: 1px solid red;
  color: red;
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  padding: 1px 6px;
  cursor: pointer;
  margin-left: 4px;
  vertical-align: middle;
  position: relative;
  top: -1px;
  transition: background 0.2s, color 0.2s;
}
.copy-btn:hover,
.copy-btn.copied {
  background: red;
  color: white;
}

/* ── TECH STACK ───────────────────────────── */

#tech-stack {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  max-width: 42rem;
  padding: 1rem;
  z-index: 11;
}

.tech-badge {
  border: 1px solid red;
  color: red;
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  padding: 0.4rem 0.7rem;
  letter-spacing: 0.08em;
  cursor: default;
  user-select: none;

  /* Staggered reveal */
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.2s ease,
              color 0.2s ease;
}
.tech-badge.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.tech-badge:hover {
  background: red;
  color: white;
}

/* REACT badge: always red background */
.tech-badge:nth-child(3) {
  background: red;
  color: white;
}
.tech-badge:nth-child(3):hover {
  background: #cc0000;
}

/* ── FOOTER ───────────────────────────────── */

#footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 2rem;
  padding-bottom: calc(2rem + 60px);
  background: #000;
  font-family: 'Roboto Mono', monospace;
  font-size: 18px;
  line-height: 1.5;
  z-index: 10;
  color: red;
}

.footer-block {
  display: flex;
  flex-direction: column;
}

.footer-divider {
  border-top: 1px solid red;
  margin: 0 1rem 1rem 1rem;
  width: calc(100% - 2rem);
}

.footer-col {
  padding: 0 1rem;
  font-weight: 400;
}

#footer a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding-right: 0.4rem;
  position: relative;
  transition: color 0.2s ease;
}
#footer a::after {
  content: "\2197";
  font-size: 1em;
  vertical-align: baseline;
  margin-left: 0.25rem;
  position: relative;
  top: -1px;
  transition: color 0.2s ease;
}
#footer a:hover {
  color: red;
  text-decoration: underline;
}

/* ── MINI SPOTIFY PLAYER ──────────────────── */

#mini-player {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'Roboto Mono', monospace;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 -2px 24px rgba(0,0,0,0.12);
}

#mini-player.playing {
  border-top-color: rgba(230, 0, 0, 0.2);
  box-shadow: 0 -4px 32px rgba(0,0,0,0.2), 0 0 40px rgba(230,0,0,0.06);
}

/* ── ALBUM ART BACKGROUND ─────────────────── */

.player-bg {
  display: none;
}

.player-main {
  display: flex;
  align-items: center;
  padding: 0.45rem 1rem 0.35rem;
  max-width: 1200px;
  margin: 0 auto;
  gap: 0.75rem;
}

.player-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex-shrink: 0;
}

/* ── VINYL RECORD ─────────────────────────── */

.player-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: #1a1a1a;
  position: relative;
  box-shadow: 0 0 0 2px #333, 0 2px 8px rgba(0,0,0,0.15);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.player-album-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
  transition: transform 0.5s ease;
}

/* Record label center dot */
.player-icon-wrap::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30%;
  height: 30%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #e60000, #cc0000);
  border: 1px solid rgba(255,255,255,0.15);
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 1px 3px rgba(255,255,255,0.25);
}

/* Record groove ring */
.player-icon-wrap::before {
  content: '';
  position: absolute;
  top: 8%;
  left: 8%;
  width: 84%;
  height: 84%;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.05);
  z-index: 1;
  pointer-events: none;
}

/* Spin animation */
@keyframes albumSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#mini-player.playing .player-album-art {
  animation: albumSpin 4s linear infinite;
}

#mini-player.playing .player-icon-wrap {
  box-shadow: 0 0 0 2px rgba(230,0,0,0.3), 0 2px 12px rgba(230,0,0,0.12);
  transform: scale(1.02);
}

/* ── META ─────────────────────────────────── */

.player-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.player-title {
  font-size: 13px;
  font-weight: 500;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}

.player-artist {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── VISUALIZER ───────────────────────────── */

.player-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 0.5rem;
}

.player-visualizer-wrap {
  width: 100%;
  max-width: 320px;
  height: 40px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

#player-visualizer {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── RIGHT SECTION ────────────────────────── */

.player-right {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

/* ── TIME DISPLAY ─────────────────────────── */

.player-time {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  font-family: 'Roboto Mono', monospace;
  min-width: 3em;
  text-align: right;
  letter-spacing: 0.03em;
  transition: color 0.3s ease;
  user-select: none;
}

#mini-player.playing .player-time {
  color: rgba(255,255,255,0.8);
}

/* ── BUTTONS ──────────────────────────────── */

.player-btn {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  font-family: 'Roboto Mono', monospace;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.player-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.4);
  transform: scale(1.06);
}
.player-btn:active {
  transform: scale(0.92);
}

.player-play-btn {
  width: 36px;
  height: 36px;
  border-color: #e60000;
  background: white;
  color: #e60000;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.player-play-btn:hover {
  background: #e60000;
  border-color: #e60000;
  color: white;
  box-shadow: 0 2px 8px rgba(230,0,0,0.2);
  transform: scale(1.06);
}

#mini-player.playing .player-play-btn {
  background: #e60000;
  border-color: #e60000;
  color: white;
  box-shadow: 0 2px 10px rgba(230,0,0,0.3);
}
#mini-player.playing .player-play-btn:hover {
  background: #cc0000;
  border-color: #cc0000;
  transform: scale(1.06);
}

/* ── PROGRESS BAR ─────────────────────────── */

.player-progress {
  padding: 0 1rem 0.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.player-progress-track {
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: height 0.15s;
}
.player-progress-track:hover {
  height: 5px;
}

.player-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  position: relative;
  background: linear-gradient(90deg, #e60000, #ff5555, #e60000);
  background-size: 200% 100%;
  transition: width 0.3s ease;
}

#mini-player.playing .player-progress-fill {
  animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
  0%, 100% {
    background-position: 0% 0%;
    box-shadow: 0 0 6px rgba(230,0,0,0.4);
  }
  50% {
    background-position: 100% 0%;
    box-shadow: 0 0 12px rgba(230,0,0,0.6);
  }
}

/* ── PLAYER PULSE ─────────────────────────── */

@keyframes playerPulse {
  0%, 100% { box-shadow: 0 -2px 24px rgba(0,0,0,0.08); }
  50%      { box-shadow: 0 -4px 40px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.06); }
}

#mini-player.playing {
  animation: playerPulse 3s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE: MOBILE — SAME AS DESKTOP
   ═══════════════════════════════════════════════ */

@media (max-width: 700px) {

  html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }

  body {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    padding-bottom: calc(60px + constant(safe-area-inset-bottom, 0px));
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    background: #000;
    -webkit-overflow-scrolling: touch;
  }

  /* ── TEXT DISPLAY (MOBILE) ──────────────── */
  /* SAME as desktop: WastedPunk font, absolute pos, same size */

  #text-display {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: clamp(1.6rem, 7vw, 5.2rem);
    font-family: 'Maiden', 'WastedPunk', 'Jura', 'Roboto Mono', monospace;
    color: #de032a;
    -webkit-text-stroke: 1px white;
    text-align: left;
    max-width: 85vw;
    line-height: 1.2;
    opacity: 1;
    visibility: hidden;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), filter 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* ── TECH STACK (MOBILE) ────────────────── */
  /* SAME as desktop: fixed, centered */

  #tech-stack {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    max-width: 85vw;
    padding: 0.5rem;
    z-index: 11;
  }

  .tech-badge {
    font-size: 10px;
    padding: 0.3rem 0.5rem;
  }

  /* ── FOOTER (MOBILE) ────────────────────── */
  /* SAME as desktop: fixed bottom, grid 3 columns */

  #footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 1rem;
    padding-bottom: calc(1rem + 60px + constant(safe-area-inset-bottom, 0px));
    padding-bottom: calc(1rem + 60px + env(safe-area-inset-bottom, 0px));
    background: #000;
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    line-height: 1.4;
    z-index: 10;
    color: red;
  }

  .footer-block {
    display: flex;
    flex-direction: column;
  }

  .footer-divider {
    border-top: 1px solid red;
    margin: 0 0.5rem 0.5rem 0.5rem;
    width: calc(100% - 1rem);
  }

  .footer-col {
    padding: 0 0.5rem;
    font-weight: 400;
  }

  #footer a {
    color: rgba(255,255,255,0.85);
  }

  /* ── COPY BUTTON (MOBILE) ───────────────── */

  .copy-btn {
    font-size: 10px;
    padding: 1px 5px;
  }

  /* ── MINI PLAYER (MOBILE) ──────────────── */

  #mini-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding-bottom: constant(safe-area-inset-bottom, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .player-main {
    padding: 0.35rem 0.65rem 0.25rem;
    gap: 0.4rem;
    justify-content: space-between;
  }

  .player-left {
    gap: 0.35rem;
  }

  .player-icon-wrap {
    width: 30px;
    height: 30px;
    box-shadow: 0 0 0 1.5px #555, 0 1px 4px rgba(0,0,0,0.2);
  }

  .player-icon-wrap::after {
    width: 26%;
    height: 26%;
  }

  .player-icon-wrap::before {
    display: none;
  }

  .player-album-art {
    width: 100%;
    height: 100%;
  }

  .player-title {
    font-size: 11px;
    color: white;
  }

  .player-artist {
    display: none;
  }

  .player-center {
    display: none;
  }

  .player-right {
    gap: 0.1rem;
  }

  .player-time {
    font-size: 9px;
    min-width: 2.8em;
    color: rgba(255,255,255,0.4);
  }

  .player-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
    color: white;
    touch-action: manipulation;
  }
  .player-btn svg {
    width: 16px;
    height: 16px;
  }

  .player-play-btn {
    width: 40px;
    height: 40px;
    background: white;
    border-color: #e60000;
    color: #e60000;
  }

  #mini-player.playing .player-play-btn {
    background: #e60000;
    border-color: #e60000;
    color: white;
  }

  .player-progress {
    padding: 0 0.65rem 0.35rem;
  }

  .player-progress-track {
    height: 3px;
    background: rgba(255,255,255,0.1);
  }
  .player-progress-track:hover {
    height: 4px;
  }

}

/* ═══════════════════════════════════════════════
   RESPONSIVE: SHORT SCREENS
   ═══════════════════════════════════════════════ */

@media (max-height: 650px) {
  #tech-stack { gap: 0.3rem; }
  .tech-badge { font-size: 11px; padding: 0.2rem 0.5rem; }
  #footer { font-size: 14px; row-gap: 0.5rem; padding: 0.25rem 0.5rem 0.5rem; }
  .footer-divider { margin: 0 0 0.35rem 0; }
  .player-main { padding: 0.3rem 0.6rem 0.2rem; }
  .player-icon-wrap { width: 28px; height: 28px; box-shadow: 0 0 0 1.5px #555, 0 1px 4px rgba(0,0,0,0.2); }
  .player-play-btn { width: 30px; height: 30px; }
  .player-btn { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }
  .player-btn svg { width: 12px; height: 12px; }
  .player-progress { padding: 0 0.6rem 0.3rem; }
  .player-progress-track { background: rgba(255,255,255,0.15); }
  .player-visualizer-wrap { height: 20px; }
  .player-center { display: none; }
  .player-time { font-size: 8px; min-width: 2.2em; color: rgba(255,255,255,0.4); }
}

@media (max-height: 500px) {
  #tech-stack { display: none; }
  #mini-player { display: none; }
}
