/* --- Variables: monochrome + minimal accent --- */
:root {
  --bg-dark: #0d0d0d;
  --bg-mid: #2d2d2d;
  --bg-light: #3d3d3d;
  --text: #e8e8e8;
  --text-muted: #888;
  --terminal-green: #00ff41;
  --accent: #ff6b9d;
  --accent-dim: rgba(255, 107, 157, 0.4);
  --pixel-border: #444;
  --white: #f5f5f5;
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow: auto;
  height: 100%;
  background: var(--bg-dark);
}
body {
  margin: 0;
  height: 100%;
  min-height: 100vh;
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  color: var(--text);
  background: transparent;
  overflow: auto;
  position: relative;
  z-index: 0;
  isolation: isolate;
}

/* --- Pixel background canvas --- */
#pixel-bg {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* --- Main content above canvas --- */
main { position: relative; z-index: 1; }

/* Robust stacking: ensure hero always above canvas */
.hero { position: relative; z-index: 2; }
.hero-portrait-wrap { position: relative; z-index: 2; }
.hero-portrait { position: relative; z-index: 2; }
.hero-name { z-index: 3; }

/* --- Home button (sub-pages, hidden when nav-bar is present) --- */
.home-btn { display: none; }

/* --- Global nav bar --- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(13, 13, 13, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--pixel-border);
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
}

.site-nav__logo {
  color: var(--text);
  text-decoration: none;
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
  margin-right: auto;
  padding: 0.35rem 0;
}
.site-nav__logo:hover { color: var(--accent); }

.site-nav__links {
  display: flex;
  gap: 0.15rem;
  align-items: center;
  flex-wrap: wrap;
}

.site-nav__link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.site-nav__link:hover,
.site-nav__link.is-active {
  color: var(--accent);
  background: rgba(255, 107, 157, 0.1);
}

.site-nav__hamburger {
  display: none;
  background: none;
  border: 2px solid var(--pixel-border);
  color: var(--text);
  font-size: 1.2rem;
  padding: 0.25rem 0.45rem;
  cursor: pointer;
  line-height: 1;
  border-radius: 3px;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.breadcrumbs a {
  color: var(--accent);
  text-decoration: none;
}
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs__sep { color: var(--pixel-border); }

/* --- Footer --- */
.site-footer {
  position: relative;
  z-index: 2;
  border-top: 3px solid var(--pixel-border);
  padding: 2rem 2.5rem;
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-top: 4rem;
}
.site-footer a {
  color: var(--accent);
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }
.site-footer__links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

@media (max-width: 700px) {
  .site-nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(13, 13, 13, 0.95);
    border-bottom: 2px solid var(--pixel-border);
    padding: 0.5rem 0;
    gap: 0;
  }
  .site-nav__links.is-open { display: flex; }
  .site-nav__link { padding: 0.65rem 1.25rem; }
  .site-nav__hamburger { display: block; }
}

/* (Old pixel-editor-tray rules removed – editor now uses editor.css) */

/* --- Hero --- */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
  position: relative;
}

/* offset sections below nav bar on subpages */
.section:first-child { padding-top: calc(3.5rem + 2rem); }

.hero-name {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(2rem, 14vw, 6rem);
  letter-spacing: 0.12em;
  margin: 0;
  position: absolute;
  left: 50%;
  top: 85%;
  transform: translate(-50%, -50%);
  text-align: center;
  max-width: 90vw;
  line-height: 1.6;
  background-image:
    linear-gradient(var(--text), var(--text)),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.07) 0, rgba(0,0,0,0.07) 1px, transparent 1px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.07) 0, rgba(0,0,0,0.07) 1px, transparent 1px, transparent 3px);
  background-size: 100% 100%, 3px 3px, 3px 3px;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 0 #1a1a1a) drop-shadow(0.5px 0 0 #1a1a1a) drop-shadow(-0.5px 0 0 #1a1a1a) drop-shadow(0 0.5px 0 #1a1a1a) drop-shadow(0 -0.5px 0 #1a1a1a) drop-shadow(4px 5px 0 rgba(0,0,0,0.6));
  opacity: 0.95;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.hero-portrait-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

