:root {
  --page-max: 1280px;
  --page-pad: clamp(24px, 5vw, 48px);
  --section-gap: clamp(44px, 5vw, 72px);
  --icon-speed: 0.4s;
  --icon-ease: ease-in-out;
  --control-radius: 10px;
}

:root {
  --nav-bg: rgba(255, 255, 255, 0.85);
  --nav-bg-solid: rgba(255, 255, 255, 0.98);
  --text: #1e293b;
  --muted: #64748b;
  --accent: #0ea5e9;
  --accent-2: #a855f7;
  --border: #e2e8f0;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  --page-bg: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  --card-bg: #ffffff;
  --control-bg: #f8fafc;
  --hover-bg: #f1f5f9;
  --hero-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  --hero-panel: rgba(255, 255, 255, 0.95);
  --hero-blob1: rgba(203, 213, 225, 0.25);
  --hero-blob2: rgba(226, 232, 240, 0.25);
  --hero-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
  --chip-bg: rgba(255, 255, 255, 0.8);
  --chip-border: rgba(15, 23, 42, 0.06);
  --glass-border: rgba(255, 255, 255, 0.5);
  --noise: radial-gradient(circle at 10% 20%, rgba(0, 0, 0, 0.03) 2px, transparent 0) repeat;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  font-weight: 400 !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  /* offset for fixed nav when using anchor links */
}

body {
  margin: 0;
  font-family: "Lato", "Segoe UI", "Helvetica Neue", "Trebuchet MS", sans-serif;
  color: var(--text);
  background: var(--page-bg);
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding-left: calc(var(--page-pad) + 12px);
  padding-right: calc(var(--page-pad) + 12px);
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: inherit;
}

.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  /* allow hero background to flow under header */
  backdrop-filter: none;
  transition: background-color 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  border-bottom: 0;
}

.nav--scrolled {
  background: var(--nav-bg-solid);
  box-shadow: var(--shadow);
  border-color: var(--border);
}

.nav__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 14px var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 1.05rem;
}

.nav__brand-letters {
  display: inline-flex;
  gap: 1px;
}

.nav__brand-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(0) scale(1);
  transition: opacity 180ms ease;
}

.nav__brand-letter.is-visible {
  opacity: 1;
}

.nav__brand::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 4px;
  background: var(--text);
  animation: caret-blink 1s steps(1) infinite;
}

@keyframes caret-blink {

  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

.nav__links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 auto;
  padding: 0;
  justify-content: center;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding: 8px 4px;
  font-weight: 600;
  font-size: 1.16rem;
  color: var(--muted);
  transition: color 160ms ease;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--text);
}

.nav__link:hover::after,
.nav__link:focus-visible::after {
  transform: scaleX(1);
}

.nav__link.is-active {
  color: var(--text);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--control-radius);
  border: 1px solid var(--border);
  background: var(--control-bg);
  color: var(--text);
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 180ms ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.12);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle__icon {
  display: none;
  line-height: 0;
}

:root[data-theme="light"] .theme-toggle__icon--moon {
  display: inline-flex;
}

:root[data-theme="dark"] .theme-toggle__icon--sun {
  display: inline-flex;
}

.theme-toggle svg {
  display: block;
}

.nav__toggle {
  --flip-angle: 0deg;
  display: none;
  border: 1px solid var(--border);
  background: var(--control-bg);
  color: inherit;
  padding: 9px 10px;
  border-radius: var(--control-radius);
  cursor: pointer;
  transition: transform var(--icon-speed) var(--icon-ease), border-color 150ms ease, box-shadow 150ms ease;
  align-items: center;
  justify-content: center;
  perspective: 1100px;
  /* gives depth for the vertical flip */
  transform-style: preserve-3d;
  transform-origin: center;
  transform: rotateX(var(--flip-angle));
  will-change: transform;
}

.nav__toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav__toggle:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.12);
}

.nav__toggle:hover,
.nav__toggle:focus-visible,
.nav--open .nav__toggle {
  --flip-angle: 180deg;
}

.nav__icon {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  transform-style: preserve-3d;
  transform-origin: center;
  will-change: transform;
}

