/* ═══════════════════════════════════════
   The One Man Company — Styles
   ═══════════════════════════════════════ */

/* ── Reset & Base ── */

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

:root {
  --bg: #FAFBFC;
  --surface: #FFFFFF;
  --text: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --primary: #6366F1;
  --secondary: #EC4899;
  --accent-green: #10B981;
  --accent-amber: #F59E0B;
  --accent-violet: #8B5CF6;
  --accent-cyan: #06B6D4;
  --radius: 12px;
  --radius-sm: 8px;
  --container: 1120px;
  --narrow: 740px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: #4F46E5; }

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

/* ── Layout ── */

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--narrow); }

/* ── Geometric Background ── */

.geo-bg {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0; overflow: hidden;
}

.geo-circle {
  position: absolute; border-radius: 50%;
}

.geo-1 {
  width: 600px; height: 600px;
  top: -120px; right: -100px;
  background: radial-gradient(circle, rgba(99,102,241,.07) 0%, transparent 70%);
}

.geo-2 {
  width: 400px; height: 400px;
  bottom: 10%; left: -80px;
  background: radial-gradient(circle, rgba(16,185,129,.06) 0%, transparent 70%);
}

.geo-3 {
  width: 350px; height: 350px;
  top: 45%; right: 5%;
  background: radial-gradient(circle, rgba(236,72,153,.05) 0%, transparent 70%);
}

.geo-line {
  position: absolute;
  height: 1px; width: 140%;
  left: -20%;
}

.geo-l1 {
  top: 32%;
  background: linear-gradient(90deg, transparent 0%, rgba(99,102,241,.08) 30%, rgba(236,72,153,.08) 70%, transparent 100%);
  transform: rotate(-4deg);
}

.geo-l2 {
  top: 68%;
  background: linear-gradient(90deg, transparent 0%, rgba(245,158,11,.06) 40%, rgba(16,185,129,.06) 60%, transparent 100%);
  transform: rotate(3deg);
}

/* ── Header ── */

.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,251,252,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 18px; color: var(--text);
  letter-spacing: -.02em;
}

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

.logo-geo {
  position: relative; width: 28px; height: 28px; display: block;
}

.lg-c1 {
  position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary); top: 0; left: 0;
}

.lg-c2 {
  position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: var(--secondary); opacity: .8; top: 3px; left: 14px;
}

.lg-c3 {
  position: absolute; width: 10px; height: 10px; border-radius: 3px;
  background: var(--accent-amber); opacity: .75; top: 16px; left: 8px;
  transform: rotate(20deg);
}

.nav { display: flex; gap: 32px; }
.nav a {
  color: var(--text-secondary); font-size: 15px; font-weight: 500;
  transition: color .15s;
}
.nav a:hover, .nav a.active { color: var(--text); }
.nav a.active { position: relative; }
.nav a.active::after {
  content: ''; position: absolute;
  bottom: -4px; left: 0; right: 0; height: 2px;
  background: var(--primary); border-radius: 1px;
}

.menu-btn {
  display: none; background: none; border: none; cursor: pointer;
  width: 44px; height: 44px; flex-direction: column; justify-content: center; gap: 5px; align-items: center;
  -webkit-tap-highlight-color: transparent;
}
.menu-btn span {
  display: block; width: 20px; height: 2px; background: var(--text);
  border-radius: 1px; transition: transform .25s, opacity .25s;
}
.menu-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.active span:nth-child(2) { opacity: 0; }
.menu-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
  display: none; position: fixed; inset: 0; z-index: 99;
  background: rgba(0,0,0,.3);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.nav-overlay.open { display: block; }

/* ── Hero ── */

.hero {
  position: relative; padding: 100px 0 80px; overflow: hidden;
}

.hero-content { max-width: 680px; position: relative; z-index: 1; }

.badge {
  display: inline-block;
  font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--primary);
  background: rgba(99,102,241,.08);
  padding: 6px 14px; border-radius: 20px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800; line-height: 1.12;
  letter-spacing: -.03em; margin-bottom: 24px;
}

