/* ═══════════════════════════════════════════════════════════
   TOKENS
═══════════════════════════════════════════════════════════ */
:root {
  --green: hsl(113, 84%, 34%);
  --green-light: hsl(113, 84%, 94%);
  --olive: hsla(96, 10%, 19%, 1);
  --ink: #111;
  --muted: #6b7280;
  --border: #e5e7eb;
  --white: #ffffff;
  --nav-dark: hsla(0, 0%, 10%, 1);
  --nav-dark-border: rgba(255, 255, 255, .08);
  --nav-pill-bg: hsla(0, 0%, 10%, .92);

  --font-body: 'Public Sans', sans-serif;
  --font-heading: 'Castoro', serif;

  --radius: 12px;
  --radius-sm: 6px;

  --nav-h: 72px;
  --container: 1200px;
  --gap: clamp(1.5rem, 4vw, 3rem);
}

/* ═══════════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: #cbd5e1;
  /* Subtle grey */
  z-index: 3000;
  /* Above nav and modal */
  transition: width 0.1s ease-out;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
}

/* ═══════════════════════════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════════════════════════ */
h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.1;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .9rem;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
  border: 1.5px solid transparent;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.btn-primary:hover {
  background: hsl(113, 84%, 28%);
  border-color: hsl(113, 84%, 28%);
}

.btn-outline {
  background: transparent;
  color: var(--olive);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--green);
  color: var(--green);
}

/* ═══════════════════════════════════════════════════════════
   NAV
═══════════════════════════════════════════════════════════ */
.nav-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  pointer-events: all;
  background: var(--nav-dark);
  transition: box-shadow .3s;
}

.nav-header.offset {
  box-shadow: 0 4px 24px rgba(0, 0, 0, .35);
}

.nav-header.scrolling {
  box-shadow: 0 6px 40px rgba(0, 0, 0, .5);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.nav-logo img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}

.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .6);
  transition: color .2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--green);
  transition: width .25s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  margin-left: .5rem;
  padding: .45rem 1.1rem;
  font-size: .85rem;
  color: var(--white);
  border-color: rgba(255, 255, 255, .25);
  border-radius: 999px;
}

.nav-cta:hover {
  border-color: var(--green);
  color: var(--green);
}

/* Burger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem;
  margin-left: auto;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--white);
  transition: transform .3s, opacity .3s;
}

/* is-clicked mirrors 2024 pattern */
.nav-burger.is-clicked span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-burger.is-clicked span:nth-child(2) {
  opacity: 0;
}

.nav-burger.is-clicked span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ═══════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: center;
  padding-block: clamp(4rem, 10vh, 7rem);
  margin-top: 3rem;
}

/* — Text side — */
.hero-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1.25rem;
}

.hero-heading {
  font-size: clamp(2.34rem, 4.95vw, 4.05rem);
  line-height: 1.08;
  color: var(--olive);
  margin-bottom: 1.5rem;
}

.hero-heading em {
  font-style: italic;
  color: var(--green);
}

.hero-sub {
  font-size: clamp(.95rem, 1.5vw, 1.1rem);
  font-weight: 400;
  color: var(--muted);
  line-height: 1.7;
  max-width: 44ch;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .875rem;
  margin-bottom: 2.5rem;
}

.hero-socials {
  display: flex;
  gap: 1.25rem;
}

.hero-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  transition: border-color .2s, color .2s, transform .2s;
}

.hero-socials a:hover {
  border-color: var(--green);
  color: var(--green);
  transform: translateY(-2px);
}

.hero-socials svg {
  width: 17px;
  height: 17px;
}

/* — Visual side — */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-img-wrap {
  position: relative;
  width: min(420px, 100%);
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Geometric accents */
.hero-accent {
  position: absolute;
  pointer-events: none;
}

.hero-accent--ring {
  inset: -24px;
  border: 1.5px solid var(--green);
  border-radius: calc(var(--radius) + 24px);
  opacity: .18;
}

.hero-accent--dot-grid {
  bottom: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  background-image: radial-gradient(circle, var(--green) 1.2px, transparent 1.2px);
  background-size: 14px 14px;
  opacity: .25;
}

/* Floating chips */
.hero-chip {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .6rem 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .07);
  min-width: 72px;
}

.hero-chip--top {
  top: 10%;
  left: -28px;
}

