/* kobakobaltz.com — Samuel Ruggeri */

:root {
  --bg: #0a0b0f;
  --bg-elevated: #12141c;
  --bg-card: #161922;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eaef;
  --text-muted: #8b92a8;
  --accent: #5eead4;
  --accent-dim: rgba(94, 234, 212, 0.15);
  --accent-glow: rgba(94, 234, 212, 0.35);
  --gradient: linear-gradient(135deg, #5eead4 0%, #38bdf8 50%, #a78bfa 100%);
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --header-h: 72px;
  --container: min(1120px, calc(100% - 2.5rem));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: #99f6e4;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

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

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s;
}

.site-header.is-scrolled {
  background: rgba(10, 11, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

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

.logo-mark {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--gradient);
  box-shadow: 0 0 20px var(--accent-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

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

.nav-cta {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent) !important;
  border: 1px solid rgba(94, 234, 212, 0.25);
}

.nav-cta:hover {
  background: rgba(94, 234, 212, 0.25);
  color: #99f6e4 !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.hero-orb--1 {
  width: 480px;
  height: 480px;
  top: -10%;
  right: -5%;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.4) 0%, transparent 70%);
}

.hero-orb--2 {
  width: 360px;
  height: 360px;
  bottom: 10%;
  left: -8%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.35) 0%, transparent 70%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 75%);
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-title {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 16ch;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 0 0 2rem;
  max-width: 36rem;
  font-size: 1.1875rem;
  color: var(--text-muted);
}

.hero-lead strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  color: var(--bg);
  background: var(--accent);
  box-shadow: 0 0 32px var(--accent-glow);
}

.btn-primary:hover {
  background: #99f6e4;
  color: var(--bg);
  box-shadow: 0 0 48px var(--accent-glow);
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--bg-elevated);
  color: var(--text);
}

.btn-full {
  width: 100%;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 0;
  padding: 1.75rem 0 0;
  list-style: none;
  border-top: 1px solid var(--border);
  max-width: 36rem;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Sections */
.section {
  padding: 6rem 0;
}

.section-header {
  max-width: 38rem;
  margin-bottom: 3rem;
}

.section-header h2,
.about-content h2,
.contact-intro h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-desc {
  margin: 0;
  color: var(--text-muted);
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s;
}

.card:hover {
  border-color: rgba(94, 234, 212, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.25rem;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--accent-dim);
  color: var(--accent);
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
}

.card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* About */
.about {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-frame {
  position: relative;
}

.about-frame::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 60%);
  pointer-events: none;
}

.code-window {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #0d0f14;
  overflow: hidden;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.4);
}

.code-window-bar {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.code-window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.code-window-bar span:nth-child(1) { background: #f87171; }
.code-window-bar span:nth-child(2) { background: #fbbf24; }
.code-window-bar span:nth-child(3) { background: #4ade80; }

.code-window pre {
  margin: 0;
  padding: 1.5rem;
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 1.7;
}

.code-window code {
  font-family: "SF Mono", "Fira Code", ui-monospace, monospace;
  color: var(--text-muted);
}

.tok-keyword { color: #c084fc; }
.tok-prop { color: #7dd3fc; }
.tok-string { color: #86efac; }
.tok-bool { color: #fbbf24; }

.about-content p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.about-content p strong {
  color: var(--text);
}

.about-list {
  margin: 1.5rem 0 2rem;
  padding: 0;
  list-style: none;
}

.about-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4rem;
  align-items: start;
}

.contact-intro p {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
}

.contact-meta {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-meta li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.meta-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.meta-value {
  font-weight: 500;
}

.contact-form {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.form-row {
  margin-bottom: 1.25rem;
}

.form-row label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: #5c6378;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: rgba(94, 234, 212, 0.5);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-row textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row input.is-invalid,
.form-row select.is-invalid,
.form-row textarea.is-invalid {
  border-color: #f87171;
}

.form-note {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  text-align: center;
}

.form-note.is-success {
  color: var(--accent);
}

.form-note.is-error {
  color: #f87171;
}

/* Footer */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand p {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-domain a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-visual {
    order: -1;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    background: rgba(10, 11, 15, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s var(--ease), opacity 0.35s, visibility 0.35s;
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links li a {
    display: block;
    padding: 1rem;
    border-radius: var(--radius);
  }

  .nav-links li a:hover {
    background: var(--bg-elevated);
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .section {
    padding: 4rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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