:root {
  --background: #030914;
  --background-soft: #06101d;
  --surface: #091422;
  --surface-light: #0c1929;
  --surface-hover: #102038;

  --border: rgba(111, 167, 224, 0.18);
  --border-bright: rgba(69, 147, 255, 0.42);

  --text: #f4f7fc;
  --text-soft: #c3cddd;
  --muted: #8495ac;

  --blue: #2f83ff;
  --blue-light: #65adff;
  --cyan: #4be0e8;
  --purple: #9174ff;
  --gold: #f5b942;

  --shadow-blue: 0 0 35px rgba(47, 131, 255, 0.16);
  --shadow-card: 0 22px 60px rgba(0, 0, 0, 0.22);

  --radius-small: 10px;
  --radius: 16px;
  --radius-large: 26px;

  --container: 1420px;
  --header-height: 92px;
}

/* Reset */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  margin: 0;
  overflow-x: hidden;

  background:
    radial-gradient(
      circle at 75% 0%,
      rgba(35, 111, 218, 0.08),
      transparent 30%
    ),
    var(--background);

  color: var(--text);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;

  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.012) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.012) 1px,
      transparent 1px
    );

  background-size: 70px 70px;
  content: "";
  pointer-events: none;
}

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

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

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

/* General */

.container {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
}

.section {
  padding: 104px 0;
  border-top: 1px solid var(--border);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 42px;
}

.section-heading h2,
.about__content h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-label {
  margin: 0 0 10px;
  color: var(--blue-light);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.text-link,
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  color: var(--blue-light);
  font-size: 0.92rem;
  font-weight: 600;

  transition:
    color 180ms ease,
    transform 180ms ease;
}

.text-link:hover,
.project-link:hover {
  color: var(--text);
  transform: translateX(4px);
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  min-height: 52px;
  padding: 0 27px;

  border: 1px solid transparent;
  border-radius: var(--radius-small);

  font-size: 0.92rem;
  font-weight: 650;

  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

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

.button--primary {
  background: linear-gradient(135deg, #186bea, #2f8bff);
  box-shadow: 0 12px 35px rgba(47, 131, 255, 0.24);
}

.button--primary:hover {
  box-shadow: 0 15px 42px rgba(47, 131, 255, 0.38);
}

.button--secondary {
  border-color: var(--border-bright);
  background: rgba(6, 16, 29, 0.65);
}

.button--secondary:hover {
  border-color: var(--blue-light);
  background: rgba(47, 131, 255, 0.08);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  height: var(--header-height);

  border-bottom: 1px solid var(--border);
  background: rgba(3, 9, 20, 0.86);

  backdrop-filter: blur(18px);
}

.navbar {
  display: flex;
  align-items: center;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.brand__logo {
  color: var(--blue);
  font-size: 2.35rem;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.12em;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__text strong {
  font-size: 1.05rem;
  font-weight: 650;
}

.brand__text small {
  margin-top: 4px;
  color: var(--blue-light);
  font-size: 0.75rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 39px;
  margin: 0 auto;
}

.nav__link {
  position: relative;
  color: var(--text-soft);
  font-size: 0.88rem;
  transition: color 180ms ease;
}

.nav__link::after {
  position: absolute;
  right: 0;
  bottom: -18px;
  left: 0;

  height: 2px;
  background: var(--blue);

  content: "";
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.nav__link:hover,
.nav__link.active {
  color: var(--text);
}

.nav__link:hover::after,
.nav__link.active::after {
  transform: scaleX(1);
}

.github-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  padding: 10px 16px;

  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.018);

  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 600;

  transition:
    border-color 180ms ease,
    color 180ms ease,
    background 180ms ease;
}

.github-button img {
  width: 17px;
  height: 17px;
  object-fit: contain;
  filter: invert(1);
}

.github-button:hover {
  border-color: var(--border-bright);
  background: rgba(47, 131, 255, 0.07);
  color: var(--text);
}

.nav-toggle {
  display: none;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--header-height));
  border-bottom: 1px solid var(--border);
}

.hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(500px, 0.92fr);
  align-items: stretch;
  min-height: calc(100vh - var(--header-height));
}

