/* flock.computer — Swiss minimal */

@font-face {
  font-family: "iA Writer Mono";
  src: url("assets/fonts/iAWriterMonoV.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #fff;
  --gray: #666;
  --light: #f5f5f5;
  --font: "iA Writer Mono", monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

/* Custom selection */
::selection {
  background: var(--black);
  color: var(--white);
}

/* Scroll progress */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--black);
  z-index: 200;
  transition: width 0.1s linear;
}

body {
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  max-width: 720px;
  margin: 0 auto;
}

/* Subtle grain texture */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
  z-index: 9999;
}

/* Header */
header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.5rem 0;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

h1 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.contact {
  display: flex;
  gap: 1.25rem;
}

.contact a {
  font-size: 0.8125rem;
  color: var(--gray);
  text-decoration: none;
  transition: color 0.15s;
}

.contact a:hover {
  color: var(--black);
}

/* Main */
main {
  flex: 1;
}

/* Intro */
.intro {
  margin-bottom: 4rem;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeIn 0.5s ease 0.05s forwards;
}

.intro p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--gray);
  max-width: 520px;
}

h2 {
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray);
  margin-bottom: 2rem;
}

/* Timeline */
.timeline {
  border-left: 1px solid var(--black);
  padding-left: 1.5rem;
}

.entry {
  margin-bottom: 2.5rem;
  position: relative;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.entry.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.entry::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 0.5rem;
  width: 5px;
  height: 5px;
  background: var(--black);
  border-radius: 50%;
  transform: translateX(-50%);
  transition: transform 0.2s ease;
}

.entry:hover::before {
  transform: translateX(-50%) scale(1.4);
}

.entry time {
  display: block;
  font-size: 0.75rem;
  color: var(--gray);
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}

.entry h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.entry p {
  color: var(--gray);
  font-size: 0.9375rem;
}

.entry img,
.entry video {
  max-width: 100%;
  margin-top: 1rem;
  display: block;
}

.entry img {
  border: 1px solid var(--light);
}

/* Footnotes */
.footnotes {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--light);
  font-size: 0.8125rem;
}

.footnotes ol {
  padding-left: 1.25rem;
  color: var(--gray);
}

.footnotes li {
  margin-bottom: 0.5rem;
}

.footnotes a {
  color: var(--gray);
  text-decoration: none;
  margin-left: 0.25rem;
}

.footnote-ref a {
  color: var(--gray);
  text-decoration: none;
  font-size: 0.75rem;
}

.footnote-ref a:hover,
.footnotes a:hover {
  color: var(--black);
}

/* Footer */
footer {
  position: sticky;
  bottom: 0;
  margin-top: 4rem;
  padding: 1rem 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--light);
  z-index: 100;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--gray);
}

.footer-row a {
  color: var(--gray);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-row a:hover {
  color: var(--black);
}

/* Responsive */
@media (max-width: 540px) {
  body {
    padding: 1.5rem;
  }
  
  header {
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
  }
  
  .intro {
    margin-bottom: 3rem;
  }
  
  .footer-row {
    flex-wrap: wrap;
  }
}

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