:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0d1a2e;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.13);
  --text: #f5f8ff;
  --muted: #a9b8d2;
  --accent: #5592e7;
  --accent-2: #6f4ef5;
  --accent-3: #467df5;
  --success: #64e6a5;
  --warning: #ffc861;
  --border: rgba(255, 255, 255, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-width: 1180px;
  --header-height: 78px;
  --spotlight-card-core: rgba(186, 239, 255, 0.6);
  --spotlight-card-mid: rgba(96, 147, 255, 0.28);
  --spotlight-card-blend: screen;
  --spotlight-visibility-factor: 1;
  --spotlight-global-core: rgba(192, 245, 255, 0.34);
  --spotlight-global-mid: rgba(104, 142, 255, 0.18);
  --spotlight-global-blend: screen;
  --spotlight-global-opacity: 0.3;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f8ff;
  --bg-soft: #eaf0fb;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --text: #0d1830;
  --muted: #52617a;
  --border: rgba(22, 37, 65, 0.12);
  --shadow: 0 22px 60px rgba(55, 83, 130, 0.18);
  --spotlight-card-core: rgba(14, 38, 94, 0.4);
  --spotlight-card-mid: rgba(95, 35, 182, 0.26);
  --spotlight-card-blend: multiply;
  --spotlight-visibility-factor: 1.2;
  --spotlight-global-core: rgba(20, 45, 103, 0.34);
  --spotlight-global-mid: rgba(105, 42, 190, 0.2);
  --spotlight-global-blend: multiply;
  --spotlight-global-opacity: 0.42;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(62, 228, 211, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(124, 92, 255, 0.18), transparent 35rem),
    linear-gradient(135deg, var(--bg), var(--bg-soft));
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: auto;
}

body.nav-open {
  overflow: hidden;
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  border-bottom: 1px solid var(--border);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 120;
  pointer-events: none;
  background: color-mix(in srgb, var(--surface-strong) 56%, transparent);
}

.scroll-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #7f9fff, var(--accent-3));
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 65%, transparent);
  transition: width 0.08s linear;
}

.navbar {
  width: min(100% - 32px, var(--max-width));
  min-height: var(--header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px rgba(62, 228, 211, 0.24);
}

.brand-mark-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav-panel,
.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.94rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link i {
  width: 16px;
  text-align: center;
}

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

.theme-toggle,
.nav-toggle,
.back-to-top,
.modal-close {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
  backdrop-filter: blur(18px);
}

.theme-toggle {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
}

.theme-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.nav-toggle {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.section {
  position: relative;
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 74px 0;
}

.alt-section::before,
.contact-section::before {
  content: "";
  position: absolute;
  inset: 42px calc(50% - 50vw);
  z-index: -1;
  background: color-mix(in srgb, var(--surface) 56%, transparent);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hero {
  width: 100%;
  min-height: calc(100vh - var(--header-height));
  display: grid;
  place-items: center;
  padding: 64px max(16px, calc((100vw - var(--max-width)) / 2)) 68px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.shape {
  position: absolute;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(62, 228, 211, 0.22), rgba(124, 92, 255, 0.12));
  filter: blur(0.2px);
  animation: float 8s ease-in-out infinite;
}

.shape-one {
  width: 170px;
  height: 170px;
  top: 16%;
  left: 7%;
  border-radius: 44% 56% 62% 38%;
}

.shape-two {
  width: 220px;
  height: 220px;
  right: 5%;
  top: 18%;
  border-radius: 38% 62% 45% 55%;
  animation-delay: -2s;
}

.shape-three {
  width: 110px;
  height: 110px;
  right: 24%;
  bottom: 12%;
  border-radius: 34px;
  transform: rotate(18deg);
  animation-delay: -4s;
}

.hero-content {
  width: min(100%, var(--max-width));
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  align-items: center;
  gap: clamp(36px, 8vw, 96px);
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h1 span,
.section-heading h2 span {
  background: linear-gradient(135deg, rgb(155, 179, 255), rgb(33, 105, 212), rgb(119, 148, 243));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy h1 span {
  white-space: nowrap;
  display: inline-block;
  padding-bottom: 0.06em;
}

.hero-copy h1 {
  line-height: 1.15;
}

h2 {
  
  margin-bottom: 10px;
  font-size: clamp(2rem, 4.4vw, 3.8rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.1rem;
  line-height: 1.25;
}

.hero-role,
.typing-line {
  color: var(--text);
  font-size: clamp(1.05rem, 2.2vw, 1.42rem);
  font-weight: 700;
}

.typing-line {
  min-height: 2rem;
  color: var(--muted);
}

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

.cursor {
  display: inline-block;
  width: 3px;
  height: 1.15em;
  margin-left: 4px;
  vertical-align: -0.18em;
  background: var(--accent);
  animation: blink 0.8s steps(1) infinite;
}

.hero-intro,
.section-heading p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.05rem;
}

.placeholder-note {
  color: color-mix(in srgb, var(--muted) 84%, var(--text) 16%);
}

[data-theme="light"] .hero-intro {
  color: #2d3f5d;
}

[data-theme="light"] .placeholder-note {
  color: #43597c;
}

.hero-actions,
.card-actions,
.modal-actions,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn,
.filter-btn,
.text-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0 18px;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.filter-btn:hover,
.text-btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #06111f;
  border-color: transparent;
  box-shadow: 0 16px 36px rgba(62, 228, 211, 0.22);
  font-weight: 800;
}

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

.btn-ghost {
  background: transparent;
}

.btn-ghost span {
  color: var(--muted);
}

.btn-small {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.92rem;
}

.hero-visual {
  position: relative;
  min-height: 510px;
  display: grid;
  place-items: center;
  margin-top: -65px;
}


.profile-orbit {
  position: absolute;
  width: min(98vw, 500px);
  aspect-ratio: 1;
  margin-top: -58px;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 30%, rgba(62, 228, 211, 0.3), transparent 38%),
    radial-gradient(circle at 70% 70%, rgba(77, 163, 255, 0.24), transparent 42%),
    radial-gradient(circle, transparent 54%, rgba(255, 255, 255, 0.08) 55%, transparent 57%);
  filter: drop-shadow(0 0 26px rgba(62, 228, 211, 0.2));
  animation: orbitFloat 8.5s ease-in-out infinite;
}

.profile-orbit::before,
.profile-orbit::after {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
}

.profile-orbit::before {
  border: 1px solid color-mix(in srgb, var(--accent) 52%, transparent);
  background:
    conic-gradient(
      from 120deg,
      transparent 0 22%,
      rgba(62, 228, 211, 0.72) 22% 30%,
      transparent 30% 60%,
      rgba(77, 163, 255, 0.66) 60% 67%,
      transparent 67% 100%
    );
  -webkit-mask: radial-gradient(circle, transparent 63%, #000 64%);
  mask: radial-gradient(circle, transparent 63%, #000 64%);
  animation: orbitSweep 14s linear infinite;
}

.profile-orbit::after {
  inset: 18%;
  border: 1px dashed color-mix(in srgb, var(--accent-3) 40%, transparent);
  opacity: 0.68;
  animation: orbitSweepReverse 19s linear infinite;
}

.profile-card {
  width: min(100%, 390px);
  position: relative;
  z-index: 1;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);

}

.profile-photo {
  min-height: 395px;
  border-radius: 22px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-strong) 80%, transparent);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.profile-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 6px 4px;
  color: var(--muted);
}

.profile-meta strong {
  color: var(--text);
}

.section-heading {
  margin-bottom: 34px;
}

.stats-grid,
.skills-grid,
.project-grid,
.certificate-grid,
.feature-grid,
.achievement-grid,
.gallery-grid,
.contact-layout {
  display: grid;
  gap: 20px;
}

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

.stat-card,
.skill-card,
.project-card,
.certificate-card,
.timeline-card,
.feature-card,
.achievement-card,
.contact-info,
.contact-form,
.modal-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.stat-card {
  padding: 26px;
}

.stat-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--accent);
}