/* Hover on image: name goes to back, image comes on top with animation */
.hero-portrait-wrap:hover .hero-name {
  z-index: 0;
  opacity: 0.35;
}
.hero-portrait-wrap:hover .hero-portrait {
  z-index: 2;
  transform: scale(1.02);
}

.hero-portrait {
  position: relative;
  z-index: 1;
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: bottom center;
  display: block;
  vertical-align: bottom;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  filter: drop-shadow(4px 4px 0 var(--pixel-border));
  transition: transform 0.35s ease, opacity 0.25s ease;
}

/* --- Pixel bubbles: mechanical dial, top = selected --- */
.bubbles {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  z-index: 0;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.bubbles .bubble {
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: auto;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  padding: 0.65rem 0.95rem;
  color: var(--text);
  text-decoration: none;
  text-align: center;
  background: var(--bg-mid);
  border: 4px solid var(--pixel-border);
  border-radius: 6px;
  box-shadow: 4px 4px 0 var(--bg-dark);
  transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.25s ease;
  --orbit-radius: min(42vw, 320px);
  opacity: 0;
  pointer-events: none;
}
.hero-portrait-wrap.image-hovered .bubbles .bubble {
  opacity: 0.5;
  pointer-events: auto;
}
.hero-portrait-wrap.image-hovered .bubbles .bubble.bubble--selected,
.hero-portrait-wrap.image-hovered .bubbles .bubble:hover {
  opacity: 1;
}


/* Revolve around center: 0deg = top, then clockwise */
.bubble--about   { transform: translate(-50%, -50%) rotate(0deg)   translateY(calc(-1 * var(--orbit-radius))); }
.bubble--tech   { transform: translate(-50%, -50%) rotate(72deg)   translateY(calc(-1 * var(--orbit-radius))); }
.bubble--creative { transform: translate(-50%, -50%) rotate(144deg) translateY(calc(-1 * var(--orbit-radius))); }
.bubble--resume { transform: translate(-50%, -50%) rotate(216deg) translateY(calc(-1 * var(--orbit-radius))); }
.bubble--contact { transform: translate(-50%, -50%) rotate(288deg) translateY(calc(-1 * var(--orbit-radius))); }

.bubbles .bubble:hover,
.bubbles .bubble.bubble--selected {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 4px 4px 0 var(--accent-dim);
}
.bubbles .bubble.bubble--selected {
  box-shadow: 4px 4px 0 var(--accent-dim), 0 0 12px var(--accent-dim);
}
.bubble--about:hover {
  transform: translate(-50%, -50%) rotate(0deg)   translateY(calc(-1 * var(--orbit-radius))) scale(1.08);
}
.bubble--tech:hover {
  transform: translate(-50%, -50%) rotate(72deg)   translateY(calc(-1 * var(--orbit-radius))) scale(1.08);
}
.bubble--creative:hover {
  transform: translate(-50%, -50%) rotate(144deg) translateY(calc(-1 * var(--orbit-radius))) scale(1.08);
}
.bubble--resume:hover {
  transform: translate(-50%, -50%) rotate(216deg) translateY(calc(-1 * var(--orbit-radius))) scale(1.08);
}
.bubble--contact:hover {
  transform: translate(-50%, -50%) rotate(288deg) translateY(calc(-1 * var(--orbit-radius))) scale(1.08);
}

/* --- Sections --- */
.section {
  padding: 6rem 2.5rem;
  max-width: 1000px;
  margin: 0 auto;
  border-top: 4px solid var(--pixel-border);
}

.section-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.15rem;
  margin: 0 0 1.5rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-light);
  padding: 0.75rem 1.1rem;
  border: 3px solid var(--pixel-border);
  display: inline-block;
  box-shadow: 4px 4px 0 var(--bg-dark);
}

