:root {
  --bg: #0b0f16;
  --panel: #111827;
  --text: #f5f8ff;
  --muted: #b8c2d6;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #8B5CF6;
  --warm: #FB7185;
  --bg-grad-1: #1e2a40;
  --bg-grad-2: #472b1a;
  --topbar-bg: rgba(6, 9, 14, 0.62);
  --hero-bg: #080d14;
  --hero-shadow: rgba(8, 13, 20, 0.95);
  --hero-grad-1: rgba(8, 13, 20, 0);
  --hero-grad-2: rgba(8, 13, 20, 0.42);
  --hero-grad-3: rgba(11, 15, 22, 0.95);
  --hero-transition-join: rgba(8, 13, 20, 0.08);
  --hero-overlay-start: rgba(8, 13, 20, 0.08);
  --hero-overlay-end: rgba(8, 13, 20, 0.44);
  --section-bg-start: rgba(17, 24, 39, 0.86);
  --section-bg-end: rgba(11, 15, 22, 0.92);
  --card-bg: rgba(14, 21, 33, 0.8);
  --project-bg: rgba(16, 24, 36, 0.84);
  --icon-bg-1: rgba(125, 249, 255, 0.2);
  --icon-bg-2: rgba(255, 184, 107, 0.2);
  --discover-text: #f5f8ff;
  --discover-bg: rgba(255, 255, 255, 0.04);
  --discover-border: rgba(255, 255, 255, 0.5);
  --discover-hover-bg: #ffffff;
  --discover-hover-text: #0a111d;
  --discover-hover-shadow: rgba(255, 255, 255, 0.28);
  --hero-title-glow: none;
  --header-height: 72px;
  --hero-offset: 10px;
  --text-gradient: linear-gradient(135deg, var(--accent), var(--warm));
}

:root[data-theme="light"] {
  --bg: #f3ede1;
  --panel: #f6efe3;
  --text: #1a1a1a;
  --muted: #575047;
  --line: rgba(26, 26, 26, 0.16);
  --bg-grad-1: #f7d5b2;
  --bg-grad-2: #dce8f6;
  --topbar-bg: rgba(243, 237, 225, 0.78);
  --hero-bg: #ece1cf;
  --hero-shadow: rgba(203, 186, 160, 0.36);
  --hero-grad-1: rgba(236, 225, 207, 0);
  --hero-grad-2: rgba(236, 225, 207, 0.16);
  --hero-grad-3: #f3ede1;
  --hero-transition-join: rgba(237, 226, 205, 0.05);
  --hero-overlay-start: rgba(255, 255, 255, 0.08);
  --hero-overlay-end: rgba(237, 226, 205, 0.2);
  --section-bg-start: rgba(255, 251, 245, 0.92);
  --section-bg-end: rgba(243, 237, 225, 0.96);
  --card-bg: rgba(255, 255, 255, 0.82);
  --project-bg: rgba(255, 255, 255, 0.9);
  --icon-bg-1: rgba(139, 92, 246, 0.18);
  --icon-bg-2: rgba(251, 113, 133, 0.2);
  --discover-text: #1a1a1a;
  --discover-bg: rgba(255, 255, 255, 0.55);
  --discover-border: rgba(26, 26, 26, 0.36);
  --discover-hover-bg: #1a1a1a;
  --discover-hover-text: #f3ede1;
  --discover-hover-shadow: rgba(26, 26, 26, 0.24);
  --hero-title-glow: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 12% -10%, var(--bg-grad-1) 0, transparent 34%),
    radial-gradient(circle at 92% 110%, var(--bg-grad-2) 0, transparent 32%),
    var(--bg);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  scroll-behavior: smooth;
  transition: background 0.3s ease, color 0.3s ease;
}

.theme-curtain {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  transform-origin: top;
  transform: scaleY(0);
  background: var(--bg);
}

.theme-curtain.is-falling {
  transform: scaleY(1);
  transition: transform 550ms cubic-bezier(0.76, 0, 0.24, 1);
}

.theme-curtain.is-rising {
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 550ms cubic-bezier(0.76, 0, 0.24, 1);
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 5vw;
  backdrop-filter: blur(10px);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  color: var(--text);
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.topbar nav {
  display: flex;
  gap: 1rem;
}

.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.25s ease;
}

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

