:root {
  --bg: #eef4ff;
  --bg-accent: #dbe8ff;
  --ink: #152033;
  --muted: #52607a;
  --card: rgba(255, 255, 255, 0.75);
  --line: rgba(40, 69, 130, 0.12);
  --highlight: #2563eb;
  --highlight-soft: #dbeafe;
  --badge: rgba(255, 255, 255, 0.92);
  --shadow: 0 24px 80px rgba(37, 99, 235, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.82), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.12), transparent 24%),
    radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.1), transparent 22%),
    linear-gradient(145deg, var(--bg) 0%, #f7faff 45%, var(--bg-accent) 100%);
}

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

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

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

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 18px;
  z-index: 10;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.88rem;
}

.nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero {
  padding: 72px 0 32px;
  text-align: center;
}

.eyebrow,
.section-label {
  margin: 0 0 14px;
  color: var(--highlight);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 700;
}

.hero h1 {
  width: min(880px, 100%);
  margin: 0 auto;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.hero h1 span {
  display: inline-block;
  font-family: "Instrument Serif", serif;
  font-style: italic;
  color: var(--highlight);
  font-weight: 400;
}

.lead {
  width: min(700px, 100%);
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.7;
}

.hero-stage {
  position: relative;
  min-height: 760px;
  margin-top: 42px;
  isolation: isolate;
}

.orbit {
  position: absolute;
  inset: 50% auto auto 50%;
  border: 1px dashed rgba(29, 26, 22, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-one {
  width: min(88vw, 760px);
  height: min(88vw, 760px);
}

.orbit-two {
  width: min(68vw, 560px);
  height: min(68vw, 560px);
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 8% 10% 6%;
  border-radius: 48px;
  background:
    radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.1), transparent 38%),
    radial-gradient(circle at 24% 30%, rgba(14, 165, 233, 0.1), transparent 20%),
    radial-gradient(circle at 78% 68%, rgba(59, 130, 246, 0.1), transparent 18%);
  filter: blur(8px);
  z-index: 0;
}

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

.profile-card {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(480px, calc(100% - 24px));
  padding: 30px;
  border-radius: 32px;
  z-index: 2;
}

.profile-image-wrap {
  width: 158px;
  height: 158px;
  margin: 0 auto 18px;
  padding: 7px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.24), rgba(255, 255, 255, 0.92));
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-kicker {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.profile-card h2 {
  margin: 8px 0 12px;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.02;
}

.profile-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.profile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.button-full {
    grid-column: 1 / -1;
    width: 100%;
    display: flex;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(21, 32, 51, 0.12);
}

.button-icon {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.button-portfolio {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.16);
}

.button-portfolio .button-icon {
  background: #2563eb;
  color: #fff;
}

.button-linkedin {
  background: rgba(10, 102, 194, 0.12);
  color: #0a66c2;
  border-color: rgba(10, 102, 194, 0.16);
}

.button-linkedin .button-icon {
  background: #0a66c2;
  color: #fff;
}

.button-github {
  background: rgba(17, 24, 39, 0.1);
  color: #111827;
  border-color: rgba(17, 24, 39, 0.14);
}

.button-github .button-icon {
  background: #111827;
  color: #fff;
}

.button-wordpress {
  background: rgba(33, 117, 155, 0.12);
  color: #21759b;
  border-color: rgba(33, 117, 155, 0.16);
}

.button-wordpress .button-icon {
  background: #21759b;
  color: #fff;
}

.button-play {
  background: rgba(52, 168, 83, 0.12);
  color: #188038;
  border-color: rgba(52, 168, 83, 0.16);
}

.button-play .button-icon {
  background: linear-gradient(135deg, #34a853, #4285f4);
  color: #fff;
}

.button-talk {
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
  border-color: rgba(234, 88, 12, 0.16);
}

.button-talk .button-icon {
  background: #ea580c;
  color: #fff;
}

.floating-badge {
  position: absolute;
  top: var(--badge-top, auto);
  right: var(--badge-right, auto);
  bottom: var(--badge-bottom, auto);
  left: var(--badge-left, auto);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(29, 26, 22, 0.08);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(232, 241, 255, 0.86));
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.1);
  font-weight: 700;
  font-size: 0.95rem;
  animation: drift 6s ease-in-out infinite;
  transition:
    top 900ms ease,
    right 900ms ease,
    bottom 900ms ease,
    left 900ms ease,
    transform 250ms ease,
    opacity 250ms ease,
    box-shadow 250ms ease,
    background 250ms ease,
    border-color 250ms ease;
  z-index: 1;
}

