:root {
  --bg: #07070b;
  --panel: #0d1020;
  --panel2: #0b0f1a;
  --text: #e6edf3;
  --muted: #9aa4b2;
  --border: #22304a;
  --accent: #ff4d8d;
  --accent2: #b26bff;
  --danger: #ff6b6b;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  background:
    radial-gradient(1100px 780px at 22% 12%, rgba(155, 0, 26, 0.56) 0%, rgba(7, 7, 11, 0) 62%),
    radial-gradient(980px 740px at 82% 10%, rgba(105, 0, 18, 0.54) 0%, rgba(7, 7, 11, 0) 64%),
    radial-gradient(1100px 820px at 50% 88%, rgba(120, 0, 20, 0.42) 0%, rgba(7, 7, 11, 0) 62%),
    linear-gradient(125deg, #0f0004 0%, #220006 22%, #4a0010 42%, #220006 62%, #07070b 100%);
  background-repeat: no-repeat;
  background-size: 280% 280%;
  background-position: 20% 20%;
  background-attachment: fixed;
  background-color: var(--bg);
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  min-height: 100vh;
  background: transparent;
  color: var(--text);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    animation: bgFlow 10s ease-in-out infinite;
  }
}

@keyframes bgFlow {
  0% {
    background-position: 20% 20%;
  }
  50% {
    background-position: 80% 80%;
  }
  100% {
    background-position: 20% 20%;
  }
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 18px;
}

.header {
  display: flex;
  align-items: center;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: block;
  object-fit: contain;
  padding: 6px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.title {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0.4px;
  text-shadow: 0 0 24px rgba(255, 77, 141, 0.10);
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 60ch;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--text);
  text-decoration: none;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.10);
  text-decoration: none;
  transform: translateY(-1px);
}

.btnSecondary {
  background: transparent;
  border-color: rgba(110, 168, 254, 0.35);
}

.card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(7, 7, 11, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.card h2 {
  margin: 0 0 12px;
  font-size: 18px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

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

.aboutGrid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.meta {
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.meta div + div {
  margin-top: 10px;
}

.meta dt {
  font-size: 12px;
  color: var(--muted);
}

.meta dd {
  margin: 4px 0 0;
}

.sectionHeader {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card#cases .sectionHeader {
  align-items: center;
  margin-bottom: 18px;
}

.controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.label {
  font-size: 12px;
  color: var(--muted);
}

.select {
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.status {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  color: var(--muted);
}

.status.error {
  border-color: rgba(255, 107, 107, 0.45);
  color: #ffd6d6;
}

.grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.project {
  padding: 14px;
  border-radius: 12px;
  background: rgba(7, 7, 11, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.project:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 77, 141, 0.22);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

@media (prefers-reduced-motion: no-preference) {
  .header {
    animation: slideDown 520ms ease both;
  }

  .card {
    animation: fadeUp 620ms ease both;
  }

  .card:nth-of-type(2) {
    animation-delay: 70ms;
  }

  .avatar {
    animation: softFloat 4.2s ease-in-out infinite;
  }

  .title {
    animation: glowPulse 3.6s ease-in-out infinite;
  }

  .project {
    opacity: 0;
    transform: translateY(8px);
  }

  .project.isVisible {
    animation: popIn 420ms ease both;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes softFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@keyframes glowPulse {
  0%,
  100% {
    text-shadow: 0 0 18px rgba(255, 77, 141, 0.10);
  }
  50% {
    text-shadow:
      0 0 26px rgba(255, 77, 141, 0.18),
      0 0 34px rgba(178, 107, 255, 0.10);
  }
}

.projectTop {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.projectName {
  font-weight: 650;
  letter-spacing: 0.2px;
}

.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 4px;
}

.badgesInline {
  justify-content: flex-start;
  gap: 10px;
}

.badge {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  background: rgba(255, 77, 141, 0.12);
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
}

.badge:hover {
  background: rgba(255, 77, 141, 0.18);
  border-color: rgba(255, 255, 255, 0.24);
}

.projectDesc {
  margin: 0;
  color: var(--muted);
  min-height: 2.4em;
}

.projectMeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.case {
  padding: 20px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: linear-gradient(
      180deg,
      rgba(255, 77, 141, 0.08) 0%,
      rgba(11, 15, 26, 0.10) 60%,
      rgba(7, 7, 11, 0.08) 100%
    );
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.case:last-child {
  margin-bottom: 0;
}

.caseTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 4px;
}

.caseTitle {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.caseSubtitle {
  margin: 8px 0 0;
  max-width: 80ch;
  line-height: 1.5;
}

.caseGrid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.caseText {
  margin: 0 0 10px;
}

.caseBlock {
  margin-top: 0;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(7, 7, 11, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.caseBlock:last-child {
  margin-bottom: 0;
}

.caseGrid > div {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.caseBlockTitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.showcaseVideo {
  width: 100%;
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(7, 7, 11, 0.18);
  aspect-ratio: 16 / 9;
}

.showcaseVideo:focus {
  outline: 2px solid rgba(255, 77, 141, 0.35);
  outline-offset: 3px;
}

.list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 8px;
  font-size: 14px;
  line-height: 1.5;
}

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

.listCompact {
  gap: 7px;
  font-size: 13.5px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  color: #c9d4e5;
}

.small {
  font-size: 12px;
  color: var(--muted);
}

.details {
  margin-top: 14px;
}

.code {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.10);
  overflow: auto;
  white-space: pre-wrap;
  color: #c9d4e5;
}

.footer {
  margin-top: 18px;
  padding: 14px;
  display: flex;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

@media (max-width: 820px) {
  .aboutGrid {
    grid-template-columns: 1fr;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .caseGrid {
    grid-template-columns: 1fr;
  }
  .case {
    padding: 16px;
  }
  .caseBlock {
    padding: 12px;
  }
  .caseTitle {
    font-size: 16px;
  }
}