.hero__content {
  position: relative;
  z-index: 10;

  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: 85px 0 68px;
}

.eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;

  margin-bottom: 30px;

  color: var(--blue-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.eyebrow span:not(:last-child)::after {
  margin-left: 18px;
  color: var(--blue);
  content: "•";
}

.hero h1 {
  max-width: 750px;
  margin: 0;

  font-size: clamp(3.4rem, 6vw, 6.35rem);
  font-weight: 520;
  line-height: 1.07;
  letter-spacing: -0.055em;
}

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

.hero__description {
  max-width: 650px;
  margin: 32px 0 0;

  color: var(--text-soft);
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 37px;
}

.hero__disciplines {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 20px;

  max-width: 735px;
  margin-top: 55px;
}

.discipline {
  display: flex;
  flex-direction: column;
  gap: 11px;

  color: var(--text-soft);
  font-size: 0.77rem;
}

.discipline__icon {
  color: var(--blue-light);
  font-family: monospace;
  font-size: 1.55rem;
}

.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-width: 0;
  min-height: 720px;

  overflow: visible;
  isolation: isolate;
}

.hero__dna-canvas {
  position: absolute;
  top: 50%;
  left: 42%;
  z-index: 2;

  width: 500px;
  max-width: none;
  height: 650px;

  transform:
    translate(-50%, -50%)
    scale(0.9);
}

.hero__dna-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
}

.hero__image-glow {
  position: absolute;
  inset: 18% 22% 16% 8%;
  z-index: 1;

  border-radius: 50%;

  background: radial-gradient(
    circle,
    rgba(39, 132, 255, 0.2) 0%,
    rgba(75, 224, 232, 0.1) 42%,
    transparent 72%
  );

  opacity: 0.8;
  filter: blur(100px);
  pointer-events: none;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
}

.hero__glow--one {
  top: 14%;
  right: 14%;

  width: 320px;
  height: 320px;

  background: rgba(21, 102, 236, 0.12);
}

.hero__glow--two {
  bottom: 8%;
  left: -160px;

  width: 300px;
  height: 300px;

  background: rgba(40, 130, 255, 0.07);
}

.hero__particle-field {
  position: absolute;
  inset: 12% 9% 12% 15%;
  z-index: 1;
  pointer-events: none;

  opacity: 0.52;

  background-image:
    radial-gradient(circle at 15% 30%, rgba(75, 224, 232, 0.9) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 20%, rgba(47, 131, 255, 0.8) 0 1.2px, transparent 2.4px),
    radial-gradient(circle at 82% 58%, rgba(75, 224, 232, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 45% 72%, rgba(47, 131, 255, 0.8) 0 1px, transparent 2px),
    radial-gradient(circle at 66% 84%, rgba(75, 224, 232, 0.65) 0 1px, transparent 2px);

  animation: particleFloat 12s ease-in-out infinite;
}

.transcription-focus {
  position: absolute;
  top: 41%;
  left: 37%;
  z-index: 3;

  width: 125px;
  height: 125px;
  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(75, 224, 232, 0.28) 0%,
      rgba(47, 131, 255, 0.16) 45%,
      transparent 72%
    );

  filter: blur(18px);
  pointer-events: none;
  animation: pulseFocus 3.5s ease-in-out infinite;
}

.sequence-ribbon {
  display: none;
}

.codon-orbit {
  position: absolute;
  top: 15%;
  right: 20px;
  z-index: 5;

  display: flex;
  gap: 10px;
  align-items: center;

  transform: scale(0.78);
  transform-origin: top right;
}

.codon-orbit__base {
  display: grid;
  place-items: center;

  width: 58px;
  height: 58px;
  border: 1px solid currentColor;
  border-radius: 50%;

  background: rgba(4, 15, 32, 0.88);
  backdrop-filter: blur(10px);

  font-size: 1.35rem;
  font-weight: 700;

  box-shadow:
    0 0 18px rgba(75, 224, 232, 0.16),
    inset 0 0 14px rgba(255, 255, 255, 0.02);

  animation: orbitFloat 3.6s ease-in-out infinite;
}

