:root {
  --bg: #061124;
  --bg-soft: #0a1c39;
  --panel: rgba(15, 34, 68, 0.75);
  --panel-border: rgba(122, 170, 255, 0.24);
  --text: #e9f0ff;
  --text-soft: #afc4ee;
  --accent: #62b5ff;
  --accent-soft: #96d1ff;
  --shadow: rgba(2, 9, 23, 0.55);
  --mouse-x: 50vw;
  --mouse-y: 50vh;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at 10% 20%, #0f2f62 0%, transparent 45%),
    radial-gradient(circle at 85% 15%, #0b2751 0%, transparent 35%),
    linear-gradient(155deg, #040a18 0%, #07132b 42%, #040914 100%);
  background-position: 10% 20%, 85% 15%, 0% 0%;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  animation: bgDrift 24s ease-in-out infinite alternate;
}

.bg-focus {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(280px 280px at var(--mouse-x) var(--mouse-y), rgba(102, 158, 255, 0.16), transparent 70%),
    radial-gradient(560px 560px at var(--mouse-x) var(--mouse-y), rgba(47, 101, 194, 0.1), transparent 72%);
  transition: background-position 120ms linear;
}

.page {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 0;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image: radial-gradient(circle, #fff 0.7px, transparent 0.7px);
  background-size: 4px 4px;
  z-index: 1;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.3;
  z-index: 1;
  animation: float 12s ease-in-out infinite;
}

.orb-left {
  width: 280px;
  height: 280px;
  background: #0d67db;
  left: -80px;
  top: 25vh;
}

.orb-right {
  width: 360px;
  height: 360px;
  background: #15488f;
  right: -120px;
  top: 12vh;
  animation-delay: -5s;
}

.hero,
.layout {
  position: relative;
  z-index: 3;
}

.hero {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto 0.85rem;
  padding: 1.5rem;
  position: relative;
  overflow: visible;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(380px, 1.1fr);
  gap: 1rem;
  align-items: end;
}

.layout {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto 1.6rem;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(12, 1fr);
}

.card {
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  box-shadow: 0 12px 28px -18px var(--shadow);
  padding: 1.1rem;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
  transform-style: preserve-3d;
}

.card:hover {
  border-color: rgba(163, 201, 255, 0.4);
  box-shadow: 0 22px 40px -20px var(--shadow);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.02em;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--accent-soft);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.74rem;
}

.subtitle {
  margin: 0.32rem 0 0.7rem;
  color: var(--text-soft);
  font-size: 1rem;
}

.hero-main {
  min-width: 0;
  display: grid;
  gap: 0.75rem;
}

.hero-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.hero-info-item {
  margin: 0;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(147, 187, 244, 0.2);
  background: linear-gradient(168deg, rgba(12, 30, 58, 0.5), rgba(15, 38, 73, 0.32));
}

.hero-label {
  margin: 0 0 0.16rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9dc0ee;
}

.hero-value {
  margin: 0;
  font-size: 0.88rem;
  color: #e2eeff;
}

.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.hero-location-flag {
  width: 0.98rem;
  height: 0.72rem;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(18, 34, 61, 0.42);
  filter: saturate(0.45) brightness(0.82) contrast(0.88);
  opacity: 0.88;
}

.rust-inline {
  font-size: 0.92em;
  vertical-align: -0.05em;
  margin: 0 0.1rem 0 0.08rem;
  filter: saturate(0.58) brightness(0.88) contrast(0.9);
  opacity: 0.9;
}

.info-toggle {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(162, 203, 255, 0.32);
  background: linear-gradient(165deg, rgba(18, 43, 81, 0.54), rgba(18, 49, 93, 0.35));
  color: #d7eaff;
  font: inherit;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  border-radius: 999px;
  padding: 0.42rem 0.76rem;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.info-toggle:hover {
  border-color: rgba(201, 226, 255, 0.55);
  transform: translateY(-1px);
  background: linear-gradient(165deg, rgba(23, 58, 109, 0.56), rgba(19, 51, 98, 0.38));
}

.info-toggle i {
  color: #a9d2ff;
}

.hero-detail {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(880px, calc(100% - 2rem));
  max-height: min(80vh, 720px);
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.65rem;
  border: 1px solid rgba(144, 191, 255, 0.24);
  border-radius: 12px;
  background: linear-gradient(170deg, rgba(9, 24, 48, 0.64), rgba(14, 37, 74, 0.4));
  z-index: 90;
  box-shadow: 0 18px 38px -20px rgba(2, 9, 23, 0.75);
}

.hero-detail[hidden] {
  display: none;
}

.hero-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(4, 9, 21, 0.52);
  backdrop-filter: blur(3px);
}

.hero-detail-backdrop[hidden] {
  display: none;
}

.email-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100% - 2rem));
  z-index: 95;
  padding: 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(144, 191, 255, 0.24);
  background: linear-gradient(170deg, rgba(9, 24, 48, 0.68), rgba(14, 37, 74, 0.46));
  box-shadow: 0 18px 38px -20px rgba(2, 9, 23, 0.75);
}