.theme-toggle {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
  color: var(--text);
  box-shadow: 0 0 0 1.5px var(--line);
  transition: transform 0.2s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

.theme-toggle:active {
  transform: scale(0.86);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.theme-toggle .att-svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
  transition: color 0.3s ease;
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

main {
  display: grid;
  gap: 0;
  padding-bottom: 4rem;
}

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-height) - var(--hero-offset));
  margin: calc(var(--header-height) + var(--hero-offset) - 10px) 0 0;
  margin-bottom: -1px;
  overflow: hidden;
  background: var(--hero-bg);
  box-shadow: inset 0 -120px 120px -85px var(--hero-shadow);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.hero-visibility-anchor {
  position: absolute;
  left: 0;
  width: 100%;
  height: min(32vh, 240px);
  pointer-events: none;
}

.hero-visibility-anchor--top {
  top: calc(-1 * min(32vh, 240px));
}

.hero-visibility-anchor--bottom {
  bottom: calc(-1 * min(32vh, 240px));
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.01) 28%,
    var(--hero-transition-join) 62%,
    var(--hero-grad-2) 84%,
    var(--hero-grad-3) 100%
  );
}

.shader-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-overlay {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: calc(100svh - var(--header-height) - var(--hero-offset));
  display: grid;
  place-content: center;
  text-align: center;
  animation: fadeUp 1.1s ease both;
}

.hero h1 {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(4.5rem, 15vw, 11rem);
  letter-spacing: 0.06em;
  line-height: 0.9;
  text-shadow: 0 0 28px var(--hero-title-glow);
}

.hero p {
  margin: 0.4rem 0 0;
  font-size: clamp(0.9rem, 2.4vw, 1.3rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.discover-cta {
  position: absolute;
  left: 50%;
  bottom: clamp(2.1rem, 6vh, 3.6rem);
  z-index: 5;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.24rem;
  min-width: 136px;
  padding: 0.72rem 1.15rem 0.68rem;
  border-radius: 999px;
  color: var(--discover-text);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--discover-bg);
  border: 1px solid var(--discover-border);
  backdrop-filter: blur(5px);
  transition: background-color 0.45s ease-in-out, color 0.4s ease-in-out,
    border-color 0.4s ease-in-out, transform 0.35s ease-in-out,
    box-shadow 0.4s ease-in-out;
}

.discover-arrow {
  display: inline-block;
  font-size: 1.02rem;
  line-height: 1;
  transition: transform 0.35s ease-in-out;
}

.discover-cta:hover,
.discover-cta:focus-visible {
  background: var(--discover-hover-bg);
  color: var(--discover-hover-text);
  border-color: var(--discover-hover-bg);
  box-shadow: 0 10px 28px var(--discover-hover-shadow);
  transform: translateX(-50%) translateY(-2px);
}

.discover-cta:hover .discover-arrow,
.discover-cta:focus-visible .discover-arrow {
  transform: translateY(1px);
}

.hero-motion-toggle {
  position: absolute;
  right: clamp(0.9rem, 2.4vw, 1.35rem);
  bottom: clamp(1rem, 2.8vh, 1.45rem);
  z-index: 6;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--discover-border);
  background: var(--discover-bg);
  color: var(--discover-text);
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
  opacity: 0.48;
  backdrop-filter: blur(5px);
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease,
    transform 0.25s ease, box-shadow 0.3s ease, opacity 0.2s ease;
}

