:root {
  /* Text & Base Layout Colors */
  --color: #1a202c;
  --bg-color: #f8fafc;
  --card-bg: #d1fae5;
  --border-color: #cbd5e1;

  /* Main Accent & Link Colors */
  --primary-color: #0f766e;
  --link: #0d9488;
  --link-hover: #115e59;

  /* Header, Footer & Navigation Specific Variables */
  --header-bg: #0f766e;
  --header-text: #ffffff;
  --link-active: #5eead4;
  --nav-link: #ffffff;
  --nav-link-hover: #99f6e4;
  --nav-link-active: #5eead4;

  /* Code Block Variables */
  --code-bg: #0f172a;
  --code-text: #5eead4;

  /* other variables */
  --border-radius: 12px;
  --border: 3px solid var(--border-color);

  /* Category Pill Badges (REVIEW, PRIVACY, etc.) */
  --pill-bg: #ccfbf1;
  --pill-text: #0f766e;
  --pill-border: #99f6e4;

  /* Action Buttons (Explore More...) */
  --btn-bg: #0f766e;
  --btn-text: #ffffff;
  --btn-hover: #5eead4;
  --btn-active: #a7f3d0;
  --btn-border: #0f766e;

  /* Table Specific Variables */
  --table-header-bg: var(--primary-color);
  --table-header-text: #ffffff;
  --table-row-bg: var(--card-bg);
  --table-row-alt-bg: #f1f5f9;
  --table-border: var(--border-color);

  /* Status Text Colors ("Passed") */
  --status-passed-bg: #dcfce7;
  --status-passed-text: #15803d;

  /* grid */
  --grid-hover-bg: rgba(15, 118, 110, 0.25);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Courier New", Courier, monospace;
  line-height: 1.3;
  color: var(--color);
}

/* scrollbar */
html {
  scrollbar-width: auto;
  scrollbar-color: var(--primary-color) var(--bg-color);
}

body {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--bg-color);
  color: var(--color);
  line-height: 1.75; /* Slightly increase from 1.6 */
}

main {
  display: block;
  width: 90%;
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* id selector */

#box1 {
  display: flex;
  justify-content: center;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  margin: 1rem 5rem 0;
}

h1 {
  text-align: center;
  padding: 1rem;
  margin: 0;
}

/* code block */

pre {
  background-color: var(--code-bg);
  color: var(--code-text);
  padding: 0.5rem;
  border-radius: var(--border-radius);
  max-width: 100%; /* Restricts the code box to the main container width */
  overflow-x: auto; /* Adds a horizontal scrollbar ONLY inside the code box */
  white-space: pre; /* Keeps the original line breaks */
}

header {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--header-bg);
  color: var(--header-text);
  margin: 0.5rem 1rem;
}

.header-logo {
  filter: invert();
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  margin: 1rem;
}

.header-title {
  font-size: x-large;
  font-weight: bold;
  color: var(--header-text);
  display: flex;
  align-items: center;
  margin: 1rem;
}

header a {
  color: var(--nav-link);
}

header a:hover {
  color: var(--nav-link-hover);
}

header a:active {
  color: var(--nav-link-active);
}

nav {
  display: flex;
  align-items: center;
  justify-content: end;
  margin-right: 2rem;
  padding-right: 1.5rem;
  gap: 6rem;
  flex: 1;
}

.nav-items {
  display: flex;
  align-items: center;
}

/* footer section */

footer {
  max-width: 100%;
  text-align: center;
  border-radius: var(--border-radius);
  background-color: var(--header-bg);
  color: var(--header-text);
  margin: 0 1rem 0.5rem;
}

footer div {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  gap: 1rem;
}

footer div p,
footer div a {
  margin: 0;
  color: var(--nav-link);
}

.copyright-section {
  display: flex;
  flex-direction: row;
}

.copyright-logo {
  height: 25px;
  width: auto;
  filter: invert();
}

/* link states */

a {
  text-decoration: none;
  color: var(--link);
}

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

.active,
a:active {
  color: var(--link-active);
}

/* home greetings section */

.home-greeting {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-picture {
  width: 40px;
  height: auto;
}

/* profile */

.profile-picture {
  width: 100px;
  height: auto;
  margin: 2rem auto;
}

.intro {
  text-align: center;
  font-size: large;
  font-weight: bold;
}

.table {
  display: flex;
  justify-content: center;
}

/* about section */

.social-links {
  display: flex;
  justify-content: center;
  gap: 4rem;
}

.link-pill {
  border: 1px solid var(--pill-border);
  border-radius: var(--border-radius);
  background-color: var(--pill-bg);
  color: var(--pill-text);
  padding: 1rem;
  margin: 2rem 0 2rem;
}

/* quotes section */

figure blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1rem;
}

/* table customization */

table {
  margin-top: 1rem;
  width: 80%;
  border-radius: 10px;
  border-collapse: collapse;
  overflow: hidden;
}

th,
td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--table-border);
}

.index-status {
  display: flex;
  background-color: var(--status-passed-bg);

  flex-direction: column;
  align-items: center;
}

.status-text {
  color: var(--status-passed-text);
}

th {
  background-color: var(--table-header-bg);
  color: var(--table-header-text);
}

tr {
  background-color: var(--table-row-bg);
}

tr:nth-child(even) {
  background-color: var(--table-row-alt-bg);
}

.table-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: scroll;
}

.th-sections {
  text-align: center;
}

/* index page grid */

.grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(2, 1fr);
  margin: 2rem 4rem;
}

.grid-items {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
}

.grid-items:hover {
  transition: transform 0.3s ease;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 5px 5px 6px --grid-hover-bg, -5px -5px 6px var(--grid-hover-bg);
}

.grid-item-title {
  font-size: larger;
  font-weight: bold;
}

.grid-button {
  border: 2px solid var(--btn-border);
  background-color: var(--btn-bg);
  border-radius: var(--border-radius);
  text-align: center;
  font-size: large;
  font-weight: bold;
  padding: 1rem;
}

.grid-button a {
  color: var(--btn-text);
}

.grid-button a:hover {
  color: var(--btn-hover);
}

.grid-button a:active {
  color: var(--btn-active);
}

.pill-tags {
  border: 1px solid --pill-border;
  color: var(--pill-text);
  border-radius: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  background-color: var(--pill-bg);
  padding: 0.25rem;
}

/*Responsive Designing*/

@media (max-width: 600px) {
  .header-title {
    display: none;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 0;
  }

  table {
    width: 100%;
  }

  #box1 {
    margin: 1rem 1rem 0;
  }

  nav {
    gap: 2rem;
  }
}