.grad {
  background: linear-gradient(135deg, #6366F1 0%, #EC4899 50%, #F59E0B 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  font-size: 1.2rem; line-height: 1.6; color: var(--text-secondary);
  margin-bottom: 12px;
}
.hero-lead a { font-weight: 600; }
.hero-lead strong { color: var(--text); font-weight: 600; }

.hero-sub {
  font-size: 1.05rem; color: var(--text-muted); line-height: 1.6;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Buttons */

.btn {
  display: inline-flex; align-items: center;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; transition: all .2s;
}

.btn-primary {
  background: var(--primary); color: #fff;
}
.btn-primary:hover { background: #4F46E5; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,.3); }

.btn-ghost {
  color: var(--text-secondary); border: 1px solid var(--border);
  background: var(--surface);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }

/* Hero geometric shapes */

.hero-shapes {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
}

.hs { position: absolute; border-radius: 50%; }

.hs-1 {
  width: 320px; height: 320px;
  top: -20px; right: -40px;
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(236,72,153,.08));
}

.hs-2 {
  width: 140px; height: 140px;
  top: 60%; right: 18%;
  background: linear-gradient(135deg, rgba(16,185,129,.15), rgba(6,182,212,.1));
}

.hs-3 {
  width: 80px; height: 80px;
  top: 20%; right: 30%;
  background: rgba(245,158,11,.12);
}

.hs-4 {
  width: 60px; height: 60px;
  bottom: 10%; right: 45%;
  border-radius: 6px;
  background: rgba(139,92,246,.1);
  transform: rotate(30deg);
}

.hs-5 {
  width: 24px; height: 24px;
  top: 40%; right: 12%;
  background: rgba(236,72,153,.2);
}

/* ── Stack Section ── */

.stack {
  padding: 80px 0;
  position: relative; z-index: 1;
}

.stack h2, .posts-section h2, .page-hero h1, .post-full h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800; letter-spacing: -.02em;
  margin-bottom: 12px;
}

.section-lead {
  font-size: 1.1rem; color: var(--text-muted);
  margin-bottom: 48px; max-width: 560px;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}

.stack-item {
  padding-top: 16px;
  border-top: 2px solid var(--c);
}

.stack-item h3 {
  font-size: 1rem; font-weight: 700;
  margin-bottom: 6px;
}

.stack-item p {
  font-size: .9rem; color: var(--text-secondary);
  line-height: 1.55;
}

/* ── Dashboard Placeholder ── */

.dash-section {
  padding: 0 0 80px;
  position: relative; z-index: 1;
}

.dash-placeholder {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 60px 24px;
  text-align: center;
}

.dash-inner {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  color: var(--text-muted); font-size: .95rem;
}

.dash-icon { font-size: 1.3rem; }

/* ── Posts Section ── */

.posts-section {
  padding: 80px 0 100px;
  position: relative; z-index: 1;
}

.post-list {
  display: grid; gap: 16px;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .2s;
  overflow: hidden;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  border-color: rgba(99,102,241,.2);
}

.post-card a {
  display: block; padding: 28px; color: var(--text);
}

.post-card h3 {
  font-size: 1.2rem; font-weight: 700;
  margin-bottom: 8px; line-height: 1.35;
}

.post-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; color: var(--text-muted);
  margin-bottom: 10px;
}

.sep { color: var(--border); }

.post-excerpt {
  font-size: .95rem; color: var(--text-secondary);
  line-height: 1.55; margin-bottom: 12px;
}

.post-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-size: .75rem; font-weight: 600;
  padding: 3px 10px; border-radius: 12px;
  background: rgba(99,102,241,.06);
  color: var(--primary);
  letter-spacing: .01em;
}

/* ── Post Full ── */

.post-full { padding: 60px 0 100px; position: relative; z-index: 1; }

.back-link {
  display: inline-block; font-size: .9rem; color: var(--text-muted);
  margin-bottom: 32px; font-weight: 500;
}
.back-link:hover { color: var(--primary); }

