/* =============================================
   CSS Custom Properties — Light & Dark Themes
   ============================================= */

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f4f6fb;
  --bg-card: #ffffff;
  --bg-card-hover: #f4f6fb;
  --text-primary: #222222;
  --text-secondary: #383838;
  --text-muted: #8a93a5;
  --accent: #008d80;
  --accent-hover: #00736a;
  --accent-light: #e6f4f2;
  --accent-light-border: #b3ddd8;
  --border: #dde3f0;
  --border-light: #eef1f8;
  --shadow-sm: 0 1px 2px rgba(34,40,60,0.05);
  --shadow: 0 1px 3px rgba(34,40,60,0.08), 0 1px 2px rgba(34,40,60,0.05);
  --shadow-md: 0 6px 18px rgba(34,40,60,0.07), 0 2px 6px rgba(34,40,60,0.05);
  --shadow-lg: 0 18px 40px rgba(34,40,60,0.1), 0 6px 12px rgba(34,40,60,0.05);
  --timeline-line: #dde3f0;
  --badge-bg: #f4f6fb;
  --badge-text: #383838;
  --nav-bg: rgba(255,255,255,0.9);
  --nav-border: rgba(221,227,240,0.8);
}

[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-card-hover: #263348;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --accent: #1ec3b3;
  --accent-hover: #4fd6c8;
  --accent-light: #06302c;
  --accent-light-border: #0f5950;
  --border: #334155;
  --border-light: #1e293b;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.15);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.3), 0 4px 6px rgba(0,0,0,0.2);
  --timeline-line: #334155;
  --badge-bg: #1e293b;
  --badge-text: #94a3b8;
  --nav-bg: rgba(15,23,42,0.92);
  --nav-border: rgba(51,65,85,0.8);
}

/* =============================================
   Reset & Base
   ============================================= */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* =============================================
   Navigation
   ============================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.3s, border-color 0.3s;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--accent); }

.logo-initials {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.theme-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}
.nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.25rem;
    backdrop-filter: blur(12px);
  }
  .nav-links.nav-open { display: flex; }
  .nav-link { padding: 0.6rem 0.75rem; }
  .nav-hamburger { display: flex; }
}

/* =============================================
   Sections — Common
   ============================================= */

main { padding-top: 64px; }

.section {
  padding: 5rem 0;
}

.section:nth-child(even) {
  background: var(--bg-secondary);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-light-border);
  border-radius: 20px;
  padding: 0.25rem 0.85rem;
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.85rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* =============================================
   Buttons
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  border: 1.5px solid transparent;
  text-decoration: none;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,141,128,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-outline:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn-full { width: 100%; }

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
}

/* =============================================
   Hero Section
   ============================================= */

.hero-section {
  min-height: calc(100vh - 64px);
  min-height: calc(100svh - 64px);
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, var(--accent-light) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 80%, var(--accent-light) 0%, transparent 60%);
  opacity: 0.6;
  pointer-events: none;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  flex: 1;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  margin-bottom: 1.25rem;
}
[data-theme="dark"] .hero-badge {
  color: #4ade80;
  background: #052e16;
  border-color: #166534;
}
.hero-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  animation: pulse-dot 2s infinite;
}
[data-theme="dark"] .hero-badge::before { background: #4ade80; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.3); }
}

.hero-name {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.hero-certs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cert-badge {
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--badge-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.25rem 0.65rem;
}

.hero-visual { display: flex; align-items: center; justify-content: center; }

.tech-showcase { width: 100%; max-width: 420px; }

.tech-showcase-caption {
  text-align: center;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.tech-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.15rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
  box-shadow: var(--shadow-md);
  animation: tech-float 4.5s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.tech-tile:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.tech-tile-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-light-border);
}

.tech-tile-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.tech-tile-sub {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
}

@keyframes tech-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@media (prefers-reduced-motion: reduce) {
  .tech-tile { animation: none; }
}

.hero-greeting {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}
.hero-wave {
  display: inline-block;
  animation: hero-wave 2.5s ease-in-out infinite;
  transform-origin: 70% 70%;
}
@keyframes hero-wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}

/* =============================================
   Availability / CTA Section
   ============================================= */

