:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-deep: #040b14;
  --surface: rgba(15, 29, 47, 0.76);
  --surface-solid: #0e1b2d;
  --surface-soft: #132238;
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(148, 163, 184, 0.28);
  --text: #f7fafc;
  --muted: #9dacbf;
  --blue: #5aa7ff;
  --blue-strong: #278bff;
  --emerald: #3de1b2;
  --violet: #a58cff;
  --danger: #ff8291;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --container: 1180px;
  --header-height: 78px;
  --font-sans: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "Fira Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 8%, rgba(39, 139, 255, 0.09), transparent 32rem),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

::selection {
  background: rgba(90, 167, 255, 0.35);
  color: var(--text);
}

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

button,
input,
textarea {
  font: inherit;
}

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

button {
  color: inherit;
}

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

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: 112px;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-140%);
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  transition: transform 180ms ease;
}

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

.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    backdrop-filter 220ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(4, 11, 20, 0.76);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  position: relative;
  z-index: 102;
  display: inline-flex;
  align-items: center;
  min-height: 52px;
}

.brand-logo {
  display: block;
  width: 82px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(15, 73, 160, 0.18));
  transition: transform 180ms ease;
}

.brand:hover .brand-logo {
  transform: translateY(-1px);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.main-nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  transition: color 180ms ease;
}

.main-nav a:not(.nav-cta)::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  content: "";
  transform: scaleX(0);
  background: var(--blue);
  transition: transform 180ms ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--text);
}

.main-nav a:hover::after,
.main-nav a.is-active::after {
  transform: scaleX(1);
}

.main-nav .nav-cta {
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
}

.main-nav .nav-cta:hover {
  border-color: rgba(90, 167, 255, 0.5);
  background: rgba(90, 167, 255, 0.08);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  margin: 5px auto;
  background: var(--text);
  transition: transform 180ms ease;
}

.hero {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: calc(var(--header-height) + 86px);
  padding-bottom: 46px;
  isolation: isolate;
}

.hero::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  content: "";
  mask-image: linear-gradient(to bottom, black 5%, transparent 88%);
}

.hero-glow {
  position: absolute;
  z-index: -1;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.16;
  pointer-events: none;
}

.hero-glow-one {
  top: 16%;
  right: -140px;
  background: var(--blue);
}

.hero-glow-two {
  bottom: 8%;
  left: -180px;
  background: var(--emerald);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(420px, 0.96fr);
  gap: 76px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: #bfd0e6;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 5px rgba(61, 225, 178, 0.1);
}

.status-dot::after {
  position: absolute;
  inset: -5px;
  border: 1px solid var(--emerald);
  border-radius: inherit;
  content: "";
  animation: status-pulse 2s ease-out infinite;
}

