/* ========== Base Styles ========== */
body {
      background: #f9fafb;
      font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      color: #222;
      margin: 0;
      line-height: 1.7;
    }

    .container {
      max-width: 900px;
      margin: 60px auto;
      background: #fff;
      padding: 40px;
      border-radius: 12px;
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    }
/* ========== back link styles ========== */
.back-link {
  position: fixed;
  top: 16px;
  left: 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--accent-color, #004080);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

.back-link:hover {
  color: var(--accent-hover, #002b5c);
  text-decoration: underline;
  background-color: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}


/* --- global style for standalone links with class="links" --- */
      a.links {
        color: #004080;
        text-decoration: none;
        transition: color 0.2s;
      }
      
      a.links:hover {
        text-decoration: underline;
        color: #002b5c;
      }


    /* ========== Header ========== */
    header.main-header {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid #ddd;
      padding-bottom: 20px;
      margin-bottom: 40px;
    }

    .profile-left {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
    }

    .profile-pic {
      width: 160px;
      height: 160px;
      border-radius: 50%;
      object-fit: cover;
      margin-right: 25px;
      border: 2px solid #eee;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .contact-info h1 {
      font-size: 1.8em;
      margin: 0 0 6px 0;
      color: #1a1a1a;
    }

    .contact-info p {
      margin: 4px 0;
      color: #555;
      font-size: 1.05em;
    }

    /* ========== Navigation ========== */
    .nav-right {
      text-align: right;
      min-width: 180px;
    }

    .nav-right a {
      display: block;
      color: #004080;
      text-decoration: none;
      font-weight: 500;
      font-size: 1.05em;
      margin: 6px 0;
      transition: color 0.2s ease, transform 0.2s ease;
    }

    .nav-right a:hover {
      color: #002b5c;
      transform: translateX(3px);
      text-decoration: underline;
    }
      
      /* =================== Contents Two-Column Layout =================== */
      .card#contents {
        padding: 16px 20px;
      }
      
      .card#contents h2 {
        font-size: 22px;
        margin-bottom: 12px;
      }
      
      .card#contents ol {
        counter-reset: section;
        padding-left: 0;
        margin: 0;
        list-style: none;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 6px 12px; /* vertical gap 6px, horizontal gap 12px */
      }
      
      .card#contents ol li {
        counter-increment: section;
        background: #f0f9ff;
        border-radius: 6px;
        padding: 6px 10px;
        display: flex;
        align-items: center;
        transition: background 0.2s;
      }
      
      .card#contents ol li:hover {
        background: #e0f2fe;
      }
      
      .card#contents ol li::before {
        content: counter(section) ".";
        font-weight: bold;
        margin-right: 8px;
        color: var(--accent);
      }
      
      .card#contents ol li a {
        color: #0369a1;
        text-decoration: none;
        font-weight: 500;
        transition: all 0.2s;
      }
      
      .card#contents ol li a:hover {
        text-decoration: underline;
        transform: translateX(3px);
      }



    /* ========== Sections ========== */
    section {
      margin-bottom: 45px;
    }

    h2 {
      font-size: 1.4em;
      color: #003366;
      border-bottom: 2px solid #eee;
      padding-bottom: 5px;
      margin-bottom: 20px;
      letter-spacing: 0.3px;
    }

    p {
      font-size: 1.05em;
      color: #333;
    }

    ul {
      padding-left: 20px;
    }

    li {
      margin-bottom: 10px;
    }

    /* ========== Item Entries ========== */
    .item-entry {
      margin-bottom: 25px;
    }

    .item-entry .title {
      font-weight: bold;
      font-size: 1.1em;
      color: #222;
    }

    .item-entry .authors {
      font-style: italic;
      color: #666;
    }

    .item-entry .venue {
      color: #555;
    }

    .item-entry .links a {
      color: #004080;
      text-decoration: none;
      transition: color 0.2s;
    }

    .item-entry .links a:hover {
      text-decoration: underline;
      color: #002b5c;
    }

 /* ========== Compact Two-Row Flowchart diagram ==========*/
      .flow-diagram-compact {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 16px;
        gap: 16px;
      }
      
      .flow-row {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: nowrap;
      }
      
      .flow-step {
        background: #f9fafb;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 10px 12px;
        text-align: center;
        min-width: 140px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.03);
      }
      
      .flow-arrow {
        font-size: 20px;
        color: var(--accent);
        font-weight: bold;
      }
      
      .flow-row-horizontal {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-top: 6px;
      }
      
      .flow-column {
        display: flex;
        flex-direction: column;
        gap: 12px;
        flex: 1;
      }
      
      .flow-sub-row {
        display: flex;
        gap: 12px;
        justify-content: center;
      }
      
      .flow-step-sub {
        background: #fff;
        border: 1px dashed #ccc;
        border-radius: 6px;
        padding: 6px;
        min-width: 140px;
        text-align: center;
      }


    /* ========== Footer ========== */
    footer {
      text-align: center;
      margin-top: 40px;
      padding-top: 20px;
      border-top: 1px solid #eee;
      color: #666;
      font-size: 0.95em;
    }

    footer a {
      color: #004080;
      text-decoration: none;
      margin: 0 6px;
    }

    footer a:hover {
      text-decoration: underline;
    }

    footer .construction {
      margin-top: 10px;
      font-style: italic;
      color: #888;
    }


    /* ========== Responsive ========== */
    @media (max-width: 700px) {
      .main-header {
        flex-direction: column;
        align-items: flex-start;
      }

      .nav-right {
        text-align: left;
        margin-top: 15px;
      }
    }
