:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #eef4f8;
  --ink: #101828;
  --muted: #667085;
  --line: rgba(16, 24, 40, 0.12);
  --accent: #0f766e;
  --accent-2: #2563eb;
  --accent-3: #ef6c35;
  --success: #84cc16;
  --shadow: 0 24px 70px rgba(16, 24, 40, 0.14);
  --radius: 8px;
}

body.dark {
  color-scheme: dark;
  --bg: #0d1117;
  --surface: #161b22;
  --surface-soft: #202938;
  --ink: #f8fafc;
  --muted: #b6c2d2;
  --line: rgba(248, 250, 252, 0.13);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

body.accent-blue {
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --accent-3: #0f766e;
}

body.accent-orange {
  --accent: #ef6c35;
  --accent-2: #be123c;
  --accent-3: #0f766e;
}

body.accent-purple {
  --accent: #7c3aed;
  --accent-2: #2563eb;
  --accent-3: #ef6c35;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 28rem),
    linear-gradient(245deg, color-mix(in srgb, var(--accent-3) 14%, transparent), transparent 26rem),
    var(--bg);
  color: var(--ink);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  background:
    radial-gradient(circle at 18% 24%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 22rem),
    radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--accent-3) 24%, transparent), transparent 24rem),
    radial-gradient(circle at 50% 82%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 28rem);
  filter: blur(8px);
  animation: ambientMove 16s ease-in-out infinite alternate;
}

body.menu-open {
  overflow: hidden;
}

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

button,
input,
textarea {
  font: inherit;
}

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), var(--accent-2));
}

.ambient-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 70%);
  opacity: 0.55;
  animation: gridDrift 22s linear infinite;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 2rem));
  min-height: 76px;
  margin: 0 auto;
  padding: 0.85rem 0;
  backdrop-filter: blur(20px);
}

.brand,
.nav,
.header-actions,
.hero-actions,
.filters,
.tags,
.project-actions,
.theme-dock,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.7rem;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--ink), var(--accent));
  color: var(--surface);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 30%, transparent);
  animation: markPulse 3s ease-in-out infinite;
}

.nav {
  gap: 0.2rem;
  padding: 0.42rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  box-shadow: 0 12px 34px rgba(16, 24, 40, 0.08);
}

.nav-link {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  padding: 0.48rem 0.7rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  transition: color 180ms ease, background 180ms ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
  transform: translateX(-120%);
  transition: transform 450ms ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: translateX(120%);
}

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

.header-actions {
  gap: 0.6rem;
}

.theme-toggle,
.menu-toggle,
.theme-swatch {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle,
.menu-toggle {
  width: 44px;
  height: 44px;
}

.theme-icon {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: inset 8px 0 0 currentColor;
}

.menu-toggle {
  display: none;
  gap: 4px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.page-section {
  scroll-margin-top: 92px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  min-height: calc(100vh - 76px);
  padding: clamp(3rem, 7vw, 6.5rem) 0;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent-3);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 1rem;
  font-size: clamp(3.05rem, 8vw, 6.45rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h1 span {
  color: var(--accent);
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.5rem;
  font-size: 1.16rem;
}

.lead,
.about-panel p,
.contact-copy p {
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.16rem);
}

.typing-line {
  min-height: 2rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
  font-weight: 900;
}

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

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  margin-left: 4px;
  background: var(--accent-3);
  vertical-align: -0.12em;
  animation: blink 800ms steps(2, start) infinite;
}

.hero-actions,
.filters,
.tags,
.project-actions,
.theme-dock {
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button,
.filter,
.project-actions a {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.78rem 1rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button::after,
.filter::after,
.project-actions a::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -45%;
  width: 35%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: skewX(-18deg);
  transition: left 500ms ease;
}

.button:hover::after,
.filter:hover::after,
.project-actions a:hover::after {
  left: 115%;
}

.button:hover,
.filter:hover,
.project-actions a:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--ink);
  color: var(--surface);
  box-shadow: 0 16px 36px rgba(16, 24, 40, 0.18);
}

.button.secondary,
.button.ghost,
.filter,
.project-actions a {
  background: var(--surface);
  color: var(--ink);
}

.button.ghost {
  color: var(--accent);
}

.filter.active,
.theme-swatch.active {
  background: var(--accent);
  color: #ffffff;
}

.theme-dock {
  margin-top: 1.2rem;
}

.theme-swatch {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #0f766e;
}

.swatch-blue {
  background: #2563eb;
}

.swatch-orange {
  background: #ef6c35;
}

