:root {
  --bg: #0b0f10;
  --bg-elev: #0f1416;
  --text: #e8efe9;
  --muted: #6d7a73;
  --accent: #76c7a3;
  --accent-dim: #3a7b60;
  --danger: #ff6b6b;
  --glass: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
}

body[data-gamma="amber"] {
  --accent: #ffaa44;
  --accent-dim: #cc8833;
}

body[data-gamma="amber"] .stage {
  filter: sepia(0.3) saturate(1.5) hue-rotate(-15deg) brightness(1.05);
}

body[data-gamma="cyber"] {
  --accent: #00ffff;
  --accent-dim: #0088aa;
}

body[data-gamma="cyber"] .stage {
  filter: saturate(1.6) hue-rotate(20deg) brightness(1.1) contrast(1.1);
}

body[data-gamma="purple"] {
  --accent: #b388ff;
  --accent-dim: #7744cc;
}

body[data-gamma="purple"] .stage {
  filter: hue-rotate(80deg) saturate(1.4) brightness(1.05);
}

body[data-gamma="red"] {
  --accent: #ff6b6b;
  --accent-dim: #cc4444;
}

body[data-gamma="red"] .stage {
  filter: hue-rotate(-40deg) saturate(1.5) contrast(1.15) brightness(1.05);
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-optical-sizing: auto;
}

.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scaled {
  transform-origin: center center;
  position: relative;
  flex-shrink: 0;
}

.canvas {
  position: relative;
  width: 1920px;
  height: 1080px;
  margin: 0 auto;
}

body.powered .stage::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.03) 1px, transparent 2px, transparent 3px),
    radial-gradient(1200px 600px at 50% 0%, rgba(255,255,255,0.06), transparent 60%);
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: 10;
}

@media (prefers-reduced-motion: no-preference) {
  body.powered .stage::before {
    content: '';
    position: fixed;
    left: 0; right: 0;
    height: 120px;
    background: linear-gradient(180deg, transparent, rgba(118,199,163,0.08) 50%, transparent);
    animation: scan 8s linear infinite;
    pointer-events: none;
    z-index: 10;
  }
}

@keyframes scan {
  0% { top: -120px; }
  100% { top: 100%; }
}

.canvas.debug-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('./mock.png') top left / cover no-repeat;
  opacity: 0.32;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.left-portrait {
  position: absolute;
  left: 120px;
  top: 80px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: 
    url('./portrait.png') center center / cover no-repeat,
    #1a1f20;
  box-shadow:
    0 0 0 18px rgba(0,0,0,0.02) inset,
    0 36px 72px rgba(0,0,0,0.06),
    0 0 0 1px rgba(0,0,0,0.03);
  transition: box-shadow 0.6s ease;
}

body.powered .left-portrait {
  box-shadow:
    0 0 0 18px rgba(118,199,163,0.08) inset,
    0 36px 72px rgba(0,0,0,0.16),
    0 0 60px rgba(118,199,163,0.15),
    0 0 0 2px rgba(118,199,163,0.2);
}

body.worldline-beta.powered .left-portrait {
  box-shadow:
    0 0 0 18px rgba(136,184,255,0.08) inset,
    0 36px 72px rgba(0,0,0,0.16),
    0 0 60px rgba(136,184,255,0.15),
    0 0 0 2px rgba(136,184,255,0.2);
}

.title {
  position: absolute;
  left: 120px;
  top: 580px;
  font-weight: 800;
  font-size: 56px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.title-line {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  body.powered .title-line::after,
  body.powered .title-line::before {
    content: attr(class);
    position: absolute;
    left: 0; top: 0;
    mix-blend-mode: screen;
    color: var(--accent);
    opacity: 0.07;
    animation: glitch 5s infinite linear alternate-reverse;
    pointer-events: none;
  }
  
  body.powered .title-line:first-child::after,
  body.powered .title-line:first-child::before {
    content: 'Yevhen';
  }
  
  body.powered .title-line:last-child::after,
  body.powered .title-line:last-child::before {
    content: 'Lavreniuk';
  }
  
  .title-line {
    position: relative;
  }
}

@keyframes glitch {
  0% { transform: translate(0, 0); filter: hue-rotate(0deg); }
  20% { transform: translate(1px, -1px); }
  40% { transform: translate(-1px, 1px); }
  60% { transform: translate(1px, 1px); }
  80% { transform: translate(-1px, -1px); }
  100% { transform: translate(0, 0); filter: hue-rotate(10deg); }
}

.section-title {
  font-weight: 800;
  font-size: 60px;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin: 0 0 22px 0;
  text-transform: uppercase;
}

.body-text, .list li { 
  font-weight: 400;
  font-size: 22px;
  line-height: 1.55;
  margin: 8px 0;
}

.content-scroll-wrapper {
  position: absolute;
  left: 700px;
  top: 100px;
  right: 140px;
  bottom: 120px;
  overflow: hidden;
}

.content-scroll-wrapper::before,
.content-scroll-wrapper::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.3s ease;
}

