:root {
  --bg: #061018;
  --bg-soft: #0a1722;
  --surface: rgba(255, 255, 255, 0.075);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --text: #f4f7fb;
  --muted: #9fb1c7;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #5eead4;
  --accent-2: #8ab4ff;
  --accent-3: #f7c873;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --container: 1180px;
  --header-bg: rgba(6, 16, 24, 0.78);
  --nav-bg: rgba(255, 255, 255, 0.04);
  --nav-active: rgba(255, 255, 255, 0.1);
  --input-bg: rgba(0, 0, 0, 0.15);
  --footer-bg: rgba(0, 0, 0, 0.16);
}

body[data-theme="light"] {
  --bg: #f7fafc;
  --bg-soft: #eef5f8;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --text: #10202f;
  --muted: #5d7084;
  --line: rgba(16, 32, 47, 0.13);
  --accent: #0fbaa8;
  --accent-2: #4269e8;
  --accent-3: #c88516;
  --shadow: 0 24px 80px rgba(37, 62, 83, 0.16);
  --header-bg: rgba(255, 255, 255, 0.76);
  --nav-bg: rgba(16, 32, 47, 0.045);
  --nav-active: rgba(16, 32, 47, 0.08);
  --input-bg: rgba(255, 255, 255, 0.72);
  --footer-bg: rgba(255, 255, 255, 0.56);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(94, 234, 212, 0.14), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(138, 180, 255, 0.16), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  overflow-x: hidden;
}

body[data-theme="light"] {
  background:
    radial-gradient(circle at 20% 0%, rgba(15, 186, 168, 0.17), transparent 34rem),
    radial-gradient(circle at 82% 8%, rgba(66, 105, 232, 0.13), transparent 32rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 46%, #edf7f6 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  gap: 18px;
  background: #050b11;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

body[data-theme="light"] .loader {
  background: #f7fafc;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader__orb {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: radial-gradient(circle at 35% 35%, var(--accent), transparent 45%), rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 60px rgba(94, 234, 212, 0.48);
  animation: pulse 1.4s ease-in-out infinite;
}

.loader span {
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.cursor-glow {
  position: fixed;
  z-index: 1;
  width: 360px;
  height: 360px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.16), transparent 65%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.site-noise {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("assets/animations/noise.svg");
}

.container {
  width: min(100% - 40px, var(--container));
  margin: 0 auto;
}

.section {
  position: relative;
  z-index: 3;
  padding: 112px 0;
}

.section-heading {
  max-width: 740px;
}

.section-heading--center {
  margin: 0 auto 54px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.045em;
  margin: 0;
}

h1 {
  font-size: clamp(3.4rem, 9vw, 7.9rem);
  line-height: 0.86;
  margin-top: 18px;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 1;
  margin: 16px 0 20px;
  text-wrap: balance;
}

h3 {
  font-size: 1.35rem;
  line-height: 1.15;
}

p {
  color: var(--muted);
  line-height: 1.75;
}

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 100;
  width: min(calc(100% - 32px), 1180px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  transform: translateX(-50%);
  transition: background 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  background: var(--header-bg);
  border-color: var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand__mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #061018;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 34px rgba(94, 234, 212, 0.22);
}

.brand__text {
  color: rgba(255, 255, 255, 0.86);
}

body[data-theme="light"] .brand__text {
  color: rgba(16, 32, 47, 0.86);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: var(--nav-bg);
}

.nav a {
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
  background: var(--nav-active);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  padding: 0 14px 0 10px;
  cursor: pointer;
  font-weight: 900;
  backdrop-filter: blur(16px);
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(94, 234, 212, 0.45);
}

.theme-toggle__icon {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-3), var(--accent));
  box-shadow: inset -8px -7px 0 rgba(6, 16, 24, 0.68);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

body[data-theme="light"] .theme-toggle__icon {
  box-shadow: inset 0 0 0 rgba(255, 255, 255, 0);
  transform: rotate(90deg);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hero {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 150px 0 90px;
}

.hero__background,
.grid-layer,
#particle-canvas {
  position: absolute;
  inset: 0;
}

.hero__background {
  overflow: hidden;
  z-index: -1;
}

.mesh {
  position: absolute;
  width: 44vw;
  height: 44vw;
  border-radius: 50%;
  filter: blur(58px);
  opacity: 0.45;
  animation: float 12s ease-in-out infinite;
}

.mesh--one {
  top: 8%;
  left: -10%;
  background: rgba(94, 234, 212, 0.3);
}

.mesh--two {
  right: -8%;
  bottom: 0;
  background: rgba(138, 180, 255, 0.24);
  animation-delay: -4s;
}

.grid-layer {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

body[data-theme="light"] .grid-layer {
  background-image:
    linear-gradient(rgba(16, 32, 47, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 32, 47, 0.055) 1px, transparent 1px);
}

#particle-canvas {
  opacity: 0.58;
}

.hero__content {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.78fr);
  align-items: center;
  gap: 64px;
}

.hero__role {
  min-height: 40px;
  color: var(--text);
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 800;
}

.hero__role span {
  color: var(--accent);
}

.hero__intro {
  max-width: 680px;
  font-size: 1.08rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 34px 0 28px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  overflow: hidden;
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn--primary {
  color: #061018;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 44px rgba(94, 234, 212, 0.24);
}

.btn--ghost {
  background: var(--surface);
  backdrop-filter: blur(16px);
}

.btn--minimal {
  border-color: transparent;
  color: var(--accent);
}

.socials {
  display: flex;
  gap: 12px;
}

.socials a {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.socials a:hover {
  color: var(--text);
  background: var(--surface);
  transform: translateY(-4px);
}

.hero__visual {
  position: relative;
}

.profile-card {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 40px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.profile-card__halo {
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.45), transparent 38%, rgba(138, 180, 255, 0.38));
  filter: blur(18px);
  opacity: 0.6;
}

.profile-card img {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.05);
}

.profile-card__meta {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}

.profile-card__meta span,
.experience-card span,
.teaching-card span,
.project-card > span {
  display: block;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-card__meta strong {
  display: block;
  margin-top: 6px;
  font-size: 1.04rem;
}

.floating-chip {
  position: absolute;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  font-weight: 900;
}

.chip--top {
  top: 8%;
  right: -28px;
  animation: float 5s ease-in-out infinite;
}

.chip--bottom {
  left: -28px;
  bottom: 18%;
  animation: float 6s ease-in-out infinite reverse;
}

.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 30px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.scroll-indicator span {
  width: 20px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.scroll-indicator span::after {
  content: "";
  display: block;
  width: 4px;
  height: 4px;
  margin: 7px auto;
  border-radius: 50%;
  background: var(--accent);
  animation: scrollDot 1.4s ease infinite;
}

.section-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 72px;
  align-items: start;
}

.about__content {
  display: grid;
  gap: 6px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 26px;
}

.stat-card,
.glass-card,
.teaching-card,
.experience-card,
.project-card,
.achievement-card,
.cert-track article,
.contact-form {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035));
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
}

