:root {
  --text: #000;
  --text-secondary: #666;
  --background: #fff;
  --border: #ccc;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--background);
  padding: 1rem 1rem;
  font-size: 16px;
}

/* Main page should have no scroll */
body.main-page {
  overflow: hidden;
}

/* removed max-width constraint and border/radius styling for cleaner look */
.container {
  max-width: 800px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Links - minimal underline */
a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--text-secondary);
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

h2 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  margin-bottom: 1.5rem;
  color: var(--text);
}

/* removed excessive styling from header */
.header {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
  font-weight: 400;
}

/* small square avatar on the left of header text */
.avatar {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 6px;
  border: none;
}

.header-text { display: flex; flex-direction: column; }

/* simplified about section */
.about {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  flex-shrink: 0;
}

.about p {
  margin-bottom: 0;
}

/* Match link emphasis used elsewhere */
.about a {
  font-weight: 500;
}

/* unified section styling */
.section {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.projects-section {
  min-height: 0;
  flex-shrink: 1;
  display: flex;
  flex-direction: column;
}

/* removed list-style customization, kept it simple */
.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.list li a {
  font-weight: 500;
}

/* Ensure ordered lists show numbers when using .list */
ol.list {
  list-style: decimal;
  padding-left: 1.25rem;
}

/* Tabs */
.tabs {
  display: block;
}

.tab-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab-button {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.tab-button.active {
  background: #f7f7f7;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.table th,
.table td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
}
.table thead th {
  font-weight: 600;
  background: #f8f8f8;
}
.table tr:last-child td { border-bottom: none; }

/* Zebra stripes */
.table tbody tr:nth-child(odd) {
  background: #fcfcfc;
}

/* Numeric alignment for coaster/parks tables */
#coaster-table th:nth-child(1),
#coaster-table td:nth-child(1),
#coaster-table th:nth-child(5),
#coaster-table td:nth-child(5) {
  text-align: right;
}

#parks-table th:nth-child(n+3),
#parks-table td:nth-child(n+3) {
  text-align: right;
}

/* Project list — scrollable */
.project-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 200px;
  max-height: calc(100vh - 400px);
}

.project-list::-webkit-scrollbar {
  width: 3px;
}

.project-list::-webkit-scrollbar-track {
  background: transparent;
}

.project-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.project-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.project-item:last-child {
  border-bottom: none;
}

.project-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-main a {
  font-weight: 500;
}

.project-keywords {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 400;
  font-style: italic;
}

.project-concepts {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.project-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

/* removed excessive footer styling */
.footer {
  margin-top: 1rem;
  padding-top: 1rem;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
}

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

.copyright {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0;
}

@media (max-width: 640px) {
  html, body {
    height: auto;
    overflow: auto;
  }

  body {
    padding: 1rem;
    font-size: 15px;
  }

  .project-list {
    max-height: 300px;
    min-height: 180px;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    margin: 1.5rem 0 0.75rem;
  }

  .avatar { width: 56px; height: 56px; }

  .footer-links {
    gap: 1rem;
  }
}