.hero-chip--bottom {
  bottom: 12%;
  right: -28px;
}

.chip-num {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--green);
  line-height: 1;
}

.chip-label {
  font-size: .7rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: .2rem;
}

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

.hero-bg-shape svg {
  width: 100%;
  height: 100%;
}

/* ═══════════════════════════════════════════════════════════
   SHARED SECTION TOKENS
═══════════════════════════════════════════════════════════ */

/* Numbered section header */
.section-header {
  display: flex;
  align-items: flex-start;
  position: relative;
  margin-bottom: 3rem;
  padding-left: 0;
}

.section-header::before {
  content: attr(data-num);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(5rem, 12vw, 9rem);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--border);
  position: absolute;
  top: -0.2em;
  left: -0.08em;
  pointer-events: none;
  user-select: none;
}

.section-heading {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  color: var(--olive);
  padding-top: 0.5em;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

.section-heading em {
  font-style: italic;
  color: var(--green);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ═══════════════════════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════════════════════ */
.about {
  padding-block: clamp(5rem, 12vh, 8rem);
  background: var(--white);
  position: relative;
  overflow: hidden;
}

/* Subtle diagonal line decoration — same language as hero, very low opacity */
.about::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, hsl(113, 84%, 34%) 1px, transparent 1px),
    linear-gradient(45deg, hsl(113, 84%, 34%) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: .025;
  pointer-events: none;
}

.about-inner {
  position: relative;
  z-index: 1;
}

.about-bio {
  font-size: clamp(.95rem, 1.4vw, 1.05rem);
  color: var(--muted);
  line-height: 1.8;
  max-width: 90ch;
  margin-bottom: 1.25rem;
}

/* ═══════════════════════════════════════════════════════════
   TECHNOLOGIES
═══════════════════════════════════════════════════════════ */
.tech {
  padding-block: clamp(5rem, 12vh, 8rem);
  background: hsl(0, 0%, 98.5%);
  position: relative;
  overflow: hidden;
}

/* --- Cool Animated Background --- */
.tech::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(rgba(0,0,0,0.03) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1.5px, transparent 1.5px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
  animation: tech-grid-move 20s linear infinite;
  z-index: 0;
}

.tech::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: 
    radial-gradient(circle at 20% 30%, hsla(113, 84%, 34%, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, hsla(113, 84%, 34%, 0.05) 0%, transparent 40%);
  filter: blur(60px);
  animation: tech-glow-pulse 10s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes tech-grid-move {
  from { background-position: 0 0; }
  to { background-position: 60px 60px; }
}

@keyframes tech-glow-pulse {
  from { opacity: 0.4; transform: scale(1); }
  to { opacity: 0.8; transform: scale(1.1); }
}

.tech-inner {
  position: relative;
  z-index: 1;
}

.tech-inner .section-header {
  margin-bottom: 3.5rem;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 1rem;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  padding: 1.25rem .75rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: default;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}

.tech-item:hover {
  border-color: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .07);
}

.tech-item img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.tech-item span {
  font-size: .72rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .03em;
  text-align: center;
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════
   WORKS
═══════════════════════════════════════════════════════════ */
.works {
  padding-block: clamp(5rem, 12vh, 8rem);
  background: var(--white);
}

.works-controls {
  margin-bottom: 3.5rem;
}

.filter-row {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filter-label {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}

.filter-label em {
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  opacity: 0.8;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.filter-btn {
  background: none;
  border: 1.5px solid var(--border);
  padding: .5rem 1.25rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
}

.filter-btn:hover {
  border-color: var(--green);
  color: var(--green);
}

.filter-btn.active {
  background: var(--olive);
  border-color: var(--olive);
  color: var(--white);
}

/* Tech Filter Dropdown */
.tech-filter-group {
  max-width: 400px;
}

.dropdown {
  position: relative;
  width: 100%;
}

.dropdown-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.dropdown-btn:hover {
  border-color: var(--green);
}

.dropdown-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--olive);
}

.dropdown-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s;
}

.dropdown.active .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-content {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: none;
  flex-direction: column;
}

.dropdown.active .dropdown-content {
  display: flex;
}

.dropdown-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.dropdown-clear {
  background: none;
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green);
  cursor: pointer;
  padding: 0;
}

.dropdown-clear:hover {
  text-decoration: underline;
}

