/* ==========================================================================
   Premium Agency / Data Scientist Portfolio — custom overrides
   Load AFTER Bootstrap 5's CSS.
   ========================================================================== */

:root {
  --color-bg: #F9F8F6;          /* off-white / cream */
  --color-text: #1F2328;        /* charcoal / dark navy-black */
  --color-text-muted: #5B6168;
  --color-gold: #C9A96E;        /* earthy gold accent */
  --color-teal: #1A4C54;        /* deep teal accent */
  --color-orange: #D87C4A;      /* burnt orange accent */
  --color-border: #E4E0D8;      /* soft, warm border */

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Import fonts (or self-host these for production) */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

html {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.8;
}

/* Nav and footer keep their natural size; main stretches to fill any
   leftover space, pushing the footer to the bottom on short pages. */
.site-navbar {
  flex: none;
}
main {
  flex: 1 0 auto;
}
.site-footer {
  flex: none;
}

h1, h2, h3, h4, h5, h6,
.font-heading {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

a {
  color: var(--color-teal);
  text-decoration: none;
}
a:hover {
  color: var(--color-gold);
}

/* -------------------- Navbar -------------------- */
.site-navbar {
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}
.site-navbar .navbar-brand {
  display: inline-flex;
  align-items: center;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1.5px solid var(--color-teal);
  border-radius: 50%;
  font-family: var(--font-heading);
  font-weight: 700;
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--color-teal);
  transition: background-color 0.25s ease, color 0.25s ease;
}
.site-navbar .navbar-brand:hover .brand-mark {
  background-color: var(--color-teal);
  color: #fff;
}
.site-navbar .nav-link {
  position: relative;
  color: var(--color-text-muted);
  font-weight: 500;
  padding-bottom: 4px;
  transition: color 0.25s ease;
}
.site-navbar .nav-link::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0;
  height: 2px;
  background-color: var(--color-teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
  color: var(--color-teal);
}
.site-navbar .nav-link:hover::after,
.site-navbar .nav-link.active::after {
  transform: scaleX(1);
}

/* -------------------- Hero -------------------- */
.hero {
  padding: 3.5rem 0 4rem;
}
.hero .eyebrow {
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  font-weight: 600;
}
.hero h1 {
  font-size: 3rem;
}
.hero p.tagline {
  color: var(--color-text-muted);
  font-size: 1.15rem;
  max-width: 40rem;
}

.stat-counter {
  border-left: 2px solid var(--color-gold);
  padding-left: 1rem;
}
.stat-counter .stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-teal);
}
.stat-counter .stat-label {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* -------------------- Hero visual: animated data-science scene -------------------- */
.hero-visual {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}
.hero-visual-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Scatter dots drifting in the background */
.hv-scatter circle {
  fill: var(--color-teal);
  opacity: 0.12;
  animation: hv-drift 7s ease-in-out infinite;
}
.hv-scatter circle:nth-child(1) { animation-delay: 0s; }
.hv-scatter circle:nth-child(2) { animation-delay: 0.8s; animation-duration: 8s; }
.hv-scatter circle:nth-child(3) { animation-delay: 1.6s; animation-duration: 6s; }
.hv-scatter circle:nth-child(4) { animation-delay: 0.4s; animation-duration: 9s; }
.hv-scatter circle:nth-child(5) { animation-delay: 2s;   animation-duration: 7.5s; }
.hv-scatter circle:nth-child(6) { animation-delay: 1.2s; animation-duration: 6.5s; }
.hv-scatter circle:nth-child(7) { animation-delay: 0.6s; animation-duration: 8.5s; }
.hv-scatter circle:nth-child(8) { animation-delay: 1.8s; animation-duration: 7s; }

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

/* Progress ring */
.hv-ring-track {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 9;
}
.hv-ring-progress {
  fill: none;
  stroke: var(--color-gold);
  stroke-width: 9;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 400px 80px;
  stroke-dasharray: 289;
  stroke-dashoffset: 289;
  animation: hv-ring-draw 1.6s ease-out 0.3s forwards;
}
@keyframes hv-ring-draw {
  to { stroke-dashoffset: 81; } /* ~72% of circumference (2*pi*46=289) */
}
.hv-ring-label {
  font-family: var(--font-heading);
  font-size: 22px;
  fill: var(--color-text);
  text-anchor: middle;
}

/* Bar chart */
.hv-axis {
  stroke: var(--color-border);
  stroke-width: 1.5;
}
.hv-bar {
  fill: var(--color-teal);
  transform-box: fill-box;
  transform-origin: bottom;
  transform: scaleY(0);
  animation: hv-grow-bar 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hv-bar-1 { animation-delay: 0.15s; }
.hv-bar-2 { animation-delay: 0.3s;  fill: var(--color-orange); }
.hv-bar-3 { animation-delay: 0.45s; }
.hv-bar-4 { animation-delay: 0.6s;  fill: var(--color-orange); opacity: 0.85; }

@keyframes hv-grow-bar {
  to { transform: scaleY(1); }
}

/* Trend line chart */
.hv-trend-line {
  fill: none;
  stroke: var(--color-teal);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  animation: hv-draw-line 1.4s ease-out 0.9s forwards;
}
@keyframes hv-draw-line {
  to { stroke-dashoffset: 0; }
}
.hv-trend-dot {
  fill: var(--color-bg);
  stroke: var(--color-teal);
  stroke-width: 2;
  opacity: 0;
  animation: hv-fade-in 0.4s ease-out forwards;
}
.hv-trend-dot-1 { animation-delay: 0.9s; }
.hv-trend-dot-2 { animation-delay: 1.2s; }
.hv-trend-dot-3 { animation-delay: 1.5s; }
.hv-trend-dot-4 { animation-delay: 1.8s; }
.hv-trend-dot-end {
  fill: var(--color-gold);
  stroke: none;
  animation: hv-fade-in 0.4s ease-out 2.1s forwards, hv-pulse 2s ease-in-out 2.5s infinite;
}
@keyframes hv-fade-in {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes hv-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.3); }
}

