/* Kristopher Bennett — single-page portfolio */

:root {
  --bg: #090b0a;
  --bg-elevated: #101412;
  --text: #f2f4f1;
  --text-muted: #8b948c;
  --accent: #9fd4a8;
  --accent-deep: #5f9a6c;
  --line: rgba(242, 244, 241, 0.08);
  --glow: rgba(159, 212, 168, 0.14);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Sora", "Segoe UI", sans-serif;
  --radius: 18px;
  --max: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(159, 212, 168, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 20%, rgba(70, 110, 90, 0.18), transparent 50%),
    radial-gradient(ellipse 45% 35% at 0% 80%, rgba(40, 70, 55, 0.22), transparent 55%),
    linear-gradient(180deg, #0b0e0c 0%, #090b0a 45%, #080a09 100%);
  animation: drift 18s ease-in-out infinite alternate;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes drift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.05) translate3d(0, -1.5%, 0); }
}

.top {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(16, 20, 18, 0.65);
  backdrop-filter: blur(10px);
  transition: border-color 0.25s ease, color 0.25s ease;
}

.mark:hover {
  border-color: rgba(159, 212, 168, 0.35);
  color: var(--text);
}

.nav {
  display: flex;
  gap: 28px;
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--text-muted);
}

.nav a {
  position: relative;
  transition: color 0.2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

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

.nav a:hover::after {
  transform: scaleX(1);
}

.hero {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  min-height: calc(100svh - 90px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0 72px;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.brand {
  margin: 0;
  max-width: 11ch;
  font-family: var(--serif);
  font-size: clamp(3.4rem, 10vw, 7.2rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text);
}

.lede {
  margin: 28px 0 0;
  max-width: 34rem;
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  font-weight: 300;
  color: var(--text-muted);
}

.cta {
  margin-top: 40px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--text);
  color: #0b0e0c;
  font-size: 0.92rem;
  font-weight: 550;
  letter-spacing: 0.01em;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 0 0 0 var(--glow);
}

.button:hover {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 12px 40px var(--glow);
}

.apps {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 120px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  font-weight: 300;
}

.app-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.app {
  border-bottom: 1px solid var(--line);
}

.app-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 28px 6px;
  transition: background 0.25s ease, padding 0.25s ease;
}

.app-link:hover {
  background: rgba(159, 212, 168, 0.04);
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(159, 212, 168, 0.28), rgba(95, 154, 108, 0.12)),
    var(--bg-elevated);
  border: 1px solid rgba(159, 212, 168, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.app-icon span {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--accent);
}

.app-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 8px;
}

.app-copy h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 550;
  letter-spacing: -0.01em;
}

.app-copy p {
  margin: 0;
  max-width: 42rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 300;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(159, 212, 168, 0.28);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-arrow {
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: transform 0.25s ease, color 0.25s ease;
}

.app-link:hover .app-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

.footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 48px;
  display: grid;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand strong {
  font-weight: 550;
}

.footer-brand span,
.copyright {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 300;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.copyright {
  margin: 8px 0 0;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .top {
    width: min(var(--max), calc(100% - 28px));
    padding-top: 20px;
  }

  .hero,
  .apps,
  .footer {
    width: min(var(--max), calc(100% - 28px));
  }

  .hero {
    min-height: calc(100svh - 76px);
    padding: 36px 0 64px;
  }

  .app-link {
    grid-template-columns: auto 1fr;
    gap: 16px;
    padding: 22px 0;
  }

  .app-arrow {
    display: none;
  }

  .app-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }
}

/* Legal pages (privacy / terms) */

.legal-page .top .mark {
  /* same mark, links home */
}

.legal {
  width: min(720px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

.legal-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.legal-header .eyebrow {
  margin-bottom: 14px;
}

.legal-header h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.legal-meta {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 300;
}

.legal-body h2 {
  margin: 36px 0 12px;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.legal-body h3 {
  margin: 22px 0 8px;
  font-size: 1rem;
  font-weight: 550;
}

.legal-body p,
.legal-body li {
  color: var(--text-muted);
  font-weight: 300;
  font-size: 0.98rem;
}

.legal-body p {
  margin: 0 0 14px;
}

.legal-body ul {
  margin: 0 0 16px;
  padding-left: 1.2rem;
}

.legal-body li {
  margin-bottom: 6px;
}

.legal-body strong {
  color: var(--text);
  font-weight: 550;
}

.legal-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-body a:hover {
  color: var(--text);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 0.92rem;
}

.legal-table th,
.legal-table td {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--line);
  vertical-align: top;
}

.legal-table th {
  background: rgba(159, 212, 168, 0.06);
  color: var(--text);
  font-weight: 550;
}

.legal-table td {
  color: var(--text-muted);
  font-weight: 300;
}

.legal-note {
  margin-top: 28px;
  padding: 16px 18px;
  border: 1px solid rgba(159, 212, 168, 0.22);
  border-radius: 14px;
  background: rgba(159, 212, 168, 0.05);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 300;
}

@media (max-width: 720px) {
  .legal {
    width: min(720px, calc(100% - 28px));
    padding-top: 36px;
  }

  .legal-table th,
  .legal-table td {
    padding: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .button:hover,
  .app-link:hover .app-arrow {
    transform: none;
  }
}
