/* ======================================================
   Color Palette & Type Scale
   ====================================================== */
:root {
  /* Background & Surfaces */
  --clr-bg:        #efeff2;
  --clr-muted:     #dadae3;

  /* Core Brand Colors */
  --clr-secondary: #f2e2cd;
  --clr-primary:   #a69eb0;

  /* Accent for highlights & buttons */
  --clr-accent:    #f2e2cd;

  /* Text Colors */
  --clr-text:       #264d3a;
  --clr-text-light: #4a6956;
  --clr-white:      #ffffff;

  /* Type Scale */
  --type-base:     1.25rem;
  --type-body:     1.35rem;
  --type-section:  2rem;
  --type-header:   2.75rem;
}

/* Black & White Theme Override */
.bw-theme {
  --clr-bg:         #ffffff;
  --clr-muted:      #777777;
  --clr-secondary:  #333333;
  --clr-primary:    #000000;
  --clr-accent:     #555555;
  --clr-text:       #000000;
  --clr-text-light: #555555;
}

/* ======================================================
   Base & Reset
   ====================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  height: 100%;
   font-size: 75%;  /* 85% of 16px ≈ 13.6px base; shrinks everything */
}
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: var(--type-base);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  min-height: 100%;
  position: relative;
}

/* Skip-to-content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 1rem;
  background: var(--clr-primary);
  color: var(--clr-white);
  padding: .5rem 1rem;
  text-decoration: none;
  transition: top .3s;
  z-index: 1000;
}
.skip-link:focus {
  top: 1rem;
}

/* ======================================================
   Layout Container
   ====================================================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

/* ======================================================
   Site Header & Navigation
   ====================================================== */
.site-header {
  background: linear-gradient(to right, var(--clr-secondary), var(--clr-primary));
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}

/* Make the three header areas equal-width columns */
.tagline-area,
.brand-area,
.nav-links {
  flex: 1;
}

/* Center text in the brand area */
.brand-area {
  text-align: center;
}

/* Brand Name & Subtitle */
.brand-name {
  margin: 0;
  font-size: var(--type-header);   /* e.g. 2.75rem */
  font-weight: 700;                /* bold */
}

.brand-subtitle {
  margin: 0.25rem 0 1.5rem;
  font-size: var(--type-section);  /* e.g. 2rem */
  font-weight: 400;                /* normal weight */
  color: var(--clr-text-light);
}

/* ======================================================
   Header: Horizontal Nav Links
   ====================================================== */
.nav-links {
  display: flex;             
  justify-content: flex-end; /* push links to the right within its column */
}

.nav-links ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
}

.nav-links a,
.nav-links .nav-btn {
  color: var(--clr-white);
  font-weight: 600;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links .nav-btn:hover {
  color: var(--clr-accent);
}

.nav-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

/* ======================================================
   Buttons
   ====================================================== */
.btn {
  display: inline-block;
  padding: .8rem 1.2rem;
  font-size: 1.1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, background .3s;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}
.primary {
  background: var(--clr-primary);
  color: var(--clr-white);
}
.secondary {
  background: var(--clr-white);
  border: 1px solid var(--clr-primary);
  color: var(--clr-primary);
  margin-left: .5rem;
}

/* ======================================================
   Hero Section
   ====================================================== */
.hero {
  /* Match header gradient */
  background: linear-gradient(
    to right,
    var(--clr-secondary),
    var(--clr-accent),
    var(--clr-primary)
  );
  position: relative;
  overflow: visible;        /* ensure shapes aren’t clipped */
  padding: 5rem 1rem 9rem;  /* extra bottom padding for shapes */
}

/* Background shapes container */
.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Floating shapes common */
.float {
  position: absolute;
  /* make defaults lighter if you like: */
  opacity: 0.6;             
  animation: drift var(--d,5s) linear infinite alternate;
}

/* Then override just the green shapes (c3) to be more opaque */
.float.c3 {
  opacity: 0.8; /* or even 1 for fully solid */
}

/* Shape sizes */
.float.sq   { width: 20px; height: 20px; }
.float.circ { width: 16px; height: 16px; border-radius: 50%; }
.float.tri  {
  width: 0; height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 21px solid;  /* triangle height */
  background: none;
}

/* Shape colors */
.c1 { background: var(--clr-secondary); }
.c2 { background: var(--clr-text-light); }
.c3 { background: var(--clr-text); }
.c4 { background: var(--clr-accent); }

/* Triangle border-colors */
.float.tri.c1 { border-bottom-color: var(--clr-secondary); }
.float.tri.c2 { border-bottom-color: var(--clr-text-light); }
.float.tri.c3 { border-bottom-color: var(--clr-text); }
.float.tri.c4 { border-bottom-color: var(--clr-accent); }

/* Floating drift animation */
@keyframes drift {
  to { transform: translateY(35px) rotate(12deg); }
}

/* Hero content wrapper */
.hero-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2.5rem;
  text-align: left;
}
@media (max-width: 768px) {
  .hero-wrap {
    flex-direction: column;
    text-align: center;
  }
}

