:root {
  color-scheme: dark;

  --ink: #f5efff;
  --paper: #15121f;
  --lime: #dfff52;
  --pink: #3a1735;
  --pink-pop: #ff67c2;
  --blue: #153247;
  --purple: #302047;
  --shadow: #080610;

  --line: 2px solid var(--ink);

  font-family: 'Trebuchet MS', Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background-color: #0e0c15;
  background-image: radial-gradient(#302b3b 0.7px, transparent 0.7px);
  background-size: 15px 15px;
}

button, input, textarea { font: inherit; }
a { color: inherit; }


.page-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 22px auto;
  overflow: hidden;
  border: var(--line);
  background: var(--paper);
  box-shadow: 9px 9px 0 var(--shadow);
}

.top-strip,
.bottom-strip {
  overflow: hidden;
  color: var(--lime);
  background: #100e18;
  border-bottom: var(--line);
  font: 500 11px 'DM Mono', monospace;
  letter-spacing: .11em;
  white-space: nowrap;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 27s linear infinite;
}

.marquee-track span { padding: 11px 0; }

@keyframes marquee { to { transform: translateX(-50%); } }


.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  min-height: 490px;
  padding: 66px 8% 52px;
  overflow: hidden;
  background: var(--pink);
  border-bottom: var(--line);
}

.hero::before {
  position: absolute;
  inset: 0;
  content: '';
  opacity: .14;
  background-image: radial-gradient(var(--ink) .8px, transparent .8px);
  background-size: 13px 13px;
  pointer-events: none;
}

.hero-copy,
.hero-art { position: relative; z-index: 1; }

.eyebrow,
.mini-label,
.now-top,
.status-badge,
.art-label,
.hero-bottom,
.footer-note,
.footer-counter,
.guestbook-form label,
.send-button,
.guestbook-stamp,
.interest-number {
  font-family: 'Courier New', monospace;
  letter-spacing: .08em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 26px;
  font-size: 10px;
  font-weight: 500;
}

.online-dot {
  width: 9px;
  height: 9px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: #71ff80;
  box-shadow: 0 0 0 3px #71ff8055;
}

h1 {
  margin: 0;
  font-size: clamp(68px, 9.5vw, 112px);
  line-height: .84;
  letter-spacing: -.09em;
}

h1 span {
  color: var(--lime);
  text-shadow: 4px 4px 0 var(--shadow);
}

.hero-subtitle {
  max-width: 380px;
  margin: 26px 0 25px;
  font-size: 15px;
  line-height: 1.65;
}

.sticker-link {
  display: inline-flex;
  gap: 18px;
  align-items: center;
  padding: 12px 15px;
  border: var(--line);
  background: var(--lime);
  color: #171328;
  box-shadow: 4px 4px 0 var(--shadow);
  font: 500 10px 'Courier New', monospace;
  text-decoration: none;
  transition: transform .18s, box-shadow .18s;
}

.sticker-link:hover {
  transform: translate(3px, 3px) rotate(-1deg);
  box-shadow: 1px 1px 0 var(--shadow);
}

.hero-art {
  display: grid;
  place-items: center;
  min-height: 300px;
}

.hero-doodle {
  position: absolute;
  z-index: 3;
  pointer-events: none;
}

.doodle-sticker {
  padding: 8px 11px;
  border: 2px solid var(--ink);
  background: var(--lime);
  color: #171328;
  box-shadow: 3px 3px 0 var(--shadow);
  font: 700 10px 'Courier New', monospace;
  letter-spacing: .08em;
  text-align: center;
}

.doodle-sticker span { font-size: 9px; }
.sticker-ship { top: 16%; right: 2%; transform: rotate(8deg); }

.doodle-squiggle {
  bottom: 10%;
  left: 1%;
  color: var(--pink-pop);
  font-size: 29px;
  transform: rotate(-15deg);
}

.cute-frog {
  right: 5%;
  bottom: 12%;
  font-size: 35px;
  filter: drop-shadow(2px 3px 0 var(--shadow));
  transform: rotate(9deg);
  animation: doodle-bob 2.8s ease-in-out infinite;
}

