/* ================================================
   hyben.cz — Pixel Art Dark Theme
   ================================================ */

/* ── Variables ── */
:root {
  --bg:         #080810;
  --surface:    #0e0e1c;
  --card:       #13132a;
  --border:     #242444;
  --border-lo:  #1b1b34;
  --primary:    #b06ef3;
  --primary-lo: rgba(176, 110, 243, 0.12);
  --cyan:       #e879f9;
  --text:       #d6def0;      /* primary body text */
  --text-mid:   #aab4d0;      /* secondary text — cards, descriptions */
  --text-dim:   #8391b5;      /* muted labels, meta (brighter than before for readability) */
  --glow:       0 0 8px rgba(176, 110, 243, 0.6), 0 0 24px rgba(176, 110, 243, 0.25);

  /* Type scale */
  --fs-body:    15px;         /* default card / paragraph copy */
  --fs-sm:      13px;         /* meta, small print */
  --fs-lead:    16px;         /* intro / lead paragraphs */

  --font-pixel: 'Press Start 2P', monospace;
  --font-mono:  'Space Mono', 'Courier New', monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: rgba(176, 110, 243, 0.35); color: #fff; }
img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(176, 110, 243, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(176, 110, 243, 0.022) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.75;
  min-height: 100vh;
}

/* ── Scanlines overlay ── */
.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.05) 3px,
    rgba(0, 0, 0, 0.05) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ── Animations ── */
@keyframes blink        { 0%,100%{opacity:1} 50%{opacity:0} }
@keyframes glow-pulse   { 0%,100%{text-shadow:0 0 8px var(--primary),0 0 20px rgba(176,110,243,.3)} 50%{text-shadow:0 0 20px var(--primary),0 0 50px rgba(176,110,243,.5)} }
@keyframes fade-up      { from{opacity:0;transform:translateY(18px)} to{opacity:1;transform:translateY(0)} }

.blink { animation: blink 1s step-end infinite; }

/* ── Pixel box ── */
.pixel-box {
  background: var(--card);
  border: 3px solid var(--border);
  transition: border-color .2s, box-shadow .2s;
}
.pixel-box:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--glow);
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 4vw;
  background: rgba(8, 8, 16, 0.92);
  border-bottom: 2px solid var(--border);
  backdrop-filter: blur(10px);
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: rgba(176, 110, 243, 0.35); }

.nav-logo {
  font-family: var(--font-pixel);
  font-size: 13px;
  color: var(--primary);
  text-shadow: var(--glow);
  letter-spacing: 2px;
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 1px;
  transition: color .2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--primary); text-shadow: var(--glow); }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 7rem 4vw 4rem;
  display: flex;
  align-items: center;
  gap: 4rem;
}

.hero-content {
  flex: 1;
  animation: fade-up .6s ease both;
}

.hero-badge {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--primary);
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
}

.hero-name {
  font-family: var(--font-pixel);
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
  margin-bottom: 1.4rem;
  animation: glow-pulse 4s ease-in-out infinite;
}

.hero-typewriter {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--cyan);
  margin-bottom: 1.4rem;
  min-height: 1.8rem;
}
.cursor { color: var(--primary); }

.hero-desc {
  color: var(--text-dim);
  font-size: .95rem;
  max-width: 440px;
  margin-bottom: 2.5rem;
}

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  font-family: var(--font-pixel);
  font-size: 9px;
  padding: .9rem 1.5rem;
  letter-spacing: 1px;
  text-decoration: none;
  border: 3px solid;
  display: inline-block;
  transition: all .15s;
  cursor: pointer;
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg);
}
.btn-primary:hover {
  background: transparent;
  color: var(--primary);
  box-shadow: var(--glow);
}
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-dim);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Terminal window ── */
.hero-terminal {
  flex: 0 0 420px;
  animation: fade-up .6s .25s ease both;
  opacity: 0;
  animation-fill-mode: forwards;
}

.terminal-window {
  border: 2px solid rgba(176, 110, 243, 0.3);
  background: #12001e;
  box-shadow: 0 0 40px rgba(176, 110, 243, 0.12), 0 24px 64px rgba(0,0,0,.7);
  border-radius: 0;
  overflow: hidden;
}

