:root {
  color-scheme: dark;
  --bg: #07090b;
  --panel: rgba(15, 20, 23, 0.76);
  --panel-strong: rgba(17, 25, 29, 0.92);
  --line: rgba(170, 220, 230, 0.18);
  --line-hot: rgba(63, 218, 230, 0.52);
  --text: #eef7f8;
  --muted: #9eb0b4;
  --dim: #66767b;
  --cyan: #41dce8;
  --amber: #ffb347;
  --steel: #b6c7cc;
  --danger: #ff5d5d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(65, 220, 232, 0.08), transparent 34rem),
    radial-gradient(circle at 12% 84%, rgba(255, 179, 71, 0.06), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

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

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.78rem clamp(1rem, 4vw, 3rem);
  background: linear-gradient(180deg, rgba(7, 9, 11, 0.88), rgba(7, 9, 11, 0.35));
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  transition: border-color 180ms ease, background 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(7, 9, 11, 0.9);
  border-bottom-color: var(--line);
}

.brand,
.nav-links,
.hero-actions,
.contact-actions,
.project-meta,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  display: inline-flex;
  min-width: 0;
  text-decoration: none;
  justify-self: start;
}

.brand-logo {
  width: clamp(11.2rem, 16vw, 14.5rem);
  height: auto;
  filter: drop-shadow(0 0 10px rgba(65, 220, 232, 0.08));
}

.nav-links {
  justify-self: center;
  gap: clamp(2.5rem, 6vw, 5rem);
  color: var(--steel);
  font-size: 0.93rem;
}

.nav-links a {
  position: relative;
  padding: 0.46rem 0;
  text-decoration: none;
}

.nav-links a::before {
  content: "";
  position: absolute;
  bottom: 0.05rem;
  left: 50%;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(65, 220, 232, 0.55);
  transform: translateX(-50%);
  transition: width 180ms ease;
}

.nav-links a:hover,
.nav-links a.is-active,
.nav-links a[aria-current="page"],
.project-card a:hover {
  color: inherit;
}

.nav-links a:hover::before,
.nav-links a.is-active::before,
.nav-links a[aria-current="page"]::before {
  width: 1.35rem;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(7rem, 11vw, 10rem) clamp(1rem, 5vw, 5rem) clamp(4rem, 8vw, 6rem);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 34%),
    radial-gradient(circle at 78% 34%, rgba(65, 220, 232, 0.1), transparent 28rem);
  z-index: -1;
}

.hero-content {
  max-width: 62rem;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(0.76rem, 1.8vw, 0.9rem);
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1.3rem;
  font-size: clamp(3rem, 8vw, 7.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.role-line {
  display: block;
  white-space: nowrap;
}

.animated-role {
  position: relative;
  display: inline-block;
  color: var(--cyan);
}

.animated-role::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 0.78em;
  margin-left: 0.08em;
  background: var(--cyan);
  transform: translateY(0.08em);
  animation: caret 900ms steps(1) infinite;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2.1rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 1rem;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 40rem;
  margin-bottom: 1.75rem;
  color: var(--steel);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions,
.contact-actions {
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.78rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

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

.button.primary {
  background: var(--cyan);
  color: #041012;
  box-shadow: 0 0 32px rgba(65, 220, 232, 0.24);
}

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

.project-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.section {
  padding: clamp(4rem, 9vw, 8rem) clamp(1rem, 5vw, 5rem);
}

.intro {
  max-width: 58rem;
  margin: 0 auto;
  padding-top: clamp(3rem, 7vw, 4.5rem);
  padding-bottom: clamp(2rem, 6vw, 4rem);
}

.intro p {
  margin: 0;
  color: var(--steel);
  font-size: clamp(1.25rem, 2.7vw, 2.05rem);
  line-height: 1.22;
  font-weight: 600;
}

.section-heading {
  max-width: 58rem;
  margin-bottom: 2rem;
}

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

.project-card {
  position: relative;
  min-height: 18rem;
  display: flex;
  flex-direction: column;
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
  border-radius: 8px;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  opacity: 0.78;
}

.project-card.featured {
  background: linear-gradient(145deg, rgba(25, 36, 39, 0.94), rgba(10, 13, 15, 0.82));
}

.project-meta {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
  color: var(--dim);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.project-card p {
  max-width: 26rem;
  color: var(--muted);
}

.capability-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--steel);
  font-size: 0.82rem;
}

.project-card a {
  margin-top: auto;
  color: var(--cyan);
  font-weight: 800;
  text-decoration: none;
}

.projects-page {
  scroll-behavior: smooth;
}

.project-screen {
  min-height: 100svh;
  padding: clamp(7.5rem, 10vw, 10rem) clamp(1rem, 5vw, 5rem) clamp(4rem, 7vw, 6rem);
  scroll-margin-top: 4rem;
}

.projects-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.projects-hero h1 {
  max-width: 72rem;
  font-size: clamp(3.25rem, 8vw, 7.2rem);
}

.projects-hero p:not(.eyebrow) {
  max-width: 48rem;
  color: var(--steel);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
}

.project-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  border-top: 1px solid var(--line);
}

.project-detail.alternate {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0));
  direction: rtl;
}

.project-detail.alternate > * {
  direction: ltr;
}

.project-detail-copy {
  max-width: 58rem;
}

.project-detail h2 {
  margin-bottom: 1.2rem;
  font-size: clamp(3rem, 8vw, 7.2rem);
  line-height: 0.92;
}

