:root {
  --bg: #070b12;
  --bg-soft: #0c1422;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --border: rgba(255, 255, 255, 0.16);
  --text: #eef6ff;
  --muted: #a8b4c7;
  --accent: #37d8ff;
  --accent-2: #7cf7c8;
  --accent-3: #ff8c42;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 8px;
}

body.light-theme {
  --bg: #f6f8fb;
  --bg-soft: #e9eef6;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --border: rgba(16, 32, 52, 0.2);
  --text: #102033;
  --muted: #465568;
  --accent: #007fa8;
  --accent-2: #0d9874;
  --accent-3: #d66a16;
  --shadow: 0 20px 60px rgba(21, 35, 55, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  --spotlight-x: 50vw;
  --spotlight-y: 20vh;
  position: relative;
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 10%, rgba(55, 216, 255, 0.14), transparent 34rem),
    radial-gradient(circle at 85% 8%, rgba(124, 247, 200, 0.11), transparent 32rem),
    linear-gradient(135deg, #05070d 0%, #08111e 42%, #07121a 100%);
  overflow-x: hidden;
}

body.light-theme {
  background:
    radial-gradient(circle at 18% 10%, rgba(0, 127, 168, 0.14), transparent 34rem),
    radial-gradient(circle at 85% 8%, rgba(13, 152, 116, 0.12), transparent 32rem),
    linear-gradient(135deg, #f7fbff 0%, #edf4fb 48%, #f9fbff 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--spotlight-x) var(--spotlight-y), rgba(55, 216, 255, 0.18), transparent 22rem),
    radial-gradient(circle at calc(var(--spotlight-x) + 10rem) calc(var(--spotlight-y) + 8rem), rgba(124, 247, 200, 0.1), transparent 18rem);
  transition: background 0.12s linear;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

body.lightbox-open {
  overflow: hidden;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem clamp(1rem, 4vw, 4rem);
  background: rgba(7, 11, 18, 0.76);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

body.light-theme .site-header {
  background: rgba(246, 250, 255, 0.82);
  border-bottom-color: rgba(16, 32, 52, 0.1);
}

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

.brand-mark {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border: 1px solid rgba(55, 216, 255, 0.45);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(55, 216, 255, 0.22), rgba(124, 247, 200, 0.1));
  color: #ffffff;
  box-shadow: 0 0 32px rgba(55, 216, 255, 0.22);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.5rem);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.language-toggle {
  display: inline-grid;
  min-width: 3rem;
  height: 2.45rem;
  place-items: center;
  border: 1px solid rgba(55, 216, 255, 0.35);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle {
  display: inline-grid;
  min-width: 4.6rem;
  height: 2.45rem;
  place-items: center;
  border: 1px solid rgba(55, 216, 255, 0.35);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 247, 200, 0.55);
  background: rgba(124, 247, 200, 0.12);
}

.language-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 247, 200, 0.55);
  background: rgba(124, 247, 200, 0.12);
}

.menu-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 1.15rem;
  height: 2px;
  margin: 3px auto;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

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

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

.section {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4.5rem, 8vw, 7rem) 0;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  padding-top: 8rem;
  overflow: hidden;
}

.hero-network {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.78;
  pointer-events: none;
}

.hero-content,
.hero-panel {
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(3rem, 9vw, 6.6rem);
  line-height: 0.95;
}

.hero-role {
  margin: 1.35rem 0 0;
  color: var(--accent-2);
  font-size: clamp(1.1rem, 2.3vw, 1.55rem);
  font-weight: 700;
}

.typing-line {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-weight: 800;
}

#typingText {
  color: var(--accent);
}

.typing-caret {
  color: var(--accent-2);
  animation: cursorBlink 0.85s steps(2, start) infinite;
}

.hero-text,
.section-lead,
.about-card p,
.project-card p {
  color: var(--muted);
  line-height: 1.75;
}

.hero-text {
  max-width: 680px;
  margin: 1.3rem 0 0;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #031019;
}

.button-secondary {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
}

.glass-card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform 0.18s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.glass-card.is-tilting {
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), 0 0 45px rgba(55, 216, 255, 0.12);
}

body.light-theme .glass-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(16, 32, 52, 0.18);
  box-shadow: 0 18px 55px rgba(24, 45, 72, 0.13);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 1.15rem;
}

