:root {
  --bg: #ffffff;
  --text: #111111;
  --text-secondary: #555555;
  --accent: #000000;
  --border: #e0e0e0;
  --hover-bg: #f5f5f5;
}

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

html,
body {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--text);
  color: var(--bg);
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

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

.container {
  margin: 0 auto;
  padding: 80px 40px;
  max-width: 720px;
}

/* Header Section */
.header-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 48px;
  margin-bottom: 24px;
}

.header-frame {
  flex: 1;
  min-width: 260px;
}

h1 {
  color: var(--text);
  font-weight: 600;
  font-size: 2rem;
  margin: 0 0 16px 0;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.header-frame h2 {
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 0.95rem;
  margin: 0 0 4px 0;
  line-height: 1.5;
  letter-spacing: 0;
}

/* Page titles for subpages */
.container > div > h1,
.container > h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 40px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* Section headers on subpages */
.container > div > h2,
.container > div h2:not(.header-frame h2) {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 36px 0 6px 0;
  letter-spacing: -0.2px;
}

.container > div > h2:first-of-type {
  margin-top: 0;
}

/* Photo */
.img-frame {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.img-frame img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 100%;
  width: 100%;
  object-fit: cover;
  filter: grayscale(15%);
}

/* Navigation Links */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 24px 0 40px 0;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.links a {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 2px 0;
  transition: color 0.2s ease;
  letter-spacing: 0.01em;
}

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

/* Bio Section */
.bio {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.bio br {
  display: block;
  content: "";
  margin: 12px 0;
}

/* Content Paragraphs */
p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 2px 0 12px 0;
}

/* Lists */
ul {
  margin: 8px 0 24px 0;
  padding-left: 20px;
}

li {
  margin-bottom: 6px;
  line-height: 1.7;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

li a {
  font-weight: 500;
}

/* Tables */
table {
  margin: 24px auto;
  border-collapse: collapse;
  width: 100%;
}

thead tr {
  border-bottom: 1px solid var(--text);
}

tbody tr:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

tr td:nth-child(1) {
  padding: 14px 20px 14px 0;
  font-weight: 500;
}

tr td:nth-child(2) {
  text-align: right;
  color: var(--text-secondary);
}

/* Collapsible Sections */
.collapsible_se_sf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 400;
  cursor: pointer;
  padding: 8px 14px;
  margin: 8px 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: left;
  outline: none;
  transition: all 0.2s ease;
}

.collapsible_se_sf::before {
  content: '→';
  transition: transform 0.2s ease;
  font-size: 0.85rem;
}

.collapsible_se_sf.active::before {
  transform: rotate(90deg);
}

.collapsible_se_sf:hover {
  color: var(--text);
  border-color: var(--text-secondary);
}

.se_sf_content {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.se_sf_content.show {
  padding: 12px 16px;
  max-height: 500px;
}

.se_sf_content p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 675px) {
  .container {
    padding: 48px 24px;
  }

  .header-section {
    flex-direction: column-reverse;
    text-align: center;
    gap: 24px;
  }

  .header-frame {
    min-width: auto;
  }

  h1 {
    font-size: 1.75rem;
  }

  .links {
    justify-content: center;
    gap: 4px 16px;
  }

  .img-frame {
    width: 140px;
    height: 140px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 32px 20px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .container > div > h1,
  .container > h1 {
    font-size: 1.25rem;
  }

  .links {
    gap: 4px 12px;
  }

  .links a {
    font-size: 0.85rem;
  }
}
