/* Local Fonts - Zero external requests */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-400.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-500.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('fonts/manrope-latin.woff2') format('woff2');
}

:root {
  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --background: oklch(0.115 0.012 195);
  --foreground: oklch(0.94 0.012 190);
  --card: oklch(0.145 0.014 195);
  --card-foreground: var(--foreground);
  --primary: oklch(0.87 0.194 156);
  --primary-foreground: oklch(0.11 0.018 175);
  --secondary: oklch(0.2 0.018 195);
  --secondary-foreground: var(--foreground);
  --muted: oklch(0.18 0.014 195);
  --muted-foreground: oklch(0.66 0.023 195);
  --accent: oklch(0.78 0.145 210);
  --accent-foreground: var(--background);
  --border: oklch(0.27 0.024 195);
  --input: oklch(0.22 0.018 195);
  --ring: var(--primary);
  --destructive: oklch(0.64 0.2 25);
  --radius: 0.375rem;

  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--background);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--primary);
  --color-destructive: var(--destructive);
}

* {
  box-sizing: border-box;
  border-color: var(--border);
}

html {
  scroll-behavior: smooth;
  background: var(--background);
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  overflow-x: clip;
}

button,
input,
textarea {
  font: inherit;
}

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

button {
  color: inherit;
}

.site-shell {
  min-height: 100vh;
  overflow-x: clip;
}

.ambient-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 48%);
  mask-image: linear-gradient(to bottom, black, transparent 48%);
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 5vw, 5rem);
  background: color-mix(in oklab, var(--background) 86%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.brand {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.brand span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-contact {
  border: 1px solid var(--primary);
  padding: 0.65rem 0.9rem;
  color: var(--primary) !important;
}

.menu-toggle {
  display: none;
  border: 0;
  background: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: var(--foreground);
  transition: transform 0.25s ease, opacity 0.25s ease;
  border-radius: 2px;
}

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

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

main,
footer {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 100svh;
  max-width: 1440px;
  margin: auto;
  padding: 9rem clamp(1.25rem, 7vw, 7rem) 5rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(3rem, 7vw, 8rem);
  position: relative;
}

.eyebrow,
.section-index,
.project-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.08em;
}

.status-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 16px var(--primary);
  animation: pulse 2.5s infinite;
}

.hero h1 {
  margin: 1.3rem 0 0.3rem;
  font-size: clamp(4.2rem, 10vw, 8.5rem);
  line-height: 0.9;
  font-weight: 750;
  letter-spacing: -0.055em;
}

.hero-role {
  margin: 1rem 0;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2vw, 1.45rem);
}

.hero-role span {
  color: var(--primary);
}

.hero-description {
  max-width: 620px;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.75;
  color: var(--muted-foreground);
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  margin-top: 2.2rem;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0 1.35rem;
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.2s,
    background 0.2s,
    color 0.2s;
}

.button svg,
.project-details svg,
.social-links svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

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

.button-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.button-primary:hover {
  box-shadow: 0 8px 28px color-mix(in oklab, var(--primary) 22%, transparent);
}

.button-secondary {
  border-color: var(--border);
  background: color-mix(in oklab, var(--card) 70%, transparent);
}

.terminal {
  max-width: 520px;
  width: 100%;
  justify-self: end;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 92%, transparent);
  box-shadow: 24px 24px 0 color-mix(in oklab, var(--primary) 4%, transparent);
}

.terminal-bar {
  height: 45px;
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border);
}

.terminal-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.terminal-bar span:first-child {
  background: var(--primary);
}

.terminal-bar p {
  margin-left: auto;
  font: 0.65rem var(--font-mono);
  color: var(--muted-foreground);
}

.terminal-body {
  min-height: 350px;
  padding: 1.7rem;
  font: 0.82rem/1.8 var(--font-mono);
  color: var(--muted-foreground);
}

.terminal-body b {
  color: var(--primary);
}

.terminal-result,
.terminal-body pre {
  color: var(--foreground);
}

.terminal-body pre {
  padding-left: 1rem;
  border-left: 1px solid var(--primary);
  white-space: pre-wrap;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  vertical-align: middle;
  background: var(--primary);
  animation: blink 1s step-end infinite;
}