/* Floating chips */
.hv-chip rect {
  fill: #FFFFFF;
  stroke: var(--color-border);
  stroke-width: 1;
  filter: drop-shadow(0 4px 8px rgba(31, 35, 40, 0.06));
}
.hv-chip-text {
  font-family: var(--font-heading);
  font-size: 20px;
  fill: var(--color-teal);
  font-weight: 600;
}
.hv-chip-text-orange {
  fill: var(--color-orange);
}
.hv-chip {
  opacity: 0;
  animation: hv-chip-in 0.6s ease-out forwards, hv-float 5s ease-in-out infinite;
}
.hv-chip-code {
  animation-delay: 0.1s, 0.7s;
  animation-duration: 0.6s, 5s;
}
.hv-chip-sigma {
  animation-delay: 0.3s, 0.9s;
  animation-duration: 0.6s, 6s;
}
@keyframes hv-chip-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes hv-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  .hv-scatter circle,
  .hv-ring-progress,
  .hv-bar,
  .hv-trend-line,
  .hv-trend-dot,
  .hv-trend-dot-end,
  .hv-chip {
    animation: none !important;
    opacity: 1;
  }
  .hv-bar { transform: scaleY(1); }
  .hv-trend-line { stroke-dashoffset: 0; }
  .hv-ring-progress { stroke-dashoffset: 81; }
}


/* -------------------- Cards --------------------
   Explicitly NO top border. Use soft bottom border +
   subtle shadow + hover lift for interactivity. */