.cute-sparkle {
  top: 10%;
  left: 5%;
  font-size: 24px;
  animation: doodle-twinkle 1.8s ease-in-out infinite alternate;
}

@keyframes doodle-bob { 50% { transform: translateY(-7px) rotate(-5deg); } }
@keyframes doodle-twinkle { to { transform: scale(.75) rotate(25deg); opacity: .6; } }

.computer {
  position: relative;
  z-index: 1;
  width: 250px;
  transform: rotate(3deg);
  filter: drop-shadow(8px 9px 0 #08061080);
  animation: float 4s ease-in-out infinite;
}

@keyframes float { 50% { transform: rotate(0) translateY(-9px); } }

.monitor {
  position: relative;
  width: 240px;
  height: 194px;
  padding: 17px 18px 23px;
  border: 3px solid var(--ink);
  border-radius: 22px 22px 17px 17px;
  background: #282337;
  box-shadow: inset -7px -6px 0 #100e18;
}

.screen {
  display: grid;
  align-content: center;
  justify-items: center;
  height: 100%;
  border: 3px solid var(--ink);
  border-radius: 13px;
  background: #24617a;
  box-shadow: inset 0 0 0 5px #ffffff20;
}

.screen-eyes { font-size: 55px; line-height: .9; font-weight: 700; }
.screen-caption { margin-top: 12px; font: 500 10px 'Courier New', monospace; letter-spacing: .1em; }

.monitor-knob {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 6px;
  height: 6px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--pink);
}

.computer-neck {
  width: 52px;
  height: 17px;
  margin: -1px auto 0;
  border-right: 3px solid var(--ink);
  border-left: 3px solid var(--ink);
  background: #282337;
}

.computer-base {
  width: 105px;
  height: 12px;
  margin: 0 auto;
  border: 3px solid var(--ink);
  border-radius: 5px 5px 10px 10px;
  background: #282337;
}

.keyboard {
  display: flex;
  justify-content: center;
  gap: 5px;
  width: 177px;
  height: 28px;
  margin: 8px auto 0;
  padding: 6px;
  border: 3px solid var(--ink);
  border-radius: 7px;
  background: #282337;
}

.keyboard i {
  flex: 1;
  height: 9px;
  border: 1px solid var(--ink);
  background: var(--lime);
}

.orbit {
  position: absolute;
  width: 310px;
  height: 170px;
  border: 1px dashed var(--ink);
  border-radius: 50%;
  transform: rotate(-22deg);
}

.orbit-b { width: 280px; height: 225px; transform: rotate(44deg); }

.star {
  position: absolute;
  z-index: 2;
  font-size: 34px;
  animation: twinkle 1.7s ease-in-out infinite alternate;
}

.star-a { top: 28px; right: 12%; }
.star-b { bottom: 57px; left: 10%; animation-delay: .6s; }

@keyframes twinkle { to { transform: scale(.7) rotate(25deg); opacity: .55; } }

.art-label {
  position: absolute;
  right: 0;
  bottom: 5px;
  padding: 7px 10px;
  border: 2px solid var(--ink);
  background: var(--lime);
  color: #171328;
  font-size: 9px;
  transform: rotate(-4deg);
}

.hero-spark { position: absolute; font-size: 45px; }
.spark-one { top: 28px; right: 45%; }
.spark-two { bottom: 83px; left: 4%; }

.hero-bottom {
  position: absolute;
  right: 8%;
  bottom: 0;
  left: 8%;
  display: flex;
  justify-content: space-between;
  padding: 13px 0;
  border-top: 1px solid #f5efff5c;
  font-size: 9px;
}


main { padding: 44px 8% 64px; }

.intro-grid {
  display: grid;
  grid-template-columns: 1.45fr .8fr;
  gap: 18px;
}

.card {
  border: var(--line);
  box-shadow: 5px 5px 0 var(--shadow);
}

.about-card { padding: 26px 27px; background: #201c2c; }

.section-heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.heading-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: var(--line);
  border-radius: 50%;
  background: var(--lime);
  font-size: 26px;
}

.mini-label { margin: 0 0 5px; font-size: 9px; font-weight: 500; }

h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -.06em;
  line-height: 1.05;
}

