:root {
  --bg: #080b12;
  --bg-soft: #101520;
  --card: rgba(19, 25, 38, 0.72);
  --text: #f4f7fb;
  --muted: #99a3b5;
  --line: rgba(255,255,255,.1);
  --accent: #7c5cff;
  --accent-2: #25d6c8;
  --shadow: 0 24px 80px rgba(0,0,0,.35);
}

body.light {
  --bg: #edf2f8;
  --bg-soft: #ffffff;
  --card: rgba(255,255,255,.75);
  --text: #111827;
  --muted: #5d6675;
  --line: rgba(17,24,39,.1);
  --shadow: 0 24px 70px rgba(29,42,68,.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 15%, rgba(124,92,255,.13), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(37,214,200,.09), transparent 26%),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background .35s ease, color .35s ease;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { color: inherit; }

/* Standardní vyhlazené převzorkování obrázků při zmenšování. */
img {
  image-rendering: auto;
  -ms-interpolation-mode: bicubic;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .035;
  z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(50px);
  background: radial-gradient(circle, rgba(124,92,255,.12), transparent 65%);
  transform: translate(-50%, -50%);
}

.site-header {
  width: min(1180px, calc(100% - 36px));
  height: 72px;
  margin: 18px auto 0;
  padding: 0 18px;
  position: sticky;
  top: 14px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 28px;
  background: rgba(9, 13, 22, .7);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}
body.light .site-header { background: rgba(255,255,255,.72); }

.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.14);
}
.brand-logo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.nav { margin-left: auto; display: flex; gap: 24px; }
.nav a { color: var(--muted); font-size: 14px; font-weight: 600; transition: .25s; }
.nav a:hover { color: var(--text); }
.theme-button, .menu-button {
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px;
  background: transparent; cursor: pointer;
}
.menu-button { display: none; padding: 10px; }
.menu-button span { display:block; height:2px; margin:4px 0; background: currentColor; }