.content-scroll-wrapper::before {
  top: 0;
  background: linear-gradient(180deg, var(--bg) 0%, transparent 100%);
  opacity: 0;
}

.content-scroll-wrapper.scrolled::before {
  opacity: 1;
}

.content-scroll-wrapper::after {
  bottom: 0;
  background: linear-gradient(0deg, var(--bg) 0%, transparent 100%);
}

.content-scroll-wrapper.at-bottom::after {
  opacity: 0;
}

.content-scroll-inner {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-dim) transparent;
}

.content-scroll-inner::-webkit-scrollbar {
  width: 6px;
}

.content-scroll-inner::-webkit-scrollbar-track {
  background: transparent;
}

.content-scroll-inner::-webkit-scrollbar-thumb {
  background: var(--accent-dim);
  border-radius: 3px;
}

.content-scroll-inner::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.about {
  margin-bottom: 48px;
}

.content-scroll-inner > section {
  display: block;
}

.two-col-wrapper {
  display: flex;
  gap: 32px;
  margin-bottom: 48px;
}

.langs {
  flex: 1;
  min-width: 0;
  margin-left: 40px;
}

.skills {
  flex: 1;
  min-width: 0;
}

.education {
  margin-bottom: 48px;
}

.edu-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
}

.edu-item .body-text {
  flex: 1;
  margin: 0;
}

.edu-time {
  font-size: 19px;
  color: var(--accent);
  white-space: nowrap;
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: 0.02em;
  padding-top: 2px;
  opacity: 0.85;
}

.experience {
  margin-bottom: 48px;
}

.hobbys {
  margin-bottom: 48px;
}

.collapsible {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: color 0.2s ease;
}

.collapsible:hover {
  opacity: 0.8;
}

.collapse-icon {
  font-size: 0.7em;
  margin-left: 8px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.collapsible.collapsed .collapse-icon {
  transform: rotate(-90deg);
}

.collapse-content {
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.3s ease;
  opacity: 1;
}

.collapse-content.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0 !important;
}

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

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

.skills-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.skill-bar-item {
  transition: transform 0.2s ease;
}

.skill-bar-item:hover {
  transform: translateX(4px);
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 18px;
}