.dropdown-list {
  max-height: 250px;
  overflow-y: auto;
  padding: 0.5rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.checkbox-item:hover {
  background: var(--green-light);
}

.checkbox-item input[type="checkbox"] {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.checkbox-item span {
  font-size: 0.85rem;
  color: var(--olive);
  font-weight: 400;
}

/* Tech Tags in Card */
.project-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  background: var(--green-light);
  color: var(--green);
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: all 0.2s;
}

.project-card:hover .tech-tag {
  background: var(--green);
  color: var(--white);
}

.tech-tag:hover {
  transform: scale(1.05);
  cursor: pointer;
}

/* Modal Specific Tech Tags */
.modal-project-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.modal-project-techs .tech-tag {
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  cursor: default; /* Disable filtering from inside modal for UX simplicity */
  background: var(--green-light);
  color: var(--green);
}

.modal-project-techs .tech-tag:hover {
  transform: none;
  background: var(--green-light);
  color: var(--green);
}

/* Works Grid */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.project-card {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  transition: transform .3s, border-color .3s, box-shadow .3s;
  overflow: hidden;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--green);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .06);
}

.project-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: hsl(0, 0%, 97%);
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.project-card:hover .project-img img {
  transform: scale(1.05);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--green);
  transition: height .3s ease;
  z-index: 2;
}

.project-card:hover::before {
  height: 100%;
}

.project-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-cat {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--green);
  margin-bottom: .75rem;
  display: block;
}

.project-title {
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  margin-bottom: 1rem;
  color: var(--olive);
}

.project-desc {
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.project-links {
  display: flex;
  gap: 1.5rem;
}

.project-link {
  font-size: .85rem;
  font-weight: 600;
  color: var(--olive);
  position: relative;
  transition: color .2s;
}

.project-link::after {
  content: '→';
  margin-left: 4px;
  display: inline-block;
  transition: transform .2s;
}

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

.project-link:hover::after {
  transform: translateX(3px);
}

/* GitHub Activity */
.github-activity {
  width: 100%;
  padding: clamp(1.5rem, 5vw, 4rem);
  background: hsl(0, 0%, 98.5%);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  text-align: center;
  margin-top: 2rem;
  position: relative;
  overflow: hidden;

  /* Premium reveal overrides */
  will-change: transform, opacity;
}

/* --- Animated Background for GitHub Section --- */
.github-activity::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(rgba(0,0,0,0.02) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(0,0,0,0.02) 1.5px, transparent 1.5px);
  background-size: 50px 50px;
  mask-image: radial-gradient(circle at center, black, transparent 90%);
  animation: tech-grid-move 25s linear infinite reverse;
  z-index: 0;
}

.github-activity::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: 
    radial-gradient(circle at 70% 20%, hsla(113, 84%, 34%, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 30% 80%, hsla(113, 84%, 34%, 0.03) 0%, transparent 50%);
  filter: blur(50px);
  animation: github-glow-pulse 12s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes github-glow-pulse {
  from { opacity: 0.3; transform: translate(-5%, -5%) scale(1); }
  to { opacity: 0.6; transform: translate(5%, 5%) scale(1.1); }
}

.github-activity.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.github-header, .github-chart, .github-actions {
  position: relative;
  z-index: 1;
}

.github-activity.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.github-header {
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.github-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--olive);
  margin-bottom: 0;
}

.github-chart {
  margin-bottom: 2.5rem;
  overflow-x: auto;
  display: flex;
  justify-content: center;
  width: 100%;
}

.github-chart img {
  max-width: 100%;
  height: auto;
  min-width: 800px;
}

.github-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.gh-mini-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.gh-mini-stat strong {
  color: var(--green);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
}

.gh-mini-stat-sep {
  opacity: 0.3;
  font-weight: 300;
}

.works-wrapper {
  position: relative;
  padding-bottom: 2rem;
}

/* The fade-out effect when projects are hidden */
.works-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 250px;
  background: linear-gradient(to bottom, transparent, var(--white) 90%);
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.works-wrapper.is-expanded::after {
  opacity: 0;
  visibility: hidden;
}

.works-footer {
  display: flex;
  justify-content: center;
  margin-top: -80px; /* Pull it up into the fade zone */
  position: relative;
  z-index: 10;
}

