:root {
  color-scheme: light;
  --paper: #f6f3ed;
  --paper-soft: #ebe6dc;
  --ink: #111312;
  --muted: #646862;
  --line: rgba(17, 19, 18, 0.14);
  --line-strong: rgba(17, 19, 18, 0.28);
  --surface: rgba(246, 243, 237, 0.78);
  --surface-solid: #fbfaf6;
  --accent: #c94e2f;
  --accent-2: #0e6f55;
  --shadow: 0 24px 70px rgba(34, 31, 24, 0.14);
  --header: rgba(246, 243, 237, 0.72);
  --canvas-line: #2c5f53;
  --canvas-accent: #c94e2f;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #101211;
  --paper-soft: #181b19;
  --ink: #f4f0e8;
  --muted: #aaa79f;
  --line: rgba(244, 240, 232, 0.14);
  --line-strong: rgba(244, 240, 232, 0.26);
  --surface: rgba(16, 18, 17, 0.74);
  --surface-solid: #151816;
  --accent: #e05e3d;
  --accent-2: #65c7a7;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
  --header: rgba(16, 18, 17, 0.72);
  --canvas-line: #6ec0a6;
  --canvas-accent: #e05e3d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--accent) color-mix(in srgb, var(--paper) 82%, var(--ink));
  scrollbar-width: thin;
}

section[id] {
  scroll-margin-top: 132px;
}

::-webkit-scrollbar {
  width: 14px;
}

::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--paper) 86%, var(--ink));
  border-left: 1px solid var(--line);
}

::-webkit-scrollbar-thumb {
  border: 4px solid color-mix(in srgb, var(--paper) 86%, var(--ink));
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-2);
}

::-webkit-scrollbar-button {
  height: 0;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Aptos, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, var(--paper) 0 30%, rgba(246, 243, 237, 0.72) 56%, var(--paper) 100%),
    url("assets/antonio-portrait.jpeg") right center / min(58vw, 760px) auto no-repeat;
  filter: grayscale(1) contrast(1.05) brightness(1.1);
  opacity: 0.2;
  mix-blend-mode: multiply;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.26), transparent 72%);
}

:root[data-theme="dark"] body::before {
  background:
    linear-gradient(90deg, var(--paper) 0 28%, rgba(16, 18, 17, 0.66) 56%, var(--paper) 100%),
    url("assets/antonio-portrait.jpeg") right center / min(58vw, 760px) auto no-repeat;
  filter: grayscale(1) contrast(1.14) brightness(1.42);
  opacity: 0.15;
  mix-blend-mode: screen;
}

body.is-cursor-ready,
body.is-cursor-ready a,
body.is-cursor-ready button {
  cursor: none;
}

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

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

[hidden] {
  display: none !important;
}

button {
  font: inherit;
}

#orbital-scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0);
  transition: opacity 180ms ease, width 180ms ease, height 180ms ease, border-color 180ms ease;
}

.cursor-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}

.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

body.is-cursor-ready .cursor-dot,
body.is-cursor-ready .cursor-ring {
  opacity: 1;
}

body.is-cursor-hover .cursor-ring {
  width: 48px;
  height: 48px;
  border-color: var(--accent);
}

.site-header {
  position: fixed;
  left: 50%;
  top: 18px;
  z-index: 20;
  display: grid;
  width: min(1120px, calc(100% - 40px));
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--header);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

.brand strong {
  font-size: 0.93rem;
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
  font-size: 0.72rem;
}

.main-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-solid) 56%, transparent);
}

.main-nav a {
  position: relative;
  z-index: 1;
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease;
}

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

.main-nav a.is-active {
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, white 28%, transparent),
    0 10px 28px color-mix(in srgb, var(--ink) 18%, transparent);
  animation: liquid-pop 420ms cubic-bezier(.2, .8, .2, 1);
}

@keyframes liquid-pop {
  0% {
    border-radius: 18px 28px 24px 32px;
    transform: scale(.94);
  }

  55% {
    border-radius: 32px 18px 30px 20px;
    transform: scale(1.06);
  }

  100% {
    border-radius: 999px;
    transform: scale(1);
  }
}

.theme-toggle {
  justify-self: end;
  position: relative;
  width: 58px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--ink);
}