.stat-card span,
.project-topline,
.certificate-card p,
.timeline-card p,
.feature-card p,
.achievement-card p,
.contact-info a {
  color: var(--muted);
}

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

.skill-card,
.feature-card,
.achievement-card {
  padding: 24px;
}

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-strong) 86%, transparent);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.skills-grid .skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
}

.skills-grid .skill-badge i {
  width: 18px;
  height: 18px;
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
}

.skills-grid .skill-badge span {
  border: 0;
  background: transparent;
  min-height: auto;
  padding: 0;
  font-size: 0.82rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.filter-row .filter-btn {
  white-space: nowrap;
}

.filter-btn.active {
  color: #06111f;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  font-weight: 800;
}

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

.project-card,
.certificate-card {
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-card {
  cursor: pointer;
}

.certificate-card {
  cursor: pointer;
}

.project-card:hover,
.certificate-card:hover,
.achievement-card:hover,
.skill-card:hover {
  transform: translateY(-8px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.project-card:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 75%, white);
  outline-offset: 3px;
}

.certificate-card:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 75%, white);
  outline-offset: 3px;
}

.achievement-link {
  color: var(--accent);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.achievement-link:hover {
  color: color-mix(in srgb, var(--accent) 78%, white);
}

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

.placeholder-media {
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(62, 228, 211, 0.2), rgba(124, 92, 255, 0.18)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px);
  color: color-mix(in srgb, var(--text) 86%, transparent);
}

.placeholder-media::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px dashed color-mix(in srgb, var(--text) 34%, transparent);
  border-radius: inherit;
}

.placeholder-media span {
  position: relative;
  z-index: 1;
  padding: 10px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 50%, transparent);
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.project-image {
  height: 220px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-strong) 80%, transparent);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit:cover;
  object-position:top;
  transition: transform 0.35s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.04);
}

.project-body {
  padding: 20px;
}

.project-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.78rem;
}

.status.completed {
  color: #062116;
  background: var(--success);
}

.status.running {
  color: #2b1b00;
  background: var(--warning);
}

.project-body p {
  color: var(--muted);
}

.project-body .badge-list,
#modalContent .badge-list {
  gap: 6px;
}

.project-body .badge-list span,
#modalContent .badge-list span {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  background: color-mix(in srgb, var(--surface-strong) 28%, transparent);
  color: color-mix(in srgb, var(--text) 70%, var(--muted) 30%);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
}

.card-actions {
  margin-top: 14px;
  gap: 10px;
}

.card-actions a,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border));
  background: color-mix(in srgb, var(--surface-strong) 82%, transparent);
  color: var(--text);
  font-weight: 800;
  font-size: 0.88rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.card-actions a:hover,
.card-actions .text-btn:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 62%, var(--border));
  color: var(--text);
}

.text-btn {
  cursor: pointer;
}

.certificate-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 19px;
}

.certificate-card {
  padding: 15px;
}

.certificate-image {
  height: 175px;
  margin-bottom: 14px;
  border-radius: 14px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-strong) 80%, transparent);
  display: grid;
  place-items: center;
}

.certificate-image img {
  width: 100%;
  height: 100%;
  object-fit:cover;
  object-position:center;
  background: color-mix(in srgb, var(--bg-soft) 66%, #000000 34%);
  margin-top: -10px;
}

.certificate-card h3 {
  min-height: 0;
  margin-bottom: 6px;
  font-size: 1rem;
  line-height: 1.25;
}

.certificate-card p {
  margin: 2px 0;
  font-size: 0.95rem;
}

.certificate-instructor::before {
  content: " | ";
}

.timeline {
  position: relative;
  max-width: 800px;
}

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

.timeline-item {
  position: relative;
  padding-left: 44px;
}

.timeline-dot {
  position: absolute;
  left: 3px;
  top: 24px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 18%, transparent);
}

.timeline-card {
  padding: 26px;
}

.timeline-card a {
  color: var(--accent);
  font-weight: 700;
}

.timeline-card a:hover {
  text-decoration: underline;
}

.timeline-date,
.achievement-card span {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--accent);
  font-weight: 800;
}

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

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

.gallery-grid {
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 190px;
}

.gallery-item {
  min-height: 190px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-strong) 70%, transparent);
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.gallery-item:nth-child(1),
.gallery-item:nth-child(4) {
  grid-column: span 2;
}

.contact-layout {
  grid-template-columns: 0.9fr 1.1fr;
  grid-template-areas: "info form";
  align-items: start;
  gap: 12px;
  max-width: 960px;
  margin-inline: auto;
}

.contact-info,
.contact-form {
  padding: 14px;
  border-radius: 14px;
}

.contact-form {
  grid-area: form;
}

.contact-info {
  grid-area: info;
}

.contact-info {
  display: grid;
  gap: 8px;
}

.contact-info a {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-strong) 72%, transparent);
  overflow-wrap: anywhere;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-info a i {
  width: 18px;
  text-align: center;
  flex: 0 0 18px;
}

.contact-info a span {
  overflow-wrap: anywhere;
}

.contact-info a:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
}

.contact-form {
  display: grid;
  gap: 8px;
}

.form-row {
  display: grid;
  gap: 4px;
}

.form-row label {
  color: var(--text);
  font-weight: 800;
  font-size: 0.84rem;
}

