:root {
  --bg: #09111a;
  --bg-deep: #060b11;
  --panel: rgba(14, 21, 31, 0.82);
  --panel-strong: rgba(18, 27, 40, 0.94);
  --line: rgba(255, 255, 255, 0.1);
  --text: #edf3f8;
  --muted: #9db0c3;
  --accent: #ff8051;
  --accent-2: #51d1d8;
  --accent-3: #f8c75f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(81, 209, 216, 0.16), transparent 26%),
    radial-gradient(circle at 85% 8%, rgba(255, 128, 81, 0.18), transparent 24%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 54%, #0d1620 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.92), transparent 88%);
}

body.is-transitioning {
  overflow: hidden;
}

.page-transition {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(81, 209, 216, 0.16), transparent 24%),
    linear-gradient(135deg, rgba(255, 128, 81, 0.94), rgba(8, 12, 17, 0.98));
  z-index: 30;
  transform: translateY(100%);
  transition: transform 700ms cubic-bezier(0.77, 0, 0.18, 1);
}

.page-transition__logo {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  font-family: "Syne", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent-3), #fff2c1);
}

body.is-transitioning .page-transition {
  transform: translateY(0);
}

.page-media-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.page-media-bg__asset {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.95) brightness(0.48);
}

.page-media-bg__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 11, 17, 0.5), rgba(6, 11, 17, 0.82)),
    radial-gradient(circle at top left, rgba(81, 209, 216, 0.12), transparent 28%);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 72px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 42px;
}

.brand,
.nav-links a,
.button,
.text-link,
.preview-card {
  transition: transform 180ms ease, color 180ms ease, background-color 180ms ease,
    border-color 180ms ease, opacity 180ms ease;
}

.brand {
  width: 56px;
  height: 56px;
  border-radius: 20px;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  color: var(--text);
  font-family: "Syne", sans-serif;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(255, 128, 81, 0.22), rgba(81, 209, 216, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.is-active,
.brand:hover,
.button:hover,
.text-link:hover,
.preview-card:hover {
  color: var(--text);
  transform: translateY(-2px);
}

.nav-links a.is-active {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
}

.hero,
.section {
  padding: 20px 0;
}

.hero-grid,
.section-split,
.grid-two,
.grid-three,
.project-list,
.contact-layout,
.preview-grid {
  display: grid;
  gap: 22px;
}

.hero-grid {
  grid-template-columns: 1.35fr 0.85fr;
}

.hero-grid-wide {
  align-items: stretch;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 30px;
}

.panel-hero {
  padding: 42px;
}

.panel-accent,
.panel-spotlight {
  background:
    linear-gradient(160deg, rgba(255, 128, 81, 0.1), rgba(81, 209, 216, 0.08)),
    var(--panel-strong);
}

.eyebrow,
.card-label {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: var(--accent-2);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Syne", sans-serif;
  line-height: 0.96;
}

h1 {
  font-size: clamp(3.2rem, 8vw, 6.3rem);
}

h1 span {
  display: block;
  color: var(--accent-3);
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 14px;
}

p {
  color: var(--muted);
  line-height: 1.72;
}

.lede {
  max-width: 62ch;
  font-size: 1.04rem;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button,
.text-link {
  text-decoration: none;
}

.button {
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.button-primary {
  color: #09111a;
  background: linear-gradient(135deg, var(--accent-3), var(--accent));
}

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

.signal-grid,
.timeline {
  display: grid;
  gap: 16px;
}

.signal-grid article,
.mini-card,
.timeline-item {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.signal-grid span,
.meta {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.section-split,
.contact-layout {
  grid-template-columns: 1.1fr 0.9fr;
}

.metrics-panel {
  display: grid;
  gap: 16px;
  align-content: center;
}

.metric {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.metric:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.metric strong {
  display: block;
  font-family: "Syne", sans-serif;
  font-size: 2.4rem;
  color: var(--text);
}

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

.preview-grid,
.grid-three {
  grid-template-columns: repeat(3, 1fr);
}

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

.preview-card {
  display: block;
  color: inherit;
}

.preview-card h3,
.project-card h3,
.interest-card h3 {
  margin-bottom: 10px;
}

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

.pill-list li,
.project-tags span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.page-intro {
  max-width: 760px;
  margin-bottom: 18px;
}

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

.project-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

.project-card--gallery {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
}

.project-main {
  display: grid;
  gap: 20px;
}

.project-sidebar {
  display: grid;
  gap: 14px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.list-clean {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.list-clean li::before {
  content: "";
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
}

.contact-links {
  display: grid;
  gap: 12px;
}

.contact-links a,
.text-link {
  color: var(--text);
}

.project-media-panel {
  display: flex;
  justify-content: center;
}

.project-media-window {
  position: relative;
  width: min(100%, 540px);
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 10, 16, 0.82);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.28);
}

.project-media-window::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.project-media-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.project-media-track::-webkit-scrollbar {
  display: none;
}

.project-media-slide {
  scroll-snap-align: start;
  aspect-ratio: 16 / 10;
  background: rgba(255, 255, 255, 0.02);
}

.project-media-asset {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #050a10;
}

.project-media-embed {
  border: 0;
}

.project-media-controls {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.project-media-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--text);
  background: rgba(6, 11, 17, 0.58);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  cursor: pointer;
}

.project-media-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.project-media-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  padding: 0;
  pointer-events: auto;
  cursor: pointer;
}

.project-media-dot.is-active {
  background: var(--accent-3);
}

.admin-layout {
  display: grid;
  gap: 22px;
}

.admin-form-grid {
  display: grid;
  gap: 22px;
}

.admin-actions,
.upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.field-grid {
  display: grid;
  gap: 16px;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--text);
  font-size: 0.92rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(5, 10, 16, 0.78);
  color: var(--text);
  font: inherit;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field-full {
  grid-column: 1 / -1;
}

.stack-builder {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}

.stack-card {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 18px;
}

.stack-card__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.stack-remove {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 128, 81, 0.14);
  color: #ffd2c2;
  padding: 10px 14px;
  cursor: pointer;
}

.panel-editor {
  min-height: 60vh;
}

.json-editor {
  width: 100%;
  min-height: 60vh;
  margin-top: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(5, 10, 16, 0.88);
  color: var(--text);
  padding: 18px;
  font: 0.95rem/1.6 Consolas, Monaco, monospace;
}

.json-editor-small {
  min-height: 90px;
}

.admin-status {
  margin-top: 18px;
}

.quote {
  font-family: "Syne", sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.08;
  color: var(--text);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms ease, transform 650ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero-grid,
  .section-split,
  .grid-two,
  .grid-three,
  .preview-grid,
  .contact-layout,
  .project-card {
    grid-template-columns: 1fr;
  }

  .panel-hero {
    padding: 34px;
  }

  .field-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
  }

  .site-header,
  .hero-actions,
  .button-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    gap: 10px;
  }

  .project-media-controls {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  h1 {
    font-size: clamp(2.8rem, 16vw, 4.4rem);
  }

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