/* Ubuntu-style title bar */
.terminal-bar {
  background: #2a0a3e;
  border-bottom: 1px solid rgba(176, 110, 243, 0.2);
  padding: .55rem 1rem;
  display: flex;
  align-items: center;
  gap: 0;
}
.t-controls { display: flex; gap: .45rem; margin-right: auto; }
.t-dot { width: 12px; height: 12px; display: inline-block; border-radius: 50%; }
.t-close  { background: #ff5f57; }
.t-min    { background: #febc2e; }
.t-max    { background: #28c840; }
.t-title  {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: rgba(176, 110, 243, 0.7);
  font-family: var(--font-mono);
  pointer-events: none;
}

/* Terminal body */
.terminal-body {
  padding: 1.1rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  background: #12001e;
  text-align: left;
}
.t-line { font-family: var(--font-mono); font-size: 13px; color: #e2d9f3; line-height: 1.7; }

/* Ubuntu PS1 prompt: user@host:path $ */
.t-ps1 { margin-right: .3rem; }
.t-user   { color: var(--primary); font-weight: 700; }
.t-sep    { color: #e2d9f3; }
.t-path   { color: var(--cyan); font-weight: 700; }
.t-dollar { color: #e2d9f3; margin-right: .2rem; }

.t-out     { color: #9d8ec0; padding-left: 0; }
.t-primary { color: var(--primary); font-weight: 700; animation: glow-pulse 4s ease-in-out infinite; }

/* ── Section layout ── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5.5rem 4vw;
}
.section-bg { background: var(--surface); }

.section-title {
  font-family: var(--font-pixel);
  font-size: clamp(14px, 2vw, 20px);
  color: #fff;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.section-title::after {
  content: '';
  flex: 1;
  max-width: 320px;
  height: 2px;
  background: linear-gradient(90deg, var(--border), transparent);
}
.title-num { color: var(--primary); font-size: .65em; }

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3.5rem;
  align-items: start;
}
.about-text { max-width: 640px; }
.about-text p { color: var(--text-mid); font-size: var(--fs-lead); line-height: 1.8; margin-bottom: 1.1rem; }
.about-text p:last-child { margin-bottom: 0; }
.hl { color: var(--primary); font-weight: 700; }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.stat-flag {
  width: 48px;
  height: 32px;
  object-fit: cover;
  image-rendering: pixelated;
  margin-bottom: .4rem;
}
.stat-box {
  padding: 1.2rem 1rem;
  text-align: center;
  min-width: 115px;
}
.stat-num {
  font-family: var(--font-pixel);
  font-size: 20px;
  color: var(--primary);
  text-shadow: var(--glow);
  margin-bottom: .4rem;
}
.stat-label { font-size: 11px; color: var(--text-dim); line-height: 1.4; }

/* ── Education ── */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.edu-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* Top: logo + title block */
.edu-top { display: flex; gap: 1.1rem; align-items: flex-start; }
.edu-logo {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  object-fit: contain;
}
.edu-title-block { display: flex; flex-direction: column; gap: .3rem; }
.edu-degree {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--primary);
  line-height: 1.7;
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.edu-field {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}
.edu-university {
  font-size: 13px;
  color: var(--text-dim);
}

/* Dates row */
.edu-info-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 13px;
  color: var(--text-dim);
}
.edu-sep { color: var(--border); }

/* Divider */
.edu-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: .4;
}

/* Department */
.edu-dept {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  border-left: 3px solid var(--primary);
  padding-left: .75rem;
  line-height: 1.5;
}

/* Course list */
.edu-courses {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.edu-courses li {
  font-size: var(--fs-sm);
  color: var(--text-mid);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.6;
}
.edu-courses li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* Activity / thesis note */
.edu-activity {
  font-size: 13px;
  color: var(--text-dim);
  background: var(--surface);
  border-left: 3px solid var(--border);
  padding: .65rem .85rem;
  line-height: 1.6;
}
.edu-activity-label {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--primary);
  letter-spacing: 1px;
  display: block;
  margin-bottom: .35rem;
}

@media (max-width: 840px) {
  .edu-grid { grid-template-columns: 1fr; }
}

/* ── Experience ── */
.exp-list { display: flex; flex-direction: column; gap: 1.5rem; }

.exp-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.75rem;
  align-items: flex-start;
}

.exp-logo {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.exp-body { flex: 1; display: flex; flex-direction: column; gap: .9rem; }

.exp-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.exp-left { display: flex; flex-direction: column; gap: .3rem; }
.exp-title { font-size: 16px; font-weight: 700; color: #fff; }
.exp-company { font-size: 14px; color: var(--text-dim); }
.exp-name { color: var(--primary); font-weight: 700; }

.exp-right { text-align: right; display: flex; flex-direction: column; gap: .35rem; flex-shrink: 0; }
.exp-dates { font-size: 13px; color: var(--text-dim); white-space: nowrap; }
.exp-current {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .4rem;
}
.blink-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary);
  animation: blink 1s step-end infinite;
}

.exp-divider { height: 1px; background: linear-gradient(90deg, var(--primary), transparent); opacity: .3; }

.exp-points {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.exp-points li { font-size: var(--fs-body); color: var(--text-mid); padding-left: 1.1rem; position: relative; line-height: 1.6; }
.exp-points li::before { content: '›'; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

.exp-tags { display: flex; flex-wrap: wrap; gap: .4rem; }

/* Current / freelance card — pulsing highlight */
@keyframes card-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(176, 110, 243, .3), 0 0 14px rgba(176, 110, 243, .12); border-color: var(--primary); }
  50%      { box-shadow: 0 0 0 1px var(--primary), var(--glow); border-color: var(--cyan); }
}
.exp-card-current { border-color: var(--primary); animation: card-pulse 3s ease-in-out infinite; }
.exp-card-current:hover { animation-play-state: paused; }

/* Pulsing "CONTACT ME!" call-to-action inside a card */
.exp-contact {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .5px;
  animation: glow-pulse 2s ease-in-out infinite;
}
.exp-contact:hover { color: var(--cyan); text-decoration: underline; }

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
}
.skill-category { padding: 1.5rem; }
.skill-ai { grid-column: 1 / -1; }
.skill-ai-body { display: flex; gap: 2rem; align-items: stretch; flex-wrap: wrap; }
.skill-ai-left { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 1rem; }
.skill-name-dim { font-size: 11px; color: var(--text-dim); font-weight: normal; }
.skill-ai-label { display: block; font-family: var(--font-pixel); font-size: 9px; color: var(--text-dim); margin-bottom: .25rem; }
.skill-ai-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.skill-ai-chip {
  font-family: var(--font-pixel);
  font-size: 9px;
  padding: .3rem .75rem;
  border: 2px solid var(--primary);
  color: var(--primary);
  background: var(--primary-lo);
}
.skill-ai-chip-dim {
  border-color: var(--text-dim);
  color: var(--text-dim);
  background: transparent;
}

/* AI terminal window */
.skill-ai-window { flex: 1; min-width: 240px; display: flex; align-self: stretch; }
.skill-ai-term {
  flex: 1;
  padding: 1rem 1.2rem;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  background: var(--bg);
  border: 2px solid var(--border);
}
.ait-line { opacity: 0; color: var(--text); }
.ait-dim  { color: var(--text-dim); }
.ait-dots { display: flex; gap: .4rem; align-items: center; }
.ait-dot  {
  font-size: 10px;
  color: var(--primary);
  animation: ait-dot-pulse 1.2s ease-in-out infinite;
}
.ait-dot:nth-child(2) { animation-delay: .2s; }
.ait-dot:nth-child(3) { animation-delay: .4s; }

/* sequence: 9s loop — each line has its own keyframe */
.ait-l1 { animation: ait-l1 9s ease infinite; }
.ait-l2 { animation: ait-l2 9s ease infinite; }
.ait-l3 { animation: ait-l3 9s ease infinite; }
.ait-l4 { animation: ait-l4 9s ease infinite; }
.ait-l5 { animation: ait-l5 9s ease infinite; }
.ait-l6 { animation: ait-l6 9s ease infinite; }

@keyframes ait-dot-pulse {
  0%, 100% { opacity: .2; transform: translateY(0); }
  50%       { opacity: 1;  transform: translateY(-3px); }
}
@keyframes ait-l1 {
  0%   { opacity: 0; }   3%  { opacity: 1; }
  83%  { opacity: 1; }   94% { opacity: 0; }  100% { opacity: 0; }
}
@keyframes ait-l2 {
  0%, 11% { opacity: 0; }  15% { opacity: 1; }
  83%     { opacity: 1; }  94% { opacity: 0; }  100% { opacity: 0; }
}
@keyframes ait-l3 {
  0%, 20% { opacity: 0; }  24% { opacity: 1; }
  83%     { opacity: 1; }  94% { opacity: 0; }  100% { opacity: 0; }
}
@keyframes ait-l4 {
  0%, 28% { opacity: 0; }  31% { opacity: 1; }
  56%     { opacity: 1; }  61% { opacity: 0; }  100% { opacity: 0; }
}
@keyframes ait-l5 {
  0%, 57% { opacity: 0; }  62% { opacity: 1; }
  83%     { opacity: 1; }  94% { opacity: 0; }  100% { opacity: 0; }
}
@keyframes ait-l6 {
  0%, 65% { opacity: 0; }  69% { opacity: 1; }
  83%     { opacity: 1; }  94% { opacity: 0; }  100% { opacity: 0; }
}
.skill-cat-title {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--primary);
  margin-bottom: 1.4rem;
  letter-spacing: 1px;
}
.skill-item { margin-bottom: 1rem; }
.skill-name { display: block; font-size: 13px; color: var(--text); margin-bottom: .35rem; }

.skill-bar {
  height: 12px;
  background: var(--border);
  border: 2px solid var(--border);
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  width: 0;
  background: var(--primary);
  box-shadow: 0 0 10px rgba(176, 110, 243, 0.45);
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
  position: relative;
}
/* Pixel segments on bar */
.skill-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 8px,
    rgba(8, 8, 16, 0.35) 8px,
    rgba(8, 8, 16, 0.35) 10px
  );
}
.skill-fill.animate { width: var(--fill); }

