:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0d1a2d;
  --surface: rgba(16, 31, 52, 0.76);
  --surface-solid: #111f34;
  --surface-strong: rgba(21, 41, 68, 0.92);
  --text: #edf7ff;
  --text-muted: #a8bbcf;
  --heading: #ffffff;
  --border: rgba(150, 207, 255, 0.18);
  --accent: #39d5ff;
  --accent-strong: #16b7ee;
  --accent-soft: rgba(57, 213, 255, 0.16);
  --pink: #ff8bd4;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.2);
  --radius: 24px;
  --radius-sm: 16px;
  --container: 1120px;
  --nav-height: 76px;
  --font: Inter, Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7fbff;
  --bg-soft: #edf7ff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --surface-strong: rgba(255, 255, 255, 0.94);
  --text: #162234;
  --text-muted: #5d6f84;
  --heading: #07111f;
  --border: rgba(18, 91, 134, 0.16);
  --accent: #008fd3;
  --accent-strong: #0076b0;
  --accent-soft: rgba(0, 143, 211, 0.12);
  --pink: #d855af;
  --shadow: 0 24px 70px rgba(30, 90, 130, 0.16);
  --shadow-soft: 0 16px 40px rgba(30, 90, 130, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: clip;
  background:
    radial-gradient(circle at top left, rgba(57, 213, 255, 0.16), transparent 34rem),
    radial-gradient(circle at 90% 18%, rgba(255, 139, 212, 0.11), transparent 28rem),
    linear-gradient(180deg, var(--bg), var(--bg-soft) 48%, var(--bg));
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

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

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

a:not(.btn):not(.brand):not(.nav-link):not(.social-grid a) {
  color: var(--accent);
  font-weight: 700;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 76%, white);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--text);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.section {
  position: relative;
  padding: 6rem 0;
  scroll-margin-top: calc(var(--nav-height) + 1.25rem);
}

.section-heading {
  max-width: 720px;
  min-width: 0;
}

.section-heading.centered {
  margin: 0 auto 2.25rem;
  text-align: center;
}

.section-heading.centered>p:not(.eyebrow) {
  max-width: 650px;
  margin: 1rem auto 0;
}

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

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

h1,
h2,
h3 {
  margin: 0;
  color: var(--heading);
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 11ch;
  font-size: clamp(3rem, 8vw, 6.8rem);
}

.typing-heading {
  min-height: 1.08em;
}

.js-enabled .typing-heading {
  min-width: 11ch;
}

.typing-heading.is-typing::after,
.typing-heading.typing-done::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 0.78em;
  margin-left: 0.08em;
  border-radius: 999px;
  background: var(--accent);
  transform: translateY(0.08em);
  animation: cursor-blink 0.85s steps(2, start) infinite;
}

.typing-heading.cursor-fade::after {
  opacity: 0;
  animation: none;
  transition: opacity 0.35s ease;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.35rem);
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0;
  color: var(--text-muted);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--nav-height);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(22px);
}

.navbar {
  min-height: var(--nav-height);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-block: 0.62rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--heading);
  font-size: 1.12rem;
  font-weight: 950;
  letter-spacing: 0;
}