.swatch-purple {
  background: #7c3aed;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  max-width: 700px;
  margin-top: 2rem;
}

.hero-stats div,
.about-panel,
.about-cards article,
.skill-card,
.project-card,
.feature-card,
.timeline-item,
.testimonial-grid article,
.contact-form,
.profile-card,
.code-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 14px 36px rgba(16, 24, 40, 0.08);
}

.hero-stats div {
  padding: 1rem;
}

.hero-stats strong {
  display: block;
  font-size: 1.65rem;
  line-height: 1;
}

.hero-stats span,
.project-type,
.tags span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-showcase {
  position: relative;
  min-height: 550px;
  transform: translate3d(calc(var(--mx, 0) * 1px), calc(var(--my, 0) * 1px), 0);
  transition: transform 220ms ease-out;
}

.profile-card {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 6%;
  overflow: hidden;
  padding: 1rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 54%),
    linear-gradient(225deg, color-mix(in srgb, var(--accent-3) 16%, transparent), transparent 54%),
    var(--surface);
  transition: transform 280ms ease, box-shadow 280ms ease;
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--accent-3), var(--accent-2), var(--accent));
  background-size: 240% 240%;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: borderFlow 5s linear infinite;
}

.profile-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--shadow);
}

.profile-photo {
  display: grid;
  min-height: 430px;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, var(--accent), var(--accent-2)),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, 0.16) 18px 20px);
}

.profile-img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius);
  transition: transform 700ms ease, filter 700ms ease;
}

.profile-card:hover .profile-img {
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.045);
}

.photo-placeholder {
  display: grid;
  width: min(62%, 230px);
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  color: #ffffff;
  text-align: center;
}

.photo-placeholder strong {
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 1;
}

.photo-placeholder span {
  max-width: 130px;
  font-size: 0.8rem;
  font-weight: 800;
}

.profile-info {
  padding: 1rem 0.2rem 0.2rem;
}

.profile-info p {
  margin-bottom: 0.2rem;
  color: var(--accent);
  font-weight: 900;
}

.profile-info h2 {
  margin-bottom: 0.2rem;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

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

.floating-card {
  position: absolute;
  top: 52%;
  right: auto;
  left: 0;
  width: min(82%, 390px);
  overflow: hidden;
  background: #101828;
  color: #f8fafc;
  box-shadow: var(--shadow);
  transform: translateY(-50%);
  animation: float 5s ease-in-out infinite;
}

.floating-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.08), transparent 70%);
  transform: translateX(-120%);
  animation: codeSweep 4.2s ease-in-out infinite;
  pointer-events: none;
}

.window-dots {
  display: flex;
  gap: 0.45rem;
  padding: 1rem 1rem 0;
}

.window-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent-3);
}

.window-dots span:nth-child(2) {
  background: var(--success);
}

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

pre {
  margin: 0;
  overflow: auto;
  padding: 1rem;
  color: #dbeafe;
  font-size: clamp(0.72rem, 1.8vw, 0.92rem);
  line-height: 1.7;
}

.about,
.skills,
.projects,
.services,
.education,
.certificates,
.testimonials,
.contact {
  padding: clamp(3.5rem, 8vw, 7rem) 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 2rem;
}

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

.section-heading.split {
  display: flex;
  max-width: none;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}

.about-grid,
.contact {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(1rem, 4vw, 3rem);
  align-items: start;
}

.about-panel,
.skill-card,
.feature-card,
.timeline-item,
.testimonial-grid article,
.contact-form {
  padding: clamp(1.1rem, 3vw, 1.6rem);
}

.about-panel p:last-child {
  margin-bottom: 0;
}

.feature-grid,
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: start;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.about .section-heading {
  max-width: 980px;
}

.about .section-heading h2 {
  max-width: 920px;
  font-size: clamp(2rem, 4.2vw, 4.2rem);
}

.about-cards article {
  position: relative;
  overflow: hidden;
  min-height: 0;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 15%, transparent), transparent 58%),
    color-mix(in srgb, var(--surface) 94%, transparent);
}

.about-cards article::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -28px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  transition: transform 240ms ease;
}

.about-cards article:hover::after {
  transform: scale(1.35);
}

.spotlight-panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent 48%),
    linear-gradient(225deg, color-mix(in srgb, var(--accent-3) 14%, transparent), transparent 55%),
    color-mix(in srgb, var(--surface) 94%, transparent);
}

.spotlight-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 10%, transparent), transparent);
  transform: translateX(-100%);
  animation: codeSweep 5.5s ease-in-out infinite;
  pointer-events: none;
}

