/* =========================================================
   Vitalii Vitkovskyi — portfolio
   Desktop values reproduce the mockup at 1342px width.
   Tablet/phone overrides are at the end (max-width queries only),
   so they never change the desktop layout.
   ========================================================= */

:root {
  /* colors sampled from the mockup */
  --bg: #0a1222;
  --panel: rgba(16, 25, 41, 0.78);
  --line: #2c3a52;
  --line-card: #3a4a64;
  --line-light: #5d6f8f;
  --text: #e6ecf5;
  --title: #dfe7f3;
  --body: #c3cbd7;
  --role: #a9b4cc;
  --muted: #808b9c;
  --cyan: #8fdcf0;
  --cyan-line: #69c4dc;
  --cyan-glow: rgba(110, 205, 235, 0.5);

  /* geometry of the mockup (1342px wide) */
  --page: 1342px;
  --pad: 92px;
  --title-size: 34.5px;
  --name-size: 90px;
  --name-stretch: 1.277; /* the mockup uses a very wide display face */

  --font-display: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font: 15px/1.2 var(--font);
  color: var(--text);
  background: var(--bg); /* flat, no images or gradients */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, figure { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 22px; height: 22px; fill: currentColor; flex: none; }
.icon-pin { width: 17px; height: 17px; color: #7fb6e6; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--cyan);
  color: var(--bg);
  border-radius: 6px;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.center { text-align: center; }

/* ---------- Page with space background ---------- */
.page {
  position: relative;
  max-width: var(--page);
  margin-inline: auto;
  padding: 0 var(--pad) 50px; /* space above the full-width footer line */
}
.page > * { position: relative; z-index: 1; }

/* HUD frame drawn over the page edges (desktop only) */
.page > .hud-frame {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}
.hud-line { fill: none; stroke: var(--line); stroke-width: 1.2; }
.hud-line--light { stroke: rgba(120, 140, 180, 0.55); stroke-width: 1; }
.hud-glow { filter: drop-shadow(0 0 4px rgba(95, 214, 236, 0.8)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  font: 500 16px/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
}
.btn-solid {
  background: linear-gradient(180deg, #b9eefb, #92d9ee);
  color: #0b1626;
  box-shadow: 0 0 14px rgba(130, 215, 240, 0.55);
}
.btn-solid:hover { background: #c9f3fd; }
.btn-outline {
  border: 1px solid var(--cyan-line);
  background: rgba(30, 55, 85, 0.35);
  color: var(--text);
  box-shadow: 0 0 10px rgba(105, 196, 220, 0.35), inset 0 0 6px rgba(105, 196, 220, 0.15);
}
.btn-outline--plain {
  border-color: #8a97ad;
  background: transparent;
  box-shadow: none;
}
.btn-outline:hover { border-color: var(--cyan); }

.icon-link {
  display: inline-grid;
  place-items: center;
  color: #e3e9f2;
}
.icon-link:hover { color: var(--cyan); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 38px;
  border: 1px solid #5a6984;
  border-radius: 6px;
  background: rgba(24, 34, 51, 0.85);
  color: #f0f4fa;
}
.icon-btn:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- Header ---------- */
.site-header {
  display: grid;
  grid-template-columns: auto auto; /* logo left, "Get in touch" right */
  justify-content: space-between;
  align-items: center;
  padding-top: 47px;
  height: 79px;
}
.monogram { justify-self: start; display: inline-flex; margin-left: 1px; }
.header-cta { justify-self: end; height: 32px; padding: 0 15px; font-size: 15px; border-radius: 5px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 511px; padding-top: 63px; }

.hero-name {
  font-family: var(--font-display);
  font-size: var(--name-size);
  font-weight: 700;
  line-height: 0.9222em; /* 83px at 90px */
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #d9e6f8;
  text-shadow: 0 0 22px rgba(120, 170, 255, 0.35);
  transform: scaleX(var(--name-stretch));
  transform-origin: left center;
  /* keep the stretched box inside the column so it never widens the page */
  width: calc(100% / var(--name-stretch));
}
.hero-name span { display: block; }

.hero-role {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 25.9px;
  font-weight: 500;
  line-height: 30px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--role);
}

.hero-intro {
  margin-top: 16px;
  font-size: 16.9px;
  line-height: 21px;
  color: #e3e8f0;
}

.hero-location {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  font-size: 17px;
  line-height: 22px;
  color: var(--role);
}

.hero-actions { display: flex; gap: 15px; margin-top: 17px; }

.socials { display: flex; }
.socials--hero { gap: 18px; margin-top: 20px; }

/* portrait card with HUD corner squares */
.portrait-frame {
  position: absolute;
  top: 69px;
  right: 47px;
  width: 247px;
  height: 345px;
  border: 1px solid #6f7d99;
  border-radius: 8px;
  overflow: visible;
  background: #1b2338;
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; border-radius: 7px; } /* photo is ~3:4 like the frame; any tiny crop keeps the face */
.portrait-frame::before {
  content: "";
  position: absolute;
  inset: -8px;
  pointer-events: none;
  --c: #7d8bab;
  background:
    linear-gradient(var(--c), var(--c)) left top / 6px 6px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 6px 6px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 6px 6px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 6px 6px no-repeat;
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  padding: 1px;
}

/* ---------- Section titles ---------- */
.section-title {
  font-family: var(--font-display);
  font-size: var(--title-size);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--title);
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  border: 1px solid var(--line-card);
  border-radius: 3px;
  background: var(--panel);
  box-shadow: 0 0 12px rgba(110, 150, 220, 0.1);
}
.card h3 { font-size: 20px; font-weight: 500; color: var(--title); }
.card p { margin-top: 6px; font-size: 15px; line-height: 18px; color: var(--body); }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 300px 1fr; /* narrower intro, wider cards */
  column-gap: 72px;
  padding-top: 4px;
}
.about-text p { margin-top: 10px; font-size: 15px; line-height: 18.5px; color: var(--body); }
.about-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 6px;
}
.about-cards .card { min-height: 117px; padding: 16px 12px 16px 17px; } /* grows with longer text */
.about-cards .card p { font-size: 14.5px; }

/* ---------- Work & leadership ---------- */
.work {
  display: grid;
  grid-template-columns: 621px 1fr;
  padding-top: 68px;
}
.work .section-title { font-size: 35px; }
#about-title { font-size: 33px; }

.company-frame {
  position: relative;
  width: 548px;
  height: 127px;
  margin: 11px 0 0 -7px;
  padding: 7px;
}
/* outer bracket corners and faint frame */
.company-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(90, 110, 145, 0.25);
  --c: #7d8bab;
  background:
    linear-gradient(var(--c), var(--c)) left top / 8px 1.5px no-repeat,
    linear-gradient(var(--c), var(--c)) left top / 1.5px 8px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 8px 1.5px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 1.5px 8px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 8px 1.5px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 1.5px 8px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 8px 1.5px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 1.5px 8px no-repeat;
}
.company-card {
  position: relative;
  height: 113px;
  padding: 25px 20px 0;
  border: 1px solid rgba(120, 140, 180, 0.55);
  border-radius: 3px;
  background:
    repeating-linear-gradient(90deg, rgba(120, 145, 190, 0.14) 0 1px, transparent 1px 30px) right 20px top 0 / 120px 100% no-repeat,
    repeating-linear-gradient(180deg, rgba(120, 145, 190, 0.14) 0 1px, transparent 1px 30px) right 20px top 0 / 120px 100% no-repeat,
    radial-gradient(260px 60px at 50% 115%, rgba(90, 150, 230, 0.45), transparent 70%),
    linear-gradient(180deg, #111a2c, #15223a 60%, #1b2d4d);
  box-shadow: 0 0 16px rgba(90, 140, 230, 0.15);
}
/* small inner corner ticks */
.company-card::before {
  content: "";
  position: absolute;
  inset: 6px;
  pointer-events: none;
  --c: rgba(140, 160, 200, 0.45);
  background:
    linear-gradient(var(--c), var(--c)) left top / 5px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left top / 1px 5px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 5px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 1px 5px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 5px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 1px 5px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 5px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 1px 5px no-repeat;
}
.company-card h3 {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  line-height: 30px;
  letter-spacing: 0.01em;
  color: var(--title);
}
.company-card p { margin-top: 2px; font-size: 17px; color: #d3dae5; }
/* company logo in one line with the name, vertically centred */
.company-card h3 { display: flex; align-items: center; gap: 10px; }
.company-logo { flex: none; width: 34px; height: 34px; } /* square file, so proportions are kept */

.work-grid {
  display: grid;
  grid-template-columns: 270fr 255fr;
  grid-auto-rows: minmax(82px, auto); /* grows with longer text */
  gap: 8px 12px;
  margin-top: -2px;
  position: relative;
}
.card--small { padding: 10px 12px 12px 16px; border-radius: 2px; }
/* faint HUD grid lines behind the cards; attached to the cards so they follow their height */
.work-grid::before {
  content: "";
  position: absolute;
  top: -13px;
  bottom: -14px;
  left: -56px;
  width: 31px;
  border-inline: 1px solid rgba(110, 130, 165, 0.22);
  pointer-events: none;
  z-index: -1;
}
.card--small:nth-child(odd)::after {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -74px;
  width: 631px;
  border-block: 1px solid rgba(110, 130, 165, 0.22);
  pointer-events: none;
  z-index: -1;
}
.card--small h3 { font-size: 17px; font-weight: 600; line-height: 21px; }
.card--small p { margin-top: 4px; font-size: 13px; line-height: 16px; }

/* ---------- Two columns ---------- */
.columns {
  display: grid;
  grid-template-columns: 536px 1fr;
  column-gap: 84px;
  margin: 0 -18px 0 -3px;
  padding-top: 53px;
}
.col-right { padding-top: 2px; }

/* artworks: even grid of 3:4 previews (2 equal columns; new items just flow into the grid) */
.art-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.art-link {
  display: block;
  padding: 2px;
  border: 1.5px solid #56667f;
  border-radius: 4px;
  background: #0c1220;
  cursor: zoom-in;
}
.art-link:hover { border-color: #8a97ad; }
.art-link img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4; /* reserves space before the preview loads */
  border-radius: 2px;
}

/* ---------- Lightbox (full-size viewer) ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.lightbox {
  /* covers the whole visible screen, above everything; the page stays visible through it */
  --btn: 48px;                 /* close / arrow buttons (tap area >= 44px) */
  --edge: 12px;                /* distance of the buttons from the screen edge */
  --gap: 16px;                 /* space between buttons and the image */
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;              /* follows mobile browser toolbars */
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(5, 9, 18, 0.72);
  color: var(--text);
  overflow: hidden;
  overscroll-behavior: contain;
}
.lightbox::backdrop { background: transparent; }

.lightbox-stage {
  position: absolute;
  inset: 0;
  display: grid;
  /* one definite cell, so the image's max-width/max-height: 100% resolve to the free area */
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  /* free area = screen minus room for the close button (top) and arrows (sides) */
  padding:
    calc(var(--edge) + var(--btn) + var(--gap) + env(safe-area-inset-top))
    calc(var(--edge) + var(--btn) + var(--gap) + env(safe-area-inset-right))
    calc(var(--edge) + var(--gap) + env(safe-area-inset-bottom))
    calc(var(--edge) + var(--btn) + var(--gap) + env(safe-area-inset-left));
}
.lightbox-img {
  /* whole image, own proportions, as large as the free area allows */
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
  cursor: default;
}
.lightbox-img.is-loading { opacity: 0.35; } /* previous work stays in place while the next one loads */
.lightbox-img, .lightbox-loader, .lightbox-error { grid-area: 1 / 1; }
.lightbox-img[hidden], .lightbox-loader[hidden], .lightbox-error[hidden] { display: none; }

/* round buttons: dark fill + cyan rim keep them visible on light and dark artworks */
.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--btn);
  height: var(--btn);
  padding: 0;
  border: 1px solid var(--cyan-line);
  border-radius: 50%;
  background: rgba(16, 25, 41, 0.9);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.lightbox-close svg,
