/* =========================================================
   components.css — Reusable UI pieces
   ========================================================= */

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 800;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-sm);
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--color-accent);
  color: #0a0a0c;
}

.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-2px); }

.btn-secondary {
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-secondary:hover { border-color: var(--color-accent); transform: translateY(-2px); }

/* ---------- Command-prompt service buttons ---------- */
@keyframes cmd-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.cmd-cursor {
  animation: cmd-blink 1s step-end infinite;
}

.cmd-btn {
  display: block;
  width: 100%;
  padding: 0.45rem 0.75rem;
  background: #0c0c0c;
  border: 1px solid #3a3a3a;
  border-radius: 2px;
  color: #c8c8c8;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 0.72rem;
  text-align: left;
  cursor: pointer;
  letter-spacing: 0.03em;
  direction: ltr;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.cmd-btn:hover {
  color: #00e000;
  border-color: #00b300;
}
.cmd-btn:active { background: #111; }

/* CMD wrap — anchor for the absolutely-positioned output */
.cmd-wrap {
  position: relative;
  margin-top: var(--space-2);
}

/* CMD output (floats over content below, doesn't expand the hero) */
.cmd-output {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 200;
  background: #111;
  border: 1px solid #444;
  border-top: none;
  border-radius: 0 0 2px 2px;
  padding: 4px 0;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 0.78rem;
  color: #d8d8d8;
  direction: ltr;
  text-align: left;
  max-height: 260px;
  overflow-y: auto;
  /* Keep touch scrolling inside the list — don't chain to the page when the
     user reaches the top/bottom of the credits (mobile scroll-chaining). */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.cmd-output[hidden] { display: none; }

.cmd-entry {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 6px 10px;
  border-bottom: 1px solid #222;
}
.cmd-entry:last-child { border-bottom: none; }

.cmd-entry-content {
  flex: 1;
  min-width: 0;
}

.cmd-entry-header {
  display: flex;
  align-items: baseline;
  gap: 5px;
  line-height: 1.4;
}
.cmd-entry-header.has-tracks { cursor: pointer; }
.cmd-entry-header.has-tracks:hover .cmd-name { color: #00e000; }

.cmd-name {
  color: #fff;
  word-break: break-word;
  position: relative;
}
.cmd-name::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: #00cc00;
  transition: width 0.22s ease;
}
.cmd-entry:hover .cmd-name::after { width: 100%; }

.cmd-meta {
  color: #999;
  font-size: 0.72rem;
  line-height: 1.5;
}

.cmd-tracks { padding-left: 15px; }

.cmd-track {
  color: #aaa;
  font-size: 0.72rem;
  line-height: 1.6;
}

.cmd-entry:hover .cmd-link {
  color: #00e000;
}

/* ---------- Hero/Services wrapper ---------- */
.hero-services-wrapper {
  position: relative;
}

/* Background image on pseudo-element — avoids iOS Safari fixed-attachment positioning bug */
.hero-services-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/backgrounds/bg_intro.jpg");
  background-image: image-set(url("../images/backgrounds/bg_intro.webp") type("image/webp"), url("../images/backgrounds/bg_intro.jpg") type("image/jpeg"));
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: 0;
}

/* Dark overlay so text stays readable */
.hero-services-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, 0.22);
  z-index: 1;
}

.hero-services-wrapper > * {
  position: relative;
  z-index: 2;
}

.hero-services-inner {
  padding-block: var(--space-5) var(--space-4);
  background: rgba(200, 200, 210, 0.08);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  text-align: center;
}

.hero-eyebrow {
  color: var(--color-accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-xs);
  margin-bottom: var(--space-1);
}

.hero-text {
  text-align: center;
  width: 100%;
}

.hero-tagline {
  font-size: var(--fs-md);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--space-3);
}

.hero-media-placeholder {
  position: absolute;
  inset-inline-end: -10%;
  top: 50%;
  transform: translateY(-50%);
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
  text-align: center;
  padding: var(--space-2);
  z-index: 1;
}

/* ---------- Services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: 25vw;
  direction: ltr;
  width: 100%;
  padding: 0;
}

.service-card {
  padding: var(--space-3);
  text-align: center;
  cursor: default;
  display: flex;
  flex-direction: column;
}

/* Grid cells stretch to equal height, so pinning the action to the bottom
   keeps all three buttons aligned even when a description wraps to 2 lines. */