.codon-orbit__base:nth-child(2) {
  animation-delay: 0.45s;
}

.codon-orbit__base:nth-child(3) {
  animation-delay: 0.9s;
}

/* Projects */

.projects {
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(30, 106, 221, 0.05),
      transparent 30%
    );
}

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

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: var(--radius);

  background:
    linear-gradient(
      160deg,
      rgba(13, 27, 46, 0.95),
      rgba(6, 16, 29, 0.96)
    );

  box-shadow: var(--shadow-card);

  transition:
    border-color 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease;
}

.project-card:hover {
  border-color: var(--border-bright);
  box-shadow: var(--shadow-blue);
  transform: translateY(-7px);
}

.project-card__image {
  position: relative;
  display: block;
  overflow: hidden;

  aspect-ratio: 1.72 / 1;
  margin: 14px 14px 0;

  border-radius: 11px;
  background: #050b13;
}

.project-card__image::after {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      to top,
      rgba(4, 10, 18, 0.34),
      transparent 65%
    );

  content: "";
  pointer-events: none;
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.project-card:hover .project-card__image img {
  transform: scale(1.045);
}

.project-card__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px 21px 21px;
}

.project-card__category {
  margin: 0 0 8px;

  color: var(--blue-light);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.project-card h3,
.additional-card h3 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -0.025em;
}

.project-card__description,
.additional-card__content > p:not(.project-card__category) {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 0.86rem;
  line-height: 1.72;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-list span {
  padding: 6px 10px;

  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(5, 13, 24, 0.72);

  color: var(--muted);
  font-size: 0.68rem;
}

.project-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-top: auto;
  padding-top: 27px;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;

  border: 1px solid var(--border);
  border-radius: 50%;

  transition:
    border-color 180ms ease,
    background 180ms ease;
}

.icon-link:hover {
  border-color: var(--blue-light);
  background: rgba(47, 131, 255, 0.08);
}

.icon-link img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: invert(1);
}

/* Featured-project CTA */

.projects-cta {
  position: relative;
  z-index: 1;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;

  min-width: 300px;
  padding: 18px 30px;

  border: 1px solid rgba(104, 176, 255, 0.95);
  border-radius: 15px;

  background:
    linear-gradient(
      135deg,
      rgba(40, 93, 255, 0.32),
      rgba(102, 52, 255, 0.28)
    );

  color: #ffffff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;

  box-shadow:
    0 0 8px rgba(78, 157, 255, 0.9),
    0 0 22px rgba(67, 126, 255, 0.55),
    0 0 45px rgba(87, 70, 255, 0.32),
    inset 0 0 20px rgba(91, 146, 255, 0.08);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}

.projects-cta::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -35px;
  z-index: -1;

  width: 340px;
  height: 80px;

  transform: translateX(-50%);

  background:
    radial-gradient(
      ellipse,
      rgba(64, 82, 255, 0.55),
      rgba(62, 111, 255, 0.25) 40%,
      transparent 72%
    );

  filter: blur(18px);
  pointer-events: none;
}

.projects-cta::after {
  content: "";
  position: absolute;
  left: 10%;
  bottom: -14px;

  width: 85%;
  height: 3px;

  border-radius: 50%;

  background:
    linear-gradient(
      90deg,
      transparent,
      #586dff,
      #62c8ff,
      #586dff,
      transparent
    );

  box-shadow:
    0 0 8px rgba(91, 126, 255, 1),
    0 0 18px rgba(70, 105, 255, 0.9),
    0 0 30px rgba(73, 91, 255, 0.55);

  transform: rotate(-3deg);
  pointer-events: none;
}

.projects-cta__sparkle {
  color: #eef7ff;
  font-size: 27px;

  text-shadow:
    0 0 6px #ffffff,
    0 0 12px #73b7ff,
    0 0 25px #6a60ff;

  animation: projectsSparkle 2.2s ease-in-out infinite;
}

.projects-cta__arrow {
  color: #76bdff;
  font-size: 23px;

  text-shadow:
    0 0 10px rgba(74, 165, 255, 0.9);

  transition: transform 0.25s ease;
}

