/* Inter — auto-hospedado */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* JetBrains Mono — auto-hospedado */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #020403;
  --panel: rgba(3, 9, 7, 0.86);
  --panel-strong: rgba(4, 14, 10, 0.94);
  --line: rgba(73, 255, 137, 0.24);
  --line-strong: rgba(73, 255, 137, 0.52);
  --text: #effff4;
  --soft: #c9f8d7;
  --muted: #88aa95;
  --green: #49ff89;
  --green-soft: rgba(73, 255, 137, 0.1);
  --shadow: 0 28px 96px rgba(0, 0, 0, 0.74);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% -10%, rgba(73, 255, 137, 0.11), transparent 34%),
    linear-gradient(180deg, #020403 0%, #000 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(73, 255, 137, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73, 255, 137, 0.028) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

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

.ambient-code {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.18;
}

.terminal-page {
  position: relative;
  z-index: 1;
  width: min(780px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 26px 0;
}

.profile-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: clamp(18px, 3.5vw, 30px);
}

.prompt,
.links h2,
.focus-box,
.footer {
  font-family: "JetBrains Mono", monospace;
}

.prompt {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.88rem;
}

.prompt.cursor::after {
  content: " _";
  animation: cursor-blink 1s steps(2, start) infinite;
}

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

.brand-lockup {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 4px;
}

.brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  line-height: 0.9;
  text-shadow: 0 0 10px rgba(73, 255, 137, 0.12);
}

.brand-apc {
  color: var(--text);
  font-size: clamp(2.72rem, 10.8vw, 5.24rem);
  font-weight: 900;
  letter-spacing: -0.05em;
}

.brand-two {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(38px, 5.2vw, 56px);
  height: clamp(38px, 5.2vw, 56px);
  margin: 0 8px 0 6px;
  border: 2px solid rgba(73, 255, 137, 0.58);
  border-radius: 12px;
  color: var(--green);
  background: rgba(73, 255, 137, 0.08);
  box-shadow: inset 0 0 14px rgba(73, 255, 137, 0.08);
  font-size: clamp(1.44rem, 4.7vw, 2.64rem);
  font-weight: 900;
}

.brand-tech {
  position: relative;
  top: -0.28em;
  color: var(--green);
  font-size: clamp(1rem, 2.14vw, 1.56rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 1;
}

.identity-block {
  display: grid;
  justify-items: center;
  margin-top: 20px;
  text-align: center;
}

.avatar {
  display: grid;
  place-items: center;
  width: clamp(126px, 21vw, 164px);
  aspect-ratio: 1;
  margin-bottom: 12px;
  border: 2px solid rgba(73, 255, 137, 0.56);
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 36%, rgba(73, 255, 137, 0.18), transparent 34%),
    #020806;
  box-shadow:
    0 0 0 6px rgba(73, 255, 137, 0.03),
    0 0 24px rgba(73, 255, 137, 0.12),
    0 20px 56px rgba(0, 0, 0, 0.56);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: contrast(1.04) saturate(0.94);
}

.kicker {
  margin: 0 0 5px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(0.92rem, 2.75vw, 1.56rem);
  line-height: 1;
  letter-spacing: 0;
}

.tagline {
  margin: 8px 0 0;
  color: var(--green);
  font-size: clamp(1.1rem, 3vw, 1.55rem);
  font-weight: 800;
}

.bio {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.62;
}

.projects-box {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.16);
}

.projects-title {
  margin: 0 0 8px;
  color: var(--soft);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.project-item {
  padding: 8px 0;
}

.project-item + .project-item {
  border-top: 1px solid rgba(73, 255, 137, 0.1);
}

.project-item h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
}

.project-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

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

.links h2 {
  margin: 0 0 2px;
  color: var(--soft);
  font-size: 0.96rem;
  letter-spacing: 0.03em;
}

.link-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 11px;
  align-items: center;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-strong);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.link-item:hover {
  transform: translateY(-1px);
  border-color: rgba(73, 255, 137, 0.38);
  background: rgba(73, 255, 137, 0.06);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.link-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--green);
  background:
    linear-gradient(145deg, rgba(73, 255, 137, 0.12), rgba(73, 255, 137, 0.02)),
    rgba(0, 0, 0, 0.18);
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  box-shadow: inset 0 0 18px rgba(73, 255, 137, 0.08);
}