.show-more-btn {
  padding: 1.25rem 3rem;
  font-size: 1.05rem;
  background: var(--white);
  border: 1.5px solid var(--olive);
  color: var(--olive);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.show-more-btn:hover {
  background: var(--olive);
  color: var(--white);
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.btn-icon-pulse {
  width: 18px;
  height: 18px;
  animation: icon-bounce 1.5s infinite;
}

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

.is-hidden {
  display: none !important;
}

/* Filter Animation */
.project-card.hide {
  display: none;
}

/* ═══════════════════════════════════════════════════════════
   MODAL / EXPANDED VIEW
═══════════════════════════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: all;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(4px);
}

.modal-container {
  position: relative;
  width: min(1000px, 100% - 2rem);
  max-height: 90vh;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  z-index: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.1);
  transform: translateY(20px);
  transition: transform .4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal[aria-hidden="false"] .modal-container {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--olive);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}

.modal-close:hover {
  border-color: var(--green);
  color: var(--green);
  transform: rotate(90deg);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: var(--olive);
  border: 1.5px solid var(--olive);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: all .2s;
  color: var(--white);
}

.modal-nav:hover {
  background: var(--green);
  border-color: var(--green);
}

.modal-nav svg {
  width: 24px;
  height: 24px;
}

.modal-nav--prev {
  left: 20px;
}

.modal-nav--next {
  right: 20px;
}

.modal-content {
  overflow-y: auto;
  padding: clamp(1.5rem, 5vw, 4rem);
}

/* Modal Internal Layout */
.modal-project-img {
  width: 80%;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 2.5rem;
}

.modal-project-cat {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--green);
  letter-spacing: .1em;
  margin-bottom: 1rem;
  display: block;
}

.modal-project-title {
  font-size: clamp(1.8rem, 5vw, 2rem);
  color: var(--olive);
  margin-bottom: 1.25rem;
}

.modal-project-desc {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  line-height: 1.7;
  color: var(--muted);
  max-width: 70ch;
  margin-bottom: 2.5rem;
}

.modal-project-links {
  display: flex;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1.5px solid var(--border);
}

body.modal-open {
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════
   EXPERIENCE
═══════════════════════════════════════════════════════════ */
.experience {
  padding-block: clamp(5rem, 12vh, 8rem);
  background: hsl(0, 0%, 98.5%);
}

.exp-list {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  position: relative;
  max-width: 800px;
}

/* Vertical line connecting groups */
.exp-list::before {
  content: '';
  position: absolute;
  top: 0;
  left: 28px;
  bottom: 0;
  width: 1.5px;
  background: var(--border);
  z-index: 0;
}

.exp-group {
  display: flex;
  gap: 2.5rem;
  position: relative;
  z-index: 1;
}

.exp-logo {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.exp-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.exp-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.exp-roles {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.exp-role-entry {
  display: flex;
  flex-direction: column;
}

.exp-role {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--olive);
  margin-bottom: 0.15rem;
}

.exp-time {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.exp-company {
  font-size: 1rem;
  font-weight: 500;
  color: var(--green);
  margin-top: 0.25rem;
}

/* ═══════════════════════════════════════════════════════════
   DUAL COLUMN (EDU & VOL)
═══════════════════════════════════════════════════════════ */
.edu-vol {
  padding-block: clamp(5rem, 12vh, 8rem);
  background: var(--white);
}

.dual-column-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 5rem;
  align-items: start;
}

/* Education Specifics (Restored) */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.edu-item {
  display: flex;
  gap: 2rem;
}

.edu-logo {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.edu-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.edu-content {
  padding-top: 0.25rem;
}

.edu-degree {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--olive);
  margin-bottom: 0.15rem;
}

.edu-institute {
  font-size: 1rem;
  font-weight: 500;
  color: var(--green);
  margin-bottom: 0.25rem;
}

.edu-time {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.edu-grade {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.6rem;
}

.edu-extra {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Volunteering Specifics */
.vol-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.vol-item {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.vol-org {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--olive);
  margin-bottom: 0.75rem;
}

.vol-roles {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-left: 1rem;
  border-left: 1.5px solid var(--border);
}

.vol-role-entry {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.vol-role {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
}

.vol-time {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vol-desc {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

/* ═══════════════════════════════════════════════════════════
   CERTIFICATIONS
═══════════════════════════════════════════════════════════ */
.certifications {
  padding-block: clamp(5rem, 12vh, 8rem);
  background: hsl(0, 0%, 98.5%);
}

.cert-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 3rem;
}

.cert-intro {
  font-size: clamp(0.9rem, 1.4vw, 1rem);
  color: var(--muted);
  line-height: 1.6;
  max-width: 80ch;
  margin-bottom: 2.5rem;
}

.cert-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 1rem;
  border-bottom: 1.5px solid var(--border);
  transition: border-color 0.2s;
}

.cert-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cert-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--olive);
  line-height: 1.3;
}

.cert-meta {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cert-verify {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  margin-left: 1.5rem;
  padding: 0.4rem 0.8rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.cert-verify:hover {
  border-color: var(--green);
  background: var(--white);
}

/* ═══════════════════════════════════════════════════════════
   HIGHLIGHTS
═══════════════════════════════════════════════════════════ */
.highlights {
  padding-block: clamp(5rem, 12vh, 8rem);
  background: var(--white);
  overflow: hidden;
}

.carousel-container {
  width: 100%;
  padding-block: 2rem;
  position: relative;
  --carousel-gap: 2rem;
}

.carousel-track {
  display: flex;
  width: max-content;
  gap: var(--carousel-gap);
  animation: scroll-left 50s linear infinite;
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - (var(--carousel-gap) / 2))); }
}

.highlight-card {
  width: 380px;
  flex-shrink: 0;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.4s ease;
  cursor: default;
}

@media (hover: hover) {
  .carousel-track:hover {
    animation-play-state: paused;
  }

  .highlight-card:hover {
    transform: scale(1.05);
    border-color: var(--green);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.08);
    z-index: 10;
  }
}

.carousel-track.paused {
  animation-play-state: paused;
}

.highlight-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.highlight-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.highlight-caption {
  padding: 1.25rem 1.5rem 0.6rem;
}

.highlight-caption p {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--olive);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE OVERRIDES
═══════════════════════════════════════════════════════════ */

@media (max-width: 1100px) {
  .modal-nav {
    top: auto;
    bottom: 1.5rem;
    transform: none;
  }

  .modal-nav--prev {
    left: 1.5rem;
  }

  .modal-nav--next {
    left: 5rem;
  }

  .modal-nav {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 1024px) {
  .dual-column-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .cert-list {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text {
    order: 2;
  }

  .hero-visual {
    order: 1;
  }

  .hero-img-wrap {
    width: min(320px, 80%);
    margin-inline: auto;
  }

  .hero-sub {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-socials {
    justify-content: center;
  }

  .hero-chip--top {
    left: 0;
  }

  .hero-chip--bottom {
    right: 0;
  }
}

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

  .github-activity {
    padding: 2rem 1rem;
    border-radius: 0;
    margin-inline: calc(var(--gap) * -1);
    width: calc(100% + (var(--gap) * 2));
    border-left: none;
    border-right: none;
  }
}

@media (max-width: 640px) {
  .nav-logo img {
    height: 22px;
  }

  .section-header {
    margin-bottom: 1.5rem;
  }

  .section-header::before {
    font-size: 4rem;
  }

  /* Reduce section padding globally for mobile */
  .about,
  .tech,
  .works,
  .edu-vol,
  .experience,
  .certifications {
    padding-block: clamp(3rem, 8vh, 5rem);
  }

  /* Typography shrinking */
  .section-heading {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  /* Experience Spacing */
  .exp-list {
    gap: 2.5rem;
  }

  .exp-list::before {
    left: 20px;
  }

  .exp-logo {
    width: 40px;
    height: 40px;
  }

  .exp-group {
    gap: 1.25rem;
  }

  .exp-roles {
    gap: 1.25rem;
  }

  .exp-role {
    font-size: 1.1rem;
  }

  /* Education & Vol Spacing */
  .dual-column-grid {
    gap: 4rem;
  }

  .edu-list,
  .vol-list {
    gap: 2rem;
  }

  .edu-item,
  .vol-item {
    gap: 1.25rem;
  }

  .edu-logo {
    width: 44px;
    height: 44px;
  }

  .edu-degree,
  .vol-org {
    font-size: 1.1rem;
  }

  /* Certifications Spacing */
  .cert-row {
    padding-block: 0.75rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    border-bottom-width: 1px;
  }

  .cert-verify {
    margin-left: 0;
    padding-left: 0;
    margin-top: 0.25rem;
  }

  /* Works Grid Spacing */
  .works-grid {
    gap: 1.25rem;
    margin-bottom: 3rem;
  }

  /* Highlights Spacing */
  .carousel-container {
    --carousel-gap: 1.25rem;
  }

  .highlight-card {
    width: 280px;
  }

  /* Nav mobile tweaks */
  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-burger {
    display: flex;
  }

  body.menu-is-open .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--nav-dark);
    padding: 2rem 1.5rem;
    gap: 1.75rem;
    border-top: 1px solid var(--nav-dark-border);
    z-index: 99;
  }

  body.menu-is-open .nav-links a {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, .75);
  }

  body.menu-is-open .chatbot-wrapper {
    display: none;
  }

  body.menu-is-open {
    overflow: hidden;
  }
}

/* ═══════════════════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════════════════ */
.contact {
  padding-block: clamp(5rem, 12vh, 8rem);
  background: var(--white);
  border-top: 1px solid var(--border);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}

.contact-sub {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--muted);
  line-height: 1.6;
  max-width: 45ch;
  margin-bottom: 3rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-method {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.method-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--green);
  letter-spacing: 0.1em;
}

.method-link {
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 500;
  color: var(--olive);
  transition: color 0.2s;
}

.method-link:hover {
  color: var(--green);
}

.contact-footer {
  padding-top: 4rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-note {
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--olive);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--green);
}