/* Hero image styling */
.hero-photo img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--clr-primary);
  box-shadow: 0 4px 22px rgba(0,0,0,0.12);
  animation: popIn 0.8s ease forwards;
}
@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* Hero headline */
.hero-catch {
  font-size: var(--type-header);
  font-weight: 600;
  line-height: 1.2;
  color: rgba(38 77 58 / 0.8);  /* semi-opaque brand green */
  margin: 0;
  opacity: 0;
  animation: fadeUp 1s ease 0.2s forwards;
  max-width: 700px;
}
@keyframes fadeUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* Hero button */
.hero-btn {
  margin-top: 1.5rem;
}
/*──────────────── Sections / Alternating Bgs ──*/
#about, #case-studies, #data-analysis, #publications {
  background: var(--clr-muted);
}
section.about, section.case-studies, section#data-analysis, section.publications {
  padding: 4rem 2rem;
  text-align: center;
}
/* ── Add this for Skills/Tools ── */
#skills,
.skills-strip {
  background: var(--clr-muted);
  padding: 4rem 2rem;
  text-align: center;
}
/*──────────────── Cards ─────────────────────*/
.card-grid, .publication-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem;
}
.case-card, .publication-card {
  background: var(--clr-white);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 350px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transition: transform .3s, box-shadow .3s;
}
.case-card:hover, .publication-card:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 36px rgba(0,0,0,0.15);
}
.case-card img, .publication-card img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; margin-bottom: 1rem;
}
.case-card.coming-soon { opacity: .6; }
.case-card.coming-soon .btn {
  background: #aaa; color: #eee; cursor: not-allowed; border-color: #888;
}
.publication-card h4 {
  margin: .5rem 0; font-size: 1.15rem; color: var(--clr-primary);
}
.publication-card .button-group {
  display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap;
}
.publication-card .button-group .btn {
  flex: 1 1 auto; padding: .8rem 1rem; font-size: 1.05rem;
}

/*──────────────── Modals ─────────────────────*/
.modal {
  display: none;             /* hidden until JS sets display:flex */
  position: fixed;
  inset: 0;                  /* top/right/bottom/left = 0 */
  background: rgba(0,0,0,0.6);
  overflow-y: auto;          /* page scroll if needed */
  z-index: 1000;
  align-items: flex-start;   /* pin to top */
  justify-content: center;   /* center horizontally */
  padding: 2rem 0;           /* breathing room top & bottom */
}