.mini-profile {
  position: relative;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.2rem;
}

.mini-profile img {
  width: 112px;
  height: 112px;
  border: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: var(--radius);
  object-fit: cover;
  object-position: center top;
  box-shadow: 0 18px 40px color-mix(in srgb, var(--accent) 20%, transparent);
}

.mini-profile span {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mini-profile h3 {
  margin: 0.2rem 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.mini-profile p {
  margin-bottom: 0;
  font-size: 0.98rem;
}

.about-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.2rem 0;
}

.about-pills span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  background: var(--surface);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
}

.about-progress {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.about-progress div:not(.skill-bar) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-weight: 900;
}

.about-progress strong {
  color: var(--accent);
}

.about-cards span,
.feature-card span,
.timeline-item span {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 900;
}

.about-cards p,
.skill-card p,
.project-content p,
.feature-card p,
.timeline-item p,
.testimonial-grid p {
  color: var(--muted);
}

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

.skill-card {
  position: relative;
  overflow: hidden;
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.skill-card::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
}

.skill-card:hover,
.feature-card:hover,
.testimonial-grid article:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.skill-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  place-items: center;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--surface);
  font-weight: 900;
}

.skill-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.skill-top span {
  color: var(--accent);
  font-weight: 900;
}

.skill-bar {
  height: 10px;
  margin: 0.9rem 0 1rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.skill-bar span {
  display: block;
  width: var(--level);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  transform-origin: left;
  animation: grow 1.1s ease both;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

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

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.project-card.is-hiding {
  opacity: 0;
  transform: translateY(10px);
}

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

.project-preview {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 180px;
  align-items: flex-end;
  padding: 1rem;
  color: #ffffff;
  font-weight: 900;
  font-size: 1.35rem;
}

.project-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.24), transparent),
    radial-gradient(circle at var(--px, 50%) var(--py, 50%), rgba(255, 255, 255, 0.22), transparent 9rem);
  opacity: 0;
  transform: translateX(-35%);
  transition: opacity 240ms ease, transform 500ms ease;
}

.project-card:hover .project-preview::after {
  opacity: 1;
  transform: translateX(35%);
}

.feature-card,
.timeline-item,
.testimonial-grid article {
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.timeline-item:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow);
}

.preview-portfolio {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 94%, #000000), color-mix(in srgb, var(--accent-2) 78%, #000000)),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, 0.14) 18px 20px);
}