.hero-panel::before,
.carousel-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(55, 216, 255, 0.14), transparent 36%, rgba(255, 140, 66, 0.1));
}

.terminal-bar {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.terminal-bar span {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--accent-3);
}

.terminal-bar span:nth-child(2) {
  background: var(--accent);
}

.terminal-bar span:nth-child(3) {
  background: var(--accent-2);
}

pre {
  position: relative;
  z-index: 1;
  margin: 0;
  white-space: pre-wrap;
  color: #d9fff4;
  font: 600 0.98rem/1.8 "Consolas", "SFMono-Regular", monospace;
}

body.light-theme pre {
  color: #123348;
}

.terminal-cursor::after {
  content: "_";
  display: inline-block;
  margin-left: 0.12rem;
  color: var(--accent-2);
  animation: cursorBlink 0.85s steps(2, start) infinite;
}

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

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

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

.section-heading.centered {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.08;
}

.section-lead {
  margin: 1rem auto 0;
  max-width: 650px;
}

.about-card {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.about-card p {
  max-width: 860px;
  margin: 0;
  font-size: 1.05rem;
}

.skills-grid,
.projects-grid {
  display: grid;
  gap: 1rem;
}

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

.skill-card {
  display: flex;
  min-height: 5rem;
  align-items: center;
  justify-content: center;
  padding: 1.1rem;
  color: #f7fbff;
  font-weight: 800;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

body.light-theme .skill-card {
  color: #102033;
  background: rgba(255, 255, 255, 0.94);
}

body.light-theme .skill-card:hover,
body.light-theme .project-card:hover {
  border-color: rgba(0, 127, 168, 0.55);
  background: #ffffff;
}

.skill-card:hover,
.project-card:hover {
  border-color: rgba(55, 216, 255, 0.38);
  background: var(--panel-strong);
}

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

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0 0 1.2rem;
}

.filter-button {
  min-height: 2.45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0.55rem 0.9rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

body.light-theme .filter-button,
body.light-theme .button-secondary,
body.light-theme .language-toggle,
body.light-theme .theme-toggle {
  background: rgba(255, 255, 255, 0.88);
  color: #102033;
}

.filter-button:hover,
.filter-button.is-active {
  transform: translateY(-1px);
  border-color: rgba(55, 216, 255, 0.55);
  background: rgba(55, 216, 255, 0.16);
}

.project-card {
  padding: 1.4rem;
  border-color: rgba(55, 216, 255, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.project-card:hover {
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-4px);
  border-color: rgba(55, 216, 255, 0.58);
  box-shadow: var(--shadow), 0 0 34px rgba(55, 216, 255, 0.18);
}

.project-card.is-hidden {
  display: none;
}

.project-number {
  color: var(--accent-2);
  font-weight: 900;
}

.project-card h3 {
  margin: 0.7rem 0;
  font-size: 1.2rem;
}

.project-card p {
  margin: 0;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0;
}

.project-tech span {
  border: 1px solid rgba(55, 216, 255, 0.25);
  border-radius: 999px;
  background: rgba(55, 216, 255, 0.1);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.35rem 0.6rem;
}

body.light-theme .project-tech span {
  background: rgba(0, 127, 168, 0.1);
  color: #102033;
}

.project-link {
  display: inline-flex;
  min-height: 2.45rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(124, 247, 200, 0.35);
  border-radius: var(--radius);
  color: var(--accent-2);
  font-weight: 900;
  padding: 0.55rem 0.85rem;
  transition: transform 0.2s ease, background 0.2s ease;
}

.project-link:hover {
  transform: translateY(-2px);
  background: rgba(124, 247, 200, 0.12);
}

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

.skill-progress {
  padding: 1.1rem;
}

.skill-progress div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.skill-progress i {
  display: block;
  width: 100%;
  height: 0.75rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.skill-progress i::before {
  content: "";
  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.2, 0.8, 0.2, 1);
}

.skill-progress.is-filled i::before {
  width: var(--progress);
}

.timeline {
  position: relative;
  display: grid;
  gap: 1rem;
  padding-left: 1.4rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  bottom: 0.4rem;
  left: 0;
  width: 2px;
  background: linear-gradient(var(--accent), var(--accent-2));
}

.timeline-item {
  position: relative;
  padding: 1.15rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 1.3rem;
  left: calc(-1.4rem - 5px);
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(55, 216, 255, 0.14);
}

.timeline-item span {
  color: var(--accent-2);
  font-weight: 900;
}

.timeline-item p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.65;
}

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

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

.carousel-shell {
  position: relative;
  display: grid;
  min-height: clamp(400px, 62vw, 680px);
  place-items: center;
  overflow: hidden;
  padding: clamp(1rem, 4vw, 2rem);
}

.certificate-carousel {
  position: relative;
  z-index: 1;
  width: 100%;
  height: clamp(360px, 58vw, 620px);
  perspective: 1200px;
}

.certificate-card {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(52vw, 440px);
  height: min(70vw, 570px);
  max-height: calc(100% - 1rem);
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.68);
  transition: transform 0.58s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.42s ease, filter 0.42s ease;
}

.certificate-card img {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--radius) - 2px);
  background: #ffffff;
  object-fit: contain;
}