@keyframes status-pulse {
  0% {
    transform: scale(0.7);
    opacity: 0.7;
  }
  80%,
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

.hero h1 {
  max-width: 740px;
  margin: 0;
  font-size: clamp(3.35rem, 6.8vw, 6.25rem);
  font-weight: 780;
  line-height: 0.98;
  letter-spacing: -0.075em;
}

.hero h1 span {
  display: block;
  margin-top: 10px;
  background: linear-gradient(110deg, #a8cdf9 0%, var(--blue) 43%, var(--emerald) 100%);
  background-clip: text;
  color: transparent;
  font-size: 0.7em;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.hero-description {
  max-width: 620px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 750;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:focus-visible,
.filter-button:focus-visible,
.menu-toggle:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.button-primary {
  background: var(--blue-strong);
  box-shadow: 0 12px 34px rgba(39, 139, 255, 0.24);
  color: white;
}

.button-primary:hover {
  box-shadow: 0 15px 38px rgba(39, 139, 255, 0.34);
}

.button-secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
}

.button-secondary:hover {
  border-color: rgba(90, 167, 255, 0.48);
  background: rgba(90, 167, 255, 0.07);
}

.hero-stats {
  display: flex;
  gap: 0;
  margin: 54px 0 0;
  padding: 0;
  list-style: none;
}

.hero-stats li {
  display: grid;
  min-width: 130px;
  gap: 2px;
  padding-right: 28px;
}

.hero-stats li + li {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.hero-stats strong {
  font-size: 0.93rem;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.76rem;
}

.hero-visual {
  position: relative;
}

.code-window {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.23);
  border-radius: var(--radius-lg);
  background: rgba(7, 17, 31, 0.74);
  box-shadow:
    var(--shadow),
    inset 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
  transition: transform 350ms ease;
}

.hero-visual:hover .code-window {
  transform: perspective(1200px) rotateY(0) rotateX(0) translateY(-4px);
}

.window-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6777;
}

.window-dots span:nth-child(2) {
  background: #ffc65b;
}

.window-dots span:nth-child(3) {
  background: #4bd79b;
}

.window-action {
  justify-self: end;
}

.code-body {
  display: grid;
  min-height: 330px;
  align-content: center;
  padding: 38px;
  color: #cad7e8;
  font-family: var(--font-mono);
  font-size: clamp(0.76rem, 1.16vw, 0.9rem);
  line-height: 2;
}

.code-indent {
  padding-left: 24px;
}

.code-indent-2 {
  padding-left: 48px;
}

.code-purple {
  color: #c9a8ff;
}

.code-blue {
  color: #75b8ff;
}

.code-green {
  color: #62e9bd;
}

.code-comment {
  margin-top: 14px;
  color: #60728a;
}

.terminal-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  border-top: 1px solid var(--line);
  background: rgba(3, 8, 15, 0.72);
  color: #91a4bb;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.terminal-prompt {
  color: var(--emerald);
}

.terminal-cursor {
  width: 7px;
  height: 13px;
  background: var(--blue);
  animation: blink 1s step-end infinite;
}

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

.tech-strip {
  display: flex;
  justify-content: space-between;
  margin-top: 72px;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
  color: #64758b;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about {
  background: rgba(255, 255, 255, 0.015);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 60px;
  align-items: end;
  margin-bottom: 60px;
}

.section-kicker {
  margin: 0 0 16px;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading h2,
.contact-copy h2 {
  margin: 0;
  font-size: clamp(2.35rem, 4.4vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.section-heading > p,
.contact-copy > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 18px;
}

.glass-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(19, 34, 56, 0.68), rgba(10, 20, 34, 0.65));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.about-story {
  position: relative;
  display: flex;
  min-height: 510px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 5vw, 58px);
  overflow: hidden;
}

.about-story::after {
  position: absolute;
  right: -100px;
  bottom: -100px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(90, 167, 255, 0.13);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px rgba(90, 167, 255, 0.025),
    0 0 0 68px rgba(90, 167, 255, 0.02);
  content: "";
}

.about-story h3 {
  max-width: 440px;
  margin: 0 0 24px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.about-story p {
  position: relative;
  z-index: 1;
  max-width: 580px;
  margin: 0 0 18px;
  color: var(--muted);
}

.principles {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.principles span,
.tech-badge {
  padding: 6px 10px;
  border: 1px solid rgba(90, 167, 255, 0.18);
  border-radius: 999px;
  background: rgba(90, 167, 255, 0.065);
  color: #bcd8f7;
  font-family: var(--font-mono);
  font-size: 0.64rem;
}

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

.skill-card {
  position: relative;
  min-height: 158px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(14, 27, 45, 0.58);
  transition:
    transform 200ms ease,
    border-color 200ms ease,
    background 200ms ease;
}

.skill-card:hover {
  transform: translateY(-3px);
  border-color: rgba(90, 167, 255, 0.32);
  background: rgba(19, 34, 56, 0.74);
}

.skill-icon {
  display: grid;
  width: 36px;
  height: 36px;
  margin-bottom: 22px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.skill-card h3 {
  margin: 0 0 8px;
  font-size: 0.94rem;
}

.skill-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.65;
}

.skill-card:last-child {
  grid-column: 1 / -1;
}

.projects {
  overflow: hidden;
}

.project-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

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

.filter-button {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 650;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.filter-button:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.filter-button.is-active {
  border-color: rgba(90, 167, 255, 0.35);
  background: rgba(90, 167, 255, 0.1);
  color: var(--blue);
}

.project-count {
  flex: 0 0 auto;
  color: #65768d;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

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

.project-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(14, 27, 45, 0.58);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.project-card[hidden] {
  display: none !important;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(90, 167, 255, 0.3);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.24);
}

.project-card.is-hiding {
  animation: card-out 160ms ease forwards;
}

@keyframes card-out {
  to {
    transform: scale(0.97);
    opacity: 0;
  }
}

.project-visual {
  position: relative;
  min-height: 285px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 76% 10%, var(--visual-accent-soft), transparent 48%),
    linear-gradient(145deg, #101f34, #091422);
}

.project-visual::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 30px 30px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent);
  pointer-events: none;
}

.project-preview {
  position: absolute;
  z-index: 1;
  top: 22px;
  right: 20px;
  bottom: -1px;
  left: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px 13px 0 0;
  background: #07111f;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.38);
  transition:
    transform 280ms ease,
    box-shadow 280ms ease;
}

.project-preview-bar {
  display: grid;
  height: 32px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-inline: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(6, 16, 29, 0.98);
}

.project-preview-dots {
  display: flex;
  gap: 5px;
}

.project-preview-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #728299;
}

.project-preview-domain {
  color: #8293aa;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.02em;
}

.project-preview-image {
  width: 100%;
  height: calc(100% - 32px);
  object-fit: cover;
  object-position: top center;
  transition:
    transform 420ms cubic-bezier(0.2, 0.65, 0.3, 1),
    filter 240ms ease;
}

.project-preview-image.is-contained {
  object-fit: contain;
  object-position: center;
  background:
    radial-gradient(circle at 50% 25%, rgba(50, 121, 230, 0.14), transparent 48%),
    #101318;
}

.project-card:hover .project-preview {
  transform: translateY(-3px);
  box-shadow: 0 29px 58px rgba(0, 0, 0, 0.45);
}

.project-card:hover .project-preview-image {
  transform: scale(1.015);
  filter: saturate(1.04);
}

.visual-browser,
.visual-phone,
.visual-dashboard {
  position: absolute;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.38);
  transition: transform 320ms ease;
}