.lightbox-nav svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(40, 70, 100, 0.95); }
.lightbox-close {
  top: calc(var(--edge) + env(safe-area-inset-top));
  right: calc(var(--edge) + env(safe-area-inset-right));
}
/* arrows on the left and right edges, vertically centred */
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: calc(var(--edge) + env(safe-area-inset-left)); }
.lightbox-next { right: calc(var(--edge) + env(safe-area-inset-right)); }

@media (min-width: 760px) {
  .lightbox { --edge: 20px; --gap: 20px; }
}
/* narrow portrait phones: arrows get their own strip at the bottom, the image keeps the full width */
@media (max-width: 599px) and (orientation: portrait) {
  .lightbox-stage {
    padding:
      calc(var(--edge) + var(--btn) + var(--gap) + env(safe-area-inset-top))
      calc(var(--edge) + env(safe-area-inset-right))
      calc(var(--edge) + var(--btn) + var(--gap) + env(safe-area-inset-bottom))
      calc(var(--edge) + env(safe-area-inset-left));
  }
  .lightbox-nav { top: auto; bottom: calc(var(--edge) + env(safe-area-inset-bottom)); transform: none; }
}

.lightbox-loader { display: grid; place-items: center; }
.lightbox-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(143, 220, 240, 0.25);
  border-top-color: var(--cyan);
  border-radius: 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .lightbox-spinner { animation: lightbox-spin 0.8s linear infinite; }
}
@keyframes lightbox-spin { to { transform: rotate(360deg); } }
.lightbox-error { margin: 0; color: var(--text); font-size: 16px; text-align: center; }
/* page behind the open viewer does not scroll */
html.lightbox-open { overflow: hidden; }