.certificate-card::after {
  content: attr(data-short-title);
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  left: 0.7rem;
  overflow: hidden;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(5, 10, 18, 0.72);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  opacity: 0;
  text-overflow: ellipsis;
  transform: translateY(10px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  white-space: nowrap;
}

.certificate-card.is-active {
  z-index: 5;
  opacity: 1;
  filter: saturate(1.08);
  transform: translate(-50%, -50%) scale(1);
}

.certificate-card.is-prev {
  z-index: 3;
  opacity: 0.38;
  filter: blur(0.6px) saturate(0.72) brightness(0.82);
  transform: translate(calc(-50% - min(35vw, 390px)), -50%) rotateY(42deg) rotateZ(-2deg) scale(0.5);
}

.certificate-card.is-next {
  z-index: 3;
  opacity: 0.38;
  filter: blur(0.6px) saturate(0.72) brightness(0.82);
  transform: translate(calc(-50% + min(35vw, 390px)), -50%) rotateY(-42deg) rotateZ(2deg) scale(0.5);
}

.certificate-card.is-prev::after,
.certificate-card.is-next::after {
  opacity: 1;
  transform: translateY(0);
}

.certificate-card.is-far {
  opacity: 0;
  pointer-events: none;
}

.certificate-card:hover {
  transform: translate(-50%, -50%) scale(1.035);
}

.certificate-card.is-prev:hover {
  opacity: 0.58;
  filter: blur(0) saturate(0.9) brightness(0.95);
  transform: translate(calc(-50% - min(35vw, 390px)), -50%) rotateY(36deg) rotateZ(-1deg) scale(0.56);
}

.certificate-card.is-next:hover {
  opacity: 0.58;
  filter: blur(0) saturate(0.9) brightness(0.95);
  transform: translate(calc(-50% + min(35vw, 390px)), -50%) rotateY(-36deg) rotateZ(1deg) scale(0.56);
}

.carousel-arrow,
.lightbox-arrow,
.lightbox-close {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(9, 17, 29, 0.76);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 10;
  width: 3rem;
  height: 3rem;
  transform: translateY(-50%);
}

.carousel-prev {
  left: clamp(0.5rem, 2vw, 1.4rem);
}

.carousel-next {
  right: clamp(0.5rem, 2vw, 1.4rem);
}

.carousel-arrow:hover,
.lightbox-arrow:hover,
.lightbox-close:hover {
  border-color: rgba(55, 216, 255, 0.55);
  background: rgba(55, 216, 255, 0.18);
  transform: translateY(-50%) scale(1.05);
}

.carousel-caption {
  min-height: 1.5rem;
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.carousel-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1rem;
}

.carousel-dot {
  width: 0.65rem;
  height: 0.65rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.carousel-dot.is-active {
  width: 1.6rem;
  background: var(--accent);
}

.contact-card {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.contact-card a {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.contact-card a:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 247, 200, 0.46);
}

.contact-form {
  display: grid;
  gap: 1rem;
  padding: clamp(1.15rem, 3vw, 1.6rem);
}

.form-copy h3 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.form-copy p:not(.eyebrow) {
  margin: 0.65rem 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.contact-form label {
  display: grid;
  gap: 0.45rem;
  color: var(--text);
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  background: rgba(4, 10, 18, 0.72);
  color: var(--text);
  font: inherit;
  outline: none;
  padding: 0.9rem 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.light-theme .contact-form input,
body.light-theme .contact-form textarea {
  background: rgba(255, 255, 255, 0.82);
}

.contact-form textarea {
  min-height: 9rem;
  resize: vertical;
}

.turnstile-box {
  display: flex;
  min-height: 4.2rem;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(4, 10, 18, 0.36);
  padding: 0.65rem;
}

body.light-theme .turnstile-box {
  border-color: rgba(16, 32, 52, 0.14);
  background: rgba(255, 255, 255, 0.72);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(55, 216, 255, 0.65);
  background: rgba(7, 16, 28, 0.92);
  box-shadow: 0 0 0 4px rgba(55, 216, 255, 0.12);
}

.form-status {
  min-height: 1.5rem;
  margin: 0;
  color: var(--accent-2);
  font-weight: 800;
}

.site-footer {
  padding: 2rem 1rem;
  color: var(--muted);
  text-align: center;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  background: rgba(2, 5, 10, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.lightbox-content {
  display: grid;
  max-width: min(100%, 1180px);
  height: calc(100vh - 4rem);
  justify-self: center;
  margin: 0;
  place-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: calc(100vh - 7rem);
  border-radius: var(--radius);
  background: #ffffff;
  object-fit: contain;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.75);
}

.lightbox-content figcaption {
  margin-top: 0.8rem;
  color: var(--text);
  font-weight: 800;
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 110;
  width: 3rem;
  height: 3rem;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-arrow {
  width: 3rem;
  height: 3rem;
}

.lightbox-arrow:hover,
.lightbox-close:hover {
  transform: scale(1.05);
}

@media (max-width: 900px) {
  .site-header {
    gap: 0.75rem;
  }

  .menu-toggle {
    display: block;
    order: 3;
  }

  .language-toggle {
    margin-left: auto;
    order: 2;
  }

  .theme-toggle {
    order: 2;
  }

  .nav-links {
    position: fixed;
    top: 4.7rem;
    right: 1rem;
    left: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(9, 15, 26, 0.96);
  }

  body.light-theme .nav-links {
    background: rgba(246, 250, 255, 0.96);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-network {
    opacity: 0.5;
  }

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

  .certificate-card {
    width: min(62vw, 390px);
    height: min(82vw, 520px);
  }

  .certificate-card.is-prev {
    opacity: 0.34;
    transform: translate(calc(-50% - 31vw), -50%) rotateY(34deg) rotateZ(-2deg) scale(0.44);
  }

  .certificate-card.is-next {
    opacity: 0.34;
    transform: translate(calc(-50% + 31vw), -50%) rotateY(-34deg) rotateZ(2deg) scale(0.44);
  }
}

@media (max-width: 620px) {
  .brand span:last-child {
    display: none;
  }

  .language-toggle {
    min-width: 2.75rem;
    height: 2.35rem;
  }

  .theme-toggle {
    min-width: 4rem;
    height: 2.35rem;
    font-size: 0.7rem;
  }

  .section {
    width: min(100% - 1rem, 1120px);
  }

  .hero-actions,
  .contact-card {
    flex-direction: column;
  }

  .button,
  .contact-card a {
    width: 100%;
  }

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

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

  .carousel-shell {
    min-height: 430px;
    padding-inline: 0.5rem;
  }

  .certificate-carousel {
    height: 390px;
  }

  .certificate-card {
    width: min(76vw, 300px);
    height: min(102vw, 390px);
  }

  .certificate-card.is-prev {
    opacity: 0.25;
    transform: translate(calc(-50% - 36vw), -50%) rotateY(22deg) rotateZ(-2deg) scale(0.38);
  }

  .certificate-card.is-next {
    opacity: 0.25;
    transform: translate(calc(-50% + 36vw), -50%) rotateY(-22deg) rotateZ(2deg) scale(0.38);
  }

  .carousel-arrow {
    top: auto;
    bottom: 0.8rem;
    transform: none;
  }

  .carousel-arrow:hover {
    transform: scale(1.05);
  }

  .lightbox {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "content content"
      "prev next";
    align-content: center;
  }

  .lightbox-content {
    grid-area: content;
    height: auto;
  }

  .lightbox-prev {
    grid-area: prev;
    justify-self: end;
  }

  .lightbox-next {
    grid-area: next;
    justify-self: start;
  }
}
