:root {
  --bg: #000;
  --peach: #ffd28b;
  --peach-light: #ffebbf;
  --blue: #53cdf5;
  --blue-deep: #299fe8;
  --rule: #262626;
  --sifu-gradient: linear-gradient(140deg, #51ccf5, #50c5fb 6%, #57bcff 13%, #6bb0ff 21%, #80a4fe 31%, #9a97f7 42%, #b186e9 56%, #c675d7 72%, #d864c1 87%, #e453a5);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
[hidden] { display: none !important; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 16px;
}

.mascot {
  width: min(400px, 77vw);
  margin-bottom: -2rem;
  position: relative;
  z-index: 2;
  will-change: transform;
}

.mascot-btn { display: block; width: 100%; border-radius: 50%; }
.mascot-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.mascot-btn img { width: 100%; }

.title {
  position: relative;
  z-index: 1;
  font-size: 130px;
  font-weight: 900;
  line-height: 1;
  max-width: 5.5em;
  background-image: var(--sifu-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.subtitle {
  margin-top: 20px;
  font-size: 50px;
  font-weight: 800;
  color: var(--peach);
}

/* ---------- Chat ---------- */
.chat {
  border-top: 1px solid var(--rule);
  padding: 48px 16px;
}

.chat-inner {
  max-width: 36rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.question {
  display: block;
  width: 100%;
  background: #fff;
  color: #000;
  border-radius: 1.5rem;
  padding: 1.25rem;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.4;
  transition: transform .15s cubic-bezier(.4, 0, .2, 1);
}
.question:hover { transform: scale(1.03); }
.question:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.thread {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 4px 0 12px;
}

.bubble {
  width: fit-content;
  border-radius: 1.5rem;
  color: #000;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.4;
  animation: pop-in .45s cubic-bezier(.2, .9, .3, 1.2) both;
}

.bubble-me {
  margin-left: auto;
  max-width: 500px;
  padding: 1.25rem 2rem;
  text-align: left;
  background: linear-gradient(to bottom right, var(--peach-light), var(--peach));
  border-top-right-radius: 0;
  transform-origin: top right;
}

.bubble-them {
  margin-right: auto;
  background: linear-gradient(to bottom right, var(--blue), var(--blue-deep));
  border-top-left-radius: 0;
  transform-origin: top left;
}

.answer { padding: 2.5rem; }
.answer img { width: 64px; height: 64px; }

.typing {
  display: flex;
  gap: 6px;
  padding: 1.5rem;
  animation-delay: .35s;
}
.typing span {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #fff;
  animation: blink 1s infinite alternate;
}
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }

@keyframes blink {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(.6); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- Projects ---------- */
.projects {
  border-top: 1px solid var(--rule);
  padding: 40px 16px 60px;
  text-align: center;
}

.projects-title {
  font-size: 50px;
  font-weight: 600;
  color: var(--peach);
}

.logos {
  list-style: none;
  margin: 48px auto 0;
  padding: 0;
  max-width: 1140px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px 32px;
}

.logos a { display: block; transition: transform .3s; }
.logos a:hover,
.logos a:focus-visible { transform: scale(1.1); }
.logos img { width: var(--w); }

.logos .logo-allocent {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-family: Newsreader, Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.3px;
  line-height: 1;
}

/* ---------- Contact ---------- */
.contact {
  border-top: 1px solid var(--rule);
  padding: 48px 16px 8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.contact-card {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 675px;
  padding: 3.3%;
  border-radius: 1rem;
  background-image: linear-gradient(171deg, #4ec5fb 14%, #de5cb5 91%);
  transition: transform .3s;
}
.contact-card:hover,
.contact-card:focus-visible { transform: scale(1.05); }
.contact-card img { width: 15%; }

.contact-alt {
  display: block;
  width: 100%;
  max-width: 675px;
  padding: 18px;
  border: 1px solid #3a3a3a;
  border-radius: 1rem;
  color: var(--peach);
  text-align: center;
  text-decoration: none;
  font-size: 20px;
  font-weight: 600;
  transition: border-color .3s, transform .3s;
}
.contact-alt:hover,
.contact-alt:focus-visible {
  border-color: var(--peach);
  transform: scale(1.02);
}
.contact-alt[aria-expanded="true"] { border-color: var(--peach); transform: none; }

.info-form {
  width: 100%;
  max-width: 675px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: 1.5rem;
  border-top-left-radius: 0;
  background: #111;
  border: 1px solid #2a2a2a;
  animation: pop-in .45s cubic-bezier(.2, .9, .3, 1.2) both;
  transform-origin: top center;
}

.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; min-width: 0; }

.field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.field span { font-size: 15px; font-weight: 600; color: var(--peach); }
.field em { font-style: normal; font-weight: 500; opacity: .6; }

.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #333;
  border-radius: 1rem;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 17px;
  font-weight: 500;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus,
.field textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { outline: 2px solid #e453a5; }

.hp { position: absolute; left: -9999px; }

.info-submit {
  align-self: flex-end;
  padding: 14px 32px;
  border-radius: 9999px;
  background: linear-gradient(to bottom right, var(--blue), var(--blue-deep));
  color: #000;
  font-size: 18px;
  font-weight: 900;
  transition: transform .15s;
}
.info-submit:hover { transform: scale(1.04); }
.info-submit:disabled { opacity: .5; cursor: default; transform: none; }

.info-status { min-height: 1.4em; font-size: 16px; font-weight: 600; text-align: left; }
.info-status.error { color: #ff8fb8; }

.info-sent {
  align-self: flex-start;
  padding: 1.25rem 1.75rem;
  border-radius: 1.5rem;
  border-top-left-radius: 0;
  background: linear-gradient(to bottom right, var(--blue), var(--blue-deep));
  color: #000;
  font-size: 20px;
  font-weight: 900;
  animation: pop-in .45s cubic-bezier(.2, .9, .3, 1.2) both;
  transform-origin: top left;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .title { font-size: 84px; }
  .subtitle, .projects-title { font-size: 32px; }
}

@media (max-width: 767px) {
  .hero { min-height: 66vh; }
  .mascot { margin-bottom: -1rem; }
  .title { font-size: 12vw; line-height: 1.1; }
  .subtitle, .projects-title { font-size: 6vw; }
  .question, .bubble { font-size: 20px; }
  .bubble-me { padding: 1.25rem; }
  .answer { padding: 1.25rem; }
  .logos { margin-top: 32px; }
  .contact { padding: 40px 5% 5%; }
  .contact-card { padding: 20px; }
  .contact-alt { font-size: 17px; padding: 16px; }
  .info-form { padding: 18px; }
  .field-row { flex-direction: column; }
  .info-submit { align-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .bubble, .typing span, .info-form, .info-sent { animation: none; }
  .question, .logos a, .contact-card, .contact-alt, .info-submit { transition: none; }
}