.projects-cta:hover {
  color: #ffffff;

  transform: translateY(-4px) scale(1.02);
  border-color: #8dcbff;

  background:
    linear-gradient(
      135deg,
      rgba(43, 106, 255, 0.46),
      rgba(113, 55, 255, 0.42)
    );

  box-shadow:
    0 0 12px rgba(91, 180, 255, 1),
    0 0 30px rgba(73, 141, 255, 0.75),
    0 0 60px rgba(88, 68, 255, 0.45),
    inset 0 0 22px rgba(125, 172, 255, 0.13);
}

.projects-cta:hover .projects-cta__arrow {
  transform: translateX(7px);
}

@keyframes projectsSparkle {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.25) rotate(10deg);
    opacity: 1;
  }
}

/* Skills */

.skills {
  background: rgba(5, 13, 24, 0.4);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.skill-card {
  position: relative;
  overflow: hidden;

  min-height: 330px;
  padding: 25px 20px;

  border: 1px solid var(--border);
  border-radius: var(--radius);

  background:
    linear-gradient(
      160deg,
      rgba(13, 27, 46, 0.88),
      rgba(6, 16, 29, 0.94)
    );

  transition:
    border-color 200ms ease,
    transform 200ms ease;
}

.skill-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;

  height: 2px;
  background: currentColor;

  content: "";
  opacity: 0.55;
}

.skill-card:hover {
  border-color: currentColor;
  transform: translateY(-5px);
}

.skill-card--blue {
  color: var(--blue-light);
}

.skill-card--cyan {
  color: var(--cyan);
}

.skill-card--purple {
  color: var(--purple);
}

.skill-card--gold {
  color: var(--gold);
}

.skill-card__icon {
  margin-bottom: 17px;
  font-family: monospace;
  font-size: 1.7rem;
}

.skill-card h3 {
  margin: 0;
  font-size: 1.08rem;
}

.skill-card__skills {
  margin: 15px 0 0;
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.75;
}

.skill-card__usage {
  margin-top: 23px;
}

.skill-card__usage strong {
  font-size: 0.72rem;
  font-weight: 700;
}

.skill-card__usage p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 0.8rem;
  line-height: 1.65;
}

.case-study-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;

  margin-top: 19px;
  padding: 22px 24px;

  border: 1px solid var(--border);
  border-radius: var(--radius);

  background:
    linear-gradient(
      90deg,
      rgba(12, 28, 49, 0.88),
      rgba(6, 16, 29, 0.94)
    );
}

.case-study-banner__icon {
  color: var(--blue-light);
  font-size: 1.8rem;
}

.case-study-banner h3 {
  margin: 0;
  font-size: 1.02rem;
}

.case-study-banner p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

/* Additional projects */

.all-projects {
  background:
    radial-gradient(
      circle at 80% 20%,
      rgba(47, 131, 255, 0.045),
      transparent 30%
    );
}

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

