:root {
  color-scheme: dark;
  --bg: #050608;
  --panel: rgba(13, 17, 22, 0.78);
  --panel-strong: rgba(19, 24, 31, 0.92);
  --text: #f7f3ea;
  --muted: #b8c1c9;
  --faint: #73808c;
  --gold: #f2b35d;
  --blue: #79c7ff;
  --line: rgba(255, 255, 255, 0.14);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

.starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: #030406;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: linear-gradient(180deg, rgba(5, 6, 8, 0.88), rgba(5, 6, 8, 0));
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 13px;
  height: 13px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(242, 179, 93, 0.12), 0 0 28px rgba(242, 179, 93, 0.45);
}

.nav-links {
  gap: clamp(14px, 3vw, 34px);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

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

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 140px clamp(20px, 5vw, 72px) clamp(56px, 8vw, 92px);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  filter: saturate(0.95) contrast(1.08);
  transform: scale(1.02);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 72% 42%, rgba(242, 179, 93, 0.08), transparent 24%),
    linear-gradient(90deg, rgba(5, 6, 8, 0.96) 0%, rgba(5, 6, 8, 0.64) 39%, rgba(5, 6, 8, 0.12) 72%),
    linear-gradient(180deg, rgba(5, 6, 8, 0.12), rgba(5, 6, 8, 0.86));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(3.1rem, 9vw, 7.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 680px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.24rem);
}

.hero-actions,
.contact-actions,
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 34px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

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

.button.primary {
  background: var(--text);
  color: #07080a;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  backdrop-filter: blur(16px);
}

.intro-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric {
  min-height: 176px;
  padding: clamp(22px, 4vw, 42px);
  background: rgba(7, 9, 12, 0.86);
}

.metric span {
  color: var(--gold);
  font-weight: 800;
}

.metric strong {
  display: block;
  margin-top: 12px;
  font-size: 1.08rem;
}

.metric p {
  max-width: 360px;
  margin: 8px 0 0;
  color: var(--muted);
}

.section,
.contact-section {
  padding: clamp(70px, 10vw, 132px) clamp(20px, 5vw, 72px);
}

#about.section {
  padding-top: clamp(38px, 5vw, 72px);
  padding-bottom: clamp(14px, 2vw, 28px);
}

#projects.section {
  padding-top: clamp(18px, 3vw, 42px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.about-copy p {
  color: var(--muted);
  font-size: 1.05rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.project-card {
  position: relative;
  min-height: 370px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  border: 1px solid rgba(183, 196, 210, 0.22);
  border-radius: 18px;
  padding: clamp(18px, 2.4vw, 26px);
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.06), transparent 20%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018)),
    rgba(18, 23, 29, 0.9);
  box-shadow: var(--shadow);
  opacity: 1;
  transition:
    opacity 260ms ease,
    transform 260ms ease,
    border-color 180ms ease,
    background 180ms ease;
  cursor: pointer;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.24) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255, 255, 255, 0.14) 0 1px, transparent 1.5px);
  background-position: 22px 34px, 80px 120px;
  background-size: 190px 160px, 260px 230px;
  opacity: 0.56;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(183, 196, 210, 0.42);
}

.project-card.is-entering {
  animation: card-filter-in 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.project-card.featured {
  grid-row: span 2;
  min-height: 370px;
  background:
    radial-gradient(circle at 80% 16%, rgba(242, 179, 93, 0.18), transparent 28%),
    radial-gradient(circle at 25% 20%, rgba(121, 199, 255, 0.08), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02)),
    rgba(18, 23, 29, 0.94);
}

.project-card-thumb {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 16 / 10;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(183, 196, 210, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

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

.project-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #9aa4af;
  font-size: clamp(0.68rem, 0.8vw, 0.78rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-meta span {
  border: 1px solid rgba(183, 196, 210, 0.22);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.018);
}

.project-card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(1.28rem, 1.65vw, 1.72rem);
  line-height: 1.12;
}

.project-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #c6ced7;
  font-size: clamp(0.92rem, 1vw, 1.04rem);
  line-height: 1.5;
}

.project-card > .project-details {
  display: none;
}

.project-details {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  margin: auto 0 0;
}

.project-details div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  border-top: 1px solid rgba(183, 196, 210, 0.2);
  padding-top: 20px;
}

dt {
  color: #8d98a4;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 0;
  color: var(--text);
  font-size: clamp(1rem, 1.4vw, 1.35rem);
  font-weight: 600;
}

.project-links {
  position: relative;
  z-index: 1;
  align-items: center;
}

.project-links a,
.project-links button {
  appearance: none;
  border: 0;
  border-bottom: 1px solid rgba(242, 179, 93, 0.7);
  padding: 0 0 4px;
  background: transparent;
  border-bottom: 1px solid rgba(242, 179, 93, 0.7);
  color: var(--gold);
  font: inherit;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 800;
  cursor: pointer;
}

.project-modal {
  width: min(980px, calc(100vw - 32px));
  max-height: min(88vh, 900px);
  border: 1px solid rgba(183, 196, 210, 0.28);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  background: rgba(18, 23, 29, 0.98);
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.72);
}

.project-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.modal-shell {
  position: relative;
  max-height: min(88vh, 900px);
  overflow-y: auto;
  padding: clamp(28px, 5vw, 58px);
  background:
    radial-gradient(circle at 86% 12%, rgba(242, 179, 93, 0.16), transparent 26%),
    radial-gradient(circle at 12% 20%, rgba(121, 199, 255, 0.1), transparent 28%);
}

.modal-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0 1px, transparent 1.6px);
  background-size: 210px 180px;
  opacity: 0.4;
}