.modal-content {
  background: var(--clr-white);
  width: 90vw;               /* nearly full viewport width */
  max-width: 960px;          /* cap on large screens */
  max-height: 90vh;          /* cap height */
  padding: 2rem;
  border-radius: 12px;
  overflow-y: auto;          /* internal scroll */
  box-shadow: 0 12px 36px rgba(0,0,0,0.12);
  animation: modalFadeIn 0.4s ease-out;
  margin: 0 auto;            /* center horizontally */
  position: relative;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

.modal-banner {
  height: 6px; width: 100%; margin-bottom: 1rem;
  background: linear-gradient(
    to right,
    var(--clr-accent) 0%,
    var(--clr-primary) 50%,
    var(--clr-accent) 100%
  );
  background-size: 200% 100%;
  animation: bannerSlide 4s infinite alternate;
}
@keyframes bannerSlide {
  from { background-position: 0% }
  to   { background-position: 100% }
}

.modal-content h2 {
  font-size: 1.8rem; margin-bottom: .5rem;
}
.modal-content p em {
  display: block; font-weight: 500;
  margin-bottom: 1.5rem; color: var(--clr-text-light);
}
.modal-content h3 {
  margin-top: 2rem; font-size: 1.2rem;
  border-left: 4px solid var(--clr-primary);
  padding-left: 1rem;
}

.close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none;
  font-size: 1.5rem; color: #aaa;
  cursor: pointer;
}
.close:hover { color: #000; }

/* ======================================================
   Interactive Case-Study Steps
   ====================================================== */
.modal .step { display: none; }
.modal .step.active { display: block; }
.modal .case-controls {
  display: flex; justify-content: space-between;
  margin-top: 2rem;
}
/* Fix icon size */
.step-header .icon {
  width: 24px !important; height: 24px !important;
}

/* ======================================================
   Tabs
   ====================================================== */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--clr-muted);
  margin-bottom: 1rem;
}
.tab-btn {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: var(--type-body);
  color: var(--clr-text);
  transition: color 0.2s ease;
}
.tab-btn:hover { color: var(--clr-primary); }
.tab-btn.active {
  border-bottom: 3px solid var(--clr-primary);
  color: var(--clr-primary);
  font-weight: 600;
}
.tab-panel {
  display: none;
  padding: 1rem 0;
}
.tab-panel.active { display: block; }

/* ======================================================
   Timeline
   ====================================================== */
.timeline {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2rem 0;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 5%;
  right: 5%;
  height: 4px;
  background: var(--clr-muted);
  transform: translateY(-50%);
  z-index: 0;
}
.timeline-item {
  position: relative;
  flex: 1;
  text-align: center;
  z-index: 1;
}
.timeline-circle {
  width: 16px; height: 16px;
  background: var(--clr-primary);
  border-radius: 50%;
  margin: 0 auto;
}
.timeline-content {
  margin-top: 0.5rem;
  font-size: var(--type-body);
  color: var(--clr-text-light);
  line-height: 1.4;
}
/* ======================================================
   Two-Column Wrapper
   ====================================================== */
.two-column-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
@media (min-width: 768px) {
  .two-column-wrapper { flex-direction: row; }
  .two-column-wrapper > section { flex: 1; }
}

/* ======================================================
   Skills & Tools (Collapsible)
   ====================================================== */
.skills-strip {
  padding: 3rem 0;
  background: var(--clr-white);
}
.skills-strip h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Collapsible groups */
.skill-group-dropdown summary {
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  padding: .5rem 0;
  list-style: none; /* remove default bullet in Firefox */
}
.skill-group-dropdown summary::-webkit-details-marker {
  display: none;
}
.skill-group-dropdown summary::before {
  content: "► ";
  display: inline-block;
  transform: rotate(0deg);
  transition: transform .2s ease;
}
.skill-group-dropdown[open] summary::before {
  transform: rotate(90deg);
}
.skill-group-dropdown[open] summary {
  color: var(--clr-primary);
}

/* Skill groups layout */
.skill-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}
.group-title {
  display: none; /* summary replaces this heading */
}

/* Skill items */
.skill-item {
  width: 80px;
  text-align: center;
  transition: transform .3s ease, opacity .3s ease;
}
.skill-item img {
  width: 100%;
  margin-bottom: .5rem;
}
.skill-item[data-level="expert"] {
  transform: scale(1.3);
  opacity: 1;
}
.skill-item[data-level="intermediate"] {
  transform: scale(1.1);
  opacity: .8;
}
.skill-item[data-level="beginner"] {
  transform: scale(1);
  opacity: .6;
}

/* Skill name label */
.skill-name {
  font-size: .9rem;
  margin-top: .25rem;
  color: var(--clr-text);
}

@media (max-width: 480px) {
  .skill-item { width: 60px; }
  .skill-group { gap: 1rem; }
}
/* make sure scaling happens around the icon's center */
.skill-item {
  transform-origin: center bottom;
}

/* visible text label */
.skill-level {
  font-size: 0.75rem;
  color: var(--clr-text-light);
  margin-top: 0.25rem;
  text-transform: capitalize;
}

/* Ring & Icon Container */
.skill-item {
  position: relative;
  width: 80px;
  text-align: center;
  margin: 1rem;
}
.skill-item img {
  width: 100%;
  display: block;
  position: relative;
  z-index: 2;
}