.floating-badge::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.08);
}

.badge-react { --badge-top: 10%; --badge-left: 8%; animation-delay: 0s; }
.badge-next { --badge-top: 16%; --badge-right: 7%; animation-delay: 0.8s; }
.badge-js { --badge-top: 31%; --badge-left: 3%; animation-delay: 1.2s; }
.badge-node { --badge-top: 34%; --badge-right: 4%; animation-delay: 1.8s; }
.badge-php { --badge-bottom: 29%; --badge-left: 7%; animation-delay: 2.2s; }
.badge-wp { --badge-bottom: 15%; --badge-left: 14%; animation-delay: 1.3s; }
.badge-firebase { --badge-bottom: 23%; --badge-right: 4%; animation-delay: 2.5s; }
.badge-api { --badge-bottom: 10%; --badge-right: 12%; animation-delay: 0.3s; }
.badge-tailwind { --badge-top: 22%; --badge-left: 20%; animation-delay: 0.5s; }
.badge-mysql { --badge-top: 22%; --badge-right: 18%; animation-delay: 1.6s; }
.badge-aws { --badge-bottom: 32%; --badge-right: 18%; animation-delay: 2s; }
.badge-gql { --badge-bottom: 36%; --badge-left: 18%; animation-delay: 0.9s; }

.floating-badge.is-swapping {
  opacity: 0.8;
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.16);
}

.floating-badge.is-featured {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.98), rgba(14, 165, 233, 0.92));
  border-color: rgba(37, 99, 235, 0.3);
  color: #f8fbff;
  box-shadow: 0 24px 48px rgba(37, 99, 235, 0.22);
  transform: translateY(-6px) scale(1.04);
}

.floating-badge.is-featured::before {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.16);
}

.info-grid,
.timeline-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 22px;
}

.panel {
  border-radius: 28px;
  padding: 28px;
}

.intro-panel h3,
.stack-panel h3,
.contact-panel h3 {
  margin: 0 0 14px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.08;
}

.intro-panel p,
.stack-panel p,
.timeline-item p,
.contact-list li,
.stat p {
  color: var(--muted);
  line-height: 1.7;
}

.stat-panel {
  display: grid;
  gap: 18px;
}

.stat {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(29, 26, 22, 0.08);
}