.modal-close {
  position: sticky;
  top: 0;
  z-index: 3;
  float: right;
  border: 1px solid rgba(183, 196, 210, 0.28);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(5, 6, 8, 0.72);
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.modal-arrow {
  position: sticky;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(183, 196, 210, 0.24);
  border-radius: 50%;
  padding: 0;
  background: rgba(5, 6, 8, 0.78);
  color: var(--text);
  font: inherit;
  font-size: 1.3rem;
  font-weight: 900;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.36);
}

.modal-arrow-left {
  float: left;
  margin-left: calc(clamp(28px, 5vw, 58px) * -0.72);
}

.modal-arrow-right {
  float: right;
  margin-right: calc(clamp(28px, 5vw, 58px) * -2.05);
}

.modal-arrow:hover {
  border-color: rgba(242, 179, 93, 0.55);
  color: var(--gold);
}

.modal-arrow:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.project-modal h2 {
  position: relative;
  z-index: 1;
  clear: both;
  max-width: 760px;
  margin-top: 34px;
}

.modal-summary {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 22px 0 36px;
  color: #c6ced7;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.modal-image-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 34px;
  overflow: hidden;
  border: 1px solid rgba(183, 196, 210, 0.2);
  border-radius: 14px;
  background: rgba(5, 6, 8, 0.55);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.28);
}

.modal-image-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.modal-details {
  margin-bottom: 34px;
}

.modal-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  border-top: 1px solid rgba(183, 196, 210, 0.2);
  padding-top: 28px;
}

.modal-body h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: #8d98a4;
  text-transform: uppercase;
}

.modal-body p,
.modal-body li {
  color: #c6ced7;
  font-size: 1rem;
}

.modal-body ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.modal-links {
  margin-top: 34px;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(30px, 6vw, 92px);
  border-top: 1px solid var(--line);
}

.filter-panel {
  width: 100%;
}

.filter-panel summary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(183, 196, 210, 0.22);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.filter-panel summary::marker {
  color: var(--gold);
}

.filter-panel summary .eyebrow {
  margin: 0;
}

.filter-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(242, 179, 93, 0.48);
  border-radius: 50%;
  color: var(--gold);
  font-size: 1rem;
  line-height: 1;
}

.filter-search {
  max-width: 360px;
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: var(--faint);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.filter-search input {
  width: 100%;
  border: 1px solid rgba(183, 196, 210, 0.22);
  border-radius: 999px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

.filter-search input::placeholder {
  color: var(--faint);
}

.filter-progress {
  width: min(360px, 100%);
  height: 3px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(183, 196, 210, 0.13);
}

.filter-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
}

.filter-progress.is-active span {
  animation: filter-progress 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.filter-count {
  min-height: 1.35em;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.skill-list button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.skill-list button span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.skill-count {
  flex: 0 0 auto;
  min-width: 1.85em;
  border: 1px solid rgba(183, 196, 210, 0.18);
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--blue);
  font-size: 0.78em;
  line-height: 1.2;
  text-align: center;
  background: rgba(121, 199, 255, 0.08);
}

.skill-list button:hover,
.skill-list button[aria-pressed="true"] {
  border-color: rgba(242, 179, 93, 0.62);
  color: var(--gold);
  background: rgba(242, 179, 93, 0.1);
}

.skill-list button:hover .skill-count,
.skill-list button[aria-pressed="true"] .skill-count {
  border-color: rgba(242, 179, 93, 0.36);
  color: var(--text);
  background: rgba(242, 179, 93, 0.16);
}

.skill-more-button {
  border-color: rgba(242, 179, 93, 0.38);
  color: var(--gold);
  background: rgba(242, 179, 93, 0.08);
}

.skill-more-icon {
  width: 1.3em;
  height: 1.3em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(242, 179, 93, 0.38);
  border-radius: 50%;
  line-height: 1;
}

.project-card.is-hidden {
  display: none;
}

.skill-list li.is-collapsed-hidden,
.skill-list li.is-hidden {
  display: none;
}

@keyframes filter-progress {
  0% {
    transform: scaleX(0);
    opacity: 0.72;
  }

  62% {
    transform: scaleX(0.78);
    opacity: 1;
  }

  100% {
    transform: scaleX(1);
    opacity: 0;
  }
}

@keyframes card-filter-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .filter-progress span {
    animation: none;
    transition: none;
  }
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  background:
    radial-gradient(circle at 16% 40%, rgba(121, 199, 255, 0.13), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact-section h2 {
  max-width: 850px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 72px);
  color: var(--faint);
  font-size: 0.9rem;
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    padding-top: 16px;
  }

  .nav-links {
    gap: 12px;
    font-size: 0.84rem;
  }

  .hero {
    min-height: 88vh;
    padding-top: 112px;
  }

  .hero-vignette {
    background:
      linear-gradient(90deg, rgba(5, 6, 8, 0.96), rgba(5, 6, 8, 0.54)),
      linear-gradient(180deg, rgba(5, 6, 8, 0.1), rgba(5, 6, 8, 0.9));
  }

  .intro-band,
  .split-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

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

  .project-card.featured {
    grid-row: auto;
    min-height: 300px;
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

  .modal-arrow {
    width: 42px;
    height: 42px;
  }

  .modal-arrow-left {
    margin-left: -12px;
  }

  .modal-arrow-right {
    margin-right: -48px;
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .site-header {
    position: absolute;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(2.85rem, 16vw, 4.6rem);
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .project-details div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .project-card {
    min-height: 280px;
    border-radius: 14px;
  }

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

  .project-meta span {
    padding: 8px 12px;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }
}