.nav__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  position: relative;
  transition: transform var(--icon-speed) var(--icon-ease), opacity var(--icon-speed) var(--icon-ease);
  will-change: transform, opacity;
  transform-origin: center;
  transform-style: preserve-3d;
  backface-visibility: visible;
  transform: translateZ(0.5px);
  /* tiny lift to help show the vertical flip */
}

.nav__bar+.nav__bar {
  margin-top: 5px;
}

.nav--open .nav__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg) translateZ(0.5px);
}

.nav--open .nav__bar:nth-child(2) {
  opacity: 0;
  transform: translateX(-6px) translateZ(0.5px);
}

.nav--open .nav__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg) translateZ(0.5px);
}

.hero {
  width: 100%;
  max-width: 100%;
  min-height: auto;
  padding: clamp(24px, 4vw, 44px) 0;
  margin: 12px 0 0;
  position: relative;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.hero__layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  align-items: center;
  padding-block: clamp(18px, 3vw, 28px);
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fade-up 700ms ease 40ms both;
}

.intro-title {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  display: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  display: none;
}

.hero>* {
  position: relative;
  z-index: 1;
}


.hero__title {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.2;
}

.accent {
  color: var(--accent);
}

.accent-underline {
  position: relative;
  color: var(--accent);
}

.accent-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.1em;
  width: 100%;
  height: 0.28em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.65;
  border-radius: 12px;
  z-index: -1;
  animation: underline-swipe 2.6s ease-in-out infinite;
  transform-origin: left;
}

.hero__desc {
  margin: 0;
  color: var(--muted);
  max-width: 640px;
  margin-top: 22px;
  font-size: 1.28rem;
  line-height: 1.72;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 28px;
}

.icon-btn {
  width: auto;
  height: auto;
  border-radius: 0;
  border: none;
  background: transparent;
  color: #38bdf8;
  /* light blue for icons */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform 180ms ease, filter 180ms ease;
}

.icon-btn svg {
  width: 36px;
  height: 36px;
  fill: currentColor;
}

.icon-btn img {
  width: 36px;
  height: 36px;
  display: block;
  filter: invert(66%) sepia(54%) saturate(610%) hue-rotate(175deg) brightness(97%) contrast(96%);
  /* tint to light blue */
}

.icon-btn:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

.icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hero__stats {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 600;
  font-size: 1.2rem;
  flex-wrap: wrap;
  margin-top: 24px;
}