.hero-motion-toggle .material-symbols-outlined {
  font-size: 1.15rem;
  line-height: 1;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.hero-motion-toggle:hover,
.hero-motion-toggle:focus-visible {
  background: var(--discover-hover-bg);
  color: var(--discover-hover-text);
  border-color: var(--discover-hover-bg);
  opacity: 1;
  box-shadow: 0 10px 28px var(--discover-hover-shadow);
  transform: translateY(-1px);
}

.hero-motion-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.section {
  width: min(1100px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 2.25rem;
  border-radius: 24px;
  background: linear-gradient(160deg, var(--section-bg-start), var(--section-bg-end));
  border: 1px solid var(--line);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.section + .section {
  margin-top: 3.2rem;
}

.intro-title {
  width: min(1200px, calc(100% - 3rem));
  margin: 3.4rem auto 2.2rem;
  scroll-margin-top: calc(var(--header-height) + 1.2rem);
  text-align: center;
}

.intro-title h2 {
  margin: 0;
  font-size: clamp(1.65rem, 4.3vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
  color: var(--text);
}

.typewriter-line {
  margin-top: 0.85rem;
  display: flex;
  justify-content: center;
}

.typewriter-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14ch;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.02em;
    font-size: clamp(1.65rem, 4.3vw, 3rem);
}

.typewriter-text {
  display: inline-block;
  min-height: 1.2em;
  background: var(--text-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.typewriter-cursor {
  margin-left: 0.08em;
  color: var(--warm);
  animation: blinkCursor 0.8s steps(1, end) infinite;
}

.sparkles-word {
  position: relative;
  display: inline-block;
  margin: 0 0.2rem;
  color: var(--text);
}

.sparkles-word .sparkle-svg {
  position: absolute;
  pointer-events: none;
  z-index: 20;
  transform-origin: center;
  transform: translate(-50%, -50%) scale(0) rotate(75deg);
  opacity: 0;
  animation: sparkleTwinkle 1.8s ease-in-out infinite;
}

.about h2,
.section-head h2,
.contact h2 {
  margin-top: 0;
  font-size: clamp(1.6rem, 2.9vw, 2.4rem);
}

.section p {
  color: var(--muted);
  line-height: 1.72;
}

.section-head {
  margin-bottom: 1rem;
}

.skill-grid,
.project-grid {
  display: grid;
  gap: 1rem;
}

.skill-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.skill-card {
  position: relative;
  padding: 1.2rem;
  border-radius: 18px;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: background 0.3s ease, border-color 0.3s ease;
}

:root[data-theme="light"] .skill-card {
  border-color: rgba(26, 26, 26, 0.1);
}

.icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: inline-grid;
  place-content: center;
  background: linear-gradient(130deg, var(--icon-bg-1), var(--icon-bg-2));
}

.icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.project-card {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--project-bg);
  transition: background 0.3s ease, border-color 0.3s ease;
}

:root[data-theme="light"] .project-card {
  border-color: rgba(26, 26, 26, 0.12);
}

.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.project-body {
  padding: 1rem;
}

.project-body h3 {
  margin: 0 0 0.4rem;
}

.project-meta {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-body span {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}

.education-link {
  display: inline-block;
  margin-top: 0.95rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--discover-bg);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
    transform 0.2s ease, box-shadow 0.25s ease;
}

.education-link:hover,
.education-link:focus-visible {
  background: var(--discover-hover-bg);
  color: var(--discover-hover-text);
  border-color: var(--discover-hover-bg);
  box-shadow: 0 8px 22px var(--discover-hover-shadow);
  transform: translateY(-1px);
}

.education-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.education-corner-link {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--discover-bg);
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
    transform 0.2s ease, box-shadow 0.25s ease;
}

.education-corner-link:hover,
.education-corner-link:focus-visible {
  background: var(--discover-hover-bg);
  color: var(--discover-hover-text);
  border-color: var(--discover-hover-bg);
  box-shadow: 0 8px 22px var(--discover-hover-shadow);
  transform: translateY(-1px);
}

.education-corner-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.showcase-card {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--project-bg);
  transition: background 0.3s ease, border-color 0.3s ease;
}

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

.showcase-card img {
  width: 100%;
  height: clamp(170px, 18vw, 210px);
  object-fit: cover;
  display: block;
}

.showcase-body {
  padding: clamp(1rem, 2vw, 1.5rem);
}

.showcase-body h3 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
}

.showcase-body p {
  margin: 0;
}

