/* styles/index.css — site-wide styles for ahalgh.github.io */

/* ── Lato font faces ──────────────────────────────────────── */
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAUi-qNiXg7eU0.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAXC-qNiXg7Q.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_FQftx9897sxZ.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_Gwftx9897g.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjxAwXiWtFCfQ7A.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjx4wXiWtFCc.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwaPGQ3q5d0N7w.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Theme variables ──────────────────────────────────────── */
:root {
  --text-color: #333;
  --text-secondary: #444;
  --text-muted: #666;
  --dark-gray: #4a4a4a;
  --moon-gray: #ccc;
  --silver: #999;
  --blue: #1772d0;
  --dark-blue: #0f5aa8;
  --orange: #f09228;
  --gold: #ffb700;
  --border-color: #e0e0e0;
  --border-light: #eee;
  --bg-color: #fff;
  --bg-secondary: #fafafa;
  --bg-hover: #fff;
  --highlight-bg: #ffffd0;
  --shadow-color: rgba(0, 0, 0, 0.10);
}


/* ── Base typography ──────────────────────────────────────── */
body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

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

a:focus,
a:hover {
  color: var(--orange);
  text-decoration: none;
}

body,
td,
th,
tr,
p,
a {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
}

strong {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
}

h2 {
  margin: 0;
  font-weight: normal;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 22px;
}

.papertitle {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.name {
  padding-top: 20px;
  margin: 0;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 32px;
}

.one {
  width: 160px;
  height: 160px;
  position: relative;
}

.two {
  width: 160px;
  height: 160px;
  position: absolute;
  transition: opacity .2s ease-in-out;
  -moz-transition: opacity .2s ease-in-out;
  -webkit-transition: opacity .2s ease-in-out;
}

.fade {
  transition: opacity .2s ease-in-out;
  -moz-transition: opacity .2s ease-in-out;
  -webkit-transition: opacity .2s ease-in-out;
}

span.highlight {
  background-color: var(--highlight-bg);
}

.colored-box {
  color: black;
  padding: 20px;
  display: inline-block;
  border-radius: 10px;
}

/* ── Site header ─────────────────────────────────────────── */
.site-header {
  padding: 24px 16px 0;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
}

.header-photo-link {
  flex-shrink: 0;
}

.header-photo {
  display: block;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

.header-info {
  flex: 1;
}

.header-name {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 4px;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
}

.header-name a {
  color: var(--text-color);
  text-decoration: none;
}

.header-name a:hover {
  color: var(--blue);
}

.header-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0 0 12px;
}

/* Social icons */
.social-icons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #6b7280;
  color: #fff;
  transition: background 0.2s ease;
}

.social-icon:hover,
.social-icon:focus {
  color: #fff;
}