/* ── Projects ── */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.project-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: row;
  gap: 1.75rem;
  align-items: stretch;
}
.project-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.project-header { display: flex; align-items: center; gap: .75rem; }
.project-icon { font-family: var(--font-pixel); font-size: 11px; color: var(--primary); }
.project-eyebrow { font-family: var(--font-pixel); font-size: 8px; letter-spacing: 1px; color: var(--primary); }
.project-sub { font-size: var(--fs-sm); color: var(--text-dim); font-style: italic; line-height: 1.5; }
/* Whole-card link */
.project-card-link { text-decoration: none; color: inherit; cursor: pointer; }
.project-more {
  margin-top: .5rem;
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: color .2s, text-shadow .2s;
}
.project-more .arrow { transition: transform .2s; }
.project-card-link:hover .project-more,
.project-card-link:focus-visible .project-more { color: var(--primary); text-shadow: var(--glow); }
.project-card-link:hover .project-more .arrow,
.project-card-link:focus-visible .project-more .arrow { transform: translateX(4px); }
.project-card-link:hover .project-title-link,
.project-card-link:focus-visible .project-title-link { color: var(--primary); text-shadow: var(--glow); }
.project-link {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color .2s;
}
.project-link:hover { color: var(--primary); }
/* Thumbnail fills the full card height so the card reads as one block with the image */
.project-thumb {
  flex: 0 0 200px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}
