:root {
  color-scheme: dark;
  --panel: #121722;
  --text: #f5f7ff;
  --muted: #a2acbf;
  --line: #252d3c;
  --accent: #dbb56d;
  font-family: "Inter", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  width: min(1080px, 92%);
  margin: 0 auto;
  padding: 2rem 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  gap: 1.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-nav a:hover {
  color: var(--text);
}

.portfolio-root {
  width: min(1080px, 92%);
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.hero {
  padding: 4rem 0 4.5rem;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

.hero h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.hero-copy {
  max-width: 56ch;
  color: var(--muted);
  line-height: 1.7;
  margin: 1.4rem 0 2rem;
}

.hero-cta {
  display: inline-block;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.hero-cta:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.content-section {
  padding: 3.3rem 0;
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.3rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

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

.card {
  padding: 1rem;
  background: linear-gradient(140deg, var(--panel) 0%, #0f131d 100%);
  border: 1px solid var(--line);
}

.card-logo {
  display: block;
  width: 100%;
  height: 56px;
  object-fit: contain;
  object-position: left center;
  margin: 0 0 0.85rem;
  opacity: 0.95;
}

.card-link {
  display: block;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.card-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card h3 {
  margin: 0.6rem 0;
  font-size: 1.2rem;
}

.card p {
  margin: 0;
  color: #c3cad8;
  line-height: 1.6;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li + li {
  margin-top: 0.65rem;
}

.list a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.list span {
  max-width: 48ch;
}

.list time {
  color: var(--muted);
  white-space: nowrap;
  font-size: 0.9rem;
}

.split {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
}

.split p {
  color: #c3cad8;
  line-height: 1.7;
}

.stats p {
  margin: 0;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.stats strong {
  color: var(--accent);
  margin-right: 0.35rem;
}

.site-footer {
  width: min(1080px, 92%);
  margin: 0 auto;
  padding: 2rem 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
}

.site-footer a {
  color: var(--text);
}

.subpage-hero {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--line);
}

.subpage-hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.subpage-hero p {
  margin: 0.9rem 0 0;
  max-width: 68ch;
  color: var(--muted);
  line-height: 1.65;
}

.work-scroll-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 0.3rem;
}

.work-item {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1rem;
  align-items: stretch;
  border: 1px solid var(--line);
  background: linear-gradient(140deg, var(--panel) 0%, #0f131d 100%);
}

.work-item img {
  width: 100%;
  height: 100%;
  min-height: 170px;
  object-fit: cover;
  display: block;
}

.work-item-content {
  padding: 1rem;
}

.work-item-content h3 {
  margin: 0.4rem 0 0.6rem;
}

.work-item-content p {
  margin: 0;
  color: #c3cad8;
  line-height: 1.6;
}

.work-item-meta {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--muted);
}

.back-link:hover {
  color: var(--text);
}

.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.detail-main h2 {
  margin-top: 0;
}

.detail-main p {
  color: #c3cad8;
  line-height: 1.7;
}

.detail-aside {
  padding: 1rem;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.detail-aside h3 {
  margin-top: 0;
}

.detail-aside p {
  margin: 0.5rem 0;
  color: #c3cad8;
}

.detail-image {
  margin: 0 0 1.2rem;
  border: 1px solid var(--line);
}

.detail-image img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
  }

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

  .work-item {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 0.8rem 1.1rem;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Shader background */
.shader-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.shader-bg iframe {
  width: 100%;
  height: 100%;
  border: none;
  /* Scale up slightly to avoid black edges at some aspect ratios */
  transform: scale(1.02);
}

/* Dark overlay so text stays readable */
.shader-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

/* Make sure your content sits on top */
.site-header,
.portfolio-root,
.site-footer {
  position: relative;
  z-index: 1;
}