/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* ---------- tokens (dark theme) ---------- */
:root {
  --color-text: #e8e6e3;
  --color-muted: #888581;
  --color-bg: #111111;
  --color-bg-2: #1a1a1a;
  --color-surface: #1c1c1c;
  --color-accent: #FF3D5A;
  --color-link: #4FAAE2;
  --color-line: rgba(232, 230, 227, 0.08);

  --font-body: "Lato", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --content-width: 640px;
  --space: 1.5rem;
}

/* ---------- base ---------- */
html { background: var(--color-bg); }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, var(--color-bg-2), transparent 70%),
    var(--color-bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Center the home content vertically; let post pages flow naturally from the top. */
main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) 1.5rem;
}

main:has(.home) {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Links: subtle by default, accent on hover. */
a {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(79, 170, 226, 0.35);
  text-underline-offset: 0.2em;
  transition: color .2s ease, text-decoration-color .2s ease;
}
a:hover {
  color: var(--color-accent);
  text-decoration-color: var(--color-accent);
}

h1, h2, h3, h4 {
  font-family: var(--font-mono);
  line-height: 1.15;
  margin: 0 0 .75em;
  color: var(--color-text);
  font-weight: 700;
}

p { margin: 0 0 1em; }

::selection { background: var(--color-accent); color: #fff; }

/* ---------- home ---------- */
/* Container is centered on the page (via main's max-width).
   Content inside is left-aligned. */
.home {
  text-align: left;
}

.home .name {
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.01em;
  margin-bottom: .15em;
}

.home .tagline {
  font-family: var(--font-mono);
  color: var(--color-accent);
  font-size: .95rem;
  letter-spacing: 0.02em;
  margin: 0 0 calc(var(--space) * 1.25);
}

.home .intro {
  font-size: 1.1rem;
  margin: 0 0 1rem;
  max-width: 36rem;
}

/* Second .intro = the credentials line. Render quieter than the first. */
.home .intro + .intro {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin-top: 1.25rem;
}

/* ---------- orbit (portrait + animated dots) ---------- */
.orbit {
  position: relative;
  display: block;
  margin: 0 0 2.5rem;
  width: 200px;
  height: 200px;
  flex: 0 0 auto;
}

.orbit img {
  border-radius: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 1px var(--color-line),
              0 8px 32px rgba(0, 0, 0, 0.4);
}

.orbit > div {
  width: 11px;
  height: 11px;
  border-radius: 100%;
  position: absolute;
}

.orbit .orbit-1 {
  background: var(--color-accent);
  box-shadow: 0 0 12px rgba(255, 61, 90, 0.45);
  animation: orbit1 6s cubic-bezier(0.46, 0.03, 0.52, 0.96) infinite;
}

.orbit .orbit-2 {
  background: var(--color-link);
  box-shadow: 0 0 12px rgba(79, 170, 226, 0.45);
  animation: orbit2 7s cubic-bezier(0.46, 0.03, 0.52, 0.96) infinite;
}

.orbit .orbit-3 {
  background: yellowgreen;
  box-shadow: 0 0 12px rgba(154, 205, 50, 0.45);
  animation: orbit3 8s cubic-bezier(0.46, 0.03, 0.52, 0.96) infinite;
}

@keyframes orbit1 {
  0%   { top: 0;   left: 0;    z-index: 2; }
  50%  { top: 10%; left: 100%; z-index: 2; }
  51%  { top: 10%; left: 100%; z-index: 0; }
  100% { top: 0;   left: 0;    z-index: 0; }
}

@keyframes orbit2 {
  0%   { top: 50%; left: 101%; z-index: 2; }
  50%  { top: 90%; left: 5%;   z-index: 2; }
  51%  { top: 90%; left: 5%;   z-index: 0; }
  100% { top: 50%; left: 101%; z-index: 0; }
}

@keyframes orbit3 {
  0%   { top: 5%;  left: 10%; z-index: 2; }
  50%  { top: 95%; left: 75%; z-index: 2; }
  51%  { top: 95%; left: 75%; z-index: 0; }
  100% { top: 5%;  left: 10%; z-index: 0; }
}

/* Respect reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
  .orbit .orbit-1, .orbit .orbit-2, .orbit .orbit-3 { animation: none; }
}

/* ---------- post (ready for future use) ---------- */
.post-header { margin-bottom: 2rem; }
.post-title  { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: .25em; letter-spacing: -0.01em; }
.post-meta   { color: var(--color-muted); font-family: var(--font-mono); font-size: .9rem; margin: 0; }

.post-content img { max-width: 100%; height: auto; border-radius: 4px; }
.post-content pre {
  font-family: var(--font-mono);
  font-size: .9rem;
  background: var(--color-surface);
  color: var(--color-text);
  padding: 1rem;
  overflow-x: auto;
  border-radius: 6px;
  border: 1px solid var(--color-line);
}
.post-content code {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--color-surface);
  padding: .15em .35em;
  border-radius: 3px;
}
.post-content pre code { background: transparent; padding: 0; }
.post-content blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--color-accent);
  color: var(--color-muted);
  font-style: italic;
}
.post-content hr {
  border: none;
  border-top: 1px solid var(--color-line);
  margin: 2rem 0;
}