.project-thumb-img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
}
.project-title { font-family: var(--font-pixel); font-size: 12px; color: #fff; line-height: 1.8; }
.project-title-link { color: inherit; text-decoration: none; transition: color .2s, text-shadow .2s; }
.project-title-link:hover { color: var(--primary); text-shadow: var(--glow); }
.status-plain { font-family: var(--font-mono); font-size: 13px; font-weight: 400; color: var(--text-dim); vertical-align: middle; white-space: nowrap; }
.project-desc { font-size: var(--fs-body); color: var(--text-mid); line-height: 1.6; }
.project-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: .35rem .6rem;
  letter-spacing: 1px;
}

/* ── Contact ── */
.contact-wrap { max-width: 100%; }
.contact-text { color: var(--text-mid); font-size: var(--fs-lead); margin-bottom: 2rem; }
.contact-reach { color: var(--primary); font-weight: 700; animation: glow-pulse 4s ease-in-out infinite; }
.contact-meta { margin-top: 1.75rem; font-size: var(--fs-sm); color: var(--text-dim); }
.contact-meta a { color: var(--primary); text-decoration: none; transition: color .2s; }
.contact-meta a:hover { color: var(--cyan); text-decoration: underline; }
.contact-links { display: flex; flex-direction: row; flex-wrap: wrap; gap: 1rem; }
.contact-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 130px;
  height: 130px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: color .2s;
}
.contact-link:hover { color: var(--primary); }
.contact-icon { font-family: var(--font-pixel); font-size: 14px; color: var(--primary); }

