:root {
  --bg: #0d0d0d;
  --bg-soft: #141216;
  --card: rgba(255, 255, 255, 0.05);
  --card-strong: rgba(255, 255, 255, 0.08);
  --accent: #a855f7;
  --accent-soft: rgba(168, 85, 247, 0.18);
  --accent-glow: rgba(168, 85, 247, 0.42);
  --text: #ffffff;
  --muted: #b3b3b3;
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 8px;
  --max: 1180px;
  --font-heading: "Poppins", "Inter", sans-serif;
  --font-body: "Inter", "Poppins", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(168, 85, 247, 0.16), transparent 34rem),
    radial-gradient(circle at 82% 42%, rgba(255, 255, 255, 0.05), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  cursor: none;
}

body.nav-open {
  overflow: hidden;
}

body.lightbox-open {
  overflow: hidden;
}

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

::selection {
  background: var(--accent);
  color: var(--text);
}

#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 18px;
  height: 18px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  box-shadow: 0 0 18px var(--accent-glow), inset 0 0 14px rgba(168, 85, 247, 0.16);
  transform: translate3d(-50%, -50%, 0);
  transition: width 160ms ease, height 160ms ease, border-color 160ms ease, background 160ms ease;
  will-change: transform;
}

.cursor.is-hovering {
  width: 42px;
  height: 42px;
  border-color: var(--accent);
  background: rgba(168, 85, 247, 0.1);
}

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

.section {
  position: relative;
  padding: 108px 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 220ms ease, border-color 220ms ease, padding 220ms ease;
}

.site-header.is-scrolled {
  padding: 10px 0;
  background: rgba(13, 13, 13, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(calc(100% - 40px), var(--max));
  min-height: 64px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 14px 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(22px);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(168, 85, 247, 0.58);
  border-radius: var(--radius);
  color: var(--text);
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.32), rgba(255, 255, 255, 0.05));
  box-shadow: 0 0 28px rgba(168, 85, 247, 0.2);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 180ms ease, background 180ms ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
  background: rgba(168, 85, 247, 0.14);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: 68px;
}

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

h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  line-height: 1.08;
}

h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.35rem);
  font-weight: 800;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.75rem);
  font-weight: 800;
}

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

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

.typing-line {
  min-height: 42px;
  margin: 22px 0 0;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 700;
}

.typing-caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 6px;
  vertical-align: -0.15em;
  background: var(--accent);
  animation: blink 850ms infinite;
}

.hero-intro {
  max-width: 760px;
  margin: 24px 0 0;
  font-size: 1.02rem;
}

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

.btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary {
  background: var(--accent);
  color: var(--text);
  box-shadow: 0 18px 48px rgba(168, 85, 247, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 24px 66px rgba(168, 85, 247, 0.38);
}

.btn-secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(168, 85, 247, 0.12);
}

.btn-icon {
  font-size: 1.15rem;
}

.profile-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
}

.profile-frame {
  position: relative;
  z-index: 2;
  width: min(100%, 420px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(168, 85, 247, 0.62);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 12px rgba(168, 85, 247, 0.06), 0 0 80px rgba(168, 85, 247, 0.42);
  animation: float 6s ease-in-out infinite;
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.profile-frame:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 0 0 16px rgba(168, 85, 247, 0.08), 0 0 100px rgba(168, 85, 247, 0.58);
}

.profile-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-frame.is-missing::after {
  content: "US";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.28), rgba(255, 255, 255, 0.04));
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 5rem;
  font-weight: 800;
}

.profile-orbit {
  position: absolute;
  width: min(100%, 520px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  animation: rotate 18s linear infinite;
}

.profile-orbit::before,
.profile-orbit::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 26px var(--accent);
}

.profile-orbit::before {
  top: 12%;
  left: 20%;
}

.profile-orbit::after {
  right: 14%;
  bottom: 18%;
}

.hero-stat {
  position: absolute;
  right: 0;
  bottom: 60px;
  z-index: 3;
  width: 190px;
  padding: 18px;
}

.hero-stat span {
  display: block;
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
}

.hero-stat p {
  margin: 6px 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.glass-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 44px;
}

.section-heading p:last-child {
  max-width: 660px;
  margin-bottom: 0;
}

.about-layout {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 24px;
}

.about-card {
  min-height: 100%;
  padding: 30px;
}

.about-card p {
  margin: 18px 0 24px;
}

.social-row {
  display: flex;
  gap: 12px;
}

.icon-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.icon-button:hover {
  transform: translateY(-3px);
  border-color: rgba(168, 85, 247, 0.62);
  background: rgba(168, 85, 247, 0.14);
}

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

