/* Serr Ventures — minimal, metric-forward */

:root {
  --bg: #fafaf9;
  --fg: #1c1917;
  --muted: #78716c;
  --accent: #292524;
  --border: #e7e5e4;
  --mono: "JetBrains Mono", monospace;
  --sans: "DM Sans", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Background: connected dynamic network */
.bg-shapes {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.shape-drag-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.shape-network {
  width: 100%;
  height: 100%;
  color: var(--fg);
}

/* Floating animation – gentle drift */
.float-group {
  transform-origin: 600px 400px;
  transform: scale(1.6);
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: scale(1.6) translate(0, 0); }
  25% { transform: scale(1.6) translate(6px, -8px); }
  50% { transform: scale(1.6) translate(-4px, 4px); }
  75% { transform: scale(1.6) translate(8px, 5px); }
}

/* Connection lines */
.conn {
  stroke: currentColor;
  stroke-width: 1;
  stroke-opacity: 0.12;
  fill: none;
  stroke-dasharray: 8 12;
  animation: flow 3s linear infinite;
}

.conn:nth-child(odd) { animation-delay: 0s; }
.conn:nth-child(even) { animation-delay: 1.5s; }

@keyframes flow {
  to { stroke-dashoffset: -20; }
}

/* Nodes – subtle pulse */
.node {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-opacity: 0.2;
  animation: pulse 4s ease-in-out infinite;
}

.node:nth-child(1) { animation-delay: 0s; }
.node:nth-child(2) { animation-delay: 0.5s; }
.node:nth-child(3) { animation-delay: 1s; }
.node:nth-child(4) { animation-delay: 1.5s; }
.node:nth-child(5) { animation-delay: 2s; }
.node:nth-child(6) { animation-delay: 0.3s; }
.node:nth-child(7) { animation-delay: 0.8s; }
.node:nth-child(8) { animation-delay: 1.3s; }
.node:nth-child(9) { animation-delay: 1.8s; }
.node:nth-child(10) { animation-delay: 2.3s; }

@keyframes pulse {
  0%, 100% { stroke-opacity: 0.12; }
  50% { stroke-opacity: 0.28; }
}

/* Header */
.header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 4rem;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: var(--fg);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 2.5rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

/* Main */
main {
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 6rem 4rem;
  width: 100%;
}

/* Hero */
.hero {
  margin-bottom: 8rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.hero-sub {
  font-size: 1.25rem;
  color: var(--muted);
}

/* Section labels */
.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* Metrics */
.metrics {
  margin-bottom: 8rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.metric-value {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.metric-unit {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
}

.metric-label {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Focus */
.focus {
  margin-bottom: 8rem;
}

.focus-list {
  list-style: none;
}

.focus-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 1.1rem;
}

.focus-list li:last-child {
  border-bottom: none;
}

/* Portfolio – public markets */
.portfolio {
  margin-bottom: 8rem;
}

.portfolio-intro {
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 1rem;
}

.periodic-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  max-width: 380px;
}

.element-card {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.15rem;
  border: 1px solid var(--fg);
  position: relative;
  background: var(--bg);
}

.element-num {
  position: absolute;
  top: 2px;
  left: 4px;
  font-family: var(--mono);
  font-size: 0.5rem;
  font-weight: 500;
  color: var(--muted);
}

.element-logo {
  position: absolute;
  top: 2px;
  right: 4px;
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
}

.element-symbol {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: 0.02em;
  margin-top: 0.15rem;
}

.element-name {
  font-size: 0.45rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.1;
  margin-top: 0.1rem;
  padding: 0 1px;
}

/* Contact */
.contact {
  margin-bottom: 4rem;
}

.contact-text {
  margin-bottom: 1rem;
  color: var(--muted);
}

.contact-link {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--fg);
  transition: opacity 0.2s;
}

.contact-link:hover {
  opacity: 0.7;
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 2rem 4rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 768px) {
  .header,
  main,
  .footer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  main {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .metric-value {
    font-size: 2rem;
  }

  .periodic-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
  }

  .element-symbol {
    font-size: 1rem;
  }

  .element-name {
    font-size: 0.5rem;
  }
}