/* ── Footer ── */
.footer {
  border-top: 2px solid var(--border);
  background: var(--surface);
  padding: 2rem 4vw 2.25rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-disclaimer {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 11px;
  line-height: 1.7;
  color: var(--text-dim);
  opacity: .7;
}
.footer-logo { font-family: var(--font-pixel); font-size: 11px; color: var(--primary); }
.footer-top {
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--primary);
  text-decoration: none;
  position: fixed;
  bottom: 1.6rem;
  left: 50%;
  margin-left: -18px;
  transform: rotate(-90deg);
  transition: opacity 0.15s, bottom 0.2s;
  line-height: 1;
  z-index: 90;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(176, 110, 243, 0.12);
  backdrop-filter: blur(6px);
  border-radius: 8px;
}
.footer-top:hover { opacity: 0.7; bottom: 1.9rem; }
#footerArrow { cursor: pointer; transition: opacity 0.15s; }
#footerArrow:hover { opacity: 0.7; }
#ukraineText {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  transition: max-width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
#ukraineText.active { max-width: 260px; }
#ukraineWords { animation: ukraine-blink 0.45s ease-in-out infinite; }
#ukraineClose { color: var(--primary); }
@keyframes ukraine-blink {
  0%, 100% { color: #56C8F5; text-shadow: 0 0 10px rgba(86, 200, 245, 0.9); }
  50%       { color: #FFD700; text-shadow: 0 0 10px rgba(255, 215,   0, 0.9); }
}
.footer-copy { font-size: 13px; color: var(--text-dim); }
.footer-visits { font-size: 13px; color: var(--text-dim); margin-left: auto; }
.footer-visits #visitCount { color: var(--primary); }

/* ── Terminal dachshund (kept for reference; currently disabled) ── */
.t-dog-wrap {
  position: relative;
  height: 42px;
  overflow: hidden;
  margin-bottom: 2px;
}

/*
  Dachshund silhouette — 3px/pixel, facing right (tail=left, nose=right)
  Grid 20 cols × 9 rows = 60px × 27px

  y=1  . . # . . . . . . . . . . . . . . . . .   tail tip
  y=2  . # # # # # # # # # # # # # # # # # . .   back ridge
  y=3  # # # # # # # # # # # # # # # # # # # .   body top (tail base at 0)
  y=4  . # # # # # # # # # # # # # # # # # # #   lower body + snout
  y=5  . . . . # # # # # # # # . . . # # . . .   belly + drooping ear
  y=6  . . . . # . . . # . . . . . . # . . . .   front/back legs A + ear tip
  y=7  . . . . # . . . # . . . . . . . . . . .   legs A
  y=8  . . . . # # . . # # . . . . . . . . . .   paws A
  LegB y=6: cols 5,9   y=7: cols 5,9   y=8: cols 5-6,9-10
*/
.t-dog {
  position: absolute;
  top: 5px;
  left: 0;
  width: 3px;
  height: 3px;
  background: var(--primary);
  transform-origin: 30px 13px;
  image-rendering: pixelated;
  animation: dog-legs .4s steps(1) infinite;
}

@keyframes dog-legs {
  0% {
    box-shadow:
      /* tail tip */
      6px 3px 0 0 var(--primary),
      /* back ridge */
      3px 6px 0 0 var(--primary),   6px 6px 0 0 var(--primary),   9px 6px 0 0 var(--primary),
      12px 6px 0 0 var(--primary),  15px 6px 0 0 var(--primary),  18px 6px 0 0 var(--primary),
      21px 6px 0 0 var(--primary),  24px 6px 0 0 var(--primary),  27px 6px 0 0 var(--primary),
      30px 6px 0 0 var(--primary),  33px 6px 0 0 var(--primary),  36px 6px 0 0 var(--primary),
      39px 6px 0 0 var(--primary),  42px 6px 0 0 var(--primary),  45px 6px 0 0 var(--primary),
      48px 6px 0 0 var(--primary),  51px 6px 0 0 var(--primary),
      /* body top */
      0px 9px 0 0 var(--primary),   3px 9px 0 0 var(--primary),   6px 9px 0 0 var(--primary),
      9px 9px 0 0 var(--primary),   12px 9px 0 0 var(--primary),  15px 9px 0 0 var(--primary),
      18px 9px 0 0 var(--primary),  21px 9px 0 0 var(--primary),  24px 9px 0 0 var(--primary),
      27px 9px 0 0 var(--primary),  30px 9px 0 0 var(--primary),  33px 9px 0 0 var(--primary),
      36px 9px 0 0 var(--primary),  39px 9px 0 0 var(--primary),  42px 9px 0 0 var(--primary),
      45px 9px 0 0 var(--primary),  48px 9px 0 0 var(--primary),  51px 9px 0 0 var(--primary),
      54px 9px 0 0 var(--primary),
      /* lower body + snout */
      3px 12px 0 0 var(--primary),  6px 12px 0 0 var(--primary),  9px 12px 0 0 var(--primary),
      12px 12px 0 0 var(--primary), 15px 12px 0 0 var(--primary), 18px 12px 0 0 var(--primary),
      21px 12px 0 0 var(--primary), 24px 12px 0 0 var(--primary), 27px 12px 0 0 var(--primary),
      30px 12px 0 0 var(--primary), 33px 12px 0 0 var(--primary), 36px 12px 0 0 var(--primary),
      39px 12px 0 0 var(--primary), 42px 12px 0 0 var(--primary), 45px 12px 0 0 var(--primary),
      48px 12px 0 0 var(--primary), 51px 12px 0 0 var(--primary), 54px 12px 0 0 var(--primary),
      57px 12px 0 0 var(--primary),
      /* belly + drooping ear */
      12px 15px 0 0 var(--primary), 15px 15px 0 0 var(--primary), 18px 15px 0 0 var(--primary),
      21px 15px 0 0 var(--primary), 24px 15px 0 0 var(--primary), 27px 15px 0 0 var(--primary),
      30px 15px 0 0 var(--primary), 33px 15px 0 0 var(--primary),
      45px 15px 0 0 var(--primary), 48px 15px 0 0 var(--primary),
      /* legs A + ear tip */
      12px 18px 0 0 var(--primary), 24px 18px 0 0 var(--primary), 45px 18px 0 0 var(--primary),
      /* legs A */
      12px 21px 0 0 var(--primary), 24px 21px 0 0 var(--primary),
      /* paws A */
      12px 24px 0 0 var(--primary), 15px 24px 0 0 var(--primary),
      24px 24px 0 0 var(--primary), 27px 24px 0 0 var(--primary);
  }
  50% {
    box-shadow:
      /* tail tip */
      6px 3px 0 0 var(--primary),
      /* back ridge */
      3px 6px 0 0 var(--primary),   6px 6px 0 0 var(--primary),   9px 6px 0 0 var(--primary),
      12px 6px 0 0 var(--primary),  15px 6px 0 0 var(--primary),  18px 6px 0 0 var(--primary),
      21px 6px 0 0 var(--primary),  24px 6px 0 0 var(--primary),  27px 6px 0 0 var(--primary),
      30px 6px 0 0 var(--primary),  33px 6px 0 0 var(--primary),  36px 6px 0 0 var(--primary),
      39px 6px 0 0 var(--primary),  42px 6px 0 0 var(--primary),  45px 6px 0 0 var(--primary),
      48px 6px 0 0 var(--primary),  51px 6px 0 0 var(--primary),
      /* body top */
      0px 9px 0 0 var(--primary),   3px 9px 0 0 var(--primary),   6px 9px 0 0 var(--primary),
      9px 9px 0 0 var(--primary),   12px 9px 0 0 var(--primary),  15px 9px 0 0 var(--primary),
      18px 9px 0 0 var(--primary),  21px 9px 0 0 var(--primary),  24px 9px 0 0 var(--primary),
      27px 9px 0 0 var(--primary),  30px 9px 0 0 var(--primary),  33px 9px 0 0 var(--primary),
      36px 9px 0 0 var(--primary),  39px 9px 0 0 var(--primary),  42px 9px 0 0 var(--primary),
      45px 9px 0 0 var(--primary),  48px 9px 0 0 var(--primary),  51px 9px 0 0 var(--primary),
      54px 9px 0 0 var(--primary),
      /* lower body + snout */
      3px 12px 0 0 var(--primary),  6px 12px 0 0 var(--primary),  9px 12px 0 0 var(--primary),
      12px 12px 0 0 var(--primary), 15px 12px 0 0 var(--primary), 18px 12px 0 0 var(--primary),
      21px 12px 0 0 var(--primary), 24px 12px 0 0 var(--primary), 27px 12px 0 0 var(--primary),
      30px 12px 0 0 var(--primary), 33px 12px 0 0 var(--primary), 36px 12px 0 0 var(--primary),
      39px 12px 0 0 var(--primary), 42px 12px 0 0 var(--primary), 45px 12px 0 0 var(--primary),
      48px 12px 0 0 var(--primary), 51px 12px 0 0 var(--primary), 54px 12px 0 0 var(--primary),
      57px 12px 0 0 var(--primary),
      /* belly + drooping ear */
      12px 15px 0 0 var(--primary), 15px 15px 0 0 var(--primary), 18px 15px 0 0 var(--primary),
      21px 15px 0 0 var(--primary), 24px 15px 0 0 var(--primary), 27px 15px 0 0 var(--primary),
      30px 15px 0 0 var(--primary), 33px 15px 0 0 var(--primary),
      45px 15px 0 0 var(--primary), 48px 15px 0 0 var(--primary),
      /* legs B + ear tip */
      15px 18px 0 0 var(--primary), 27px 18px 0 0 var(--primary), 45px 18px 0 0 var(--primary),
      /* legs B */
      15px 21px 0 0 var(--primary), 27px 21px 0 0 var(--primary),
      /* paws B */
      15px 24px 0 0 var(--primary), 18px 24px 0 0 var(--primary),
      27px 24px 0 0 var(--primary), 30px 24px 0 0 var(--primary);
  }
}

/* ── Nav toggle (mobile hamburger) ── */
.nav-toggle {
  display: none;
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--primary);
  background: none;
  border: 2px solid var(--border);
  padding: .4rem .7rem;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.nav-toggle:hover { border-color: var(--primary); }

/* ── Responsive ── */

/* Large tablet / small desktop */
@media (max-width: 1024px) {
  .nav-links { gap: 1.2rem; }
  .hero { padding: 7rem 3vw 4rem; gap: 2.5rem; }
  .hero-terminal { flex: 0 0 360px; }
  .section { padding: 4.5rem 3vw; }
}

/* Tablet */
@media (max-width: 840px) {
  /* Nav */
  .nav { padding: .9rem 4vw; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 8px; }

  /* Hero */
  .hero { flex-direction: column; padding: 6rem 5vw 3rem; gap: 2.5rem; text-align: center; min-height: auto; }
  .hero-content { align-items: center; display: flex; flex-direction: column; }
  .hero-buttons { justify-content: center; }
  .hero-terminal { flex: unset; width: 100%; max-width: 520px; margin: 0 auto; }
  .hero-desc { max-width: 100%; }

  /* Sections */
  .section { padding: 4rem 5vw; }
  .section-title::after { max-width: 160px; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }

  /* Education */
  .edu-grid { grid-template-columns: 1fr; }

  /* Skills */
  .skills-grid { grid-template-columns: 1fr 1fr; }
}

/* Mobile */
@media (max-width: 640px) {
  /* Nav — hamburger */
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: fixed;
    top: 56px; left: 0; right: 0;
    background: rgba(8, 8, 16, 0.97);
    border-bottom: 2px solid var(--border);
    flex-direction: column;
    gap: 0;
    z-index: 99;
    backdrop-filter: blur(12px);
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links a { display: block; padding: 1rem 1.5rem; font-size: 10px; }

  /* Hero */
  .hero { padding: 5.5rem 5vw 2.5rem; gap: 2rem; }
  .hero-name { font-size: clamp(1.6rem, 10vw, 2.4rem); }
  .hero-badge { font-size: 8px; }
  .hero-typewriter { font-size: .95rem; }

  /* Education dept */
  .edu-dept { display: flex; flex-direction: column; gap: .1rem; }
  .edu-dept-sep { display: none; }

  /* Terminal */
  .terminal-body { padding: .9rem 1rem; text-align: left; }
  .t-line { font-size: 12px; }
  .t-ps1 { display: inline; }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr 1fr; }

  /* Skills */
  .skills-grid { grid-template-columns: 1fr; }

  /* Education */
  .edu-card { padding: 1.2rem; }
  .edu-logo { width: 48px; height: 48px; flex: 0 0 48px; }
  .edu-field { font-size: 12px; }

  /* Experience */
  .exp-card { flex-direction: column; gap: .8rem; padding: 1.2rem; position: relative; }
  .exp-top { flex-direction: column; gap: .5rem; }
  .exp-right { text-align: left; }
  .exp-logo { width: 44px; height: 44px; }
  .exp-current { position: absolute; top: 1.2rem; right: 1.2rem; }

  /* Projects */
  .project-card { flex-direction: column; padding: 0; overflow: hidden; gap: 0; }
  .project-thumb { order: -1; flex: 0 0 auto; width: 100%; }
  .project-thumb-img { width: 100%; height: 160px; min-height: 0; object-fit: contain; background: var(--surface); display: block; padding: 1rem; box-sizing: border-box; border-bottom: 2px solid var(--border); }
  .project-body { padding: 1.2rem; }

  /* Contact */
  .contact-links { gap: .75rem; }
  .contact-link { width: 110px; height: 110px; font-size: 11px; }
  .contact-icon { font-size: 11px; }

  /* Buttons */
  .btn { font-size: 8px; padding: .8rem 1.2rem; }

  /* Back to top */
  .footer-top { left: auto; right: 1.2rem; margin-left: 0; }
}

/* Small mobile */
@media (max-width: 400px) {
  .hero-name { font-size: 1.5rem; }
  .contact-link { width: 95px; height: 95px; font-size: 10px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .edu-top { flex-direction: column; gap: .75rem; }
  .exp-dates { font-size: 10px; white-space: normal; }
}

/* ================================================
   Project / Thesis detail pages
   ================================================ */

/* Page wrapper keeps content centered like .section */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 7rem 4vw 4rem;
}

/* Breadcrumb / back link */
.breadcrumb {
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 1px;
  margin-bottom: 2rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-dim); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--primary); text-shadow: var(--glow); }