.email-modal[hidden] {
  display: none;
}

.email-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.email-modal-title {
  margin: 0;
  font-size: 0.84rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c5dcff;
}

.email-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 8px;
  border: 1px solid rgba(162, 203, 255, 0.32);
  background: linear-gradient(165deg, rgba(18, 43, 81, 0.54), rgba(18, 49, 93, 0.35));
  color: #d7eaff;
}

.email-options {
  display: grid;
  gap: 0.45rem;
}

.email-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.62rem;
  border-radius: 10px;
  border: 1px solid rgba(150, 188, 245, 0.2);
  background: linear-gradient(165deg, rgba(10, 27, 54, 0.52), rgba(13, 35, 69, 0.36));
}

.email-option i {
  width: 1rem;
  text-align: center;
  color: #9ec8ff;
}

.email-backdrop {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(4, 9, 21, 0.52);
  backdrop-filter: blur(2px);
}

.email-backdrop[hidden] {
  display: none;
}

.hero-detail-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.1rem;
}

.hero-detail-title {
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c5dcff;
}

.hero-detail-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 8px;
  border: 1px solid rgba(162, 203, 255, 0.32);
  background: linear-gradient(165deg, rgba(18, 43, 81, 0.54), rgba(18, 49, 93, 0.35));
  color: #d7eaff;
}

.hero-detail-close:hover {
  border-color: rgba(201, 226, 255, 0.55);
  background: linear-gradient(165deg, rgba(23, 58, 109, 0.56), rgba(19, 51, 98, 0.38));
}

.hero-detail-item {
  margin: 0;
  padding: 0.62rem 0.64rem;
  border: 1px solid rgba(143, 186, 245, 0.2);
  border-radius: 10px;
  background: rgba(10, 30, 60, 0.4);
}

.layout > section:nth-child(1),
.layout > section:nth-child(2) {
  grid-column: span 12;
}

h2 {
  margin-top: 0;
  margin-bottom: 0.65rem;
  font-size: 1.04rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}

h3 {
  margin: 0;
  font-size: 1.02rem;
}

.meta {
  margin: 0.25rem 0 0.65rem;
  color: var(--text-soft);
  font-size: 0.92rem;
}

article + article {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(164, 197, 255, 0.14);
}

ul {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.38rem;
}

li::marker {
  color: var(--accent);
}

p {
  margin: 0;
  color: var(--text-soft);
}

.hero-detail-item h3 {
  margin: 0 0 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.86rem;
  color: #deedff;
}

.hero-detail-item h3 i {
  color: #9ec8ff;
}

.hero-detail-item p {
  font-size: 0.84rem;
  line-height: 1.38;
}

.split {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

.split-tech {
  grid-template-columns: minmax(260px, 0.95fr) minmax(0, 1.45fr);
}

.language-list {
  list-style: none;
  padding-left: 0;
  gap: 0.62rem;
}

.language-item {
  background: rgba(11, 27, 53, 0.5);
  border: 1px solid rgba(146, 185, 242, 0.18);
  border-radius: 11px;
  padding: 0.55rem 0.65rem 0.62rem;
}

.language-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.42rem;
}

.language-icon {
  width: 1.65rem;
  height: 1.65rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
  background: linear-gradient(160deg, rgba(131, 172, 238, 0.2), rgba(87, 131, 194, 0.18));
  border: 1px solid rgba(153, 194, 255, 0.2);
}

.flag-icon {
  width: 1rem;
  height: 0.76rem;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(18, 34, 61, 0.42);
  filter: saturate(0.8) brightness(0.9) contrast(0.9);
  opacity: 0.9;
}

.language-name {
  font-size: 0.93rem;
  color: #e4efff;
}

.language-level {
  font-size: 0.79rem;
  color: #adc7ef;
  letter-spacing: 0.03em;
}

.language-track {
  height: 0.5rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(122, 166, 232, 0.17);
  border: 1px solid rgba(122, 166, 232, 0.14);
}

.language-fill {
  position: relative;
  display: block;
  height: 100%;
  width: var(--level);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(122, 180, 255, 0.48), rgba(178, 213, 255, 0.34));
  transform-origin: left center;
  animation: languagePulse 3.3s ease-in-out infinite;
  animation-delay: var(--delay);
}

.language-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 0%, rgba(230, 241, 255, 0.22) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: languageShimmer 4.2s ease-in-out infinite;
  animation-delay: calc(var(--delay) + 0.15s);
}

