:root {
  color-scheme: dark;
  --bg: #08131a;
  --bg-soft: #10222c;
  --surface: rgba(10, 24, 31, 0.78);
  --surface-strong: rgba(13, 31, 40, 0.92);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4efe7;
  --muted: #b7c3c7;
  --accent: #ff8c42;
  --accent-soft: #ffd5b7;
  --secondary: #4fc3c8;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --content-width: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(79, 195, 200, 0.16), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(255, 140, 66, 0.16), transparent 24%),
    linear-gradient(180deg, #071017 0%, #0a171e 38%, #08131a 100%);
  color: var(--text);
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  display: block;
}

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

button {
  font: inherit;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 110px 110px;
  mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
}

.site-header,
.section,
.site-footer {
  width: min(calc(100% - 2rem), var(--content-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 1rem;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 18, 24, 0.78);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ffb36d);
  color: #0a1114;
  font-family: "Syne", sans-serif;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-text {
  display: grid;
}

.brand-text strong {
  font-size: 0.98rem;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.75rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.site-nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 180ms ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.4rem;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

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

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 0.72rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}

.section {
  padding: 4.5rem 0;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: end;
  padding-top: 6rem;
}

.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 34px;
}

.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(8, 19, 26, 0.92) 18%, rgba(8, 19, 26, 0.48) 52%, rgba(8, 19, 26, 0.88) 100%),
    linear-gradient(180deg, rgba(8, 19, 26, 0.2), rgba(8, 19, 26, 0.88));
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 1.5rem;
  align-items: end;
}

.hero-copy,
.panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(13, 31, 40, 0.82), rgba(9, 22, 29, 0.86));
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(1.6rem, 2.5vw, 2.6rem);
  border-radius: var(--radius-lg);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent-soft);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
}

.hero h1,
.section-heading h2,
.contact-card h2,
.hero-spotlight h2 {
  margin: 0;
  font-family: "Syne", sans-serif;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 11ch;
  font-size: clamp(3rem, 7vw, 6.4rem);
}

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

.hero-description,
.section-heading p,
.spotlight-copy p,
.about-story p,
.about-highlights li,
.about-values p,
.skill-card p,
.project-body p,
.contact-card p,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

.hero-description {
  max-width: 60ch;
  margin: 1.2rem 0 0;
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.75rem;
}

.button,
.control-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.button {
  min-height: 48px;
  padding: 0.85rem 1.35rem;
  font-weight: 700;
}

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

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

.button-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.75rem;
}

.metric-card {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
}

.metric-card strong {
  display: block;
  margin-bottom: 0.35rem;
  font-family: "Syne", sans-serif;
  font-size: 2rem;
  color: var(--secondary);
}

.metric-card span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.hero-spotlight {
  padding: 1.15rem;
  border-radius: var(--radius-lg);
  transform-style: preserve-3d;
}

.spotlight-photo-wrap {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  min-height: 350px;
}

.spotlight-photo-wrap::after {
  content: "";
  position: absolute;
  inset: auto 1rem 1rem auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 140, 66, 0.34), transparent 70%);
}

.spotlight-photo {
  width: 100%;
  height: 100%;
  min-height: 350px;
  object-fit: cover;
  object-position: center 18%;
}

.spotlight-copy {
  padding: 1.15rem 0.4rem 0;
}

.spotlight-copy h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.stack-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.stack-cloud span,
.contact-pills span,
.tag-row span {
  padding: 0.58rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.9rem;
}

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

.section-heading h2,
.contact-card h2 {
  font-size: clamp(2.2rem, 4vw, 4rem);
}

.section-heading p:last-child {
  margin-top: 1rem;
}

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

.panel {
  border-radius: var(--radius-md);
  padding: 1.45rem;
}

.panel h3 {
  margin-top: 0;
  margin-bottom: 0.9rem;
  font-family: "Syne", sans-serif;
  font-size: 1.35rem;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.check-list li {
  position: relative;
  padding-left: 1.6rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
}

.value-list {
  display: grid;
  gap: 1rem;
}

.value-list strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

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

.skill-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  min-height: 220px;
}

.skill-card img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.skill-card h3,
.project-body h3 {
  margin: 0 0 0.45rem;
  font-family: "Syne", sans-serif;
}

.projects-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.projects-controls {
  display: flex;
  gap: 0.7rem;
}

.control-button {
  min-width: 90px;
  min-height: 46px;
  padding: 0.72rem 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.projects-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 34%);
  gap: 1rem;
  margin-top: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.projects-track::-webkit-scrollbar {
  display: none;
}

.project-card {
  scroll-snap-align: start;
  display: grid;
  gap: 1rem;
}

.project-media {
  position: relative;
  min-height: 230px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(79, 195, 200, 0.25), rgba(255, 140, 66, 0.2));
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-media-alt img {
  object-position: center 20%;
}

.project-media-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
}

.project-media-stack img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.22));
}

.project-type {
  margin: 0 0 0.6rem;
  color: var(--accent-soft);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
}

.tag-row,
.contact-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.contact-card {
  display: grid;
  gap: 1rem;
  align-items: center;
  padding: clamp(1.5rem, 2vw, 2.25rem);
  background:
    radial-gradient(circle at right top, rgba(255, 140, 66, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(13, 31, 40, 0.88), rgba(9, 22, 29, 0.92));
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0 2.5rem;
}

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

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

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1100px) {
  .hero-content,
  .about-grid,
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-track {
    grid-auto-columns: minmax(320px, 70%);
  }
}

@media (max-width: 860px) {
  .site-header {
    top: 0.6rem;
    border-radius: 26px;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0.4rem;
  }

  .site-header.nav-open .site-nav {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding-top: 5rem;
  }

  .hero-content,
  .about-grid,
  .skills-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .projects-head {
    flex-direction: column;
    align-items: start;
  }

  .projects-track {
    grid-auto-columns: 90%;
  }
}

@media (max-width: 560px) {
  .site-header,
  .section,
  .site-footer {
    width: min(calc(100% - 1.2rem), var(--content-width));
  }

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

  .hero-copy,
  .panel {
    padding: 1.15rem;
  }

  .spotlight-photo-wrap,
  .spotlight-photo {
    min-height: 280px;
  }

  .project-media {
    min-height: 200px;
  }
}
