/* joeparavisini theme - main.css */

:root {
  --bg: #0a0a0a;
  --bg-elevated: #141414;
  --text: #e8e4df;
  --text-muted: #9a9590;
  --border: #3a2e25;

  /* Default: Amber Phosphor */
  --accent: #d4a574;
  --link: #c4956a;
  --code: #e8b888;
}

/* Theme: Amber Phosphor (default) - IBM 5151, late-night terminals */
[data-theme="amber"] {
  --accent: #d4a574;
  --link: #c4956a;
  --code: #e8b888;
  --border: #3a2e25;
}

/* Theme: Cathode - cool blue-gray CRT glow */
[data-theme="cathode"] {
  --accent: #8799a8;
  --link: #6a8caf;
  --code: #7a9ab8;
  --border: #2a2f35;
}

/* Theme: P1 Phosphor - PDP-11, oscilloscopes */
[data-theme="p1"] {
  --accent: #7a9a7a;
  --link: #6b9a8a;
  --code: #8aaa8a;
  --border: #2a3530;
}

/* Theme: NeXT Cube - PostScript, WWW origin */
[data-theme="next"] {
  --accent: #a89080;
  --link: #9088a0;
  --code: #b0a090;
  --border: #302828;
}

/* Theme: Indigo SGI - Silicon Graphics, Jurassic Park */
[data-theme="sgi"] {
  --accent: #8080a8;
  --link: #7090b0;
  --code: #9898b8;
  --border: #28283a;
}

/* Theme: Xerox Alto - PARC, Smalltalk, Engelbart */
[data-theme="alto"] {
  --accent: #b8a898;
  --link: #8898a8;
  --code: #a8b8b0;
  --border: #302e2a;
}

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

html {
  font-size: 18px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.7;
  min-height: 100vh;
}

/* Layout */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

h4 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

h5 {
  font-size: 0.9rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

h6 {
  font-size: 0.85rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  margin-bottom: 1.5rem;
}

/* Links */
a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--link) 30%, transparent);
  transition: border-color 0.2s;
}

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

a:focus {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* Lists */
ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

li::marker {
  color: var(--accent);
}

/* Blockquote */
blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: var(--text-muted);
  font-style: italic;
}

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

/* Code */
code {
  font-family: 'Space Mono', monospace;
  font-size: 0.85em;
  background: var(--bg-elevated);
  padding: 0.2em 0.5em;
  border-radius: 2px;
  color: var(--code);
}

pre {
  background: var(--bg-elevated);
  padding: 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border);
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

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

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}

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

th {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tr:hover td {
  background: var(--bg-elevated);
}

/* Forms */
label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  border-radius: 2px;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button,
input[type="submit"] {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 2px;
  color: var(--accent);
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

button:hover,
input[type="submit"]:hover {
  background: var(--accent);
  color: var(--bg);
}

button:focus,
input[type="submit"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button.primary {
  background: var(--accent);
  color: var(--bg);
}

button.primary:hover {
  background: var(--text);
}

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

figure {
  margin: 2rem 0;
}

figcaption {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* Meta / small text */
small,
.meta {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Emphasis */
strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

mark {
  background: var(--accent);
  color: var(--bg);
  padding: 0.1em 0.3em;
}

/* Definition list */
dl {
  margin: 2rem 0;
}

dt {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: var(--accent);
  margin-top: 1rem;
}

dd {
  margin-left: 1.5rem;
  margin-top: 0.25rem;
}

/* Keyboard */
kbd {
  font-family: 'Space Mono', monospace;
  font-size: 0.85em;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1em 0.4em;
  color: var(--text);
}

/* Abbreviation */
abbr {
  text-decoration: underline dotted var(--text-muted);
  cursor: help;
}

/* Details / Summary */
details {
  margin: 2rem 0;
  border: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

summary {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
}

details[open] summary {
  margin-bottom: 1rem;
}

/* Site Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-bottom: 1px solid var(--border);
  max-width: 900px;
  margin: 0 auto;
}

.site-name {
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  border-bottom: none;
}

.site-name:hover {
  border-bottom: none;
}

.site-nav {
  display: flex;
  gap: 2rem;
}

.site-nav a {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: none;
}

.site-nav a:hover {
  color: var(--link);
  border-bottom: none;
}

.site-nav a.active,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

/* Homepage: center nav when site name is hidden */
.site-nav-home {
  width: 100%;
  justify-content: center;
}

/* Site Footer */
.site-footer {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1rem;
}

.social-links a {
  display: inline-flex;
  color: var(--text-muted);
  opacity: 0.6;
  transition: opacity 0.2s ease, color 0.2s ease;
  text-decoration: none;
  border: 0;
  border-bottom: 0;
  background: transparent;
}

.social-links a:hover {
  color: var(--accent);
  opacity: 1;
  border: 0;
  border-bottom: 0;
}

.social-links svg {
  display: block;
}

/* Article (for blog posts) */
article {
  padding: 4rem 0;
}

.article-header {
  margin-bottom: 3rem;
}

.article-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.article-meta {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Section (for list pages, contact, etc.) */
section {
  padding: 4rem 0;
}

.section-header {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.section-content {
  /* Same as article content - inherits base styles */
}

/* Post list */
.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.post-list li:last-child {
  border-bottom: none;
}

.post-list-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.post-list-title a {
  color: var(--text);
  border-bottom: none;
}

.post-list-title a:hover {
  color: var(--accent);
}

.post-list-meta {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Theme Toggle - Ultra-minimal */
.theme-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  gap: 6px;
  z-index: 100;
  padding: 6px;
  border-radius: 12px;
  opacity: 0.3;
  transition: opacity 0.3s ease, background 0.3s ease;
}

.theme-toggle:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.03);
}

.theme-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover .theme-dot {
  opacity: 1;
  transform: scale(1);
}

.theme-dot.active {
  opacity: 1;
  transform: scale(1);
}

.theme-dot:hover {
  transform: scale(1.5);
}

.theme-dot:focus {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.theme-dot:focus:not(:focus-visible) {
  outline: none;
}

.theme-dot:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.theme-dot[data-theme="amber"] { background: #d4a574; }
.theme-dot[data-theme="cathode"] { background: #8799a8; }
.theme-dot[data-theme="p1"] { background: #7a9a7a; }
.theme-dot[data-theme="next"] { background: #a89080; }
.theme-dot[data-theme="sgi"] { background: #8080a8; }
.theme-dot[data-theme="alto"] { background: #b8a898; }

/* Homepage Hero */
.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 4rem 2rem;
  /* Break out of container constraints */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.home-name {
  font-family: 'Space Mono', monospace;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.home-tagline {
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin: 0;
}