.content-card {
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(31, 35, 40, 0.04);
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  height: 100%;
}
.content-card:hover {
  box-shadow: 0 10px 24px rgba(31, 35, 40, 0.08);
  border-color: var(--color-gold);
  transform: translateY(-2px);
}
.content-card .card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.content-card .card-excerpt {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* -------------------- Category badges -------------------- */
.badge-project {
  background-color: rgba(26, 76, 84, 0.1);
  color: var(--color-teal);
  border: 1px solid rgba(26, 76, 84, 0.25);
  font-weight: 500;
  padding: 0.35em 0.75em;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-article {
  background-color: rgba(201, 169, 110, 0.14);
  color: #8A6D3B;
  border: 1px solid rgba(201, 169, 110, 0.35);
  font-weight: 500;
  padding: 0.35em 0.75em;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* -------------------- Buttons -------------------- */
.btn-accent {
  background-color: var(--color-teal);
  border-color: var(--color-teal);
  color: #fff;
  font-weight: 500;
  padding: 0.65rem 1.5rem;
  border-radius: 4px;
}
.btn-accent:hover {
  background-color: #123840;
  border-color: #123840;
  color: #fff;
}
.btn-outline-accent {
  border: 1px solid var(--color-teal);
  color: var(--color-teal);
  background: transparent;
  font-weight: 500;
  padding: 0.6rem 1.4rem;
  border-radius: 4px;
}
.btn-outline-accent:hover {
  background-color: var(--color-teal);
  color: #fff;
}

/* -------------------- List page -------------------- */
.list-filter .nav-link {
  color: var(--color-text-muted);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.5rem 1rem;
}
.list-filter .nav-link.active {
  color: var(--color-text);
  border-bottom-color: var(--color-orange);
  background: none;
}

/* -------------------- List toolbar (filter tabs + search) -------------------- */
.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.search-form {
  flex: 0 0 auto;
}
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 0.9rem;
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  pointer-events: none;
}
.search-input {
  min-width: 260px;
  padding: 0.55rem 2.25rem 0.55rem 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.95rem;
  color: var(--color-text);
  background-color: #FFFFFF;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-input:focus {
  outline: none;
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(26, 76, 84, 0.12);
}
.search-clear {
  position: absolute;
  right: 0.85rem;
  color: var(--color-text-muted);
  font-size: 1.2rem;
  line-height: 1;
  text-decoration: none;
}
.search-clear:hover {
  color: var(--color-teal);
}
@media (max-width: 576px) {
  .search-form {
    width: 100%;
  }
  .search-input {
    min-width: 0;
    width: 100%;
  }
}

.list-item {
  border-bottom: 1px solid var(--color-border);
  padding: 1.75rem 0;
}
.list-item:first-child {
  padding-top: 0;
}
.list-item .list-item-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
}
.list-item .read-more {
  color: var(--color-orange);
  font-weight: 500;
  font-size: 0.9rem;
}
.list-item .list-item-date {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* -------------------- Detail page -------------------- */
.detail-header {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
}
.detail-feature-image {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 2rem;
}
.detail-body h2 {
  margin-top: 2.5rem;
  font-size: 1.6rem;
}
.detail-body h3 {
  margin-top: 2rem;
  font-size: 1.3rem;
}
.detail-body blockquote {
  border-left: 3px solid var(--color-gold);
  padding: 0.5rem 1.5rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin: 2rem 0;
}
.detail-body pre,
.detail-body pre.ql-syntax {
  background-color: #22282C;
  color: #E8E6E1;
  border-radius: 6px;
  padding: 1.25rem;
  font-size: 0.9rem;
  overflow-x: auto;
}
.detail-body code {
  color: var(--color-orange);
}
.detail-body pre code {
  color: inherit;
  background: transparent;
  padding: 0;
}
.detail-body a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--color-border);
  transition: text-decoration-color 0.2s ease;
}
.detail-body a:hover {
  text-decoration-color: currentColor;
}
.detail-body img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  margin: 2rem 0;
}
.detail-body figure {
  margin: 2rem 0;
}
.detail-body figure img {
  margin: 0 0 0.6rem;
}
.detail-body figcaption {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* Syntax highlighting (highlight.js) — mapped to the site palette
   instead of a stock theme, so code blocks stay on-brand. */
.detail-body .hljs-keyword,
.detail-body .hljs-selector-tag,
.detail-body .hljs-literal,
.detail-body .hljs-doctag {
  color: var(--color-orange);
}
.detail-body .hljs-string,
.detail-body .hljs-attr,
.detail-body .hljs-regexp,
.detail-body .hljs-addition {
  color: var(--color-gold);
}
.detail-body .hljs-comment,
.detail-body .hljs-quote {
  color: #8A8F94;
  font-style: italic;
}
.detail-body .hljs-title,
.detail-body .hljs-function_,
.detail-body .hljs-built_in,
.detail-body .hljs-name {
  color: #7FB3C7;
}
.detail-body .hljs-number,
.detail-body .hljs-symbol {
  color: var(--color-gold);
}
.detail-body .hljs-variable,
.detail-body .hljs-params,
.detail-body .hljs-attribute {
  color: #E8E6E1;
}
.detail-body .hljs-deletion {
  color: #E08585;
}

/* -------------------- About page --------------------
   Scoped to .about-page with its own local blue accent variables,
   so the rest of the site keeps the gold/teal/orange palette. */
.about-page {
  --about-navy: #0B3D66;
  --about-blue: #2E86C1;
  --about-blue-light: #5DADE2;
}

.about-topbar {
  padding: 1.5rem 0;
}
.about-monogram {
  font-family: var(--font-heading);
  font-weight: 700;
  font-style: italic;
  font-size: 1.4rem;
  color: var(--about-navy);
}
.about-contact-inline a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-left: 1.5rem;
}
.about-contact-inline a:hover {
  color: var(--about-navy);
}

