:root {
  --bg: #08111f;
  --panel: #101b2c;
  --text: #edf4ff;
  --muted: #9eb4d2;
  --line: rgba(160, 196, 255, 0.18);
  --accent: #5df2c6;
  --accent-2: #7aa8ff;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #09111d 0%, #0d1727 100%);
}

.page-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.2rem 0 2rem;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 2rem;
  align-items: center;
  padding: 3.5rem 0 1rem;
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
}

.brand,
.eyebrow,
.section-kicker {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand {
  font-weight: 700;
}

.hero-content {
  padding-top: 4rem;
  min-height: 100%;
}

.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;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #101b2c;
  box-shadow: var(--shadow);
}

.language-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  color: var(--muted);
}

.language-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.language-options {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.language-option {
  min-width: 2.6rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.language-option:hover {
  color: var(--text);
  border-color: rgba(220, 238, 255, 0.24);
  background: rgba(255, 255, 255, 0.04);
}

.language-option.is-active {
  color: #07111e;
  border-color: rgba(93, 242, 198, 0.42);
  background: linear-gradient(135deg, var(--accent), #90ffd2);
}

.hero h1,
.section-heading h2,
.info-card h3 {
  font-family: "Syne", sans-serif;
}

.hero h1 {
  margin: 0.5rem 0 1rem;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.94;
}

.hero h1 span {
  color: var(--accent);
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.85rem;
}

.intro,
.info-card p {
  color: var(--muted);
  line-height: 1.7;
}

.intro {
  max-width: 62ch;
  min-height: 5.5rem;
  font-size: 1.08rem;
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2rem 0;
  min-height: 3.6rem;
  align-items: flex-start;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #04111d;
  background: linear-gradient(135deg, var(--accent), #90ffd2);
}

.button-secondary {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  align-items: stretch;
}

.hero-stats li,
.info-card,
.hero-card,
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1rem;
  border-radius: 1.2rem;
  min-height: 5.6rem;
}

.hero-stats li,
.info-card,
.skill-strip span {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.hero-stats li:hover,
.info-card:hover,
.skill-strip span:hover {
  border-color: rgba(220, 238, 255, 0.4);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.hero-stats strong {
  color: var(--muted);
  font-size: 0.75rem;
  margin-bottom: 0.45rem;
}

.hero-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem;
  border-radius: 1.6rem;
  min-height: 0;
  align-self: center;
  background: #101b2c;
}

.hero-card-terminal {
  width: min(100%, 390px);
  justify-self: end;
  background: #101b2c;
}

.terminal-shell {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.05rem;
  background: #1f1f28;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.terminal-topbar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 0.9rem;
  background: linear-gradient(180deg, #403d3d, #2f2c2c);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.terminal-dots {
  display: inline-flex;
  gap: 0.42rem;
}

.terminal-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
}

.terminal-dot-close {
  background: #ff5f57;
}

.terminal-dot-min {
  background: #febc2e;
}

.terminal-dot-max {
  background: #28c840;
}

.terminal-caption {
  color: #f3f0f3;
  font-size: 0.88rem;
  font-weight: 500;
}

.terminal-body {
  padding: 0.75rem 0.8rem;
  background: #241f31;
}

.terminal-preview {
  min-height: 122px;
  overflow: hidden;
}

.terminal-preview .xterm {
  padding: 0;
}

.terminal-preview .xterm-screen canvas {
  border-radius: 0.45rem;
}

.terminal-fallback {
  margin: 0;
  color: #f6f5f4;
  font-family: "Ubuntu Mono", monospace;
  font-size: 1rem;
  line-height: 1.35;
  white-space: pre-wrap;
}

main {
  display: grid;
  gap: 1.5rem;
}

.panel {
  border-radius: 2rem;
  padding: 2rem;
}

.panel-highlight {
  background: #0f1a2b;
}

.section-heading {
  max-width: 56ch;
  margin-bottom: 1.5rem;
  min-height: 6.6rem;
}

.section-heading h2 {
  margin: 0.35rem 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.code-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.info-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border-radius: 1.4rem;
  padding: 1.4rem;
  min-height: 100%;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1rem;
  border-radius: 1.4rem;
  border: 1px solid var(--line);
  background: #101b2c;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  min-height: 100%;
}

.project-card-trustify {
  background:
    linear-gradient(180deg, rgba(56, 20, 29, 0.92), rgba(27, 16, 24, 0.96));
}

.project-card-lpcs {
  background:
    linear-gradient(180deg, rgba(62, 41, 22, 0.92), rgba(28, 20, 14, 0.96));
}

.project-card-swiftly {
  background:
    linear-gradient(180deg, rgba(17, 52, 36, 0.92), rgba(10, 27, 20, 0.97));
}

.project-card:hover {
  border-color: rgba(220, 238, 255, 0.4);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.project-banner {
  overflow: hidden;
  border-radius: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
}

.project-banner-image {
  display: block;
  width: 100%;
  height: 168px;
  object-fit: cover;
}

.project-banner-image-contain {
  object-fit: contain;
  object-position: center;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, rgba(61, 41, 24, 0.86), rgba(29, 18, 11, 0.96));
  padding: 0.55rem;
}

.project-banner-swiftly {
  display: flex;
  align-items: stretch;
  position: relative;
}

.project-banner-swiftly-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
  width: 100%;
  min-height: 168px;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(10, 24, 17, 0.12), rgba(10, 24, 17, 0.88)),
    radial-gradient(circle at 20% 15%, rgba(166, 255, 208, 0.24), rgba(166, 255, 208, 0) 26%),
    linear-gradient(135deg, #4db87a 0%, #2f7d56 40%, #163629 100%);
}

.project-banner-swiftly-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(transparent 92%, rgba(255, 255, 255, 0.05) 92%),
    linear-gradient(90deg, transparent 92%, rgba(255, 255, 255, 0.05) 92%);
  background-size: 100% 18px, 18px 100%;
  opacity: 0.3;
  pointer-events: none;
}

.project-banner-swiftly-art strong,
.project-banner-swiftly-art span {
  position: relative;
  z-index: 1;
}

.project-banner-swiftly-art strong {
  font-size: 1.65rem;
  font-weight: 700;
  color: #f6fff9;
}

.project-banner-swiftly-art span {
  color: rgba(240, 255, 245, 0.82);
  font-size: 0.92rem;
}

.project-banner-image-swiftly {
  background:
    radial-gradient(circle at top, rgba(166, 255, 208, 0.14), rgba(166, 255, 208, 0) 48%),
    linear-gradient(180deg, rgba(20, 49, 35, 0.92), rgba(11, 25, 18, 0.98));
}

.is-hidden {
  display: none !important;
}

.swiftly-chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(6, 15, 10, 0.26);
  color: #f2fff6 !important;
  font-size: 0.75rem !important;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-card h3 {
  margin: 0;
  font-size: 1.4rem;
  min-height: 1.8rem;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.project-type {
  color: var(--accent) !important;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-link {
  margin-top: auto;
  color: #d6e8ff;
  font-size: 0.92rem;
}

.info-card-large {
  grid-column: span 3;
}

.code-panel {
  background: #101b2c;
}

.skill-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.2rem;
  align-items: stretch;
}

.skill-strip span {
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #142235;
  color: var(--text);
  font-size: 0.9rem;
}

.steam-panel {
  padding-top: 1.5rem;
}

.steam-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.5rem;
  min-height: 6.1rem;
}

.steam-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.steam-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.85rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #142235;
  color: var(--muted);
  font-size: 0.84rem;
}

.steam-chip-active {
  background: rgba(59, 130, 246, 0.18);
  color: #dbeafe;
  border-color: rgba(96, 165, 250, 0.32);
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
  align-items: start;
}

.library-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  min-height: 100%;
}

