/* Cassie Theme — Constellation Systems Lab
   Minimal dark with starlight accents. 
   Not a dark theme applied to a light design — darkness as native medium. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  /* Surfaces — luminance stacking from deep to elevated */
  --bg-deep: #08080d;
  --bg: #0c0c14;
  --bg-surface: #12121c;
  --bg-elevated: #1a1a26;
  --bg-hover: #22222e;

  /* Text — calibrated opacity hierarchy */
  --text: #e4e4ec;
  --text-secondary: #8585a0;
  --text-dim: #4a4a60;
  --text-ghost: #2e2e40;

  /* Accent — teal starlight, used sparingly */
  --accent: #5eead4;
  --accent-soft: rgba(94, 234, 212, 0.12);
  --accent-hover: #99f6e4;
  --accent-glow: rgba(94, 234, 212, 0.06);

  /* Borders — whisper-thin, semi-transparent */
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(94, 234, 212, 0.25);

  /* Layout */
  --max-w: 740px;
  --max-w-wide: 900px;
  --radius: 6px;
  --radius-lg: 10px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-deep);
  color: var(--text-secondary);
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: -0.011em;
}

/* ═══ Layout ═══ */

.wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ═══ Header ═══ */

header {
  padding: 2.5rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

header .wrapper {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-title {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.site-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

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

nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.2s ease;
}

nav a:hover,
nav a.active {
  color: var(--text);
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

/* ═══ Main Content ═══ */

main {
  min-height: 60vh;
  padding-bottom: 4rem;
}

/* ═══ Typography ═══ */

h1 {
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 0.75rem;
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
  margin: 2.5rem 0 0.75rem;
}

h2:first-child {
  margin-top: 0;
}

h3 {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 1.5rem 0 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

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

strong {
  color: var(--text);
  font-weight: 500;
}

em {
  font-style: italic;
}

hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 2.5rem 0;
}

ul, ol {
  margin: 0 0 1rem 1.25rem;
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.35rem;
  line-height: 1.6;
}

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

/* ═══ Homepage Hero ═══ */

.hero {
  margin-bottom: 3rem;
  padding-top: 1rem;
}

.hero > p:first-of-type {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  max-width: 600px;
}

.hero > p:not(:first-of-type) {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.65;
}

/* ═══ Section Labels ═══ */

.hero h2,
.hero ~ h2 {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 3rem 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ═══ Project Grid ═══ */

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}

@media (min-width: 600px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(ellipse at top left, var(--accent-glow), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 30px -10px rgba(94, 234, 212, 0.08);
  transform: translateY(-1px);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 500;
}

.project-card h3 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.project-card h3 a:hover {
  color: var(--accent);
}

.project-card .meta {
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  letter-spacing: 0.03em;
}

.project-card .summary {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ═══ Tags ═══ */

.tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0.75rem 0;
}

.tag {
  display: inline-block;
  background: var(--bg-elevated);
  color: var(--text-dim);
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  letter-spacing: 0.02em;
  transition: border-color 0.2s, color 0.2s;
}

.tag.accent {
  border-color: var(--border-accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ═══ Project Links ═══ */

.project-links {
  display: flex;
  gap: 1.25rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

/* ═══ Content Pages ═══ */

.content {
  max-width: var(--max-w);
}

.content p,
.content li {
  color: var(--text-secondary);
}

.content .meta {
  color: var(--text-dim);
  font-size: 0.82rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}

.content ul {
  margin: 0 0 1rem 1.25rem;
}

.content li {
  margin-bottom: 0.4rem;
}

.content hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

blockquote {
  border-left: 2px solid var(--border-accent);
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
  background: var(--accent-glow);
  border-radius: 0 var(--radius) var(--radius) 0;
}

code {
  background: var(--bg-elevated);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.85em;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--accent);
}

pre code {
  background: none;
  padding: 0;
  color: var(--text-secondary);
}

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

pre code {
  font-size: 0.82rem;
  line-height: 1.6;
}

/* ═══ Now Page ═══ */

.date-label {
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--text-dim);
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}

/* ═══ Hermes Vesper Showcase ═══ */

.vesper-hero {
  text-align: center;
  padding: 3rem 0 2rem;
  margin-bottom: 1.5rem;
}

.vesper-title {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.vesper-tagline {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.vesper-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.vesper-hero-badge {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--text-dim);
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

@media (min-width: 700px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 25px -10px rgba(94, 234, 212, 0.06);
}

.feature-icon {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

/* Workflow steps */
.workflow-steps {
  margin: 1.5rem 0;
}

.workflow-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 0.5rem 0;
}

.step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.step-content {
  flex: 1;
  padding-top: 0.15rem;
}

.step-content strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.step-content p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.workflow-arrow {
  text-align: center;
  color: var(--text-ghost);
  font-size: 0.85rem;
  padding: 0.1rem 0;
  margin-left: 0.85rem;
}

/* Tech stack */
.tech-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

@media (min-width: 600px) {
  .tech-stack { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 800px) {
  .tech-stack { grid-template-columns: repeat(5, 1fr); }
}

.tech-category h4 {
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tech-list .tag {
  font-size: 0.75rem;
}

/* Link buttons */
.link-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.link-button:hover {
  border-color: var(--border-accent);
  color: var(--accent);
  box-shadow: 0 0 20px -8px rgba(94, 234, 212, 0.1);
}

.link-button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ═══ Footer ═══ */

footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--text-ghost);
  letter-spacing: 0.02em;
}

/* ═══ 404 ═══ */

.error-page {
  text-align: center;
  padding: 6rem 0;
}

.error-page h1 {
  font-size: 4rem;
  font-weight: 300;
  color: var(--text-ghost);
  margin-bottom: 0.5rem;
}

.error-page p {
  color: var(--text-dim);
}

/* ═══ Responsive ═══ */

@media (max-width: 600px) {
  header {
    padding: 2rem 0 1rem;
    margin-bottom: 2rem;
  }

  header .wrapper {
    flex-direction: column;
    gap: 0.75rem;
  }

  nav {
    gap: 1rem;
  }

  h1 {
    font-size: 1.75rem;
    letter-spacing: -0.03em;
  }

  h2 {
    font-size: 1.15rem;
    margin-top: 2rem;
  }

  .hero {
    padding-top: 0.5rem;
  }

  .project-grid {
    gap: 0.6rem;
  }

  .project-card {
    padding: 1rem 1.1rem;
  }

  .vesper-title {
    font-size: 2rem;
  }

  .feature-grid {
    gap: 0.6rem;
  }
}

/* ═══ Selection ═══ */

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

/* ═══ Scrollbar (subtle) ═══ */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--bg-hover);
}
