/* =========================================================
   Sunil Abraham Project
   ========================================================= */
/* Hide default GitHub Pages banner */
#banner, .page-header, .site-footer {
  display: none !important;
}

/* =========================================================
   Base Layout
   ========================================================= */
html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1a1a1a;
  background: linear-gradient(180deg, #fdfdfd 0%, #f8fafc 100%);
  margin: 0 auto;
  padding: 0 1.5rem 0 1.5rem;
  max-width: min(92%, 1280px);
  line-height: 1.8;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* =========================================================
   Main Content
   ========================================================= */
.main-content {
  background: #fff;
  border-radius: 12px;
  padding: 2.2rem;
  margin-top: 0.6rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  animation: fadeUp 1s ease-in-out;
  transition: background-color 0.4s ease;
}

/* =========================================================
   Typography
   ========================================================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: #0a2e57;
  line-height: 1.4;
  margin-top: 0.8rem;
  margin-bottom: 0.4rem;
}

main h1 {
  border-bottom: 2px solid #eaecef;
  padding-bottom: 0.3em;
  margin-top: 0;
}

h2 {
  font-size: 1.8rem;
  border-bottom: 1px solid #d8dee4;
  padding-bottom: 0.25em;
  margin-bottom: 0.8em;
  transition: border-color 0.2s ease;
}

h2:hover {
  border-bottom-color: #b6c2d2;
}

h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

a {
  color: #005cc5;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover, a:focus {
  text-decoration: underline;
  color: #0366d6;
}

/* =========================================================
   Footer
   ========================================================= */
footer {
  margin-top: 0;
  padding: 24px 10px;
  text-align: center;
  font-size: 0.9em;
  color: #555;
  border-top: 1px solid #eaecef;
  background: #fafafa;
  line-height: 1.6;
  opacity: 0;
  animation: fadeInFooter 0.8s ease-in forwards;
  will-change: opacity, transform;
}

footer p {
  margin: 6px 0 8px;
  padding: 0;
}

footer a {
  color: #0366d6;
  text-decoration: none;
  display: inline-block;
  margin: 0 3px;
  white-space: nowrap;
  transition: color 0.25s ease, text-decoration 0.25s ease;
}

footer a:hover, footer a:focus {
  color: #024b9a;
  text-decoration: underline;
}

@keyframes fadeInFooter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  footer {
    font-size: 0.85em;
    padding: 18px 8px;
  }
  footer p { margin: 4px 0 6px; }
  footer a { margin: 0 2px; }
}

/* =========================================================
   Animations
   ========================================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   Tables
   ========================================================= */
table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  background: #fff;
  box-shadow: 0 0 4px rgba(0,0,0,0.05);
  border-radius: 6px;
  overflow: hidden;
  display: block;
  overflow-x: auto;
}

thead:first-child tr:first-child th:first-child { border-top-left-radius: 6px; }
thead:first-child tr:first-child th:last-child  { border-top-right-radius: 6px; }

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
  word-wrap: break-word;
  white-space: normal;
}

th {
  background-color: #f2f2f2;
  font-weight: 600;
  color: #333;
}

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

/* =========================================================
   Responsive Adjustments
   ========================================================= */
@media (max-width: 768px) {
  body {
    padding: 0 1rem 3rem;
    line-height: 1.4;
  }

  .main-content {
    padding: 1.5rem;
  }

  p,
  li,
  td,
  th {
    line-height: 1.4;
  }
}

/* =========================================================
   Section Header Permalinks
   ========================================================= */
h2[id], h3[id], h4[id], h5[id], h6[id] {
  position: relative;
  display: block;
  margin: 1.2rem 0 0.6rem;
  line-height: 1.4;
}

.header-link {
  margin-left: 0.35em;
  opacity: 0;
  font-size: 0.9em;
  color: #888;
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

h2:hover .header-link,
h3:hover .header-link,
h4:hover .header-link,
h5:hover .header-link,
h6:hover .header-link { opacity: 1; }

.header-link:hover { color: #007acc; }

/* =========================================================
   Breadcrumb Navigation
   ========================================================= */
.breadcrumb {
  font-size: 0.9rem;
  margin: 0.5rem 0 0.8rem;
  padding-bottom: 0.2rem;
  color: #555;
  border-bottom: 1px solid #eee;
}

.breadcrumb + * { margin-top: 0 !important; }

.breadcrumb a {
  color: #005cc5;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
  color: #0366d6;
}

.breadcrumb span { color: #666; }

/* =========================================================
   Button
   ========================================================= */
.btn {
  display: inline-block;
  background-color: #004b23;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn:hover {
  background-color: #00854d;
  transform: translateY(-1px);
}

a.btn,
a.btn:hover,
a.btn:focus {
  color: #fff;
  text-decoration: none;
  border: none;
  outline: none;
}

.btn:active,
.btn:focus {
  background-color: #006837;
  box-shadow: 0 0 0 3px rgba(0, 133, 77, 0.3);
}
