/* =========================
   Root Variables
   ========================= */
:root {
  --bg: #f7fafc;
  --surface: rgba(255,255,255,0.75);
  --muted: #6b7280;
  --text: #0f172a;
  --accent: #2563eb;

  /* Fonts */
  --pt-serif: 'PT Serif', serif;
  --mono: 'JetBrains Mono', monospace;
}

/* =========================
   Global Reset & Layout
   ========================= */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;

  font-family: var(--pt-serif);
  background: var(--bg);
  color: var(--text);

  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s, color 0.3s;
}

/* =========================
   Containers & Structure
   ========================= */
.container {
  max-width: 1100px;
  margin: 1.25rem auto;
  padding: 1rem;
}

main.container,
main#content {
  position: relative;
  z-index: 2;
  flex: 1;
  padding-top: 1rem;
}

/* Brand (global, not navbar-specific) */
.brand {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
}

/* =========================
   Typography
   ========================= */
code,
pre,
.mono {
  font-family: var(--mono);
}

/* =========================
   Animations
   ========================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade {
  animation: fadeInUp 450ms ease both;
}

/* =========================
   Images
   ========================= */
.square {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
}

.square img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================
   Dark Mode Variables
   ========================= */
html.dark {
  --bg: #071128;
  --surface: rgba(7, 21, 40, 0.75);
  --muted: #9ba7b8;
  --text: #e6eef8;
  --accent: #60a5fa;
}

/* =========================
   Dark Mode Base Overrides
   ========================= */
.dark body {
  background: var(--bg);
  color: var(--text);
}