.stat {
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-sep {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  display: inline-block;
}

.hero__current-project {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 99px;
  max-width: fit-content;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  animation: fade-up 700ms ease 150ms both;
  font-size: 0.92rem;
  color: var(--text);
}

.cp-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cp-label {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.cp-sep {
  width: 1px;
  height: 14px;
  background: rgba(0, 0, 0, 0.1);
  display: block;
}

.cp-details {
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}

.cp-stack {
  color: var(--muted);
  font-size: 0.9em;
  margin-left: 4px;
}

.cp-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  transition: color 0.2s;
  text-decoration: none;
}

.cp-link:hover {
  color: var(--accent);
}

.cp-link img {
  opacity: 0.7;
}

.cp-link:hover img {
  opacity: 1;
}

.cp-time {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

.status-dot-pulse {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.status-dot-pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid #22c55e;
  opacity: 0.5;
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  50% {
    opacity: 0.5;
  }

  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* Responsive Adjustments for Current Project Bar */

/* Tablet: Tighten things up slightly */
@media (max-width: 1024px) {
  .hero__current-project {
    gap: 10px;
    padding: 8px 14px;
    margin-top: 24px;
  }
}

/* Mobile: Stack layout for better readability */
@media (max-width: 700px) {
  .hero__current-project {
    flex-direction: column;
    align-items: center;
    border-radius: 16px;
    /* Pill shape becomes card shape */
    gap: 8px;
    padding: 12px 16px;
    text-align: center;
    width: 100%;
    /* Use full width available */
    max-width: 320px;
    /* But restrict it so it doesn't look stretched */
  }

  .cp-sep {
    display: none;
    /* Hide vertical separators */
  }

  /* Make the label row distinct */
  .cp-group:first-child {
    width: 100%;
    justify-content: center;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  }

  /* Main Details */
  .cp-details {
    flex-direction: column;
    /* Stack Project Name and Stack */
    gap: 2px;
  }

  .cp-stack {
    margin-left: 0;
    font-size: 0.8em;
  }

  /* Links and Time: Group them in a row if possible, or stack if very narrow */
  .cp-link,
  .cp-time {
    font-size: 0.8rem;
  }

  /* Add a small gap between the details and the footer info */
  .cp-details {
    margin: 4px 0;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.98rem;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease, background-color 200ms ease, filter 200ms ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2), transparent 45%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.btn.is-rippling::after {
  opacity: 1;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1220;
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.25);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(56, 189, 248, 0.35);
  filter: saturate(1.05);
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--text);
  border: 1px solid var(--chip-border);
  font-size: 0.9rem;
  transition: transform 200ms ease, border-color 200ms ease, background-color 200ms ease;
}

.chip:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.hero__visual {
  position: relative;
  display: grid;
  animation: fade-up 700ms ease 100ms both;
}

.sparkle {
  display: none;
  position: absolute;
  top: 12%;
  right: 18%;
  width: 16px;
  height: 16px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
  animation: sparkle 2.8s ease-in-out infinite;
}

.blob {
  position: absolute;
  inset: -30% -10% auto auto;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle at 30% 30%, var(--hero-blob1), transparent 45%),
    radial-gradient(circle at 70% 40%, var(--hero-blob2), transparent 40%);
  filter: blur(22px);
  z-index: 0;
  opacity: 0.9;
  transform: rotate(-10deg);
}

.card {
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--hero-shadow);
  overflow: hidden;
  z-index: 1;
  animation: float 5s ease-in-out infinite;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(168, 85, 247, 0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
}

.card__header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot--red {
  background: #ef4444;
}

.dot--yellow {
  background: #f59e0b;
}

.dot--green {
  background: #22c55e;
}

.card__label {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.card__body {
  padding: 16px;
  font-family: "Lato", "Segoe UI", "Helvetica Neue", "Trebuchet MS", sans-serif;
  color: var(--text);
  font-size: 1.08rem;
  display: grid;
  gap: 10px;
}

/* Force all nested elements in the code card to use the monospaced code font */
.card__body * {
  font-family: inherit;
}

.code-line {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.code-line--note {
  color: var(--muted);
}

.code-key {
  color: #f472b6;
}

.code-var {
  color: #38bdf8;
}

.code-str {
  color: #a5d6ff;
}

.code-fn {
  color: #c084fc;
}

.section-placeholder {
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  text-align: center;
}

.scroll-indicator {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--muted);
  font-weight: 600;
}

.scroll-arrow {
  font-size: 1.2rem;
  animation: scroll-bounce 1.5s ease-in-out infinite;
}

.about {
  position: relative;
  margin: var(--section-gap) 0 0;
  padding: 0;
}

.about__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding: 0 4px;
}

.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--control-bg);
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.section__title {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1.2;
}

.section__subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1.26rem;
}

.section__titles {
  display: grid;
  gap: 4px;
}

.about__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 5vw, 40px);
  align-items: stretch;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

.about__grid::before {
  display: none;
}

.about__text {
  position: relative;
  display: grid;
  gap: 10px;
  z-index: 1;
}

.about__text p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
  font-size: 1.28rem;
}

.about__highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-auto-rows: 1fr;
  gap: 12px;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.about__highlights li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--control-bg);
  color: var(--text);
  font-size: 1.06rem;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  height: 100%;
}

.about__highlights li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: inline-block;
  flex-shrink: 0;
}

.about__profile {
  position: relative;
  display: grid;
  z-index: 1;
}

.about__glow {
  position: absolute;
  inset: 4% -8% 8% 18%;
  background: radial-gradient(55% 55% at 30% 30%, rgba(14, 165, 233, 0.18), transparent 60%),
    radial-gradient(60% 60% at 70% 60%, rgba(168, 85, 247, 0.18), transparent 60%);
  filter: blur(32px);
  opacity: 0.9;
  z-index: 0;
  pointer-events: none;
}

