@import url("https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;500;700&display=swap");
@font-face {
  font-family: "Andy";
  src: url("../assets/fonts/AndyBold.OTF");
  
}
/* ======================================================
   design tokens (theme)
   ====================================================== */

:root {
  --bg: #002b36;           /* base03 */
  --surface: #073642;      /* base02 */
  --surface-2: #0b3c49;    /* leve variação */

  --fg: #93a1a1;           /* base1 */
  --fg-muted: #586e75;     /* base01 */

  --accent: #6c71c4;       /* violet */
  --accent-strong: #5b60b3;
  --accent-muted: #7f84d6;

  --accent-warm: #b58900;  /* yellow */
  --accent-warm-strong: #cb4b16; /* orange */
  --accent-warm-muted: #d3a21a;

  --border: #094352;       /* derivado de base02 */
}


/* ======================================================
   base reset + viewport lock
   ====================================================== */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: "Andy", "Ubuntu", system-ui, sans-serif;
  overflow: hidden; /* no page scroll */
}

/* ======================================================
   layout system (app shell)
   ====================================================== */

.app-root {
  width: 100dvw;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
}

/* header / topbar */

.topbar {
  position: relative;
  z-index: 10;
  padding: clamp(12px, 3vw, 20px);
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* main content area */

main {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden; /* lock */
  display: grid;
  place-items: center;
  padding: 0;
}

/* only scrollable area */

#content {
  width: 100%;
  max-width: 88ch;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: clamp(1rem, 4vw, 2.5rem);
  margin: 0 auto;
}



/* ======================================================
   background layer
   ====================================================== */

canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  filter: blur(1.2px);
}

/* ======================================================
   typography module
   ====================================================== */

h1 {
  margin: 0 0 1rem 0;
  font-size: clamp(1.6rem, 6vw, 2.8rem);
  color: var(--accent);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.2rem, 5vw, 1.6rem);
}

h3 {
  font-size: clamp(1.05rem, 4vw, 1.3rem);
}

p {
  font-size: clamp(1rem, 2.5vw, 1.05rem);
  line-height: 1.85;
  color: var(--fg);
}

a {
  color: var(--accent-muted);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* spacing for editorial flow */

#content > * + * {
  margin-top: 1.5rem;
}

/* ======================================================
   media
   ====================================================== */

#content img {
  display: block;
  width: clamp(64px, 30vw, 96px);
  height: clamp(64px, 30vw, 96px);
  margin-bottom: 1rem;
  border-radius: 10px;
}

/* ======================================================
   ui primitives (reusable)
   ====================================================== */

.ui-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.ui-soft {
  background: rgba(18, 11, 28, 0.6);
}

.ui-scroll {
  overflow-y: auto;
}

.ui-center {
  display: grid;
  place-items: center;
}

.ui-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ui-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ======================================================
   buttons & inputs
   ====================================================== */