.preview-dashboard {
  background:
    linear-gradient(135deg, #2563eb, #7c3aed),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(255, 255, 255, 0.15) 18px 20px);
}

.preview-brand {
  background:
    linear-gradient(145deg, #ef6c35, #84cc16),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent);
}

.preview-task {
  background:
    linear-gradient(135deg, #101828, #0f766e),
    repeating-linear-gradient(135deg, transparent 0 16px, rgba(255, 255, 255, 0.13) 16px 18px);
}

.project-content {
  padding: 1.1rem;
}

.project-type {
  margin-bottom: 0.4rem;
  color: var(--accent);
  text-transform: uppercase;
}

.tags,
.project-actions {
  margin-top: 1rem;
}

.tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
}

.project-actions a {
  min-height: 38px;
  padding: 0.5rem 0.7rem;
  color: var(--accent);
  font-size: 0.86rem;
}

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

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.2rem;
}

.timeline-item p,
.testimonial-grid p {
  margin-bottom: 0;
}

.testimonial-grid article {
  position: relative;
}

.testimonial-grid article::before {
  content: '"';
  position: absolute;
  top: 0.7rem;
  right: 1rem;
  color: color-mix(in srgb, var(--accent) 22%, transparent);
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
}

.testimonial-grid strong {
  display: block;
  margin-top: 1rem;
  color: var(--accent);
}

.contact {
  align-items: start;
}

.contact-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.contact-list a {
  color: var(--accent);
  font-weight: 900;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

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

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  outline: none;
  padding: 0.85rem 0.9rem;
  resize: vertical;
}

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

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

.site-footer {
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.site-footer p {
  margin: 0;
}

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

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

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

@keyframes ambientMove {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  100% {
    transform: translate3d(2%, 1%, 0) scale(1.05);
  }
}

@keyframes gridDrift {
  to {
    background-position: 48px 48px;
  }
}

@keyframes markPulse {
  0%,
  100% {
    box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 28%, transparent);
  }
  50% {
    box-shadow: 0 16px 42px color-mix(in srgb, var(--accent) 46%, transparent);
  }
}

@keyframes borderFlow {
  to {
    background-position: 240% 0;
  }
}

@keyframes codeSweep {
  0%,
  48% {
    transform: translateX(-120%);
  }
  70%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

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

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

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

  .about-grid,
  .about-cards,
  .feature-grid,
  .feature-grid.certificate-grid,
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: grid;
  }

  .nav {
    position: fixed;
    top: 76px;
    right: 1rem;
    left: 1rem;
    display: grid;
    gap: 0.35rem;
    padding: 0.8rem;
    border-radius: var(--radius);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

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

  .nav-link {
    width: 100%;
    padding: 0.75rem 0.9rem;
  }

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

  .hero {
    min-height: auto;
  }

  .hero-showcase {
    min-height: 520px;
  }

  .section-heading.split {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  body {
    background:
      linear-gradient(155deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 22rem),
      var(--bg);
  }

  main,
  .site-header,
  .site-footer {
    width: min(100% - 1.1rem, 1180px);
  }

  .site-header {
    min-height: 66px;
    padding: 0.55rem 0;
  }

  .brand-mark,
  .theme-toggle,
  .menu-toggle {
    width: 40px;
    height: 40px;
  }

  .brand span:last-child {
    max-width: 136px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
  }

  .nav {
    top: 66px;
    right: 0.55rem;
    left: 0.55rem;
    padding: 0.65rem;
    box-shadow: var(--shadow);
  }

  .nav-link {
    border-radius: var(--radius);
    padding: 0.8rem 0.9rem;
    font-size: 0.98rem;
  }

  .hero,
  .about,
  .skills,
  .projects,
  .services,
  .education,
  .certificates,
  .testimonials,
  .contact {
    padding: 2.8rem 0;
  }

  .hero {
    gap: 1.4rem;
    padding-top: 2rem;
  }

  .eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.11em;
  }

  h1 {
    font-size: clamp(2.45rem, 13vw, 3.7rem);
    line-height: 1;
  }

  h2,
  .about .section-heading h2 {
    font-size: clamp(1.8rem, 10vw, 2.65rem);
    line-height: 1.08;
  }

  h3 {
    font-size: 1.05rem;
  }

  .lead,
  .about-panel p,
  .contact-copy p {
    font-size: 1rem;
  }

  .typing-line {
    min-height: 3.4rem;
    font-size: 1.05rem;
  }

  .section-heading {
    margin-bottom: 1.35rem;
  }

  .hero-stats,
  .skills-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero-showcase {
    min-height: auto;
    transform: none;
  }

  .floating-card,
  .profile-card {
    position: relative;
    inset: auto;
    width: 100%;
  }

  .floating-card {
    animation: none;
    transform: none;
    margin-bottom: 1rem;
    font-size: 0.82rem;
  }

  .profile-card {
    margin-top: 1rem;
    padding: 0.75rem;
  }

  .profile-photo,
  .profile-img {
    min-height: 340px;
    height: 340px;
  }

  .profile-info h2 {
    font-size: 1.9rem;
  }

  .hero-stats {
    gap: 0.6rem;
    margin-top: 1.2rem;
  }

  .hero-stats div,
  .about-panel,
  .about-cards article,
  .skill-card,
  .project-card,
  .feature-card,
  .timeline-item,
  .testimonial-grid article,
  .contact-form {
    box-shadow: 0 10px 26px rgba(16, 24, 40, 0.08);
  }

  .hero-stats div {
    padding: 0.85rem;
  }

  .mini-profile {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .mini-profile img {
    width: 100%;
    height: 260px;
  }

  .button,
  .hero-actions,
  .hero-actions .button,
  .contact-form .button {
    width: 100%;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

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

@media (max-width: 430px) {
  main,
  .site-header,
  .site-footer {
    width: min(100% - 0.8rem, 1180px);
  }

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

  h1 {
    font-size: clamp(2.25rem, 14vw, 3.25rem);
  }

  h2,
  .about .section-heading h2 {
    font-size: clamp(1.65rem, 10vw, 2.25rem);
  }

  .hero-actions,
  .filters,
  .tags,
  .project-actions,
  .theme-dock,
  .about-pills {
    gap: 0.55rem;
  }

  .button,
  .filter {
    min-height: 44px;
    padding: 0.72rem 0.82rem;
  }

  .theme-dock {
    justify-content: center;
  }

  .profile-photo,
  .profile-img {
    min-height: 300px;
    height: 300px;
  }

  .profile-info h2 {
    font-size: 1.65rem;
  }

  .project-preview {
    min-height: 150px;
  }

  pre {
    font-size: 0.68rem;
    white-space: pre-wrap;
  }
}
