:root {
  --bg: #fafafa;
  --text: #0a0a0a;
  --muted: #737373;
  --subtle: #a3a3a3;
  --border: #e5e5e5;
  --accent: #171717;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

/* Typography */
h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
}

h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--subtle);
  font-weight: 500;
  margin: 3rem 0 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1rem;
  margin: 0 0 0.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent);
}

p { margin: 0.4rem 0; }

/* Links — persistent underline so clickable elements are obvious */
a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(10, 10, 10, 0.22);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 200ms ease, color 200ms ease;
}

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

/* External-destination arrow for links inside content (titles, project meta) */
h3 a[href^="http"]::after,
.meta a[href^="http"]::after {
  content: "\2197";
  display: inline-block;
  margin-left: 0.18em;
  font-size: 0.78em;
  color: var(--subtle);
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1), color 200ms ease;
}

h3 a[href^="http"]:hover::after,
.meta a[href^="http"]:hover::after {
  transform: translate(2px, -2px);
  color: var(--accent);
}

/* Hero */
.hero {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-bottom: 0.5rem;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.1);
  transform-origin: center 35%;
  transition: transform 450ms cubic-bezier(0.4, 0, 0.2, 1),
              filter 450ms ease;
}

.avatar:hover img {
  transform: scale(1.14);
  filter: grayscale(15%);
}

.tagline {
  color: var(--muted);
  margin: 0 0 0.85rem;
  font-size: 0.98rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  font-size: 0.92rem;
  margin: 0;
}

.links a {
  color: var(--muted);
  text-decoration-color: rgba(115, 115, 115, 0.35);
}
.links a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* Entries */
.entry { margin: 1.4rem 0 1.6rem; }

.meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 0.4rem;
}

.meta a { color: var(--muted); }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  background: #f0f0f0;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  margin-left: 0.5rem;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

/* Footer */
footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
}

footer a { color: var(--muted); }

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero fades in immediately on load */
.hero {
  transition-delay: 80ms;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Mobile */
@media (max-width: 540px) {
  main { padding: 2.5rem 1.25rem 3.5rem; }
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  .avatar { width: 96px; height: 96px; }
  h1 { font-size: 1.5rem; }
  .badge {
    display: inline-block;
    margin: 0.3rem 0 0;
  }
  h3 { line-height: 1.4; }
}
