:root {
  --bg-page: #f5f6f8;
  --bg-sidebar: #2c3e50;
  --bg-sidebar-soft: #34495e;
  --text-primary: #1f2933;
  --text-secondary: #52606d;
  --text-muted: #7b8794;
  --text-on-dark: #ecf0f1;
  --text-on-dark-muted: #b8c1c8;
  --accent: #3498db;
  --accent-strong: #2563eb;
  --border: #e4e7eb;
  --tag-bg: #eef2f7;
  --tag-text: #334e68;
  --max-width: 1100px;
  --sidebar-width: 280px;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(31, 41, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scrollbar-gutter: stable;
}

body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

.page {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  max-width: var(--max-width);
  margin: 32px auto;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Sidebar */
.sidebar {
  background: var(--bg-sidebar);
  color: var(--text-on-dark);
  padding: 36px 28px;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--bg-sidebar-soft);
  color: var(--text-on-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0 auto 28px;
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.sidebar__heading {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-on-dark);
  margin: 28px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.contact,
.tags {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact li {
  font-size: 14px;
  color: var(--text-on-dark-muted);
  margin: 6px 0;
  word-break: break-word;
}

.contact a {
  color: var(--text-on-dark-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.contact a:hover {
  color: white;
}

img.contact-icon,
svg.contact-icon {
  width: 13px !important;
  height: 13px !important;
  min-width: 13px;
  min-height: 13px;
  flex-shrink: 0;
  display: inline-block;
  filter: brightness(0) invert(1) opacity(0.7);
  color: var(--text-on-dark-muted);
  vertical-align: middle;
}

.contact a:hover img.contact-icon,
.contact a:hover svg.contact-icon {
  filter: brightness(0) invert(1) opacity(1);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tags li {
  font-size: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-on-dark);
  padding: 4px 10px;
  border-radius: 999px;
}

/* Content */
.content {
  padding: 44px 48px;
}

.header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.header__name {
  font-size: 38px;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.header__title {
  margin: 0 0 4px;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 500;
}

.header__location {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.block {
  margin-bottom: 32px;
}

.block__title {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin: 0 0 16px;
}

.block p {
  margin: 0 0 12px;
  color: var(--text-secondary);
}

/* Project cards (live inside roles) */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 14px;
}

.card,
.card--static {
  display: block;
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text-primary);
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

a.card:hover {
  text-decoration: none;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(52, 152, 219, 0.1);
}

.card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.card__logo {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: contain;
}

.card__tag {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.card__title {
  font-size: 14px;
  margin: 0 0 6px;
  color: var(--text-primary);
  font-weight: 600;
}

.card p {
  font-size: 13px;
  margin: 0 0 8px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.card__link {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}

/* Roles */
.role {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.role:first-of-type {
  border-top: none;
  padding-top: 0;
}

.role__logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid var(--border);
}

.role__logo img {
  max-width: 78%;
  max-height: 78%;
  object-fit: contain;
  display: block;
}

.role__logo--white img {
  max-width: 78%;
  max-height: 78%;
}

.role__logo--dark {
  background: #2c3e50;
  border-color: #2c3e50;
}

.role__logo--dark img {
  max-width: 82%;
  max-height: 82%;
}

.role__logo--gradient {
  background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  border: none;
  color: white;
}

.role__logo--gett {
  background: #0a0a0a;
  border-color: #0a0a0a;
  color: #ffcb05;
}

.role__logo--kobolo {
  background: #ef4444;
  border-color: #ef4444;
  color: white;
}

.role__logo--mycheck {
  background: #10b981;
  border-color: #10b981;
  color: white;
}

.role__logo--aws-co {
  background: #475569;
  border-color: #475569;
  color: white;
}

.role__logo--freelance {
  background: #64748b;
  border-color: #64748b;
  color: white;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

.role__logo--wander {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: white;
}

.role__logo-mark {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0;
}

.role__logo--aws-co .role__logo-mark {
  font-size: 16px;
}

.role__logo--freelance .role__logo-mark {
  font-size: 18px;
}

.role__company {
  margin: 0;
  font-size: 18px;
  color: var(--text-primary);
}

.role__company a {
  color: inherit;
}

.role__company a:hover {
  color: var(--accent);
}

.role__position {
  margin: 2px 0 2px;
  color: var(--text-secondary);
  font-weight: 500;
}

.role__meta {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 13px;
}

.role__body p {
  margin: 0 0 10px;
  color: var(--text-secondary);
}

.callout {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  background: #fef3c7;
  color: #92400e;
  font-size: 13px;
  font-weight: 500;
  border-left: 3px solid #f59e0b;
}

.bullets {
  margin: 8px 0 12px;
  padding-left: 18px;
  color: var(--text-secondary);
}

.bullets li {
  margin-bottom: 8px;
}

.bullets em {
  color: var(--text-muted);
  font-style: normal;
  font-size: 13px;
}

.role__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.role__stack span,
.role__stack a,
.tags li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.role__stack span,
.role__stack a {
  font-size: 12px;
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 3px 10px;
  border-radius: 999px;
}

.chip-icon {
  width: 12px;
  height: 12px;
  display: inline-block;
  flex-shrink: 0;
  filter: saturate(1.05);
}

.tags .chip-icon {
  filter: brightness(0) invert(1) opacity(0.85);
}

.role__stack a:hover {
  background: var(--accent);
  color: white;
  text-decoration: none;
}

.footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 820px) {
  .page {
    grid-template-columns: 1fr;
    margin: 0;
    border-radius: 0;
  }

  .sidebar {
    padding: 28px 24px;
  }

  .content {
    padding: 32px 24px;
  }

  .header__name {
    font-size: 30px;
  }

  .role {
    grid-template-columns: 44px 1fr;
    gap: 14px;
  }

  .role__logo {
    width: 44px;
    height: 44px;
  }

  .cards {
    grid-template-columns: 1fr;
  }
}

/* ==========================
   Arkanoid play mode
   ========================== */

.play-button {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  color: white;
  cursor: pointer;
  z-index: 9998;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.play-button:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.5);
}

.play-button svg {
  width: 18px;
  height: 18px;
  fill: white;
}

.play-button .icon-stop {
  display: none;
}

.play-button[data-playing="true"] {
  background: #ef4444;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.play-button[data-playing="true"] .icon-play {
  display: none;
}

.play-button[data-playing="true"] .icon-stop {
  display: block;
}

/* Game overlay */
body.is-playing {
  overflow: hidden;
  cursor: none;
}

.game-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: none;
  pointer-events: none;
}

body.is-playing .game-overlay {
  display: block;
  pointer-events: auto;
}

.game-hud {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  letter-spacing: 0.05em;
  display: none;
  gap: 16px;
}

body.is-playing .game-hud {
  display: inline-flex;
}

.game-hud__win,
.game-hud__lose {
  display: none;
  color: #fbbf24;
  font-weight: 700;
}

.word {
  transition: opacity 0.18s ease;
}

.word.word--break {
  opacity: 0;
}

.paddle {
  position: fixed;
  height: 12px;
  width: 110px;
  background: linear-gradient(90deg, #06b6d4, #7c3aed);
  border-radius: 6px;
  z-index: 9994;
  display: none;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.6);
}

.ball {
  position: fixed;
  width: 14px;
  height: 14px;
  background: #fbbf24;
  border-radius: 50%;
  z-index: 9995;
  display: none;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.8);
}

body.is-playing .paddle,
body.is-playing .ball {
  display: block;
}