.nav-group {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-left: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.94rem;
  font-weight: 750;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: var(--heading);
  background: var(--accent-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.theme-toggle,
.menu-toggle,
.back-to-top {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover,
.menu-toggle:hover,
.back-to-top:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.theme-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sun-icon {
  display: none;
}

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

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

:root[data-theme="dark"] .moon-icon {
  color: var(--accent);
}

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

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

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

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

.hero {
  min-height: calc(100svh - var(--nav-height));
  display: flex;
  align-items: center;
  padding-top: 3.5rem;
  padding-bottom: 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 58%, rgba(57, 213, 255, 0.05) 58% 100%),
    radial-gradient(circle at 76% 50%, rgba(57, 213, 255, 0.2), transparent 24rem);
  mask-image: linear-gradient(to bottom, black 76%, transparent);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(260px, 0.7fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  min-width: 0;
}

.hero-content {
  min-width: 0;
}

.hero-subtitle {
  max-width: 620px;
  margin-top: 1.25rem;
  color: var(--text);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.hero-note {
  max-width: 560px;
  margin-top: 0.85rem;
  color: var(--text-muted);
  font-size: clamp(0.98rem, 1.5vw, 1.08rem);
}

.js-enabled .hero-sequence,
.js-enabled .hero-visual.hero-sequence {
  opacity: 0;
  transform: translateY(14px);
}

.js-enabled .hero-content.reveal {
  opacity: 1;
  transform: none;
}

.js-enabled .hero-sequence.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.58s ease, transform 0.58s ease;
}

.js-enabled .hero-visual.hero-sequence {
  transform: translateY(10px) scale(0.96);
}

.js-enabled .hero-visual.hero-sequence.is-visible {
  transform: translateY(0) scale(1);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-actions,
.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  min-width: 0;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 750;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.skill-pill::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.creator-pill {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.45rem;
  padding: 0.55rem 0.6rem 0.55rem 0.8rem;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border));
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-soft), rgba(255, 139, 212, 0.09));
  box-shadow: var(--shadow-soft);
}

.creator-pill>span {
  min-width: 0;
  overflow-wrap: break-word;
}

.creator-pill code {
  color: var(--heading);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.creator-pill small {
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.copy-code {
  min-height: 36px;
  padding: 0.4rem 0.8rem;
  border: 0;
  border-radius: 999px;
  background: var(--heading);
  color: var(--bg);
  font-weight: 900;
}

.hero-actions {
  margin-top: 2rem;
}

.btn {
  max-width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.78rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(22, 183, 238, 0.18);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--pink)));
  color: #03121f;
  box-shadow: 0 18px 35px rgba(22, 183, 238, 0.28);
}

.btn-secondary,
.btn-ghost {
  border-color: var(--border);
  background: var(--surface);
  color: var(--heading);
}

.btn-ghost {
  background: transparent;
}

.hero-visual {
  min-width: 0;
  display: flex;
  justify-content: center;
}

.profile-card {
  position: relative;
  isolation: isolate;
  width: clamp(260px, 24vw, 290px);
  height: clamp(260px, 24vw, 290px);
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  padding: 0.55rem;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  border-radius: 50%;
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface-solid) 84%, transparent));
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.28),
    0 0 0 8px var(--accent-soft);
}

.profile-glow {
  position: absolute;
  inset: 6%;
  z-index: -1;
  border-radius: inherit;
  background: rgba(57, 213, 255, 0.34);
  filter: blur(34px);
}

.profile-card img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 3rem;
}

.about-card {
  display: grid;
  grid-template-columns: minmax(0, 0.45fr) minmax(0, 0.55fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--surface-solid) 82%, transparent)),
    radial-gradient(circle at top right, var(--accent-soft), transparent 20rem);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  min-width: 0;
}

.about-content {
  display: grid;
  gap: 1rem;
  font-size: 1.05rem;
}

.creator-code-inline {
  display: inline;
  color: var(--heading);
  font-weight: 900;
}

.epic-note {
  color: var(--text-muted);
  font-size: 0.92em;
  font-weight: 800;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.skill-group,
.project-card,
.github-card,
.contact-form {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.stat-card {
  display: grid;
  gap: 0.8rem;
  padding: 1.15rem;
}

.stat-icon {
  display: inline-grid;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 950;
}

.skills-section {
  background: linear-gradient(180deg, transparent, rgba(57, 213, 255, 0.045), transparent);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  min-width: 0;
}

.skill-group {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  min-height: 0;
  padding: 1rem;
}

.skill-group h3 {
  font-size: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.skill-pill:hover,
.skill-pill:focus-within,
.skill-group:hover,
.social-grid a:hover,
.contact-form:hover,
.github-card:hover,
.project-card:hover {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--border));
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(22, 183, 238, 0.12);
}

.projects-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  gap: 1.25rem;
  align-items: stretch;
  min-width: 0;
}