.cta-section { background: var(--bg-secondary); }

.cta-banner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 95% 10%, var(--accent-light) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 0% 100%, var(--accent-light) 0%, transparent 55%);
  opacity: 0.7;
  pointer-events: none;
}
.cta-content, .cta-visual { position: relative; z-index: 1; }

.cta-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0.4rem 0 0.85rem;
}

.cta-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1.75rem;
  max-width: 520px;
}

.cta-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.cta-points {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.cta-point {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.cta-point svg { color: var(--accent); flex-shrink: 0; }

.cta-visual { display: flex; justify-content: center; }
.cta-grid { grid-template-columns: repeat(2, 1fr); }

.hero-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  animation: bounce-hint 2s infinite;
}
@keyframes bounce-hint {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* =============================================
   About Section
   ============================================= */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.1rem;
  font-size: 1.02rem;
}
.about-text p strong { color: var(--text-primary); }
.about-text p:last-of-type { margin-bottom: 1.75rem; }

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
}
.highlight-item svg { color: var(--accent); flex-shrink: 0; }

.stats-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}

.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-item { text-align: center; }

.stat-big {
  display: block;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-small {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.stats-divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}

.contact-info-mini { display: flex; flex-direction: column; gap: 0.55rem; }

.contact-info-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.contact-info-row svg { color: var(--text-muted); flex-shrink: 0; }
.contact-info-row a { color: var(--text-secondary); }
.contact-info-row a:hover { color: var(--accent); }

/* =============================================
   Skills Section
   ============================================= */

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

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.skill-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.skill-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.skill-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.skill-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.skill-list { display: flex; flex-direction: column; gap: 0.85rem; }

.skill-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}

.skill-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.skill-pct {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.skill-bar {
  height: 5px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
  border-radius: 10px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   Experience / Timeline
   ============================================= */

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.6rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--timeline-line);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 2.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -1.375rem;
  top: 1.25rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2.5px solid var(--border);
  z-index: 1;
}
.timeline-current .timeline-marker { border-color: var(--accent); background: var(--accent-light); }

.timeline-dot-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.3;
  animation: pulse-ring 2s infinite;
}
@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.6); opacity: 0; }
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.timeline-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.timeline-current .timeline-card {
  border-color: var(--accent-light-border);
  background: var(--bg-card);
}

.timeline-org {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.timeline-role {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.timeline-period, .timeline-location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.badge-current {
  font-size: 0.72rem;
  font-weight: 700;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  padding: 0.15rem 0.6rem;
}
[data-theme="dark"] .badge-current {
  color: #4ade80;
  background: #052e16;
  border-color: #166534;
}

.timeline-summary {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1rem;
}

/* =============================================
   Projects Grid
   ============================================= */

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-type-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-light-border);
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
}

.project-org-tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--badge-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.project-customer, .project-period {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.project-customer svg, .project-period svg { flex-shrink: 0; }

.project-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

/* =============================================
   Tags
   ============================================= */

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-light-border);
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
}

.tag-sm { font-size: 0.72rem; padding: 0.15rem 0.45rem; }

.tag-more {
  color: var(--text-muted);
  background: var(--badge-bg);
  border-color: var(--border);
}

.tag-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* =============================================
   Link Details
   ============================================= */

.link-details {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.25rem;
  transition: gap 0.2s;
}
.link-details:hover { gap: 0.55rem; color: var(--accent-hover); }
.link-sm { font-size: 0.8rem; }

/* =============================================
   Contact Section
   ============================================= */

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

.contact-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.contact-details { display: flex; flex-direction: column; gap: 1.1rem; margin-bottom: 1.5rem; }

.contact-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.contact-detail-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.contact-detail-value {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
}
a.contact-detail-value:hover { color: var(--accent); }

.contact-availability {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

.availability-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  flex-shrink: 0;
  animation: pulse-dot 2s infinite;
}
[data-theme="dark"] .availability-dot { background: #4ade80; }

.contact-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.contact-form { display: flex; flex-direction: column; gap: 1rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: 0.35rem; }

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.required { color: var(--accent); }

.form-group input,
.form-group textarea {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  width: 100%;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-feedback {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
}
.form-feedback.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
}
.form-feedback.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}
[data-theme="dark"] .form-feedback.success {
  background: #052e16;
  border-color: #166534;
  color: #4ade80;
}
[data-theme="dark"] .form-feedback.error {
  background: #450a0a;
  border-color: #991b1b;
  color: #f87171;
}

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