.social-email { background: #6b7280; }
.social-email:hover { background: #4b5563; }

.social-scholar { background: #4285F4; }
.social-scholar:hover { background: #2b6dd6; }

.social-linkedin { background: #0077B5; }
.social-linkedin:hover { background: #005e93; }

.social-github { background: #333; }
.social-github:hover { background: #111; }

/* Tab navigation */
.tab-nav {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding-bottom: 16px;
}

.tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 0;
  flex: 1;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  background: var(--bg-color);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tab-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--moon-gray);
  color: var(--text-color);
  text-decoration: none;
}

.tab-btn.tab-active {
  background: var(--bg-secondary);
  border-color: var(--moon-gray);
  color: var(--text-color);
  font-weight: 600;
}

/* Mobile header */
@media (max-width: 600px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }

  .header-photo {
    width: 100px;
    height: 100px;
  }

  .header-name {
    font-size: 24px;
  }

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

  .tab-nav {
    gap: 8px;
  }

  .tab-btn {
    padding: 8px 0;
    font-size: 13px;
  }
}

/* ── Utility classes ────────────────────────────────────── */
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

/* ── Paper tiles ──────────────────────────────────────────── */
.paper-tile {
  display: block;
  padding: 14px 16px;
  margin: 0 8px 12px;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--blue);
  border-radius: 4px;
  background: var(--bg-secondary);
  text-decoration: none;
  color: var(--text-color);
  transition: box-shadow 0.15s ease, border-left-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
}

.paper-tile:hover {
  box-shadow: 0 2px 8px var(--shadow-color);
  border-left-color: var(--orange);
  background: var(--bg-hover);
  text-decoration: none;
  color: var(--text-color);
}

.paper-tile-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--blue);
}

.paper-tile:hover .paper-tile-title {
  color: var(--orange);
}

.paper-tile-authors {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

.paper-tile-venue {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Project tiles ──────────────────────────────────────── */
.project-tile {
  display: flex;
  gap: 16px;
  padding: 14px 16px;
  margin: 0 8px 12px;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--blue);
  border-radius: 4px;
  background: var(--bg-secondary);
  transition: box-shadow 0.15s ease, border-left-color 0.15s ease, background 0.15s ease;
}

.project-tile:hover {
  box-shadow: 0 2px 8px var(--shadow-color);
  border-left-color: var(--orange);
  background: var(--bg-hover);
}

.project-tile-image {
  flex-shrink: 0;
  width: 120px;
  height: 90px;
  overflow: hidden;
  border-radius: 4px;
}

.project-tile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-tile-content {
  flex: 1;
  min-width: 0;
}

.project-tile-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.project-tile-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--blue);
}

.project-tile:hover .project-tile-title {
  color: var(--orange);
}

.project-tile-date {
  font-size: 12px;
  font-style: italic;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 12px;
}

.project-tile-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0 8px;
  line-height: 1.5;
}

.project-tile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.project-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.project-tile-links {
  display: flex;
  gap: 14px;
  font-size: 13px;
}

.project-link {
  color: var(--blue);
  text-decoration: none;
}

.project-link:hover {
  color: var(--orange);
}

@media screen and (max-width: 600px) {
  .project-tile {
    flex-direction: column;
  }
  .project-tile-image {
    width: 100%;
    height: 140px;
  }
  .project-tile-header {
    flex-direction: column;
  }
  .project-tile-date {
    margin-left: 0;
  }
}

/* ── Interests page ─────────────────────────────────────── */
.interests-category {
  margin-bottom: 24px;
}

.interests-category-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 8px 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

.interests-category-title i {
  color: var(--blue);
  margin-right: 6px;
  width: 20px;
  text-align: center;
}

.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  padding: 0 8px;
}

.interest-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-secondary);
  transition: box-shadow 0.15s ease, background 0.15s ease;
  cursor: pointer;
}

.interest-card:hover {
  box-shadow: 0 2px 8px var(--shadow-color);
  background: var(--bg-hover);
}

.interest-card.active {
  border-color: var(--blue);
  background: var(--bg-hover);
  box-shadow: 0 2px 8px var(--shadow-color);
}

.interest-card-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--blue);
  font-size: 14px;
}

.interest-card-content {
  flex: 1;
  min-width: 0;
}

.interest-card-content strong {
  font-size: 13px;
  display: block;
  margin-bottom: 2px;
}

.interest-card-content p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.interest-link {
  font-size: 12px;
  margin-top: 4px;
  display: inline-block;
}

.interest-detail {
  display: none;
  margin: 12px 8px 24px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-secondary);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.interest-detail.active {
  display: block;
}

.interest-detail h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text-color);
}

/* Blog post list on interests page */
.blog-post-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.blog-post-item:last-child {
  border-bottom: none;
}

.blog-post-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--blue);
}

.blog-post-title:hover {
  color: var(--orange);
}

.blog-post-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
}

.blog-post-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.5;
}

@media screen and (max-width: 500px) {
  .interests-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Scroll animations ──────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
}

.animate-on-scroll.is-visible {
  animation: fadeInUp 0.5s ease forwards;
}

.animate-on-scroll.stagger-1.is-visible { animation-delay: 0.05s; }
.animate-on-scroll.stagger-2.is-visible { animation-delay: 0.10s; }
.animate-on-scroll.stagger-3.is-visible { animation-delay: 0.15s; }
.animate-on-scroll.stagger-4.is-visible { animation-delay: 0.20s; }

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll { opacity: 1; }
  .animate-on-scroll.is-visible { animation: none; }
}