.additional-card {
  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.additional-card__image,
.additional-card__placeholder {
  aspect-ratio: 1.8 / 1;
}

.additional-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.additional-card__placeholder {
  display: grid;
  place-items: center;

  background:
    radial-gradient(
      circle,
      rgba(47, 131, 255, 0.22),
      transparent 45%
    ),
    linear-gradient(145deg, #0a1a30, #06101c);
}

.additional-card__placeholder span {
  color: var(--blue-light);
  font-size: 2.3rem;
  font-weight: 250;
  letter-spacing: 0.08em;
}

.additional-card__content {
  padding: 23px;
}

/* About */

.about {
  background:
    linear-gradient(
      145deg,
      rgba(9, 24, 43, 0.38),
      transparent 60%
    );
}

.about__layout {
  display: grid;
  grid-template-columns: minmax(310px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: clamp(50px, 8vw, 125px);
}

.about__image-wrapper {
  position: relative;
  max-width: 500px;
}

.about__image-border {
  position: absolute;
  inset: 24px -22px -22px 24px;

  border: 1px solid var(--border-bright);
  border-radius: var(--radius-large);
}

.about__image {
  position: relative;
  z-index: 1;

  width: 100%;
  aspect-ratio: 0.9 / 1;
  object-fit: cover;

  border-radius: var(--radius-large);

  filter:
    saturate(0.85)
    contrast(1.04);
}

.about__content h2 {
  max-width: 850px;
}

.about__content > p:not(.section-label) {
  max-width: 790px;
  margin: 22px 0 0;

  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.85;
}

.about__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

/* Footer */

.footer {
  padding: 75px 0 28px;

  border-top: 1px solid var(--border);
  background: #020711;
}

.footer__main {
  display: grid;
  grid-template-columns: 1.4fr 0.65fr 0.85fr 0.95fr;
  gap: 65px;
}

.footer__brand > p {
  max-width: 330px;
  margin: 25px 0 0;

  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.75;
}

.footer__column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}

.footer__column h3 {
  margin: 0 0 8px;
  font-size: 0.91rem;
}

.footer__column a {
  color: var(--muted);
  font-size: 0.8rem;
  transition: color 180ms ease;
}

.footer__column a:hover {
  color: var(--blue-light);
}

.footer__contact-card {
  align-self: start;
  padding: 24px;

  border: 1px solid var(--border-bright);
  border-radius: var(--radius);

  background: rgba(47, 131, 255, 0.035);
}

.footer__contact-card p {
  margin: 0;
  font-size: 0.92rem;
}

.footer__contact-card a {
  display: inline-flex;
  gap: 10px;
  margin-top: 18px;

  color: var(--blue-light);
  font-size: 0.82rem;
  font-weight: 600;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-top: 65px;
  padding-top: 24px;

  border-top: 1px solid var(--border);
}

.footer__bottom p,
.footer__bottom a {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.footer__bottom a {
  display: inline-flex;
  gap: 8px;
}

.footer__bottom a:hover {
  color: var(--blue-light);
}

/* Realistic cell cursor */

.cell-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;

  width: 62px;
  height: 56px;

  pointer-events: none;
  opacity: 0;

  transform: translate(-50%, -50%);
  transition:
    opacity 180ms ease,
    width 180ms ease,
    height 180ms ease;

  filter:
    drop-shadow(0 0 6px rgba(177, 110, 104, 0.22))
    drop-shadow(0 0 12px rgba(120, 160, 180, 0.12));

  animation: cell-body-drift 4.8s ease-in-out infinite;
}

.cell-cursor.visible {
  opacity: 1;
}

.cell-cursor.hovering {
  width: 72px;
  height: 65px;
}

.cell-cursor__cytoplasm {
  position: absolute;
  inset: 0;

  overflow: hidden;

  border: 1.5px solid rgba(216, 169, 151, 0.72);

  border-radius:
    48% 52% 55% 45% /
    52% 46% 54% 48%;

  background:
    radial-gradient(
      circle at 29% 22%,
      rgba(255, 255, 255, 0.44) 0%,
      rgba(255, 255, 255, 0.12) 17%,
      transparent 31%
    ),
    radial-gradient(
      circle at 65% 70%,
      rgba(168, 107, 121, 0.11),
      transparent 38%
    ),
    radial-gradient(
      circle at 45% 45%,
      rgba(236, 190, 170, 0.2),
      rgba(176, 112, 104, 0.13) 55%,
      rgba(128, 92, 104, 0.1) 100%
    );

  box-shadow:
    inset 0 0 9px rgba(255, 242, 233, 0.32),
    inset 0 0 18px rgba(134, 87, 98, 0.13),
    0 0 0 1px rgba(255, 225, 211, 0.08);

  backdrop-filter: blur(1.5px);

  animation:
    cell-membrane-wobble 4.8s ease-in-out infinite,
    cell-breathe 3.4s ease-in-out infinite;
}

.cell-cursor__cytoplasm::before {
  content: "";

  position: absolute;
  inset: 3px;

  border: 1px solid rgba(255, 218, 200, 0.28);
  border-radius: inherit;

  box-shadow:
    inset 0 0 8px rgba(255, 255, 255, 0.1);

  pointer-events: none;
}

.cell-cursor__cytoplasm::after {
  content: "";

  position: absolute;
  inset: 0;

  opacity: 0.3;

  background-image:
    radial-gradient(
      circle,
      rgba(255, 239, 224, 0.45) 0 0.65px,
      transparent 0.9px
    );

  background-size: 7px 7px;
  background-position: 1px 2px;

  pointer-events: none;
}

.cell-cursor__nucleus {
  position: absolute;
  top: 27%;
  left: 29%;
  z-index: 3;

  width: 39%;
  aspect-ratio: 1;

  border: 1px solid rgba(169, 111, 132, 0.72);

  border-radius:
    52% 48% 55% 45% /
    47% 54% 46% 53%;

  background:
    radial-gradient(
      circle at 36% 30%,
      rgba(239, 198, 208, 0.62),
      rgba(157, 93, 117, 0.52) 48%,
      rgba(100, 65, 91, 0.6) 100%
    );

  box-shadow:
    inset 0 0 5px rgba(255, 224, 229, 0.24),
    0 0 6px rgba(115, 75, 104, 0.22);

  transition: transform 90ms linear;
  animation: nucleus-drift 5.2s ease-in-out infinite;
}

.cell-cursor__nucleus::before,
.cell-cursor__nucleus::after {
  content: "";

  position: absolute;

  border-radius: 50%;
  background: rgba(84, 50, 79, 0.22);
}

.cell-cursor__nucleus::before {
  width: 4px;
  height: 3px;
  top: 24%;
  right: 23%;
}

.cell-cursor__nucleus::after {
  width: 3px;
  height: 4px;
  left: 22%;
  bottom: 24%;
}

.cell-cursor__nucleolus {
  position: absolute;
  top: 36%;
  left: 38%;

  width: 25%;
  aspect-ratio: 1;

  border-radius: 50%;

  background:
    radial-gradient(
      circle at 35% 30%,
      rgba(255, 215, 219, 0.88),
      rgba(174, 94, 119, 0.9)
    );

  box-shadow:
    0 0 3px rgba(255, 204, 214, 0.35);
}

.cell-particle {
  position: absolute;
  z-index: 2;

  width: 2.6px;
  height: 2.6px;

  border-radius: 50%;

  background: rgba(255, 223, 203, 0.7);

  box-shadow:
    0 0 2px rgba(255, 209, 194, 0.4);

  animation: particle-drift 4s ease-in-out infinite;
}

.cell-particle--1 {
  top: 19%;
  left: 22%;
}

.cell-particle--2 {
  top: 17%;
  right: 25%;
  animation-delay: -0.8s;
}

.cell-particle--3 {
  top: 48%;
  right: 13%;
  animation-delay: -1.5s;
}

.cell-particle--4 {
  right: 29%;
  bottom: 18%;
  animation-delay: -2.2s;
}

.cell-particle--5 {
  bottom: 16%;
  left: 23%;
  animation-delay: -2.8s;
}

.cell-particle--6 {
  top: 48%;
  left: 11%;
  animation-delay: -3.4s;
}

.mitochondrion {
  position: absolute;
  z-index: 2;

  width: 11px;
  height: 5px;

  overflow: hidden;

  border: 1px solid rgba(190, 117, 85, 0.76);

  border-radius:
    55% 45% 52% 48% /
    60% 48% 52% 40%;

  background:
    linear-gradient(
      135deg,
      rgba(238, 162, 111, 0.72),
      rgba(175, 91, 76, 0.7)
    );

  box-shadow:
    inset 0 0 3px rgba(255, 226, 183, 0.32),
    0 0 3px rgba(190, 105, 81, 0.18);

  animation: mitochondrion-float 4.6s ease-in-out infinite;
}

.mitochondrion span {
  position: absolute;
  top: 1px;
  left: 2px;

  width: 7px;
  height: 2px;

  border-top: 1px solid rgba(255, 229, 189, 0.72);
  border-radius: 50%;

  transform: rotate(-8deg);
}

.mitochondrion--1 {
  top: 22%;
  right: 14%;
  transform: rotate(27deg);
}

.mitochondrion--2 {
  right: 16%;
  bottom: 19%;

  transform: rotate(-21deg);
  animation-delay: -2.1s;
}

/* Translation stream */

.translation-stream {
  position: absolute;
  top: 17%;
  right: 0;
  z-index: 5;

  width: 220px;
  height: 520px;

  pointer-events: none;
}

.translation-line {
  position: absolute;
  top: 38px;
  left: 25px;

  width: 2px;
  height: calc(100% - 50px);

  background: linear-gradient(
    to bottom,
    rgba(75, 224, 232, 0),
    rgba(75, 224, 232, 0.92),
    rgba(47, 131, 255, 0.55),
    rgba(75, 224, 232, 0)
  );

  box-shadow: 0 0 22px rgba(75, 224, 232, 0.52);
}

.translation-line::before,
.translation-line::after {
  content: "";
  position: absolute;
  left: 50%;

  width: 10px;
  height: 10px;

  border-radius: 50%;
  background: #4be0e8;

  transform: translateX(-50%);
  box-shadow: 0 0 16px rgba(75, 224, 232, 0.8);
}

.translation-line::before {
  top: 0;
}

.translation-line::after {
  bottom: 0;
}

.translation-builder {
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;

  margin-left: 43px;
}

.translation-codon {
  display: flex;
  gap: 7px;

  margin-left: -18px;
  margin-bottom: 0;
}

.translation-codon.is-joining .base:nth-child(1) {
  transform: translateX(18px);
}

.translation-codon.is-joining .base:nth-child(3) {
  transform: translateX(-18px);
}

.translation-codon.is-complete .base {
  box-shadow:
    0 0 20px currentColor,
    0 0 42px rgba(75, 224, 232, 0.35);
}

.base {
  display: grid;
  place-items: center;

  width: 49px;
  height: 49px;

  border: 1px solid currentColor;
  border-radius: 50%;

  background: rgba(3, 13, 28, 0.94);

  font-size: 1.15rem;
  font-weight: 700;

  box-shadow:
    0 0 14px rgba(75, 224, 232, 0.08);

  transition:
    transform 0.45s ease,
    box-shadow 0.45s ease,
    opacity 0.35s ease,
    filter 0.35s ease;
}

.translation-down-arrow {
  margin-top: 2px;
  margin-right: 0;
  margin-bottom: 2px;
  margin-left: 53px;

  color: #4be0e8;
  font-size: 1.8rem;

  opacity: 0;
  transform: translateY(-8px);

  transition:
    opacity 0.35s,
    transform 0.35s;
}

.translation-down-arrow.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.translation-result {
  width: 205px;
  margin-left: 0;
  padding: 15px 16px;

  border: 1px solid rgba(75, 224, 232, 0.38);
  border-radius: 14px;

  background: rgba(5, 18, 35, 0.88);
  backdrop-filter: blur(12px);

  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.22);

  opacity: 0;

  transform:
    translateY(-8px)
    scale(0.95);

  transition:
    opacity 0.4s,
    transform 0.4s;
}

.translation-result.is-visible {
  opacity: 1;

  transform:
    translateY(0)
    scale(1);
}

.amino-name {
  display: block;

  margin-bottom: 3px;

  color: #eef7ff;

  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
}

.amino-code {
  display: block;

  margin-top: 5px;

  color: var(--cyan);
  font-size: 0.78rem;
}

.translation-history {
  display: flex;
  flex-direction: column;
  gap: 9px;

  margin-top: 4px;
}

.translation-history-item {
  width: 205px;
  padding: 11px 14px;

  border-left: 2px solid rgba(75, 224, 232, 0.62);
  border-radius: 0 10px 10px 0;

  background: rgba(5, 18, 35, 0.67);
  backdrop-filter: blur(10px);

  animation: historyIn 0.45s ease;
}

.translation-history-item strong {
  display: block;

  color: white;
  font-size: 0.84rem;
}

.translation-history-item span {
  color: #7fdfff;
  font-size: 0.74rem;
}

.base--a {
  color: #65f0a8;
}

.base--u {
  color: #b47cff;
}

.base--g {
  color: #ffc43d;
}

.base--c {
  color: #4db8ff;
}

/* Animations */

@keyframes cell-membrane-wobble {
  0%,
  100% {
    border-radius:
      48% 52% 55% 45% /
      52% 46% 54% 48%;
  }

  33% {
    border-radius:
      53% 47% 49% 51% /
      47% 55% 45% 53%;
  }

  66% {
    border-radius:
      46% 54% 52% 48% /
      55% 47% 53% 45%;
  }
}

@keyframes cell-breathe {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.025);
  }
}