.profile-card {
  position: relative;
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  z-index: 1;
  padding: 14px 14px 16px;
  display: grid;
  gap: 12px;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.profile-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  border-color: rgba(14, 165, 233, 0.22);
}

.profile-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 2px;
}

.profile-card__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--control-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 0.94rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.profile-card__status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  position: relative;
  box-shadow: 0 0 0 6px rgba(14, 165, 233, 0.16);
  animation: pulse-status 1.6s ease-out infinite;
}

.profile-card__meta {
  display: grid;
  gap: 2px;
  text-align: right;
}

.profile-card__name {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 800;
}

.profile-card__role {
  margin: 0;
  font-weight: 700;
  color: var(--accent);
}

.profile-card__edu {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.profile-card__body {
  display: grid;
  gap: 12px;
}

.profile-card__section {
  background: var(--control-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 12px 12px;
  display: grid;
  gap: 6px;
}

.profile-card__label {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-card__status-detail {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

.profile-card__availability,
.profile-card__location {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.profile-card__section-title {
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.profile-card__focus-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-card__focus-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.08);
  color: var(--text);
  border: 1px solid rgba(14, 165, 233, 0.18);
  font-weight: 700;
  font-size: 0.95rem;
}

.profile-card__stack {
  display: grid;
  gap: 8px;
}

.profile-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-card__chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--text);
  font: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, color 160ms ease;
}

.profile-card__chip:hover,
.profile-card__chip:focus-visible {
  border-color: rgba(14, 165, 233, 0.4);
  color: var(--text);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  transform: translateY(-2px);
}

.profile-card__chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 420ms ease, transform 520ms ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* Ensure projects stay visible even if the reveal JS is blocked */
#projects.reveal {
  opacity: 1;
  transform: none;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

@keyframes scroll-bounce {
  0% {
    transform: translate(-50%, 0);
  }

  50% {
    transform: translate(-50%, 8px);
  }

  100% {
    transform: translate(-50%, 0);
  }
}

@keyframes underline-swipe {
  0% {
    transform: scaleX(0.6);
    opacity: 0.4;
  }

  30% {
    transform: scaleX(1);
    opacity: 0.9;
  }

  100% {
    transform: scaleX(0.9);
    opacity: 0.6;
  }
}

@keyframes pulse-status {
  0% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.25);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(14, 165, 233, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
  }
}


@keyframes sparkle {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }

  100% {
    transform: scale(0.8);
    opacity: 0.8;
  }
}