.project-detail-copy p:not(.eyebrow) {
  max-width: 45rem;
  margin-bottom: 1.8rem;
  color: var(--steel);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.project-visit {
  width: fit-content;
}

.project-link {
  width: fit-content;
  margin-top: auto;
  color: var(--cyan);
  font-weight: 800;
  text-decoration: none;
}

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

.project-detail-panel {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 28rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 24%, rgba(65, 220, 232, 0.16), transparent 14rem),
    rgba(12, 17, 19, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.project-detail-panel:hover {
  border-color: var(--line-hot);
  transform: translateY(-2px);
}

.project-detail-panel::before {
  content: "";
  position: absolute;
  inset: clamp(1.4rem, 4vw, 3rem);
  border: 1px solid rgba(65, 220, 232, 0.28);
  border-radius: 50%;
  opacity: 0.72;
}

.project-detail-panel span,
.project-detail-panel strong,
.project-detail-panel p {
  position: relative;
}

.project-detail-panel span {
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.project-detail-panel strong {
  margin: 0.35rem 0 0.8rem;
  font-size: clamp(1.6rem, 3vw, 3rem);
  line-height: 1;
  word-break: break-word;
}

.project-detail-panel p {
  color: var(--muted);
}

.about-hero {
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(7.5rem, 11vw, 10rem) clamp(1rem, 5vw, 5rem) clamp(4rem, 8vw, 6rem);
}

.about-hero h1 {
  max-width: 72rem;
}

.about-hero p:not(.eyebrow) {
  max-width: 48rem;
  color: var(--steel);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.about-page {
  overflow: hidden;
}

.about-page main {
  height: 100svh;
  overflow-y: hidden;
  scroll-behavior: smooth;
}

.about-page .site-footer {
  scroll-snap-align: start;
}

.about-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  height: 100svh;
  padding: clamp(7.5rem, 11vw, 10rem) clamp(1rem, 5vw, 5rem) clamp(4rem, 8vw, 6rem);
  text-align: center;
}

.about-screen {
  scroll-snap-align: start;
  scroll-margin-top: 4rem;
}

.about-section h2 {
  max-width: 36rem;
}

.about-section p:not(.eyebrow) {
  max-width: 44rem;
  color: var(--steel);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.about-line {
  max-width: 46rem;
  color: var(--steel);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.6;
}

.split {
  display: grid;
  grid-template-columns: minmax(16rem, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.4rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0));
}

.profile-copy {
  max-width: 43rem;
  color: var(--steel);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.profile-copy p:last-child {
  margin-bottom: 0;
}

.capability-list {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.capability-list span {
  padding: 0.55rem 0.72rem;
}

.contact {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.socials {
  display: grid;
  place-items: center;
  gap: 2rem;
  min-height: 68svh;
  text-align: center;
}

.socials h2 {
  max-width: 50rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

.social-link {
  --social: var(--cyan);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.62rem;
  min-height: 3.25rem;
  padding: 0.72rem 1rem 0.72rem 0.72rem;
  border: 1px solid color-mix(in srgb, var(--social), transparent 44%);
  border-radius: 999px;
  background:
    radial-gradient(circle at 28% 18%, color-mix(in srgb, var(--social), transparent 70%), transparent 2.8rem),
    rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.26);
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.social-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 50%;
  background: var(--social);
  box-shadow: 0 0 20px color-mix(in srgb, var(--social), transparent 66%);
}

.social-icon svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
  color: #fff;
}

.social-link.github .social-icon svg {
  color: #0b0d10;
}

.social-link.x .social-icon svg {
  color: #ffffff;
}

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

.social-link.linkedin {
  --social: #0a66c2;
}

.social-link.github {
  --social: #f5f5f5;
}

.social-link.x {
  --social: #ffffff;
  background: #050505;
  border-color: rgba(255, 255, 255, 0.72);
  color: #ffffff;
}

.social-link.x:hover {
  color: #ffffff;
  border-color: #ffffff;
}

.social-link.x .social-icon {
  background: #050505;
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.social-link.blog {
  --social: #ffb347;
}

.social-link.blog .social-icon svg {
  color: #080808;
}

.snap-page {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.snap-page .project-screen,
.snap-page .site-footer {
  scroll-snap-align: start;
}

.site-footer {
  flex-direction: column;
  justify-content: center;
  gap: 0.55rem;
  min-height: 8rem;
  padding: 2rem clamp(1rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.footer-made {
  color: var(--steel);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.footer-made:hover {
  color: var(--cyan);
}

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

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

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

  .project-card {
    min-height: 22rem;
  }

  .capability-list {
    grid-column: auto;
  }

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

  .socials {
    min-height: 58svh;
  }
}

@media (max-width: 700px) {
  .site-header {
    grid-template-columns: auto 1fr;
    align-items: center;
    padding: 0.64rem 1rem;
  }

  .brand-logo {
    width: 8.8rem;
  }

  .nav-links {
    justify-self: end;
    gap: 0.8rem;
    font-size: 0.86rem;
  }

  .hero {
    min-height: 100svh;
    padding-top: 6.2rem;
  }

  h1 {
    font-size: clamp(2.55rem, 11vw, 3.2rem);
  }

  .role-line {
    white-space: normal;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .project-card {
    min-height: 16rem;
  }

  .button {
    width: 100%;
  }

  .site-footer {
    align-items: center;
  }

  .project-screen {
    padding-top: 7.5rem;
  }

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

  .about-section {
    min-height: 100svh;
  }

  .project-detail-panel {
    min-height: 18rem;
  }

  .social-links,
  .social-links a {
    width: 100%;
  }
}