.form-row input,
.form-row textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-strong) 76%, transparent);
  outline: none;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-row textarea {
  resize: vertical;
  min-height: 126px;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.form-row.is-invalid input,
.form-row.is-invalid textarea {
  border-color: #ff6b8a;
}

.form-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.form-status.success {
  color: var(--success);
}

.form-status.error {
  color: #ff9bb0;
}

.contact-form button[disabled] {
  opacity: 0.74;
  cursor: not-allowed;
  transform: none;
}

.footer {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 28px 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.footer p {
  margin: 0;
}

.footer a:hover {
  color: var(--accent);
}

.footer-links a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}

.footer-links a i {
  font-size: 1rem;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 35;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.custom-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  width: 32px;
  height: 32px;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-50px, -50px, 0);
  transition: opacity 0.12s ease;
  will-change: transform;
  overflow: visible;
}

.custom-cursor.is-visible {
  opacity: 1;
}

.cursor-pointer {
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  clip-path: polygon(7% 4%, 10% 93%, 34% 74%, 47% 98%, 63% 89%, 50% 65%, 84% 62%);
  transform-origin: 5px 5px;
  transition: transform 0.14s cubic-bezier(0.22, 1, 0.36, 1), clip-path 0.16s ease;
  filter:
    drop-shadow(0 0 1px rgba(7, 14, 42, 1))
    drop-shadow(-2px 2px 0 rgba(111, 49, 208, 0.9))
    drop-shadow(0 0 10px rgba(58, 232, 236, 0.45))
    drop-shadow(0 8px 16px rgba(0, 0, 0, 0.52));
}

.cursor-pointer::before,
.cursor-pointer::after {
  content: "";
  position: absolute;
  inset: 0;
}

.cursor-pointer::before {
  background:
    radial-gradient(70% 54% at 28% 24%, rgba(185, 156, 255, 0.98), transparent 72%),
    radial-gradient(62% 50% at 70% 38%, rgba(65, 247, 233, 0.96), transparent 74%),
    radial-gradient(48% 64% at 56% 82%, rgba(96, 138, 255, 0.88), transparent 72%),
    linear-gradient(145deg, #070c2c 6%, #223a84 56%, #101948 100%);
}

.cursor-pointer::after {
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.95) 0 1.2px, transparent 2px),
    radial-gradient(circle at 35% 12%, rgba(255, 255, 255, 0.82) 0 1px, transparent 2px),
    radial-gradient(circle at 56% 26%, rgba(255, 255, 255, 0.75) 0 1.1px, transparent 2px),
    radial-gradient(circle at 72% 48%, rgba(255, 255, 255, 0.84) 0 1.1px, transparent 2px),
    radial-gradient(circle at 42% 66%, rgba(255, 255, 255, 0.72) 0 1px, transparent 2px),
    radial-gradient(circle at 66% 80%, rgba(255, 255, 255, 0.84) 0 1.2px, transparent 2px);
  opacity: 0.7;
}

.custom-cursor.is-hovering .cursor-pointer {
  clip-path: polygon(7% 4%, 10% 93%, 34% 74%, 47% 98%, 63% 89%, 50% 65%, 84% 62%);
  transform: scale(1.04);
  filter:
    drop-shadow(0 0 1px rgba(7, 12, 38, 1))
    drop-shadow(-2px 2px 0 rgba(129, 50, 236, 0.9))
    drop-shadow(0 0 13px rgba(58, 235, 236, 0.72))
    drop-shadow(0 7px 16px rgba(0, 0, 0, 0.48));
}

.custom-cursor.is-clicking .cursor-pointer {
  clip-path: polygon(7% 4%, 10% 93%, 34% 74%, 47% 98%, 63% 89%, 50% 65%, 84% 62%);
  transform: scale(0.94);
}

.cursor-click-wave {
  position: fixed;
  z-index: 999;
  left: var(--x);
  top: var(--y);
  width: 14px;
  height: 14px;
  pointer-events: none;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: radial-gradient(circle, rgba(62, 228, 211, 0.28), transparent 62%);
  transform: translate(-50%, -50%) scale(0.6);
  animation: clickWave 0.55s ease-out forwards;
}

.haptic-pulse {
  animation: hapticPulse 0.28s ease;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  padding: 24px;
}

.modal.show {
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(12px);
}

.modal-panel {
  position: relative;
  width: min(100%, 920px);
  max-height: min(92vh, 920px);
  overflow: auto;
  padding: 30px;
  backdrop-filter: blur(10px) saturate(112%);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  background:
    radial-gradient(circle at top right, rgba(62, 228, 211, 0.14), transparent 42%),
    radial-gradient(circle at top left, rgba(77, 163, 255, 0.16), transparent 35%),
    color-mix(in srgb, var(--bg-soft) 78%, #0b1528 22%);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  animation: modalIn 0.22s ease;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  position: absolute;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--border));
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  color: transparent;
  font-size: 0;
  line-height: 0;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  z-index: 2;
  overflow: hidden;
}

.modal-close::before,
.modal-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 15px;
  height: 1.8px;
  border-radius: 999px;
  background: var(--text);
  transform-origin: center;
}

.modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.modal-close:hover {
  transform: scale(1.04);
  border-color: color-mix(in srgb, var(--accent) 72%, var(--border));
}

.modal-close:hover::before,
.modal-close:hover::after {
  background: var(--accent);
}

.modal-media {
  height: 320px;
  margin-bottom: 24px;
  border-radius: 18px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-strong) 80%, transparent);
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.modal-actions a,
.modal-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 52%, var(--border));
  background: color-mix(in srgb, var(--surface-strong) 86%, transparent);
  color: var(--text);
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.modal-actions a:hover,
.modal-actions button:hover {
  transform: translateY(-2px);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 75%, var(--border));
}

.screenshot-panel {
  width: min(100%, 980px);
  max-height: min(94vh, 940px);
}

.screenshot-media {
  position: relative;
  height: min(74vh, 760px);
  margin-bottom: 0;
}

.screenshot-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: color-mix(in srgb, var(--bg-soft) 72%, #000000 28%);
}

.screenshot-counter {
  margin: 12px 0 0;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.screenshot-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  display: grid;
  place-items: center;
  z-index: 2;
}

.screenshot-arrow-prev {
  left: 12px;
}

.screenshot-arrow-next {
  right: 12px;
}

.screenshot-arrow[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.cv-panel {
  width: min(100%, 980px);
  max-height: min(97vh, 1040px);
}

.cv-view {
  height: min(82vh, 900px);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.cv-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  background: color-mix(in srgb, var(--bg-soft) 88%, #0c1628 12%);
}

.cv-toolbar .btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.cv-canvas-wrap {
  overflow: auto;
  padding: 0;
}

#cvFrame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #ffffff;
}

.cv-mobile-pages {
  display: none;
  height: 100%;
  overflow: auto;
  padding: 5px;
  background: color-mix(in srgb, var(--bg-soft) 66%, #141414 34%);
}

.cv-mobile-page {
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.cv-mobile-page + .cv-mobile-page {
  margin-top: 10px;
}

.cv-mobile-page canvas {
  width: 100%;
  height: auto;
  display: block;
}

.cv-view.is-mobile-preview #cvFrame {
  display: none;
}

.cv-view.is-mobile-preview .cv-mobile-pages {
  display: block;
}

.cv-status {
  min-height: 22px;
  margin: 0;
  padding: 6px 12px 10px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
}

#modalContent {
  display: grid;
  gap: 16px;
  margin-bottom: 12px;
}

#modalTitle {
  margin-bottom: 12px;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
}

