/* somebox.com - Dark theme with IBM Plex Sans + Quattrocento */
:root {
  --color-bg: #191919;
  --color-surface: #191919;
  --color-border: #333333;
  --color-text: #ffffff;
  --color-text-muted: #999999;
  --color-heading: #ffffff;
  --color-link: #37a1bf;
  --color-link-hover: #5cc4e0;
  --color-accent: #37a1bf;
  --color-quote-bg: #222222;
  
  --font-heading: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Quattrocento', Georgia, serif;
  --font-mono: 'IBM Plex Mono', 'JetBrains Mono', monospace;
  
  --content-max-width: 900px;
  --header-height: 48px;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  padding-top: var(--header-height);
  line-height: 1.7;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-weight: 600;
  line-height: 1.3;
}

p, li, td, th {
  color: var(--color-text);
}

/* Links - only these are blue */
a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
  background: transparent;
}

/* ============================================
   Thin Header
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #111111;
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
  padding: 0;
  overflow: hidden;
}

/* Circuit traces canvas animation */
.circuit-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  cursor: crosshair;
  z-index: 0;
}

.header-content {
  position: relative;
  z-index: 1;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none; /* Allow clicks to pass through to canvas */
  flex-wrap: nowrap; /* Prevent wrapping in header (mobile) */
  min-width: 0; /* Allow flex children to shrink for ellipsis */
  overflow: hidden; /* Keep header content within fixed height */
}

.site-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  pointer-events: auto; /* Re-enable clicks on links */
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 
    0 0 4px rgba(0, 0, 0, 1),
    0 0 8px rgba(0, 0, 0, 1),
    0 0 14px rgba(0, 0, 0, 0.95),
    0 0 24px rgba(0, 0, 0, 0.85),
    0 0 40px rgba(0, 0, 0, 0.6);
}

.site-title:hover {
  color: var(--color-link);
  background: none;
}

.site-logo {
  color: var(--color-accent);
  font-size: 1.4rem;
  margin-right: 0.4rem;
  vertical-align: middle;
  position: relative;
  top: -1px;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 1)) drop-shadow(0 0 8px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 16px rgba(0, 0, 0, 0.7));
}

.site-title:hover .site-logo {
  color: var(--color-link-hover);
}

/* Breadcrumb */
.breadcrumb {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  pointer-events: auto; /* Re-enable clicks on breadcrumb links */
  min-width: 0;
  max-width: 40%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 
    0 0 4px rgba(0, 0, 0, 1),
    0 0 8px rgba(0, 0, 0, 1),
    0 0 14px rgba(0, 0, 0, 0.95),
    0 0 24px rgba(0, 0, 0, 0.85),
    0 0 40px rgba(0, 0, 0, 0.6);
}

.breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
}

@media (max-width: 520px) {
  /* Keep header clean on very small screens */
  .breadcrumb {
    display: none;
  }
  .site-title {
    max-width: 100%;
  }
}

.breadcrumb a:hover {
  color: var(--color-link);
  background: none;
}

.breadcrumb .separator {
  margin: 0 0.5rem;
  color: #555;
}

.breadcrumb .current {
  color: var(--color-text);
}

/* ============================================
   Main Content
   ============================================ */
main.container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: #111111;
  padding: 1rem 0;
}

.footer-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ============================================
   Homepage Hero/Intro
   ============================================ */
.home h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-heading);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}

.intro-section {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.intro-content {
  flex: 1;
}

.intro-content p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 0;
  color: var(--color-text);
}

.intro-image {
  flex-shrink: 0;
}

.intro-image img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
}

/* ============================================
   Section Headings
   ============================================ */
h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-heading);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-heading);
  font-weight: 500;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

/* Page titles */
article > h1:first-child {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

/* ============================================
   Compact Tables with Icons
   ============================================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1.5rem 0;
  font-size: 0.95rem;
}

thead {
  display: none;
}

td {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  vertical-align: baseline;
  color: var(--color-text);
}

td:first-child {
  padding-right: 1rem;
}

/* Icon in table cells */
td .iconify {
  margin-right: 0.5rem;
  vertical-align: middle;
  opacity: 0.6;
}

td:last-child {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  text-align: right;
  white-space: nowrap;
}

tr:hover {
  background: transparent;
}

/* Links in tables */
td a {
  text-decoration: none;
}

td a:hover {
  text-decoration: underline;
  background: none;
}

/* ============================================
   Card Grid - Projects
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin: 0.75rem 0 2rem 0;
}

.card {
  display: flex;
  flex-direction: column;
  background: #222222;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--color-accent);
  background: #222222;
}

.card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 0;
  margin: 0;
}

.card span {
  padding: 0.75rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--color-text);
  font-weight: 500;
}

.card:hover span {
  color: var(--color-link);
}

/* Cards without images */
.card:not(:has(img)) {
  justify-content: center;
  min-height: 80px;
}

/* ============================================
   Social Links with Icons
   ============================================ */
.social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-text-muted);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.9rem;
}