.post-header { margin-bottom: 48px; }
.post-header h1 { margin-top: 12px; margin-bottom: 16px; }

/* ── Prose ── */

.prose {
  font-size: 1.05rem; line-height: 1.75; color: var(--text-secondary);
}

.prose p { margin-bottom: 1.4em; }
.prose strong { color: var(--text); font-weight: 600; }

.prose h2 {
  font-size: 1.5rem; font-weight: 700; color: var(--text);
  margin-top: 2.5em; margin-bottom: .8em; letter-spacing: -.01em;
}

.prose h3 {
  font-size: 1.2rem; font-weight: 700; color: var(--text);
  margin-top: 2em; margin-bottom: .6em;
}

.prose ul, .prose ol {
  margin-bottom: 1.4em; padding-left: 1.5em;
}
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--primary); }

.prose a { font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: #4F46E5; }

.prose blockquote {
  border-left: 3px solid var(--primary);
  padding: .8em 1.2em; margin: 1.6em 0;
  background: rgba(99,102,241,.03); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
}

.prose code {
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, monospace;
  font-size: .88em; padding: 2px 6px;
  background: rgba(99,102,241,.06); border-radius: 4px;
  color: var(--primary);
}

.prose pre {
  margin: 1.6em 0; padding: 20px 24px;
  background: #1E293B; color: #E2E8F0;
  border-radius: var(--radius-sm); overflow-x: auto;
  font-size: .9rem; line-height: 1.6;
}

.prose pre code {
  background: none; padding: 0; color: inherit;
  font-size: inherit;
}

.prose img {
  border-radius: var(--radius-sm);
  margin: 1.6em 0;
}

.prose hr {
  border: none; height: 1px;
  background: var(--border); margin: 2.5em 0;
}

/* ── Page Hero ── */

.page-hero {
  padding: 80px 0 48px;
  position: relative; z-index: 1;
}

.page-hero h1 { margin-bottom: 12px; }

/* ── Projects ── */

.projects-section {
  padding: 0 0 100px;
  position: relative; z-index: 1;
}

.narrow-lg { max-width: 860px; }

.projects-list {
  display: flex; flex-direction: column;
}

.project-row {
  display: flex; gap: 24px; align-items: flex-start;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.project-row:first-child { padding-top: 0; }
.project-row:last-child { border-bottom: none; }

.project-accent {
  width: 4px; min-height: 48px; border-radius: 2px;
  background: var(--c);
  flex-shrink: 0;
  margin-top: 2px;
}

.project-body { flex: 1; }

.project-top {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.project-top h3 {
  font-size: 1.15rem; font-weight: 700;
}

.project-body > p {
  font-size: .95rem; color: var(--text-secondary);
  line-height: 1.6;
}

/* ── About ── */

.about-section {
  padding: 0 0 100px;
  position: relative; z-index: 1;
}

.about-lead {
  font-size: 1.2rem !important;
  color: var(--text) !important;
}

/* ── Footer ── */

.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  position: relative; z-index: 1;
  background: rgba(250,251,252,.9);
}

.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .9rem; color: var(--text-muted);
}

.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-muted); font-weight: 500; }
.footer-links a:hover { color: var(--text); }

/* ── Responsive ── */

@media (max-width: 768px) {
  .hero { padding: 60px 0 48px; }

  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    background: var(--bg);
    flex-direction: column; align-items: center; justify-content: center;
    gap: 40px; font-size: 1.2rem;
    z-index: 99;
    opacity: 0; pointer-events: none;
    transform: translateY(-12px);
    transition: opacity .25s, transform .25s;
  }
  .nav.open { opacity: 1; pointer-events: auto; transform: none; }

  .menu-btn { display: flex; }

  .hero h1 { font-size: 2rem; }
  .hero-shapes { display: none; }

  .stack-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }

  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }

  .post-card a { padding: 20px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 1.7rem; }
  .hero-lead { font-size: 1.05rem; }
  .btn { padding: 10px 18px; font-size: 14px; }
  .stack-grid { grid-template-columns: 1fr; }
}