#screenshotTitle {
  font-size: clamp(1.2rem, 1.9vw, 1.55rem);
  margin-bottom: 12px;
}

.modal-section {
  padding: 16px 16px 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent-3) 34%, var(--border));
  background: color-mix(in srgb, #0f1d34 84%, var(--surface-strong) 16%);
}

.modal-section h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
  color: var(--text);
}

.modal-section p {
  margin-bottom: 0;
  color: color-mix(in srgb, var(--text) 78%, #c9d7ef 22%);
}

.modal-list {
  margin: 0;
  padding-left: 18px;
  color: color-mix(in srgb, var(--text) 76%, #c9d7ef 24%);
  display: grid;
  gap: 6px;
}

.modal-list li::marker {
  color: var(--accent);
}

[data-theme="light"] .modal-panel {
  background:
    radial-gradient(circle at top right, rgba(62, 228, 211, 0.1), transparent 42%),
    radial-gradient(circle at top left, rgba(77, 163, 255, 0.12), transparent 35%),
    color-mix(in srgb, var(--surface-strong) 94%, white 6%);
}

[data-theme="light"] .modal-section {
  background: color-mix(in srgb, white 92%, var(--surface-strong) 8%);
}

[data-theme="light"] .modal-section p,
[data-theme="light"] .modal-list {
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

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

@keyframes float {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(0, -18px, 0) rotate(8deg);
  }
}

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

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

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

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

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

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes clickWave {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(6);
  }
}

@keyframes hapticPulse {
  50% {
    transform: scale(0.97);
  }
}

@media (hover: hover) and (pointer: fine) {
  body.custom-cursor-ready,
  body.custom-cursor-ready * {
    cursor: none;
  }

  body.custom-cursor-ready input,
  body.custom-cursor-ready textarea,
  body.custom-cursor-ready [contenteditable="true"] {
    cursor: text;
  }
}

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

  .custom-cursor,
  .cursor-click-wave {
    display: none !important;
  }

  .hero-copy,
  .hero-visual {
    transform: none !important;
  }

  .motion-card::after,
  .site-spotlight {
    display: none !important;
  }
}

@media (max-width: 980px) {
  .nav-toggle {
    display: flex;
  }

  .nav-panel {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    right: 16px;
    left: auto;
    display: grid;
    gap: 14px;
    width: min(170px, calc(44vw - 32px));
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--bg) 6%, transparent);
    backdrop-filter: blur(2px);
    box-shadow: var(--shadow);
    transform: translateY(-18px);
    opacity: 0;
    pointer-events: none;
    max-height: calc(100dvh - var(--header-height) - 28px);
    overflow: auto;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

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

  .nav-links {
    display: grid;
    gap: 6px;
  }

  .nav-link {
    min-height: 42px;
    justify-content: center;
  }

  .nav-link i {
    display: none;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero-content,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-bottom: 46px;
  }

  .hero-visual {
    min-height: 420px;
    margin-top: 0;
  }

  .profile-photo {
    min-height: 330px;
  }

  .profile-orbit {
    margin-top: 0;
    width: min(94vw, 430px);
  }

  .hero-content {
    gap: 28px;
  }

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

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

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

  .project-image {
    height: 205px;
  }

  .certificate-image {
    height: 155px;
  }

  .contact-layout {
    gap: 14px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 70px;
  }

  .navbar,
  .section,
  .footer {
    width: min(100% - 18px, var(--max-width));
  }

  .brand span:last-child {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    padding: 28px 8px 34px;
  }

  h1 {
    font-size: clamp(2.25rem, 12.5vw, 3.55rem);
    line-height: 0.98;
  }

  h2 {
    font-size: clamp(1.6rem, 8.3vw, 2.2rem);
    line-height: 1.08;
  }

  .section {
    padding: 44px 0;
  }

  .section-heading {
    margin-bottom: 18px;
  }

  .section-heading .eyebrow {
    margin-bottom: 8px;
  }

  .section-heading p,
  .hero-intro {
    font-size: 0.96rem;
  }

  .hero-role,
  .typing-line {
    font-size: 1rem;
  }

  .typing-line {
    min-height: 1.8rem;
  }

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

  .hero-visual {
    min-height: 285px;
    margin-top: 0;
  }

  .profile-card {
    width: min(100%, 320px);
    padding: 10px;
  }

  .profile-photo {
    min-height: 250px;
    border-radius: 14px;
  }

  .profile-meta {
    padding: 12px 4px 2px;
    gap: 8px;
    font-size: 0.9rem;
  }

  .profile-orbit {
    display: none;
  }

  .filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .filter-row .filter-btn {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.83rem;
  }

  .stats-grid,
  .certificate-grid,
  .achievement-grid {
    grid-template-columns: 1fr;
  }

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

  .stats-grid {
    gap: 10px;
  }

  .stat-card {
    min-height: 92px;
    padding: 12px;
  }

  .stat-card:nth-child(3) {
    min-height: 86px;
  }

  .stat-card strong {
    margin-bottom: 5px;
    font-size: 1.65rem;
  }

  .stat-card span {
    font-size: 0.82rem;
    line-height: 1.3;
  }

  .skills-grid {
    gap: 10px;
  }

  .skill-card {
    padding: 13px;
  }

  .skill-card h3 {
    margin-bottom: 8px;
    font-size: 0.96rem;
  }

  .skills-grid .badge-list {
    gap: 6px;
  }

  .skills-grid .skill-badge {
    min-height: 30px;
    padding: 0 8px;
    gap: 6px;
  }

  .skills-grid .skill-badge i {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
    font-size: 0.92rem;
  }

  .skills-grid .skill-badge span {
    font-size: 0.75rem;
  }

  .stats-grid,
  .skills-grid,
  .project-grid,
  .certificate-grid,
  .achievement-grid,
  .gallery-grid,
  .contact-layout {
    gap: 12px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    grid-auto-rows: 150px;
  }

  .gallery-item:nth-child(1),
  .gallery-item:nth-child(4) {
    grid-column: span 2;
  }

  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .footer-links {
    width: auto;
    justify-content: center;
  }

  .modal {
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  }

  .modal-panel {
    width: min(100%, 100%);
    max-height: calc(100dvh - 10px);
    min-height: calc(100dvh - 10px);
    border-radius: 16px;
    padding: 12px;
  }

  .modal-media {
    height: 190px;
    margin-bottom: 12px;
  }

  .cv-view {
    height: min(76vh, 780px);
  }

  .card-actions {
    gap: 8px;
  }

  .card-actions a,
  .card-actions .text-btn {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.8rem;
  }

  .project-image {
    height: 170px;
  }

  .project-body {
    padding: 14px;
  }

  .project-card,
  .certificate-card,
  .skill-card,
  .achievement-card,
  .timeline-card,
  .contact-info,
  .contact-form {
    border-radius: 14px;
  }

  .certificate-image {
    height: 135px;
    margin-bottom: 8px;
  }

  .certificate-card {
    padding: 11px;
  }

  .certificate-card h3 {
    margin-bottom: 4px;
    font-size: 0.95rem;
    line-height: 1.2;
  }

  .certificate-card p {
    margin: 1px 0;
    font-size: 0.83rem;
  }

  .certificate-instructor {
    display: block;
  }

  .certificate-instructor::before {
    content: "";
  }

  .contact-info,
  .contact-form {
    padding: 12px;
  }

  .contact-info a {
    min-height: 44px;
    padding: 0 11px;
    font-size: 0.9rem;
  }

  .form-row label {
    font-size: 0.9rem;
  }

  .form-row input,
  .form-row textarea {
    border-radius: 12px;
    padding: 9px 10px;
  }

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

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

  .timeline-dot {
    left: 0;
    width: 16px;
    height: 16px;
  }

  .timeline-card {
    padding: 14px;
  }

  .stat-card {
    padding: 14px;
  }

  .skill-card,
  .achievement-card,
  .feature-card {
    padding: 14px;
  }

  .custom-cursor {
    display: none;
  }
}