.skill-icon {
  font-size: 22px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.skill-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.skill-bar-item:hover .skill-icon {
  transform: scale(1.15);
}

.skill-bar-item:hover .skill-icon svg {
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.skill-text {
  flex: 1;
  font-weight: 500;
}

.skill-level {
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}

.skill-bar-track {
  height: 8px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.skill-bar-item:hover .skill-bar-track {
  border-color: var(--accent);
  background: rgba(118,199,163,0.08);
}

.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, opacity 0.3s ease;
  border-radius: 3px;
  position: relative;
}

.skill-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  opacity: 0;
  animation: shimmer 3s ease-in-out 1.5s infinite;
}

@keyframes shimmer {
  0% { 
    transform: translateX(-100%); 
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% { 
    transform: translateX(100%); 
    opacity: 0;
  }
}

.skill-bar-item:hover .skill-bar-fill {
  box-shadow: 0 0 20px var(--accent), 0 0 10px rgba(118,199,163,0.5) inset;
  filter: brightness(1.2);
}

.skill-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-top: 8px;
  opacity: 0.8;
}

.exp-meta {
  font-size: 18px;
  line-height: 1.4;
  margin: 4px 0;
  opacity: 0.85;
}

.exp-subtitle {
  font-weight: 600;
  margin-top: 16px;
  margin-bottom: 8px;
}

.exp-list {
  margin-top: 8px;
}

.exp-list li {
  font-size: 20px;
  line-height: 1.5;
  margin: 6px 0;
  padding-left: 18px;
  position: relative;
}

.exp-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.contacts {
  position: absolute;
  left: 120px;
  top: 720px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 26px;
  margin: 16px 0;
  cursor: pointer;
  padding: 8px 12px;
  margin-left: -12px;
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.1s ease;
  position: relative;
}

.contact-row:hover {
  background: rgba(118,199,163,0.08);
  transform: translateX(4px);
}

.contact-row:active {
  transform: translateX(2px);
}

.icon {
  width: 34px;
  height: 34px;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.contact-row:hover .icon {
  transform: scale(1.1);
}

.copy-notification {
  position: absolute;
  left: -100px;
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  color: #0b0f10;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 20px rgba(118,199,163,0.4);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
}

.copy-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.hud {
  position: absolute;
  left: 24px;
  top: 18px;
  right: 24px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 30px rgba(0,0,0,0.35);
  backdrop-filter: saturate(120%) blur(6px);
}

.divergence {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: 'Share Tech Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.divergence .label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.28em;
}
.divergence .value {
  color: var(--accent);
  font-size: 26px;
  letter-spacing: 0.08em;
  text-shadow: 0 0 8px rgba(118,199,163,0.25);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { 
  transform: translateY(-1px); 
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}
.btn:active { transform: translateY(0); }
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn.power .led {
  width: 10px; height: 10px; border-radius: 50%; background: #364240; box-shadow: 0 0 0 2px rgba(0,0,0,0.2) inset;
  transition: all 0.3s ease;
}
body.powered .btn.power .led { 
  background: var(--accent); 
  box-shadow: 0 0 12px var(--accent), 0 0 24px rgba(118,199,163,0.4);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.btn .txt { opacity: 0.9; }

.gamma-btn {
  font-size: 20px !important;
  padding: 6px 10px !important;
  min-width: 42px;
  transition: all 0.3s ease;
}

.gamma-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px var(--accent);
}

.switch {
  position: relative;
  width: 64px;
  height: 28px;
  display: inline-block;
}
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.switch input:focus-visible ~ .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch .track {
  position: absolute; inset: 0; border-radius: 999px;
  background: linear-gradient(180deg, #1a2322, #111716);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35) inset;
  transition: all 0.3s ease;
}
.switch input:checked ~ .track {
  background: linear-gradient(180deg, #1a2d3d, #111a20);
  border-color: rgba(136,184,255,0.2);
}
.switch .tags { 
  position: absolute; inset: 0; 
  display: flex; align-items: center; 
  justify-content: space-between; 
  padding: 0 10px; 
  color: var(--muted); 
  font-family: 'Share Tech Mono', monospace; 
  pointer-events: none;
  transition: color 0.3s ease;
}
.switch .tags b { opacity: 0.8; transition: opacity 0.3s ease, color 0.3s ease; }
.switch input:not(:checked) ~ .tags b:first-child { color: var(--accent); opacity: 1; }
.switch input:checked ~ .tags b:last-child { color: #88b8ff; opacity: 1; }

.terminal-fab {
  position: fixed;
  right: 120px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  border: 1px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(118,199,163,0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b0f10;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 25;
}
.terminal-fab svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
}
.terminal-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 30px rgba(118,199,163,0.5);
}
.terminal-fab:active {
  transform: scale(0.98);
}
.terminal-fab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
body.worldline-beta .terminal-fab {
  background: linear-gradient(135deg, #3f5f88, #88b8ff);
  border-color: #88b8ff;
  box-shadow: 0 4px 20px rgba(136,184,255,0.35);
}
body.worldline-beta .terminal-fab:hover {
  box-shadow: 0 6px 30px rgba(136,184,255,0.5);
}

.console-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms ease, visibility 280ms ease;
  z-index: 30;
}
.console-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.console {
  position: relative;
  width: 90%;
  max-width: 700px;
  height: 500px;
  background: #071012;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.75);
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: transform 280ms cubic-bezier(.2,.9,.2,1);
}
.console-backdrop.open .console {
  transform: scale(1) translateY(0);
}
.console-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: rgba(255,255,255,0.04); border-bottom: 1px solid var(--border); color: var(--accent); font-family: 'Share Tech Mono', monospace; letter-spacing: 0.18em; }
.console-header .close { padding: 4px 10px; }
.console-output { height: 390px; overflow: auto; padding: 10px 14px; font-family: 'Share Tech Mono', monospace; font-size: 14px; color: #bfe8d6; }
.console-input { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--border); }
.console-input .prompt { color: var(--accent); font-family: 'Share Tech Mono', monospace; }
.console-input input { 
  flex: 1; background: transparent; border: none; outline: none; 
  color: var(--text); font-family: 'Share Tech Mono', monospace; font-size: 14px; 
}
.console-input input:focus { 
  box-shadow: 0 1px 0 0 var(--accent); 
}

@media (prefers-reduced-motion: no-preference) {
  .about, .langs, .skills, .education, .experience, .hobbys, .contacts { opacity: 0; transform: translateY(12px); transition: opacity 500ms ease, transform 500ms ease; }
  body.ready .about, body.ready .langs, body.ready .skills, body.ready .education, body.ready .experience, body.ready .hobbys, body.ready .contacts { opacity: 1; transform: none; }
}

body.worldline-beta {
  --accent: #88b8ff;
  --accent-dim: #3f5f88;
}


