/* ════════════════════════════════════════
   DESKTOP STYLES (min-width: 768px)
════════════════════════════════════════ */
@media (min-width: 768px) {
  #desktop-view { display: block; }
  body {
    width: 100vw; height: 100vh; overflow: hidden; position: fixed;
    background: #F0EFF5;
    display: flex; align-items: center; justify-content: center;
    font-family: 'NicoClean', monospace;
  }

  #stage {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #canvas {
    position: relative;
    width: 1440px;
    height: 900px;
    transform-origin: center center;
    flex-shrink: 0;
  }

  /* ── Screen content ── */
  #screen-wrap {
    position: absolute;
    left: 79px;
    top: 77px;
    width: 981px;
    height: 635px;
    overflow: hidden;
    background: #fff;
    z-index: 4;
  }

  .scanlines { display: none; }

  #tv-static {
    position: absolute;
    inset: 0;
    z-index: 49;
    opacity: 0;
    pointer-events: none;
    transition: opacity 80ms ease;
  }
  #tv-static.show { opacity: 1; }
  #tv-static canvas { width: 100%; height: 100%; display: block; }

  /* ── Pages ── */
  .page {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease 0.15s;
    pointer-events: none;
    overflow: hidden;
    font-family: 'NicoClean', monospace;
    display: flex;
    flex-direction: column;
  }
  .page.active {
    opacity: 1;
    pointer-events: all;
  }

  /* ── Shared page styles ── */
  .page-inner {
    padding: 40px 50px 40px;
    flex: 1;
    min-height: 0;
    box-sizing: border-box;
  }
  .page-title {
    font-family: 'NicoClean', monospace;
    font-size: 56px;
    color: #1a1a1a;
    line-height: 1;
    letter-spacing: 2px;
    margin-bottom: 24px;
  }
  .teal { color: rgb(0,133,117); }
  .tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Asymmetric padding: NicoClean glyph sits in the upper half of its line-box */
    padding: 8px 8px 4px;
    line-height: 1;
    background: rgba(0,133,117,0.1);
    color: rgb(0,133,117);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.05em;
    border: 1px solid rgba(0,133,117,0.3);
    margin-right: 4px;
  }
  .divider {
    width: 60px;
    height: 3px;
    background: rgb(0,133,117);
    margin-bottom: 28px;
    flex-shrink: 0;
  }

  /* ── About Me page ── */
  #page-about .page-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto 1fr;
    gap: 0 40px;
    align-items: start;
  }
  #page-about .page-title,
  #page-about .divider {
    grid-column: 1 / -1;
  }
  .about-left {}
  .about-name {
    font-family: 'NicoClean', monospace;
    font-size: 64px;
    color: #1a1a1a;
    line-height: 1;
    margin-bottom: 6px;
  }
  .about-role {
    font-size: 13px;
    font-weight: 600;
    color: rgb(0,133,117);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 20px;
  }
  .about-bio {
    font-size: 13px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 24px;
  }
  .social-links {
    display: flex;
    gap: 10px;
  }
  .social-btn {
    padding: 6px 14px;
    border: 1.5px solid #1a1a1a;
    font-family: 'NicoClean', monospace;
    font-size: 18px;
    color: #1a1a1a;
    cursor: pointer;
    background: transparent;
    transition: background 0.15s, color 0.15s;
  }
  .social-btn:hover { background: #1a1a1a; color: #fff; }
  .about-right {}
  .stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }
  .stat-card {
    padding: 16px;
    border: 1.5px solid #e0e0e0;
    border-left: 3px solid rgb(0,133,117);
  }
  .stat-num {
    font-family: 'NicoClean', monospace;
    font-size: 48px;
    color: #1a1a1a;
    line-height: 1;
  }
  .stat-label {
    font-size: 12px;
    color: #888;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 4px;
  }
  .skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .skill-chip {
    padding: 4px 10px;
    background: #F0EFF5;
    border: 1.5px solid #ccc;
    font-size: 12px;
    color: #333;
    font-family: 'NicoClean', monospace;
  }

  /* ── Blog page ── */
  #page-blog .page-inner {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
  }
  .blog-list {
    display: flex;
    flex-direction: column;
    gap: 26px;
    flex: 1;
  }
  .blog-item {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.12s;
  }
  .blog-item:first-child { border-top: 1px solid #eee; }
  .blog-item:hover { background: rgba(0,133,117,0.03); }
  .blog-date {
    font-family: 'NicoClean', monospace;
    font-size: 18px;
    color: rgb(0,133,117);
    white-space: nowrap;
  }
  .blog-title {
    font-size: 14px;
    font-weight: 400;
    color: #1a1a1a;
    line-height: 1.3;
  }
  .blog-meta {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
  }
  .blog-tags { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

  /* ── Portfolio page ── */
  #page-portfolio .page-inner {
    display: flex;
    flex-direction: column;
  }
  .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Each row fills the visible grid height (approx 444px = screen-wrap minus title/divider/padding chrome).
       3 cards per row; scrolling vertically reveals the next row. */
    grid-auto-rows: 100%;
    gap: 26px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 16px; /* 6px scrollbar + 10px gap */
  }
  .portfolio-card.empty {
    border: 1.5px dashed #e0e0e0;
    pointer-events: none;
  }
  .portfolio-card.empty .portfolio-thumb {
    background: #f8f8f8;
    color: #ddd;
  }
  .portfolio-card {
    border: 1.5px solid #e0e0e0;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .portfolio-card:hover { border-color: rgb(0,133,117); transform: translateY(-2px); }
  /* External-link badge shown on works cards that have a hyperlink */
  .portfolio-ext-link {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 14px;
    line-height: 1;
    color: #008575;
    opacity: 0.7;
    pointer-events: none;
  }
  .portfolio-card:hover .portfolio-ext-link { opacity: 1; }
  .portfolio-thumb {
    width: 100%;
    flex: none;             /* width-driven height (no longer 60% of card) */
    aspect-ratio: 8 / 5;    /* matches source images (736×454 ≈ 1.62) so background:cover doesn't clip */
    background: repeating-linear-gradient(45deg, #e8e8e8 0px, #e8e8e8 8px, #f0f0f0 8px, #f0f0f0 16px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #aaa;
    font-family: 'NicoClean', monospace;
    border-bottom: 1.5px solid #e0e0e0;
    position: relative;
  }
  .portfolio-info {
    flex: 1;                /* takes remaining card height after the 4:3 thumb */
    padding: 20px 12px 8px; /* top:20px = gap from thumb to title; bottom 8px keeps tags clear of card edge */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
  }
  /* Info-top stacks title → date → desc. Spacing is per-child (no gap) so we can
     have a tight title-date pairing (2px) and a wider date-desc gap (20px). */
  .portfolio-info-top { display: flex; flex-direction: column; }
  .portfolio-title {
    font-size: 12px;
    font-weight: 400;
    color: #1a1a1a;
    line-height: 1.3;
  }
  .portfolio-date {
    font-size: 12px;
    color: #989898;
    margin-top: 2px;        /* tight pairing with title */
  }
  .portfolio-desc {
    font-size: 12px;
    font-weight: 400;       /* explicit normal weight — overrides any inherited bold */
    color: #555;
    line-height: 1.35;
    margin-top: 20px;       /* 20px gap below date (or below the BTS pill if present) */
  }
  /* "Build details available" badge — shown only on cards where behindTheScenes==true.
     Text size + letter-spacing match .tag for visual consistency with the tags row. */
  .portfolio-pill {
    align-self: flex-start;     /* don't stretch full width inside the column flex */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
    color: #555;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.05em;
    /* Asymmetric padding: NicoClean glyph sits in the upper half of its line-box */
    padding: 6px 10px 2px;
    border-radius: 999px;
    margin-top: 10px;           /* small gap from date */
    /* desc's existing margin-top: 20px provides the gap below */
  }
  .portfolio-tags { display: flex; gap: 4px; flex-wrap: wrap; }
  .portfolio-year {
    font-family: 'NicoClean', monospace;
    font-size: 16px;
    color: rgb(0,133,117);
    float: right;
  }

  /* ── Videos page ── */
  #page-videos .page-inner {
    display: flex;
    flex-direction: column;
  }
  .videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .video-card {
    cursor: pointer;
    transition: transform 0.15s;
  }
  .video-card:hover { transform: translateY(-2px); }
  .video-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    position: relative;
    border: 1.5px solid #333;
  }
  .video-play {
    width: 0;
    height: 0;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 26px solid rgb(0,133,117);
    opacity: 0.8;
  }
  .video-duration {
    position: absolute;
    bottom: 6px;
    right: 8px;
    font-family: 'NicoClean', monospace;
    font-size: 14px;
    color: #fff;
  }
  .video-title {
    font-size: 12px;
    font-weight: 400;
    color: #1a1a1a;
    line-height: 1.3;
  }
  .video-views {
    font-size: 12px;
    color: #888;
    margin-top: 3px;
  }

  /* ── Trainings page ── */
  #page-trainings .page-inner {
    display: flex;
    flex-direction: column;
  }
  .training-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .training-item {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 16px;
    padding: 16px;
    border: 1.5px solid #e0e0e0;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.15s;
  }
  .training-item:hover { border-color: rgb(0,133,117); }
  .training-icon {
    width: 48px;
    height: 48px;
    background: rgb(0,133,117);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'NicoClean', monospace;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
  }
  .training-title {
    font-size: 14px;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 4px;
  }
  .training-meta {
    font-size: 12px;
    color: #888;
    display: flex;
    gap: 10px;
  }
  .training-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* NicoClean glyph offset compensation */
    padding: 6px 10px 2px;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 0.05em;
    flex-shrink: 0;
  }
  .status-live { background: rgba(0,133,117,0.12); color: rgb(0,133,117); border: 1px solid rgba(0,133,117,0.4); }
  .status-soon { background: rgba(0,0,0,0.05); color: #888; border: 1px solid #ccc; }

  /* ── TV SVG layers ── */
  #tv-wrap {
    position: absolute;
    left: 30px;
    top: 30px;
    width: 1080px;
    height: 850px;
    pointer-events: none;
    z-index: 2;
  }
  #tv-glass {
    position: absolute;
    left: 30px;
    top: 30px;
    pointer-events: none;
    z-index: 5;
  }
  #tv-wrap img, #tv-wrap svg { position: absolute; }

  /* ── Console ── */
  #console-wrap {
    position: absolute;
    left: 1030px;
    top: 590px;
    width: 380px;
    height: 280px;
    z-index: 3;
  }
  #console-wrap img { position: absolute; }

  /* ── Cartridge in console ── */
  #console-cartridge {
    position: absolute;
    left: 91px;
    top: 0;
    width: 197px;
    height: 104px;
    z-index: 5;
    transition: top 0.25s cubic-bezier(0.34,1.56,0.64,1);
  }
  .cart-body-mask {
    position: absolute;
    inset: 0;
    -webkit-mask-image: url(../assets/Body.svg);
    mask-image: url(../assets/Body.svg);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    transition: background-color 0.2s;
  }
  .cart-label {
    position: absolute;
    left: 46px;
    top: 16px;
    width: 107px;
    text-align: center;
    font-family: 'NicoClean', monospace;
    font-size: 35px;
    line-height: 1;
    color: #fff;
    z-index: 2;
    pointer-events: none;
  }
  .cart-grill {
    position: absolute;
    left: 30px;
    bottom: 4px;
    width: 138px;
    height: 14px;
    display: flex;
    gap: 2.4px;
    z-index: 2;
    pointer-events: none;
  }
  .cart-grill-bar {
    flex: 1;
    height: 100%;
    background: rgba(0,0,0,0.25);
    border-radius: 1px;
  }

  /* ── Cartridge tray ── */
  #cartridge-tray {
    position: absolute;
    left: 1410px;
    top: 27px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
  }
  .tray-cartridge {
    width: 197px;
    height: 104px;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
    transform: translateX(0);
  }

  .tray-cartridge.ejecting {
    animation: ejectCart 0.5s ease forwards;
  }
  @keyframes consoleShake {
    0%   { transform: translateY(0) rotate(0deg); }
    20%  { transform: translateY(-5px) rotate(-0.5deg); }
    40%  { transform: translateY(3px) rotate(0.5deg); }
    60%  { transform: translateY(-2px) rotate(-0.3deg); }
    80%  { transform: translateY(1px); }
    100% { transform: translateY(0); }
  }
  @keyframes ejectCart {
    0%   { transform: translateX(-174px); }
    40%  { transform: translateX(-80px) translateY(-8px); }
    70%  { transform: translateX(-50px); }
    100% { transform: translateX(-24px); }
  }

  #console-cartridge.glowing {
    filter: drop-shadow(0 0 8px #008575) drop-shadow(0 0 20px rgba(0,133,117,0.6));
    transition: filter 0.4s ease;
  }
  #console-cartridge {
    transition: filter 0.2s ease;
  }
  @keyframes hintPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }
  #hint-text {
    position: absolute;
    left: 1137px;
    top: 284px;
    width: 259px;
    font-size: 30px;
    line-height: 1;
    font-family: 'NicoClean', monospace;
    z-index: 6;
    pointer-events: none;
    animation: hintPulse 2.2s ease-in-out infinite;
  }

  /* ── Scrollable list pages ── */
  .scroll-list {
    display: flex;
    flex-direction: column;
    gap: 26px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-top: 4px;    /* breathing room so card hover translateY(-2px) isn't clipped */
    padding-right: 16px; /* 6px scrollbar + 10px gap */
  }
  .scroll-list > .portfolio-card {
    flex-shrink: 0;
    min-height: 76px;
  }
  /* Custom scrollbars for content scrollers (WebKit/Chromium) */
  .portfolio-grid::-webkit-scrollbar,
  .scroll-list::-webkit-scrollbar { width: 6px; }
  .portfolio-grid::-webkit-scrollbar-track,
  .scroll-list::-webkit-scrollbar-track { background: transparent; }
  .portfolio-grid::-webkit-scrollbar-thumb,
  .scroll-list::-webkit-scrollbar-thumb {
    background: #c8c8c8;
    border-radius: 3px;
  }
  .portfolio-grid::-webkit-scrollbar-thumb:hover,
  .scroll-list::-webkit-scrollbar-thumb:hover { background: #008575; }
  /* Firefox scrollbar */
  .portfolio-grid,
  .scroll-list {
    scrollbar-width: thin;
    scrollbar-color: #c8c8c8 transparent;
  }

  /* ── Detail overlay ──
     Insets match #page-about (top:30 bottom:30 left:12 right:20) so the overlay sits
     entirely within the TV's visible CRT screen area. Without these insets the overlay
     fills the rectangular #screen-wrap and content bleeds into the curved-bezel zone. */
  #detail-overlay {
    position: absolute;
    top: 30px;
    bottom: 30px;
    left: 12px;
    right: 20px;
    background: #fff;
    z-index: 47;
    transform: translateX(100%);
    transition: transform 300ms cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  #detail-overlay.open { transform: translateX(0); }
  /* When the detail overlay is open, hide the underlying pages so their content
     (blog cards with gray borders) doesn't show through the 30/12/20px gap around
     the overlay. Without this, those cards are visible and look like a "gray border"
     framing the white panel. */
  #screen-wrap:has(#detail-overlay.open) > .page { visibility: hidden; }
  #detail-back {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 30px 30px 30px;
    cursor: pointer;
    color: #989898;
    font-size: 14px;
    transition: color 0.15s;
    flex-shrink: 0;
  }
  #detail-back:hover { color: #008575; }
  #detail-back-arrow {
    width: 10px; height: 10px;
    background: currentColor;
    clip-path: polygon(0% 50%, 100% 0%, 100% 100%);
    flex-shrink: 0;
  }
  #detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px 50px 60px 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overscroll-behavior: contain;
  }
  .detail-hero {
    width: 100%;
    height: 220px;
    background: repeating-linear-gradient(45deg,#e8e8e8 0px,#e8e8e8 8px,#f0f0f0 8px,#f0f0f0 16px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #bbb;
    border: 1.5px solid #e0e0e0;
    flex-shrink: 0;
  }
  .detail-hero.dark {
    background: #1a1a1a;
    color: #555;
    position: relative;
  }
  /* When a real image is rendered into the hero, drop the placeholder border/bg
     (the placeholder styles are only meaningful for empty/[ ... ] placeholders). */
  .detail-hero:has(img) {
    border: 0;
    background: none;
    padding: 0;
  }
  .detail-title {
    font-size: 26px;
    color: #1a1a1a;
    line-height: 1.2;
  }
  .detail-meta {
    font-size: 12px;
    color: #989898;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
  }
  .detail-meta span { color: #008575; }
  .detail-divider {
    width: 40px; height: 2px;
    background: #008575;
    flex-shrink: 0;
  }
  .detail-body {
    font-size: 13px;
    color: #555;
    line-height: 1.8;
  }
  .detail-body p { margin-bottom: 12px; }
  /* base.css resets all margin/padding to 0, so outside-positioned markers bleed left.
     list-style-position:inside keeps bullets inside the li flow; padding-left indents. */
  .detail-body ul,
  .detail-body ol  { padding-left: 1.2em; margin-bottom: 12px; }
  .detail-body li  { list-style-position: inside; margin-bottom: 4px; }
  .detail-tags { display: flex; gap: 6px; flex-wrap: wrap; }

  /* ════════════════════════════════════════
     ABOUT ME — snap-scroll screens
  ════════════════════════════════════════ */
  #page-about::-webkit-scrollbar { display: none; }

  /* ── Snap screen shell ── */
  .about-screen {
    height: 100%;
    min-height: 100%;
    flex-shrink: 0;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 36px 44px 54px;
    box-sizing: border-box;
  }
  /* Screen 1 overrides — photo bleeds to top/bottom edges */
  .about-screen--center {
    justify-content: flex-start;
    padding: 0;
  }

  /* ── Screen 1 · Hero ── */
  .about-s1 {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0;
    align-items: stretch;
    height: 100%;
  }
  .about-photo-col {
    overflow: hidden;
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
    background: transparent;
  }
  .about-avatar {
    height: 100%;
    width: auto;
    display: block;
    object-fit: cover;
    object-position: center top;
    background: transparent;
    border: none;
    margin: 0;
  }
  .about-intro-col {
    padding: 48px 44px 48px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .about-name {
    font-size: 45px;
    line-height: 1;
    color: #1a1a1a;
    letter-spacing: -0.01em;
  }
  .about-job-title {
    font-size: 12px;
    color: #008575;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-top: 8px;
  }
  .about-divider {
    width: 40px;
    height: 2px;
    background: #008575;
    margin: 14px 0;
  }
  .about-intro-text {
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-width: 520px;
  }
  .about-intro-para {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin: 0;
  }
  .about-social-row {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
  }
  .about-social-btn {
    width: 60px;
    height: 60px;
    border: 1.5px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    cursor: pointer;
    flex-shrink: 0;
  }
  .about-social-btn svg { width: 50px; height: 50px; } /* 60px button − 5px each side */
  .about-social-btn:hover {
    border-color: #008575;
    color: #008575;
    background: rgba(0,133,117,0.04);
  }

  /* ── Screen 2 · Career & Skills ── */
  .about-screen-para {
    font-size: 12px;
    line-height: 1.75;
    color: #555;
    margin-bottom: 20px;
    flex-shrink: 0;
  }
  .about-charts-row {
    display: grid;
    /* Career : Skills = 60 : 40 of the visible row (gap is excluded from
       the fr math, so the actual visible split respects the gap). */
    grid-template-columns: 3fr 2fr;
    gap: 60px;
    flex: 1;
    min-height: 0;
    align-items: stretch;
  }
  .about-chart-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
  }
  .about-col-label {
    font-size: 12px;
    color: #989898;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding-bottom: 8px;
    border-bottom: 1.5px solid #e0e0e0;
    flex-shrink: 0;
  }
  /* Donut chart */
  .about-donut-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .about-donut {
    width: 100%;
    max-width: 418px; /* 380 × 1.10 ≈ 418 (+10%) */
    height: auto;
    display: block;
    overflow: visible;
  }
  /* Donut slice + skill bar shared tooltip */
  #about-tooltip {
    position: fixed;
    pointer-events: none;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #008575;
    padding: 14px 16px;
    font-family: 'NicoClean', monospace;
    font-size: 15px; /* base — all children inherit and scale up from here */
    color: #1a1a1a;
    max-width: 416px; /* 320px × 1.3 */
    min-width: 286px; /* 220px × 1.3 */
    box-shadow: 0 8px 24px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.04);
    z-index: 9999;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
  }
  #about-tooltip.show { opacity: 1; transform: translateY(0); }
  #about-tooltip .tt-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
  }
  #about-tooltip .tt-company { font-size: 23px; line-height: 1.2; color: #1a1a1a; } /* 18 × 1.25 */
  #about-tooltip .tt-years   { font-size: 15px; color: #989898; white-space: nowrap; }
  #about-tooltip .tt-dates {
    font-size: 15px;
    color: #1a1a1a;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
  }
  #about-tooltip .tt-role {
    font-size: 15px;
    color: #008575;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    margin-bottom: 8px;
  }
  #about-tooltip .tt-divider {
    width: 32px;
    height: 2px;
    background: #008575;
    margin: 0 0 10px 0;
  }
  #about-tooltip .tt-list {
    list-style: none;
    padding: 0;
    margin: 30px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  #about-tooltip .tt-list li {
    font-size: 15px;
    line-height: 1.5;
    color: #555;
    padding-left: 14px;
    position: relative;
  }
  #about-tooltip .tt-list li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0.75em;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #008575;
    border-radius: 50%;
  }
  /* Skill-level pip row inside the shared tooltip */
  #about-tooltip .tt-pips {
    display: flex;
    gap: 5px;
    margin: 6px 0 10px;
  }
  #about-tooltip .tt-pip {
    width: 20px;
    height: 5px;
    border-radius: 2px;
  }
  @media (prefers-reduced-motion: reduce) {
    #about-tooltip { transition: opacity 0.05s ease; transform: none; }
    #about-tooltip.show { transform: none; }
  }

  .about-donut-slice {
    cursor: help;
    transition: opacity 0.15s;
  }
  .about-donut-slice:hover { opacity: 0.85; }
  .about-donut-label {
    font-family: 'NicoClean', monospace;
    font-size: 12px;
    fill: #1a1a1a;
    pointer-events: none;
  }
  .about-donut-label-yrs {
    font-size: 12px;
    fill: #989898;
  }
  /* Skills bars */
  .about-skills-list {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    justify-content: space-between;
    padding: 4px 0;
  }
  .about-skill-row {
    display: flex;
    align-items: center;
    /* 10px between axis label → circles AND between circles → year label */
    gap: 10px;
  }
  .about-skill-name {
    color: #1a1a1a;
    width: 100px;
    flex-shrink: 0;
    /* Block-level flex container with explicit height + align-items: center
       reliably centres the inner text node inside a pip-tall box. The inner
       <span> wraps the text so text-overflow / ellipsis still work (which they
       don't on a flex container's anonymous text item). */
    display: flex;
    align-items: center;
    height: 18px;
  }
  .about-skill-name > span {
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    /* NicoClean has 9px ascent / 3px descent — visible glyph sits in the
       upper half of the line-box. Nudge down so the painted area's centre
       aligns with the pip's geometric centre. */
    transform: translateY(2px);
  }
  .about-skill-bars {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    flex-shrink: 1;
  }
  .about-skill-pip {
    width: 18px;
    height: 18px;
    display: inline-block;
    flex-shrink: 0;
    background: #008575;
    border-radius: 50%;
  }
  .about-skill-level {
    color: #555;
    /* Right-side gap is provided by the row's 10px gap above */
    margin-left: 0;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    height: 18px;
  }
  .about-skill-level > span {
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    /* Same NicoClean metrics compensation as .about-skill-name > span */
    transform: translateY(2px);
  }

  /* ── Screen 3 · Selected works ── */
  .about-section-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    flex-shrink: 0;
  }
  .about-section-line {
    width: 28px;
    height: 2px;
    background: #008575;
    flex-shrink: 0;
  }
  .about-section-title {
    font-size: 12px;
    color: #989898;
    text-transform: uppercase;
    letter-spacing: 0.12em;
  }
  /* Screen-3 modifier: less bottom padding so works grid stretches further */
  .about-screen--works {
    padding-bottom: 24px;
  }
  .about-works-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr;
    grid-auto-rows: auto;
    gap: 26px;
    flex: 1;
    min-height: 0;
    overflow: visible;
    padding: 4px 0 0 0;
  }
  /* Selected-works portfolio cards overrides */
  .about-works-grid .portfolio-card {
    gap: 20px; /* 20px gap between image and title */
  }
  .about-works-grid .portfolio-thumb {
    flex: none;
    height: 184px; /* 92px × 2 (+100%) */
  }
  .about-works-grid .portfolio-info {
    flex: 1;
    padding-top: 0; /* card gap already provides the 10px clearance above title */
  }
  .about-works-grid .portfolio-desc {
    font-size: 12px;
    color: #555;
    line-height: 1.45;
    margin-top: 4px;
  }
  .about-work-card {
    border: 1.5px solid #e0e0e0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: border-color 0.15s;
  }
  .about-work-card:hover { border-color: #008575; border-width: 2px; }
  .about-work-thumb {
    flex: 1;
    min-height: 0;
    background: repeating-linear-gradient(45deg,#e8e8e8 0,#e8e8e8 6px,#f0f0f0 6px,#f0f0f0 12px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #bbb;
    border-bottom: 1.5px solid #e0e0e0;
  }
  .about-work-info {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
  }
  .about-work-title {
    font-size: 12px;
    color: #1a1a1a;
    line-height: 1.3;
  }
  .about-work-tags { display: flex; gap: 4px; flex-wrap: wrap; }

  /* ── Screen 4 · Closing & credits ── */
  .about-closing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    flex: 1;
    min-height: 0;
    align-items: start;
  }
  .about-events {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
  }
  .about-event {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    border: 1.5px solid #e0e0e0;
    font-size: 12px;
    color: #1a1a1a;
    gap: 8px;
  }
  .about-event-year {
    color: #989898;
    flex-shrink: 0;
    font-size: 12px;
  }
  .about-credits {
    margin-top: auto;
    padding-top: 20px;
    font-size: 12px;
    color: #c8c8c8;
    text-align: center;
    letter-spacing: 0.06em;
    flex-shrink: 0;
  }

  /* ── Scroll hint pulse ── */
  @keyframes aboutScrollPulse {
    0%, 100% { opacity: 0.3; }
    50%       { opacity: 1;   }
  }
  .about-scroll-hint {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #008575;
    letter-spacing: 0.1em;
    white-space: nowrap;
    pointer-events: none;
    animation: aboutScrollPulse 2.4s ease-in-out infinite;
  }

  /* ── Trainings form ── */
  .trainings-form-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
  .trainings-intro { font-size: 13px; color: #555; line-height: 1.5; margin-bottom: 20px; }
  .contact-form { display: flex; flex-direction: column; gap: 20px; flex: 1; min-height: 0; }
  .contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .contact-field { display: flex; flex-direction: column; gap: 4px; position: relative; }
  .contact-field:has(textarea) { flex: 1; min-height: 0; }
  .contact-field > span { font-size: 12px; color: #989898; letter-spacing: 0.08em; text-transform: uppercase; }
  .contact-field input,
  .contact-field textarea {
    font-family: 'NicoClean', monospace; font-size: 13px; color: #1a1a1a;
    padding: 8px 12px; border: 1.5px solid #e0e0e0; background: #fff;
    outline: none; transition: border-color 0.15s;
  }
  .contact-field textarea { resize: none; line-height: 1.5; flex: 1; min-height: 0; }
  .contact-field input:focus,
  .contact-field textarea:focus { border-color: #008575; }
  .contact-field input:invalid:not(:placeholder-shown),
  .contact-field textarea:invalid:not(:placeholder-shown) { border-color: #c44; }
  .contact-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
  .contact-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
  .contact-status { font-size: 12px; color: #c44; }
  .contact-status.ok { color: #008575; }
  .contact-submit {
    font-family: 'NicoClean', monospace; font-size: 14px; letter-spacing: 0.08em;
    padding: 8px 22px; background: #008575; color: #fff; border: 0; cursor: pointer;
    transition: background 0.15s, transform 0.05s;
  }
  .contact-submit:hover { background: #006b5d; }
  .contact-submit:active { transform: translateY(1px); }
  .contact-submit:disabled { background: #aaa; cursor: not-allowed; }

  /* Toast — confirmation that auto-dismisses after 2s */
  .contact-toast {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    background: #008575; color: #fff;
    font-family: 'NicoClean', monospace; font-size: 16px; letter-spacing: 0.06em;
    padding: 16px 28px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.25);
    z-index: 100;
    opacity: 0;
    transition: opacity 250ms ease, transform 250ms ease;
    pointer-events: none;
    white-space: nowrap;
  }
  .contact-toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