@media (max-width: 480px) {
  .navbar,
  .section,
  .footer {
    width: calc(100% - 18px);
  }

  .brand {
    gap: 8px;
    font-size: 0.95rem;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 0.8rem;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-actions .btn {
    min-height: 40px;
    font-size: 0.86rem;
  }

  .hero-copy {
    text-align: left;
  }

  .hero-actions {
    margin-top: 8px;
  }

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

  .section {
    padding: 38px 0;
  }

  .section-heading {
    margin-bottom: 14px;
  }

  .project-card,
  .certificate-card,
  .skill-card,
  .achievement-card,
  .timeline-card,
  .contact-info,
  .contact-form {
    border-radius: 12px;
  }

  .project-body {
    padding: 12px;
  }

  .project-image {
    height: 160px;
  }

  .project-topline {
    font-size: 0.8rem;
  }

  .status {
    min-height: 24px;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  .achievement-card,
  .skill-card,
  .feature-card,
  .timeline-card {
    padding: 16px;
  }

  .contact-layout {
    gap: 10px;
  }

  .contact-info,
  .contact-form {
    padding: 10px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 145px;
  }

  .gallery-item:nth-child(1),
  .gallery-item:nth-child(4) {
    grid-column: span 1;
  }

  .filter-row .filter-btn {
    font-size: 0.8rem;
    padding: 0 12px;
  }
}

@media (max-width: 980px) {
  body.nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 44;
    background:
      radial-gradient(circle at 50% 0%, rgba(85, 146, 231, 0.22), transparent 32rem),
      rgba(3, 9, 18, 0.38);
    -webkit-backdrop-filter: blur(10px) saturate(132%);
    backdrop-filter: blur(10px) saturate(132%);
  }

  .site-header {
    z-index: 60;
  }

  .nav-panel {
    z-index: 61;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
    border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045)),
      color-mix(in srgb, var(--bg) 66%, transparent);
    -webkit-backdrop-filter: blur(9px) saturate(150%);
    backdrop-filter: blur(9px) saturate(150%);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
    max-width: 180px;
  }

  .nav-links {
    width: 100%;
    justify-content:center;
  }

  .nav-link {
    justify-content:baseline;
    min-height: 40px;
    padding: 0 13px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface) 56%, transparent);
    font-size: 0.9rem;min-width: 130px;
  }

  .nav-link i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 130px;
    flex: 0 0 17px;
    color: color-mix(in srgb, var(--text) 74%, var(--muted) 26%);
  }

  .nav-link.active {
    color: #06111f;
    max-width: 130px;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
  }

  .theme-toggle {
    width: 44px;
    height: 44px;
    min-height: 44px;
    border-radius: 992px;
  }

  .hero-content {
    align-items: start;
  }

  .project-card {
    display: grid;
    grid-template-columns: minmax(230px, 0.88fr) minmax(0, 1.12fr);
  }

  .project-image {
    height: 100%;
    min-height: 260px;
  }

  .project-body {
    display: flex;
    flex-direction: column;
  }

  .project-body .badge-list {
    margin-top: auto;
  }
}