.breadcrumb .crumb-sep { color: var(--border); }
.breadcrumb .crumb-current { color: var(--primary); }

/* ── Project hero ── */
.proj-hero {
  margin-bottom: 3.5rem;
}
.proj-hero-left { display: flex; flex-direction: column; gap: 1.1rem; }
.proj-eyebrow {
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--primary);
}
.proj-title {
  font-family: var(--font-pixel);
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  line-height: 1.25;
  background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.proj-tagline { color: var(--text); font-size: 1rem; max-width: 60ch; }
.proj-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1.2rem;
  font-size: 13px;
  color: var(--text-dim);
}
.proj-meta .meta-item { display: inline-flex; align-items: center; gap: .45rem; }
.proj-meta .meta-key {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--primary);
  letter-spacing: 1px;
}
/* White app logo shown at the top of the Overview block */
.overview-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 140px;
  max-width: min(360px, 80%);
  margin: 0 0 1.75rem;
}

.proj-tags { display: flex; flex-wrap: wrap; gap: .4rem; }

/* Action buttons row */
.proj-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .4rem; }

/* ── Content blocks ── */
.proj-block { margin-bottom: 3.5rem; }
.proj-block-title {
  font-family: var(--font-pixel);
  font-size: 13px;
  color: #fff;
  margin-bottom: 1.6rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.proj-block-title::before { content: '//'; color: var(--primary); }
.proj-block-title::after {
  content: '';
  flex: 1;
  max-width: 260px;
  height: 2px;
  background: linear-gradient(90deg, var(--border), transparent);
}
.proj-prose p { color: var(--text-mid); font-size: var(--fs-lead); line-height: 1.8; margin-bottom: 1rem; max-width: 72ch; }
.proj-prose p:last-child { margin-bottom: 0; }
.proj-prose .hl { color: var(--primary); font-weight: 700; }

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}
.feature-card { padding: 1.4rem; display: flex; flex-direction: column; gap: .6rem; }
.feature-icon {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--primary);
}
.feature-name { font-size: 15px; font-weight: 700; color: #fff; }
.feature-text { font-size: var(--fs-sm); color: var(--text-mid); line-height: 1.6; }

/* Tech stack list */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.tech-item {
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.tech-item .tech-label { font-family: var(--font-pixel); font-size: 8px; color: var(--primary); letter-spacing: 1px; }
.tech-item .tech-val { font-size: 14px; color: var(--text); font-weight: 700; }

/* Numbered "how it works" steps */
.steps { display: flex; flex-direction: column; gap: 1rem; counter-reset: step; }
.step {
  display: flex;
  gap: 1.1rem;
  padding: 1.2rem 1.4rem;
  align-items: flex-start;
}
.step-num {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--primary);
  flex: 0 0 auto;
  min-width: 2.5rem;
}
.step-body { display: flex; flex-direction: column; gap: .3rem; }
.step-title { font-size: 15px; font-weight: 700; color: #fff; }
.step-text { font-size: var(--fs-sm); color: var(--text-mid); line-height: 1.6; }

/* Screenshot gallery — borderless tiles, image fills the frame (cropped as needed) */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}
/* Portrait variant for mobile-app (phone) screenshots */
.shot-grid-portrait {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  max-width: 720px;
}
.shot-item { display: flex; flex-direction: column; gap: .6rem; }
.shot {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  line-height: 0;
  transition: box-shadow .2s, transform .2s;
}
.shot-grid-portrait .shot { aspect-ratio: 1 / 2; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot:hover { box-shadow: var(--glow); transform: translateY(-2px); }
.shot-cap { font-size: 12px; color: var(--text-dim); text-align: center; line-height: 1.5; }

/* Info callout */
.callout {
  border-left: 3px solid var(--primary);
  background: var(--surface);
  padding: 1rem 1.2rem;
  font-size: var(--fs-body);
  color: var(--text-mid);
  line-height: 1.6;
}
.callout .callout-label {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--primary);
  display: block;
  margin-bottom: .4rem;
  letter-spacing: 1px;
}

/* Prev/next project nav */
.proj-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.proj-pager a {
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-decoration: none;
  padding: .8rem 1.2rem;
  border: 3px solid var(--border);
  transition: border-color .2s, color .2s;
}
.proj-pager a:hover { border-color: var(--primary); color: var(--primary); }


/* ================================================
   Reduced motion
   ================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .scanlines { display: none; }
  .skill-fill { transition: none; }
}

