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

:root {
  /* Navy palette - aligned with soapbucket.com */
  --color-primary: #1E3A5F;
  --color-primary-light: #2D5F8A;
  --color-primary-dark: #0F2440;
  --color-primary-bg: #F0F4F8;

  /* Surfaces */
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-surface-dark: #0B1929;
  --color-surface-dark-2: #0F2440;

  /* Text */
  --color-text: #1A2332;
  --color-text-secondary: #5A6A7E;
  --color-text-muted: #8B97A8;

  /* Borders */
  --color-border: #D8DEE6;

  --max-width: 960px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Navigation - dark header matching .com */
header {
  position: sticky;
  top: 0;
  background: rgba(11, 25, 41, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 100;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Staatliches', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--color-primary-light), #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  line-height: 1.2;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* Hero */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 7rem 2rem 5rem;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.hero-founder {
  font-size: 1.1rem;
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero-founder a {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(30, 58, 95, 0.3);
  transition: border-color 0.2s;
}

.hero-founder a:hover {
  border-color: var(--color-primary);
}

.tagline {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Sections */
section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 2rem;
}

section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

section p {
  color: var(--color-text-secondary);
  max-width: 640px;
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* Story section */
.story {
  border-top: 1px solid var(--color-border);
}

.story p {
  font-size: 1.05rem;
}

/* Projects */
.projects {
  border-top: 1px solid var(--color-border);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 8px 24px rgba(30, 58, 95, 0.1);
  transform: translateY(-4px);
}

.project-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.project-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.project-icon.navy {
  background: linear-gradient(135deg, #1E3A5F, #1A56DB);
}

.project-icon.teal {
  background: linear-gradient(135deg, #0D9488, #14B8A6);
}

.project-icon.clictl {
  background: #ffffff;
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.project-icon.clictl img {
  object-fit: contain;
}

.project-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}

.project-badge {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.project-badge.live {
  background: #dcfce7;
  color: #16a34a;
}

.project-badge.beta {
  background: #fef3c7;
  color: #d97706;
}

.project-card p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  flex: 1;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.project-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem 0;
}

.project-highlights li {
  padding: 0.3rem 0 0.3rem 1.25rem;
  position: relative;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.project-highlights li::before {
  content: "\203A";
  position: absolute;
  left: 0.25rem;
  color: var(--color-primary);
  font-weight: 700;
}

.project-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-primary);
}

/* Contact */
.contact {
  border-top: 1px solid var(--color-border);
}

.email-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.email-link:hover {
  color: var(--color-primary-dark);
}

/* Footer */
footer {
  border-top: 1px solid var(--color-border);
  margin-top: 2rem;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-content p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: var(--color-text-muted);
  transition: color 0.2s;
}

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

/* Blog - Latest section on homepage */
.latest {
  border-top: 1px solid var(--color-border);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  margin-bottom: 0;
}

.section-header a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
}

.section-header a:hover {
  color: var(--color-primary-dark);
}

.latest-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.25s ease;
}

.latest-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 8px 24px rgba(30, 58, 95, 0.1);
  transform: translateY(-4px);
}

.latest-card .post-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.latest-card .post-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.latest-card .post-excerpt {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  max-width: 640px;
}

.latest-card .read-more {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-primary);
}

/* Blog - Listing page */
.blog-listing {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 2rem;
}

.blog-listing h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.blog-list-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.25s ease;
}

.blog-list-item:hover {
  border-color: var(--color-primary);
  box-shadow: 0 8px 24px rgba(30, 58, 95, 0.1);
  transform: translateY(-2px);
}

.blog-list-item .post-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.blog-list-item .post-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.blog-list-item .post-excerpt {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
  max-width: 640px;
}

.blog-list-item .read-more {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-primary);
}

/* Blog - Post page */
.blog-post {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.blog-back {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
  margin-bottom: 2.5rem;
}

.blog-back:hover {
  color: var(--color-primary-dark);
}

.blog-post-header {
  max-width: 640px;
  margin-bottom: 2rem;
}

.blog-post-header .post-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.blog-post-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.blog-post-header .post-author {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

.blog-post-body {
  max-width: 640px;
  border-top: 1px solid var(--color-border);
  padding-top: 2rem;
}

.blog-post-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--color-text-secondary);
}

.blog-post-body h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.blog-post-body a {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(30, 58, 95, 0.3);
  transition: border-color 0.2s;
}

.blog-post-body a:hover {
  border-color: var(--color-primary);
}

.blog-post-body blockquote {
  border-left: 3px solid var(--color-primary);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
}

.blog-post-body blockquote p {
  color: var(--color-text);
  font-style: italic;
}

.blog-post-body ul, .blog-post-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.blog-post-body li {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 640px) {
  .hero {
    padding: 5rem 1.5rem 3rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .tagline {
    font-size: 1.05rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  nav {
    padding: 0.75rem 1.5rem;
  }

  .nav-links {
    gap: 1.25rem;
  }

  section {
    padding: 3.5rem 1.5rem;
  }

  .blog-listing {
    padding: 3.5rem 1.5rem;
  }

  .blog-post {
    padding: 2rem 1.5rem 3.5rem;
  }

  .blog-post-header h1 {
    font-size: 1.5rem;
  }

  .section-header {
    flex-direction: column;
    gap: 0.5rem;
  }
}
