:root {
  --bg-color: #ffffff;
  --text-color: #1a1a1a;
  --text-secondary: #666666;
  --link-color: #0066cc;
}

[data-theme="dark"] {
  --bg-color: #000000;
  --text-color: #e8e8e8;
  --text-secondary: #999999;
  --link-color: #4da6ff;
}

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


body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, Georgia, serif;
  font-size: 16px;
  line-height: 1.65;
  padding: 20px;
  max-width: 650px;
  margin: 0 auto;
}

nav {
  margin-bottom: 40px;
  display: flex;
  gap: 15px;
  align-items: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

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

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

.theme-toggle {
  background: none;
  border: 1px solid var(--text-color);
  color: var(--text-color);
  cursor: pointer;
  padding: 2px 8px;
  font-size: 14px;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
  font-weight: normal;
}

.hero-links {
  font-size: 0.95rem;
  margin-bottom: 35px;
}

.hero-links a {
  margin: 0 5px;
}

.hero-links a:first-child {
  margin-left: 0;
}

h2 {
  font-size: 1.3rem;
  margin: 45px 0 20px 0;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.15);
}

h3 {
  font-size: 1.1rem;
  margin: 35px 0 15px 0;
  font-weight: 500;
  opacity: 0.9;
}

section {
  margin-bottom: 45px;
}

section:last-child {
  margin-bottom: 30px;
}

section:first-of-type h2 {
  margin-top: 30px;
}

a {
  color: var(--link-color);
}

ul {
  list-style: none;
  padding-left: 0;
}

li {
  margin-bottom: 18px;
  font-weight: normal;
  padding-left: 0;
  margin-left: 0;
}

li > div {
  margin-left: 0;
  padding-left: 0;
}

/* Legacy date spans - only for old-style inline dates */
li > span {
  margin-left: 10px;
  font-size: 0.9rem;
  opacity: 0.6;
  font-weight: normal;
}

/* Ensure title spans have no offset */
.experience-title,
.education-title {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

li p {
  margin-top: 8px;
  margin-bottom: 0;
  font-size: 0.95rem;
  opacity: 0.8;
  line-height: 1.65;
}

li p + p {
  margin-top: 8px;
}

p {
  margin-bottom: 15px;
}

article p {
  margin-bottom: 20px;
}

.date {
  font-size: 0.9rem;
  margin-bottom: 30px;
  opacity: 0.6;
}

/* Dropdown styles */
.dropdown-toggle {
  cursor: pointer;
  user-select: none;
}

.dropdown-toggle:hover {
  opacity: 0.7;
}

.arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 0.8em;
}

.dropdown-toggle.active .arrow {
  transform: rotate(-180deg);
}

.dropdown-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.dropdown-content.active {
  max-height: 2000px;
  margin-top: 15px;
}

.dropdown-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 15px;
  border-radius: 4px;
}

/* Project metadata */
.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
  margin-left: 0;
  padding-left: 0;
}

.project-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.project-tech {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 8px;
  margin-bottom: 5px;
}

.project-links {
  font-size: 0.9rem;
  margin-top: 5px;
}

/* Experience metadata */
.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
  margin-left: 0;
  padding-left: 0;
}

.experience-title {
  font-weight: 500;
  margin-left: 0;
  padding-left: 0;
}

.experience-date {
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.experience-status {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 3px;
  margin-bottom: 8px;
}

.experience-tech {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 8px;
  margin-bottom: 5px;
}

/* Education metadata */
.education-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
  margin-left: 0;
  padding-left: 0;
}

.education-title {
  font-weight: 500;
  margin-left: 0;
  padding-left: 0;
}

.education-date {
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.education-details {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* Research metadata */
.research-item {
  margin-bottom: 30px;
}

.research-title {
  margin-bottom: 5px;
  font-weight: 500;
}

.research-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: block;
}

.research-description {
  margin-bottom: 10px;
}

.research-links {
  font-size: 0.9rem;
}

/* Contact links */
.contact-links {
  font-size: 1rem;
  margin-top: 15px;
}

.contact-links a {
  margin: 0 5px;
}

.contact-links a:first-child {
  margin-left: 0;
}