@media (max-width: 1024px) {
  .about {
    width: 100%;
    max-width: none;
    margin-top: var(--section-gap);
  }

  .about__grid {
    grid-template-columns: 1fr;
    padding: clamp(22px, 5vw, 30px);
  }

  .about__profile {
    justify-items: center;
  }

  #skills {
    width: 100%;
    max-width: none;
    padding: 0;
    margin-top: var(--section-gap);
  }

  .skills__grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }

  .projects__grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }

  .project-card--featured {
    grid-column: span 2;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --page-pad: 20px;
    /* Increased mobile padding for better readability */
  }

  .container {
    padding-left: var(--page-pad);
    padding-right: var(--page-pad);
    width: 100%;
    max-width: 100%;
  }

  .nav__inner {
    padding: 12px var(--page-pad);
  }

  .nav__toggle {
    display: inline-flex;
  }

  .nav__links {
    position: absolute;
    top: 100%;
    right: var(--page-pad);
    left: var(--page-pad);
    flex-direction: column;
    gap: 6px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    margin-top: 8px;
    padding: 10px 12px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height 220ms ease, opacity 180ms ease, transform 200ms ease;
    pointer-events: none;
  }

  .nav--open .nav__links {
    max-height: 320px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav__link {
    width: 100%;
    padding: 10px 6px;
    border-radius: 10px;
    font-size: 1.12rem;
  }

  .nav__link::after {
    display: none;
  }

  .nav__link:hover,
  .nav__link:focus-visible {
    background: var(--hover-bg);
  }

  .hero {
    width: 100%;
    max-width: none;
    margin: 12px 0 0;
    padding: clamp(22px, 5vw, 32px) 0;
  }

  .hero__layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-block: clamp(16px, 4vw, 22px);
  }

  .hero__desc {
    max-width: 100%;
    /* Take full width */
    font-size: 1.15rem;
  }

  .hero__actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .btn {
    width: 100%;
    /* Full width boxes as requested */
    max-width: 100%;
    justify-content: center;
  }

  .about {
    width: 100%;
    max-width: none;
    margin-top: var(--section-gap);
  }

  .about__header {
    flex-direction: column;
    gap: 8px;
  }

  .about__grid {
    gap: 20px;
    grid-template-columns: 1fr;
  }

  .about__text p {
    max-width: 100%;
    /* Fill the length */
    width: 100%;
  }

  .about__highlights {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .about__highlights li {
    width: 100%;
  }

  .profile-card {
    width: 100%;
  }

  #skills {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin-top: var(--section-gap);
  }

  .skills__header {
    flex-direction: column;
    gap: 8px;
  }

  .skills__controls {
    width: 100%;
    display: flex;
  }

  .skills__filter {
    flex: 1 1 auto;
    text-align: center;
  }

  #skills .skills__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .skill-card {
    width: 100%;
    padding: 16px;
    box-sizing: border-box;
  }

  .projects__inner {
    padding-block: clamp(22px, 5vw, 32px);
  }

  .projects__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .project-card,
  .project-card--featured {
    width: 100% !important;
    grid-column: span 1;
    box-sizing: border-box;
  }

  .skill-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .skill-row__value {
    justify-self: flex-end;
  }
}

@media (max-width: 680px) {
  /* Unified with 768px query */
}

@media (prefers-reduced-motion: reduce) {
  .nav__brand-letter {
    transition: none;
    animation: none;
  }

  .hero,
  .hero__content,
  .hero__visual,
  .blob,
  .sparkle,
  .card,
  .scroll-dot::after {
    animation: none;
  }

  .accent-underline::after {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .profile-card,
  .about__grid,
  .about__highlights li {
    transition: none;
  }

  .profile-card:hover {
    transform: none;
  }

  .profile-card__status-dot {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .project-card,
  .projects__filter,
  .btn-link {
    transition: none;
  }
}

/* Page demo sections */
.page {
  padding-top: 84px;
  /* space for fixed nav */
}

.page__section {
  min-height: 70vh;
  padding: 48px 0;
  width: 100%;
  max-width: none;
  margin: 32px 0 0;
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  color: var(--muted);
  border-bottom: none;
}

/* Skills section */
#skills {
  width: 100%;
  margin: var(--section-gap) 0 0;
  padding: 0;
  display: block;
}

.skills .container {
  display: grid;
  gap: 26px;
}

.skills__header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.skills__eyebrow {
  margin: 0;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--control-bg);
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.skills__title {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
}

.skills__subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 1.22rem;
}

.skills__controls {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--control-bg);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  width: fit-content;
}

.skills__filter {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  padding: 10px 14px;
  font-size: 1.12rem;
  font-family: inherit;
  /* keep Lato */
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 180ms ease, transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.skills__filter:hover,
.skills__filter:focus-visible {
  background: var(--hover-bg);
  transform: translateY(-1px);
  outline: none;
}

.skills__filter:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

.skills__filter.is-active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(168, 85, 247, 0.12));
  border-color: rgba(14, 165, 233, 0.28);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.skill-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 16px 14px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.skill-card.is-hidden {
  display: none;
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.16);
  border-color: rgba(14, 165, 233, 0.2);
}

.skill-card__heading {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 2px 0;
}

.skill-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(14, 165, 233, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  border: 1px solid rgba(14, 165, 233, 0.25);
}

.skill-card__icon svg {
  width: 36px;
  height: 36px;
  display: block;
}

.skill-card__title {
  margin: 0;
  font-size: 1.22rem;
}

