/* Minimal Template Styles */

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

/* Variables */
:root {
  --font-mono:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --max-width: 600px;
  --font-size: 15px;
  --line-height: 1.6;

  /* Light theme */
  --bg-light: #ffffff;
  --text-light: #1a1a1a;
  --text-muted-light: #666666;
  --link-light: #0066cc;
  --border-light: #e0e0e0;

  /* Dark theme */
  --bg-dark: #0d0d0d;
  --text-dark: #e6e6e6;
  --text-muted-dark: #888888;
  --link-dark: #66b3ff;
  --border-dark: #333333;
}

/* Default light theme */
:root {
  --bg: var(--bg-light);
  --text: var(--text-light);
  --text-muted: var(--text-muted-light);
  --link: var(--link-light);
  --border: var(--border-light);
}

/* Dark theme class */
body.dark {
  --bg: var(--bg-dark);
  --text: var(--text-dark);
  --text-muted: var(--text-muted-dark);
  --link: var(--link-dark);
  --border: var(--border-dark);
}

/* Light theme class - takes precedence over dark mode media query */
:root.light {
  --bg: var(--bg-light);
  --text: var(--text-light);
  --text-muted: var(--text-muted-light);
  --link: var(--link-light);
  --border: var(--border-light);
}

/* Respect system preference */
@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --bg: var(--bg-dark);
    --text: var(--text-dark);
    --text-muted: var(--text-muted-dark);
    --link: var(--link-dark);
    --border: var(--border-dark);
  }
}

/* Base */
html {
  font-family: var(--font-mono);
  font-size: var(--font-size);
  line-height: var(--line-height);
}

body {
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 3rem 1.5rem;
}

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

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(20%);
  image-rendering: -webkit-optimize-contrast;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 18px;
  color: var(--text-muted);
  padding: 0.75rem;
  margin: -0.5rem;
  transition: color 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.theme-toggle:hover {
  color: var(--text);
}

/* Content */
.content {
  margin-bottom: 3rem;
}

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

.content a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.content a:hover {
  border-bottom-color: var(--link);
}

.content h1,
.content h2,
.content h3,
.content h4 {
  font-size: inherit;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.content li {
  margin-bottom: 0.6rem;
  padding-left: 1.5rem;
  position: relative;
}

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

/* Project list styling */
.content li strong {
  font-weight: 600;
}

.content li a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.content li a:hover {
  border-bottom-color: var(--link);
}

/* Footer */
footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  color: var(--text-muted);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.links {
  display: flex;
  gap: 1.5rem;
}

.links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.links a:hover {
  color: var(--text);
}

.copyright {
  font-size: 13px;
}

/* Mobile */
@media (max-width: 480px) {
  body {
    padding: 1.5rem 1rem;
  }

  header {
    margin-bottom: 2rem;
  }

  .avatar {
    width: 48px;
    height: 48px;
  }

  .content {
    margin-bottom: 2.5rem;
  }

  .content li {
    padding-left: 0;
    margin-bottom: 0.85rem;
    line-height: 1.5;
  }

  .content li::before {
    display: none;
  }

  .content li strong {
    display: inline;
  }

  .content li a {
    display: inline;
    padding: 0.15rem 0;
  }

  footer {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
    padding-top: 0.75rem;
  }

  .links {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .links a {
    padding: 0.25rem 0;
  }

  .copyright {
    font-size: 12px;
  }
}

/* Small mobile */
@media (max-width: 360px) {
  body {
    padding: 1.25rem 0.875rem;
  }

  html {
    font-size: 14px;
  }

  .links {
    gap: 0.75rem;
  }
}

/* Selection */
::selection {
  background-color: var(--link);
  color: var(--bg);
}