@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --bg: #ece9df;
  --bg-soft: #f5f2e9;
  --panel: #f5f2e9;
  --panel-strong: #171714;
  --panel-border: #171714;
  --text: #171714;
  --muted: #5d5c56;
  --accent: #ef3f18;
  --accent-warm: #ef3f18;
  --accent-soft: #ff6b43;
  --line: rgba(23, 23, 20, 0.22);
  --shadow: 8px 8px 0 #171714;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --editorial-sans: "Manrope", Arial, sans-serif;
  --editorial-mono: "DM Mono", "Courier New", monospace;
}

html {
  scroll-padding-top: 112px;
}

body {
  font-family: var(--editorial-sans);
  background:
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(23, 23, 20, 0.08) 50%, transparent calc(50% + 0.5px)),
    #ece9df;
  background-size: min(100%, 1320px) 100%;
  color: var(--text);
}

body::before {
  opacity: 1;
  background-image:
    linear-gradient(rgba(23, 23, 20, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 20, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, #000, transparent 760px);
}

body::after {
  opacity: 0.13;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.26'/%3E%3C/svg%3E");
}

::selection {
  color: #f5f2e9;
  background: #ef3f18;
}

a:focus-visible,
.button:focus-visible,
.lang-pill:focus-visible,
.brand-mark:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.page-shell {
  width: min(1320px, calc(100% - 40px));
  padding: 124px 0 72px;
}

.topbar,
.hero-card,
.panel,
.project-card,
.experience-card,
.capability-card {
  backdrop-filter: none;
}

.topbar {
  top: 16px;
  width: min(1320px, calc(100% - 40px));
  min-height: 76px;
  padding: 10px 12px 10px 16px;
  border: 2px solid #171714;
  border-radius: 0;
  background: rgba(245, 242, 233, 0.94);
  box-shadow: 5px 5px 0 #171714;
}

.topbar::after {
  content: "VOL. 01 / 2026";
  padding-left: 16px;
  border-left: 1px solid #171714;
  color: var(--muted);
  font: 500 0.64rem/1 var(--editorial-mono);
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.brand-mark {
  border-radius: 0;
}

.brand-logo-compact {
  height: 48px;
}

.topbar-actions {
  justify-content: flex-end;
}

.topbar-links {
  gap: 4px;
  color: #171714;
  font: 500 0.72rem/1 var(--editorial-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topbar-links a {
  padding: 10px 9px;
  border-bottom: 2px solid transparent;
}

.language-switch {
  min-width: auto;
  gap: 0;
  padding: 0;
  border: 2px solid #171714;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.language-switch::before {
  top: 0;
  bottom: 0;
  left: 0;
  width: 50%;
  border-radius: 0;
  background: #171714;
  box-shadow: none;
}

.language-switch.is-es::before { transform: translateX(0); }
.language-switch.is-en::before { transform: translateX(100%); }

.lang-pill {
  min-width: 42px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 0;
  color: #171714;
  font-family: var(--editorial-mono);
  font-size: 0.72rem;
}

.lang-pill.is-active {
  color: #f5f2e9;
}

.hero {
  position: relative;
  min-height: calc(100vh - 150px);
  display: grid;
  align-items: stretch;
}

.hero::before {
  content: "INDEPENDENT DIGITAL PRACTICE";
  position: absolute;
  top: 28px;
  right: 2px;
  z-index: 1;
  writing-mode: vertical-rl;
  font: 500 0.66rem/1 var(--editorial-mono);
  letter-spacing: 0.18em;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(210px, 0.36fr);
  gap: 0;
  align-items: stretch;
  border: 2px solid #171714;
  background: #f5f2e9;
  box-shadow: 10px 10px 0 #171714;
}

.hero-grid::after {
  content: "SELECTED WORK\A 2020—2026\A SANTIAGO / CL\A\A BUILDING USEFUL\A DIGITAL SYSTEMS";
  white-space: pre-line;
  display: flex;
  align-items: flex-end;
  padding: 30px 22px;
  border-left: 2px solid #171714;
  color: #f5f2e9;
  background: #ef3f18;
  font: 500 clamp(0.72rem, 1vw, 0.9rem)/1.8 var(--editorial-mono);
  letter-spacing: 0.08em;
}

.hero-copy,
.hero-copy.hero-terminal {
  padding: clamp(28px, 6vw, 78px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.hero-logo-lockup {
  padding-bottom: 28px;
  margin-bottom: clamp(42px, 7vw, 92px);
  border-bottom: 1px solid #171714;
}

.hero-logo {
  width: min(100%, 440px);
}

.eyebrow,
.section-label,
.project-tag,
.stack-kicker {
  color: var(--accent);
  font: 500 0.72rem/1.2 var(--editorial-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before,
.section-label::before {
  content: "[ ";
}

.eyebrow::after,
.section-label::after {
  content: " ]";
}

.terminal-window {
  border: 2px solid #171714;
  border-radius: 0;
  background: #171714;
  box-shadow: 7px 7px 0 #ef3f18;
}

.terminal-top {
  padding: 11px 14px;
  border-bottom: 1px solid #f5f2e9;
  background: #171714;
}

.terminal-dot {
  width: 8px;
  height: 8px;
  border-radius: 0;
  background: #f5f2e9;
}

.terminal-dot-red { background: #ef3f18; }
.terminal-dot-amber,
.terminal-dot-green { background: #f5f2e9; }

.terminal-label {
  color: #f5f2e9;
  font-family: var(--editorial-mono);
}

.terminal-body {
  padding: 28px;
}

.terminal-line {
  color: #f5f2e9;
  font-family: var(--editorial-mono);
  font-size: clamp(0.86rem, 1.5vw, 1.08rem);
}

.terminal-line-role,
.terminal-cursor {
  color: #ff5a32;
}

.terminal-cursor {
  background: #ef3f18;
}

.terminal-subtitle {
  margin: 34px 0 0;
  color: #171714;
  font-family: var(--editorial-sans);
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.hero-actions {
  margin-top: 34px;
}

.button {
  min-height: 46px;
  padding: 12px 16px;
  border: 2px solid #171714;
  border-radius: 0;
  font: 500 0.72rem/1 var(--editorial-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: none;
  transition:
    transform 140ms var(--ease-out),
    color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease;
}

.button-primary {
  color: #f5f2e9;
  background: #171714;
}

.button-secondary {
  color: #171714;
  background: #f5f2e9;
}

.button-subtle {
  color: #171714;
  border-color: #171714;
  background: transparent;
}

.content {
  gap: 0;
  margin-top: 64px;
  border-top: 2px solid #171714;
}

.panel {
  position: relative;
  padding: clamp(28px, 5vw, 64px);
  border: 0;
  border-right: 2px solid #171714;
  border-bottom: 2px solid #171714;
  border-left: 2px solid #171714;
  border-radius: 0;
  background: rgba(245, 242, 233, 0.94);
  box-shadow: none;
}

.content > .panel {
  counter-increment: editorial-section;
}

.content {
  counter-reset: editorial-section;
}

.content > .panel::after {
  content: "0" counter(editorial-section);
  position: absolute;
  top: 20px;
  right: 22px;
  color: rgba(23, 23, 20, 0.25);
  font: 500 0.72rem/1 var(--editorial-mono);
}

.section-heading {
  grid-template-columns: minmax(160px, 0.28fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 42px;
  padding-bottom: 22px;
  border-bottom: 1px solid #171714;
}

h1,
h2,
h3,
.brand {
  font-family: var(--editorial-sans);
}

h2 {
  max-width: 22ch;
  font-size: clamp(2rem, 4.5vw, 4.8rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

h3 {
  letter-spacing: -0.035em;
}

.metric-grid,
.signal-grid,
.stack-grid,
.capability-grid,
.contact-grid {
  gap: 0;
  border-top: 1px solid #171714;
  border-left: 1px solid #171714;
}

.metric-grid article,
.signal-grid article,
.stack-card,
.capability-card,
.contact-grid a {
  padding: 24px;
  border: 0;
  border-right: 1px solid #171714;
  border-bottom: 1px solid #171714;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.metric-grid strong {
  color: #ef3f18;
  font-family: var(--editorial-sans);
  font-size: clamp(2rem, 4vw, 4.2rem);
  letter-spacing: -0.07em;
}

.project-grid,
#projects-primary .project-grid {
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 2px solid #171714;
}

.project-card,
#projects-primary .project-card {
  position: relative;
  display: grid;
  grid-template-columns: 0.22fr minmax(260px, 0.78fr) minmax(260px, 1fr);
  gap: 28px;
  padding: 34px 0;
  border: 0;
  border-bottom: 2px solid #171714;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.project-card::before {
  content: "PROJECT / 0" counter(project-item);
  grid-column: 1;
  grid-row: 1 / span 4;
  color: var(--accent);
  font: 500 0.72rem/1.5 var(--editorial-mono);
  letter-spacing: 0.08em;
}

.project-grid {
  counter-reset: project-item;
}

.project-card {
  counter-increment: project-item;
}

.project-tag {
  grid-column: 2;
  margin: 0;
}

.project-brand {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.project-brand img {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  object-fit: contain;
  image-rendering: auto;
}

.project-brand span,
.case-brand-mark span {
  color: #171714;
  font: 700 1rem/1 var(--editorial-sans);
  letter-spacing: -0.03em;
}

.project-brand small,
.case-brand-mark small {
  display: inline-block;
  margin-left: 6px;
  color: var(--accent);
  font: 500 0.64rem/1 var(--editorial-mono);
  letter-spacing: 0.04em;
  vertical-align: 0.16em;
}

.hero-logo-lockup:has(+ .case-brand-mark) {
  margin-bottom: 24px;
}

.case-brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  padding: 9px 14px 9px 9px;
  border: 1px solid #171714;
  background: rgba(255, 255, 255, 0.2);
}

.case-brand-mark img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.project-card h3 {
  grid-column: 2;
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 3.1rem);
  line-height: 1.03;
}

.project-card > p,
.project-benefits {
  grid-column: 3;
}

.project-card > p {
  grid-row: 1 / span 2;
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
}

.project-benefits {
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-benefits li {
  position: relative;
  padding: 10px 0 10px 24px;
  border-top: 1px solid rgba(23, 23, 20, 0.24);
}

.project-benefits li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

#projects-primary .project-card-actions,
.project-card-actions {
  grid-column: 2 / -1;
  margin-top: 0;
  padding-top: 6px;
}

.intro-panel,
.split-panel {
  gap: clamp(30px, 6vw, 90px);
}

.intro-panel > p,
.split-panel p,
.panel p,
.experience-card p,
.stack-card p {
  color: var(--muted);
  line-height: 1.7;
}

.experience-list {
  padding-left: 0;
}

.experience-list::before,
.experience-card::before {
  display: none;
}

.experience-card {
  padding: 30px 0;
  border: 0;
  border-top: 1px solid #171714;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.experience-card h3 {
  font-size: clamp(1.25rem, 2.4vw, 2.3rem);
}

.stack-card-featured {
  color: #f5f2e9;
  border: 2px solid #171714;
  background: #171714;
}

.stack-card-featured p {
  color: #b8b5aa;
}

.stack-item,
.pill-grid span {
  border: 1px solid #171714;
  border-radius: 0;
  color: #171714;
  background: transparent;
  font-family: var(--editorial-mono);
}

.product-shot img {
  border: 2px solid #171714;
  border-radius: 0;
  box-shadow: 8px 8px 0 #171714;
}

.product-shot figcaption {
  color: var(--muted);
  font-family: var(--editorial-mono);
}

.product-gallery-expanded {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stack-grid:has(> .stack-card:nth-child(4)) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.terminal-cursor {
  animation-duration: 1s;
}

@media (hover: hover) and (pointer: fine) {
  .topbar-links a:hover {
    color: #ef3f18;
    border-bottom-color: #ef3f18;
  }

  .button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 #ef3f18;
  }

  .button:active {
    transform: scale(0.97);
    box-shadow: 0 0 0 #ef3f18;
  }

  .project-card:hover {
    border-color: #171714;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: none;
  }

  .contact-grid a:hover {
    color: #f5f2e9;
    border-color: #171714;
    background: #171714;
  }
}

@media (max-width: 980px) {
  .topbar::after {
    display: none;
  }

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

  .hero-grid::after {
    min-height: 170px;
    border-top: 2px solid #171714;
    border-left: 0;
  }

  .project-card,
  #projects-primary .project-card {
    grid-template-columns: 120px 1fr;
  }

  .product-gallery-expanded {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-card::before {
    grid-row: 1 / span 5;
  }

  .project-tag,
  .project-brand,
  .project-card h3,
  .project-card > p,
  .project-benefits,
  #projects-primary .project-card-actions,
  .project-card-actions {
    grid-column: 2;
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  body {
    background-image: none;
  }

  .page-shell {
    width: calc(100% - 20px);
    padding-top: 14px;
  }

  .topbar {
    width: 100%;
    min-height: auto;
    padding: 12px;
    border-radius: 0;
    box-shadow: 4px 4px 0 #171714;
  }

  .brand-logo-compact {
    height: 42px;
  }

  .hero {
    min-height: auto;
    margin-top: 24px;
  }

  .hero::before {
    display: none;
  }

  .hero-grid {
    box-shadow: 5px 5px 0 #171714;
  }

  .hero-copy,
  .hero-copy.hero-terminal,
  .panel {
    padding: 24px 18px;
    border-radius: 0;
  }

  .hero-logo-lockup {
    margin-bottom: 42px;
  }

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

  h2 {
    font-size: clamp(2rem, 11vw, 3.4rem);
  }

  .project-card,
  #projects-primary .project-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 28px 0;
  }

  .project-card::before,
  .project-tag,
  .project-brand,
  .project-card h3,
  .project-card > p,
  .project-benefits,
  #projects-primary .project-card-actions,
  .project-card-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .project-card::before {
    position: static;
  }

  .product-gallery-expanded {
    grid-template-columns: 1fr;
  }

  .stack-grid:has(> .stack-card:nth-child(4)) {
    grid-template-columns: 1fr;
  }

  .terminal-body {
    padding: 20px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .topbar-links a {
    transition-duration: 0.01ms;
  }
}