.project-card:hover .visual-browser,
.project-card:hover .visual-dashboard {
  transform: translate(-50%, -50%) rotate(-1deg) scale(1.025);
}

.project-card:hover .visual-phone {
  transform: translate(-50%, -50%) rotate(2deg) scale(1.035);
}

.visual-browser {
  top: 54%;
  left: 50%;
  width: 78%;
  height: 68%;
  transform: translate(-50%, -50%) rotate(-2deg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #f7f9fc;
}

.mock-browser-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  padding: 0 8px;
  border-bottom: 1px solid #dfe6ef;
  border-radius: 10px 10px 0 0;
  background: #eef2f6;
}

.mock-browser-bar span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #9daaba;
}

.mock-web-layout {
  display: grid;
  height: calc(100% - 18px);
  grid-template-columns: 36% 64%;
  overflow: hidden;
}

.mock-web-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px;
  background: #f9fbfd;
}

.mock-line {
  height: 5px;
  margin-bottom: 7px;
  border-radius: 3px;
  background: #cbd5e1;
}

.mock-line.is-title {
  width: 78%;
  height: 12px;
  background: #1d2c3f;
}

.mock-line.is-short {
  width: 58%;
}

.mock-button {
  width: 50%;
  height: 14px;
  margin-top: 7px;
  border-radius: 3px;
  background: var(--visual-accent);
}

.mock-web-image {
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, var(--visual-accent), #17263a 78%);
}

.mock-web-image::before,
.mock-web-image::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.mock-web-image::before {
  width: 130px;
  height: 130px;
  right: -35px;
  bottom: -30px;
  border: 18px solid rgba(255, 255, 255, 0.22);
}

.mock-web-image::after {
  width: 50px;
  height: 50px;
  top: 25px;
  left: 25px;
  background: rgba(255, 255, 255, 0.2);
}