.stat-card {
  min-height: 128px;
  padding: 20px;
  border-radius: var(--radius-lg);
}

.stat-card strong {
  display: block;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.1rem;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.timeline {
  position: relative;
  display: grid;
  gap: 24px;
  max-width: 920px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 22px;
  width: 1px;
  background: linear-gradient(var(--accent), rgba(255, 255, 255, 0.08));
}

.timeline-card {
  position: relative;
  margin-left: 64px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  transition: transform 0.25s ease, background 0.25s ease;
}

.timeline-card::before {
  content: "";
  position: absolute;
  left: -53px;
  top: 28px;
  width: 18px;
  height: 18px;
  border: 5px solid var(--bg);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.6), 0 0 34px rgba(94, 234, 212, 0.6);
}

.timeline-card:hover,
.glass-card:hover,
.teaching-card:hover,
.experience-card:hover,
.project-card:hover,
.achievement-card:hover {
  transform: translateY(-6px);
  background: color-mix(in srgb, var(--surface-strong) 84%, transparent);
}

.timeline-card__year {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--accent-3);
  font-weight: 900;
}

.research {
  background:
    linear-gradient(180deg, transparent, rgba(94, 234, 212, 0.04), transparent),
    radial-gradient(circle at 70% 20%, rgba(94, 234, 212, 0.11), transparent 30rem);
}

body[data-theme="light"] .research {
  background:
    linear-gradient(180deg, transparent, rgba(15, 186, 168, 0.07), transparent),
    radial-gradient(circle at 70% 20%, rgba(66, 105, 232, 0.1), transparent 30rem);
}

.research-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(95px, 1fr));
  align-items: center;
  gap: 8px;
  margin: 46px 0;
  overflow-x: auto;
  padding-bottom: 8px;
}

.research-flow div {
  min-width: 115px;
  padding: 18px 14px;
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: var(--radius-md);
  background: rgba(94, 234, 212, 0.07);
  text-align: center;
  font-weight: 900;
}