.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding-top: 3.5rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
}

.footer-brand { max-width: 320px; }

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.footer-tagline {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.footer-social { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.social-link:hover {
  color: var(--accent);
  background: var(--accent-light);
  border-color: var(--accent-light-border);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }

.footer-col ul li a,
.footer-col ul li {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
  text-align: center;
}
.footer-bottom p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* =============================================
   Floating Widgets
   ============================================= */

.fab-whatsapp {
  position: fixed;
  bottom: calc(1.5rem + env(safe-area-inset-bottom));
  right: 1.5rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
  z-index: 200;
  transition: transform 0.2s, box-shadow 0.2s;
}
.fab-whatsapp:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37,211,102,0.5);
  color: #fff;
}

/* Chat Widget */
.chat-widget {
  position: fixed;
  bottom: calc(5.75rem + env(safe-area-inset-bottom));
  right: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.chat-toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,141,128,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  z-index: 201;
}
.chat-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0,141,128,0.5);
}

.chat-icon-close { display: none; }
.chat-widget.chat-open .chat-icon-open { display: none; }
.chat-widget.chat-open .chat-icon-close { display: block; }

.chat-panel {
  display: none;
  flex-direction: column;
  width: 340px;
  max-height: 500px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.chat-widget.chat-open .chat-panel { display: flex; }

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--accent);
  color: #fff;
  flex-shrink: 0;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-title {
  font-size: 0.88rem;
  font-weight: 700;
}

.chat-subtitle {
  font-size: 0.72rem;
  opacity: 0.85;
}

