:root {
  color-scheme: dark;
  --bg: #090b0d;
  --panel: #0f1317;
  --panel-2: #12171c;
  --border: #29313a;
  --text: #d7dde5;
  --muted: #7f8b98;
  --accent: #98e6a5;
  --accent-2: #8cc8ff;
  --warning: #ffd580;
  --shadow: rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(140, 200, 255, 0.05), transparent 35%),
    var(--bg);
  color: var(--text);
  font-family:
    "Cascadia Code",
    "JetBrains Mono",
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
  line-height: 1.6;
}

a {
  color: var(--accent-2);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: #c5e4ff;
  text-decoration: underline;
}

.terminal-shell {
  width: min(1040px, calc(100% - 28px));
  margin: 42px auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 22px 70px var(--shadow);
}

.topbar {
  min-height: 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
  font-size: 0.9rem;
}

.window-controls { display: flex; gap: 8px; }

.window-controls span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #59636f;
}

.title { color: var(--muted); text-align: center; }
.status { justify-self: end; color: var(--accent); }

.terminal { padding: 28px; }

.terminal > p,
.cursor-line { margin: 0 0 14px; }

.prompt { color: var(--accent); }

.sep,
.symbol {
  color: var(--muted);
  margin-right: 0.45rem;
}

.path { color: var(--accent-2); }
.output { margin: 0 0 30px 18px; }

.hero h1 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 760px;
  margin: 0;
  color: #b9c2cc;
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.socials a {
  display: inline-block;
  padding: 7px 10px;
  border: 1px solid var(--border);
  background: #0b1014;
}

.socials a:hover,
.socials a:focus-visible {
  border-color: var(--accent-2);
  text-decoration: none;
}

.private-access {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.private-button {
  display: inline-block;
  padding: 8px 11px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: rgba(152, 230, 165, 0.035);
}

.private-button:hover,
.private-button:focus-visible {
  color: #c9ffd2;
  border-color: #c9ffd2;
  text-decoration: none;
}

.private-note {
  color: var(--muted);
  font-size: 0.84rem;
}

.section-heading { margin-bottom: 18px; }

.section-heading h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--warning);
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
}

/* Gallery categories */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gallery-category {
  min-width: 0;
  border: 1px solid var(--border);
  background: #0b1014;
}

.gallery-category-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--warning);
  font-size: 0.84rem;
}

.slide-counter { color: var(--muted); }

.carousel-stage {
  position: relative;
  min-height: 285px;
}

.carousel-slides { height: 100%; }

.gallery-slide {
  display: none;
  margin: 0;
}

.gallery-slide.active { display: block; }

.gallery-slide img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: contain;
  background:
    linear-gradient(135deg, rgba(152, 230, 165, 0.04), transparent 60%),
    #0b1014;
  cursor: zoom-in;
}

.gallery-slide img:hover,
.gallery-slide img:focus-visible {
  opacity: 0.9;
  outline: 1px solid var(--accent-2);
  outline-offset: -1px;
}

.gallery-slide figcaption {
  min-height: 66px;
  padding: 10px 38px;
  border-top: 1px solid var(--border);
  color: #aeb7c2;
  font-size: 0.84rem;
}

.carousel-arrow {
  position: absolute;
  z-index: 5;
  top: 105px;
  transform: translateY(-50%);
  width: 32px;
  height: 54px;
  border: 1px solid var(--border);
  background: rgba(9, 12, 15, 0.82);
  color: var(--text);
  font: inherit;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.carousel-arrow:hover,
.carousel-arrow:focus-visible {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.carousel-arrow.prev { left: 6px; }
.carousel-arrow.next { right: 6px; }

/* Fastfetch block */
.fastfetch-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(420px, 1.6fr);
  gap: 28px;
  align-items: center;
  overflow-x: auto;
  padding: 22px;
  border: 1px solid var(--border);
  background: #080b0d;
}

.fastfetch-logo {
  margin: 0;
  color: #c8d0d9;
  font-family: "DejaVu Sans Mono", "Noto Sans Mono", "Liberation Mono", monospace;
  font-size: 0.72rem;
  line-height: 1.05;
  white-space: pre;
  justify-self: center;
}

.fastfetch-specs {
  min-width: 0;
  border: 1px solid #89939d;
  border-radius: 4px;
  overflow: hidden;
}

.ff-group + .ff-group {
  border-top: 1px solid #89939d;
}

.ff-group {
  padding: 7px 10px;
}

.ff-row {
  display: grid;
  grid-template-columns: 74px 12px minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
  font-size: 0.82rem;
  line-height: 1.45;
}

.ff-key {
  color: #bfc8d2;
  text-align: left;
}

.ff-sep {
  color: #7f8b98;
  text-align: center;
}

.ff-value {
  color: #d7dde5;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .fastfetch-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .fastfetch-logo {
    font-size: 0.66rem;
  }
}

/* Full-screen lightbox */
.image-overlay {
  width: min(96vw, 1600px);
  max-width: none;
  max-height: 94vh;
  margin: auto;
  padding: 50px 18px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #090c0f;
  color: var(--text);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.7);
}

.image-overlay::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
}

.image-overlay img {
  display: block;
  max-width: 100%;
  max-height: calc(94vh - 125px);
  margin: 0 auto;
  object-fit: contain;
}

.overlay-caption {
  margin: 12px auto 0;
  max-width: 900px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

.overlay-caption:empty { display: none; }

.overlay-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  padding: 5px 7px;
  background: transparent;
  color: var(--accent-2);
  font: inherit;
  cursor: pointer;
}

.overlay-close:hover,
.overlay-close:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

body.overlay-open { overflow: hidden; }

.muted { color: var(--muted); }

.cursor {
  display: inline-block;
  width: 0.62em;
  height: 1.1em;
  margin-left: 0.18rem;
  vertical-align: -0.15em;
  background: var(--text);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (max-width: 760px) {
  .terminal-shell {
    width: min(100% - 14px, 1040px);
    margin: 16px auto;
    border-radius: 8px;
  }

  .topbar { grid-template-columns: 1fr auto; }
  .title { display: none; }
  .terminal { padding: 20px 16px; }
  .output { margin-left: 10px; }

  .gallery-grid { grid-template-columns: 1fr; }
  .carousel-stage { min-height: 340px; }
  .gallery-slide img { height: 265px; }
  .carousel-arrow { top: 132px; }

  .fastfetch-terminal {
    margin-left: -10px;
    margin-right: 0;
  }
}