.info-item {
  min-height: 120px;
  padding: 22px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.info-item:hover,
.skill-card:hover,
.soft-card:hover,
.project-card:hover,
.contact-card:hover {
  transform: translateY(-6px);
  border-color: rgba(168, 85, 247, 0.54);
}

.info-item span,
.contact-card span,
.timeline-meta,
.project-kicker {
  display: block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.info-item strong {
  display: block;
  margin-top: 12px;
  line-height: 1.45;
}

.info-item.wide {
  grid-column: 1 / -1;
}

.skills-wrap {
  display: grid;
  gap: 42px;
}

.group-title {
  margin-bottom: 18px;
}

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

.skill-card {
  min-height: 132px;
  padding: 20px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.skill-card:hover,
.soft-card:hover {
  box-shadow: 0 22px 70px rgba(168, 85, 247, 0.14);
}

.skill-card h4 {
  min-height: 42px;
  margin: 0 0 18px;
  font-size: 1rem;
}

.progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #ffffff);
  box-shadow: 0 0 18px var(--accent-glow);
  transition: width 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.soft-card {
  min-height: 150px;
  padding: 22px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.soft-card span {
  color: rgba(255, 255, 255, 0.34);
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
}

.soft-card h4 {
  margin: 30px 0 0;
}

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

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  align-items: start;
}

.timeline-item:nth-child(even) .timeline-card {
  grid-column: 2;
}

.timeline-dot {
  position: absolute;
  top: 28px;
  left: 50%;
  width: 16px;
  height: 16px;
  border: 3px solid var(--bg);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 32px var(--accent);
  transform: translateX(-50%);
}

.timeline-card {
  padding: 26px;
}

.timeline-card h3 {
  margin-top: 10px;
}

ul {
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.75;
}

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

.project-card {
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.project-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(255, 255, 255, 0.04));
  color: inherit;
  cursor: none;
  text-align: inherit;
}

.project-image.is-missing::after {
  content: attr(data-fallback);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
}

.project-image.is-missing .gallery-hint {
  display: none;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease, filter 600ms ease;
  will-change: transform;
}

.project-card:hover .project-image img {
  transform: scale(1.06);
  filter: saturate(1.15) contrast(1.05);
}

.gallery-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(13, 13, 13, 0.72);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.project-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.46));
  opacity: 0;
  transition: opacity 220ms ease;
}

.project-card:hover .gallery-hint,
.project-image:focus-visible .gallery-hint,
.project-card:hover .project-image::before,
.project-image:focus-visible::before {
  opacity: 1;
  transform: translateY(0);
}

.project-image:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.project-body {
  padding: 26px;
}

.project-body h3 {
  margin-top: 10px;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tech-list span {
  padding: 8px 10px;
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: var(--radius);
  background: rgba(168, 85, 247, 0.1);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.education-list {
  display: grid;
  gap: 28px;
}

.education-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 34px;
}

.education-card p:not(.eyebrow) {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.education-card strong {
  flex: 0 0 auto;
  padding: 14px 18px;
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius);
  background: rgba(168, 85, 247, 0.12);
  font-family: var(--font-heading);
}

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

.contact-card {
  min-width: 0;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--line);
  color: var(--text);
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

button.contact-card {
  cursor: none;
}

.contact-card strong {
  max-width: 100%;
  font-size: 0.98rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.contact-card small {
  color: var(--muted);
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 92px;
}

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

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 300;
  padding: 12px 16px;
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: var(--radius);
  background: rgba(13, 13, 13, 0.86);
  color: var(--text);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.84);
  backdrop-filter: blur(22px);
}