@media (max-width: 720px) {
  .project-card {
    grid-template-columns: 1fr;
  }

  .project-image {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 640px) {
  :root {
    --radius-lg: 22px;
    --radius-md: 18px;
  }

  body {
    background:
      radial-gradient(circle at 20% -4%, rgba(85, 146, 231, 0.2), transparent 18rem),
      radial-gradient(circle at 96% 16%, rgba(111, 78, 245, 0.14), transparent 17rem),
      linear-gradient(145deg, var(--bg), var(--bg-soft));
  }

  .navbar,
  .section,
  .footer {
    width: min(100% - 24px, var(--max-width));
  }

  .nav-panel {
    top: calc(var(--header-height) + 8px);
    right: 12px;
    left: auto;
    width: min(250px, calc(100vw - 24px));
    max-height: calc(100dvh - var(--header-height) - 24px);
    border-radius: 18px;
  }

  .section {
    padding: 54px 0;
  }

  .section-heading {
    margin-bottom: 22px;
  }

  .section-heading p,
  .hero-intro,
  .project-body p,
  .achievement-card p,
  .timeline-card p {
    font-size: 0.95rem;
    line-height: 1.62;
  }

  .hero {
    min-height: auto;
    padding: 34px 12px 48px;
  }

  .hero-content {
    gap: 22px;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-intro {
    margin-inline: auto;
    margin-bottom: 9px;
    max-width: 46ch;
    font-size: 0.88rem;
    line-height: 1.5;
  }

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

  .hero-actions .btn {
    width: 100%;
    min-width: 0;
    padding: 0 12px;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
  }

  .hero-actions .btn-primary {
    grid-column: 1 / -1;
  }

  .hero-visual {
    width: 100%;
    min-height: 0;
  }

  .profile-card {
    width: min(100%, 360px);
    margin-inline: auto;
    border-radius: 22px;
  }

  .profile-photo {
    min-height: 0;
    aspect-ratio: 4 / 3.35;
  }

  .profile-meta {
    align-items: center;
    text-align: left;
  }

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

  .stat-card {
    min-height: 122px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .stat-card:nth-child(3) {
    grid-column: 1 / -1;
    min-height: 104px;
  }

  .stat-card strong {
    font-size: 2rem;
  }

  .skills-grid,
  .project-grid,
  .certificate-grid,
  .achievement-grid,
  .contact-layout {
    gap: 16px;
  }

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

  .contact-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "info"
      "form";
    max-width: 700px;
    gap: 10px;
  }

  .skill-card,
  .achievement-card,
  .timeline-card,
  .contact-info,
  .contact-form {
    padding: 18px;
  }

  .skill-card h3,
  .project-card h3,
  .certificate-card h3,
  .achievement-card h3,
  .timeline-card h3 {
    font-size: 1.04rem;
    line-height: 1.3;
  }

  .badge-list {
    gap: 7px;
  }

  .skills-grid .skill-badge {
    min-height: 36px;
    padding: 0 11px;
  }

  .filter-row {
    width: calc(100% + 24px);
    margin-left: -12px;
    padding: 0 12px 8px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 34px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 34px), transparent 100%);
  }

  .filter-row .filter-btn {
    min-height: 42px;
    border-radius: 13px;
  }

  .project-card,
  .certificate-card,
  .skill-card,
  .achievement-card,
  .timeline-card,
  .contact-info,
  .contact-form,
  .stat-card {
    border-color: color-mix(in srgb, var(--border) 86%, var(--accent) 14%);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
  }

  .project-image {
    border-bottom: 1px solid var(--border);
  }

  .project-body {
    padding: 18px;
  }

  .project-card {
    border-radius: 15px;
  }

  .project-image {
    aspect-ratio: 16 / 8.7;
  }

  .project-body {
    padding: 14px;
  }

  .project-card h3 {
    margin-bottom: 7px;
    font-size: 0.98rem;
    line-height: 1.22;
  }

  .project-body p {
    margin-bottom: 10px;
    font-size: 0.84rem;
    line-height: 1.48;
  }

  .project-topline {
    margin-bottom: 7px;
    font-size: 0.78rem;
  }

  .status {
    min-height: 23px;
    padding: 0 7px;
    font-size: 0.68rem;
  }

  .project-body .badge-list {
    gap: 5px;
  }

  .project-body .badge-list span {
    min-height: 22px;
    padding: 0 7px;
    font-size: 0.68rem;
  }

  .card-actions {
    margin-top: 10px;
    gap: 7px;
  }

  .card-actions a,
  .card-actions .text-btn {
    min-height: 34px;
    padding: 0 9px;
    font-size: 0.76rem;
  }

  .project-topline {
    align-items: flex-start;
  }

  .project-body .badge-list {
    margin-top: 4px;
  }

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

  .card-actions a,
  .card-actions .text-btn {
    min-width: 0;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 12px;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
  }

  .card-actions .text-btn {
    grid-column: 1 / -1;
  }

  .certificate-card {
    padding: 14px;
  }

  .certificate-image {
    height: auto;
    aspect-ratio: 16 / 10.8;
    margin-bottom: 12px;
  }

  .certificate-image img {
    margin-top: 0;
    object-fit: contain;
    padding: 4px;
  }

  .timeline {
    max-width: none;
  }

  .timeline-item + .timeline-item {
    margin-top: 14px;
  }

  .timeline-card {
    position: relative;
  }

  .gallery-grid {
    grid-auto-rows: auto;
  }

  .gallery-item {
    min-height: 150px;
  }

  .contact-info a {
    border-radius: 13px;
  }
}

@media (max-width: 480px) {
  .navbar,
  .section,
  .footer {
    width: min(100% - 22px, var(--max-width));
  }

  .brand span:last-child {
    max-width: 128px;
  }

  h1 {
    font-size: clamp(2.25rem, 12vw, 3rem);
  }

  h2 {
    font-size: clamp(1.55rem, 8vw, 2.05rem);
  }

  .hero {
    padding-inline: 11px;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .hero-actions .btn-primary {
    grid-column: auto;
  }

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

  .stat-card:nth-child(3) {
    grid-column: 1 / -1;
  }

  .stat-card:nth-child(4) {
    grid-column: span 1;
  }

  .stat-card {
    min-height: 112px;
    padding: 13px;
  }

  .stat-card span {
    font-size: 0.85rem;
    line-height: 1.35;
  }

  .project-body,
  .skill-card,
  .achievement-card,
  .timeline-card,
  .contact-info,
  .contact-form {
    padding: 16px;
  }

  .project-image {
    aspect-ratio: 16 / 10.6;
    height: auto;
  }

  .project-topline {
    gap: 8px;
  }

  .status {
    flex: 0 0 auto;
  }

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

  .card-actions .text-btn {
    grid-column: auto;
  }

  .certificate-card {
    padding: 12px;
  }

  .gallery-grid {
    gap: 10px;
  }
}

@media (max-width: 640px) {
  .navbar,
  .section,
  .footer {
    width: min(100% - 32px, var(--max-width));
  }

  .hero {
    padding-inline: 16px;
  }

  .section-heading {
    padding-inline: 2px;
  }

  .stats-grid,
  .skills-grid,
  .project-grid,
  .certificate-grid,
  .achievement-grid,
  .gallery-grid,
  .contact-layout {
    gap: 16px;
  }

  .stat-card {
    padding: 18px;
  }

  .project-body {
    padding: 13px;
  }

  .project-image {
    aspect-ratio: 16 / 8.4;
  }

  .project-card h3 {
    font-size: 0.94rem;
  }

  .project-body p {
    font-size: 0.82rem;
  }

  .skill-card,
  .achievement-card,
  .feature-card,
  .timeline-card,
  .contact-info,
  .contact-form {
    padding: 20px;
  }

  .project-body {
    padding: 20px;
  }

  .certificate-card {
    padding: 16px;
  }

  .filter-row {
    width: 100%;
    margin-left: 0;
    padding: 0 0 8px;
  }

  .filter-row .filter-btn,
  .card-actions a,
  .card-actions .text-btn,
  .contact-info a {
    padding-inline: 14px;
  }

  .stats-grid,
  .skills-grid {
    gap: 12px;
  }

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

  .stat-card {
    position: relative;
    min-height: 104px;
    padding: 14px;
    overflow: hidden;
    border-radius: 16px;
    background:
      linear-gradient(145deg, color-mix(in srgb, var(--surface-strong) 72%, transparent), color-mix(in srgb, var(--surface) 84%, transparent));
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  }

  .stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(var(--accent), var(--accent-3));
    opacity: 0.9;
  }

  .stat-card strong {
    margin-bottom: 6px;
    font-size: 1.72rem;
  }

  .stat-card span {
    font-size: 0.84rem;
    line-height: 1.34;
  }

  .stat-card:nth-child(3) {
    grid-column: span 1;
    min-height: 104px;
  }

  .skill-card {
    position: relative;
    padding: 14px 14px 15px;
    border-radius: 15px;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  }

  .skill-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 11px;
    font-size: 0.98rem;
  }

  .skill-card h3::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
  }

  .skills-grid .badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }

  .skills-grid .skill-badge {
    justify-content: flex-start;
    min-height: 31px;
    padding: 0 9px;
    gap: 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-strong) 76%, transparent);
  }

  .skills-grid .skill-badge i {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
    font-size: 0.92rem;
  }

  .skills-grid .skill-badge span {
    font-size: 0.75rem;
    white-space: nowrap;
    line-height: 1;
  }
}

