:root {
  --bg: #050505;
  --panel: #0b0b0b;
  --panel-2: #101010;
  --text: #f5f5f5;
  --muted: #a0a0a0;
  --line: #2a2a2a;
  --accent: #ffffff;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px;
  font-family: "Ubuntu Mono", monospace;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: radial-gradient(rgba(255,255,255,.17) .7px, transparent .7px);
  background-size: 8px 8px;
  z-index: -1;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 78px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(5, 5, 5, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}

.brand-mark {
  width: 40px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  letter-spacing: -3px;
  padding-right: 3px;
}

nav {
  display: flex;
  gap: 12px;
}

nav a {
  padding: 12px 18px;
  border: 1px solid #777;
  text-decoration: none;
  font-family: "Press Start 2P", monospace;
  font-size: .67rem;
  transition: .18s ease;
}

nav a:hover,
nav a:focus-visible {
  background: var(--text);
  color: var(--bg);
  transform: translateY(-2px);
}

.hero {
  width: min(var(--max), calc(100% - 40px));
  min-height: calc(100vh - 78px);
  margin: 0 auto;
  padding: 54px 0 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-banner {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: cover;
  border: 1px solid #404040;
  box-shadow: 0 0 0 8px #080808, 0 30px 90px rgba(0,0,0,.75);
  filter: grayscale(1) contrast(1.04);
}

.hero h1 {
  position: absolute;
  left: -9999px;
}

.developer-tag {
  margin: 44px 0 0;
  padding: 13px 22px;
  border-left: 4px solid var(--text);
  border-right: 4px solid var(--text);
  font-family: "Press Start 2P", monospace;
  font-size: clamp(.8rem, 2vw, 1.2rem);
  letter-spacing: 2px;
  background: #090909;
}

.scroll-cue {
  margin-top: 28px;
  font-size: 2rem;
  animation: bounce 1.2s infinite alternate;
}

@keyframes bounce {
  to { transform: translateY(9px); }
}

.content-section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 110px 0 30px;
  scroll-margin-top: 70px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 34px;
}

.section-heading span {
  color: var(--muted);
  font-size: 1.05rem;
}

.section-heading h2 {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(1.4rem, 4vw, 2.35rem);
}

.section-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.card-grid,
.project-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.link-card {
  min-height: 130px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-5px);
  border-color: #aaa;
  background: var(--panel-2);
}

.card-icon {
  width: 58px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid #777;
  font-weight: 700;
}

.card-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-copy strong {
  font-family: "Press Start 2P", monospace;
  font-size: .92rem;
}

.card-copy small {
  color: var(--muted);
  font-size: 1rem;
}

.arrow {
  font-size: 1.5rem;
}

.project-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
}

.terminal-bar {
  height: 46px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #141414;
  border-bottom: 1px solid var(--line);
}

.terminal-bar span {
  width: 10px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #777;
}

.terminal-bar code {
  margin-left: auto;
  color: var(--muted);
  font-family: "Ubuntu Mono", monospace;
}

.project-body {
  padding: 30px;
}

.command {
  margin: 0 0 22px;
  color: #c8c8c8;
}

.command span {
  color: #fff;
  font-weight: 700;
}

.project-body h3 {
  margin: 0 0 14px;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.5;
}

.project-body p:not(.command) {
  min-height: 48px;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 210px;
  padding: 13px 16px;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  text-decoration: none;
  font-weight: 700;
  transition: .18s ease;
}

.button:hover,
.button:focus-visible {
  background: transparent;
  color: var(--text);
}

footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 90px auto 0;
  padding: 30px 0 45px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.cursor {
  color: #fff;
  animation: blink .8s steps(1) infinite;
}

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

@media (max-width: 760px) {
  .site-header {
    height: auto;
    min-height: 70px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .brand > span:last-child {
    display: none;
  }

  nav a {
    padding: 10px 12px;
    font-size: .55rem;
  }

  .hero {
    min-height: auto;
    padding-top: 36px;
  }

  .hero-banner {
    aspect-ratio: 16 / 9;
  }

  .card-grid,
  .project-list {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding-top: 80px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