.service-card > .cmd-wrap,
.service-card > .cmd-btn {
  margin-top: auto;
}

@keyframes service-streak-text {
  0%  { background-position: 0% 120%; animation-timing-function: step-start; }
  60% { background-position: 0% 120%; animation-timing-function: steps(8, end); }
  80% { background-position: 0% -10%; animation-timing-function: step-start; }
  100%{ background-position: 0% -10%; }
}

.service-card h3 {
  position: relative;
  overflow: hidden;
}

.service-card h3 span {
  background-color: var(--color-text);
  background-image: linear-gradient(
    180deg,
    transparent            0%,
    transparent            48%,
    #909090                50%,
    #909090                52%,
    transparent            52%,
    transparent            54%,
    #909090                54%,
    #909090                56%,
    transparent            56%,
    transparent            58%,
    #909090                58%,
    #909090                60%,
    transparent            62%,
    transparent            100%
  );
  background-size: 100% 200%;
  background-position: 0% 120%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: service-streak-text 8s linear infinite;
}

.services-grid .service-card:nth-child(2) h3 span { animation-delay: -2.7s; }
.services-grid .service-card:nth-child(3) h3 span { animation-delay: -5.4s; }

.service-card:hover h3 span,
.service-card.arrow-swipe h3 span {
  animation-name: none;
  background-position: 0% 120%;
}


/* ---------- Portfolio ---------- */
.portfolio {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.portfolio::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/backgrounds/bg_port.jpg");
  background-image: image-set(url("../images/backgrounds/bg_port.webp") type("image/webp"), url("../images/backgrounds/bg_port.jpg") type("image/jpeg"));
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: 0;
}

.portfolio .container {
  position: relative;
  z-index: 1;
}
.portfolio-folder {
  display: flex;
  flex-direction: column;
  width: 100%;
}

@keyframes folderPress {
  0%   { transform: scale(1);    }
  35%  { transform: scale(1.02); }
  100% { transform: scale(1);    }
}


.portfolio-folder.is-switching { animation: folderPress 0.3s ease-out; }

.portfolio-folder-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  margin-bottom: -4px;
  z-index: 2;
}

.portfolio-filters {
  position: relative;
  width: 590px;
  height: 62px;
  align-self: flex-start;
}


.custom-note {
  position: absolute;
  width: 240px;
  min-height: 360px;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.22),
    0 8px 20px rgba(0,0,0,0.18),
    0 22px 44px rgba(0,0,0,0.12);
}

.custom-note::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("../images/ui/note-paper.png") center / cover no-repeat;
  pointer-events: none;
  z-index: 0;
  filter: hue-rotate(var(--note-hue, 55deg)) saturate(var(--note-sat, 0.9));
}

.custom-note-header {
  position: relative;
  z-index: 1;
  height: 26px;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 6px;
  flex-shrink: 0;
  touch-action: none;
}

.custom-note-header:active { cursor: grabbing; }

.custom-note-close {
  background: none;
  border: none;
  color: rgba(0,0,0,0.45);
  font-size: 1rem;
  line-height: 1;
  padding: 2px 5px;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
}

.custom-note-close:hover {
  background: rgba(0,0,0,0.12);
  color: rgba(0,0,0,0.8);
}

.custom-note-body {
  position: relative;
  z-index: 1;
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  padding: 2px 12px 12px;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 13px;
  color: rgba(0,0,0,0.75);
  cursor: text;
  min-height: 325px;
}

.reorder-btn {
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem 0.35rem 0.65rem;
  background: #2a2a40;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  margin-bottom: 0;
  align-self: flex-end;
}

.reorder-btn.is-visible {
  display: inline-flex;
}

.reorder-btn:hover {
  background: #3a3a58;
  color: rgba(255, 255, 255, 0.9);
}

.reorder-icon {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}

.filter-btn {
  position: absolute;
  top: 0;
  width: 220px;
  height: 62px;
  border: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-weight: 700;
  font-size: var(--fs-lg);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  color: rgba(255,255,255,0.4);
}