@keyframes cell-body-drift {
  0%,
  100% {
    rotate: -1deg;
  }

  50% {
    rotate: 1.5deg;
  }
}

@keyframes nucleus-drift {
  0%,
  100% {
    translate: 0 0;
    rotate: -2deg;
  }

  50% {
    translate: 1px -1px;
    rotate: 2deg;
  }
}

@keyframes particle-drift {
  0%,
  100% {
    translate: 0 0;
    opacity: 0.55;
  }

  50% {
    translate: 1px -1.5px;
    opacity: 0.95;
  }
}

@keyframes mitochondrion-float {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 1px -1px;
  }
}

@keyframes historyIn {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes orbitFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulseFocus {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(0.96);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes particleFloat {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }

  50% {
    transform: translateY(-8px) translateX(3px);
  }
}

/* Responsive */

@media (max-width: 1180px) {
  .hero__layout {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(430px, 0.82fr);
  }

  .hero h1 {
    font-size: clamp(3rem, 6vw, 5rem);
  }

  .hero__dna-canvas {
    width: 450px;
    height: 590px;
    left: 43%;

    transform:
      translate(-50%, -50%)
      scale(0.88);
  }

  .translation-stream {
    right: -5px;
    transform: scale(0.76);
    transform-origin: top right;
  }

  .codon-orbit {
    transform: scale(0.7);
    transform-origin: top right;
  }

  .skills-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .skill-card {
    min-height: 300px;
  }

  .footer__main {
    grid-template-columns: 1.3fr 0.7fr 0.8fr;
  }

  .footer__contact-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 960px) {
  :root {
    --header-height: 78px;
  }

  .container {
    width: min(calc(100% - 36px), var(--container));
  }

  .site-header {
    height: var(--header-height);
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;

    margin-left: auto;
    padding: 8px;

    border: 0;
    background: transparent;

    cursor: pointer;
  }

  .nav-toggle span {
    width: 23px;
    height: 2px;
    background: var(--text);
  }

  .nav {
    position: absolute;
    top: var(--header-height);
    right: 18px;
    left: 18px;

    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;

    padding: 14px;

    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(3, 9, 20, 0.98);

    box-shadow: var(--shadow-card);
  }

  .nav.open {
    display: flex;
  }

  .nav__link {
    padding: 14px;
  }

  .nav__link::after {
    display: none;
  }

  .github-button {
    display: none;
  }

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

  .hero__content {
    padding: 80px 0 25px;
  }

  .hero__visual {
    min-height: 500px;
  }

  .project-grid,
  .additional-projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .about__image-wrapper {
    max-width: 470px;
  }

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

  .footer__contact-card {
    grid-column: auto;
  }
}

@media (max-width: 850px) {
  .translation-stream,
  .codon-orbit,
  .sequence-ribbon,
  .transcription-focus {
    display: none;
  }
}

@media (max-width: 680px) {
  .section {
    padding: 78px 0;
  }

  .brand__text small {
    display: none;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 13vw, 4.2rem);
  }

  .hero__description {
    font-size: 0.98rem;
  }

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

  .hero__visual {
    min-height: 390px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .project-grid,
  .additional-projects,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .skill-card {
    min-height: 0;
  }

  .case-study-banner {
    grid-template-columns: auto 1fr;
  }

  .case-study-banner .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .projects-cta {
    width: 100%;
    min-width: 0;
    padding: 16px 24px;

    font-size: 16px;
  }

  .projects-cta::before {
    width: 100%;
  }

  .about__image-border {
    inset: 16px -12px -12px 16px;
  }

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

  .footer__bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}

/* Hide custom cursor on touch devices */

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