:root {
  --accent: #7c5cff;

  --bg: #eef2ff;
  --text: #111827;
  --muted: #6b7280;

  --grid-line: rgba(17, 24, 39, 0.055);

  --glass-bg: rgba(255, 255, 255, 0.16);
  --glass-strong: rgba(255, 255, 255, 0.24);
  --glass-shadow: rgba(17, 24, 39, 0.08);
}

body.dark {
  --bg: #000000;
  --text: #ffffff;
  --muted: #a1a1aa;

  --grid-line: rgba(255, 255, 255, 0.055);

  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --glass-shadow: rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  font-family: Inter, Arial, sans-serif;

  background:
    radial-gradient(
      circle at top left,
      color-mix(in srgb, var(--accent) 28%, transparent),
      transparent 34%
    ),
    radial-gradient(
      circle at bottom right,
      color-mix(in srgb, var(--accent) 14%, transparent),
      transparent 40%
    ),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    var(--bg);

  background-size:
    auto,
    auto,
    42px 42px,
    42px 42px,
    auto;

  color: var(--text);

  min-height: 100vh;

  transition:
    background 0.3s ease,
    color 0.3s ease;

  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

img {
  -webkit-user-drag: none;
  user-select: none;
}

.page {
  width: min(100%, 920px);
  margin: auto;
  padding: 44px 18px;
}

.content {
  position: relative;
  text-align: center;
}

/* =========================
   LIGHT LIQUID GLASS
========================= */

.liquid-glass {
  position: relative;
  overflow: hidden;
  isolation: isolate;

  border: none;

  background:
    linear-gradient(
      135deg,
      var(--glass-strong),
      var(--glass-bg) 48%,
      color-mix(in srgb, var(--accent) 7%, transparent)
    );

  backdrop-filter: blur(4px) saturate(115%);
  -webkit-backdrop-filter: blur(4px) saturate(115%);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.04),
    0 8px 18px var(--glass-shadow),
    0 0 12px color-mix(in srgb, var(--accent) 10%, transparent);

  transform: translate3d(0, 0, 0) scale(1);

  transition:
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 260ms ease,
    filter 260ms ease,
    background 260ms ease;
}

body.dark .liquid-glass {
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.095),
      rgba(255, 255, 255, 0.04) 48%,
      color-mix(in srgb, var(--accent) 8%, transparent)
    );

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 8px 18px var(--glass-shadow),
    0 0 12px color-mix(in srgb, var(--accent) 10%, transparent);
}

.liquid-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;

  background:
    radial-gradient(
      circle at 24% 18%,
      rgba(255, 255, 255, 0.22),
      transparent 28%
    ),
    linear-gradient(
      120deg,
      transparent 0%,
      rgba(255, 255, 255, 0.04) 45%,
      rgba(255, 255, 255, 0.12) 50%,
      rgba(255, 255, 255, 0.04) 55%,
      transparent 100%
    );

  opacity: 0.22;
  pointer-events: none;
}

.liquid-glass::after {
  content: "";

  position: absolute;
  top: 0;
  left: 0;

  width: 45%;
  height: 100%;

  z-index: 0;

  background:
    linear-gradient(
      110deg,
      transparent 0%,
      rgba(255, 255, 255, 0.035) 28%,
      rgba(255, 255, 255, 0.16) 50%,
      rgba(255, 255, 255, 0.035) 72%,
      transparent 100%
    );

  opacity: 0.32;

  transform:
    translate3d(-160%, 0, 0)
    skewX(-18deg);

  pointer-events: none;

  animation:
    glassFlowPingPong 9s ease-in-out infinite alternate;

  will-change: transform;
}

.liquid-glass > * {
  position: relative;
  z-index: 2;
}

.liquid-glass:hover,
.liquid-glass:focus-visible {
  transform:
    translateY(-2px)
    scale(1.01);

  filter: saturate(1.06);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.04),
    0 10px 22px var(--glass-shadow),
    0 0 16px color-mix(in srgb, var(--accent) 14%, transparent);
}