/* tabs fixed positions + graduated depth shading: Music darkest → Photos brightest */
.filter-btn:nth-child(1) { inset-inline-start: 0;     background: #1e1e30; }
.filter-btn:nth-child(2) { inset-inline-start: 185px; background: #2a2a40; }
.filter-btn:nth-child(3) { inset-inline-start: 370px; background: #3c3c58; }

.filter-btn.is-active {
  background: var(--color-surface);
  color: #cfcb7e;
}

.filter-btn:hover:not(.is-active) {
  filter: brightness(1.15);
  color: rgba(255,255,255,0.65);
}

.portfolio-inner {
  background: var(--color-surface);
  padding: var(--space-6) 8rem;
  /* top fully flat — both tab positions connect seamlessly */
  border-start-start-radius: 0;
  border-start-end-radius: 0;
  border-end-start-radius: var(--radius-lg);
  border-end-end-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  z-index: 1;
  width: 100%;
  box-sizing: border-box;
  box-shadow: none;
}

.portfolio-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  direction: ltr;
  padding: var(--space-3) 0;
}

.portfolio-grid[hidden] { display: none !important; }

.portfolio-card {
  font-family: var(--font-base);
  flex: 0 1 300px;
  display: block;
  border-radius: 2px;
  padding: var(--space-4);
  background: transparent;
  direction: ltr;
  text-align: center;
  touch-action: none;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.22),
    0 8px 20px rgba(0,0,0,0.18),
    0 22px 44px rgba(0,0,0,0.12);
  transform: rotate(-3deg);
  transition: transform 0.25s ease, translate 0.2s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.portfolio-card:hover:not(.is-lifted) { translate: 0 -6px; }

.portfolio-card:active { cursor: grabbing; }

/* cover photo and links keep their own affordance */
.portfolio-card picture,
.portfolio-card .music-link { cursor: pointer; }

.portfolio-card-tag { touch-action: none; }

.portfolio-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("../images/ui/note-paper.png") center / cover no-repeat;
  pointer-events: none;
  z-index: 0;
  filter: hue-rotate(var(--note-hue, 0deg)) saturate(var(--note-sat, 1));
}

.portfolio-card > * { position: relative; z-index: 1; }

.portfolio-card:nth-child(2) { transform: rotate(4deg) translateY(6px); }
.portfolio-card:nth-child(3) { transform: rotate(-6deg) translateY(4px); }

.portfolio-card.is-lifted {
  transform: rotate(0deg) translateY(-10px) !important;
  box-shadow:
    0 4px 8px rgba(0,0,0,0.20),
    0 16px 36px rgba(0,0,0,0.22),
    0 32px 60px rgba(0,0,0,0.14);
  z-index: 5;
}

/* picture wrapper inside cards — block so it doesn't add inline baseline gap */
.portfolio-card picture { display: block; }

.portfolio-card img {
  /* Reserve square space up-front so lazy-loaded covers don't shift the page
     as they load — otherwise the growth retargets in-flight smooth scrolls
     (e.g. the Clippy → contact jump never reaches the bottom). */
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.portfolio-card img:hover {
  transform: scale(1.03);
  opacity: 0.9;
}

.portfolio-card-tag {
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: 800;
  color: rgba(0,0,0,0.60);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
}

.portfolio-card p { margin: 0; font-size: var(--fs-xs); text-align: center; color: rgba(0,0,0,0.75); }

.portfolio-card .music-link {
  background: rgba(0,0,0,0.15);
  border-radius: var(--radius-sm);
  padding: 0.4rem;
}
 
.music-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  margin-top: var(--space-3);
  justify-content: center;
  overflow: visible;
  direction: ltr;
}

.music-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  padding: 0.4rem;
}

.music-link {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.music-link:hover {
  border: none;
  transform: scale(1.2);
  opacity: 0.8;
}

.music-link .music-logo {
  filter: none;
}

.music-link svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

.music-link .music-logo {
  height: 1.7rem;
  width: 1.7rem;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.music-logo-pixel {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  height: 40px !important;
  width: 10px ;
}

.music-link-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.video-card {
  font-family: var(--font-base);
  flex: 0 1 320px;
  background: transparent;
  border: none;
  border-radius: 2px;
  overflow: hidden;
  text-align: center;
  transform: rotate(-2deg);
  transition: transform 0.25s ease, translate 0.2s ease, box-shadow 0.25s ease;
  position: relative;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.22),
    0 8px 20px rgba(0,0,0,0.18),
    0 22px 44px rgba(0,0,0,0.12);
  cursor: grab;
  direction: ltr;
  user-select: none;
  -webkit-user-select: none;
}

.video-card:active { cursor: grabbing; }
.video-card:hover:not(.is-lifted) { translate: 0 -6px; }

.video-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("../images/ui/note-paper.png") center / cover no-repeat;
  pointer-events: none;
  z-index: 0;
  filter: hue-rotate(var(--note-hue, 0deg)) saturate(var(--note-sat, 1));
}

