/* Main stylesheet for portfolio website */
@import url('https://fonts.cdnfonts.com/css/jetbrains-mono-2');

/* CSS Variables */
:root {
  --font-family: "JetBrains Mono", monospace;
  --line-height: 1.20rem;
  --border-thickness: 2px;
  --text-color: #000;
  --text-color-alt: #666;
  --background-color: SeaShell;
  --background-color-alt: #eee;
  --link-color: #007acc;

  --font-weight-normal: 500;
  --font-weight-medium: 600;
  --font-weight-bold: 800;

  font-family: var(--font-family);
  font-optical-sizing: auto;
  font-weight: var(--font-weight-normal);
  font-style: normal;
  font-variant-numeric: tabular-nums lining-nums;
  font-size: 16px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #fff;
    --text-color-alt: #aaa;
    --background-color: #000;
    --background-color-alt: #111;
  }
}

/* Base styles */
* {
  box-sizing: border-box;
}

* + * {
  margin-top: var(--line-height);
}

html {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0;
  flex-direction: column;
  align-items: center;
  background: var(--background-color);
  color: var(--text-color);
}

body {
  position: relative;
  width: 100%;
  margin: 0;
  padding: var(--line-height) 2ch;
  max-width: calc(min(80ch, round(down, 100%, 1ch)));
  line-height: var(--line-height);
  overflow-x: hidden;
}

/* Responsive design */
@media screen and (max-width: 480px) {
  :root {
    font-size: 14px;
  }
  body {
    padding: var(--line-height) 1ch;
  }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  margin: calc(var(--line-height) * 2) 0 var(--line-height);
  line-height: var(--line-height);
}

h1 {
  font-size: 2rem;
  line-height: calc(2 * var(--line-height));
  margin-bottom: calc(var(--line-height) * 2);
  text-transform: uppercase;
}

h2 {
  font-size: 1rem;
  text-transform: uppercase;
}

p {
  margin-bottom: var(--line-height);
  word-break: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

/* Links */
a {
  text-decoration-thickness: var(--border-thickness);
  color: var(--text-color);
}

a:link, a:visited {
  color: var(--text-color);
}

/* Text formatting */
strong {
  font-weight: var(--font-weight-bold);
}

em {
  font-style: italic;
}

/* Lists */
ul, ol {
  padding: 0;
  margin: 0 0 var(--line-height);
}

ul {
  list-style-type: square;
  padding: 0 0 0 2ch;
}

li {
  margin: 0;
  padding: 0;
}

li::marker {
  line-height: 0;
}

/* Layout components */
.container {
  width: 100%;
  max-width: 100%;
}

.section {
  margin-bottom: calc(var(--line-height) * 2);
}

.introduction {
  margin-bottom: calc(var(--line-height) * 2);
}

.currently {
  margin-bottom: calc(var(--line-height) * 2);
}

.writing {
  margin-bottom: calc(var(--line-height) * 2);
}

.reading-list {
  margin-bottom: calc(var(--line-height) * 2);
}

/* Footer */
.footer {
  margin-top: calc(var(--line-height) * 3);
  padding-top: var(--line-height);
  border-top: var(--border-thickness) solid var(--text-color-alt);
  text-align: center;
}

/* Navigation */
nav {
  margin-top: 1rem;
}

nav a {
  display: inline-block;
  padding: calc(var(--line-height) / 4) calc(var(--line-height) / 2);
  text-decoration: none;
  border: var(--border-thickness) solid var(--text-color);
  background: var(--background-color);
  transition: background-color 0.2s ease;
  color: var(--text-color);
  font-weight: 500;
}

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

/* Error page content */
.error-content {
  text-align: center;
  padding: 2rem 0;
}

.error-content p {
  margin-bottom: 1rem;
}

/* Reading list */
.reading-list ul {
  list-style: none;
  padding: 0;
}

.reading-list li {
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

