/* Trimmed copy of diamondinoia.com assets/style.css, so this page matches the homepage. */
/* ==========================================================
   Zed One Dark — Personal Homepage Theme
   Inspired by the Zed editor's default dark theme
   ========================================================== */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* --- CSS Variables --- */
:root {
  /* Surfaces */
  --chrome: #21252a;
  --editor: #282c33;
  --border: #1a1c22;

  /* Syntax accent colors */
  --blue: #62adee;
  --green: #97c279;
  --red: #df6b75;
  --purple: #bc74d2;
  --orange: #d19965;
  --teal: #56b5c2;
  --yellow: #e4bf7a;
  --gray: #5b6370;

  /* Text hierarchy */
  --text-primary: #d7d9df;
  --text-secondary: #aab2bf;
  --text-muted: #6d737d;

  /* Sizing */
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-ui: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --line-number-width: 3.5rem;
  --content-max-width: 52rem;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ui);
  background: var(--chrome);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Title Bar --- */
.title-bar {
  background: var(--chrome);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 100;
}

.traffic-lights {
  display: flex;
  gap: 0.4rem;
}

.traffic-lights span {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
}

.traffic-lights .red { background: var(--red); }
.traffic-lights .yellow { background: var(--yellow); }
.traffic-lights .green { background: var(--green); }

.title-bar .path {
  color: var(--text-secondary);
}

/* --- Tab Bar (Navigation) --- */
.tab-bar {
  background: var(--chrome);
  display: flex;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tab-bar::-webkit-scrollbar {
  display: none;
}

.tab-bar a {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.tab-bar a:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.tab-bar a.active {
  color: var(--text-primary);
  background: var(--editor);
  border-bottom: 2px solid var(--blue);
  margin-bottom: -1px;
}

.tab-bar a.tab-intro {
  color: var(--green);
  font-style: italic;
}
/* --- Editor Area --- */
.editor {
  background: var(--editor);
  flex: 1;
  display: flex;
  padding: 2rem 1rem;
}

.editor-content {
  max-width: var(--content-max-width);
  width: 100%;
}
/* --- Line-numbered content --- */
.lines {
  counter-reset: line;
}

.line {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.1rem 0;
}

.line::before {
  counter-increment: line;
  content: counter(line);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  width: var(--line-number-width);
  flex-shrink: 0;
  text-align: right;
  user-select: none;
  opacity: 0.6;
}

.line:has(h1)::before { font-size: 1.75rem; }
.line:has(h2)::before { font-size: 1.25rem; }
.line:has(h3)::before { font-size: 1.05rem; }

.line-content {
  flex: 1;
  min-width: 0;
}

.line-content h1,
.line-content h2,
.line-content h3,
.line-content p {
  margin: 0;
}
/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-mono);
  font-weight: 600;
}

h1 {
  font-size: 1.75rem;
  color: var(--purple);
  margin-bottom: 0.25rem;
}

h1::before {
  content: '// ';
  color: var(--gray);
}

h2 {
  font-size: 1.25rem;
  color: var(--purple);
  margin-top: 0;
  margin-bottom: 0;
}

h2::before {
  content: none;
}

h3 {
  font-size: 1.05rem;
  color: var(--teal);
  margin-top: 0;
  margin-bottom: 0;
}

h3::before {
  content: none;
}

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

/* --- Links --- */
a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: var(--teal);
  text-decoration: underline;
}

/* --- Blockquotes (like markdown >) --- */
blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  color: var(--text-secondary);
  margin: 0.5rem 0;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

/* --- Code / Inline code --- */
code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
  color: var(--orange);
}
/* --- Hero / Intro --- */
.hero-title {
  font-family: var(--font-mono);
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.hero-title::before {
  content: none;
}

.cursor {
  display: inline-block;
  width: 0.6rem;
  height: 1.2em;
  background: var(--blue);
  margin-left: 0.2rem;
  vertical-align: baseline;
  position: relative;
  top: 0.15em;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.subtitle {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.subtitle .kw { color: var(--purple); }
.subtitle .sep { color: var(--gray); }
.subtitle .str { color: var(--green); }
/* --- Highlight classes (syntax coloring) --- */
.kw { color: var(--purple); }     /* keyword */
.fn { color: var(--blue); }       /* function */
.str { color: var(--green); }     /* string */
.num { color: var(--orange); }    /* number */
.ty { color: var(--teal); }       /* type */
.cm { color: var(--gray); font-style: italic; } /* comment */
.err { color: var(--red); }       /* error/important */
.warn { color: var(--yellow); }   /* warning/constant */
/* --- Status Bar --- */
.status-bar {
  background: var(--chrome);
  border-top: 1px solid var(--border);
  padding: 0.35rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.status-bar a {
  color: var(--text-muted);
}

.status-bar a:hover {
  color: var(--blue);
  text-decoration: none;
}

.status-left, .status-right {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .editor {
    padding: 1rem 0.5rem;
  }

  .line::before {
    display: none;
  }

  .line {
    gap: 0;
  }

  h1 { font-size: 1.4rem; }
  .hero-title { font-size: 1.5rem; }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .status-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .title-bar {
    font-size: 0.7rem;
  }

  .tab-search {
    display: none;
  }
}
