/* --- Global Theme & Variables --- */
:root {
  --bg-color: #0d1117;
  --surface-color: #161b22;
  --border-color: #30363d;
  --text-main: #c9d1d9;
  --text-muted: #8b949e;
  --accent-cyan: #00f0ff;
  --accent-green: #39ff14;
  --accent-purple: #bd00ff;
}

body {
  font-family: 'Fira Code', 'Ubuntu', monospace, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  padding: 2rem 1rem;
}

/* --- Headings & Typography --- */
.heading {
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

h1.heading {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5), 0 0 20px rgba(0, 240, 255, 0.2);
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

h2.heading {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

p.heading {
  margin-bottom: 3rem;
}

/* --- Links & Navigation --- */
a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  font-weight: 500;
}

a:hover {
  color: #fff;
  text-shadow: 0 0 8px var(--accent-cyan);
}

/* Specific styling for top navigation buttons */
p.heading a {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  margin: 0 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--surface-color);
}

p.heading a:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

/* Donate Link Accent */
p.heading a[href*="paypal"] {
  color: #ff007f;
}
p.heading a[href*="paypal"]:hover {
  text-shadow: 0 0 8px #ff007f;
  border-color: #ff007f;
}

/* --- The Projects Table --- */
#projects {
  margin-left: auto;
  margin-right: auto;
  border-collapse: collapse;
  width: 100%;
  max-width: 1000px;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

th, td {
  padding: 12px 16px;
  text-align: left;
}

th {
  background-color: #1f242c;
  color: var(--accent-green);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--border-color);
}

tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
}

tr:last-child {
  border-bottom: none;
}

/* Table Hover Effect */
tbody tr:hover {
  background-color: rgba(0, 240, 255, 0.04);
}

/* Library Name Highlights */
td:first-child {
  font-weight: bold;
  color: #fff;
  font-family: monospace;
}

/* Description Column */
td:nth-child(2) {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Responsive Table layout for smaller screens */
@media (max-width: 768px) {
  #projects, thead, tbody, th, td, tr {
    display: block;
  }
  
  thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  tr {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
  }
  
  td {
    border: none;
    position: relative;
    padding-left: 50%;
  }
  
  td:before {
    position: absolute;
    top: 12px;
    left: 16px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    color: var(--accent-green);
    font-size: 0.8rem;
    text-transform: uppercase;
  }
  
  td:nth-of-type(1):before { content: "Name"; }
  td:nth-of-type(2):before { content: "Description"; }
  td:nth-of-type(3):before { content: "Github"; }
  td:nth-of-type(4):before { content: "Package Manager"; }
}