/* Site styling */
:root {
  --ink: #17202a;
  --muted: #5c6875;
  --paper: #f7f4ee;
  --surface: #ffffff;
  --line: #d8ddd8;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --warm: #c4633f;
  --shadow: 0 18px 50px rgba(23, 32, 42, 0.12);
}

html {
  scroll-behavior: smooth;
  background: url("20220827_121222.jpeg") center / cover fixed no-repeat;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

body:has(.hero-section),
body:has(.quarto-listing-container-grid),
body:has(.project-content) {
  background:
    linear-gradient(90deg, rgba(18, 25, 33, 0.78), rgba(18, 25, 33, 0.35) 50%, rgba(18, 25, 33, 0.12)),
    url("20220827_121222.jpeg") center / cover fixed no-repeat !important;
}

body:has(.hero-section) #quarto-content,
body:has(.hero-section) main.content,
body:has(.hero-section) .page-columns,
body:has(.hero-section) .content,
body:has(.quarto-listing-container-grid) #quarto-content,
body:has(.quarto-listing-container-grid) main.content,
body:has(.quarto-listing-container-grid) .page-columns,
body:has(.quarto-listing-container-grid) .content,
body:has(.project-content) #quarto-content,
body:has(.project-content) main.content,
body:has(.project-content) .page-columns,
body:has(.project-content) .content {
  background: transparent !important;
}

body:has(.hero-section) #quarto-content {
  display: block;
  width: 100vw;
  max-width: none;
}

body:has(.hero-section) main.content {
  max-width: none;
  width: 100vw;
  padding-left: 0;
  padding-right: 0;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--warm);
}

.navbar {
  backdrop-filter: blur(16px);
  background: rgba(247, 244, 238, 0.84) !important;
  border-bottom: 1px solid rgba(23, 32, 42, 0.08);
}

.navbar-title,
.nav-link {
  color: var(--ink) !important;
  letter-spacing: 0;
}

.hero-section {
  min-height: 92vh;
  width: 100vw;
  display: flex;
  align-items: center;
  padding: 7rem min(7vw, 5rem) 6rem;
  position: relative;
  overflow: hidden;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: transparent;
}

