:root {
  --bg: #ffffff;
  --text: #222222;
  --muted: #777777;
  --accent: #c35b2d;
  --border: #e1e1e1;
}

html[data-theme="dark"] {
  --bg: #050608;
  --text: #f5f5f5;
  --muted: #9fa3b3;
  --border: #262938;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-color: rgba(43, 75, 124, 0.5);
  text-underline-offset: 0.14em;
}

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

.page {
  max-width: 1040px;
  margin: 3.5rem auto 4rem;
  padding: 0 4rem 0;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background-color: var(--bg);
}

.site-header-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.75rem 4rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-title-block {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.site-title {
  font-size: 2.1rem;
  font-weight: 500;
  margin: 0;
}

.site-title-link {
  text-decoration: none;
  color: inherit;
}

.site-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.site-nav a {
  color: #e2591d;
  text-decoration: none;
  position: relative;
  padding-bottom: 0.1rem;
}

.theme-toggle {
  margin-left: 1.25rem;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent);
  transition: width 0.16s ease-out;
}

.site-nav a:hover::after {
  width: 100%;
}

.muted {
  color: var(--muted);
}

.accent-email {
  color: #e2591d;
}

.hero {
  margin-top: 2.25rem;
}

.hero-tagline {
  font-family: "Georgia", "Times New Roman", serif;
  font-style: italic;
  font-size: 1.5rem;
  margin: 0 0 2.25rem;
}

.hero-inner {
  display: flex;
  align-items: flex-start;
  gap: 3.5rem;
}

.hero-text {
  flex: 2;
  max-width: 560px;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.8;
}

.hero-text p {
  margin-top: 0;
}

.hero-text p + p {
  margin-top: 1.25rem;
}

.hero-photo {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.portrait-circle {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  object-fit: cover;
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #555;
  font-size: 0.85rem;
  color: #333;
  text-decoration: none;
  background-color: transparent;
}

.social-pill:hover {
  border-color: #222;
  background-color: rgba(0, 0, 0, 0.02);
}

.social-pill-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1.5px solid #555;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.social-pill-icon svg {
  width: 11px;
  height: 11px;
  display: block;
}

.social-pill-github .social-pill-icon svg {
  fill: #333;
}

.social-pill-instagram .social-pill-icon svg {
  stroke: #333;
  fill: none;
}

.social-pill-linkedin .social-pill-icon {
  font-size: 10px;
  font-weight: 600;
  border: 1.5px solid #555;
}

.social-pill-linkedin .social-pill-icon::before {
  content: "in";
}

.social-pill-linkedin .social-pill-icon svg {
  display: none;
}

.social-pill-x .social-pill-icon svg {
  fill: #333;
}
}

@media (max-width: 640px) {
  .site-footer p {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

.projects {
  margin-top: 2.25rem;
}

.projects-title {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 2rem;
  margin: 0 0 0.75rem;
}

.projects-intro {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 0.8rem;
}

.projects-subtitle {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1.2rem;
  margin: 2rem 0 1rem;
}

.bookshelf {
  margin-top: 2.25rem;
}

.shelf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.2rem 2rem;
  margin-top: 1.25rem;
}

.shelf-column .projects-intro {
  margin-bottom: 0.6rem;
}

.shelf-list {
  list-style: none;
  margin: 0;
  padding-left: 0;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 16px;
  color: var(--muted);
}

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

.project-list {
  margin-top: 0.5rem;
}

.project-row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  column-gap: 1.5rem;
  padding: 0.35rem 0;
}

.project-date {
  font-size: 0.9rem;
  color: var(--muted);
}

.project-main {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.6;
}

.project-name {
  font-weight: 500;
}

.project-desc {
  margin: 0.15rem 0 0;
}

@media (max-width: 640px) {
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-title {
    font-size: 1.7rem;
  }

  .site-nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
  }

  .theme-toggle {
    margin-left: auto;
  }

  .page {
    margin: 1.5rem 0 2.5rem;
    padding: 1.75rem 1.25rem 2.25rem;
  }

  .hero-inner {
    flex-direction: column-reverse;
  }

  .hero-photo {
    justify-content: flex-start;
  }

  .project-row {
    grid-template-columns: 1fr;
    row-gap: 0.15rem;
  }
}