.liquid-glass:active {
  transform:
    translateY(1px)
    scale(0.97);

  filter: saturate(1.1) brightness(1.02);

  box-shadow:
    inset 0 3px 10px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 5px 12px var(--glass-shadow);
}

/* =========================
   GLOBAL LIQUID FLOW
========================= */

@keyframes glassFlowPingPong {
  0% {
    transform:
      translate3d(-160%, 0, 0)
      skewX(-18deg);
  }

  100% {
    transform:
      translate3d(320%, 0, 0)
      skewX(-18deg);
  }
}

@media (hover: none) {
  .liquid-glass:hover {
    transform:
      translateY(0)
      scale(1);
  }

  .liquid-glass:active {
    transform:
      translateY(1px)
      scale(0.97);
  }
}

@media (prefers-reduced-motion: reduce) {
  .liquid-glass,
  .liquid-glass::before,
  .liquid-glass::after {
    animation: none;
    transition: none;
  }
}

/* =========================
   THEME TOGGLE
========================= */

.theme-toggle {
  position: fixed;

  top: 20px;
  right: 20px;

  width: 52px;
  height: 52px;

  border: 0;
  border-radius: 50%;

  cursor: pointer;

  color: var(--accent);

  font-size: 18px;

  z-index: 999;
}

/* =========================
   PROFILE
========================= */

.profile-img {
  width: 132px;
  height: 132px;

  border-radius: 50%;
  object-fit: cover;

  border: 4px solid var(--accent);

  box-shadow:
    0 0 20px
      color-mix(
        in srgb,
        var(--accent) 38%,
        transparent
      );
}

h1 {
  margin: 18px 0 8px;

  font-size: clamp(32px, 6vw, 56px);

  letter-spacing: -1.5px;

  line-height: 1.1;
}

.description,
.page-subtitle {
  max-width: 650px;

  margin: 0 auto 26px;

  color: var(--muted);

  line-height: 1.8;

  font-size: clamp(16px, 2.6vw, 20px);
}

.page-title {
  margin-top: 18px;
}

.error-code {
  margin: 0 0 18px;

  font-size: clamp(86px, 20vw, 180px);

  line-height: 0.9;

  color: var(--accent);

  letter-spacing: -8px;
}

/* =========================
   TECH STACK
========================= */

.tech-stack {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;

  gap: 12px;

  margin-bottom: 34px;
}

.tech-stack span {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  padding: 12px 18px;

  border-radius: 999px;

  font-size: 15px;
}

.tech-stack i,
.project-meta i {
  color: var(--accent);
}

/* =========================
   ACTIONS
========================= */

.page-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;

  gap: 14px;

  margin-top: 28px;
}

.whatsapp-btn,
.secondary-btn,
.global-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 11px;

  padding: 16px 30px;

  border-radius: 999px;

  text-decoration: none;

  font-weight: 800;

  transition:
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 260ms ease,
    filter 260ms ease;
}

.whatsapp-btn,
.primary-btn {
  color: white;

  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--accent) 84%, white),
      color-mix(in srgb, var(--accent) 92%, black)
    );

  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.24),
    inset 0 -1px 1px rgba(0, 0, 0, 0.08),
    0 10px 22px color-mix(in srgb, var(--accent) 36%, transparent),
    0 0 18px color-mix(in srgb, var(--accent) 12%, transparent);
}

.secondary-btn {
  color: var(--text);
}

.whatsapp-btn:hover,
.secondary-btn:hover,
.global-btn:hover {
  transform:
    translateY(-2px)
    scale(1.01);
}

.whatsapp-btn:active,
.secondary-btn:active,
.global-btn:active {
  transform:
    translateY(1px)
    scale(0.97);
}

.whatsapp-btn i,
.primary-btn i {
  color: white;
}

/* =========================
   PROJECTS
========================= */

.projects-section {
  margin-top: 52px;
  text-align: left;
}

.projects-section h2 {
  text-align: center;

  margin-bottom: 22px;

  font-size: clamp(30px, 5vw, 44px);

  line-height: 1.15;
}

.projects {
  display: grid;
  gap: 18px;
}