.about-card > p {
  max-width: 580px;
  margin: 22px 0;
  font-size: 14px;
  line-height: 1.75;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed #625b72;
  font-size: 11px;
}

.status-badge {
  padding: 6px 8px;
  border: 1px solid var(--ink);
  background: #b6ffba;
  color: #14251b;
  font-size: 8px;
}

.playful-note {
  margin: 15px 0 0;
  color: var(--pink-pop);
  font: italic 11px 'Trebuchet MS', Arial, sans-serif;
  text-align: right;
}

.playful-note span {
  display: inline-block;
  margin-right: 4px;
  transform: rotate(-12deg);
}

/* Карточка "Quick facts" */
.now-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 17px 20px;
  text-align: center;
  background: var(--blue);
}

.now-top {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 9px;
}

.blinking-star { animation: blink .9s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

/* (album-artwork / equalizer оставлены для будущих блоков) */
.album-artwork {
  display: block;
  width: 118px;
  height: 118px;
  margin: 13px 0 8px;
  overflow: hidden;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow);
  transition: transform .2s;
}

.album-artwork:hover { transform: rotate(-3deg) scale(1.04); }

.album-artwork img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.now-card h3 { margin: 0; font-size: 17px; }
.now-card p { margin: 6px 0 13px; font-size: 11px; line-height: 1.5; }

.equalizer {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 22px;
}

.equalizer i {
  width: 4px;
  height: 9px;
  border: 1px solid var(--ink);
  background: var(--pink);
  animation: equalize .65s ease-in-out infinite alternate;
}

.equalizer i:nth-child(2n) { height: 17px; animation-delay: .2s; }
.equalizer i:nth-child(3n) { height: 13px; animation-delay: .4s; }

@keyframes equalize { to { transform: scaleY(.4); } }

/* Quick facts (резюме) */
.resume-facts {
  align-items: stretch;
  justify-content: center;
  gap: 18px;
  padding: 23px;
  text-align: left;
}

.resume-fact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 13px;
  border-bottom: 1px dashed #587184;
}

.resume-fact:last-child { padding-bottom: 0; border-bottom: 0; }

.resume-fact > span {
  color: #b6ccda;
  font: 500 9px 'Courier New', monospace;
  letter-spacing: .1em;
}

.resume-fact strong,
.resume-fact a { font-size: 14px; }

.resume-fact a {
  color: var(--lime);
  text-decoration: none;
}

.resume-fact a:hover { text-decoration: underline; }


.career-section,
.skills-section,
.projects-section { margin-top: 62px; }

.section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 20px;
}

.doodle {
  color: #bdb1d4;
  font: 500 10px 'Courier New', monospace;
  letter-spacing: .08em;
  transform: rotate(-4deg);
}

.skill-doodle,
.career-doodle {
  color: var(--pink-pop);
  transform: rotate(-5deg);
}

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

.career-column {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
}

.career-column-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 3px;
  color: #c9bed8;
  font: 500 9px 'Courier New', monospace;
  letter-spacing: .1em;
}

.career-column-label span { color: var(--lime); font-size: 15px; }

.career-card {
  position: relative;
  min-height: 166px;
  padding: 18px 19px;
  overflow: hidden;
  border: var(--line);
  box-shadow: 4px 4px 0 var(--shadow);
}

.career-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--lime);
  content: '';
}