.library-card img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.cover-frame {
  position: relative;
}

.cover-title {
  position: absolute;
  left: 50%;
  top: 1rem;
  transform: translateX(-50%);
  z-index: 1;
  width: calc(100% - 1rem);
  max-width: 92%;
  font-family: "Press Start 2P", cursive;
  font-size: clamp(0.9rem, 1.8vw, 1.3rem);
  line-height: 1.35;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  color: #f7fbff;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.95),
    0 4px 10px rgba(0, 0, 0, 0.85);
}

.cover-frame-minecraft::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  border-radius: 0 0 0.35rem 0.35rem;
  background: linear-gradient(180deg, rgba(4, 8, 14, 0), rgba(4, 8, 14, 0.9));
  pointer-events: none;
}

.minecraft-cover {
  object-fit: contain;
  object-position: center;
  background: linear-gradient(180deg, #101827, #0a1220);
  padding: 0.35rem;
}

.library-card:hover img {
  transform: translateY(-2px);
  border-color: rgba(180, 217, 255, 0.35);
}

.library-meta h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  min-height: 2.5rem;
}

.library-meta p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  min-height: 1.35rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p,
.site-footer span {
  margin: 0;
}

@media (max-width: 900px) {
  .hero,
  .grid-two,
  .projects-grid,
  .hero-stats,
  .code-grid {
    grid-template-columns: 1fr;
  }

  .info-card-large {
    grid-column: span 1;
  }

  .steam-header {
    align-items: start;
    flex-direction: column;
  }

  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .intro,
  .cta-row,
  .section-heading,
  .steam-header,
  .library-meta h3,
  .library-meta p,
  .project-card h3,
  .hero-stats li {
    min-height: 0;
  }

  .topbar {
    position: static;
    margin-bottom: 1rem;
  }

  .hero-card-terminal {
    width: 100%;
    justify-self: stretch;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1rem, 1120px);
  }

  .panel,
  .hero-card {
    padding: 1.25rem;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 16vw, 4rem);
  }

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

  .language-switcher {
    width: 100%;
    justify-content: space-between;
  }

  .language-options {
    flex: 1;
    justify-content: flex-end;
  }
}
