@font-face { font-family: "ModeSeven"; src: url("./fonts/modeseven.ttf") format("truetype"); font-display: swap; }
:root { --bg: #000; --white: #e7e7e7; --yellow: #ffff00; --cyan: #00ffff; --blue: #0000ff; --red: #ff1a1a; --green: #00ff00; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--white); }
body { display: flex; flex-direction: column; min-height: 100vh; font-family: "ModeSeven", "Courier New", "Liberation Mono", monospace; line-height: 1; }
a { color: inherit; text-decoration: none; }
.page { display: flex; flex-direction: column; flex: 1; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 30px; font-size: clamp(14px, 1.7vw, 24px); }
.page footer { margin-top: auto; }
/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: clamp(10px, 2vw, 20px); font-size: 1.3em; white-space: nowrap; }
.topbar .page-number { min-width: 4ch; }
.topbar .page-number-plain { min-width: 3ch; margin-left: 0.6em; }
.topbar .subpage { flex: 1; color: var(--cyan); text-align: center; }
.topbar .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.topbar .clock { color: var(--yellow); }
.topbar .clock .colon { animation: 1s steps(2, jump-none) infinite blink; }
/* ---------- logo ---------- */
.masthead { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 22px; }
.logo-blocks { display: flex; gap: 7px; }
.logo-block { display: grid; place-items: normal; width: clamp(67px, 9vw, 67px); height: clamp(86px, 9vw, 86px); background: var(--white); color: #000; font-size: clamp(50px, 7vw, 96px); writing-mode: -0.12em; overflow: hidden; }
.logo-extension { display: flex; align-items: center; justify-content: center; min-width: 0; background: var(--blue); color: var(--yellow); }
.logo-extension span { animation: 1s steps(2, jump-none) infinite blink; }

/* ---------- content ---------- */
.content { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr); gap: 55px; margin-top: 40px; min-height: 340px; }
.content-full { grid-template-columns: minmax(0, 1fr); min-height: 0; }
.left { min-width: 0; }
.intro { font-size: 1.5em; }
.name-row { display: flex; align-items: baseline; width: 100%; }
.name { color: var(--yellow); white-space: nowrap; }
.dots { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; color: var(--white); margin: 0 12px; opacity: 0.9; }
.role { white-space: nowrap; margin-top: 4px; }
@keyframes blink { 0% { opacity: 1; } to { opacity: 0; } }
.tagline { margin-top: 40px; animation: 1s steps(2, jump-none) infinite blink; }
/* ---------- links ---------- */
.links { margin-top: 40px; max-width: 650px; }
.links ul { list-style: none; margin: 0; padding: 0; }
.teletext-link { display: flex; align-items: baseline; margin: 16px 0; color: var(--cyan); font-size: 1.5em; transition: background 80ms linear, color 80ms linear; }
.teletext-link .label { white-space: nowrap; }
.teletext-link .leader { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; color: var(--white); margin: 0 12px; }
.teletext-link .number { color: var(--yellow); white-space: nowrap; }
.teletext-link:hover, .teletext-link:focus-visible { outline: none; background: var(--cyan); color: #000; }
.teletext-link:hover .leader, .teletext-link:hover .number, .teletext-link:focus-visible .leader, .teletext-link:focus-visible .number { color: #000; }
/* ---------- avatar ---------- */
.portrait { display: flex; align-items: center; justify-content: center; min-width: 0; }
.portrait img { display: block; width: min(100%, 390px); max-height: 430px; object-fit: contain; image-rendering: pixelated; }
/* ---------- footer ---------- */
.footer-nav { display: grid; grid-template-columns: repeat(4, 1fr); align-items: end; gap: 20px; margin: 12px 0 0; padding: 0 55px 14px; border-bottom: 7px solid var(--blue); font-size: 1.15em; text-align: center; list-style: none; }
.footer-nav a { display: inline-block; padding: 4px 10px; color: var(--link-color); transition: background 80ms linear, color 80ms linear; }
.footer-nav li:nth-child(1) { --link-color: var(--red); }
.footer-nav li:nth-child(2) { --link-color: var(--green); }
.footer-nav li:nth-child(3) { --link-color: var(--yellow); }
.footer-nav li:nth-child(4) { --link-color: var(--cyan); }
.footer-nav a:hover, .footer-nav a:focus-visible { background: var(--link-color); color: #000; outline: none; }
/* ---------- 404 ---------- */
.not-found { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; min-height: 340px; text-align: center; }
.not-found-code { color: var(--red); font-size: 1.6em; }
.teletext-link-inline { color: var(--cyan); font-size: 1.3em; }
.teletext-link-inline:hover, .teletext-link-inline:focus-visible { text-decoration: underline; outline: none; }
/* ---------- little CRT option ---------- */
.scanlines { pointer-events: none; position: fixed; inset: 0; z-index: 999; opacity: 0.05; background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.7) 0, rgba(255,255,255,0.7) 1px, transparent 1px, transparent 4px); }
/* ---------- blog / projects content ---------- */
.section-marker { display: flex; align-items: center; justify-content: space-between; color: var(--cyan); font-size: 1.2em; margin: 0 0 20px; border-bottom: 2px solid var(--blue); padding-bottom: 6px; }
.feed-links { display: inline-flex; align-items: center; }
.feed-link { color: var(--yellow); font-size: 0.7em; line-height: 1; }
.feed-link:hover, .feed-link:focus-visible { text-decoration: underline; outline: none; }
.entry-row { margin: 0 0 24px; }
.entry-head { display: flex; gap: 12px; align-items: baseline; }
.entry-number { color: var(--yellow); }
.entry-title { color: var(--cyan); }
.entry-title:hover, .entry-title:focus-visible { text-decoration: underline; outline: none; }
.entry-meta, .entry-summary { margin: 4px 0 0 18px; color: var(--white); opacity: 0.85; }
.entry-meta .branch, .entry-summary .branch { color: var(--blue); margin-right: 4px; }
.post-meta { color: var(--white); opacity: 0.9; margin: 0 0 24px; }
.post-body h2 { color: var(--cyan); font-size: 1.15em; margin: 28px 0 10px; }
.post-body h2::before { content: "\25CC"; color: var(--yellow); margin-right: 0.4em; }
.post-body p a, .post-body li a { color: var(--yellow); text-decoration: underline; }
.post-body p a:hover, .post-body li a:hover, .post-body p a:focus-visible, .post-body li a:focus-visible { color: var(--red); }
.post-body p { margin: 1em 0; }
.post-body li { margin: 6px 0; }
.post-body ul { list-style: none; padding-left: 0; margin: 1em 0; }
.post-body ol { margin: 1em 0; padding-left: 0; list-style-position: inside; color: var(--yellow); }
.post-body ol li { color: var(--white); }
.post-body ul li::before { content: "* "; color: var(--yellow); }
.post-body pre:not(.post-meta) { width: fit-content; max-width: 100%; background: #0a0a0a; border: 1px solid var(--blue); color: var(--green); padding: 12px 16px; margin: 12px 0; overflow-x: auto; font-family: inherit; }
.post-body :not(pre) > code { background: #0a0a0a; color: var(--green); padding: 0 4px; }
.post-nav { margin-top: 30px; color: var(--yellow); }
.project-card { border: 2px solid var(--green); padding: 14px 18px; margin: 0 0 22px; }
.project-head { display: flex; gap: 10px; font-size: 1.15em; }
.project-head .entry-number { color: var(--yellow); }
.project-head .entry-title { color: var(--white); }
.project-summary { margin: 8px 0; opacity: 0.85; }
.project-tech, .project-status { margin: 2px 0; color: var(--cyan); }
.project-visit { margin: 0 0 24px; }
.project-shots { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 30px; }
.project-shots img { width: 200px; height: 200px; max-width: 100%; border: 2px solid var(--blue); display: block; cursor: zoom-in; object-fit: contain; background: #0a0a0a; }
.lightbox { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 30px; background: rgba(0, 0, 0, 0.9); cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border: 2px solid var(--blue); }
/* ---------- responsive ---------- */
@media (max-width: 850px) {
  .page { width: min(100% - 24px, 720px); }
  .masthead { gap: 5px; }
  .logo-blocks { gap: 4px; }
  .logo-extension { padding: 0 14px; }
  .content { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 30px; min-height: 0; }
  .portrait { order: -1; }
  .portrait img { width: 210px; }
  .links { margin-top: 35px; }
  .footer-nav { padding-left: 0; padding-right: 0; gap: 7px; }
}
@media (max-width: 580px) {
  .topbar .title { display: none; }
  .topbar .clock-date { display: none; }
  .portrait { display: none; }
  .masthead { grid-template-columns: 1fr; }
  .logo-blocks { width: 100%; }
  .logo-block { flex: 1; width: auto; }
  .logo-extension { height: 78px; }
  .name-row { display: block; }
  .name-row .dots { display: none; }
  .role { display: block; margin-top: 8px; }
  .footer-nav { grid-template-columns: repeat(2, 1fr); row-gap: 17px; }
}