button {
  font-family: inherit;
  font-size: clamp(0.85rem, 3.5vw, 0.95rem);
  color: var(--accent-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

button:hover {
  color: var(--accent);
  text-decoration: underline;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input,
select {
  width: 100%;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--fg);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
}

/* ======================================================
   widgets (modular blocks)
   ====================================================== */

/* profile */

.profile-pic {
  width: clamp(28px, 6vw, 32px);
  height: clamp(28px, 6vw, 32px);
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* blog feed widget */

/* blog feed widget */

.blog-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.blog-post {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.blog-post:hover {
  opacity: 0.9;
  transform: translateX(4px);
}

.blog-post.latest {
  border-left: 3px solid var(--accent-warm);
  padding-left: 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.latest-tag {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--accent-warm);
  margin-bottom: 0.5rem;
}

.blog-post .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  opacity: 0.9;
  gap: 1rem;
}

.blog-post .preview {
  margin: 0.5rem 0 0.4rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.85;
}

.blog-post code {
  font-size: 0.75rem;
  opacity: 0.6;
}


/* facts widget */

.fact-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fact-text {
  font-size: 0.95rem;
}

.fact-next {
  font-size: 0.75rem;
}

/* chaos grid widget */

.chaos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.chaos-item {
  font-size: clamp(0.7rem, 3vw, 0.8rem);
  opacity: 0.9;
}

/* cards widget */

.card-container {
  display: grid;
  place-items: center;
  min-height: 40vh;
}

.card {
  width: min(320px, 90vw);
  height: 200px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.card.flipped {
  transform: rotatey(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  padding: 1.2rem;
  border-radius: 8px;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #000;
}

.card-back {
  transform: rotatey(180deg);
}

/* ======================================================
   overlays (modal widgets)
   ====================================================== */

.pages-overlay,
.image-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 4, 10, 0.92);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pages-box {
  width: 100%;
  max-width: 900px;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 1rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}

/* ======================================================
   loader
   ====================================================== */

#loader-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: grid;
  place-items: center;
}

.loader-gif {
  width: clamp(96px, 40vw, 160px);
  height: auto;
}

/* ======================================================
   utilities (helpers for html widgets)
   ====================================================== */

.u-hidden { display: none !important; }
.u-muted { color: var(--fg-muted); }
.u-accent { color: var(--accent); }
.u-warm { color: var(--accent-warm); }
.u-center { text-align: center; }
.u-full { width: 100%; height: 100%; }

/* ======================================================
   mobile
   ====================================================== */

@media (max-width: 600px) {
  #content {
    padding: 1rem;
  }
}

/* ======================================================
   promo corner widget (top-right)
   ====================================================== */

.promo-corner {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;

  display: flex;
  flex-direction: column;
  gap: 0.35rem;

  padding: 0.6rem 0.75rem;

  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.9),
    rgba(251, 191, 36, 0.9)
  );

  border-radius: 10px;
  box-shadow:
    0 0 24px rgba(139, 92, 246, 0.45),
    0 0 40px rgba(251, 191, 36, 0.25);

  font-family: inherit;
  text-decoration: none;
  color: #000;

  animation: promo-pulse 2.2s ease-in-out infinite;
}

/* letreiro */
.promo-corner .promo-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* link principal */
.promo-corner .promo-link {
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: underline;
}

/* hover */
.promo-corner:hover {
  transform: scale(1.03);
  box-shadow:
    0 0 32px rgba(139, 92, 246, 0.65),
    0 0 56px rgba(251, 191, 36, 0.45);
}

/* subtle pulse */
@keyframes promo-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.promo-corner {
  position: fixed!important;
  bottom: 1rem!important;
  right: 1rem!important;
  top: auto!important;          /* override */
}

.topbar {
  position: relative;
  background-image: url("../assets/photos/topbar-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(7, 11, 16, 0.55); /* dark overlay */
  pointer-events: none;
}

.topbar > * {
  position: relative;
  z-index: 1;
}

/* ======================================================
   continue screen (between loader and disclaimer)
   ====================================================== */

#continue-screen {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: #000;

  display: grid;
  place-items: center;

  cursor: pointer;
}

#continue-screen .continue-text {
  color: #fff;
  font-size: clamp(2.5rem, 10vw, 6rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  user-select: none;
}

/* file manager */

.file-manager {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
  height: 100%;
}

.file-tree {
  overflow-y: auto;
  font-size: 0.8rem;
  border-right: 1px solid var(--border);
  padding-right: 0.5rem;
}

.file-viewer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-content {
  background: rgba(0,0,0,0.4);
  padding: 1rem;
  border-radius: 6px;
  overflow: auto;
  font-size: 0.75rem;
}

.file-node {
  margin-left: 0.5rem;
}

.folder {
  cursor: pointer;
  font-weight: 600;
  margin: 0.2rem 0;
}

.file {
  cursor: pointer;
  opacity: 0.85;
  margin: 0.15rem 0;
}

.file:hover {
  opacity: 1;
}

.children.hidden {
  display: none;
}

@media (max-width: 800px) {
  .file-manager {
    grid-template-columns: 1fr;
  }

  .file-tree {
    max-height: 40vh;
  }
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

.layout {
  display: flex;
  gap: 2rem;
}

@media (max-width: 900px) {
  .layout {
    flex-direction: column;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .blog-post .meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .blog-post .preview {
    font-size: 0.9rem;
  }
}

img,
video,
canvas,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

@media (min-width: 1400px) {
  #content {
    max-width: 100ch;
  }
}

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

input,
textarea,
select {
  font-size: 16px;
}