.visual-dashboard {
  top: 54%;
  left: 50%;
  display: grid;
  width: 80%;
  height: 70%;
  grid-template-columns: 25% 75%;
  transform: translate(-50%, -50%) rotate(-2deg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #f7f9fc;
}

.mock-sidebar {
  padding: 13px 9px;
  background: #121e2e;
}

.mock-logo {
  width: 28px;
  height: 7px;
  margin-bottom: 22px;
  border-radius: 4px;
  background: var(--visual-accent);
}

.mock-nav-line {
  width: 100%;
  height: 5px;
  margin-bottom: 11px;
  border-radius: 3px;
  background: #304157;
}

.mock-nav-line:first-of-type {
  background: #e5edf7;
}

.mock-dashboard-main {
  padding: 15px;
}

.mock-dashboard-title {
  width: 35%;
  height: 9px;
  margin-bottom: 15px;
  border-radius: 4px;
  background: #26374c;
}

.mock-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.mock-metric {
  height: 36px;
  border: 1px solid #e3e8ef;
  border-radius: 5px;
  background: white;
}

.mock-chart {
  position: relative;
  height: 70px;
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid #e3e8ef;
  border-radius: 5px;
  background:
    linear-gradient(to right, transparent 24%, #edf0f4 25%, transparent 26%, transparent 49%, #edf0f4 50%, transparent 51%, transparent 74%, #edf0f4 75%, transparent 76%),
    linear-gradient(to bottom, transparent 32%, #edf0f4 33%, transparent 34%, transparent 65%, #edf0f4 66%, transparent 67%);
}

.mock-chart::after {
  position: absolute;
  inset: 42% 8% auto;
  height: 2px;
  content: "";
  transform: skewY(-10deg);
  background: var(--visual-accent);
  box-shadow: 22px 8px 0 var(--visual-accent), 47px -6px 0 var(--visual-accent);
}

.visual-phone {
  top: 52%;
  left: 50%;
  width: 122px;
  height: 218px;
  padding: 6px;
  transform: translate(-50%, -50%) rotate(-2deg);
  border: 2px solid #2c3a4b;
  border-radius: 24px;
  background: #050a11;
}

.mock-phone-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(170deg, #f8fbff 0%, #edf3fa 100%);
}

.mock-phone-notch {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  width: 44px;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 0 0 8px 8px;
  background: #050a11;
}

.mock-phone-hero {
  height: 42%;
  background:
    radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.28), transparent 22%),
    linear-gradient(145deg, var(--visual-accent), #20324a);
}

.mock-phone-content {
  padding: 12px;
}

.mock-phone-card {
  height: 38px;
  margin-top: 8px;
  border-radius: 7px;
  background: white;
  box-shadow: 0 5px 12px rgba(31, 50, 73, 0.08);
}

.project-content {
  display: flex;
  flex-direction: column;
  padding: 28px;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.project-category {
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-content h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.project-content > p {
  min-height: 52px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
  text-wrap: pretty;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}

.project-tech .tech-badge {
  padding: 5px 9px;
  font-size: 0.61rem;
}

.project-links {
  display: flex;
  gap: 18px;
  margin-top: auto;
  padding-top: 20px;
  transform: translateY(4px);
  border-top: 1px solid var(--line);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #d5dfec;
  font-size: 0.76rem;
  font-weight: 700;
  transition: color 180ms ease;
}

.project-link:hover {
  color: var(--blue);
}

.empty-state {
  padding: 40px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  text-align: center;
}

.contact {
  padding-top: 64px;
}

.contact-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(430px, 1.1fr);
  gap: 70px;
  overflow: hidden;
  padding: clamp(34px, 6vw, 72px);
  border: 1px solid rgba(90, 167, 255, 0.22);
  border-radius: 32px;
  background:
    radial-gradient(circle at 10% 10%, rgba(90, 167, 255, 0.12), transparent 35%),
    linear-gradient(145deg, rgba(17, 33, 54, 0.96), rgba(8, 18, 31, 0.95));
  box-shadow: var(--shadow);
}

.contact-panel::before {
  position: absolute;
  top: -180px;
  right: -180px;
  width: 460px;
  height: 460px;
  border: 1px solid rgba(61, 225, 178, 0.1);
  border-radius: 50%;
  content: "";
  box-shadow:
    0 0 0 54px rgba(61, 225, 178, 0.018),
    0 0 0 108px rgba(61, 225, 178, 0.012);
}

.contact-copy,
.contact-form {
  position: relative;
  z-index: 1;
}

.contact-copy h2 span {
  color: var(--blue);
}

.contact-copy > p {
  max-width: 500px;
  margin-top: 24px;
}

.contact-links {
  display: grid;
  gap: 6px;
  margin-top: 38px;
}

.contact-links a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  margin-inline: -12px;
  padding: 11px 12px;
  border-radius: 14px;
  transition:
    background-color 200ms ease,
    transform 200ms ease;
}

.contact-links a:hover {
  background: rgba(91, 168, 255, 0.055);
  transform: translateX(2px);
}

.contact-links a:active {
  transform: translateX(2px) scale(0.99);
}

.contact-links a.is-disabled {
  opacity: 0.5;
}

.contact-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(102, 169, 255, 0.3);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.11), rgba(59, 130, 246, 0.035));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 8px 22px rgba(0, 34, 75, 0.12);
  color: var(--blue);
  transition:
    border-color 200ms ease,
    background-color 200ms ease,
    transform 200ms ease;
}