@media (max-width: 480px) {
  .navbar,
  .section,
  .footer {
    width: min(100% - 30px, var(--max-width));
  }

  .hero {
    padding-inline: 15px;
  }

  .project-body,
  .skill-card,
  .achievement-card,
  .feature-card,
  .timeline-card,
  .contact-info,
  .contact-form {
    padding: 18px;
  }

  .stat-card {
    padding: 16px;
  }

  .certificate-card {
    padding: 14px;
  }

  .stat-card {
    min-height: 98px;
    padding: 13px;
  }

  .stat-card:nth-child(3) {
    min-height: 98px;
  }

  .stat-card strong {
    font-size: 1.58rem;
  }

  .skill-card {
    padding: 13px;
  }

  .skills-grid .skill-badge {
    min-height: 30px;
    padding: 0 8px;
  }

  .skills-grid .skill-badge span {
    font-size: 0.72rem;
  }
}

@media (max-width: 640px) {
  .project-card {
    border-radius: 15px;
  }

  .project-image {
    height: auto;
    aspect-ratio: 16 / 8.7;
  }

  .project-body {
    padding: 14px;
  }

  .project-card h3 {
    margin-bottom: 7px;
    font-size: 0.98rem;
    line-height: 1.22;
  }

  .project-body p {
    margin-bottom: 10px;
    font-size: 0.84rem;
    line-height: 1.48;
  }

  .project-topline {
    margin-bottom: 7px;
    font-size: 0.78rem;
  }

  .status {
    min-height: 23px;
    padding: 0 7px;
    font-size: 0.68rem;
  }

  .project-body .badge-list {
    gap: 5px;
  }

  .project-body .badge-list span {
    min-height: 22px;
    padding: 0 7px;
    font-size: 0.68rem;
  }

  .card-actions {
    margin-top: 10px;
    gap: 7px;
  }

  .card-actions a,
  .card-actions .text-btn {
    min-height: 34px;
    padding: 0 9px;
    font-size: 0.76rem;
  }
}

@media (max-width: 480px) {
  .project-image {
    aspect-ratio: 16 / 8.4;
  }

  .project-body {
    padding: 13px;
  }

  .project-card h3 {
    font-size: 0.94rem;
  }

  .project-body p {
    font-size: 0.82rem;
  }
}

.timeline {
  max-width: 920px;
  display: grid;
  gap: 18px;
}

.timeline::before {
  top: 14px;
  bottom: 14px;
  left: 14px;
}

.timeline-item {
  padding-left: 54px;
}

.timeline-dot {
  top: 28px;
  left: 5px;
  width: 20px;
  height: 20px;
}

.timeline-card {
  position: relative;
  overflow: hidden;
  padding: 22px 24px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface-strong) 64%, transparent), color-mix(in srgb, var(--surface) 92%, transparent));
}

.timeline-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), transparent 76%);
}

.timeline-date {
  min-height: 28px;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  font-size: 0.78rem;
  line-height: 1;
}

.timeline-card h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
}

.timeline-card p {
  margin-bottom: 6px;
}

.timeline-card p:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .timeline {
    gap: 14px;
  }

  .timeline::before {
    left: 9px;
    top: 12px;
    bottom: 12px;
  }

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

  .timeline-dot {
    left: 1px;
    top: 24px;
    width: 17px;
    height: 17px;
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 16%, transparent);
  }

  .timeline-card {
    padding: 15px;
    border-radius: 15px;
  }

  .timeline-date {
    min-height: 24px;
    margin-bottom: 9px;
    padding: 0 8px;
    font-size: 0.7rem;
  }

  .timeline-card h3 {
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.3;
  }

  .timeline-card p {
    margin-bottom: 5px;
    font-size: 0.84rem;
    line-height: 1.48;
  }
}

.achievement-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
}

.achievement-card {
  position: relative;
  overflow: hidden;
  padding: 22px 24px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface-strong) 66%, transparent), color-mix(in srgb, var(--surface) 92%, transparent));
}

.achievement-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(var(--accent), var(--accent-3));
}

.achievement-card span {
  min-height: 28px;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  font-size: 0.78rem;
  line-height: 1;
}

.achievement-card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.achievement-card p {
  margin-bottom: 8px;
}

.achievement-card p:last-child {
  margin-bottom: 0;
}

.contact-layout {
  gap: 18px;
}

.contact-info,
.contact-form {
  border-radius: 18px;
}

.contact-info a {
  min-height: 46px;
  border-radius: 13px;
}

.form-row {
  margin-bottom: 13px;
}

.contact-form .btn {
  min-height: 42px;
}

@media (max-width: 640px) {
  .achievement-grid {
    gap: 14px;
  }

  .achievement-card {
    padding: 15px;
    border-radius: 15px;
  }

  .achievement-card span {
    min-height: 24px;
    margin-bottom: 9px;
    padding: 0 8px;
    font-size: 0.7rem;
  }

  .achievement-card h3 {
    margin-bottom: 7px;
    font-size: 0.98rem;
    line-height: 1.25;
  }

  .achievement-card p {
    margin-bottom: 6px;
    font-size: 0.84rem;
    line-height: 1.48;
  }

  .contact-layout {
    gap: 14px;
  }

  .contact-info,
  .contact-form {
    padding: 15px;
    border-radius: 15px;
  }

  .contact-info {
    gap: 10px;
  }

  .contact-info a {
    min-height: 42px;
    padding: 0 11px;
    border-radius: 12px;
    font-size: 0.84rem;
  }

  .form-row {
    margin-bottom: 11px;
  }

  .form-row label {
    margin-bottom: 5px;
    font-size: 0.82rem;
  }

  .form-row input,
  .form-row textarea {
    padding: 9px 10px;
    border-radius: 11px;
    font-size: 0.86rem;
  }

  .form-row textarea {
    min-height: 112px;
  }

  .contact-form .btn {
    width: 100%;
    min-height: 38px;
    font-size: 0.84rem;
  }
}

