/* Tanner Regan - personal academic site (academicpages / Minimal Mistakes inspired) */

:root {
  --max-width: 1180px;
  --sidebar-width: 250px;
  --bg-color: #ffffff;
  --text-color: #3b3b3b;
  --muted-color: #6e6259;
  --gw-blue: #033c5a;
  --gw-navy: #00223e;
  --gw-buff: #d6bf91;
  --gw-buff-light: #f6f1e8;
  --link-color: var(--gw-blue);
  --link-color-hover: var(--gw-navy);
  --border-color: #e6ded0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text-color);
  background: var(--bg-color);
  line-height: 1.6;
}

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

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

/* Masthead */

.masthead {
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem;
}

.masthead__inner-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gw-blue);
}

.site-title:hover {
  color: var(--gw-blue);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-nav a {
  position: relative;
  display: inline-block;
  color: var(--muted-color);
  font-weight: 600;
  font-size: 0.95rem;
  padding-bottom: 4px;
}

@media (max-width: 480px) {
  .site-nav {
    width: 100%;
    gap: 0.4rem;
    flex-wrap: nowrap;
  }

  .site-nav a {
    font-size: 0.75rem;
  }
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--gw-blue);
  text-decoration: none;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--gw-buff);
  transform: scaleX(0);
  transition: transform 0.15s ease-in-out;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

/* Page layout */

.page-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

/* Sidebar */

.sidebar {
  flex: 0 0 var(--sidebar-width);
  width: var(--sidebar-width);
}

.author__avatar img {
  width: 175px;
  height: 175px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  padding: 4px;
  border: 1px solid var(--gw-buff);
}

.author__content {
  margin-top: 1rem;
}

.author__name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gw-navy);
  margin: 0 0 0.4rem;
}

.author__bio {
  color: var(--muted-color);
  font-size: 0.92rem;
  margin: 0 0 1rem;
}

.author__urls {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}

.author__urls li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.author__urls svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 0.2rem;
  fill: var(--gw-blue);
}

.author__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.author__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--gw-buff);
  background: #ffffff;
  transition: background 0.15s ease-in-out;
}

.author__social a:hover {
  background: var(--gw-buff-light);
}

.author__social svg {
  width: 16px;
  height: 16px;
  fill: var(--gw-blue);
}

.author__social a.author__social-text {
  width: auto;
  border-radius: 999px;
  padding: 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gw-blue);
}

.author__social a.author__social-text:hover {
  text-decoration: none;
}

/* Main content */

.page__content {
  flex: 1;
  min-width: 0;
}

h1 {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--gw-navy);
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gw-navy);
  margin: 2.2rem 0 0.9rem;
  border-bottom: 1px solid var(--gw-buff);
  padding-bottom: 0.4rem;
}

.page__content > h2:first-child,
.page__content > p:first-child {
  margin-top: 0;
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gw-blue);
  margin: 0 0 0.25rem;
}

/* Publication lists */

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

ul.pub-list > li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

ul.pub-list > li:first-child {
  padding-top: 0;
}

ul.pub-list > li:last-child {
  border-bottom: none;
}

ul.pub-list h3 {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.pub-meta {
  display: inline;
  color: var(--muted-color);
  font-size: 0.9rem;
}

.pub-meta em {
  font-weight: 700;
  font-style: italic;
}

.pub-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-left: 0.6rem;
  vertical-align: middle;
}

.pub-links a {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--gw-blue);
  border: 1px solid var(--gw-buff);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  background: #fff;
  transition: background 0.15s;
}

.pub-links a:hover {
  background: var(--gw-buff-light);
  text-decoration: none;
}

/* Event lists */

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

.event-list li {
  padding: 0.3rem 0;
}

.event-list li:first-child {
  padding-top: 0;
}

ul.pub-list a {
  font-weight: 700;
}

/* Plain lists */

main ul:not(.pub-list):not(.event-list):not(.author__urls) {
  padding-left: 1.25rem;
}

main ul:not(.pub-list):not(.event-list):not(.author__urls) li {
  margin-bottom: 0.4rem;
}

/* Section heading link */

.section-link {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted-color);
  margin-left: 0.75rem;
  vertical-align: middle;
}

.section-link:hover {
  color: var(--gw-blue);
}

/* Research interest tags */

.research-interests {
  margin: 1.25rem 0 2rem;
  border: 1px solid var(--gw-buff);
  border-radius: 8px;
  background: var(--gw-buff-light);
  padding: 0.85rem 1.1rem;
}

.cv-download-btn {
  display: inline-block;
  margin-top: 0.85rem;
  padding: 0.3rem 0.65rem;
  background: var(--gw-navy);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.15s;
}

.cv-download-btn:hover {
  background: #0a1f4a;
}

.research-interests__fields {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gw-navy);
  margin-bottom: 0.25rem;
}

.research-interests__topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.interest-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gw-blue);
  border: 1px solid var(--gw-buff);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  background: #fff;
}

/* Featured project cards */

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.project-card {
  display: block;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  color: var(--text-color);
  transition: box-shadow 0.15s;
}

.project-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  text-decoration: none;
}

.project-card__image {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--gw-buff-light) 0%, var(--gw-buff) 100%);
}

.project-card__image--split {
  position: relative;
  overflow: hidden;
}

.split-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split-img--tl {
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.split-img--br {
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.split-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.split-label {
  position: absolute;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0,0,0,0.45);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  pointer-events: none;
  line-height: 1.2;
}

.split-label--tl {
  top: 0.4rem;
  left: 0.4rem;
}

.split-label--br {
  bottom: 0.4rem;
  right: 0.4rem;
}

.project-card__body {
  padding: 0.8rem 1rem;
}

.project-card__body h3 {
  font-size: 0.9rem;
  color: var(--gw-blue);
  margin: 0 0 0.25rem;
}

.project-card__body p {
  font-size: 0.8rem;
  color: var(--muted-color);
  margin: 0;
}

.project-card__body .project-blurb {
  margin-top: 0.4rem;
  color: var(--text-color);
  font-size: 0.82rem;
  line-height: 1.5;
}

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

/* Contact block */

.contact-block {
  margin: 1.5rem 0;
  padding: 0.85rem 1.1rem;
  background: var(--gw-buff-light);
  border: 1px solid var(--gw-buff);
  border-radius: 6px;
  font-size: 0.95rem;
}

/* Footer */

.page__footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
  color: var(--muted-color);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
}

/* Responsive */

@media (max-width: 800px) {
  .page-wrap {
    flex-direction: column;
    gap: 1.5rem;
  }

  .sidebar {
    display: none;
  }

  body.home .sidebar {
    display: block;
    width: 100%;
  }

  body.home .author__avatar {
    text-align: center;
  }

  body.home .author__avatar img {
    width: 120px;
    height: 120px;
  }

  body.home .author__content {
    text-align: center;
  }

  body.home .author__urls {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
  }

  body.home .author__social {
    justify-content: center;
  }
}
