/* CSS Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-void: #050505;
  --color-text: #e5e5e5;
  --color-muted: #737373;
  --color-subtle: #a3a3a3;
  --color-accent: #22d3ee;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* Game of Life canvas */
#gol-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

html {
  height: 100%;
  background-color: var(--color-void);
}

body {
  min-height: 100%;
  background-color: var(--color-void);
  font-family: var(--font-mono);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
}

/* Main layout */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  min-height: 100vh;
}

/* Ambient glow effect */
.glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 0.03;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
  pointer-events: none;
}

/* Content container */
.content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 320px;
  animation: fade-in-up 0.6s ease-out forwards;
}

/* Header */
header {
  margin-bottom: 4rem;
}

h1 {
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--color-text);
}

.tagline {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--color-muted);
  min-height: 1.5em;
}

/* Typewriter cursor */
.cursor {
  color: var(--color-accent);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Navigation links */
nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  text-decoration: none;
  color: var(--color-subtle);
  transition: color 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.link:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.link:hover {
  color: var(--color-text);
}

.link-text {
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.external-icon {
  width: 0.875rem;
  height: 0.875rem;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.link:hover .external-icon {
  opacity: 1;
}

/* Hover line animation */
.hover-line {
  position: absolute;
  bottom: 0.5rem;
  left: 0;
  height: 1px;
  width: 0;
  background-color: rgba(34, 211, 238, 0.4);
  transition: width 0.3s ease-out;
}

.link:hover .hover-line {
  width: 100%;
}

/* Footer */
footer {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer a {
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Animation */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 480px) {
  h1 {
    font-size: 1.125rem;
  }

  .content {
    max-width: 280px;
  }
}