.hero-copy {
  width: 100%;
  max-width: 760px;
  color: #fff;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: #d6f5ef;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  color: #fff;
  font-size: clamp(3.8rem, 10vw, 8rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
}

.hero-subtitle {
  max-width: 680px;
  margin: 1.3rem 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.08rem, 2.4vw, 1.45rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
  justify-content: center;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.72rem 1.08rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: #ffffff;
  color: var(--ink);
}

.button.secondary {
  color: #ffffff;
}

.scroll-down {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  color: #fff;
  font-size: 2rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

.home-container,
.quarto-about-trestles,
main.content {
  max-width: min(1280px, calc(100vw - 6rem));
  margin: 0 auto;
}

.home-container {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(420px, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  width: min(1280px, calc(100vw - 6rem));
  max-width: none;
  margin: 0 auto 5rem !important;
  padding: clamp(3rem, 6vw, 5.5rem);
  align-items: start;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(216, 221, 216, 0.8);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.home-container h2,
.home-container h4 {
  text-align: left;
  border-bottom: 2px solid rgba(0, 151, 143, 0.58);
  padding-bottom: 0.35rem;
}

.home-container h2 {
  margin-top: 0;
  color: #071823;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
}

.home-container h4 {
  color: #006d66;
  font-weight: 900;
}

.home-container p,
.home-container li {
  color: #102331;
  font-weight: 600;
}

.home-container strong {
  color: #063f3b;
  font-weight: 900;
}

.profile-img {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.2rem 0 2rem;
}

.social-icons p {
  display: contents;
}

.social-icons a {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.social-icons a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.social-icons i {
  font-size: 1.25rem;
}

.tech-group,
.tech-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0 1.8rem;
}

.tech-box,
.tech {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.35rem 0.72rem;
  border: 1px solid #bfd1ca;
  border-radius: 8px;
  background: #edf7f4;
  color: #17443f;
  font-size: 0.9rem;
  font-weight: 700;
}

.tech-box.ai-skill {
  border-color: #f4c95d;
  background: linear-gradient(135deg, #fff7d6, #d9fff4);
  color: #123f3a;
  box-shadow: 0 8px 22px rgba(15, 118, 110, 0.18);
  font-weight: 900;
}

.blue-text {
  color: var(--accent-dark);
  font-weight: 800;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  padding: 0.75rem;
  border: 1px solid var(--line);
  text-align: left;
}

th {
  background: #eef2ef;
}

body:has(.quarto-listing-container-grid) {
  color: var(--ink);
}

body:has(.quarto-listing-container-grid) main.content {
  padding: 5rem 1.4rem;
  max-width: min(1280px, calc(100vw - 6rem));
}

body:has(.quarto-listing-container-grid) h1.title {
  color: #fff;
  text-align: left;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

body:has(.quarto-listing-container-grid) main.content > p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
}

.project-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 1.4rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.filter-years,
.filter-range {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: end;
}

.filter-chip,
.filter-clear {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  padding: 0.42rem 0.85rem;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 800;
}

.filter-chip.active,
.filter-chip:hover,
.filter-clear:hover {
  background: #fff;
  color: var(--ink);
}

.filter-count {
  margin: 0 0 0 auto;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
}

.filter-empty {
  padding: 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink) !important;
  font-weight: 800;
}

.quarto-grid {
  gap: 1.2rem;
}

.quarto-grid .quarto-grid-item {
  flex: 1 1 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(23, 32, 42, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.quarto-grid .quarto-grid-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(23, 32, 42, 0.12);
}

.quarto-grid-item .listing-title {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 850;
  text-transform: none !important;
}

.quarto-grid-item img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.project-content {
  max-width: 900px;
  margin: 2rem auto 0;
  padding: clamp(1.3rem, 4vw, 2.6rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

body:has(.project-content) main.content > header,
body:has(.project-content) main.content > .tech-buttons {
  color: #fff;
}

body:has(.project-content) main.content > header h1.title {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.42);
}

body:has(.project-content) main.content > header .description,
body:has(.project-content) main.content > header p,
body:has(.project-content) main.content > header .quarto-title-meta-heading,
body:has(.project-content) main.content > header .quarto-title-meta-contents {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.36);
}

.content:has(.project-content) {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.project-content {
  width: min(1500px, calc(100vw - 2rem));
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  padding: clamp(1rem, 2vw, 2rem);
}

.project-content:has(.tableau-embed) {
  width: min(1500px, calc(100vw - 2rem));
  max-width: none;
  position: static;
  transform: none;
  margin-left: auto;
  margin-right: auto;
  padding: clamp(1rem, 2vw, 2rem);
}

main.content:has(.project-content) > header,
main.content:has(.project-content) > .cell,
main.content:has(.project-content) > .tech-buttons {
  width: min(1500px, calc(100vw - 2rem));
  max-width: none;
  position: static;
  transform: none;
  margin-left: auto;
  margin-right: auto;
}

.project-content img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(23, 32, 42, 0.12);
}

.tableau-embed {
  width: fit-content;
  max-width: 100%;
  height: clamp(560px, 53vw, 790px);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 30px rgba(23, 32, 42, 0.12);
}

.tableau-embed tableau-viz {
  display: block;
  width: min(100%, 1366px);
  height: 100%;
}

.dashboard-panel {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.2rem;
  align-items: center;
  padding: 1.25rem;
  border: 1px solid #bfd1ca;
  border-radius: 8px;
  background: #edf7f4;
}

.dashboard-panel.compact {
  margin-top: 1rem;
}

.dashboard-panel h3 {
  margin: 0 0 0.4rem;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-panel p {
  margin: 0;
  max-width: 600px;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button.secondary.dark {
  border-color: var(--accent-dark);
  color: var(--accent-dark);
}

h1.title,
h2.title,
h3.title,
.listing-title {
  text-transform: none !important;
  letter-spacing: 0;
}

.project-nav-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  margin: 3rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.prev-arrow,
.next-arrow {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.prev-arrow::before {
  content: "< ";
}

.next-arrow::after {
  content: " >";
}

@media (min-width: 768px) {
  .quarto-grid .quarto-grid-item {
    flex: 1 1 calc(50% - 1.2rem);
    max-width: calc(50% - 0.6rem);
  }
}

@media (max-width: 760px) {
  .hero-section {
    min-height: 86vh;
    padding: 6rem 1.25rem 5rem;
  }

  .home-container {
    grid-template-columns: 1fr;
    width: calc(100% - 2rem);
    padding-top: 3rem;
  }

  .profile-img {
    max-width: 260px;
  }
}
