/* —— Design tokens —— */
:root {
  --bg: #f0f0f0;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #555555;
  --text-faint: #999999;
  --accent: #F97316;
  --accent-hover: #ea6c0b;
  --accent-light: #fff7ed;
  --border: #e5e5e5;
  --radius: 12px;
  --font-heading: 'Poppins', system-ui, sans-serif;
  --font-body: 'Roboto', system-ui, sans-serif;
  --font-logo: 'Dancing Script', cursive;
  --header-h: 4rem;
  --sidebar-w: 272px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* —— Header —— */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 2rem;
  background: var(--surface);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

.logo {
  font-family: var(--font-logo);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.45rem 1rem;
  border-radius: 50px;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
  background: var(--bg);
}

.nav-link.active {
  color: #fff;
  background: var(--accent);
}

/* —— Body layout —— */
.body-layout {
  display: flex;
  gap: 1.5rem;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 4rem;
  align-items: flex-start;
  flex: 1;
}

/* —— Sidebar —— */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
  text-align: center;
}

.sidebar-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  letter-spacing: 0.02em;
}

.sidebar-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

.sidebar-role {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sidebar-institution {
  font-size: 0.8125rem;
  color: var(--text-faint);
  margin: 0;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}

.sidebar-contact {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  text-align: left;
}

.sidebar-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
}

.sidebar-contact-item:last-child {
  margin-bottom: 0;
}

.sidebar-contact-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
}

.sidebar-contact-value {
  color: var(--text-muted);
  word-break: break-all;
  text-decoration: none;
}

a.sidebar-contact-value:hover {
  color: var(--accent);
}

.sidebar-socials {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.social-btn svg {
  width: 15px;
  height: 15px;
}

.social-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

/* —— Main —— */
.main {
  flex: 1;
  min-width: 0;
}

/* —— Sections —— */
.section {
  scroll-margin-top: calc(var(--header-h) + 1rem);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem 2rem 2.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.title-accent {
  color: var(--accent);
}

.title-bar {
  width: 3.5rem;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 1.5rem;
}

.section-text {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.9375rem;
}

.section-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

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

/* —— Interest cards —— */
.subsection-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.75rem 0 1rem;
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.interest-card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.interest-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 8%, transparent);
}

.interest-icon {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
  display: block;
}

.interest-title {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.4rem;
}

.interest-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* —— Projects —— */
.project-grid {
  display: grid;
  gap: 1rem;
}

.project-card {
  display: block;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  background: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 8%, transparent);
}

.project-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}

.project-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 0.85rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-faint);
  background: color-mix(in srgb, var(--text) 5%, var(--bg));
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
}

/* —— Journal project card —— */
.project-card--journal {
  cursor: default;
}

.pj-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.pj-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.pj-versions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.pj-version {
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
}

.pj-version--old {
  color: var(--text-faint);
  border: 1px solid var(--border);
}

.pj-version--new {
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.pj-version-arrow {
  color: var(--text-faint);
  font-size: 0.7rem;
}

.pj-example {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: color-mix(in srgb, var(--text) 4%, var(--bg));
  border: 1px solid var(--border);
  border-radius: 6px;
}

.pj-example-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.3rem;
}

.pj-policy {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.pj-perspectives {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin: 1rem 0;
}

@media (max-width: 640px) {
  .pj-perspectives {
    grid-template-columns: 1fr;
  }
}

.pj-perspective {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.pj-persp-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}

.pj-persp-icon {
  font-size: 0.875rem;
}

.pj-persp-label {
  font-size: 0.75rem;
  font-weight: 600;
}

.pj-persp-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.pj-upgrade {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 4%, var(--bg));
  border-radius: 0 6px 6px 0;
}

.pj-upgrade-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.pj-upgrade-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.pj-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.pj-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.pj-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* —— Academic paper card —— */
.project-card--paper {
  cursor: default;
}

.pp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.pp-course {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.pp-type {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

.pp-arguments {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 1rem 0;
}

.pp-arg {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: color-mix(in srgb, var(--text) 3%, var(--bg));
}

.pp-arg-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.3rem;
}

.pp-arg-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.pp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* —— Courses —— */
.courses-term-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 1.25rem 0 0.6rem;
}

.courses-term-label:first-of-type {
  margin-top: 0;
}

.course-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.course-list li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}

.course-list li:last-child {
  border-bottom: none;
}

.course-code {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.03em;
  flex-shrink: 0;
  min-width: 5rem;
}

/* —— Contact —— */
.contact-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text) !important;
  text-decoration: none !important;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.15s ease;
}

.contact-link:hover {
  color: var(--accent) !important;
}

/* —— Footer —— */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-faint);
}

/* —— Responsive —— */
@media (max-width: 820px) {
  .body-layout {
    flex-direction: column;
    padding: 1rem 1rem 3rem;
    gap: 1rem;
  }

  .sidebar {
    width: 100%;
    position: static;
  }

  .interest-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section {
    padding: 1.5rem 1.25rem;
  }
}

@media (max-width: 500px) {
  .header {
    padding: 0 1rem;
  }

  .nav-link {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
  }

  .logo {
    font-size: 1.4rem;
  }

  .interest-grid {
    grid-template-columns: 1fr;
  }
}

/* v2 */
