/*
Title: styles.css (shared stylesheet, home.kingsukee.com)
Purpose: Green theme layout, navigation, cards, timeline, publication list
         and responsive menu for every page of the portfolio website
Compiler: None (static CSS served by Hostinger web server)
OS: Manjaro
Version: V3
Written on: 2025-12-25
Revision Date: 2026-10-26
Author: Kingsuk Majumdar
Copyright (c) 2026 Kingsuk Majumdar
Aphorism: "Simplicity is the ultimate sophistication."
*/

/* ---------- Stage 1: design tokens ---------- */
:root {
  --primary: #0b7a3f;
  --primary-dark: #066233;
  --primary-soft: #e3f3e8;
  --accent: #84c98c;
  --bg: #f5fbf7;
  --card: #ffffff;
  --text: #1f2a24;
  --muted: #55625a;
  --line: #d6e9dc;
  --radius: 12px;
  --shadow: 0 6px 22px rgba(3, 48, 22, 0.07);
}

/* ---------- Stage 2: base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
}
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.3; }
h3 { margin: 0 0 4px; font-size: 1.08rem; }
ul { padding-left: 1.2rem; }
li { margin-bottom: 4px; }

/* ---------- Stage 3: header and navigation ---------- */
.site-header {
  background: var(--primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.nav {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
}
.brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 8px 0;
}
.brand:hover { color: #fff; }
.nav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0;
  padding: 0;
}
.nav-links li { margin: 0; }
.nav-links a {
  display: block;
  padding: 8px 10px;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-links a:hover,
.nav-links a.active { background: var(--primary-dark); color: #fff; }

/* Hamburger toggle (pure CSS, no JavaScript) */
.nav-toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.nav-burger {
  display: none;
  cursor: pointer;
  padding: 10px 6px;
}
.nav-burger span {
  display: block;
  width: 24px;
  height: 3px;
  margin: 4px 0;
  background: #fff;
  border-radius: 2px;
}
.nav-toggle:focus-visible + .nav-burger { outline: 2px solid #fff; border-radius: 4px; }

/* ---------- Stage 4: layout and cards ---------- */
.container { max-width: 1140px; margin: 28px auto; padding: 0 16px; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.card.inner { box-shadow: none; border: 1px solid var(--line); padding: 20px; margin-bottom: 0; }
section h2 {
  color: var(--primary);
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-soft);
}
.muted { color: var(--muted); font-size: 0.95rem; }
.small { font-size: 0.88rem; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

/* ---------- Stage 5: hero (home page) ---------- */
.hero { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.profile {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid var(--primary);
  background: var(--primary-soft);
}
.hero-text { flex: 1 1 420px; }
.title { color: var(--primary); font-size: 1.9rem; margin: 0; }
.subtitle { color: var(--primary-dark); font-weight: 600; margin-top: 6px; }

/* Stat tiles */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.stat {
  background: var(--primary-soft);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}
.stat .num { display: block; font-size: 1.7rem; font-weight: 700; color: var(--primary-dark); }
.stat .lbl { font-size: 0.9rem; color: var(--muted); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.chips li {
  margin: 0;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Buttons */
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
/* Outlined button that fills green on hover (same style for every button) */
.btn {
  display: inline-block;
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 6px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn:hover,
.btn:focus-visible { background: var(--primary); color: #fff; }

/* ---------- Stage 6: timeline ---------- */
.timeline .item {
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  margin-bottom: 18px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(132, 201, 140, 0.08), transparent);
}
.timeline .item p { margin: 6px 0; }
.timeline .item ul { margin: 6px 0 0; }

/* ---------- Stage 7: publication list ---------- */
.pubs { padding-left: 1.4rem; }
.pubs li { margin-bottom: 12px; }
.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  margin-left: 4px;
  white-space: nowrap;
}

/* ---------- Stage 8: tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--primary-soft); color: var(--primary-dark); }

/* ---------- Stage 9: footer ---------- */
.site-footer {
  max-width: 1140px;
  margin: 10px auto 30px;
  padding: 18px 16px;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}
.site-footer p { margin: 4px 0; }

/* ---------- Stage 10: responsive ---------- */
@media (max-width: 1100px) {
  .nav-burger { display: block; }
  .nav-links { display: none; width: 100%; flex-direction: column; padding-bottom: 8px; }
  .nav-toggle:checked ~ .nav-links { display: flex; }
}
@media (max-width: 720px) {
  .hero { justify-content: center; text-align: center; }
  .hero .btn-row { justify-content: center; }
  .profile { width: 160px; height: 160px; }
  .card { padding: 20px; }
  .title { font-size: 1.6rem; }
}

/* ---------- Stage 11: infographic figure ---------- */
.infographic { margin: 16px 0 0; }
.infographic a { display: block; }
.infographic img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--primary-soft);
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.infographic a:hover img,
.infographic a:focus-visible img {
  border-color: var(--primary);
  box-shadow: 0 6px 22px rgba(3, 48, 22, 0.15);
  cursor: zoom-in;
}
.infographic figcaption {
  margin-top: 8px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Stage 12: print ---------- */
@media print {
  .site-header, .btn-row { display: none; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