@media (max-width: 768px) {
  .contact-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-img-wrap {
    width: min(260px, 75%);
  }

  .project-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .project-content {
    padding: 1.5rem;
  }

  .modal-project-links {
    flex-direction: column;
    gap: 1rem;
  }
}

/* ═══════════════════════════════════════════════════════════
   CHATBOT
═══════════════════════════════════════════════════════════ */
.chatbot-wrapper {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2500;
  font-family: var(--font-body);
}

.chatbot-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--nav-dark);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chatbot-toggle:hover {
  transform: scale(1.05) translateY(-2px);
  background: var(--olive);
}

.chatbot-toggle svg {
  width: 24px;
  height: 24px;
}

.chat-window {
  position: absolute;
  bottom: calc(100% + 1.5rem);
  right: 0;
  width: min(380px, 90vw);
  height: 500px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.chat-window[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.chat-header {
  padding: 1.25rem 1.5rem;
  background: var(--nav-dark);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-title h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
}

.chat-disclaimer {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 8px;
  line-height: 1.3;
  font-style: italic;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.chat-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s;
  line-height: 1;
}

.chat-close:hover {
  color: var(--white);
}

.chat-messages {
  flex-grow: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #f9fafb;
}

.chat-suggestions {
  padding: 0.5rem 1rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: #f9fafb;
}

.suggest-btn {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.suggest-btn:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-light);
}

.message {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.message.system {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--olive);
  border-bottom-left-radius: 2px;
}

.message.user {
  align-self: flex-end;
  background: var(--green);
  color: var(--white);
  border-bottom-right-radius: 2px;
}

.message.loading {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-bottom-left-radius: 2px;
  display: flex;
  gap: 4px;
  padding: 0.75rem 1.25rem;
  align-items: center;
  min-height: 42px;
}

.message.loading span {
  width: 6px;
  height: 6px;
  background-color: var(--muted);
  border-radius: 50%;
  display: inline-block;
  animation: dot-bounce 1.4s infinite ease-in-out both;
}

.message.loading span:nth-child(1) { animation-delay: -0.32s; }
.message.loading span:nth-child(2) { animation-delay: -0.16s; }
.message.loading span:nth-child(3) { animation-delay: 0s; }

@keyframes dot-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

.chat-input-area {
  padding: 1.25rem;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
}

.chat-input-area input {
  flex-grow: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input-area input:focus {
  border-color: var(--green);
}

.chat-input-area button {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--green);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.chat-input-area button:hover {
  background: hsl(113, 84%, 28%);
}

.chat-input-area button svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 640px) {
  .chatbot-wrapper {
    bottom: 1.5rem;
    right: 1.5rem;
  }

  .chat-window {
    width: calc(100vw - 3rem);
    height: 450px;
  }
}