.research-flow span {
  height: 1px;
  min-width: 28px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

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

.glass-card {
  padding: 28px;
  border-radius: var(--radius-xl);
}

.tag-cloud,
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud {
  margin-top: 28px;
}

.tag-cloud span,
.badges span {
  display: inline-flex;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  font-size: 0.82rem;
  font-weight: 800;
}

.teaching-list,
.experience-list {
  display: grid;
  gap: 18px;
}

.teaching-card {
  padding: 26px;
  border-radius: var(--radius-lg);
}

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

.skill-category {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.skill-category h3 {
  margin-bottom: 22px;
}

.skill-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.skill-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  color: #061018;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 0.78rem;
  font-weight: 900;
}

.skill-item span {
  font-weight: 800;
}

.skill-bar {
  grid-column: 2 / -1;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.skill-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.experience-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  padding: 26px;
  border-radius: var(--radius-xl);
}

.company-logo {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 20px;
  color: #061018;
  background: linear-gradient(135deg, var(--accent-3), var(--accent));
  font-weight: 900;
}

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

.project-card {
  display: flex;
  min-height: 370px;
  flex-direction: column;
  padding: 18px;
  border-radius: var(--radius-xl);
}

.project-card--featured {
  grid-column: span 2;
}

.project-card__preview {
  min-height: 150px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(94, 234, 212, 0.18), rgba(138, 180, 255, 0.08)),
    url("assets/animations/circuit.svg");
  background-size: cover;
}

.project-card p {
  flex: 1;
}

.project-links {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.project-links a {
  color: var(--accent);
  font-weight: 900;
}

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

.achievement-card {
  min-height: 178px;
  padding: 22px;
  border-radius: var(--radius-lg);
}

.achievement-card strong {
  display: block;
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
  margin-bottom: 34px;
}

.achievement-card span {
  font-weight: 900;
}

.cert-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(245px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding: 6px 4px 18px;
  scroll-snap-type: x mandatory;
}

.cert-track article {
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: var(--radius-lg);
  scroll-snap-align: start;
  text-align: center;
  font-weight: 900;
}

.contact {
  padding-bottom: 90px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.contact-info {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

.contact-info a,
.contact-info span {
  color: var(--muted);
  font-weight: 800;
}

.contact-form {
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: var(--radius-xl);
}

.contact-form label {
  position: relative;
  display: block;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: var(--input-bg);
  outline: 0;
  padding: 22px 18px 12px;
  resize: vertical;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.contact-form span {
  position: absolute;
  left: 18px;
  top: 17px;
  color: var(--muted);
  pointer-events: none;
  transition: transform 0.2s ease, color 0.2s ease, font-size 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(94, 234, 212, 0.55);
  box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.08);
}

.contact-form input:focus + span,
.contact-form input:not(:placeholder-shown) + span,
.contact-form textarea:focus + span,
.contact-form textarea:not(:placeholder-shown) + span {
  color: var(--accent);
  font-size: 0.74rem;
  transform: translateY(-10px);
}

.form-note {
  margin: 0;
  color: var(--accent);
  font-weight: 800;
}

.footer {
  position: relative;
  z-index: 3;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  background: var(--footer-bg);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer nav {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-weight: 800;
}

.footer p {
  margin: 0;
  font-size: 0.88rem;
}

.to-top {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.72s ease, transform 0.72s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  50% {
    transform: scale(1.08);
  }
}

@keyframes float {
  50% {
    transform: translateY(-18px) translateX(10px);
  }
}

@keyframes scrollDot {
  70% {
    transform: translateY(14px);
    opacity: 0;
  }
}

@media (max-width: 1080px) {
  .nav {
    position: fixed;
    inset: 78px 16px auto;
    display: grid;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .menu-toggle {
    display: block;
  }

  .menu-toggle.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

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

  .hero__visual {
    max-width: 520px;
    margin: 0 auto;
  }

  .stats,
  .research-grid,
  .skills-grid,
  .projects-grid,
  .achievement-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card--featured {
    grid-column: span 2;
  }

  .footer__inner {
    flex-wrap: wrap;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .section {
    padding: 82px 0;
  }

  .site-header {
    top: 10px;
    width: calc(100% - 20px);
  }

  .brand__text {
    display: none;
  }

  .theme-toggle__text {
    display: none;
  }

  .theme-toggle {
    width: 44px;
    justify-content: center;
    padding: 0;
  }

  .hero {
    padding-top: 118px;
  }

  h1 {
    font-size: clamp(3rem, 18vw, 4.6rem);
  }

  .hero__actions,
  .footer nav {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .stats,
  .research-grid,
  .skills-grid,
  .projects-grid,
  .achievement-grid {
    grid-template-columns: 1fr;
  }

  .project-card--featured {
    grid-column: auto;
  }

  .timeline-card {
    margin-left: 44px;
    padding: 22px;
  }

  .timeline-card::before {
    left: -45px;
  }

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

  .chip--top,
  .chip--bottom {
    position: static;
    display: inline-flex;
    margin-top: 12px;
  }

  .footer__inner {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