.btn-gallery { height: 38px; margin-top: 24px; padding: 0 20px; font-size: 16.5px; border-radius: 7px; border-color: #a5b1c5; }

/* hobbies: cut-corner HUD cards */
.hobby-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 12px 3px 0 -1px;
}
.hobby {
  position: relative;
  padding: 4px 4px 14px; /* height = image + title (descriptions removed) */
  --cut: 16px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
  background: #4d5d79; /* acts as the outer border */
}
.hobby::before {
  /* inner panel */
  content: "";
  position: absolute;
  inset: 1px;
  clip-path: inherit;
  background: #0f1625;
}
.hobby img {
  position: relative;
  width: 100%;
  height: 96px;
  object-fit: cover;
  object-position: top;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.hobby::after {
  content: "";
  position: absolute;
  inset: 4px;
  top: 40px;
  background: linear-gradient(180deg, transparent, rgba(26, 31, 42, 0.92) 50%, #1b202b 80%);
}
.hobby h3 { position: relative; z-index: 1; margin-inline: 18px 12px; }
.hobby h3 { margin-top: -13px; font-size: 20px; font-weight: 500; line-height: 24px; color: #f4f6fa; }

/* universes */
#universes { padding-top: 56px; }
.universe-grid {
  display: grid;
  grid-template-columns: 1fr; /* three horizontal cards, one under another */
  gap: 13px;
  margin: 12px 2px 0 4px;
}
.universe {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-card);
  border-radius: 6px;
  background: #121a29;
}
/* whole 1600x500 artwork, scaled to the card width (16:5), never cropped */
.universe picture { display: block; } /* WebP with JPEG fallback */
.universe img { width: 100%; height: auto; aspect-ratio: 16 / 5; }
.universe::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(18, 26, 41, 0.92) 100%);
}
.universe h3,
.universe p { position: absolute; left: 12px; right: 6px; z-index: 1; }
.universe h3 { bottom: 29px; white-space: nowrap; letter-spacing: -0.01em; font-size: 18px; font-weight: 500; line-height: 22px; color: #f1f4f9; }
.universe p { bottom: 12px; font-size: 13px; line-height: 16px; color: #b6bfcc; }

/* notes */
#notes { padding-top: 46px; }
.notes-panel {
  position: relative;
  min-height: 101px; /* grows with longer text */
  margin-top: 4px;
  padding: 19px 22px 19px;
  border: 1px solid rgba(110, 130, 165, 0.35);
}
.notes-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  --c: #9aa7bf;
  background:
    linear-gradient(var(--c), var(--c)) left top / 7px 1.5px no-repeat,
    linear-gradient(var(--c), var(--c)) left top / 1.5px 7px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 7px 1.5px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 1.5px 7px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 7px 1.5px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 1.5px 7px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 7px 1.5px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 1.5px 7px no-repeat;
}
.notes-panel p { font-size: 15px; line-height: 18px; color: #d6dce6; }
.notes-panel p + p { margin-top: 8px; }

/* contact */
.contact { padding-top: 64px; text-align: center; padding-left: 14px; }
.contact-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--title);
}
.contact-details { margin-top: 5px; font-size: 15.5px; line-height: 23px; color: #c3cad6; }
.contact-details a { text-decoration: none; }
.contact-details a:hover { color: var(--cyan); text-decoration: underline; }
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 17px;
}
.socials--contact { justify-content: center; gap: 12px; }
.btn-website { height: 38px; padding: 0 18px; font-size: 15.5px; border-radius: 7px; border-color: #a5b1c5; }
.notes-email { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.notes-email:hover { color: var(--cyan); }

/* footer: full window width under both columns */
.site-footer {
  border-top: 1px solid #3a475c; /* runs edge to edge */
  background: var(--bg);
  font-size: 14.5px;
  color: #c3cad6;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--page);
  margin-inline: auto;
  padding: 15px var(--pad) 22px; /* same side padding as the page */
}
.back-to-top { text-decoration: none; }
.back-to-top:hover { color: var(--cyan); text-decoration: underline; }

/* =========================================================
   Tablet and phone: one column, same elements and style
   ========================================================= */
@media (max-width: 1199px) {
  :root {
    --pad: 32px;
    --name-size: clamp(42px, 9vw, 90px);
    --name-stretch: 1.15;
    --title-size: 30px;
  }
  .page > .hud-frame, .work-grid::before, .card--small::after,
  .grid-deco::before { display: none; }

  .hero { min-height: 0; padding-top: 48px; display: flex; flex-direction: column; }
  .portrait-frame { position: relative; top: auto; right: auto; margin: 40px auto 0; }

  .about, .work, .columns { grid-template-columns: 1fr; }
  .about { padding-top: 64px; }
  .about-cards { margin-top: 24px; }
  .work { padding-top: 64px; }
  .work .section-title { font-size: var(--title-size); }
  .company-frame { width: auto; margin-left: -7px; margin-right: -7px; }
  .work-grid { margin-top: 20px; }
  .columns { margin: 0; padding-top: 64px; row-gap: 64px; }
  .hobby-grid { margin: 15px 0 0; }
  .universe-grid { margin: 15px 0 0; }
  .contact { padding-left: 0; }
}

@media (max-width: 759px) {
  :root { --pad: 16px; --title-size: 26px; }
  .site-header {
    padding-top: 20px;
    height: auto;
  }
  .monogram, .header-cta { min-height: 44px; align-items: center; }

  .hero-name { white-space: normal; }
  .hero-role { font-size: 18px; line-height: 23px; }
  .br-desk { display: none; }
  .btn { height: 44px; }
  .icon-link { width: 44px; height: 44px; }
  .socials--hero { gap: 4px; margin-left: -11px; }
  .icon-btn { width: 48px; height: 44px; }

  .about-cards, .work-grid, .hobby-grid { grid-template-columns: 1fr; }
  .about-cards .card, .work-grid { height: auto; }
  .about-cards .card { padding-bottom: 16px; }
  .work-grid { grid-template-rows: none; }
  .card--small { padding-bottom: 12px; }
  .company-card { height: auto; padding-bottom: 24px; }
  .company-frame { height: auto; }
  .contact-details a { display: inline-block; padding: 10px 0; }
  .back-to-top { padding: 12px 0; }
}

/* narrow phones: one column, so the previews stay large */
@media (max-width: 479px) {
  .art-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* Small-cell grid behind the card groups of the other sections.
   Same cells as inside the CREOSQUAD card: 1px lines every 30px, rgba(120,145,190,.14).
   Edges fade out so the patch never ends in a hard line. */
.grid-deco { position: relative; }
.grid-deco::before {
  content: "";
  position: absolute;
  top: -13px;
  bottom: -14px;
  left: -74px;
  right: -20px;
  background:
    linear-gradient(90deg, rgba(120, 145, 190, 0.14) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(180deg, rgba(120, 145, 190, 0.14) 1px, transparent 1px) 0 0 / 30px 30px;
  -webkit-mask-image:
    linear-gradient(90deg, transparent, #000 60px, #000 calc(100% - 60px), transparent),
    linear-gradient(180deg, transparent, #000 30px, #000 calc(100% - 30px), transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent, #000 60px, #000 calc(100% - 60px), transparent),
    linear-gradient(180deg, transparent, #000 30px, #000 calc(100% - 30px), transparent);
  mask-composite: intersect;
  pointer-events: none;
  z-index: -1;
}