.video-card > * { position: relative; z-index: 1; }

.video-card:nth-child(2) { transform: rotate(1.5deg) translateY(5px); }
.video-card:nth-child(3) { transform: rotate(-3deg) translateY(2px); }

.video-card.is-lifted {
  transform: rotate(0deg) translateY(-10px) !important;
  box-shadow:
    0 4px 8px rgba(0,0,0,0.20),
    0 16px 36px rgba(0,0,0,0.22),
    0 32px 60px rgba(0,0,0,0.14);
  z-index: 5;
}

.video-embed { position: relative; aspect-ratio: 16 / 9; }

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-card p { position: relative; z-index: 1; padding: var(--space-1) var(--space-2); margin: 0; font-size: 0.7rem; color: rgba(0,0,0,0.72); font-weight: 600; }

.portfolio-inner:has(.portfolio-grid[data-category="photos"]:not([hidden])) {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* photos grid is absolutely positioned to fill the locked folder height exactly,
   so the folder never resizes between tabs. Absolute inset:0 gives a definite
   height (from inner's locked min-height) that the grid's 1fr rows resolve
   against. 2 cols × 3 rows keeps cells landscape-ish (~4:3) so cover crops any
   photo ratio (2:3, 9:16, landscape) only mildly — see portfolio-filter.js */
.portfolio-grid[data-category="photos"] {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

.portfolio-grid[data-category="photos"] .gallery-track-wrapper {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: visible;
  cursor: default;
}

.portfolio-grid[data-category="photos"] .gallery-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
  width: 100%;
  height: 100%;
  will-change: unset;
}

.portfolio-grid[data-category="photos"] .gallery-track .photo-slot {
  display: block;
  min-height: 0;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.6s ease;
}

.portfolio-grid[data-category="photos"] .gallery-track .photo-slot picture {
  display: block;
  width: 100%;
  height: 100%;
}

.portfolio-grid[data-category="photos"] .gallery-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
  transition: transform 0.35s ease;
}

.portfolio-grid[data-category="photos"] .gallery-track .photo-slot:hover img {
  transform: scale(1.06) translateY(-4px);
}

/* ---------- EXIF Windows (XP Luna style) ---------- */
.exif-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.25);
  direction: ltr;
}
.exif-backdrop[hidden] { display: none; }

/* Shared XP window shell */
.xp-window {
  position: fixed;
  z-index: 2001;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.28);
  direction: ltr;
}
.xp-window[hidden] { display: none; }


.exif-photo-body {
  flex: 1;
  overflow: hidden;
  background: #000;
  min-height: 0;
  display: flex;
}
.exif-photo-body img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ── XP Luna window ── */
.xp-dialog {
  flex: 0 0 340px;
  width: 340px;
  height: 360px;
  display: flex;
  flex-direction: column;
  font-family: "Tahoma", "MS Sans Serif", sans-serif;
  font-size: 11px;
  color: #000;
  /* outer chrome */
  border: 1px solid #0a246a;
  border-radius: 6px 6px 4px 4px;
  box-shadow:
    1px 1px 0 #6ca0dc inset,
    -1px 0 0 #6ca0dc inset,
    0 -1px 0 #6ca0dc inset,
    0 4px 18px rgba(0,0,0,0.28);
  overflow: hidden;
}

/* Title bar */
.xp-titlebar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 5px 4px 7px;
  flex-shrink: 0;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  background:
    linear-gradient(180deg,
      #4d90e0 0%, #2160c4 8%,
      #1852b8 40%, #1248a8 60%,
      #1248a8 70%, #3a78d8 90%,
      #2060c8 100%);
  border-radius: 5px 5px 0 0;
}

.xp-title-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  min-width: 28px;
  background: transparent;
  border-radius: 2px;
  object-fit: fill;
  display: block;
  transform: scale(0.98);
}