.project-card {
  padding: 22px;

  border-radius: 26px;
}

.project-card a {
  color: var(--text);

  font-size: 22px;
  font-weight: 800;

  text-decoration: none;

  transition: color 0.2s ease;
}

.project-card a:hover {
  color: var(--accent);
}

.project-card p {
  color: var(--muted);

  line-height: 1.7;

  margin: 14px 0;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;

  gap: 16px;

  color: var(--muted);

  font-size: 14px;

  margin-top: 14px;
}

.project-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* =========================
   BOT PAGE
========================= */

.bot-page {
  min-height: 100vh;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bot-content {
  width: 100%;
}

.bot-actions {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 18px;

  margin-top: 34px;
}

.bot-actions .whatsapp-btn {
  width: 100%;
  max-width: 520px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 8px;

  color: var(--accent);

  text-decoration: none;

  font-weight: 700;

  font-size: 17px;

  line-height: 1;
}

.back-link:hover {
  text-decoration: underline;
}

.back-link i {
  font-size: 16px;
}

.bot-page footer {
  margin-top: 52px;
}

/* =========================
   404 / GLOBAL BUTTONS
========================= */

.error-page {
  min-height: 100vh;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.error-content {
  width: 100%;
}

.error-page footer {
  margin-top: 52px;
}

.global-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;

  gap: 14px;

  margin-top: 34px;
}

.global-btn {
  min-width: 220px;
  font-size: 16px;
}

.primary-btn {
  border: none;
}

/* =========================
   ACCESSIBILITY
========================= */

.whatsapp-btn:focus-visible,
.secondary-btn:focus-visible,
.global-btn:focus-visible,
.theme-toggle:focus-visible,
.project-card a:focus-visible {
  outline: 3px solid
    color-mix(
      in srgb,
      var(--accent),
      white 30%
    );

  outline-offset: 4px;
}

/* =========================
   FOOTER
========================= */

footer {
  text-align: center;

  margin-top: 34px;

  color: var(--muted);

  font-size: 14px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 520px) {
  .page {
    padding: 34px 14px;
  }

  .profile-img {
    width: 118px;
    height: 118px;
  }

  .theme-toggle {
    top: 14px;
    right: 14px;

    width: 48px;
    height: 48px;
  }

  .tech-stack {
    gap: 10px;
  }

  .tech-stack span {
    padding: 11px 15px;

    font-size: 14px;
  }

  .page-actions,
  .global-actions {
    flex-direction: column;
    align-items: center;
  }

  .whatsapp-btn,
  .secondary-btn,
  .global-btn {
    width: 100%;
    max-width: 360px;
  }

  .project-card {
    padding: 20px;
  }

  .project-card a {
    font-size: 20px;
  }

  .bot-page,
  .error-page {
    justify-content: flex-start;
  }

  .bot-actions {
    gap: 16px;
    margin-top: 30px;
  }

  .bot-actions .whatsapp-btn {
    max-width: 100%;
  }

  .back-link {
    font-size: 16px;
  }

  .bot-page footer,
  .error-page footer {
    margin-top: 46px;
  }
}


/* =========================
   UPLOADER PAGE (GDrive)
========================= */
.file-input-wrapper {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto 15px;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.file-input-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 35px 20px;
  border: 2px dashed color-mix(in srgb, var(--accent) 50%, transparent);
  border-radius: 999px;
  color: var(--muted);
  transition: all 0.3s ease;
  min-height: 140px;
  word-break: break-word;
}

.file-input-wrapper:hover .file-input-label,
.file-input-wrapper input[type="file"]:focus + .file-input-label {
  background: var(--glass-strong);
  border-color: var(--accent);
  color: var(--text);
}

.icon-upload {
  font-size: 32px;
  color: var(--accent);
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

.file-input-wrapper:hover .icon-upload {
  transform: translateY(-4px);
}

.upload-action-btn {
  width: 100%;
  max-width: 520px;
  border: none;
  cursor: pointer;
}

#status {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.6;
  width: 100%;
  max-width: 520px;
  text-align: center;
}
