/* ================================
   CSS CUSTOM PROPERTIES
   Change colors here — they cascade
   everywhere automatically.
================================ */

:root {
  --color-text:           #222;
  --color-text-muted:     #555;
  --color-text-faint:     #666;
  --color-heading:        #111;
  --color-heading-sub:    #333;

  --color-accent:         #e67e22;
  --color-accent-hover:   #ff9900;

  --color-link:           #0033cc;
  --color-link-hover:     #0055ff;

  --color-border:         #ccc;
  --color-border-focus:   var(--color-link);

  --color-bg-card:        rgba(255, 255, 255, 0.65);
  --color-bg-card-hover:  rgba(255, 255, 255, 0.85);
  --color-bg-code:        #eee;
  --color-bg-summary:     rgba(255, 255, 255, 0.75);
  --color-bg-summary-hover: rgba(255, 255, 255, 0.9);
}


/* ================================
   GLOBAL BASE STYLES
   Applies to all pages
================================ */

body {
  font-family: Arial, Helvetica, sans-serif;
  max-width: 800px;
  margin: 40px auto;
  line-height: 1.6;
  color: var(--color-text);

  background-image:
    linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)),
    url("back.jpg");

  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 0 15px;
}

h1 {
  font-size: 2.5em;
  color: var(--color-heading);
}

h2 {
  margin-top: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 4px;
  font-size: 1.6em;
}

p {
  margin-top: 8px;
  margin-bottom: 8px;
}

ul {
  padding-left: 20px;
}

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

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

footer {
  margin-top: 40px;
  color: var(--color-text-faint);
  font-size: 14px;
}

code {
  background: var(--color-bg-code);
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.9em;
}

img {
  max-width: 100%;
  height: auto;
}

address {
  font-style: normal;
}


/* ================================
   ORANGE BUTTON
   Used on all subpages (back button)
   and index.html link list
================================ */

.orange-button,
.link-list a {
  display: inline-block;
  padding: 8px 14px;
  background: transparent;
  border-radius: 6px;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.orange-button:hover,
.link-list a:hover {
  background: var(--color-accent-hover);
  color: white;
  border-color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}


/* ================================
   COURSE / SECTION HEADINGS
   Used on grad.html, undergrad.html,
   fun.html, gradp.html
================================ */

h4.course-title,
h5.course-title {
  margin-top: 10px;
  margin-bottom: 8px;
  font-weight: bold;
  color: var(--color-heading-sub);
}


/* ================================
   EDUCATION ENTRIES
   Used on grad.html and undergrad.html
================================ */

.edu-entry h2 {
  margin-bottom: 4px;
}

.edu-entry h3 {
  margin-top: 0;
  font-weight: normal;
  font-size: 1em;
  color: var(--color-text-muted);
}


/* ================================
   INDEX PAGE — PROFILE HEADER
   Used only on index.html
================================ */

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-photo {
  width: 200px;
  height: auto;
  margin-bottom: 15px;
  display: block;
}

.profile-header h1 {
  text-align: center;
  margin: 0;
}


/* ================================
   INDEX PAGE — LINK LIST
   Used only on index.html
================================ */

.link-list {
  list-style: none;
  padding-left: 0;
}

.link-list li {
  margin: 10px 0;
}


/* ================================
   PROJECT CARDS
   Used on fun.html and gradp.html
================================ */

.project {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-left: 4px solid var(--color-border);
  background: var(--color-bg-card);
  border-radius: 5px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.project:hover {
  border-left: 4px solid var(--color-link);
  background: var(--color-bg-card-hover);
  transform: translateY(-1px);
}

.project a {
  font-weight: bold;
  font-size: 1.05em;
}

.project-desc {
  margin-top: 6px;
  font-size: 0.95em;
  color: #444;
}


/* ================================
   DATASET DROPDOWN
   Used only on gradp.html
================================ */

.dataset-dropdown {
  margin-top: 10px;
}

.dataset-dropdown summary {
  cursor: pointer;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  background: var(--color-bg-summary);
  font-weight: 500;
  transition: all 0.2s ease;
  list-style: none;

  display: flex;
  align-items: center;
  gap: 8px;
}

.dataset-dropdown summary:hover {
  background: var(--color-bg-summary-hover);
}

.dataset-dropdown[open] summary {
  border-color: var(--color-border-focus);
}

.dataset-dropdown summary::before {
  content: "▶";
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 0.9em;
  color: var(--color-text-muted);
}

.dataset-dropdown[open] summary::before {
  transform: rotate(90deg);
}

.dataset-dropdown ul {
  margin-top: 10px;
}


/* ================================
   DOWNLOAD BUTTONS
   Used on gradp.html dataset section
================================ */

.download-btn {
  display: inline-block;
  padding: 4px 8px;
  background: transparent;
  border: 1.5px solid var(--color-link);
  color: var(--color-link);
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-right: 6px;
  margin-bottom: 6px;
}

.download-btn:hover {
  background: var(--color-link);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.download-btn.primary {
  border-color: var(--color-link);
  color: var(--color-link);
}

.download-btn.primary:hover {
  background: var(--color-link);
  color: white;
}

.download-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.batch-group {
  margin-bottom: 6px;
}

.batch-label {
  font-size: 1em;
  color: var(--color-text-muted);
  font-weight: 700;
  margin-bottom: 4px;
  margin-top: 10px;
}


/* ================================
   RESPONSIVE — MOBILE
   Applies to all pages
================================ */

@media (max-width: 480px) {
  body {
    padding: 0 10px;
    background-attachment: scroll;
  }

  .profile-photo {
    width: 120px;
    margin-bottom: 10px;
  }
}