.tech-panel {
  display: grid;
  gap: 0.7rem;
}

.tech-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

.tech-header h2 {
  margin-bottom: 0;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.58rem;
  align-items: stretch;
}

.tech-group {
  grid-column: span 6;
  margin: 0;
  padding: 0.56rem 0.62rem;
  height: 148px;
  border-radius: 10px;
  border: 1px solid rgba(150, 188, 245, 0.2);
  background: linear-gradient(165deg, rgba(10, 27, 54, 0.52), rgba(13, 35, 69, 0.36));
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.tech-group:nth-child(1) {
  grid-column: span 7;
}

.tech-group:nth-child(2) {
  grid-column: span 5;
}

.tech-group:nth-child(3) {
  grid-column: span 4;
}

.tech-group:nth-child(4) {
  grid-column: span 4;
}

.tech-group:nth-child(5) {
  grid-column: span 4;
}

.tech-group h3 {
  margin: 0 0 0.32rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  letter-spacing: 0.015em;
  color: #dcedff;
}

.tech-group h3 i {
  font-size: 0.9rem;
  color: #9ec8ff;
}

.tech-list {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  gap: 0.18rem;
}

.tech-list li {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.88rem;
  color: #c4d8f6;
}

.tech-list li i {
  width: 0.95rem;
  text-align: center;
  font-size: 0.8rem;
  color: #9ec8ff;
}

.tech-list li span {
  line-height: 1.3;
}

a {
  color: #cae6ff;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 160ms ease, color 160ms ease;
}

a:hover {
  color: #ffffff;
  border-color: rgba(202, 230, 255, 0.6);
}

.contact-list {
  list-style: none;
  padding-left: 0;
  gap: 0.72rem;
}

.contact-list li a {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.contact-list li a i {
  width: 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #9ec8ff;
}

.mf-cursor {
  z-index: 140;
  color: rgba(194, 223, 255, 0.88);
}

.mf-cursor::before {
  border: 1px solid rgba(172, 207, 255, 0.52);
  background: rgba(125, 182, 255, 0.08);
}

.mf-cursor.-pointer::before,
.mf-cursor.-active::before {
  transform: scale(0.88);
  border-color: rgba(215, 234, 255, 0.72);
  background: rgba(170, 207, 255, 0.14);
}

.mf-cursor .mf-cursor-inner {
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: rgba(221, 239, 255, 0.95);
}

body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button,
body.has-custom-cursor .card,
body.has-custom-cursor .language-item,
body.has-custom-cursor h2,
body.has-custom-cursor h3 {
  cursor: none;
}

.reveal {
  opacity: 0;
  transform: translateY(20px) scale(0.99);
  animation: rise 520ms ease forwards;
}

.layout > .reveal:nth-child(1) {
  animation-delay: 120ms;
}

.layout > .reveal:nth-child(2) {
  animation-delay: 220ms;
}

.layout > .reveal:nth-child(3) {
  animation-delay: 320ms;
}

.layout > .reveal:nth-child(4) {
  animation-delay: 420ms;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bgDrift {
  0% {
    background-position: 10% 20%, 85% 15%, 0% 0%;
  }
  50% {
    background-position: 15% 28%, 78% 10%, 40% 0%;
  }
  100% {
    background-position: 8% 24%, 90% 18%, 80% 0%;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(14px);
  }
}

@keyframes languagePulse {
  0%,
  100% {
    filter: brightness(0.96);
    transform: scaleX(0.975);
  }
  50% {
    filter: brightness(1.06);
    transform: scaleX(1);
  }
}

@keyframes languageShimmer {
  0%,
  18% {
    transform: translateX(-100%);
  }
  48% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
  }

  .language-fill {
    animation: none;
  }

  .language-fill::after {
    animation: none;
  }

  .bg-focus {
    background: none;
  }
}

@media (hover: none), (pointer: coarse) {
  .mf-cursor {
    display: none;
  }
}

@media (max-width: 880px) {
  .layout > section:nth-child(1),
  .layout > section:nth-child(2),
  .layout > section:nth-child(3),
  .layout > section:nth-child(4) {
    grid-column: span 12;
  }

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

  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

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

  .split-tech {
    grid-template-columns: 1fr;
  }

  .tech-group,
  .tech-group:nth-child(1),
  .tech-group:nth-child(2),
  .tech-group:nth-child(3),
  .tech-group:nth-child(4),
  .tech-group:nth-child(5) {
    grid-column: span 12;
    height: auto;
  }
}

@media (max-width: 560px) {
  .hero,
  .card {
    padding: 1rem;
  }

  .hero {
    margin-top: 0.8rem;
  }

  .subtitle {
    font-size: 0.95rem;
  }

  .info-toggle {
    width: 100%;
    justify-content: center;
  }

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

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