.theme-toggle::before {
  position: absolute;
  left: 5px;
  top: 5px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: inset 0 0 0 4px color-mix(in srgb, white 18%, transparent);
  content: "";
  transition: transform 260ms cubic-bezier(.2, .8, .2, 1), background 180ms ease;
}

:root[data-theme="dark"] .theme-toggle::before {
  background: var(--accent-2);
  transform: translateX(22px);
}

.theme-toggle__sun,
.theme-toggle__moon {
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  transform: translateY(-50%);
}

.theme-toggle__sun {
  left: 14px;
  background: rgba(255, 255, 255, 0.85);
}

.theme-toggle__moon {
  right: 14px;
  border: 1px solid var(--muted);
}

.section-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding: 132px 0 88px;
}

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

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(3.6rem, 8vw, 6.2rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.1rem, 5vw, 4.3rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.16rem;
  line-height: 1.2;
}

.hero-text {
  max-width: 640px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.45vw, 1.25rem);
}

.hero-actions,
.tag-row,
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

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

.button.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.button.secondary {
  background: var(--surface);
}

.profile-board {
  position: relative;
  align-self: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  overflow: hidden;
}

.profile-board::before {
  position: absolute;
  inset: 0;
  border-left: 5px solid var(--accent);
  content: "";
  pointer-events: none;
}

.board-topline {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent-2) 14%, transparent);
}

.dxc-logo {
  width: min(240px, 72%);
  margin-bottom: 36px;
}

.profile-facts {
  display: grid;
  gap: 0;
  margin: 0;
}

.profile-facts div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.profile-facts dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-facts dd {
  margin: 0;
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 82px);
  align-items: start;
  padding: 104px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 720px;
  padding: 102px 0 34px;
}

