/* ============================================================
   Wellington — Academic Portfolio
   Color scheme: white, black, dark green
   ============================================================ */

:root {
  /* Light theme (default) */
  --bg: #ffffff;
  --bg-alt: #f5f7f5;
  --text: #111111;
  --text-muted: #4a4a4a;
  --accent: #1b4d3e;        /* dark green */
  --accent-hover: #16402f;
  --accent-soft: #e7efe9;   /* pale green tint */
  --border: #e2e6e3;
  --card: #ffffff;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --header-bg: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] {
  --bg: #0e0f0e;
  --bg-alt: #161816;
  --text: #f2f2f2;
  --text-muted: #b3b8b4;
  --accent: #4caf8f;        /* lighter green for contrast on dark */
  --accent-hover: #6fc4a7;
  --accent-soft: #18261f;
  --border: #2a2d2a;
  --card: #161816;
  --shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
  --header-bg: rgba(14, 15, 14, 0.85);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  transition: background 0.3s ease, color 0.3s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* ============================================================
   Header / Nav
   ============================================================ */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.nav-brand:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 16px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  text-decoration: none;
}

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.2s ease, border-color 0.2s ease;
}

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

/* ============================================================
   Layout
   ============================================================ */

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 0;
}

/* Intro: photo left, text right */
.intro {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 64px;
}

.intro-left {
  position: sticky;
  top: 96px;
}

.profile-photo {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: block;
}

/* Social / quick links below photo — icon only, horizontal */
.social-links {
  margin-top: 22px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.social-links a {
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.social-links a:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.social-links .icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-links .icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Hover tooltip showing the label */
.social-links a::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 10;
}

.social-links a:hover::after {
  opacity: 1;
}

/* Intro text */
.intro-right h1 {
  font-size: 34px;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.intro-right .subtitle {
  font-size: 18px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 20px;
}

.intro-right p {
  margin-bottom: 18px;
  color: var(--text-muted);
  text-align: justify;
  text-align-last: left;
}

.intro-right p strong {
  color: var(--text);
}

/* ============================================================
   Section headings
   ============================================================ */

.section {
  margin-bottom: 64px;
  scroll-margin-top: 80px;
}

.section-title {
  font-size: 26px;
  letter-spacing: -0.3px;
  margin-bottom: 28px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* ============================================================
   Publications
   ============================================================ */

.pub {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.pub:last-child {
  border-bottom: none;
}

.pub-venue {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}

/* "Under review" label — light yellow */
.pub-venue.under-review {
  color: #8a6d00;
  background: #fdf6d8;
}

[data-theme="dark"] .pub-venue.under-review {
  color: #f0d878;
  background: #332e12;
}

/* "To appear" label — light blue */
.pub-venue.to-appear {
  color: #1c5d8a;
  background: #dcefff;
}

[data-theme="dark"] .pub-venue.to-appear {
  color: #8cd0f5;
  background: #122c3a;
}

.pub-title {
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.pub-authors {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.pub-authors .me {
  color: var(--text);
  font-weight: 400;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pub-links a {
  font-size: 14px;
  font-weight: 500;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.pub-links a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  text-decoration: none;
}

.see-all {
  margin-top: 24px;
  font-weight: 600;
}

/* ============================================================
   Ongoing projects
   ============================================================ */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.project-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 8px;
}

.project-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.project-card p {
  font-size: 15px;
  color: var(--text-muted);
}

/* ============================================================
   Updates
   ============================================================ */

.updates {
  list-style: none;
}

.update-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

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

.update-date {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.update-text {
  font-size: 16px;
  color: var(--text-muted);
}

/* ============================================================
   Portfolio page
   ============================================================ */

.page-header {
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 34px;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 18px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.case-studies-intro {
  margin-bottom: 28px;
}

.portfolio-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.portfolio-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.portfolio-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--accent-soft);
  display: block;
}

.portfolio-body {
  padding: 20px;
}

.portfolio-body h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.portfolio-body p {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 20px;
}

/* ============================================================
   UXR portfolio — skill categories & color coding
   Four categories: qualitative (green), quantitative (blue),
   synthesis (amber), tools (neutral)
   ============================================================ */

/* Category-colored tags */
.tag.tag-qual  { color: #1b4d3e; background: #e7efe9; }
.tag.tag-quant { color: #1c5d8a; background: #dcefff; }
.tag.tag-synth { color: #8a6d00; background: #fdf6d8; }
.tag.tag-tool  { color: #444b46; background: #eceeec; }

[data-theme="dark"] .tag.tag-qual  { color: #7fd1b3; background: #18261f; }
[data-theme="dark"] .tag.tag-quant { color: #8cd0f5; background: #122c3a; }
[data-theme="dark"] .tag.tag-synth { color: #f0d878; background: #332e12; }
[data-theme="dark"] .tag.tag-tool  { color: #c2c8c3; background: #242724; }

/* Skills & methods overview grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.skill-cat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.skill-cat h3 {
  font-size: 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.skill-cat .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-qual  { background: #2e7d63; }
.dot-quant { background: #2f86c4; }
.dot-synth { background: #c8a31a; }
.dot-tool  { background: #8a938c; }

.skill-cat ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.skill-cat li {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
}

.skill-cat li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* Case-study card additions (extends .portfolio-card) */
.case-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.eyebrow-qual  { color: #2e7d63; }
.eyebrow-quant { color: #2f86c4; }
.eyebrow-synth { color: #b08f12; }

[data-theme="dark"] .eyebrow-qual  { color: #7fd1b3; }
[data-theme="dark"] .eyebrow-quant { color: #8cd0f5; }
[data-theme="dark"] .eyebrow-synth { color: #f0d878; }

.case-context {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 3px solid var(--border);
}

.case-meta {
  margin-top: 14px;
}

.case-meta .meta-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text);
  margin-bottom: 8px;
}

/* ============================================================
   Footer
   ============================================================ */

footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding: 40px 24px;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

.footer-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 20px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.footer-social a:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.footer-social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  .intro {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .intro-left {
    position: static;
    max-width: 240px;
    margin: 0 auto;
    text-align: center;
  }

  .social-links {
    align-items: stretch;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-brand {
    font-size: 18px;
  }

  .nav-links a {
    font-size: 14px;
  }

  .update-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .nav {
    padding: 12px 16px;
  }

  main {
    padding: 32px 16px 0;
  }
}