.featured-project {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1fr);
  overflow: hidden;
  min-width: 0;
}

.project-media {
  min-height: 100%;
  background: linear-gradient(135deg, rgba(57, 213, 255, 0.18), rgba(255, 139, 212, 0.14));
}

.project-media img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.project-content,
.github-card {
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: 1.5rem;
}

.project-content h3,
.github-card h3 {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.github-card {
  align-content: space-between;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  grid-template-areas:
    "copy form"
    "social form";
  gap: 0.75rem 1.5rem;
  align-items: start;
  min-width: 0;
}

.contact-copy {
  grid-area: copy;
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.social-grid {
  grid-area: social;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.7rem;
  align-self: start;
  min-width: 0;
}

.social-grid a {
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--heading);
  font-weight: 850;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.social-grid a::after {
  content: "↗";
  color: var(--accent);
  margin-left: auto;
}

.social-grid a[href^="mailto"]::after {
  content: "@";
}

.social-grid a:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 46%, var(--border));
}

.contact-form {
  grid-area: form;
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  min-width: 0;
  max-width: 100%;
}

.form-field {
  display: grid;
  gap: 0.45rem;
}

label {
  color: var(--heading);
  font-size: 0.92rem;
  font-weight: 850;
}

input,
textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
  color: var(--text);
  padding: 0.85rem 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--text-muted) 75%, transparent);
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.submit-btn {
  width: 100%;
}

.submit-loading,
.contact-form.is-sending .submit-text {
  display: none;
}

.contact-form.is-sending .submit-loading {
  display: inline;
}

.contact-form.is-sending .submit-btn {
  opacity: 0.78;
  pointer-events: none;
}

.site-footer {
  padding: 2rem 0 2.4rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer .container {
  display: grid;
  gap: 0.35rem;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.toast-region {
  position: fixed;
  right: 1rem;
  bottom: 4.5rem;
  z-index: 110;
  display: grid;
  gap: 0.75rem;
  width: min(360px, calc(100% - 2rem));
  pointer-events: none;
}

.toast {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 18px;
  background: var(--surface-strong);
  color: var(--heading);
  font-weight: 800;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  animation: toast-in 0.25s ease both;
}

.toast.error {
  border-left-color: #ff6b8b;
}

.page-404 {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.page-404 .site-header {
  background: transparent;
  border-bottom-color: color-mix(in srgb, var(--border) 62%, transparent);
  backdrop-filter: none;
}

.page-404 .not-found-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 58%, rgba(57, 213, 255, 0.05) 58% 100%),
    radial-gradient(circle at 76% 50%, rgba(57, 213, 255, 0.2), transparent 24rem);
  mask-image: linear-gradient(to bottom, black 76%, transparent);
}

.page-404 .not-found-main {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.page-404 .not-found-section {
  position: relative;
  width: 100%;
  min-height: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2.25rem, 4.5vw, 3.75rem) 0;
  overflow: hidden;
}

.page-404 .not-found-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
}

.page-404 .not-found-card {
  position: relative;
  isolation: isolate;
  width: min(calc(100% - 2rem), 720px);
  display: grid;
  justify-items: center;
  gap: 1rem;
  margin-inline: auto;
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 0%, var(--accent-soft), transparent 18rem),
    linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface-solid) 84%, transparent));
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(22px);
}

.page-404 .not-found-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(57, 213, 255, 0.22), rgba(255, 139, 212, 0.12), transparent 62%);
  opacity: 0.8;
}

.page-404 .not-found-code {
  margin: 0;
  color: color-mix(in srgb, var(--accent) 72%, var(--heading));
  font-size: clamp(4.5rem, 20vw, 9.5rem);
  font-weight: 950;
  line-height: 0.86;
  text-shadow: 0 0 40px var(--accent-soft);
}

.page-404 .not-found-card h1 {
  max-width: none;
  font-size: clamp(2.45rem, 7vw, 5.2rem);
}

.page-404 .not-found-copy {
  max-width: 540px;
  font-size: clamp(1rem, 2vw, 1.14rem);
}