/* The circular background ring */
.skill-ring {
  position: absolute;
  top: -5px;
  left: -5px;
  width: calc(100% + 10px);
  height: calc(100% + 10px);
  border-radius: 50%;
  /* updated background using --percent directly */
  background: conic-gradient(
    var(--clr-primary) 0% var(--percent),
    var(--clr-muted)   var(--percent) 100%
  );
  z-index: 1;
}

/* Level label below the name */
.skill-level {
  font-size: 0.75rem;
  color: var(--clr-text-light);
  margin-top: 0.25rem;
  text-transform: capitalize;
}
/* Progress Bar */
.progress {
  background: var(--clr-muted);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.5rem;
}
.progress-bar {
  height: 100%;
  background: var(--clr-primary);
  transition: width 0.6s ease;
}

/* Optional: Label & spacing tweaks */
.skill-level {
  font-size: 0.75rem;
  color: var(--clr-text-light);
  margin-top: 0.25rem;
}
/* ── Frame around Skills & Tools ── */
#skills {
  /* keep your existing background */
  background: var(--clr-muted);

  /* add a solid border in your primary brand color */
  border: 2px solid var(--clr-primary);

  /* optional: slight rounding to soften the frame */
  border-radius: 8px;

  /* optional: a subtle shadow underneath */
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);

  /* ensure you still have good padding inside */
  padding: 3rem 2rem;
}

/* ======================================================
   Focus Outline (Accessibility)
   ====================================================== */
:focus {
  outline: 3px solid var(--clr-accent);
  outline-offset: 2px;
}

/* ======================================================
   Responsive Overrides
   ====================================================== */
@media (max-width: 768px) {
  .nav-container { flex-direction: column; align-items: flex-start; }
  .hero-wrap { flex-direction: column; text-align: center; }
  .about-content { flex-direction: column; text-align: center; }
  .about-text { text-align: center; }
}
@media (max-width: 480px) {
  body, .container { padding: 1rem; }
  .btn { width: 100%; box-sizing: border-box; }
}

/* ======================================================
   Footer
   ====================================================== */
footer {
  background: linear-gradient(to right, var(--clr-secondary), var(--clr-primary));
  color: var(--clr-white);
  padding: 1.5rem 2rem;
}
.footer-content {
  display: flex; gap: 2rem; align-items: flex-start;
}
.footer-content > div { flex: 0 0 auto; }
.footer-content > div:nth-child(2) ul {
  columns: 2; column-gap: 1rem;
  list-style: none; margin: .5rem 0 0; padding: 0;
}
.footer-content > div:nth-child(2) li { margin-bottom: .25rem; }
footer p.copyright {
  margin-top: 1rem; font-size: .875rem;
}


/* ======================================================
   Font Helper: Courgette
   ====================================================== */
.courgette-regular {
  font-family: 'Courgette', cursive !important;
  font-weight: 400;
  font-style: normal;
}
/* ====== Modal polish: sub-nav, chips, tags, progress, actions ====== */
.modal-subnav{
  position: sticky; top: 0; z-index: 5;
  display:flex; gap:.5rem; padding:.5rem 0 0.75rem;
  background: var(--clr-white);
  border-bottom: 1px solid var(--clr-muted);
}
.subnav-btn{
  padding:.5rem .9rem; border-radius:999px; border:1px solid var(--clr-muted);
  background:#f8fafc; color:var(--clr-text); font-weight:600; cursor:pointer;
}
.subnav-btn.active{ background:#2563eb; color:#fff; border-color:#2563eb; }

.chips,.tags{ display:flex; flex-wrap:wrap; gap:.5rem; margin:.5rem 0 1rem; padding:0; list-style:none; }
.chips li{ background:#eef2ff; color:#3730a3; border:1px solid #c7d2fe; border-radius:8px; padding:.4rem .6rem; font-weight:600; }
.tags li{ background:#f3f4f6; border:1px solid #e5e7eb; border-radius:8px; padding:.35rem .6rem; }

.step-progress{ height:6px; background:#f3f4f6; border-radius:999px; overflow:hidden; margin:8px 0 18px; }
.step-progress .bar{ height:100%; width:0%; background:#2563eb; transition: width .25s ease; }

.modal-actions{
  display:flex; gap:.5rem; justify-content:flex-end; padding-top:10px; border-top:1px solid var(--clr-muted); margin-top:14px;
}
.btn-ghost{ background:#f3f4f6; color:#111; border:1px solid #e5e7eb; }