.scroll-cue {
  position: absolute;
  left: clamp(1.25rem, 7vw, 7rem);
  bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font: 0.62rem var(--font-mono);
  color: var(--muted-foreground);
  text-transform: uppercase;
}

.scroll-cue span {
  height: 40px;
  width: 1px;
  background: var(--primary);
}

.section {
  max-width: 1440px;
  margin: auto;
  padding: clamp(5rem, 10vw, 9rem) clamp(1.25rem, 7vw, 7rem);
}

.section-heading {
  display: grid;
  grid-template-columns: 0.5fr 1.25fr 1fr;
  gap: 2rem;
  align-items: end;
  margin-bottom: 4rem;
}

.section-heading h2,
.about-statement h2,
.contact-intro h2 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.section-heading>p:last-child,
.contact-intro>p {
  margin: 0;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
}

.skill-card {
  min-height: 430px;
  padding: 2rem;
  border-right: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 70%, transparent);
  position: relative;
  transition:
    background 0.3s,
    transform 0.3s;
}

.skill-card:last-child {
  border: 0;
}

.skill-card:hover {
  background: var(--card);
  transform: translateY(-4px);
}

.skill-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  color: var(--primary);
  font: 0.8rem var(--font-mono);
}

.skill-number {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: var(--muted-foreground);
  font: 0.65rem var(--font-mono);
}

.skill-card h3 {
  margin: 3.5rem 0 1rem;
  font-size: 1.45rem;
}

.skill-card>p:not(.skill-number) {
  min-height: 76px;
  color: var(--muted-foreground);
  line-height: 1.65;
  font-size: 0.9rem;
}

.skill-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 2rem 0 0;
  list-style: none;
}

.skill-card li span,
.tags span {
  display: inline-flex;
  padding: 0.45rem 0.65rem;
  background: var(--secondary);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  font: 0.68rem var(--font-mono);
}

.projects-section {
  border-top: 1px solid var(--border);
}