.skill-card__meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.6vw, 1.08rem);
  line-height: 1.4;
}

.skill-card__list {
  display: grid;
  gap: 10px;
}

.skill-card h3,
.skill-card p {
  margin: 0;
  overflow-wrap: break-word;
}

.skill-card h3,
.skill-card p {
  margin: 0;
}

.skill-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  background: var(--control-bg);
  border: 1px solid var(--border);
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.skill-row:hover,
.skill-row:focus-within {
  border-color: rgba(14, 165, 233, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1);
}

.skill-row__label {
  font-weight: 700;
  color: var(--text);
  font-size: 1.06rem;
}

.skill-row__bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.08);
  overflow: hidden;
}

.skill-row__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.9), rgba(168, 85, 247, 0.9));
  transition: width 700ms ease;
  transform-origin: left;
}

.skill-row__value {
  font-weight: 800;
  color: var(--text);
  font-size: 1.04rem;
}

.skills__legend {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.skills__legend::before {
  content: "* ";
}

/* Projects section */
#projects {
  width: 100%;
  margin: var(--section-gap) 0 0;
  padding: 0;
  background: transparent;
}

.projects__inner {
  padding-block: clamp(28px, 4vw, 42px) clamp(32px, 4vw, 48px);
  display: grid;
  gap: 20px;
}

.projects__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.projects__title {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
}

.projects__subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 1.22rem;
}

.projects__filters {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.projects__filter {
  border: 1px solid var(--border);
  background: var(--control-bg);
  color: var(--text);
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.projects__filter:hover,
.projects__filter:focus-visible {
  background: var(--hover-bg);
  border-color: rgba(14, 165, 233, 0.4);
  transform: translateY(-1px);
  outline: none;
}

.projects__filter.is-active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(168, 85, 247, 0.12));
  border-color: rgba(14, 165, 233, 0.28);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  min-width: 0;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  border-color: rgba(14, 165, 233, 0.24);
}

.project-card--featured {
  grid-column: span 1;
  /* make featured same width as others */
}

.project-card__preview {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  /* 16:9 keeps screenshots closer to native aspect, reducing scaling blur */
  overflow: hidden;
  background: radial-gradient(circle at 30% 30%, rgba(14, 165, 233, 0.16), rgba(168, 85, 247, 0.12));
}

.project-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: none;
}

.project-card__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
}

.project-card__body {
  display: grid;
  gap: 12px;
  padding: 16px 16px 18px;
}

.project-card__header {
  display: grid;
  gap: 6px;
}

.project-card__title {
  margin: 0;
  font-size: 1.18rem;
}

.project-card__desc {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-tag {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
}

.project-card__features {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-size: 0.98rem;
}

.project-card__features li {
  margin: 0;
}

.project-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--control-bg);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
  width: fit-content;
}

.btn-link:hover,
.btn-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  outline: none;
}

.btn-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-link__icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.btn-link__icon img {
  width: 20px;
  height: 20px;
  display: block;
  filter: invert(66%) sepia(54%) saturate(610%) hue-rotate(175deg) brightness(97%) contrast(96%);
  /* same light blue tint as hero social icons */
}

/* Projects responsive overrides (placed after base rules for proper cascade) */
@media (max-width: 1024px) {
  .projects__grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

/* Contact section */
#contact {
  width: 100%;
  margin: var(--section-gap) 0 0;
  padding: 0;
}

.contact__header {
  margin-bottom: 18px;
}

.contact__eyebrow {
  margin: 0 0 6px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.84rem;
  color: var(--accent);
}

.contact__title {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
}

.contact__subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 1.18rem;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.contact__left {
  display: grid;
  gap: 14px;
}

.contact__lead {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.16rem);
  line-height: 1.6;
}

.contact__cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 50%;
}

.contact__list {
  display: grid;
  gap: 42px;
}

.contact__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.contact__icon {
  width: 28px;
  height: 28px;
  display: block;
  filter: invert(66%) sepia(54%) saturate(610%) hue-rotate(175deg) brightness(97%) contrast(96%);
  /* match hero icon tint */
}

