/* ==========================================================================
   Andrei3k - Full-Width Animated Portfolio
   Asymmetric layout, scroll reveal, interactive hover states
   ========================================================================== */

:root {
  --bg: #0a0a0a;
  --bg-hover: #141414;
  --text: #ededed;
  --text-2: #999;
  --text-3: #666;
  --accent: #fff;
  --border: #222;
  --border-hover: #444;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: #333; color: #fff; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.skip-link {
  position: absolute; top: -100px; left: 20px;
  background: #fff; color: #000; font-weight: 600;
  padding: 8px 16px; border-radius: 6px; z-index: 100;
  text-decoration: none; font-size: 0.875rem;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 20px; }

/* ==========================================================================
   Scroll Reveal Animations
   ========================================================================== */

.anim {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.anim[data-delay="1"] { transition-delay: 0.12s; }
.anim[data-delay="2"] { transition-delay: 0.24s; }
.anim[data-delay="3"] { transition-delay: 0.36s; }

.anim[data-anim="fade-up"] { transform: translateY(32px); }
.anim[data-anim="fade-down"] { transform: translateY(-20px); }
.anim[data-anim="fade-right"] { transform: translateX(-24px); }

.anim.visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.03em;
  transition: opacity 0.2s ease;
}

.brand-avatar {
  border-radius: 50%;
  display: block;
}

.brand:hover { opacity: 0.8; text-decoration: none; }

.nav { display: flex; gap: 28px; align-items: center; }

.nav-link {
  font-size: 0.85rem;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-link:hover { color: var(--text); text-decoration: none; }

.ext { opacity: 0.6; vertical-align: -1px; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 120px 48px 100px;
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 48px;
}

.hero-inner {
  max-width: 700px;
  flex: 1 1 500px;
}

.hero-media {
  flex: 0 0 320px;
  max-width: 340px;
}

/* ==========================================================================
   Media Player Widget (Minimalist Dark Edition)
   ========================================================================== */

.media-card {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  transition: border-color 0.25s ease, transform 0.25s ease;
  user-select: none;
}

.media-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.media-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.media-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.08em;
}

/* Equalizer Bars Animation */
.eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.eq-bar {
  width: 2px;
  height: 3px;
  background: var(--text-2);
  border-radius: 1px;
  transition: height 0.2s ease, background-color 0.2s ease;
}

.media-card.is-playing .eq-bar {
  background: var(--text);
  animation: eq-bounce 0.8s ease-in-out infinite alternate;
}

.media-card.is-playing .eq-bar:nth-child(1) {
  animation-delay: 0.1s;
  animation-duration: 0.6s;
}

.media-card.is-playing .eq-bar:nth-child(2) {
  animation-delay: 0.3s;
  animation-duration: 0.8s;
}

.media-card.is-playing .eq-bar:nth-child(3) {
  animation-delay: 0.2s;
  animation-duration: 0.7s;
}

@keyframes eq-bounce {
  0% { height: 3px; }
  100% { height: 12px; }
}

.media-duration {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.media-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.media-art {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.media-track-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.media-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-artist {
  font-size: 0.78rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-btn-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.media-btn-play:hover {
  transform: scale(1.08);
  background: #ffffff;
}

.media-btn-play:active {
  transform: scale(0.95);
}

.media-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: height 0.15s ease;
}

.media-progress-bar:hover {
  height: 6px;
}

.media-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--text);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.media-volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.media-btn-vol {
  background: transparent;
  border: none;
  color: var(--text-2);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.media-btn-vol:hover {
  color: var(--text);
}

.media-volume-track {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: height 0.15s ease;
}

.media-volume-track:hover {
  height: 5px;
}

.media-volume-fill {
  height: 100%;
  width: 30%;
  background: var(--text);
  border-radius: 2px;
  transition: width 0.05s linear;
}

.media-volume-val {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  width: 28px;
  text-align: right;
}

.hero-label {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-2);
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--text);
}

.hero-title .accent {
  color: var(--text);
  position: relative;
}

.hero-title .accent::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 2px;
  background: var(--text-2);
  transition: background 0.3s ease;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-top: 28px;
  max-width: 600px;
  margin-bottom: 0;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}

/* Buttons */
.btn-main {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.btn-main:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  background: transparent;
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-ghost:active { transform: translateY(0); }

/* Views Counter */
.hero-views {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-3);
  letter-spacing: 0.04em;
  user-select: none;
}

.views-icon {
  color: var(--text-3);
  opacity: 0.85;
}

.views-text strong,
.views-text span {
  color: var(--text-2);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Section Layout: Label Left, Content Right
   ========================================================================== */

.section {
  padding: 96px 48px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 72px;
}

.section-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 64px;
  align-items: start;
}

.section-label-col {
  position: sticky;
  top: 100px;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-content-col {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 680px;
}

/* ==========================================================================
   Prose (About)
   ========================================================================== */

.prose p {
  font-size: 0.975rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 16px;
}

.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 600; }

/* Facts Row */
.facts-row {
  display: flex;
  gap: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.fact { display: flex; flex-direction: column; gap: 4px; }

.fact-key {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fact-val {
  font-size: 0.875rem;
  color: var(--text);
  font-weight: 500;
}

/* ==========================================================================
   Project Card (Interactive, Hoverable)
   ========================================================================== */

.project-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  cursor: pointer;
}

.project-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  text-decoration: none;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.project-arrow {
  font-size: 1.4rem;
  color: var(--text-3);
  transition: transform 0.25s ease, color 0.25s ease;
}

.project-card:hover .project-arrow {
  transform: translate(4px, -4px);
  color: var(--text);
}

.project-role {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

.project-desc {
  font-size: 0.925rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 0;
}

.project-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-bullets li {
  position: relative;
  padding-left: 16px;
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.55;
}

.project-bullets li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--text-3);
}

/* ==========================================================================
   Skills
   ========================================================================== */

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.skill-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.3s ease;
}

.skill-item:first-child { padding-top: 0; }
.skill-item:last-child { border-bottom: none; }

.skill-item:hover {
  padding-left: 12px;
}

.skill-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  transition: color 0.2s ease;
}

.skill-item:hover h3 {
  color: var(--accent);
}

.skill-item p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 48px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-3);
}

.footer-inner strong { color: var(--text); font-weight: 600; }

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--text); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 820px) {
  .site-header { padding: 16px 24px; }
  .hero { padding: 80px 24px 64px; min-height: auto; }
  .hero-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }
  .hero-media {
    width: 100%;
    max-width: 100%;
  }
  .section { padding: 64px 24px; }

  .section-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section-label-col {
    position: static;
  }

  .site-footer { padding: 32px 24px; }
}

@media (max-width: 480px) {
  .site-header { padding: 14px 16px; }
  .nav { gap: 16px; }
  .hero { padding: 56px 16px 48px; }
  .hero-title { font-size: 2rem; }
  .section { padding: 48px 16px; }
  .hero-actions { flex-direction: column; }
  .btn-main, .btn-ghost { width: 100%; justify-content: center; }
  .site-footer { padding: 28px 16px; }
  .facts-row { flex-direction: column; gap: 16px; }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .anim {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