.work-feature {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: start;
  padding: 26px 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.work-feature__media {
  display: grid;
  min-height: 180px;
  place-items: center;
  border-radius: 22px;
  background: var(--surface-solid);
  box-shadow: inset 0 0 0 1px var(--line);
}

.work-feature__media img {
  width: 132px;
}

.period {
  display: inline-flex;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.work-feature p,
.work-list,
.timeline p,
.stack-grid p,
.captcha-copy p,
.locked-state p {
  color: var(--muted);
}

.work-list {
  margin: 16px 0 0;
  padding-left: 18px;
}

.work-list li {
  margin: 8px 0;
}

.tag-row {
  margin-top: 18px;
}

.tag-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 106px;
  border: 1px solid var(--line);
  background: var(--line);
}

.stack-grid article {
  min-height: 260px;
  padding: 24px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
}

.stack-grid span {
  display: inline-block;
  margin-bottom: 72px;
  color: var(--accent);
  font-weight: 900;
}

.timeline {
  border-top: 1px solid var(--line-strong);
}

.timeline article {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}

.timeline span {
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.journey-section {
  padding-bottom: 106px;
  border-top: 1px solid var(--line);
}

.journey-board {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(260px, 0.9fr) minmax(420px, 1.4fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
  box-shadow: var(--shadow);
}

.journey-feature,
.journey-column {
  background: color-mix(in srgb, var(--paper) 90%, transparent);
}

.journey-feature {
  display: grid;
  align-content: start;
  min-height: 430px;
  padding: 28px;
}

.journey-feature span,
.journey-column span {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.journey-feature h3 {
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  letter-spacing: -0.035em;
}

.journey-feature p,
.journey-column p {
  margin: 0;
  color: var(--muted);
}

.journey-column {
  display: grid;
  align-content: start;
  gap: 0;
  padding: 26px;
}

.journey-column > h3 {
  margin-bottom: 22px;
  color: var(--ink);
  font-size: 1rem;
  text-transform: uppercase;
}

.journey-column article {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.journey-column strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.05rem;
  line-height: 1.25;
}

.cert-column article {
  padding: 14px 0;
}

.cert-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
}

.cert-column > h3 {
  grid-column: 1 / -1;
}

.contact-section {
  padding-bottom: 110px;
  border-top: 1px solid var(--line);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 20px;
}

.captcha-card,
.contact-card {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.captcha-card {
  display: grid;
  gap: 22px;
  align-content: start;
  padding: 26px;
}

.contact-turnstile {
  min-height: 65px;
}

.captcha-error {
  margin: -4px 0 0;
  color: var(--accent);
  font-weight: 800;
}

.contact-card {
  display: grid;
  place-items: center;
  padding: 26px;
}

.locked-state {
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.lock-icon {
  position: relative;
  width: 54px;
  height: 46px;
  border: 2px solid var(--line-strong);
  border-radius: 16px;
}

.lock-icon::before {
  position: absolute;
  left: 50%;
  top: -22px;
  width: 28px;
  height: 28px;
  border: 2px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  content: "";
  transform: translateX(-50%);
}

.contact-data {
  display: grid;
  width: 100%;
  gap: 12px;
}

.contact-line {
  display: grid;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.contact-line span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.contact-line strong {
  font-size: clamp(1.1rem, 2.5vw, 1.65rem);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.cv-dialog {
  width: min(440px, calc(100% - 28px));
  border: 0;
  border-radius: 28px;
  padding: 0;
  background: transparent;
  color: var(--ink);
}

.cv-dialog::backdrop {
  background: color-mix(in srgb, var(--paper) 44%, rgba(0, 0, 0, 0.38));
  backdrop-filter: blur(10px);
}

.cv-dialog__panel {
  position: relative;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}

.cv-dialog__panel h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 8vw, 3.4rem);
}

.cv-dialog__copy,
.cv-dialog__error {
  margin: 0;
  color: var(--muted);
}

.cv-dialog__error {
  color: var(--accent);
  font-weight: 800;
}

.cv-dialog__close {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.cv-dialog__close::before,
.cv-dialog__close::after {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  border-radius: 99px;
  background: var(--ink);
  content: "";
}

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

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

.cv-turnstile {
  min-height: 65px;
}

.cv-challenge {
  display: grid;
  gap: 8px;
  font-weight: 850;
}

.cv-challenge input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 0 14px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.social-links {
  grid-column: 1 / -1;
  margin-top: 8px;
}

.social-links a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 850;
}

.social-links img {
  width: 20px;
  height: 20px;
}

.social-links img[src*="github"] {
  filter: invert(1);
}

:root[data-theme="dark"] .social-links img[src*="github"] {
  filter: none;
}

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

.has-js .reveal {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(32px) scale(.985);
  transition: opacity 680ms ease, filter 680ms ease, transform 680ms cubic-bezier(.2, .8, .2, 1);
}

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

@media (max-width: 940px) {
  body::before {
    background:
      linear-gradient(180deg, rgba(246, 243, 237, 0.84), var(--paper) 58%),
      url("assets/antonio-portrait.jpeg") center top / 88vw auto no-repeat;
    opacity: 0.14;
  }

  :root[data-theme="dark"] body::before {
    background:
      linear-gradient(180deg, rgba(16, 18, 17, 0.74), var(--paper) 58%),
      url("assets/antonio-portrait.jpeg") center top / 88vw auto no-repeat;
    opacity: 0.12;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    overflow-x: auto;
  }

  .theme-toggle {
    grid-column: 2;
    grid-row: 1;
  }

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

  .hero {
    min-height: auto;
    padding-top: 154px;
  }

  .profile-board {
    max-width: 560px;
  }

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

  .journey-board {
    grid-template-columns: 1fr 1fr;
  }

  .journey-feature {
    grid-column: 1 / -1;
    min-height: 260px;
  }

  .cert-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .section-shell,
  .site-header {
    width: min(100% - 24px, 1120px);
  }

  .site-header {
    top: 12px;
    border-radius: 26px;
  }

  .brand small {
    display: none;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .main-nav a {
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .hero {
    padding-top: 148px;
    padding-bottom: 64px;
  }

  h1 {
    font-size: clamp(3rem, 17vw, 4.6rem);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .profile-board,
  .captcha-card,
  .contact-card {
    border-radius: 22px;
  }

  .profile-facts div,
  .work-feature,
  .timeline article {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .journey-board {
    grid-template-columns: 1fr;
  }

  .journey-feature,
  .journey-column {
    padding: 22px;
  }

  .journey-feature {
    min-height: 240px;
  }

  .work-feature__media {
    min-height: 132px;
  }

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

  .stack-grid article {
    min-height: auto;
  }

  .stack-grid span {
    margin-bottom: 42px;
  }
}

@media (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }

  body.is-cursor-ready,
  body.is-cursor-ready a,
  body.is-cursor-ready button {
    cursor: auto;
  }
}
body.is-cursor-ready .cv-dialog,
body.is-cursor-ready .cv-dialog * {
  cursor: none;
}

.cursor-dot,
.cursor-ring {
  z-index: 2147483647;
}