.career-vaisala { background: #18384b; }
.career-omnia { background: #3a203b; }
.career-metropolia { background: #34264d; }

.career-date {
  display: inline-block;
  padding: 5px 7px;
  border: 1px dashed #f5efff88;
  color: var(--lime);
  font: 500 9px 'Courier New', monospace;
  letter-spacing: .08em;
}

.career-card h3 {
  max-width: 90%;
  margin: 14px 0 5px;
  font-size: 19px;
  line-height: 1.2;
}

.career-place {
  margin: 0;
  color: #e4dcef;
  font-size: 11px;
  font-weight: 600;
}

.career-place span { color: var(--pink-pop); }

.career-description {
  max-width: 440px;
  margin: 10px 0 0;
  color: #d3cada;
  font-size: 11px;
  line-height: 1.55;
}

.career-scribble {
  position: absolute;
  top: 12px;
  right: 15px;
  color: #ffffff9c;
  font-size: 21px;
  transform: rotate(12deg);
}

.career-omnia .career-scribble { color: var(--pink-pop); transform: rotate(-15deg); }
.career-metropolia .career-scribble { color: var(--lime); transform: rotate(-10deg); }

.career-doodle-note {
  justify-self: end;
  padding: 8px 11px;
  border: 1px dashed var(--pink-pop);
  color: var(--pink-pop);
  font: italic 10px 'Courier New', monospace;
  transform: rotate(3deg);
}

.career-doodle-note span {
  display: inline-block;
  margin-left: 5px;
  font-size: 16px;
}


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

.skill-card {
  position: relative;
  min-height: 155px;
  padding: 19px;
  overflow: hidden;
  border: var(--line);
}

.skill-card::after {
  position: absolute;
  right: 13px;
  bottom: 9px;
  color: #ffffff52;
  content: "\2727";
  font-size: 25px;
  transform: rotate(12deg);
}

.skill-pink { background: #3a203b; }
.skill-blue { background: #18384b; }
.skill-purple { background: #34264d; }
.skill-orange { background: #49321e; }

.skill-index,
.project-type,
.project-number {
  font: 500 9px 'Courier New', monospace;
  letter-spacing: .08em;
}

.skill-index { color: #d7c8e8; }
.skill-card h3 { margin: 20px 0 12px; font-size: 18px; }

.skill-tags,
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.skill-tags span,
.project-tags span {
  padding: 5px 8px;
  border: 1px solid #f5efff65;
  background: #100e1880;
  font: 500 9px 'Courier New', monospace;
}


.projects-section .section-title-row { align-items: end; }
.all-projects-link { color: var(--lime); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 265px;
  padding: 20px;
  border: var(--line);
  background: #201c2c;
  box-shadow: 5px 5px 0 var(--shadow);
}

.project-featured { background: #292137; }

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

.project-number { color: var(--lime); font-size: 12px; }
.project-type { color: #bdb1d4; text-align: right; }

.project-card h3 {
  margin: 22px 0 9px;
  font-size: 21px;
  letter-spacing: -.04em;
}

.project-card p {
  margin: 0 0 17px;
  color: #d8d1e2;
  font-size: 12px;
  line-height: 1.65;
}

.project-tags { margin-top: auto; }
.project-tags span { color: #f5efff; }

.project-link {
  align-self: flex-start;
  margin-top: 18px;
  color: var(--lime);
}


.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 62px;
  padding: 26px 28px;
  background: #132635;
}

.contact-section h2 { font-size: clamp(24px, 4vw, 34px); }

.contact-section p:last-child {
  margin: 9px 0 0;
  color: #d8e2eb;
  font-size: 12px;
}

.contact-button {
  flex: 0 0 auto;
  text-align: center;
}


.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 8%;
  border-top: var(--line);
  background: #132635;
}

.visitor-counter {
  display: flex;
  align-items: center;
  gap: 9px;
}

.visitor-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border: 1px dashed var(--lime);
  border-radius: 50%;
  background: #10202b;
  font-size: 19px;
}

.visitor-copy { display: grid; gap: 4px; }

.visitor-label {
  color: #b6ccda;
  font: 500 8px 'Courier New', monospace;
  letter-spacing: .08em;
}

.visitor-counter strong {
  color: var(--lime);
  font: 600 14px 'Courier New', monospace;
  letter-spacing: .15em;
}

.footer-counter { display: flex; align-items: center; gap: 9px; }
.counter-icon { font-size: 28px; }

.footer-counter > div {
  display: flex;
  align-items: center;
  gap: 5px;
}

.counter-label { font-size: 8px; }

.footer-counter strong {
  padding: 5px 7px;
  border: 1px solid var(--lime);
  background: #080610;
  color: var(--lime);
  font: 500 13px 'Courier New', monospace;
  letter-spacing: .14em;
}

.footer-note { text-align: center; }
.footer-note p { margin: 0 0 5px; font-size: 9px; font-weight: 500; }
.footer-note span { font-size: 8px; }

.back-top {
  display: grid;
  flex: 0 0 35px;
  place-items: center;
  width: 35px;
  height: 35px;
  border: var(--line);
  background: #29233a;
  color: var(--lime);
  font-size: 22px;
  text-decoration: none;
  transition: transform .2s;
}

.back-top:hover { transform: translateY(-4px); }

.bottom-strip {
  padding: 10px;
  border-top: var(--line);
  border-bottom: 0;
  text-align: center;
}


.resume-nav {
  position: absolute;
  z-index: 3;
  top: 20px;
  right: 8%;
  display: flex;
  gap: 20px;
}

.resume-nav a,
.profile-github,
.project-link,
.all-projects-link {
  font: 500 9px 'Courier New', monospace;
  letter-spacing: .08em;
  text-decoration: none;
}

.resume-nav a {
  padding: 7px 0;
  border-bottom: 1px solid transparent;
}

.resume-nav a:hover {
  border-bottom-color: var(--lime);
  color: var(--lime);
}

.profile-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 310px);
  padding: 22px 24px;
  background: #201c2c;
  text-align: center;
}

.profile-visual-label {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 18px;
  font: 500 9px 'Courier New', monospace;
  letter-spacing: .08em;
}

.profile-visual-label span { color: var(--lime); }

.profile-avatar {
  width: 116px;
  height: 116px;
  border: 3px solid var(--lime);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 5px 5px 0 var(--shadow);
}

.profile-name { margin-top: 15px; font-size: 24px; }

.profile-role {
  margin-top: 4px;
  color: #c1b8cf;
  font: 500 9px 'Courier New', monospace;
  letter-spacing: .11em;
}

.profile-quick-facts {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  margin-top: 19px;
  padding: 13px 0;
  border-top: 1px dashed #625b72;
  border-bottom: 1px dashed #625b72;
  font: 500 9px 'Courier New', monospace;
  letter-spacing: .05em;
}

.profile-github {
  margin-top: 15px;
  color: var(--lime);
}

.profile-github:hover,
.project-link:hover,
.all-projects-link:hover { color: var(--pink-pop); }


@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 22px, 600px);
    margin: 12px auto;
    box-shadow: 5px 5px 0 var(--shadow);
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 48px 8% 50px;
  }

  .resume-nav {
    right: 8%;
    left: 8%;
    justify-content: space-between;
    gap: 8px;
  }

  .hero-art { min-height: 290px; margin-top: 8px; }
  .cute-frog { right: 1%; bottom: 9%; }
  .cute-sparkle { left: 0; }
  .hero-bottom { right: 8%; left: 8%; font-size: 8px; }

  main { padding: 32px 7% 45px; }

  .intro-grid { grid-template-columns: 1fr; }
  .now-card { min-height: 210px; }
  .resume-facts { min-height: 0; }

  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 0; }
  .interest-grid { grid-template-columns: repeat(2, 1fr); }
  .interest-card { min-height: 150px; }

  .career-section,
  .skills-section,
  .projects-section { margin-top: 45px; }

  .footer { flex-wrap: wrap; padding: 20px 7%; }
  .footer-note { order: 3; flex-basis: 100%; }
}

@media (max-width: 420px) {
  .page-shell { width: calc(100% - 14px); margin: 7px auto; }
  .hero { padding-top: 58px; }
  .resume-nav { top: 16px; }
  .resume-nav a { font-size: 8px; }
  .eyebrow { font-size: 8px; }
  .hero-subtitle { font-size: 13px; }
  .hero-art { transform: scale(.88); margin: -5px -25px; }
  .hero-bottom { font-size: 7px; }
  .section-title-row { align-items: start; }
  .projects-section .section-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .career-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }

  .doodle { max-width: 110px; font-size: 13px; text-align: right; }

  .about-card,
  .guestbook { padding: 21px 17px; }

  .interest-grid { gap: 9px; }
  .interest-card { padding: 13px; }
  .interest-card p { font-size: 10px; }

  .form-footer { align-items: flex-start; flex-direction: column; }
  .send-button { align-self: flex-end; }
  .footer-counter > div { flex-wrap: wrap; }
  .counter-label { font-size: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}