.stat span {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.stack-panel {
  margin-top: 22px;
}

.projects-panel,
.products-panel {
  margin-top: 22px;
}

.product-groups-grid {
  display: grid;
  gap: 28px;
  margin-top: 20px;
}

.product-group {
  display: grid;
  gap: 14px;
}

.group-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.group-heading h4 {
  margin: 0;
  font-size: 1.15rem;
}

.group-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.group-open-source { background: #2563eb; }
.group-web-apps { background: #0f766e; }
.group-games { background: #ea580c; }
.group-extensions { background: #7c3aed; }
.group-plugins { background: #16a34a; }
.group-android { background: #db2777; }

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

.project-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(40, 69, 130, 0.1);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.12);
}

.project-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.project-category {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-card h5 {
  margin: 0;
  font-size: 1.08rem;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-open-source {
  border-color: rgba(37, 99, 235, 0.22);
}

.category-open-source .project-icon {
  background: #2563eb;
}

.category-open-source .project-category,
.category-open-source .project-link {
  color: #2563eb;
}

.category-web-apps {
  border-color: rgba(15, 118, 110, 0.24);
}

.category-web-apps .project-icon {
  background: #0f766e;
}

.category-web-apps .project-category,
.category-web-apps .project-link {
  color: #0f766e;
}

.category-games {
  border-color: rgba(234, 88, 12, 0.24);
}

.category-games .project-icon {
  background: #ea580c;
}

.category-games .project-category,
.category-games .project-link {
  color: #ea580c;
}

.category-extensions {
  border-color: rgba(124, 58, 237, 0.24);
}

.category-extensions .project-icon {
  background: #7c3aed;
}

.category-extensions .project-category,
.category-extensions .project-link {
  color: #7c3aed;
}

.category-plugins {
  border-color: rgba(22, 163, 74, 0.24);
}

.category-plugins .project-icon {
  background: #16a34a;
}

.category-plugins .project-category,
.category-plugins .project-link {
  color: #16a34a;
}

.category-android {
  border-color: rgba(219, 39, 119, 0.24);
}

.category-android .project-icon {
  background: #db2777;
}

.category-android .project-category,
.category-android .project-link {
  color: #db2777;
}

.stack-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.stack-groups div {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(29, 26, 22, 0.08);
}

.stack-groups h4,
.timeline-item h4 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.stack-groups p,
.timeline-item p {
  margin: 0;
}

.timeline-panel {
  display: grid;
  gap: 20px;
}

.timeline-item {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(29, 26, 22, 0.08);
}

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

.timeline-item span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--highlight);
  font-size: 0.88rem;
  font-weight: 700;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 20px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(29, 26, 22, 0.08);
  background: rgba(255, 255, 255, 0.48);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(21, 32, 51, 0.08);
  border-color: rgba(29, 26, 22, 0.14);
}

.contact-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  flex: 0 0 auto;
  background: rgba(21, 32, 51, 0.08);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.contact-text {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.45;
  word-break: break-word;
}

.contact-text strong {
  color: var(--ink);
}

.contact-email .contact-icon {
  background: #ea580c;
  color: #fff;
}

.contact-portfolio .contact-icon {
  background: #2563eb;
  color: #fff;
}

.contact-linkedin .contact-icon {
  background: #0a66c2;
  color: #fff;
}

.contact-github .contact-icon {
  background: #111827;
  color: #fff;
}

.contact-wordpress .contact-icon {
  background: #21759b;
  color: #fff;
}

.contact-play .contact-icon {
  background: linear-gradient(135deg, #34a853, #4285f4);
  color: #fff;
}

.contact-stackoverflow .contact-icon {
  background: #f97316;
  color: #fff;
}

@keyframes drift {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@media (max-width: 980px) {
  .info-grid,
  .timeline-section,
  .stack-groups,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
  }

  .hero-stage::before {
    inset: 0;
    border-radius: 36px;
  }

  .orbit {
    display: none;
  }

  .profile-card {
    position: relative;
    inset: auto;
    transform: none;
    order: 1;
  }

  .floating-badge {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    animation-duration: 4.8s;
    width: calc(50% - 9px);
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .hero-stage {
    align-items: stretch;
    gap: 12px;
  }

  .profile-card {
    width: 100%;
    padding: 26px 20px;
  }

  .profile-actions {
    grid-template-columns: 1fr;
  }

  .floating-badge {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    order: 2;
    padding: 14px 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 246, 255, 0.92));
  }

  .badge-react { order: 3; }
  .badge-next { order: 4; }
  .badge-js { order: 5; }
  .badge-node { order: 6; }
  .badge-php { order: 7; }
  .badge-wp { order: 8; }
  .badge-firebase { order: 9; }
  .badge-api { order: 10; }
  .badge-tailwind { order: 11; }
  .badge-mysql { order: 12; }
  .badge-aws { order: 13; }
  .badge-gql { order: 14; }
}

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

  .topbar {
    border-radius: 28px;
    padding: 16px;
    flex-direction: column;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    padding-top: 42px;
  }

  .hero-stage {
    min-height: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
  }

  .orbit,
  .floating-badge {
    position: static;
    transform: none;
  }

  .orbit {
    display: none;
  }

  .profile-card {
    position: static;
    transform: none;
    width: 100%;
    order: -1;
    grid-column: 1 / -1;
  }

  .floating-badge {
    animation-duration: 4.8s;
    min-height: 58px;
  }

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

@media (max-width: 560px) {
  .hero-stage {
    grid-template-columns: 1fr;
  }

  .floating-badge {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}