.section-title:has(.section-title-btn),
.section-title--plain {
  background: none;
  padding: 0;
  border: none;
  box-shadow: none;
  margin-bottom: 1.5rem;
}

.section-title a {
  color: inherit;
  text-decoration: none;
}

.section-title a:hover:not(.section-title-btn) {
  text-decoration: underline;
}

.section-title-btn,
.section-title-btn:hover,
.section-title-btn:focus {
  text-decoration: none;
}

.section-title-btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  font-family: 'Press Start 2P', cursive;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-mid);
  border: 3px solid var(--pixel-border);
  border-radius: 4px;
  box-shadow: 4px 4px 0 var(--bg-dark);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.section-title-btn:hover {
  transform: translateY(-4px);
  box-shadow: 6px 8px 0 var(--bg-dark);
}

.section-text {
  margin: 0 0 1.25rem;
  line-height: 1.65;
  font-size: 1.55rem;
  color: var(--terminal-green);
  background: var(--bg-mid);
  padding: 1.35rem 1.6rem;
  border: 3px solid var(--pixel-border);
  box-shadow: 4px 4px 0 var(--bg-dark);
}

.section-text + .section-text {
  margin-top: 1.25rem;
}

.section-text:last-child { margin-bottom: 0; }

.section-text--label {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

/* --- Experience & Skills (resume) section --- */
.resume-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
  margin-top: 1.25rem;
}

.resume-layout__image {
  flex-shrink: 0;
  width: clamp(160px, 24vw, 260px);
  margin-right: -1rem;
  margin-left: 3px;
  margin-top: calc(1.25rem - 7px);
  position: relative;
  z-index: 2;
}

.resume-portrait {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.resume-layout__content {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
  margin-left: -2.5rem;
}

.resume-intro {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 1.25rem;
}

.resume-block {
  margin-bottom: 2rem;
}

.resume-block:last-child {
  margin-bottom: 0;
}

.resume-block__title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.65rem;
  margin: 0 0 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.resume-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.resume-skill-card {
  display: block;
  background: var(--bg-mid);
  border: 3px solid var(--pixel-border);
  padding: 1rem 1.2rem;
  box-shadow: 4px 4px 0 var(--bg-dark);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.resume-skill-card:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-4px);
  box-shadow: 6px 8px 0 var(--bg-dark);
}

.resume-skill-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--accent);
}

.resume-skill-card__text {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--terminal-green);
}

/* --- Skill gallery page --- */
.skill-gallery {
  margin-top: 1rem;
}

/* (Removed unused .skill-gallery__grid / __placeholder rules) */

/* --- Page renderer blocks --- */
.page-block { margin: 1rem 0; }
.page-block-positioned {
  overflow: hidden;
  word-wrap: break-word;
}

/* When a block is positioned (from the editor), make the inner component
   fill the saved w/h box so sizing matches the editor. */
.page-block-positioned > .comp-heading,
.page-block-positioned > .comp-text,
.page-block-positioned > .comp-card,
.page-block-positioned > .comp-code,
.page-block-positioned > .page-image,
.page-block-positioned > .comp-video,
.page-block-positioned > .page-embed,
.page-block-positioned > .comp-divider {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: block;
}