@media (max-width: 640px) {
  .section {
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .hero {
    padding-top: 26px;
    padding-bottom: 34px;
  }

  .section-heading {
    margin-bottom: 14px;
  }

  .alt-section::before,
  .contact-section::before {
    inset: 20px calc(50% - 50vw);
  }
}

@media (max-width: 480px) {
  .section {
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .hero {
    padding-top: 22px;
    padding-bottom: 30px;
  }
}


.cv-panel {
  max-height: min(97vh, 1040px);
}

.cv-view {
  height: min(82vh, 900px);
}

@media (max-width: 640px) {
  .cv-panel {
    max-height: calc(100dvh - 10px);
  }

  .cv-view {
    height: min(78dvh, 820px);
  }

  .cv-toolbar {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .project-grid {
    gap: 18px;
  }

  .project-card {
    position: relative;
    display: block;
    padding: 10px;
    border-radius: 20px;
    overflow: hidden;
    background:
      linear-gradient(145deg, color-mix(in srgb, var(--surface-strong) 70%, transparent), color-mix(in srgb, var(--surface) 92%, transparent));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  }

  .project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 42%);
    opacity: 0.55;
  }

  .project-image {
    position: relative;
    z-index: 1;
    height: auto;
    aspect-ratio: 16 / 9.4;
    border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
    border-radius: 15px;
  }

  .project-image img {
    object-position: top center;
  }

  .project-body {
    position: relative;
    z-index: 2;
    padding: 13px 3px 3px;
  }

  .project-topline {
    position: absolute;
    top: -44px;
    left: 8px;
    right: 8px;
    z-index: 3;
    margin: 0;
    color: #f5f8ff;
    font-size: 0.74rem;
  }

  .project-topline > span:first-child,
  .project-topline .status {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  }

  .project-topline > span:first-child {
    padding: 0 10px;
    background: rgba(5, 12, 24, 0.54);
    font-weight: 800;
  }

  .project-topline .status {
    padding: 0 9px;
    font-size: 0.68rem;
  }

  .project-card h3 {
    margin: 0 0 7px;
    font-size: 1.02rem;
    line-height: 1.28;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .project-body p {
    margin-bottom: 11px;
    color: color-mix(in srgb, var(--muted) 88%, var(--text) 12%);
    font-size: 0.86rem;
    line-height: 1.52;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .project-body .badge-list {
    gap: 6px;
    margin-bottom: 12px;
  }

  .project-body .badge-list span {
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 0.69rem;
    background: color-mix(in srgb, var(--surface-strong) 72%, transparent);
  }

  .card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 0;
  }

  .card-actions a,
  .card-actions .text-btn {
    min-height: 38px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    background: color-mix(in srgb, var(--surface-strong) 76%, transparent);
  }

  .card-actions .text-btn {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 86%, white 14%), var(--accent-3));
    color: #06111f;
    border-color: transparent;
  }
}

@media (max-width: 480px) {
  .project-grid {
    gap: 16px;
  }

  .project-card {
    padding: 9px;
    border-radius: 18px;
  }

  .project-image {
    aspect-ratio: 16 / 9.8;
    border-radius: 14px;
  }

  .project-body {
    padding-top: 12px;
  }

  .project-card h3 {
    font-size: 0.98rem;
  }

  .project-body p {
    font-size: 0.83rem;
    -webkit-line-clamp: 2;
  }
}

/* Contact section refreshed layout */
#contact .contact-layout {
  width: 100%;
  margin: 0;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  grid-template-areas: "info form";
  gap: 12px;
}

#contact .contact-info,
#contact .contact-form {
  border-radius: 14px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--border));
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

#contact .contact-info {
  grid-area: info;
  display: grid;
  gap: 8px;
}

#contact .contact-form {
  grid-area: form;
  display: grid;
  gap: 8px;
}

#contact .contact-info a {
  min-height: 42px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  background: color-mix(in srgb, var(--surface-strong) 78%, transparent);
  font-size: 0.86rem;
}

#contact .contact-info a i {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--border));
  background: color-mix(in srgb, var(--bg-soft) 76%, var(--surface-strong) 24%);
}

#contact .contact-info a:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 52%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

#contact .form-row {
  gap: 4px;
}

#contact .form-row label {
  font-size: 0.82rem;
}

#contact .form-row input,
#contact .form-row textarea {
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.86rem;
}

#contact .form-row textarea {
  min-height: 124px;
}

#contact .contact-form .btn {
  min-height: 38px;
  font-size: 0.86rem;
  border-radius: 10px;
}

#contact .form-status {
  min-height: 18px;
  font-size: 0.82rem;
}

@media (max-width: 980px) {
  #contact .contact-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "info"
      "form";
    gap: 10px;
    max-width: 700px;
  }
}

@media (max-width: 640px) {
  #contact .contact-info,
  #contact .contact-form {
    padding: 12px;
    border-radius: 12px;
  }

  #contact .contact-info a {
    min-height: 39px;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    padding: 5px 9px;
    font-size: 0.82rem;
  }

  #contact .contact-info a i {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }

  #contact .form-row label {
    font-size: 0.78rem;
  }

  #contact .form-row input,
  #contact .form-row textarea {
    font-size: 0.82rem;
    padding: 7px 9px;
  }

  #contact .form-row textarea {
    min-height: 118px;
  }
}

@media (max-width: 640px) {
  #viewCvBtn {
    grid-column: 1 / -1;
    width: min(100%, 180px);
    justify-self: center;
  }

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

  .card-actions .text-btn {
    grid-column: auto;
  }
}

@media (max-width: 480px) {
  #viewCvBtn {
    width: 100%;
  }
}

/* Keep more of the lower area visible for this specific project thumbnail */
.project-card.autonomous-fire-card .project-image img {
  object-position: center;
}

.hero-copy,
.hero-visual {
  will-change: transform;
  transition: transform 0.35s ease;
}

h1 span,
.section-heading h2 span {
  background-size: 180% 180%;
  animation: gradientShift 8s linear infinite;
}

.motion-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.motion-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: calc(var(--spotlight-opacity, 0) * var(--spotlight-visibility-factor));
  background: radial-gradient(
    circle 180px at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
    var(--spotlight-card-core) 0%,
    var(--spotlight-card-mid) 24%,
    transparent 62%
  );
  mix-blend-mode: var(--spotlight-card-blend);
  transition: opacity 0.25s ease;
}

.site-spotlight {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle 220px at var(--global-spotlight-x, 50%) var(--global-spotlight-y, 50%),
    var(--spotlight-global-core) 0%,
    var(--spotlight-global-mid) 30%,
    transparent 70%
  );
  mix-blend-mode: var(--spotlight-global-blend);
  transition: opacity 0.2s ease;
}

.site-spotlight.is-visible {
  opacity: var(--spotlight-global-opacity);
}

.motion-card > * {
  position: relative;
  z-index: 1;
}

@media (hover: none), (pointer: coarse) {
  .scroll-progress {
    height: 2px;
  }

  .site-spotlight {
    display: none;
  }
}