.page-404 .not-found-card .btn {
  margin-top: 0.75rem;
  min-width: 142px;
}

.page-404 .site-footer {
  flex: 0 0 auto;
  padding: 1.35rem 0 1.6rem;
}

.js-enabled .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.js-enabled .reveal[data-reveal-delay="1"] {
  transition-delay: 0.06s;
}

.js-enabled .reveal[data-reveal-delay="2"] {
  transition-delay: 0.12s;
}

.js-enabled .reveal[data-reveal-delay="3"] {
  transition-delay: 0.18s;
}

.js-enabled .reveal[data-reveal-delay="4"] {
  transition-delay: 0.24s;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

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

@media (max-width: 1024px) {

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

  .contact-grid {
    grid-template-areas:
      "copy"
      "form"
      "social";
  }

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

  .hero-content {
    max-width: 760px;
  }

  .profile-card {
    width: 260px;
    height: 260px;
  }

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

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

@media (max-width: 768px) {
  :root {
    --nav-height: 68px;
  }

  .container {
    width: min(calc(100% - 1.25rem), var(--container));
  }

  .section {
    padding: 4.5rem 0;
  }

  .navbar {
    justify-content: flex-end;
  }

  .nav-group {
    width: auto;
    margin-left: auto;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .nav-menu {
    position: absolute;
    top: calc(var(--nav-height) + 0.5rem);
    left: auto;
    right: 0;
    width: min(230px, calc(100% + 92px));
    max-width: calc(100vw - 1.25rem);
    display: grid;
    gap: 0.35rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

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

  .nav-link {
    width: 100%;
    min-height: 48px;
    justify-content: center;
    border-radius: 16px;
  }

  .hero {
    min-height: calc(100svh - var(--nav-height));
    align-items: center;
    padding-top: 2.75rem;
    padding-bottom: 3.25rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-visual {
    display: none;
  }

  h1 {
    font-size: clamp(2.55rem, 14vw, 4.35rem);
  }

  .contact-copy {
    grid-area: copy;
    order: 1;
  }

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

  .social-grid {
    grid-area: social;
    order: 3;
  }

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

  .project-media img {
    min-height: auto;
    aspect-ratio: 16 / 11;
  }

  .page-404 .not-found-section {
    padding-block: 2.75rem;
  }
}

@media (max-width: 560px) {
  .hero-actions {
    align-items: stretch;
  }

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

  .hero-actions .btn {
    min-width: 0;
  }

  .creator-pill {
    border-radius: 22px;
    justify-content: flex-start;
    text-align: left;
    padding: 0.7rem;
  }

  .creator-pill>span {
    flex: 1 1 100%;
  }

  .creator-pill small {
    flex: 1 1 auto;
  }

  .copy-code {
    flex: 0 0 auto;
    min-width: 76px;
    max-width: 100%;
  }

  .stat-grid,
  .skills-grid,
  .social-grid {
    grid-template-columns: 1fr;
  }

  .skill-group,
  .stat-card,
  .project-content,
  .github-card,
  .contact-form {
    border-radius: 20px;
  }

  .toast-region {
    top: auto;
    right: 0.625rem;
    bottom: 4.25rem;
    width: calc(100% - 1.25rem);
  }

  .page-404 .not-found-card {
    border-radius: 20px;
  }

  .page-404 .not-found-section {
    padding-block: 3rem;
  }

  .page-404 .not-found-card .btn {
    width: 100%;
  }
}

@media (max-width: 375px) {
  h1 {
    font-size: clamp(2.35rem, 13vw, 3rem);
  }

  .theme-toggle,
  .menu-toggle,
  .back-to-top {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .skill-pill {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .reveal,
  .js-enabled .reveal,
  .js-enabled .hero-sequence,
  .js-enabled .hero-visual.hero-sequence {
    opacity: 1;
    transform: none;
    transition-delay: 0s !important;
  }

  .typing-heading::after {
    display: none !important;
  }
}

#message {
  resize: none;
}