/* Links/buttons: fill box and center label */
.page-block-positioned > .comp-link {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* --- Editor component styles (shared on real pages) --- */
.comp-heading {
  font-family: 'Press Start 2P', cursive;
  color: var(--text);
  margin: 0;
  word-wrap: break-word;
  background: var(--bg-light);
  padding: 0.75rem 1.1rem;
  border: 3px solid var(--pixel-border);
  display: inline-block;
  box-shadow: 4px 4px 0 var(--bg-dark);
  /* Do NOT uppercase: preserve editor capitalization */
  text-transform: none;
  letter-spacing: 0.05em;
}

.comp-text {
  font-family: 'VT323', monospace;
  color: var(--terminal-green);
  margin: 0;
  line-height: 1.65;
  background: var(--bg-mid);
  padding: 1.35rem 1.6rem;
  border: 3px solid var(--pixel-border);
  box-shadow: 4px 4px 0 var(--bg-dark);
  word-wrap: break-word;
  /* Preserve newlines + spacing from the editor */
  white-space: pre-wrap;
}

.comp-link {
  display: inline-block;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.65rem;
  padding: 0.85rem 1.75rem;
  background: var(--bg-mid);
  border: 3px solid var(--pixel-border);
  border-radius: 4px;
  box-shadow: 4px 4px 0 var(--bg-dark);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0.05em;
}

.comp-card {
  background: var(--bg-mid);
  border: 3px solid var(--pixel-border);
  padding: 1.6rem;
  border-radius: 4px;
  box-shadow: 4px 4px 0 var(--bg-dark);
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.comp-card__title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.75rem;
  margin: 0 0 0.75rem;
  color: var(--text);
  text-transform: none;
}
.comp-card__text {
  font-family: 'VT323', monospace;
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.55;
  color: var(--terminal-green);
  white-space: pre-wrap;
}

/* Code snippet (viewer + editor-rendered pages) */
.comp-code {
  background: #101214;
  border: 3px solid var(--pixel-border);
  box-shadow: 4px 4px 0 var(--bg-dark);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}
.comp-code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  background: rgba(255,255,255,0.06);
  border-bottom: 2px solid rgba(255,255,255,0.08);
}
.comp-code__lang {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.05rem;
  color: #7bd4ff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.comp-code__copy {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.55rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg-mid);
  color: var(--text);
  border: 2px solid var(--pixel-border);
  cursor: pointer;
}
.comp-code__copy:hover {
  background: var(--accent);
  color: var(--bg-dark);
}
.comp-code__pre {
  margin: 0;
  padding: 0.85rem 0.95rem;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #e8e8e8;
  white-space: pre;
  tab-size: 2;
}
.comp-code__pre code { font-family: inherit; }

