/* Minimal portfolio styles - Paper-like reading experience */

:root {
  --text: #24292f;
  --text-light: #57606a;
  --bg: #fffcf7;
  --link: #0969da;
  --link-hover: #0550ae;
  --border: #d8dee4;
  --max-width: 980px;
  --content-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --heading-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  font-family: var(--content-font);
  font-size: 18px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: var(--heading-font);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.625rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
h3 { font-size: 1.25rem; }

p {
  margin-bottom: 1.5rem;
  text-align: justify;
  text-justify: inter-ideograph;
  word-break: break-word;
  hyphens: auto;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--link-hover);
}

ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 1.75rem;
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

li::marker {
  color: var(--text-light);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--border);
  background: rgba(0, 0, 0, 0.02);
  color: var(--text-light);
  font-style: italic;
}

blockquote p:last-child {
  margin-bottom: 0;
}

code {
  font-family: "SF Mono", Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.875em;
  background: rgba(175, 184, 193, 0.2);
  padding: 0.2em 0.4em;
  border-radius: 4px;
}

pre {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: #f6f8fa;
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
}

strong {
  font-weight: 700;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1.5rem 0;
}

figure {
  margin: 2rem 0;
}

figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: 0.75rem;
}

/* First element no top margin */
body > *:first-child {
  margin-top: 0;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.site-header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding-top: 2rem;
  text-align: center;
}

.newsletter {
  margin: 1.5rem 0;
}

.cta-button {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: #156dc5;
  color: white;
  border-radius: 4px;
  text-decoration: none;
}

.cta-button:hover {
  background: #0073e6;
}

.copyright {
  font-size: 0.85em;
  color: var(--text-light);
  margin-top: 1.5rem;
}

/* Article specific styles */
article {
  margin-top: 2rem;
}

article header {
  margin-bottom: 2.5rem;
}

article header h1 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.article-meta {
  font-family: var(--heading-font);
  font-size: 0.9rem;
  color: var(--text-light);
}

.article-meta time {
  display: inline-block;
}

/* Table styles */
table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-family: var(--heading-font);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.02);
}

@media (max-width: 600px) {
  body {
    font-size: 17px;
    padding: 2rem 1.25rem;
    line-height: 1.75;
  }

  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.375rem; }
  h3 { font-size: 1.125rem; }

  p {
    text-align: left;
  }

  blockquote {
    padding: 0.75rem 1rem;
  }
}

/* Share buttons */
.share-buttons {
  margin: 3rem 0;
  text-align: center;
}

.share-button {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
}

.share-x {
  background: #000;
  color: #fff;
}

.share-x:hover {
  background: #333;
  color: #fff;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6edf3;
    --text-light: #8b949e;
    --bg: #0d1117;
    --link: #58a6ff;
    --link-hover: #79c0ff;
    --border: #30363d;
  }

  code {
    background: rgba(110, 118, 129, 0.4);
  }

  pre {
    background: #161b22;
  }

  blockquote {
    background: rgba(255, 255, 255, 0.03);
  }

  th {
    background: rgba(255, 255, 255, 0.03);
  }

  img {
    opacity: 0.9;
  }

  .share-x {
    background: #fff;
    color: #000;
  }

  .share-x:hover {
    background: #e6edf3;
    color: #000;
  }
}