.contact-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-links a:hover .contact-icon {
  border-color: rgba(102, 169, 255, 0.54);
  background: rgba(59, 130, 246, 0.12);
  transform: translateY(-1px);
}

.contact-links small,
.contact-links strong {
  display: block;
}

.contact-links small {
  color: var(--muted);
  font-size: 0.65rem;
}

.contact-links strong {
  margin-top: 1px;
  font-size: 0.82rem;
}

.link-arrow {
  color: #61738a;
  transition:
    transform 180ms ease,
    color 180ms ease;
}

.contact-links a:hover .link-arrow {
  transform: translate(2px, -2px);
  color: var(--blue);
}

.contact-form {
  display: grid;
  gap: 18px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(4, 11, 20, 0.46);
  backdrop-filter: blur(14px);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

.contact-form label > span {
  color: #c7d3e2;
  font-size: 0.72rem;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.contact-form input {
  height: 48px;
  padding: 0 14px;
}

.contact-form textarea {
  min-height: 142px;
  padding: 13px 14px;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #60728a;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(90, 167, 255, 0.55);
  background: rgba(90, 167, 255, 0.045);
  box-shadow: 0 0 0 3px rgba(90, 167, 255, 0.08);
}

.contact-form .is-invalid {
  border-color: var(--danger);
}

.form-submit {
  width: 100%;
  margin-top: 2px;
}

.form-note {
  margin: -6px 0 0;
  color: #65768d;
  font-size: 0.68rem;
  text-align: center;
}

.site-footer {
  padding: 28px 0 42px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.footer-inner p,
.back-to-top {
  color: #6c7e94;
  font-size: 0.72rem;
}

.back-to-top {
  display: inline-flex;
  gap: 8px;
  transition: color 180ms ease;
}

.back-to-top:hover {
  color: var(--text);
}

.toast {
  position: fixed;
  z-index: 150;
  right: 20px;
  bottom: 20px;
  max-width: min(380px, calc(100vw - 40px));
  padding: 13px 16px;
  transform: translateY(24px);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #152338;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  color: #d9e5f3;
  font-size: 0.78rem;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 200ms ease,
    transform 200ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.reveal {
  transform: translateY(20px);
  opacity: 0;
  transition:
    opacity 650ms cubic-bezier(0.2, 0.65, 0.3, 1),
    transform 650ms cubic-bezier(0.2, 0.65, 0.3, 1);
}

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

@media (max-width: 1020px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 74px;
  }

  .hero-copy {
    max-width: 800px;
  }

  .hero-visual {
    width: min(100%, 620px);
    margin-inline: auto;
  }

  .hero h1 {
    max-width: 800px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .section-heading > p {
    max-width: 630px;
  }

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

  .about-story {
    min-height: 420px;
  }

  .contact-panel {
    gap: 48px;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 68px;
  }

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

  .section {
    padding-block: 82px;
  }

  .menu-toggle {
    position: relative;
    z-index: 102;
    display: block;
  }

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

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

  .main-nav {
    position: absolute;
    z-index: 101;
    inset: 0 0 auto;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 26px;
    padding: 86px 32px 40px;
    transform: translateY(-100%);
    background: rgba(4, 11, 20, 0.98);
    opacity: 0;
    pointer-events: none;
    transition:
      transform 260ms ease,
      opacity 220ms ease;
  }

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

  .main-nav a {
    font-size: 1.5rem;
  }

  .main-nav .nav-cta {
    margin-top: 8px;
    padding: 10px 18px;
    font-size: 1rem;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + 72px);
  }

  .hero-grid {
    gap: 58px;
  }

  .hero h1 {
    font-size: clamp(3rem, 14vw, 4.7rem);
  }

  .hero-description {
    margin-top: 24px;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 42px;
  }

  .hero-stats li {
    min-width: 0;
    padding-right: 12px;
  }

  .hero-stats li + li {
    padding-left: 12px;
  }

  .hero-stats span {
    font-size: 0.68rem;
  }

  .code-window {
    transform: none;
  }

  .code-body {
    min-height: 280px;
    padding: 28px 22px;
    font-size: 0.72rem;
  }

  .tech-strip {
    gap: 24px;
    justify-content: flex-start;
    overflow: hidden;
    white-space: nowrap;
  }

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

  .project-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-visual {
    min-height: 250px;
  }

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

@media (max-width: 540px) {
  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hero-stats li,
  .hero-stats li + li {
    padding: 0 0 14px;
    border-bottom: 1px solid var(--line);
    border-left: 0;
  }

  .hero-stats li:last-child {
    border-bottom: 0;
  }

  .window-title {
    display: none;
  }

  .window-bar {
    grid-template-columns: 1fr auto;
  }

  .project-preview {
    top: 16px;
    right: 14px;
    left: 14px;
  }

  .project-content {
    padding: 24px 20px 26px;
  }

  .project-content h3 {
    font-size: 1.2rem;
  }

  .project-content > p {
    min-height: 0;
    font-size: 0.82rem;
  }

  .project-tech {
    gap: 6px;
    margin-top: 18px;
  }

  .project-tech .tech-badge {
    padding: 5px 8px;
    font-size: 0.58rem;
  }

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

  .skill-card:last-child {
    grid-column: auto;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-panel {
    padding: 30px 20px;
    border-radius: 24px;
  }

  .contact-form {
    padding: 22px 16px;
  }

  .contact-links strong {
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .reveal {
    transform: none;
    opacity: 1;
  }
}

/* Performance V6 — misma experiencia visual, menos trabajo fuera de pantalla. */
.footer-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-entry {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: #52647a;
  cursor: pointer;
  font-size: 0.68rem;
  transition: color 180ms ease;
}

.admin-entry svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.admin-entry:hover,
.admin-entry:focus-visible {
  color: #9dacbf;
}

.admin-entry[aria-busy="true"] {
  cursor: progress;
}

/* Evita layout/paint de secciones lejanas hasta que se acercan al viewport. */
.about {
  content-visibility: auto;
  contain-intrinsic-size: auto 850px;
}

.projects {
  content-visibility: auto;
  contain-intrinsic-size: auto 1750px;
}

.contact {
  content-visibility: auto;
  contain-intrinsic-size: auto 820px;
}

.site-footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 150px;
}

/* El delay de las animaciones reveal se mantiene en CSS, sin timers JS por tarjeta. */
.reveal {
  transition-delay: var(--reveal-delay, 0ms);
}

/* Picture conserva exactamente el mismo marco/alto que tenía el <img> directo. */
.project-preview picture {
  display: block;
  width: 100%;
  height: calc(100% - 32px);
}

.project-preview picture .project-preview-image {
  height: 100%;
}

button,
a {
  touch-action: manipulation;
}

@media (max-width: 760px) {
  .footer-actions {
    width: 100%;
    justify-content: space-between;
  }
}