.project-list {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.project-card {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  min-height: 420px;
  background: var(--background);
}

.project-card:nth-child(even) .project-visual {
  order: 2;
}

.project-visual {
  overflow: hidden;
  position: relative;
  min-height: 340px;
  display: grid;
  place-items: center;
  background-color: var(--card);
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 36px 36px;
}

.project-content {
  padding: clamp(2rem, 5vw, 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-content h3 {
  margin: 0.5rem 0 1.2rem;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.project-content>p:not(.project-count) {
  color: var(--muted-foreground);
  line-height: 1.75;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.project-details {
  width: max-content;
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin-top: 2rem;
  padding: 0.6rem 0;
  border: 0;
  border-bottom: 1px solid var(--primary);
  background: none;
  font: 0.75rem var(--font-mono);
  cursor: pointer;
}

.project-details:hover {
  color: var(--primary);
}

.project-more {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.project-more p {
  overflow: hidden;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.85rem;
}

.project-card.expanded .project-more {
  grid-template-rows: 1fr;
}

.project-card.expanded .project-more p {
  margin-top: 1rem;
}

.project-card.expanded .project-details svg {
  transform: rotate(90deg);
}

.project-code {
  padding: 2rem;
  border: 1px solid var(--primary);
  color: var(--primary);
  font: 700 clamp(1.5rem, 4vw, 3rem)/1.1 var(--font-mono);
  box-shadow: 12px 12px 0 color-mix(in oklab, var(--primary) 10%, transparent);
}

.route-line {
  position: absolute;
  width: 75%;
  border-top: 1px dashed var(--primary);
  transform: rotate(-18deg);
}

.invoice {
  width: 52%;
  min-width: 180px;
  padding: 1.5rem;
  transform: rotate(4deg);
  background: var(--foreground);
  color: var(--background);
  box-shadow: 18px 18px 0 color-mix(in oklab, var(--accent) 28%, transparent);
  font: 0.7rem var(--font-mono);
}

.invoice i {
  display: block;
  height: 6px;
  margin: 1.2rem 0;
  background: color-mix(in oklab, var(--background) 22%, transparent);
}

.invoice strong {
  display: block;
  margin-top: 2rem;
  font-size: 1.1rem;
}

.tour {
  background: linear-gradient(to bottom,
      var(--card) 0 47%,
      color-mix(in oklab, var(--accent) 16%, var(--card)) 48% 53%,
      color-mix(in oklab, var(--primary) 8%, var(--card)) 54%);
}

.horizon {
  width: 70%;
  height: 28%;
  border: 1px solid var(--accent);
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
}

.viewfinder {
  position: absolute;
  display: grid;
  place-items: center;
  width: 105px;
  height: 105px;
  border: 1px solid var(--primary);
  border-radius: 50%;
  color: var(--primary);
  font: 1rem var(--font-mono);
}

.about-section {
  border-top: 1px solid var(--border);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 7vw, 8rem);
  align-items: center;
  /* Centra ambas columnas verticalmente */
}

.about-statement h2 {
  margin-top: 1.5rem;
}

.about-statement h2 span,
.contact-intro h2 span {
  color: var(--primary);
}

.about-copy>p {
  margin: 0 0 1.5rem;
  color: var(--muted-foreground);
  font-size: 1.05rem;
  line-height: 1.8;
}

.about-copy>p:first-child {
  color: var(--foreground);
  font-size: 1.25rem;
}

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

.principles {
  display: grid;
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
  max-width: 440px;
}

.principles span {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  font: 0.73rem var(--font-mono);
  color: var(--muted-foreground);
}

.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 9vw, 10rem);
  border-top: 1px solid var(--border);
}

.contact-intro h2 {
  margin: 2rem 0;
}

.social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.social-links a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
  font: 0.72rem var(--font-mono);
}

.social-links a:hover {
  color: var(--primary);
}

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

.contact-form label {
  display: grid;
  gap: 0.6rem;
  color: var(--muted-foreground);
  font: 0.68rem var(--font-mono);
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  outline: none;
  padding: 0.9rem 0;
  resize: vertical;
  background: transparent;
  color: var(--foreground);
  font-family: var(--font-sans);
  text-transform: none;
  transition: border 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
}

.contact-form small {
  min-height: 1em;
  color: var(--destructive);
}

.submit-button {
  justify-self: start;
  border: 0;
}

.form-status {
  min-height: 1.5rem;
  color: var(--primary);
  font-size: 0.8rem;
}

footer {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-between: space-between;
  gap: 2rem;
  padding: 2rem clamp(1.25rem, 5vw, 5rem);
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font: 0.67rem var(--font-mono);
}

footer nav {
  display: flex;
  gap: 1.5rem;
}

footer a:hover {
  color: var(--primary);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.is-visible,
.hero .reveal {
  opacity: 1;
  transform: none;
}

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

@keyframes pulse {
  50% {
    opacity: 0.4;
    box-shadow: 0 0 6px var(--primary);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 8rem;
  }

  .terminal {
    justify-self: start;
  }

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

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

  .skill-card {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

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

  .project-card:nth-child(even) .project-visual {
    order: 0;
  }

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

  .principles {
    max-width: 100%;
  }
}

@media (max-width: 680px) {
  .site-header {
    height: 64px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    padding: 0.5rem 1.25rem 1.25rem;
    background: color-mix(in oklab, var(--background) 96%, transparent);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-130%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
  }

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

  .nav-links a {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-contact {
    border: 0;
  }

  .hero {
    min-height: auto;
    padding-top: 6.5rem;
    padding-bottom: 4rem;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 13vw, 4.2rem);
    word-break: break-word;
  }

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

  .terminal {
    box-shadow: 10px 10px 0 color-mix(in oklab, var(--primary) 4%, transparent);
  }

  .terminal-body {
    min-height: auto;
    padding: 1.25rem;
  }

  .scroll-cue {
    display: none;
  }

  .section {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

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

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

  .project-code {
    font-size: clamp(1.4rem, 6vw, 2.2rem);
    padding: 1.25rem;
    box-shadow: 8px 8px 0 color-mix(in oklab, var(--primary) 10%, transparent);
  }

  .invoice {
    box-shadow: 10px 10px 0 color-mix(in oklab, var(--accent) 28%, transparent);
  }

  .project-content {
    padding: 1.75rem 1.25rem 2rem;
  }

  .social-links {
    flex-wrap: wrap;
  }

  .submit-button {
    width: 100%;
  }

  footer {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }
}

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

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

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