.about-bluebar {
  background-color: var(--about-navy);
  color: #fff;
  text-align: center;
  padding: 0.9rem 0;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.about-subnav {
  padding: 1.25rem 0;
}
.about-subnav a {
  color: var(--about-blue-light);
  font-weight: 500;
  margin: 0 1.25rem;
}
.about-subnav a:hover {
  color: var(--about-navy);
}

.about-name {
  font-size: 2.75rem;
  color: var(--color-text);
}

.about-section-title {
  font-size: 1.6rem;
  color: var(--color-text);
}

.about-rows {
  max-width: 760px;
  margin: 0 auto;
}
.about-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem 0;
}
.about-row-tall {
  align-items: flex-start;
}
.about-row-label {
  flex: 1 1 0;
  text-align: right;
  color: var(--color-text);
  font-size: 1rem;
  padding-right: 1.25rem;
  border-right: 1px solid var(--about-blue-light);
}
.about-row-value {
  flex: 1 1 0;
  text-align: left;
  color: var(--color-text);
}

.about-btn-primary {
  background-color: var(--about-navy);
  border-color: var(--about-navy);
  color: #fff;
  padding: 0.65rem 1.6rem;
  border-radius: 4px;
}
.about-btn-primary:hover {
  background-color: #082b48;
  border-color: #082b48;
  color: #fff;
}
.about-btn-outline {
  border: 1px solid var(--about-navy);
  color: var(--about-navy);
  background: transparent;
  padding: 0.6rem 1.5rem;
  border-radius: 4px;
}
.about-btn-outline:hover {
  background-color: var(--about-navy);
  color: #fff;
}

.tools-used-badge {
  display: inline-block;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.4rem 0.9rem;
  margin: 0.25rem;
  font-size: 0.9rem;
  color: var(--color-text);
  background-color: #FFFFFF;
}

/* -------------------- Home: Get in Touch -------------------- */
.home-contact {
  border-top: 1px solid var(--color-border);
}
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
}
.contact-brand {
  flex: 1 1 320px;
}
.contact-col {
  flex: 1 1 160px;
}
.contact-brand h2 {
  font-size: 1.75rem;
}
.contact-brand p {
  max-width: 34ch;
}
.contact-col-heading {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 1.1rem;
}
.contact-col-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-col-list li {
  margin-bottom: 0.75rem;
  font-size: 0.98rem;
}
.contact-col-list a {
  color: var(--color-text);
  transition: color 0.2s ease;
}
.contact-col-list a:hover {
  color: var(--color-teal);
}
.contact-item-link,
.contact-item-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.contact-item-icon {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-right: 0.65rem;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}
.contact-item-link:hover .contact-item-icon {
  color: var(--color-teal);
}

/* -------------------- Footer -------------------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  padding: 2.5rem 0;
}
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease, transform 0.2s ease;
}
.back-to-top:hover {
  color: var(--color-teal);
  transform: translateY(-2px);
}