.chat-close-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: color 0.2s;
}
.chat-close-btn:hover { color: #fff; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}

.chat-msg { max-width: 85%; }
.chat-msg p {
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  margin: 0;
}

.chat-msg-bot p {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chat-msg-user {
  align-self: flex-end;
}
.chat-msg-user p {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg-loading p {
  color: var(--text-muted);
  font-style: italic;
}

.chat-input-area {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}
.chat-input:focus { border-color: var(--accent); }
.chat-input::placeholder { color: var(--text-muted); }

.chat-send {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.chat-send:hover { background: var(--accent-hover); }

/* =============================================
   Detail Pages (experience_detail, project_detail)
   ============================================= */

.detail-page {
  min-height: calc(100vh - 64px);
  background: var(--bg-primary);
  padding: 2.5rem 0 4rem;
}

.detail-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--text-secondary); font-weight: 500; }

.detail-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.detail-header-main {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.detail-org-logo {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.detail-project-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.detail-title {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 0.35rem;
}

.detail-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.detail-body { display: flex; flex-direction: column; gap: 1.75rem; }

.detail-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow);
}

.detail-section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.1rem;
}
.detail-section-title svg { color: var(--accent); flex-shrink: 0; }

.detail-summary {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.detail-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.detail-list li::before {
  content: '→';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.05em;
}

/* Projects table in experience detail */
.projects-table-wrap { overflow-x: auto; }
.projects-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.projects-table th,
.projects-table td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.projects-table th {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-secondary);
}
.projects-table tr:hover td { background: var(--bg-secondary); }
.project-table-title { font-weight: 600; color: var(--text-primary); }
.nowrap { white-space: nowrap; }

/* Org mini card in project detail */
.org-mini-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.org-mini-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.org-mini-info { flex: 1; }
.org-mini-name { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
.org-mini-role { font-size: 0.8rem; color: var(--accent); }
.org-mini-period { font-size: 0.78rem; color: var(--text-muted); }

.detail-back {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.detail-back-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

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

@media (max-width: 1024px) {
  .hero-container { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-visual { justify-content: center; }
  .tech-showcase { max-width: 460px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-stats-panel { max-width: 400px; }
  .cta-banner { grid-template-columns: 1fr; gap: 2.5rem; padding: 2.25rem; }
  .cta-visual { justify-content: flex-start; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-container { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand { max-width: 100%; }
}

@media (max-width: 768px) {
  .section { padding: 3.5rem 0; }
  .section-header { margin-bottom: 2.5rem; }
  .hero-container { padding: 3rem 1.5rem 2rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .timeline { padding-left: 1.5rem; }
  .timeline-card { padding: 1.25rem; }
  .detail-header-main { flex-direction: column; }
  .chat-panel { width: calc(100vw - 3rem); }
  /* Prevent iOS Safari auto-zoom on input focus */
  input, textarea, select { font-size: 16px; }
}

@media (max-width: 480px) {
  .tech-grid { gap: 0.6rem; }
  .tech-tile { padding: 0.9rem 0.4rem; }
  .tech-tile-icon { width: 40px; height: 40px; }
  .footer-links { grid-template-columns: 1fr; }
  .contact-form-wrap { padding: 1.25rem; }
}

@media (max-width: 360px) {
  .hero-container { padding: 2.5rem 1rem 2rem; }
  .section-container { padding: 0 1rem; }
  .nav-container { padding: 0 1rem; }
}

/* =============================================
   Scrollbar Styling
   ============================================= */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Active Nav Link */
.nav-link.active {
  color: var(--accent);
  background: var(--accent-light);
}

/* =============================================
   Skill Tags (replaces progress bars)
   ============================================= */

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.skill-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  background: var(--badge-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.skill-tag:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

/* =============================================
   Project Filter Chips
   ============================================= */

.projects-filter {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1.75rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.projects-filter::-webkit-scrollbar { height: 4px; }
.projects-filter::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.filter-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.filter-chip:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* =============================================
   Projects Directory Page
   ============================================= */

.projects-page {
  min-height: calc(100vh - 64px);
  padding: 2.5rem 0 4rem;
}

.projects-page-header,
.projects-page-body {
  width: min(1120px, calc(100% - 3rem));
  margin: 0 auto;
}

.projects-page-header-inner {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.projects-page-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.projects-page-desc {
  max-width: 760px;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.projects-filter-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.projects-page-inner {
  margin-top: 1.5rem;
}

.project-directory {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-directory-item {
  position: relative;
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
  appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s, background 0.18s;
  color: inherit;
}

.project-directory-item:hover,
.project-directory-item:focus-visible {
  border-color: var(--accent);
  border-left-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: inherit;
  outline: none;
}

/* Top-right "open" arrow — signals the card is interactive */
.project-directory-arrow {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: color 0.18s, background 0.18s, border-color 0.18s, transform 0.18s;
}
.project-directory-item:hover .project-directory-arrow,
.project-directory-item:focus-visible .project-directory-arrow {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  transform: translate(2px, -2px);
}

.project-directory-item:hover .project-directory-title {
  color: var(--accent);
}

/* Tech-used chips on each card */
.project-directory-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
}
.pli-tech-chip {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--accent-light-border);
}
.pli-tech-more {
  background: var(--badge-bg);
  color: var(--text-muted);
  border-color: var(--border);
}

/* Bottom "View project details" cue */
.project-directory-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.95rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.18s;
}
.project-directory-cta svg { transition: transform 0.18s; }
.project-directory-item:hover .project-directory-cta { gap: 0.6rem; }
.project-directory-item:hover .project-directory-cta svg { transform: translateX(3px); }

.project-directory-topline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.project-directory-title {
  font-size: 1.08rem;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 0.55rem;
  padding-right: 2.5rem;
  transition: color 0.18s;
}

.project-directory-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.project-directory-desc {
  color: var(--text-secondary);
  line-height: 1.7;
}

.projects-empty-state {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-secondary);
}

.pli-featured-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
}

[data-theme="dark"] .pli-featured-badge {
  color: #fbbf24;
  background: rgba(146, 64, 14, 0.25);
  border-color: rgba(251, 191, 36, 0.35);
}

@media (max-width: 600px) {
  .projects-page-header,
  .projects-page-body {
    width: min(100%, calc(100% - 2rem));
  }

  .projects-page-header-inner {
    padding: 1.35rem;
  }

  .project-directory-item {
    padding: 1rem;
    gap: 1rem;
  }
}

.pli-category-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pli-org-tag {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--badge-bg);
  color: var(--text-muted);
}

.pli-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pli-customer,
.pli-period,
.pli-org {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* =============================================
   Project Detail Modal
   ============================================= */

.project-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: modal-fade-in 0.18s ease;
}

.project-modal-overlay[hidden] {
  display: none;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.project-modal-panel {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modal-slide-up 0.2s ease;
}

@keyframes modal-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 1;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0;
}

.modal-close {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.modal-close:hover {
  background: var(--badge-bg);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.modal-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.modal-description {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

.modal-roles-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-roles-list li {
  display: flex;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.modal-roles-list li::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.5em;
}

.modal-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* =============================================
   Projects directory: anchor cards, category
   sections & quick-nav (2026 refresh)
   ============================================= */

a.project-directory-item {
  display: block;
  text-decoration: none;
}

.project-category-section {
  margin-bottom: 2.75rem;
  scroll-margin-top: 90px;
}

.project-category-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.1rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--accent-light-border);
}

.project-category-count {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--accent-light-border);
}

.projects-category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.1rem 0 1.2rem;
}

.category-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.category-nav-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.category-nav-count {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.project-directory-meta {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0.4rem;
}

.project-directory-industries {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0;
}

/* =============================================
   Featured projects (homepage)
   ============================================= */

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

.featured-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid transparent;
  border-radius: 16px;
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.featured-card:hover,
.featured-card:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  outline: none;
}

.featured-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.featured-card-category {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.featured-card-period {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.featured-card-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}
.featured-card:hover .featured-card-title { color: var(--accent); }

.featured-card-customer {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.featured-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  flex-grow: 1;
}

.featured-card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.featured-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.18s;
}
.featured-card:hover .featured-card-cta { gap: 0.6rem; }

.featured-more {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

/* =============================================
   FAQ accordion
   ============================================= */

.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.faq-item[open] {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.faq-question {
  position: relative;
  cursor: pointer;
  list-style: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 1.1rem 3rem 1.1rem 1.35rem;
  user-select: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: '';
  position: absolute;
  right: 1.35rem;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s;
}
.faq-item[open] .faq-question::after {
  transform: translateY(-30%) rotate(225deg);
}
.faq-question:hover { color: var(--accent); }

.faq-answer {
  padding: 0 1.35rem 1.2rem;
}
.faq-answer p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-secondary);
}
.faq-answer a { color: var(--accent); font-weight: 600; }

/* =============================================
   Services page
   ============================================= */

.services-header { margin-top: 1rem; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.4rem;
  margin-bottom: 3rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.6rem 1.6rem 1.4rem;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 90px;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.service-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.service-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--accent-light-border);
}

.service-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.service-card-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  flex-grow: 1;
}

.service-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}
.service-proof-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.service-proof a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-light);
  border: 1px solid var(--accent-light-border);
  transition: background 0.18s, color 0.18s;
}
.service-proof a:hover {
  background: var(--accent);
  color: #fff;
}

.services-cta { margin-bottom: 1rem; }

/* =============================================
   Related projects grid (detail pages)
   ============================================= */

.related-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.9rem;
}

.related-project-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.related-project-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.related-project-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}
.related-project-card:hover .related-project-title { color: var(--accent); }

.related-project-tech {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.related-project-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

/* Industry tags on detail pages */
.detail-industries { margin-top: 0.5rem; }
.tag-industry {
  background: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--border);
}

/* =============================================
   Resume button & error page
   ============================================= */

.btn-resume svg { flex-shrink: 0; }
.contact-resume-btn { margin-top: 1.1rem; }

.error-page { min-height: 55vh; }
.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

/* =============================================
   Scroll reveal
   ============================================= */

@media (prefers-reduced-motion: no-preference) {
  .will-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .will-reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================
   Responsive tweaks for new sections
   ============================================= */

@media (max-width: 768px) {
  .featured-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }
  .project-category-title { font-size: 1.1rem; }
  .projects-category-nav { gap: 0.4rem; }
  .category-nav-link { font-size: 0.78rem; padding: 0.4rem 0.7rem; }
}

@media (max-width: 480px) {
  .related-projects-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
}
