:root {
  color-scheme: dark;
  --bg: #06151f;
  --bg-soft: #0b2231;
  --panel: rgba(9, 28, 40, 0.84);
  --panel-strong: rgba(11, 43, 62, 0.82);
  --text: #edf8ff;
  --muted: #a9c4d6;
  --line: rgba(138, 212, 255, 0.18);
  --sky: #0ba7ee;
  --sky-deep: #69d6ff;
  --aqua: #64d7ff;
  --gold: #f0b940;
  --header-bg: rgba(4, 18, 28, 0.78);
  --header-shadow: 0 16px 44px rgba(0, 0, 0, 0.26);
  --body-bg:
    radial-gradient(circle at top left, rgba(11, 167, 238, 0.18), transparent 34rem),
    linear-gradient(180deg, #06131d 0%, var(--bg) 46%, #0b2231 100%);
  --hero-filter: saturate(0.92) brightness(0.5);
  --hero-overlay:
    linear-gradient(90deg, rgba(3, 15, 24, 0.94) 0%, rgba(4, 18, 28, 0.82) 38%, rgba(4, 18, 28, 0.34) 76%),
    linear-gradient(0deg, var(--bg) 0%, rgba(6, 21, 31, 0) 34%);
  --hero-title: #eefaff;
  --hero-shadow: 0 16px 42px rgba(0, 0, 0, 0.4);
  --secondary-bg: rgba(255, 255, 255, 0.08);
  --section-alt: rgba(255, 255, 255, 0.035);
  --footer-bg: rgba(4, 18, 28, 0.7);
  --tag-bg: rgba(100, 215, 255, 0.1);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.25);
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #f4fbff;
  --bg-soft: #e8f7ff;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: #eaf7ff;
  --text: #12324a;
  --muted: #527188;
  --line: rgba(18, 82, 126, 0.16);
  --sky-deep: #087ac5;
  --header-bg: rgba(255, 255, 255, 0.76);
  --header-shadow: 0 12px 40px rgba(18, 82, 126, 0.09);
  --body-bg:
    radial-gradient(circle at top left, rgba(116, 215, 255, 0.26), transparent 36rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 42%, #e8f7ff 100%);
  --hero-filter: none;
  --hero-overlay:
    linear-gradient(90deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.9) 34%, rgba(255, 255, 255, 0.18) 72%),
    linear-gradient(0deg, #ffffff 0%, rgba(255, 255, 255, 0) 34%);
  --hero-title: #0c75bd;
  --hero-shadow: 0 12px 34px rgba(255, 255, 255, 0.78);
  --secondary-bg: rgba(255, 255, 255, 0.68);
  --section-alt: rgba(255, 255, 255, 0.56);
  --footer-bg: rgba(255, 255, 255, 0.52);
  --tag-bg: rgba(230, 247, 255, 0.74);
  --shadow: 0 22px 70px rgba(34, 137, 211, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 54px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--header-shadow);
  backdrop-filter: blur(18px);
}

.brand,
.header-actions,
nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-actions {
  gap: 18px;
}

.brand {
  color: var(--sky-deep);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: flex;
  align-items: center;
  width: 52px;
  height: 32px;
  padding: 2px 4px;
  background: #ffffff;
  border: 1px solid rgba(11, 167, 238, 0.16);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(11, 167, 238, 0.12);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

nav a {
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 700;
  text-decoration: none;
}

nav a:hover {
  color: var(--sky-deep);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px 0 8px;
  background: var(--secondary-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
}

.toggle-icon {
  position: relative;
  display: inline-flex;
  width: 24px;
  height: 24px;
  background: var(--sky-deep);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(105, 214, 255, 0.36);
}

.toggle-icon::after {
  content: "";
  position: absolute;
  inset: 4px 3px 4px 9px;
  background: var(--header-bg);
  border-radius: 50%;
}

body[data-theme="light"] .toggle-icon {
  background: var(--gold);
  box-shadow: 0 0 18px rgba(240, 185, 64, 0.35);
}

body[data-theme="light"] .toggle-icon::after {
  inset: 5px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 -9px 0 -5px var(--gold),
    0 9px 0 -5px var(--gold),
    9px 0 0 -5px var(--gold),
    -9px 0 0 -5px var(--gold);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 110px clamp(20px, 6vw, 88px) 72px;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  filter: var(--hero-filter);
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  background: var(--hero-overlay);
}

.hero-content {
  position: relative;
  max-width: 700px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--sky-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(3.1rem, 8vw, 7rem);
  line-height: 0.96;
  letter-spacing: 0;
  color: var(--hero-title);
  text-shadow: var(--hero-shadow);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.35rem;
}

.hero p:not(.eyebrow),
.intro > p,
.contact p {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.hero-actions,
.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: linear-gradient(135deg, var(--sky), var(--sky-deep));
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(8, 122, 197, 0.22);
}

.button.secondary {
  border: 1px solid var(--line);
  background: var(--secondary-bg);
  color: var(--sky-deep);
}

.section {
  padding: 82px clamp(20px, 6vw, 88px);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1fr);
  gap: 40px;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 30px;
}

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

.developer-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  min-height: 292px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.developer-card.empty {
  background: var(--panel-strong);
  border-style: dashed;
}

.avatar {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  background: linear-gradient(135deg, var(--sky), var(--aqua));
  color: #ffffff;
  border-radius: 8px;
  font-weight: 900;
}

.avatar.alt {
  background: linear-gradient(135deg, #49c2ff, #8be2ff);
  color: #0b4f7e;
}

.avatar.plus {
  background: var(--gold);
  color: #4d3600;
  font-size: 2rem;
}

.image-avatar {
  overflow: hidden;
  padding: 0;
  background: var(--panel-strong);
}

.image-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.role {
  margin-bottom: 6px;
  color: var(--sky-deep);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.card-body p:not(.role),
.project-list p {
  color: var(--muted);
  line-height: 1.55;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.tags span {
  padding: 7px 9px;
  background: var(--tag-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.card-body a {
  color: var(--sky-deep);
  font-weight: 800;
}

.projects {
  background: var(--section-alt);
  border-block: 1px solid var(--line);
}

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

.project-list article {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.project-list span {
  color: var(--sky);
  font-size: 1.4rem;
  font-weight: 900;
}

.affiliate-list {
  display: grid;
  gap: 12px;
}

.affiliate-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 86px;
  padding: 12px 16px 12px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.affiliate-row img {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.affiliate-name {
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 900;
  text-decoration: none;
}

a.affiliate-name {
  color: var(--sky-deep);
}

.affiliate-status {
  color: var(--sky-deep);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.muted-link {
  color: var(--muted);
}

.contact {
  justify-content: space-between;
  background: var(--panel);
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 34px;
  align-items: end;
  padding-top: 150px;
  background:
    linear-gradient(180deg, rgba(11, 167, 238, 0.12), transparent),
    var(--section-alt);
  border-bottom: 1px solid var(--line);
}

.profile-heading {
  max-width: 840px;
}

.profile-heading p:not(.eyebrow),
.profile-layout p {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.65;
}

.profile-card,
.profile-layout > article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.profile-card {
  padding: 24px;
}

.profile-card .avatar {
  width: 92px;
  height: 92px;
  margin-bottom: 18px;
  font-size: 1.4rem;
}

.profile-card .large-avatar {
  width: 128px;
  height: 128px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 22px;
}

.single-profile {
  grid-template-columns: minmax(0, 760px);
}

.profile-layout > article {
  padding: 26px;
}

.showcase {
  border-top: 1px solid var(--line);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.showcase-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

footer {
  padding: 28px clamp(20px, 6vw, 88px);
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--footer-bg);
}

footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .developer-grid,
  .intro,
  .profile-hero,
  .profile-layout,
  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .developer-card {
    min-height: auto;
  }
}

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

  .header-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  nav {
    width: 100%;
    justify-content: space-between;
  }

  .theme-toggle {
    align-self: flex-start;
  }

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

  .developer-card {
    grid-template-columns: 1fr;
  }

  .affiliate-row {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .affiliate-row img {
    width: 52px;
    height: 52px;
  }

  .affiliate-status {
    grid-column: 2;
  }

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