.tech-badges {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tech-badges li {
  padding: 0.38rem 0.62rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 74%, transparent);
  color: var(--text);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.showcase-actions {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.showcase-actions a,
.showcase-actions .project-discover-btn {
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  font: inherit;
  background: transparent;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.project-discover-btn {
  width: 100%;
  text-align: center;
  background: var(--discover-bg);
}

.showcase-actions a:hover,
.showcase-actions a:focus-visible,
.showcase-actions .project-discover-btn:hover,
.showcase-actions .project-discover-btn:focus-visible {
  background: var(--discover-hover-bg);
  color: var(--discover-hover-text);
  border-color: var(--discover-hover-bg);
}

.tech-badges .tech-php {
  background: rgba(119, 123, 180, 0.24);
  border-color: rgba(119, 123, 180, 0.55);
}

.tech-badges .tech-mysql {
  background: rgba(0, 117, 143, 0.2);
  border-color: rgba(0, 117, 143, 0.5);
}

.tech-badges .tech-javascript {
  background: rgba(247, 223, 30, 0.22);
  border-color: rgba(247, 223, 30, 0.52);
}

.tech-badges .tech-laravel {
  background: rgba(255, 45, 32, 0.2);
  border-color: rgba(255, 45, 32, 0.5);
}

.tech-badges .tech-api {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.5);
}

.tech-badges .tech-docker {
  background: rgba(13, 183, 237, 0.2);
  border-color: rgba(13, 183, 237, 0.5);
}

.tech-badges .tech-prestashop {
  background: rgba(223, 20, 149, 0.2);
  border-color: rgba(223, 20, 149, 0.52);
}

.tech-badges .tech-uiux {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.52);
}

.tech-badges .tech-git {
  background: rgba(240, 80, 51, 0.2);
  border-color: rgba(240, 80, 51, 0.52);
}

.tech-badges .tech-nodejs {
  background: rgba(104, 160, 99, 0.24);
  border-color: rgba(104, 160, 99, 0.58);
}

.tech-badges .tech-webserial {
  background: rgba(59, 130, 246, 0.24);
  border-color: rgba(59, 130, 246, 0.58);
}

.tech-badges .tech-cnc {
  background: rgba(245, 158, 11, 0.24);
  border-color: rgba(245, 158, 11, 0.58);
}

:root[data-theme="light"] .showcase-card {
  border-color: rgba(26, 26, 26, 0.12);
}

:root[data-theme="light"] .tech-badges li,
:root[data-theme="light"] .showcase-actions a {
  border-color: rgba(26, 26, 26, 0.14);
}

:root[data-theme="light"] .tech-badges li {
  color: #1a1a1a;
}

.project-popup {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: stretch;
  padding: 0.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.project-popup[hidden] {
  display: none;
}

.project-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 18, 0.66);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 240ms ease;
}

.project-popup__panel {
  position: relative;
  width: min(1240px, 100%);
  margin: auto;
  max-height: calc(100vh - 1.5rem);
  overflow: auto;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, var(--section-bg-start), var(--section-bg-end));
  display: block;
  outline: none;
  opacity: 0;
  transform: translateY(20px) scale(0.985);
  transition: opacity 280ms ease, transform 280ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.project-popup.is-open,
.project-popup.is-closing {
  pointer-events: auto;
}

.project-popup.is-open {
  opacity: 1;
}

.project-popup.is-open .project-popup__backdrop {
  opacity: 1;
}

.project-popup.is-open .project-popup__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.project-popup__close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--discover-bg);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
}

.project-popup__media {
  border-bottom: 1px solid var(--line);
  min-height: 260px;
}

.project-popup__media img {
  width: 100%;
  height: clamp(240px, 38vh, 420px);
  object-fit: cover;
  display: block;
}

.project-popup__content {
  padding: 1.2rem 1.2rem 1.3rem;
}

.project-popup__line {
  margin: 0.75rem 0 0;
}

.project-popup__features {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.5;
}

