*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --text: #111111;
  --text-muted: #666666;
  --link: #0066cc;
  --link-hover: #004499;
  --border: #eaeaea;
  --bg-hover: #f5f5f7;
  --max-width: 42rem;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 4rem 2rem 5rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Header & Profile Layout */
.profile-container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2.5rem;
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.profile-text {
  flex: 1;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

h1 span {
  font-weight: 300;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.role {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Social & Action Links */
.email-line {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.email-line a {
  color: var(--text);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.email-line a:hover {
  color: var(--link);
  border-bottom-color: var(--link);
  text-decoration: none;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  background: #ffffff;
  border: 1px solid #d1d1d6;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn:hover {
  background: var(--bg-hover);
  border-color: #8e8e93;
  color: var(--text);
  text-decoration: none;
}

/* Profile Photo */
.profile-photo-wrapper {
  flex-shrink: 0;
}

.profile-photo {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--border);
  background-color: var(--bg-hover);
}

/* Section Styles */
section {
  margin-bottom: 3.5rem;
}

h2 {
  margin: 0 0 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.intro p {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #222222;
}

/* Paper Styles */
.paper {
  margin-bottom: 2.5rem;
}

.paper:last-child {
  margin-bottom: 0;
}

h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.meta {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.abstract {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: #333333;
  line-height: 1.6;
}

.links {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Work in Progress List */
.wip {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wip li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
  color: #222222;
}

.wip li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.wip li strong {
  font-weight: 600;
}

/* Global Link Styles */
a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* Footer */
footer {
  margin-top: 5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

footer p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 640px) {
  body {
    padding: 2.5rem 1.25rem 4rem;
  }

  .profile-container {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    padding-bottom: 2rem;
  }

  .profile-photo {
    width: 120px;
    height: 120px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .role {
    margin-bottom: 1.25rem;
  }

  .social-links {
    justify-content: center;
  }

  .intro p {
    font-size: 1rem;
  }
}