.contact__item-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contact__item-body {
  display: grid;
  gap: 6px;
}

.contact__item-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--muted);
}

.contact__item-value {
  font-weight: 800;
  color: var(--text);
  font-size: 1.14rem;
  text-decoration: none;
}

.contact__item-value:hover,
.contact__item-value:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}



.contact-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
  cursor: default;
}

.contact-card:hover,
.contact-card:focus-visible {
  transform: none;
  box-shadow: var(--shadow);
  border-color: var(--border);
  outline: none;
}

.contact-card__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.contact-card__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.contact-card__label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
}

.contact-card__value {
  color: var(--muted);
  font-size: 0.86rem;
}

.contact__right {
  position: relative;
}

.contact-form {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: clamp(16px, 3vw, 22px);
  overflow: hidden;
}

.contact-form::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(14, 165, 233, 0.35), rgba(168, 85, 247, 0.28));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}

.contact-form__fields {
  display: grid;
  gap: 12px;
}

.contact__field {
  display: grid;
  gap: 6px;
}

.contact__field label {
  font-weight: 700;
  font-size: 1.12rem;
}

.contact__field input,
.contact__field textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--control-bg);
  color: var(--text);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.contact__field input:focus-visible,
.contact__field textarea:focus-visible {
  outline: none;
  border-color: rgba(14, 165, 233, 0.6);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.field__hint {
  color: var(--muted);
  font-weight: 600;
}

.field__error {
  margin: 0;
  color: #ef4444;
  font-size: 0.92rem;
  min-height: 1.1em;
}

.contact-form__actions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.contact__submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #38bdf8;
  color: #0b1220;
  font-family: "Lato", "Segoe UI", "Helvetica Neue", "Trebuchet MS", sans-serif;
  font-weight: 800;
  font-size: 1.22rem;
  cursor: pointer;
  overflow: hidden;
  transition: transform 140ms ease, box-shadow 180ms ease, filter 160ms ease;
  width: fit-content;
  align-self: flex-start;
}

.contact__submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.28);
}

.contact__submit:active:not(:disabled) {
  transform: translateY(0);
  filter: brightness(0.98);
}

.contact__submit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.contact__submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.contact__submit-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.25), transparent 40%);
  opacity: 0;
  transition: opacity 160ms ease;
}

.contact__submit:hover .contact__submit-glow {
  opacity: 1;
}

.contact__submit.is-loading .contact__submit-label::after {
  content: "Sending...";
  margin-left: 6px;
}

.contact__success {
  margin: 0;
  color: #16a34a;
  font-weight: 700;
  min-height: 1.2em;
}

@media (max-width: 1024px) {
  .contact__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .contact__cards {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .projects__grid {
    grid-template-columns: 1fr;
  }

  .project-card--featured {
    grid-column: span 1;
  }
}

/* Footer */
#footer {
  width: 100%;
  margin-top: var(--section-gap);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.08));
  color: var(--text);
  border-top: 1px solid var(--border);
}

.site-footer .container {
  padding-left: calc(var(--page-pad) + 20px);
  padding-right: calc(var(--page-pad) + 20px);
}

.footer__inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding: clamp(24px, 4vw, 36px) 0;
}

.footer__brand {
  display: grid;
  gap: 8px;
}

.footer__logo {
  margin: 0;
  font-weight: 800;
  font-size: 1.32rem;
}

.footer__tagline {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.footer__nav {
  display: grid;
  gap: 8px;
}

.footer__heading {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1rem;
  color: var(--muted);
}

.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.footer__links a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.12rem;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.footer__links a:hover,
.footer__links a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.footer__cta {
  display: grid;
  gap: 10px;
}

.footer__cta-text {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.footer__top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--control-bg);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 160ms ease, border-color 160ms ease;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.footer__top:hover,
.footer__top:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.footer__bar {
  border-top: 1px solid var(--border);
  padding: 10px 0;
  background: rgba(15, 23, 42, 0.03);
}

.footer__bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 1.05rem;
  color: var(--muted);
}

.footer__copy,
.footer__note {
  margin: 0;
}

@media (max-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer__bar-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}