.social-links a:hover {
  color: var(--color-link);
  background: none;
}

.social-links a .iconify {
  font-size: 1.1em;
}

.social-links .separator {
  color: #444;
  margin: 0 0.25rem;
}

/* ============================================
   Content Images
   ============================================ */
article img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1rem 0;
}

/* Profile images (use .profile-image class in markdown) */
article .profile-image {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  float: right;
  margin: 0 0 1rem 2rem;
  shape-outside: circle();
}

/* ============================================
   Code & Quotes
   ============================================ */
pre {
  background: #0d0d0d;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
}

code {
  font-family: var(--font-mono);
  background: #2d2d2d;
  color: #e0e0e0;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}

pre code {
  background: none;
  padding: 0;
}

blockquote {
  background: var(--color-quote-bg);
  border-left: 3px solid var(--color-accent);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 6px 6px 0;
  color: var(--color-text);
}

/* ============================================
   Lists
   ============================================ */
ul, ol {
  padding-left: 1.25rem;
  margin: 0.5rem 0 1rem 0;
}

li {
  margin-bottom: 0.35rem;
  color: var(--color-text);
}

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

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 640px) {
  :root {
    --header-height: 44px;
  }
  
  main.container {
    padding: 1.5rem 1rem;
  }
  
  .home h1 {
    font-size: 2rem;
  }
  
  .intro-section {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
  
  .intro-image img {
    width: 120px;
    height: 120px;
  }
  
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .card img {
    height: 90px;
  }
  
  .card span {
    font-size: 0.8rem;
    padding: 0.5rem;
  }
  
  table {
    font-size: 0.85rem;
  }
  
  article .profile-image {
    float: none;
    display: block;
    margin: 1rem auto;
  }
}

/* Media embeds (YouTube, SoundCloud) */
.video-embed,
.audio-embed {
  margin: 1.5rem 0;
  max-width: 100%;
}

.video-embed iframe {
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 8px;
}

.audio-embed iframe {
  border-radius: 8px;
}

.embed-title {
  margin: 0 0 0.5rem 0;
  font-weight: 500;
  color: var(--color-text);
  font-size: 0.95rem;
}

/* Stack embeds nicely */
.video-embed + .video-embed,
.audio-embed + .audio-embed,
.video-embed + .audio-embed,
.audio-embed + .video-embed {
  margin-top: 2rem;
}

/* ============================================
   Callouts (Obsidian-style)
   ============================================ */
.callout {
  margin: 1.5rem 0;
  border-radius: 6px;
  border-left: 4px solid var(--color-accent);
  background: var(--color-quote-bg);
  overflow: hidden;
}

.callout-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.callout-content {
  padding: 1rem;
  font-size: 0.95rem;
}

.callout-content p {
  margin: 0;
}

.callout-content p + p {
  margin-top: 0.75rem;
}

/* Callout type colors */
.callout-important {
  border-left-color: #e74c3c;
}
.callout-important .callout-title {
  color: #e74c3c;
}

.callout-warning,
.callout-caution {
  border-left-color: #f39c12;
}
.callout-warning .callout-title,
.callout-caution .callout-title {
  color: #f39c12;
}

.callout-tip,
.callout-success {
  border-left-color: #27ae60;
}
.callout-tip .callout-title,
.callout-success .callout-title {
  color: #27ae60;
}

.callout-note,
.callout-info {
  border-left-color: var(--color-accent);
}
.callout-note .callout-title,
.callout-info .callout-title {
  color: var(--color-accent);
}

.callout-question {
  border-left-color: #9b59b6;
}
.callout-question .callout-title {
  color: #9b59b6;
}

.callout-quote {
  border-left-color: #95a5a6;
  font-style: italic;
}
.callout-quote .callout-title {
  color: #95a5a6;
}