.lightbox-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1180px);
  max-height: min(92vh, 860px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(13, 13, 13, 0.86);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
  transform: translateY(18px) scale(0.985);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.lightbox.is-open .lightbox-shell {
  transform: translateY(0) scale(1);
}

.lightbox-shell:focus {
  outline: none;
}

.lightbox-topbar,
.lightbox-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.lightbox-kicker {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.lightbox-topbar h2 {
  margin: 0;
  font-size: clamp(1.22rem, 3vw, 2rem);
}

.lightbox-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.lightbox-icon,
.lightbox-nav,
.lightbox-thumb {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.065);
  color: var(--text);
  cursor: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.lightbox-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 800;
}

.lightbox-icon:hover,
.lightbox-nav:hover,
.lightbox-thumb:hover,
.lightbox-thumb.is-active {
  border-color: rgba(168, 85, 247, 0.64);
  background: rgba(168, 85, 247, 0.16);
}

.lightbox-thumb.is-missing {
  display: none;
}

.lightbox-stage {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 14px;
}

.lightbox-figure {
  min-width: 0;
  height: 100%;
  margin: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
}

.lightbox-media {
  min-height: 280px;
  max-height: 62vh;
  display: grid;
  place-items: center;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  touch-action: pan-y;
}

.lightbox-media img {
  max-width: 100%;
  max-height: 62vh;
  object-fit: contain;
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
  transition: opacity 160ms ease, transform 220ms ease;
  user-select: none;
  will-change: transform, opacity;
}

.lightbox-media.is-zoomed {
  cursor: grab;
  touch-action: pan-x pan-y;
}

.lightbox-media.is-unavailable::after {
  content: "Project screenshots unavailable";
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  font-family: var(--font-heading);
  font-weight: 800;
  text-align: center;
}

.lightbox-media.is-unavailable img {
  display: none;
}

.lightbox-media.is-zoomed img {
  max-width: none;
  max-height: none;
  width: min(1320px, 140vw);
  transform: translate3d(0, 0, 0) scale(1.28);
}

.lightbox-media img.is-changing {
  opacity: 0;
  transform: translate3d(calc(var(--slide-direction, 0) * 12px), 0, 0) scale(0.985);
}

.lightbox-media img[data-direction="1"] {
  --slide-direction: 1;
}

.lightbox-media img[data-direction="-1"] {
  --slide-direction: -1;
}

.lightbox-figure figcaption,
.lightbox-footer {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.lightbox-nav {
  width: 54px;
  height: 72px;
  display: grid;
  place-items: center;
  font-size: 2.35rem;
}

.lightbox-nav:hover,
.lightbox-icon:hover {
  transform: translateY(-2px);
}

.lightbox-thumbs {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.lightbox-thumb {
  flex: 0 0 auto;
  width: 68px;
  height: 48px;
  overflow: hidden;
  padding: 0;
}

.lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reveal {
  opacity: 0;
  transition: opacity 700ms ease, transform 700ms ease;
  transition-delay: var(--delay, 0ms);
}

.fade-up {
  transform: translateY(28px);
}

.fade-left {
  transform: translateX(-34px);
}

.fade-right {
  transform: translateX(34px);
}

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

@keyframes blink {
  50% {
    opacity: 0;
  }
}

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

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1024px) {
  .hero-grid,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 136px;
  }

  .profile-stage {
    min-height: 480px;
  }

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

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

@media (max-width: 820px) {
  body,
  button.contact-card,
  .project-image,
  .lightbox-icon,
  .lightbox-nav,
  .lightbox-thumb {
    cursor: auto;
  }

  .cursor {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    top: 92px;
    left: 20px;
    right: 20px;
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(13, 13, 13, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

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

  .nav-links a {
    padding: 14px;
  }

  .hero-grid {
    gap: 34px;
  }

  .project-grid,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 8px;
  }

  .timeline-dot {
    left: 8px;
  }

  .timeline-item {
    padding-left: 34px;
    gap: 0;
  }

  .timeline-item:nth-child(even) .timeline-card {
    grid-column: 1;
  }

  .education-card,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .lightbox {
    padding: 12px;
  }

  .lightbox-shell {
    max-height: 94vh;
    padding: 12px;
    gap: 12px;
  }

  .lightbox-stage {
    grid-template-columns: 1fr;
  }

  .lightbox-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 46px;
    height: 62px;
    background: rgba(13, 13, 13, 0.72);
    transform: translateY(-50%);
  }

  .lightbox-nav:hover {
    transform: translateY(-50%);
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }

  .lightbox-media {
    min-height: 260px;
    max-height: 58vh;
  }

  .lightbox-media img {
    max-height: 58vh;
  }

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

  .lightbox-thumbs {
    width: 100%;
    justify-content: flex-start;
  }
}

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

  .section {
    padding: 76px 0;
  }

  .brand span:last-child {
    display: none;
  }

  h1 {
    font-size: clamp(2.45rem, 14vw, 4rem);
  }

  .hero-actions,
  .btn {
    width: 100%;
  }

  .profile-stage {
    min-height: 390px;
  }

  .profile-frame {
    width: min(100%, 310px);
  }

  .hero-stat {
    right: 4px;
    bottom: 24px;
    width: 164px;
  }

  .info-grid,
  .skill-grid,
  .soft-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-card,
  .project-body,
  .timeline-card,
  .education-card {
    padding: 22px;
  }

  .gallery-hint {
    right: 10px;
    bottom: 10px;
    opacity: 1;
    transform: none;
  }

  .lightbox-topbar {
    align-items: flex-start;
  }

  .lightbox-icon {
    width: 40px;
    height: 40px;
  }

  .lightbox-media {
    min-height: 220px;
  }

  .lightbox-thumb {
    width: 60px;
    height: 42px;
  }
}

@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;
  }
}