/* Minimal syntax highlighting tokens */
.tok-comment { color: #6a9955; }
.tok-string { color: #ce9178; }
.tok-number { color: #b5cea8; }
.tok-keyword { color: #569cd6; }
.tok-literal { color: #dcdcaa; }

/* PDF embed */
.comp-pdf {
  width: 100%;
  height: 100%;
  border: 3px solid var(--pixel-border);
  box-shadow: 4px 4px 0 var(--bg-dark);
  background: #0b0b0b;
  overflow: hidden;
}
.comp-pdf__frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #0b0b0b;
}
.page-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border: 3px solid var(--pixel-border);
  box-shadow: 4px 4px 0 var(--bg-dark);
  image-rendering: auto;
}
.page-divider {
  height: 3px;
  background: var(--pixel-border);
  box-shadow: 4px 4px 0 var(--bg-dark);
}
.page-divider--flat {
  box-shadow: none;
}
.page-embed {
  border: 3px solid var(--pixel-border);
  box-shadow: 4px 4px 0 var(--bg-dark);
  background: #000;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
}
.page-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.page-empty {
  background: var(--bg-mid);
  border: 3px solid var(--pixel-border);
  padding: 1.25rem 1.5rem;
  box-shadow: 4px 4px 0 var(--bg-dark);
}


.resume-achievements {
  list-style: none;
  margin: 0;
  padding: 0;
}

.resume-achievements li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.6rem;
  color: var(--terminal-green);
  font-size: 1.3rem;
  line-height: 1.5;
}

.resume-achievements li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.resume-achievements li:last-child {
  margin-bottom: 0;
}

/* --- Cards --- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.75rem;
  margin-top: 1.25rem;
}

.cards--horizontal {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 1.25rem;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.cards--horizontal .card {
  flex: 0 0 auto;
  min-width: 260px;
  max-width: 320px;
}

.horizontal-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.horizontal-scroll-hint__arrow {
  font-family: 'Press Start 2P', cursive;
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
}

.horizontal-scroll-hint__arrow--left {
  margin-right: auto;
}

.horizontal-scroll-hint__arrow--right {
  margin-left: auto;
}

.horizontal-scroll-hint__count {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #7bd4ff;
}

.card {
  background: var(--bg-mid);
  border: 3px solid var(--pixel-border);
  padding: 1.6rem;
  border-radius: 4px;
  box-shadow: 4px 4px 0 var(--bg-dark);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-inner { position: relative; z-index: 1; }

.card--has-bg {
  background: var(--bg-mid);
  background-image: linear-gradient(rgba(13,13,13,0.65), rgba(13,13,13,0.65)), var(--card-bg);
  background-size: cover, var(--card-bg-size, cover);
  background-position: center, var(--card-bg-pos, 50% 50%);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 6px 8px 0 var(--bg-dark);
}

.card-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.75rem;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.card-text {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.55;
  color: var(--terminal-green);
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-link:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--bg-dark);
}

.card-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}
.card-actions .link,
.card-actions .view-3d-btn {
  font-size: 1.1rem;
}
.view-3d-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

/* Point cloud viewer modal */
.pointcloud-modal {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.9);
  display: flex;
  flex-direction: column;
}
.pointcloud-modal .viewer-toolbar {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  background: var(--bg-mid);
  border-bottom: 3px solid var(--pixel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pointcloud-modal .viewer-toolbar .link {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  cursor: pointer;
}
.pointcloud-modal .viewer-canvas-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
}
.pointcloud-modal canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.pointcloud-modal .viewer-loading {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--terminal-green);
  font-size: 1.2rem;
}
.pointcloud-modal .viewer-loading.hidden {
  display: none;
}

/* --- Links --- */
.link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.link:hover {
  border-bottom-color: var(--accent);
}

/* --- Contact list --- */
.contact-list {
  list-style: none;
  padding: 1.35rem 1.6rem;
  margin: 1.25rem 0 0;
  background: var(--bg-mid);
  border: 3px solid var(--pixel-border);
  box-shadow: 4px 4px 0 var(--bg-dark);
  font-size: 1.45rem;
}

.contact-list li { margin-bottom: 0.75rem; }

.contact-list .link--icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-list .icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--accent);
}

.contact-list .icon svg {
  width: 1.5rem;
  height: 1.5rem;
  vertical-align: middle;
}

/* --- Responsive: bubbles reflow on small screens --- */
@media (max-width: 700px) {
  .hero-name {
    font-size: clamp(0.65rem, 3.5vw, 1rem);
  }

  .bubbles {
    position: static;
    transform: none;
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    pointer-events: auto;
  }

  .bubbles .bubble {
    position: static;
    transform: none !important;
  }

  .bubbles .bubble:hover {
    transform: scale(1.05) !important;
  }

  .bubble--about,
  .bubble--tech,
  .bubble--creative,
  .bubble--resume,
  .bubble--contact {
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
  }

  .section { padding: 4rem 1.5rem; }

  .resume-layout { flex-direction: column; align-items: center; gap: 1.5rem; }
  .resume-layout__image { width: clamp(140px, 45vw, 200px); margin-right: 0; margin-bottom: -1.5rem; }
  .resume-layout__content { width: 100%; }
  .resume-skills-grid { grid-template-columns: 1fr; }

  .cards { grid-template-columns: 1fr; }
}

/* --- Contact section: portrait aligned to bottom of social links box, on top of it --- */
.contact-box {
  position: relative;
  margin-top: 1.25rem;
}

.bottom-portrait {
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
}

.bottom-portrait img {
  display: block;
  width: clamp(260px, 42vw, 460px);
  height: auto;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}
