:root {
  --bg: #f8f4eb;
  --fg: #111111;
  --accent: #111111;
  --brand-accent: #c35c2b;
  --gradient-bg: #f8f4eb;
  --accent-color: var(--brand-accent);
  --muted: #6b6258;
  --border: #e3d9cc;
  --font-main: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 800px; /* Tighter width for better reading */
  --spacing-section: 6rem;
  --spacing-item: 2rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding: 0 1.5rem;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Typography */
h1, h2, h3 {
  margin: 0 0 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  margin-bottom: 2rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--fg);
  padding-bottom: 0.5rem;
  display: inline-block;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

p {
  margin: 0 0 1rem;
  max-width: 65ch;
}

a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-thickness 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: var(--accent-color);
  text-decoration-thickness: 2px;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

li {
  margin-bottom: 0.5rem;
  padding-left: 1.2rem;
  position: relative;
}

li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--muted);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 0 0 100vmax var(--bg);
  clip-path: inset(0 -100vmax);
  padding: 1rem 0;
  margin-bottom: 5rem;
}

.site-header.stuck {
  box-shadow: 0 0 0 100vmax var(--bg), 0 12px 30px rgba(0, 0, 0, 0.08);
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 0;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-decoration: none;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  position: relative;
  transition: color 0.2s ease;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  position: relative;
}

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

.logo::after,
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 1px;
  background: var(--accent-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
  pointer-events: none;
}

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

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

/* Sections */
.section {
  margin-bottom: var(--spacing-section);
  scroll-margin-top: 110px;
}

/* Hero */
.hero {
  margin-bottom: var(--spacing-section);
  scroll-margin-top: 110px;
}

.hero-list li {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.hero-cta {
  margin-top: 2rem;
}

.hero-cta a {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent-color);
  text-decoration: none;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 2px;
}

.hero-cta a:hover {
  background: var(--accent-color);
  color: #fff;
}

/* About */
.summary {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 2.5rem;
}

.operating-list {
  margin-top: 1.5rem !important;
  margin-left: 0.5rem;
}

.operating-list li {
  font-size: 1rem;
  color: var(--fg);
}

/* Work */
.work-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.work-item {
  border-left: 2px solid var(--border);
  padding-left: 1.5rem;
}

.work-item:hover {
  border-left-color: var(--brand-accent);
  transition: border-color 0.3s ease;
}

.work-item h3 {
  margin-bottom: 1rem;
}

.work-details p {
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.label {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  display: inline-block;
  width: 80px;
}

/* AI Work */
.ai-list li {
  margin-bottom: 1rem;
}

.ai-list strong {
  font-weight: 600;
  color: var(--fg);
}

/* Contact */
.cta-link {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 3px solid var(--fg);
}

.cta-link:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
}

/* Responsive */
@media (max-width: 600px) {
  :root {
    --spacing-section: 4rem;
  }
  
  body {
    padding: 0 1rem;
  }
  
  .site-header {
    padding: 0.75rem 0;
    margin-bottom: 3rem;
  }
  
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0;
  }
  
  nav {
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
  }
  
  nav a {
    font-size: 0.9rem;
  }
  
  h1 {
    font-size: 2.2rem;
  }
  
  .work-item {
    padding-left: 1rem;
    border-left-width: 1px;
  }
  
  .label {
    display: block;
    width: auto;
    margin-bottom: 0.1rem;
  }
  
  .work-details p {
    margin-bottom: 0.75rem;
  }
  
  .hero {
    margin-bottom: 3rem;
  }
  
  .section {
    scroll-margin-top: 80px;
  }
}

/* Added fixes from instructions */
.takeaway {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

#ai.section,
#contact.section {
  margin-top: 4rem;
}

#ai .ai-list,
#ai .section-intro {
  max-width: 650px;
}

html {
  scroll-behavior: smooth;
}