.section { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 120px 0; }
.hero { min-height: calc(100vh - 90px); display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 70px; }
.eyebrow { margin: 0 0 18px; color: var(--accent-2); font-size: 12px; letter-spacing: .18em; font-weight: 800; }
h1, h2, h3 { font-family: "Space Grotesk", sans-serif; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(52px, 7.4vw, 96px); letter-spacing: -.055em; }
h2 { font-size: clamp(38px, 5vw, 64px); letter-spacing: -.045em; max-width: 800px; }
h3 { font-size: 26px; }
.gradient-text { background: linear-gradient(100deg, var(--accent), #b877ff 45%, var(--accent-2)); -webkit-background-clip:text; color:transparent; }
.hero-text { max-width: 680px; color: var(--muted); font-size: 18px; margin: 28px 0 0; }
.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.button { min-height: 50px; padding: 0 22px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; border: 1px solid transparent; cursor: pointer; transition: transform .25s, box-shadow .25s, background .25s; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: #fff; background: linear-gradient(135deg, var(--accent), #a55cff); box-shadow: 0 12px 35px rgba(124,92,255,.3); }
.button-secondary { background: var(--card); border-color: var(--line); }
.hero-status { display:flex; align-items:center; gap:10px; margin-top:28px; color:var(--muted); font-size:14px; }
.status-dot { width:9px; height:9px; border-radius:50%; background:#4ade80; box-shadow:0 0 0 7px rgba(74,222,128,.09); }

.hero-visual { min-height: 560px; position: relative; display: grid; place-items: center; }
.orb { position:absolute; border-radius:50%; filter:blur(6px); }
.orb-one { width:340px;height:340px;background:rgba(124,92,255,.25);top:14%;left:10%; }
.orb-two { width:270px;height:270px;background:rgba(37,214,200,.15);right:8%;bottom:12%; }
.visual-card { position: relative; z-index:2; width:min(500px, 100%); background:rgba(12,17,28,.88); border:1px solid rgba(255,255,255,.12); border-radius:22px; box-shadow:0 35px 100px rgba(0,0,0,.5); transform:rotate(-2deg); overflow:hidden; }
body.light .visual-card { background:rgba(20,26,36,.96); color:#fff; }
.terminal-header { height:48px; display:flex; align-items:center; gap:8px; padding:0 18px; border-bottom:1px solid rgba(255,255,255,.08); }
.terminal-header span { width:10px;height:10px;border-radius:50%;background:#ff6b6b; }
.terminal-header span:nth-child(2){background:#ffd166}.terminal-header span:nth-child(3){background:#4ade80}
pre { margin:0; padding:28px; overflow:auto; font-size:14px; line-height:1.75; }
.code-muted{color:#667085}.code-key{color:#c084fc}.code-string{color:#5eead4}
.floating-tag { position:absolute; z-index:3; padding:10px 14px; border-radius:999px; background:var(--card); border:1px solid var(--line); backdrop-filter:blur(12px); font-size:12px; font-weight:800; box-shadow:var(--shadow); }
.tag-one{left:0;top:18%}.tag-two{right:0;top:29%}.tag-three{right:7%;bottom:15%}

.section-heading { margin-bottom: 48px; }
.section-grid { display:grid; grid-template-columns: 1fr 1fr; gap:28px; }
.section-grid .section-heading { grid-column:1/-1; }
.glass { background:var(--card); border:1px solid var(--line); border-radius:24px; backdrop-filter:blur(18px); box-shadow:var(--shadow); }
.about-card { padding:34px; color:var(--muted); font-size:17px; }
.about-card p:first-child { margin-top:0; }
.about-card p:last-child { margin-bottom:0; }
.stats-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.stat-card { padding:24px 18px; border:1px solid var(--line); border-radius:20px; background:linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015)); }
.stat-card strong { display:block; overflow-wrap:anywhere; font-family:"Space Grotesk"; font-size:42px; letter-spacing:-.05em; }
.stat-card span { display:block; margin-top:10px; color:var(--muted); font-size:13px; }

.project-filters { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:30px; }
.filter-button { padding:10px 16px; border-radius:999px; border:1px solid var(--line); background:transparent; color:var(--muted); cursor:pointer; }
.filter-button.active { background:var(--text); color:var(--bg); }
.project-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:24px; }
.project-card { overflow:hidden; border:1px solid var(--line); border-radius:24px; background:var(--card); transition:transform .3s,border-color .3s,opacity .3s; }
.project-card:hover { transform:translateY(-6px); border-color:rgba(124,92,255,.5); }
.project-card.hidden { display:none; }
.project-visual { height:240px; display:grid; place-items:center; position:relative; overflow:hidden; }
.project-visual::before,.project-visual::after { content:""; position:absolute; border-radius:50%; filter:blur(12px); }
.project-visual span { position:relative; z-index:2; font-family:"Space Grotesk"; font-weight:800; letter-spacing:.16em; color:white; text-shadow:0 4px 30px rgba(0,0,0,.3); }
.visual-urax { background:linear-gradient(135deg,#1d2440,#5a46d6); }.visual-urax::before{width:220px;height:220px;background:#22d3ee55;left:8%;top:12%}
.visual-skid { background:linear-gradient(135deg,#102118,#316c45); }.visual-skid::before{width:260px;height:260px;background:#84cc1650;right:4%;bottom:-20%}
.visual-mechs { background:linear-gradient(135deg,#252834,#8a3246); }.visual-mechs::before{width:240px;height:240px;background:#ef444466;left:12%;top:8%}
.visual-portals { background:linear-gradient(135deg,#271b39,#4f78bd); }.visual-portals::before{width:210px;height:210px;background:#c084fc55;right:10%;top:10%}
.project-content { padding:28px; }
.project-meta { display:flex; justify-content:space-between; color:var(--muted); font-size:12px; margin-bottom:15px; text-transform:uppercase; letter-spacing:.08em; }
.project-content p { color:var(--muted); }
.tags { display:flex; gap:8px; flex-wrap:wrap; margin-top:20px; }
.tags span { padding:7px 10px; border-radius:8px; background:rgba(124,92,255,.1); color:#b8a8ff; font-size:12px; font-weight:700; }

.more-projects { margin-top:58px; }
.more-projects.without-main-projects { margin-top:0; }
.more-projects-heading { display:flex; justify-content:space-between; align-items:end; gap:24px; margin-bottom:22px; }
.more-projects-heading .eyebrow { margin:0 0 6px; }
.more-projects-heading h3 { font-size:24px; }
.mini-project-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.mini-project-card { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:18px; background:var(--card); cursor:pointer; transition:transform .3s,border-color .3s,opacity .3s; }
.mini-project-card:hover { transform:translateY(-5px); border-color:rgba(124,92,255,.5); }
.mini-project-card:focus-visible,.project-card:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
.mini-project-card.hidden,.filterable-project.hidden { display:none; }
.mini-project-visual { height:118px; display:grid; place-items:center; position:relative; overflow:hidden; }
.mini-project-visual::before { content:""; position:absolute; width:115px; height:115px; border-radius:50%; filter:blur(10px); opacity:.8; }
.mini-project-visual span { position:relative; z-index:2; font-family:"Space Grotesk"; font-size:22px; font-weight:800; letter-spacing:.12em; color:#fff; text-shadow:0 4px 24px rgba(0,0,0,.35); }
.mini-project-copy { padding:16px 17px 18px; }
.mini-project-copy strong { display:block; font-size:15px; }
.mini-project-copy small { display:block; margin-top:6px; color:var(--muted); font-size:12px; line-height:1.45; }
.mini-magic { background:linear-gradient(135deg,#261843,#8056c8); }
.mini-cyber { background:linear-gradient(135deg,#071b2e,#087db0); }
.mini-terra { background:linear-gradient(135deg,#25321f,#7a9348); }
.mini-dark { background:linear-gradient(135deg,#171820,#5e253b); }
.mini-orbital { background:linear-gradient(135deg,#172542,#487fc9); }
.mini-toxic { background:linear-gradient(135deg,#283219,#7da928); }
.mini-prism { background:linear-gradient(135deg,#33264d,#8b69ca); }
.mini-meshy { background:linear-gradient(135deg,#343844,#747d91); }
.project-generated-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  image-rendering: auto;
  backface-visibility: hidden;
  transform: translateZ(0);
  z-index: 1;
}
.project-visual .project-generated-cover + span,.mini-project-visual .project-generated-cover + span { z-index:2; }
.project-visual.has-cover > span,.mini-project-visual.has-cover > span { display:none; }

.skills-layout { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.skill-panel { padding:32px; }
.skill-list { margin-top:25px; display:grid; gap:0; }
.skill-list div { padding:18px 0; display:flex; justify-content:space-between; gap:20px; border-bottom:1px solid var(--line); }
.skill-list div:last-child { border-bottom:0; }
.skill-list span { font-weight:700; }
.skill-list em { color:var(--muted); font-size:13px; font-style:normal; text-align:right; }

.contact-card { padding:50px; border-radius:30px; background:linear-gradient(135deg,rgba(124,92,255,.14),rgba(37,214,200,.07)); border:1px solid var(--line); display:grid; grid-template-columns:.85fr 1.15fr; gap:60px; }
.contact-card p { color:var(--muted); }
.contact-form { display:grid; gap:15px; }
.contact-form label span { display:block; font-size:12px; font-weight:700; margin-bottom:7px; }
.contact-form input,.contact-form textarea { width:100%; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.035); color:var(--text); padding:14px 15px; outline:none; }
.contact-form input:focus,.contact-form textarea:focus { border-color:var(--accent); box-shadow:0 0 0 4px rgba(124,92,255,.09); }
.form-note { font-size:12px; margin:0; }

.footer { width:min(1180px,calc(100% - 36px)); margin:0 auto; padding:34px 0 46px; border-top:1px solid var(--line); display:grid; grid-template-columns:1fr auto; gap:16px; color:var(--muted); font-size:13px; }
.footer strong,.footer span { display:block; }.footer strong{color:var(--text);font-size:16px}
.footer-links { display:flex; gap:18px; align-items:center; }.footer p{grid-column:1/-1;margin:0}

.reveal { opacity:0; transform:translateY(24px); transition:opacity .7s ease,transform .7s ease; }
.reveal.visible { opacity:1; transform:none; }

@media (max-width: 900px) {
  .site-header { width:calc(100% - 24px); }
  .nav { position:absolute; top:80px; left:0; right:0; padding:18px; border:1px solid var(--line); border-radius:16px; background:var(--bg-soft); display:none; flex-direction:column; }
  .nav.open { display:flex; }
  .menu-button { display:block; margin-left:auto; }
  .theme-button { order:3; }
  .hero { grid-template-columns:1fr; padding-top:80px; }
  .hero-visual { min-height:430px; }
  .section-grid,.skills-layout,.contact-card { grid-template-columns:1fr; }
  .project-grid { grid-template-columns:1fr; }
  .mini-project-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}


@media (max-width: 620px) {
  .section { width:min(100% - 24px,1180px); padding:84px 0; }
  h1 { font-size:48px; }
  .hero-text { font-size:16px; }
  .stats-grid { grid-template-columns:1fr; }
  .hero-visual { min-height:360px; }
  .floating-tag { font-size:10px; }
  .tag-one { left:2%; }.tag-two{right:0}.tag-three{right:2%}
  .contact-card { padding:28px; gap:30px; }
  .skill-list div { flex-direction:column; gap:5px; }
  .skill-list em { text-align:left; }
  .footer { grid-template-columns:1fr; }.footer-links{flex-wrap:wrap}
  .more-projects-heading { align-items:flex-start; flex-direction:column; gap:4px; }
}


/* Detail projektu */
.project-card[data-project] { cursor: pointer; }
.project-card[data-project]:focus-visible {
  outline: 3px solid rgba(124,92,255,.7);
  outline-offset: 4px;
}
body.modal-open { overflow: hidden; }
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s ease, visibility .25s ease;
}
.project-modal.open { visibility: visible; opacity: 1; }
.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3,6,12,.76);
  backdrop-filter: blur(10px);
}
.project-modal-panel {
  position: relative;
  width: min(900px, 100%);
  max-height: calc(100vh - 48px);
  max-height: min(94dvh, calc(100dvh - 48px));
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--bg-soft);
  box-shadow: 0 28px 90px rgba(0,0,0,.48);
  transform: translateY(18px) scale(.98);
  transition: transform .25s ease;
}
.project-modal.open .project-modal-panel { transform: none; }
.project-modal-panel:focus { outline: none; }

.project-modal-header {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 34px 24px 44px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-soft) 94%, transparent);
  backdrop-filter: blur(18px);
}

.project-modal-heading {
  min-width: 0;
  padding-right: 12px;
}

.project-modal-heading .eyebrow {
  margin-bottom: 10px;
}

.project-modal-heading h2 {
  max-width: 720px;
}

.project-modal-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 44px 44px;
  scrollbar-gutter: stable;
}

.project-modal-close {
  position: static;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.project-modal-close:hover { background: rgba(255,255,255,.11); transform: rotate(6deg); }
.project-modal-copy { padding-right: 0; }

.project-modal-banner {
  width: 100%;
  height: clamp(150px, 24vw, 230px);
  margin: 4px 0 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.025);
}
.project-modal-banner[hidden] { display: none; }
.project-modal-banner img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  image-rendering: auto;
  backface-visibility: hidden;
  transform: translateZ(0);
}
.project-modal-copy > p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
  white-space: pre-line;
}
.project-modal-link { display: inline-flex; margin-top: 12px; }
.project-modal-link[hidden] { display: none; }
 .project-attachments { margin-top: 26px; }
.project-attachments[hidden] { display: none; }
.project-attachments h3,
.project-gallery h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.project-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 760px;
}
.project-attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  color: var(--text);
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.project-attachment:hover {
  border-color: rgba(124,92,255,.55);
  background: rgba(124,92,255,.07);
  color: #c7bcff;
}
.project-attachment-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  color: #b8a8ff;
}
.project-attachment-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.project-attachment-copy {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.project-attachment-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.project-attachment-copy small {
  display: block;
  flex: 0 0 auto;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.project-attachment-arrow { display: none; }
.project-gallery { margin-top: 28px; }
.project-gallery[hidden] { display: none; }
.gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.gallery-thumbnail {
  aspect-ratio: 16 / 10;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
  cursor: zoom-in;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.gallery-thumbnail:hover {
  transform: translateY(-3px);
  border-color: rgba(124,92,255,.6);
  box-shadow: 0 12px 28px rgba(0,0,0,.24);
}
.gallery-thumbnail:focus-visible {
  outline: 3px solid rgba(124,92,255,.7);
  outline-offset: 3px;
}
.gallery-thumbnail img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  image-rendering: auto;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .22s ease, visibility .22s ease;
}
.image-viewer.open { visibility: visible; opacity: 1; }
.image-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1,3,8,.9);
  backdrop-filter: blur(12px);
}
.image-viewer-panel {
  position: relative;
  width: min(1180px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 56px 70px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(8,11,18,.96);
  box-shadow: 0 30px 100px rgba(0,0,0,.65);
  transform: scale(.98);
  transition: transform .22s ease;
}
.image-viewer.open .image-viewer-panel { transform: none; }
.image-viewer-panel:focus { outline: none; }
.image-viewer-stage {
  display: grid;
  place-items: center;
  height: min(72vh, 760px);
  min-height: 0;
  min-width: 0;
  flex: 1 1 auto;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  overflow: hidden;
  border-radius: 16px;
  background: rgba(0,0,0,.3);
  overscroll-behavior: contain;
  cursor: zoom-in;
  user-select: none;
  touch-action: none;
}
.image-viewer-stage.actual-size {
  position: relative;
  display: block;
  overflow: hidden;
  cursor: grab;
}
.image-viewer-stage.dragging { cursor: grabbing; }
.image-viewer-stage img {
  display: block;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: scale-down;
  object-position: center center;
  image-rendering: auto;
  backface-visibility: hidden;
  pointer-events: none;
}
.image-viewer-stage.actual-size img {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.image-viewer-close {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  color: white;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.image-viewer-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: rgba(8,11,18,.82);
  display: grid;
  place-items: center;
  padding: 0;
  color: white;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
}
.image-viewer-arrow svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.image-viewer-prev { left: 12px; }
.image-viewer-next { right: 12px; }
.image-viewer-arrow:disabled { display: none; }

.image-viewer-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 34px;
  flex: 0 0 auto;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}
.image-viewer-dots {
  grid-column: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  max-height: 44px;
  overflow-y: auto;
}
.image-viewer-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
}
.image-viewer-dot.active { background: var(--accent); transform: scale(1.2); }

@media (max-width: 620px) {
  .project-modal { padding: 12px; }
  .project-modal-panel { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border-radius: 22px; }
  .project-modal-header { padding: 24px 18px 18px 22px; gap: 14px; }
  .project-modal-heading h2 { font-size: clamp(30px, 10vw, 42px); }
  .project-modal-scroll { padding: 22px 22px 26px; }
  .project-modal-copy { padding-right: 0; }
  .project-modal-copy > p:not(.eyebrow) { font-size: 15px; }
  .project-modal-banner { height: 145px; border-radius: 14px; }
  .gallery-thumbnails { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .gallery-thumbnail { border-radius: 11px; }
  .image-viewer { padding: 8px; }
  .image-viewer-panel { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); padding: 50px 42px 18px; border-radius: 18px; }
  .image-viewer-stage { height: 72vh; }
  .image-viewer-arrow { width: 38px; height: 38px; font-size: 26px; }
  .image-viewer-prev { left: 4px; }
  .image-viewer-next { right: 4px; }
}

.portfolio-intro{max-width:760px;margin:14px 0 0;color:var(--muted);white-space:pre-line;line-height:1.6}.portfolio-intro[hidden]{display:none}

/* V0.3.5 – original image and predictable viewport constraints. */
.image-viewer-original { position:absolute; top:13px; left:16px; z-index:3; display:inline-flex; align-items:center; min-height:36px; padding:6px 12px; border:1px solid rgba(255,255,255,.22); border-radius:10px; color:#fff; background:rgba(255,255,255,.07); text-decoration:none; font-size:13px; }
.image-viewer-original:hover,.image-viewer-original:focus-visible { border-color:var(--accent); }
.gallery-thumbnail { min-width:0; min-height:0; }
.contact-card > div > p:not(.eyebrow) { white-space:pre-line; }

/* 0.3.7 — compact card type and project detail metadata */
.mini-project-type { display:block; margin-bottom:5px; color:#b8a8ff; font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; overflow-wrap:anywhere; }
.project-modal-meta { margin:0 0 20px; padding:0 0 15px; border-bottom:1px solid var(--line); }
.project-modal-banner:not([hidden]) + .project-modal-meta { margin-top:-9px; }
.project-modal-meta-line { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 16px; font-size:13px; }
.project-modal-card-type { color:#b8a8ff; font-weight:700; overflow-wrap:anywhere; min-width:0; }
.project-modal-card-year { margin-left:auto; color:var(--muted); text-align:right; overflow-wrap:anywhere; min-width:0; }
.project-modal-tags { margin-top:10px; gap:6px; }
.project-modal-meta-line[hidden] + .project-modal-tags { margin-top:0; }
.project-modal-tags span { padding:5px 9px; font-size:11px; max-width:100%; overflow-wrap:anywhere; }
.project-modal-meta[hidden], .project-modal-meta [hidden], .project-modal-heading .eyebrow[hidden] { display:none; }
body.light .mini-project-type, body.light .project-modal-card-type, body.light .project-modal-tags span { color:#6043c0; }

/* 0.3.9 — rich text inside existing content areas */
.about-paragraph+.about-paragraph{margin-top:1em}
.contact-text{color:var(--muted);margin:1em 0;line-height:1.6}
.project-card-description{color:var(--muted);margin:1em 0;line-height:inherit}
.mini-card-description{margin-top:6px;color:var(--muted);font-size:12px;line-height:1.45}
.mini-project-copy .jf-md strong{display:inline;font-size:inherit}
.mini-project-copy .jf-md small{display:inline;margin:0;color:inherit;font-size:.83em;line-height:inherit}
.mini-card-description img,.project-card-description img{max-height:200px}
#projectModalText{max-width:760px;color:var(--muted);font-size:17px;line-height:1.75;margin:1em 0}
@media(max-width:700px){#projectModalText{font-size:15px}}
