/* assets/css/style.css */

:root {
  --bg-color: #f9f7f4;
  --text-main: #1a1a1a;
  --text-muted: #4a4a4a;
  --text-meta: #595959;
  --accent-color: #8b6f47;
  --border-color: #e0ddd8;
  --selection-bg: #e0ddd8;
  --code-bg: #f0ede8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #121212;
    --text-main: #e0e0e0;
    --text-muted: #b0b0b0;
    --text-meta: #a0a0a0;
    --accent-color: #d4b886;
    --border-color: #333333;
    --selection-bg: #404040;
    --code-bg: #1e1e1e;
  }
  
  img { opacity: 0.9; }
}

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

html {
  scroll-behavior: smooth;
}

::selection {
  background: var(--selection-bg);
  color: var(--text-main);
}

body {
  font-family: Charter, 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', Georgia, serif;
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-main);
  background: var(--bg-color);
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 2rem;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
}

header { margin-bottom: 5rem; }

header img {
  border-radius: 50%;
  width: 96px;
  height: 96px;
  margin-bottom: 1.5rem;
  border: 2px solid var(--border-color);
  object-fit: cover;
}

h1, h2, h3 {
  color: var(--text-main);
  text-wrap: balance;
}

h1 {
  font-size: 3rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

h2 {
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

article h2 { margin-top: 3rem; }

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2.5rem 0 0.5rem;
}

p {
  margin-bottom: 1.2rem;
  color: var(--text-muted);
}

/* Make impact metrics stand out */
strong {
  color: var(--text-main);
  font-weight: 600;
}

a {
  color: var(--text-main);
  text-decoration: underline;
  text-decoration-color: #a6a6a6;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

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

.meta {
  color: var(--text-meta);
  font-size: 0.95rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

section {
  margin-bottom: 5rem;
  padding-left: 2rem;
  border-left: 1px solid var(--border-color);
}

ul, ol { margin-bottom: 1.2rem; }
section ul { list-style: none; }

section li {
  margin-bottom: 0.8rem;
  padding-left: 1.2rem;
  position: relative;
  color: var(--text-muted);
}

section li:before {
  content: "→";
  position: absolute;
  left: -0.2rem;
  color: var(--accent-color);
  font-weight: bold;
}

article ul, article ol { padding-left: 2rem; }
article li { margin-bottom: 0.5rem; color: var(--text-muted); }

.contact a { margin-right: 1.5rem; font-weight: 500; }
a[href^="http"]:after { content: " ↗"; font-size: 0.85em; opacity: 0.6; }

.intro { font-size: 1.15rem; line-height: 1.9; color: var(--text-muted); }

.back-link {
  margin-bottom: 3rem;
  display: inline-block;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
}

.back-link:before { content: "← "; color: var(--accent-color); }

article {
  padding-left: 2rem;
  border-left: 1px solid var(--border-color);
  margin-bottom: 5rem;
}

article h3 { margin-top: 0; }

article img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 2rem 0;
  display: block;
  border: 1px solid var(--border-color);
}

pre {
  background: var(--code-bg);
  padding: 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
}

code {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  background: var(--code-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--text-main);
}

pre code { background: none; padding: 0; font-size: 1em; }

footer {
  margin-top: 6rem;
  padding-left: 2rem;
  border-left: 1px solid var(--border-color);
  color: var(--text-meta);
  font-size: 0.85rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (max-width: 600px) {
  body { padding: 2rem 1.5rem; }
  h1 { font-size: 2.2rem; }
  section, article { padding-left: 1.2rem; }
}