.xp-title {
  flex: 1;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  font-family: var(--font-en);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xp-title-btns {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

/* XP chrome buttons — same gradient style as the reference screenshot */
.xp-title-btns button {
  width: 21px;
  height: 21px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.4);
  font-size: 10px;
  font-weight: 700;
  font-family: "Marlett", "Tahoma", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset;
}

.xp-btn-help,
.xp-music-help-btn {
  background: linear-gradient(180deg, #6ca4e0 0%, #4080cc 45%, #3070bc 100%);
  color: #fff;
}

.xp-title-close {
  background: linear-gradient(180deg, #e06050 0%, #c02810 45%, #a81800 100%);
  color: #fff;
  letter-spacing: -1px;
}

.xp-title-close:hover { background: linear-gradient(180deg,#f07060 0%,#d83820 45%,#c02010 100%); }

/* Tab row */
.xp-tabs {
  display: flex;
  padding: 4px 6px 0;
  background: #d4d0c8;
  border-bottom: 1px solid #808080;
  flex-shrink: 0;
  gap: 2px;
}

.xp-tab {
  background: #ece9d8;
  border: 1px solid #808080;
  border-bottom: 1px solid #ece9d8;
  margin-bottom: -1px;
  padding: 3px 12px 4px;
  font-size: 11px;
  font-family: inherit;
  cursor: default;
  position: relative;
  z-index: 1;
  border-radius: 3px 3px 0 0;
  box-shadow: 1px 0 0 #fff inset, 0 1px 0 #fff inset;
}

/* Content area */
.xp-body {
  flex: 1;
  overflow: hidden;
  padding: 10px;
  background: #ece9d8;
  min-height: 0;
}

/* Group box — XP fieldset style */
.xp-group {
  border: 1px solid #919b9c;
  border-top: none;
  padding: 14px 8px 8px;
  position: relative;
  margin-top: 10px;
  background: #ece9d8;
}

.xp-group-label {
  position: absolute;
  top: -8px;
  left: 8px;
  background: #ece9d8;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 700;
  color: #000;
}

/* Two-col headers */
.xp-cols-header {
  display: flex;
  gap: 4px;
  margin-bottom: 2px;
  font-size: 11px;
}
.xp-cols-header span:first-child { flex: 0 0 110px; }
.xp-cols-header span:last-child  { flex: 1; }

/* List + value side by side */
.xp-list-row {
  display: flex;
  gap: 4px;
  height: 180px;
}

.xp-list {
  flex: 0 0 110px;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  box-shadow: 1px 1px 0 #dfdfdf inset, -1px -1px 0 #404040 inset;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 1px 0;
}

.xp-list li {
  padding: 1px 6px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 11px;
  color: #000;
  user-select: none;
}
.xp-list li:hover:not(.is-selected) { background: #e8e4d8; }
.xp-list li.is-selected {
  background: #316ac5;
  color: #fff;
}

.xp-value {
  flex: 1;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  box-shadow: 1px 1px 0 #dfdfdf inset, -1px -1px 0 #404040 inset;
  padding: 3px 6px;
  overflow-y: auto;
  font-size: 11px;
  color: #000;
  word-break: break-word;
}

/* Divider + footer */
.xp-divider {
  height: 1px;
  background: #919b9c;
  margin: 0;
  flex-shrink: 0;
}

.xp-footer {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  background: #ece9d8;
  flex-shrink: 0;
}

.xp-btn {
  background: linear-gradient(180deg, #fff 0%, #ece9d8 50%, #d8d4c4 100%);
  border: 1px solid #707070;
  border-radius: 3px;
  padding: 4px 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  cursor: pointer;
  min-width: 72px;
  box-shadow: 0 1px 0 #fff inset;
}
.xp-btn:hover  { background: linear-gradient(180deg,#fff 0%,#f0ede0 50%,#e0dcd0 100%); border-color: #316ac5; }
.xp-btn:active { background: #d8d4c4; box-shadow: none; }

.exif-no-data { font-size: 11px; color: #666; padding: 4px; }

/* XP message box */
.xp-msgbox {
  position: fixed;
  z-index: 2100;
  width: 300px;
  direction: ltr;
  font-family: "Tahoma", "MS Sans Serif", sans-serif;
  font-size: 11px;
  border: 1px solid #0a246a;
  border-radius: 6px 6px 4px 4px;
  box-shadow:
    1px 1px 0 #6ca0dc inset,
    -1px 0 0 #6ca0dc inset,
    0 -1px 0 #6ca0dc inset,
    0 6px 24px rgba(0,0,0,0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.xp-msgbox[hidden] { display: none; }

.xp-msgbox-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 14px 12px;
  background: #ece9d8;
}

.xp-msgbox-icon {
  font-size: 40px;
  line-height: 1;
  color: #316ac5;
  flex-shrink: 0;
}

.xp-msgbox-text {
  flex: 1;
  color: #000;
}

.xp-msgbox-text p {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: #1a1a1a;
}
.xp-msgbox-text p:last-child { margin-bottom: 0; }


.photo-placeholder {
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
  background: var(--color-surface);
}

.photo-card {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lightbox.is-open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 0;
  object-fit: contain;
  box-shadow: 0 8px 48px rgba(0,0,0,0.6);
}

.lightbox-close {
  position: absolute;
  top: var(--space-3);
  inset-inline-end: var(--space-3);
  font-size: 1.5rem;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Photo Gallery ---------- */
.gallery-section {
  padding-block: var(--space-5);
  overflow: hidden;
  max-width: 100%;
  background-color: #8a8669;
}

.gallery-title {
  text-align: center;
  margin-bottom: var(--space-4);
  padding-inline: var(--space-4);
}

.gallery-track-wrapper {
  overflow: hidden;
  width: 100%;
  cursor: grab;
  direction: ltr;
}

.gallery-track-wrapper:active { cursor: grabbing; }

.gallery-track {
  display: flex;
  gap: 2px;
  width: max-content;
  will-change: transform;
}

/* picture is a wrapper — make it transparent to flex layout */
.gallery-track picture { display: contents; }

.gallery-track img {
  height: 420px;
  width: auto;
  border-radius: 0;
  object-fit: cover;
  flex-shrink: 0;
}

/* ---------- Current project ---------- */
.badge {
  display: inline-block;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-weight: 800;
  font-size: var(--fs-md);
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  margin-top: var(--space-2);
}

.badge-gif-switcher {
  position: relative;
  width: 300px;
  height: 40px;
  margin: 0 auto var(--space-3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.xp-loading-gif {
  position: absolute;
  width: 300px;
  height: auto;
  opacity: 1;
  transition: opacity 0.12s ease;
}

.badge-gif-switcher .badge {
  position: absolute;
  margin: 0;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.badge-gif-switcher:hover .xp-loading-gif { opacity: 0; }
.badge-gif-switcher:hover .badge          { opacity: 1; }

/* ---------- Contact ---------- */
#contact {
  text-align: center;
}

.contact-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}

@keyframes mail-jump {
  0%   { transform: translateY(0)    scale(1); }
  20%  { transform: translateY(-28px) scale(1.15); }
  40%  { transform: translateY(0)    scale(0.95); }
  55%  { transform: translateY(-14px) scale(1.08); }
  70%  { transform: translateY(0)    scale(0.98); }
  85%  { transform: translateY(-6px)  scale(1.03); }
  100% { transform: translateY(0)    scale(1); }
}

.contact-icon-btn.jump-active .mail-icon-wrap {
  animation: mail-jump 0.7s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes mail-shine {
  0%   { top: -120%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 120%; opacity: 0; }
}

.contact-icon-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-text);
  position: relative;
}

.mail-icon-wrap {
  position: relative;
  display: inline-block;
  width: 90px;
  height: 90px;
  -webkit-mask-image: url('../images/ui/mail_button.png');
  mask-image: url('../images/ui/mail_button.png');
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.contact-icon-btn.shine-active .mail-icon-wrap::after {
  content: "";
  position: absolute;
  left: -40%;
  top: -120%;
  width: 180%;
  height: 40%;
  background: repeating-linear-gradient(
    180deg,
    rgba(255,255,255,0.85) 0px,
    rgba(255,255,255,0.85) 5px,
    transparent 5px,
    transparent 10px
  );
  animation: mail-shine 0.7s steps(10) forwards;
  pointer-events: none;
}

.contact-icon-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.contact-icon-btn:hover .contact-icon-img {
  transform: translateY(-4px);
  opacity: 0.8;
}

.contact-icon-label {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.4;
}