.project-popup__gallery {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.project-popup__gallery img {
  width: 100%;
  height: 120px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.project-discover-btn--popup {
  cursor: pointer;
}

@media (max-width: 860px) {
  .project-popup__gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .project-popup {
    padding: 0;
  }

  .project-popup__panel {
    max-height: 100vh;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .project-popup__gallery {
    grid-template-columns: 1fr;
  }
}

.contact {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(1.5rem, 3vw, 2rem);
}

.contact-shell {
  position: relative;
  overflow: hidden;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 1.5rem);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(9, 13, 20, 0.74), rgba(7, 10, 16, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
  isolation: isolate;
}

:root[data-theme="light"] .contact-shell {
  background: linear-gradient(180deg, rgba(255, 248, 241, 0.9), rgba(247, 239, 227, 0.98));
  border-color: rgba(26, 26, 26, 0.08);
}

.contact-glow {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.2;
  z-index: 0;
}

.contact-glow--primary {
  top: -90px;
  left: -40px;
  background: linear-gradient(135deg, #fb7185, #f97316);
}

.contact-glow--secondary {
  right: -60px;
  bottom: -110px;
  background: linear-gradient(135deg, #8b5cf6, #38bdf8);
}

.contact-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.04;
}

.contact-copy {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.contact-links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 56px;
  padding: 0.95rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, background 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease, color 0.25s ease;
}

:root[data-theme="light"] .contact-pill {
  border-color: rgba(26, 26, 26, 0.1);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 30px rgba(68, 56, 42, 0.08);
}

.contact-pill .material-symbols-outlined {
  font-size: 1.2rem;
  line-height: 1;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.contact-pill:hover,
.contact-pill:focus-visible {
  transform: translateY(-2px) scale(1.01);
  background: var(--discover-hover-bg);
  color: var(--discover-hover-text);
  border-color: var(--discover-hover-bg);
  box-shadow: 0 18px 38px var(--discover-hover-shadow);
}

.contact-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.contact-pill--project {
  background: linear-gradient(135deg, rgba(251, 113, 133, 0.18), rgba(249, 115, 22, 0.16));
}

:root[data-theme="light"] .contact-pill--project {
  background: linear-gradient(135deg, rgba(251, 113, 133, 0.12), rgba(249, 115, 22, 0.12));
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sparkleTwinkle {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0) rotate(75deg);
  }

  22% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.25) rotate(92deg);
  }

  48% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(var(--sparkle-scale, 1)) rotate(120deg);
  }

  64% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(var(--sparkle-scale, 1)) rotate(132deg);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0) rotate(150deg);
  }
}

@keyframes blinkCursor {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@keyframes marqueeLeft {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 760px) {
  :root {
    --hero-offset: 8px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .topbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .topbar nav {
    flex-wrap: wrap;
  }

  .hero {
    min-height: calc(100svh - var(--header-height) - var(--hero-offset));
  }

  .discover-cta {
    bottom: 1.7rem;
    min-width: 124px;
    padding: 0.62rem 1rem;
  }

  .hero-motion-toggle {
    bottom: 1.25rem;
    right: 0.85rem;
    font-size: 0.72rem;
    padding: 0.48rem 0.74rem;
  }

  .section {
    width: calc(100% - 2rem);
    padding: 1.4rem;
  }

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

  .contact-shell {
    padding: 1rem 0.9rem;
  }

  .contact-links {
    flex-direction: column;
  }

  .contact-pill {
    width: 100%;
  }

  .showcase-actions a {
    width: 100%;
    text-align: center;
  }


@media (min-width: 761px) and (max-width: 1100px) {
  .projects-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
  .section + .section {
    margin-top: 2.3rem;
  }

  .intro-title {
    width: calc(100% - 2rem);
    margin: 2.5rem auto 1.4rem;
  }

  .expertise-track {
    animation-duration: 16s;
  }
}

/* Education section styles */
.education-cta {
  margin-top: 1rem;
}

.education-cta .project-discover-btn {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--discover-bg);
  color: var(--discover-text);
  font-weight: 600;
  font-size: 0.925rem;
  display: inline-block;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
  cursor: pointer;
}

.education-cta .project-discover-btn:hover,
.education-cta .project-discover-btn:focus-visible {
  background: var(--discover-hover-bg);
  color: var(--discover-hover-text);
  border-color: var(--discover-hover-bg);
  transform: translateY(-2px);
}

/* Opquast badge styling */
.education-badge {
  margin: 1rem 0;
  text-align: center;
}

.education-badge img {
  max-width: 200px;
  height: auto;
  transition: filter 0.3s ease;
}

/* Dark mode: invert badge colors for better visibility */
:root .education-badge img {
  filter: invert(1) hue-rotate(180deg) brightness(1.1);
}

/* Light mode: ensure badge is visible */
:root[data-theme="light"] .education-badge img {
  filter: none;
}
 