.link-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.link-item strong,
.link-item small {
  display: block;
}

.link-item strong {
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.15;
}

.link-item small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.focus-box {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
}

.focus-title {
  margin: 0 0 10px;
  color: var(--soft);
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.stack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.stack-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.78rem;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(73, 255, 137, 0.14);
  color: rgba(136, 170, 149, 0.82);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.footer p {
  margin: 0;
}

@media (max-width: 620px) {
  body::before {
    background-size: 32px 32px;
  }

  .terminal-page {
    width: calc(100% - 12px);
    padding: 6px 0 14px;
  }

  .profile-card {
    border-radius: 14px;
    padding: 16px 14px 18px;
  }

  .prompt {
    margin-bottom: 10px;
    font-size: 0.75rem;
  }

  .brand-lockup {
    margin-top: 2px;
  }

  .brand-wordmark {
    gap: 2px;
  }

  .brand-apc {
    font-size: clamp(2.34rem, 14.2vw, 3.72rem);
  }

  .brand-two {
    min-width: clamp(34px, 10vw, 46px);
    height: clamp(34px, 10vw, 46px);
    margin: 0 6px 0 4px;
    border-radius: 9px;
    font-size: clamp(1.22rem, 5.8vw, 2.08rem);
  }

  .brand-tech {
    top: -0.18em;
    margin-left: 0;
    letter-spacing: 0.04em;
    font-size: clamp(0.84rem, 4.2vw, 1.14rem);
  }

  .identity-block {
    margin-top: 16px;
  }

  .avatar {
    width: 118px;
    margin-bottom: 12px;
  }

  .kicker {
    max-width: 310px;
    font-size: 0.72rem;
    line-height: 1.45;
  }

  h1 {
    font-size: clamp(0.98rem, 4vw, 1.28rem);
  }

  .tagline {
    margin-top: 8px;
    font-size: clamp(0.98rem, 4.9vw, 1.2rem);
  }

  .bio {
    margin-top: 8px;
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .projects-box {
    margin-top: 14px;
    padding: 10px 11px;
  }

  .projects-title {
    margin-bottom: 7px;
    font-size: 0.84rem;
  }

  .projects-box p {
    font-size: 0.82rem;
    line-height: 1.42;
  }

  .project-item {
    padding: 7px 0;
  }

  .project-item h3 {
    margin-bottom: 3px;
    font-size: 0.86rem;
  }

  .project-item p {
    font-size: 0.78rem;
  }

  .links {
    gap: 6px;
    margin-top: 14px;
  }

  .links h2 {
    font-size: 0.88rem;
  }

  .link-item {
    grid-template-columns: 36px 1fr;
    gap: 10px;
    min-height: 54px;
    padding: 8px 9px;
  }

  .link-icon {
    width: 36px;
    height: 36px;
  }

  .link-icon svg {
    width: 16px;
    height: 16px;
  }

  .link-item strong {
    font-size: 0.9rem;
  }

  .link-item small {
    font-size: 0.74rem;
  }

  .focus-box {
    margin-top: 14px;
    padding: 11px;
  }

  .focus-title {
    margin-bottom: 8px;
    font-size: 0.88rem;
  }

  .stack-grid {
    gap: 6px;
  }

  .stack-grid span {
    min-height: 28px;
    padding: 0 7px;
    font-size: 0.72rem;
  }

  .footer {
    flex-direction: column;
    align-items: center;
    margin-top: 18px;
    padding-top: 14px;
    gap: 8px;
    text-align: center;
  }

  .chat-toggle {
    right: 12px;
    bottom: 12px;
    min-height: 48px;
    padding: 0 12px;
  }

  .chat-toggle__label {
    font-size: 0.76rem;
  }

  .chat-widget {
    right: 6px;
    bottom: 70px;
    width: calc(100vw - 12px);
    max-height: calc(100vh - 82px);
    border-radius: 16px;
  }

  .chat-widget__header {
    padding: 8px 8px 0;
  }

  .chat-widget__messages {
    padding: 8px 12px 12px;
    gap: 9px;
  }

  .chat-message__bubble {
    max-width: 100%;
    font-size: 0.75rem;
  }

  .chat-widget__form {
    padding: 10px 12px 12px;
  }
}

@media (max-width: 420px) {
  .profile-card {
    padding-inline: 12px;
  }

  .brand-apc {
    font-size: clamp(2.18rem, 13.4vw, 3.08rem);
  }

  .brand-tech {
    top: -0.16em;
    letter-spacing: 0.03em;
  }

  .kicker {
    font-size: 0.68rem;
  }

  .bio {
    font-size: 0.84rem;
  }

  .project-item p {
    font-size: 0.75rem;
  }

  .stack-grid span {
    font-size: 0.69rem;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chat-toggle,
.chat-widget__hint,
.chat-message__bubble {
  font-family: "JetBrains Mono", monospace;
}

.chat-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid rgba(73, 255, 137, 0.34);
  border-radius: 999px;
  color: var(--text);
  background: rgba(3, 10, 7, 0.92);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.chat-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(73, 255, 137, 0.5);
  background: rgba(8, 18, 13, 0.95);
}

.chat-toggle__icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--green);
}

.chat-toggle__label {
  font-size: 0.84rem;
  font-weight: 700;
}

.chat-widget {
  position: fixed;
  right: 18px;
  bottom: 82px;
  z-index: 21;
  width: min(380px, calc(100vw - 22px));
  max-height: min(680px, calc(100vh - 112px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid rgba(73, 255, 137, 0.28);
  border-radius: 18px;
  background: rgba(3, 9, 7, 0.96);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.chat-widget[hidden] {
  display: none;
}

.chat-widget__header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 10px 0;
}

.chat-widget__title {
  margin: 0;
  margin-right: auto;
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.chat-widget__close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(73, 255, 137, 0.2);
  border-radius: 10px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.02);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.chat-widget__messages {
  overflow-y: auto;
  padding: 10px 14px 14px;
  display: grid;
  gap: 10px;
}

.chat-message {
  display: flex;
}

.chat-message--user {
  justify-content: flex-end;
}

.chat-message--assistant {
  justify-content: flex-start;
}

.chat-message__bubble {
  max-width: min(290px, 100%);
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.chat-message--assistant .chat-message__bubble {
  border: 1px solid rgba(73, 255, 137, 0.18);
  color: var(--soft);
  background: rgba(255, 255, 255, 0.03);
}

.chat-message--user .chat-message__bubble {
  border: 1px solid rgba(73, 255, 137, 0.26);
  color: #062110;
  background: rgba(73, 255, 137, 0.88);
}

.chat-widget__form {
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(73, 255, 137, 0.08);
}

.chat-widget__input {
  width: 100%;
  min-height: 74px;
  resize: none;
  border: 1px solid rgba(73, 255, 137, 0.18);
  border-radius: 12px;
  padding: 12px;
  color: var(--text);
  font: inherit;
  background: rgba(255, 255, 255, 0.025);
  outline: none;
}

.chat-widget__input:focus {
  border-color: rgba(73, 255, 137, 0.42);
  box-shadow: 0 0 0 3px rgba(73, 255, 137, 0.08);
}

.chat-widget__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}

.chat-widget__hint {
  color: var(--muted);
  font-size: 0.68rem;
}

.chat-widget__submit {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(73, 255, 137, 0.28);
  border-radius: 10px;
  color: #062110;
  font-weight: 700;
  background: rgba(73, 255, 137, 0.9);
  cursor: pointer;
}

.chat-widget__submit:disabled {
  opacity: 0.68;
  cursor: wait;
}

/* --- Footer legal links --- */
.footer nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer nav a {
  color: inherit;
  opacity: 0.72;
  transition: opacity 140ms ease;
}

.footer nav a:hover {
  opacity: 1;
}

/* --- Legal pages --- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  transition: opacity 140ms ease;
}

.back-link:hover {
  opacity: 0.7;
}

.legal-heading {
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: clamp(1.3rem, 4vw, 1.85rem);
  font-weight: 800;
}

.legal-content {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.72;
}

.legal-content h2 {
  margin: 26px 0 8px;
  color: var(--soft);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legal-content p {
  margin: 0 0 10px;
}

.legal-content ul {
  margin: 0 0 10px;
  padding-left: 18px;
}

.legal-content li {
  margin-bottom: 5px;
}

.legal-content a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-content a:hover {
  opacity: 0.75;
}

.legal-content strong {
  color: var(--soft);
  font-weight: 600;
}

.legal-meta {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: rgba(136, 170, 149, 0.6);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
}
