/* ==========================================================================
   Base & Reset
   ========================================================================== */

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

:root {
  --bg: #0a0a0a;
  --fg: #e8e8e8;
  --dim: #555;
  --accent: #888;
}

html {
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.7;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

/* ==========================================================================
   Canvas Background
   ========================================================================== */

canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 2rem;
  max-width: 720px;
  margin: 0 auto;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1rem;
  animation: fadeUp 1s ease-out;
}

.tagline {
  font-size: 0.875rem;
  color: var(--dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: fadeUp 1s ease-out 0.15s both;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.header {
  margin-bottom: 4rem;
}

.bio {
  margin-bottom: 4rem;
  animation: fadeUp 1s ease-out 0.3s both;
}

.bio p {
  font-size: 1rem;
  color: var(--accent);
  max-width: 50ch;
}

.bio p + p {
  margin-top: 1.25rem;
}

/* ==========================================================================
   Projects
   ========================================================================== */

.projects {
  margin-bottom: 4rem;
  animation: fadeUp 1s ease-out 0.45s both;
}

.projects h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.project-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.group-title {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 1rem;
}

.project-list {
  list-style: none;
  display: grid;
  gap: 0.9rem;
}

.project-list li {
  display: grid;
  gap: 0.2rem;
}

.project-list a {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  position: relative;
  width: fit-content;
  padding-bottom: 2px;
  transition: color 0.3s ease;
}

.project-list a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--dim);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.project-list a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.project-meta {
  font-size: 0.8rem;
  color: var(--accent);
}

/* ==========================================================================
   Links
   ========================================================================== */

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  animation: fadeUp 1s ease-out 0.45s both;
}

.links a {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s ease;
}

.links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--dim);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.links a:hover {
  color: var(--fg);
}

.links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ==========================================================================
   Footer & Coordinates
   ========================================================================== */

.footer {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  font-size: 0.7rem;
  color: var(--dim);
  letter-spacing: 0.1em;
  animation: fadeIn 1s ease-out 0.6s both;
}

.coordinates {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  font-size: 0.7rem;
  color: var(--dim);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  animation: fadeIn 1s ease-out 0.6s both;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
  .container {
    padding: 3rem 1.5rem;
  }

  .links {
    flex-direction: column;
    gap: 1.25rem;
  }

  .project-groups {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer,
  .coordinates {
    position: static;
    margin-top: 4rem;
  }

  .coordinates {
    margin-top: 0.5rem;
  }
}
