:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #666666;
  --accent: #2563eb;
  --border: #e5e7eb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;        /* near-black */
    --text: #e6e6e6;      /* soft white */
    --muted: #a1a1aa;     /* muted gray */
    --border: #1f1f23;    /* subtle border */
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,"Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}

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

/* Navigation */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.nav a {
  text-decoration: none;
  color: var(--text);
  margin-left: 1rem;
}

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

.brand {
  font-weight: 600;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

main h1,
main h2,
main h3 {
  margin-top: 2rem;
  line-height: 1.3;
}

h1, h2, h3 {
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

h2 {
  font-size: 1.6rem;
  margin-top: 3rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

main p {
  margin: 1rem 0;
}

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

main a {
  color: var(--text);
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

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


/* KEEP THIS - it's what actually applies */
.prose :not(pre) > code {
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  font-size: 0.9em;
}

/* Content media safety */
img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Optional: nicer spacing in articles */
main img,
main video {
  margin: 1.5rem auto;
  border-radius: 8px;
}

section {
  margin-bottom: 4rem;
}

section ul {
  padding-left: 1.2rem;
}

section li {
  margin: 0.5rem 0;
}

a[href^="mailto:"] {
  font-weight: 500;
}

.prose {
  max-width: 720px;
  margin: 0 auto;
}



/* Base state for the random words */
.random-word {
  color: var(--chosen-color);
  display: inline-block; /* Required for the 'lift' animation to work */
  font-weight: bold;
  transition: all 0.25s ease; /* Smooth transition for color and position */
  cursor: default;
}

/* Hover state: This is where the magic happens */
.random-word:hover {
  transform: translateY(-2px); /* Subtle lift */
  filter: brightness(1.2);
}

/* --- BUTTON SYSTEM --- */

/* 1. The Base Style (Neutral state) */
/* --- BUTTON BASE --- */
.btn-portfolio {
  display: inline-block;
  padding: 10px 24px;
  background-color: #ffffff;
  color: #1a1a1a !important;
  font-weight: bold;
  text-decoration: none !important;
  border-radius: 8px;
  border: 1px solid #333;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.btn-portfolio:hover {
  background-color: var(--chosen-color);
  border-color: var(--chosen-color);
  transform: translateY(-3px);
  color: #1a1a1a !important; /* Ensures text stays black when BG turns bright */
}

/* Add this to your Button CSS */
.btn-portfolio:active {
  transform: scale(0.95); /* Shrinks slightly when pressed */
  filter: brightness(0.9); /* Gets slightly darker */
  transition: transform 0.1s; /* Faster snap-back */
}

/* Only apply the shadow glow on devices with a real pointer (mouse) */
@media (hover: hover) {
  .btn-portfolio:hover {
    box-shadow: 0 10px 20px -10px var(--chosen-color);
  }
}

/* Let Shiki control code block colors */
pre.astro-code {
  background: var(--shiki-background) !important;
  color: var(--shiki-foreground) !important;
}

/* Prevent global prose styles from breaking code */
pre.astro-code code {
  background: none !important;
  color: inherit !important;
}

.prose pre {
  background: var(--shiki-background) !important;
}

.prose code {
  color: inherit !important;
}

/* Inline code inside prose */
.prose :not(pre) > code {
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  font-size: 0.9em;
}



/* Projects Section */
.projects {
  /* Break out of the .prose max-width so the grid can span the viewport */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 3rem 6rem;
  box-sizing: border-box;
}

/* Restore normal flow on narrower screens */
@media (max-width: 1024px) {
  .projects {
    width: auto;
    max-width: 100%;
    margin-left: 0;
    padding: 3rem 2rem;
  }
}

/* Clean up .wide-header - remove breakout logic */
.wide-header {
  margin-bottom: 3rem;
  padding: 0;
}

.wide-header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* SINGLE grid rule - 3 columns on desktop */
.grid {
  width: 100%;
  display: grid;
  gap: 3rem;
  grid-template-columns: repeat(3, 1fr);
}

/* Tablet: 2 columns */
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
  
  .projects {
    padding: 3rem 3rem;
  }
}

/* Mobile: 1 column */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .projects {
    padding: 2rem 1rem;
  }
}

/* Project card - clean and simple */
.project-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: all 0.3s ease;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--muted);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
  .project-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  }
}

.project-card img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
  transition: transform 0.3s ease;
}

.project-card:hover img {
  transform: scale(1.02);
}

/* Minimal card body */
.card-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-body h2 {
  margin: 0 0 0.75rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.card-body p {
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
  flex-grow: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  background: var(--border);
  color: var(--muted);
  font-weight: 500;
}













