/* Nordic Minimalism - Base Styles
 * Typography: Minion Pro (body), Neue Helvetica (headings), Iosevka (code)
 * Colours: #fafafa (bg), #1a1a1a (text), single accent for links
 * No gradients, shadows, or rounded corners
 */

/* Font definitions */
@font-face {
  font-family: 'Minion Pro';
  src: url('/assets/fonts/MinionPro-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Minion Pro';
  src: url('/assets/fonts/MinionPro-It.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Minion Pro';
  src: url('/assets/fonts/MinionPro-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Helvetica';
  src: url('/assets/fonts/HelveticaNeueLTPro-Roman.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Helvetica';
  src: url('/assets/fonts/HelveticaNeueLTPro-Md.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Helvetica';
  src: url('/assets/fonts/HelveticaNeueLTPro-Bd.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Iosevka Nereus';
  src: url('/assets/fonts/IosevkaNereus-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Iosevka Nereus';
  src: url('/assets/fonts/IosevkaNereus-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Iosevka Nereus';
  src: url('/assets/fonts/IosevkaNereus-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Minion Pro', Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.6;
  color: #1a1a1a;
  background-color: #fafafa;
}

@media (min-width: 38em) {
  body {
    font-size: 19px;
  }
}

/* Links */
a {
  color: #1a1a1a;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover,
a:focus {
  color: #0066cc;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Neue Helvetica', Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  color: #1a1a1a;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

h1 {
  font-size: 2rem;
  margin-top: 0;
}

h2 {
  font-size: 1.5rem;
  border-top: 1px solid #ddd;
  padding-top: 1.5rem;
  margin-top: 2rem;
}

h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

h3 {
  font-size: 1.4rem;
  font-weight: 700;
}

h4 {
  font-size: 1.1rem;
}

h5, h6 {
  font-size: 1rem;
}

/* Body text */
p {
  margin-top: 0;
  margin-bottom: 1em;
}

/* Lists */
ul, ol {
  margin-top: 0;
  margin-bottom: 1em;
  padding-left: 1.5em;
}

li {
  margin-bottom: 0.25em;
}

/* Blockquotes */
blockquote {
  margin: 1em 0;
  padding-left: 1em;
  border-left: 2px solid #1a1a1a;
  color: #555;
  font-style: italic;
}

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

/* Code */
code {
  font-family: 'Iosevka Nereus', 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
  padding: 0.1em 0.3em;
  background-color: #f0f0f0;
}

pre {
  font-family: 'Iosevka Nereus', 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
  line-height: 1.5;
  margin: 1em 0;
  padding: 1em;
  overflow-x: auto;
  background-color: #f0f0f0;
}

pre code {
  padding: 0;
  background-color: transparent;
}

/* Tables */
table {
  border-collapse: collapse;
  margin: 1em 0;
  width: 100%;
}

th, td {
  padding: 0.5em;
  border: 1px solid #ddd;
  text-align: left;
}

th {
  font-weight: 600;
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 2em 0;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1em 0;
}

/* Strong/em */
strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

/* Container - ~66ch max-width */
.container {
  max-width: 66ch;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Navigation */
.nav {
  margin-bottom: 2em;
  padding-bottom: 1em;
  border-bottom: 1px solid #ddd;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em 1.5em;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover {
  text-decoration: underline;
}

/* Masthead */
.masthead {
  margin-top: 2.5rem;
  margin-bottom: 2em;
  padding-bottom: 1em;
}

.masthead-title {
  font-family: 'Neue Helvetica', Helvetica, Arial, sans-serif;
  font-size: 1.35rem;
  font-weight: 500;
  margin: 0;
  margin-top: 1rem;
}

.masthead-title a {
  text-decoration: none;
}

/* Posts list */
.posts-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.posts-list li {
  margin-bottom: 0.75em;
}

.posts-list h3 {
  font-size: 1.1rem;
  margin: 0;
  font-weight: 500;
}

.posts-list h3 a {
  text-decoration: none;
}

.posts-list h3 a:hover {
  text-decoration: underline;
}

.post-date {
  font-size: 0.85rem;
  color: #666;
  margin-left: 0.5em;
}

/* Category headers */
.category-head {
  margin-top: 2em;
  padding-bottom: 0.25em;
  border-bottom: 1px solid #ddd;
}

/* Page and post content */
.page,
.post {
  margin-bottom: 3em;
}

.page-title,
.post-title {
  font-size: 1.75rem;
  margin-top: 0;
  margin-bottom: 0.5em;
}

/* Footer */
.site-footer {
  margin-top: 3em;
  padding-top: 1em;
  border-top: 1px solid #ddd;
  font-size: 0.9rem;
  color: #666;
}

/* Syntax highlighting (minimal) */
.highlight {
  margin: 1em 0;
  overflow-x: auto;
}

.highlight pre {
  margin: 0;
}

/* KaTeX math — higher specificity to override KaTeX's own 1.21em */
body .katex {
  font-size: 1em;
}

/* Responsive adjustments */
@media (max-width: 30em) {
  body {
    font-size: 17px;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.35rem;
  }
}

