/* ==========================================================================
   CSS Custom Properties & Themes
   ========================================================================== */
:root {
  /* Fonts */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Theme Defaults (Dark Mode) */
  --bg-color: #09090b;
  --bg-color-alt: #121214;
  
  --card-bg: rgba(18, 18, 22, 0.7);
  --card-bg-hover: rgba(28, 28, 34, 0.85);
  --card-border: rgba(223, 186, 115, 0.12);
  --card-border-hover: rgba(223, 186, 115, 0.35);
  
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --gold-solid: #dfba73;
  --gold-gradient: linear-gradient(135deg, #dfba73 0%, #c5a059 100%);
  --bronze-gradient: linear-gradient(135deg, #e28743 0%, #c58b39 100%);
  --gold-accent: rgba(223, 186, 115, 0.08);
  --gold-glow: rgba(223, 186, 115, 0.2);
  
  --navbar-bg: rgba(9, 9, 11, 0.8);
  --selection-bg: rgba(223, 186, 115, 0.2);
  
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-red: #ef4444;

  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --border-radius: 12px;
}

[data-theme="light"] {
  /* Light Theme (Warm Ivory & Cream & Rich Bronze) */
  --bg-color: #fafaf9;
  --bg-color-alt: #f5f5f4;
  
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-bg-hover: rgba(255, 255, 255, 0.95);
  --card-border: rgba(180, 83, 9, 0.15);
  --card-border-hover: rgba(180, 83, 9, 0.45);
  
  --text-primary: #1c1917;
  --text-secondary: #57534e;
  --text-muted: #78716c;
  
  --gold-solid: #b45309;
  --gold-gradient: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  --bronze-gradient: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
  --gold-accent: rgba(180, 83, 9, 0.08);
  --gold-glow: rgba(180, 83, 9, 0.15);
  
  --navbar-bg: rgba(250, 250, 249, 0.85);
  --selection-bg: rgba(180, 83, 9, 0.15);
  
  --accent-blue: #2563eb;
  --accent-green: #059669;
  --accent-red: #dc2626;
  
  --shadow-sm: 0 2px 8px rgba(120, 113, 108, 0.1);
  --shadow-md: 0 8px 24px rgba(120, 113, 108, 0.15);
  --shadow-lg: 0 16px 40px rgba(120, 113, 108, 0.2);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

::selection {
  background-color: var(--selection-bg);
  color: var(--text-primary);
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-solid);
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

p {
  color: var(--text-secondary);
}

.gold-text {
  color: var(--gold-solid);
}

.gradient-text {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--navbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  transition: var(--transition-smooth);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-heading);
  letter-spacing: -0.03em;
}

.logo-accent {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.25rem 0;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold-gradient);
  transition: var(--transition-smooth);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link-btn {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: var(--border-radius);
  background: var(--gold-gradient);
  color: #09090b !important;
  box-shadow: 0 4px 12px var(--gold-glow);
}

.nav-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px var(--gold-glow);
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  transition: var(--transition-smooth);
  background-color: var(--gold-accent);
}

.theme-toggle:hover {
  transform: rotate(15deg);
  border-color: var(--gold-solid);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  position: absolute;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

[data-theme="dark"] .sun-icon {
  opacity: 0;
  transform: scale(0.5) rotate(90deg);
}

[data-theme="light"] .moon-icon {
  opacity: 0;
  transform: scale(0.5) rotate(-90deg);
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  overflow: hidden;
  background-color: var(--bg-color);
  padding: 6.5rem 2rem 5rem;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero-section::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle 700px at 50% 55%, transparent 20%, var(--bg-color) 85%);
  pointer-events: none;
  z-index: 2;
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(to right, var(--card-border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--card-border) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 1;
}

.hero-container {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 10;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--gold-accent);
  border: 1px solid var(--card-border);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-solid);
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: var(--accent-green);
  border-radius: 50%;
  animation: pulse-ring 1.5s infinite ease-in-out;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(3); opacity: 0; }
}

.hero-title {
  font-size: 4rem;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  min-height: 2.8rem;
}

.cursor {
  animation: blink 0.8s infinite;
  color: var(--gold-solid);
  margin-left: 3px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-description {
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto 3rem;
  color: var(--text-secondary);
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

/* Button Classes */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--gold-gradient);
  color: #09090b;
  box-shadow: 0 6px 18px var(--gold-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--gold-glow);
}

.btn-secondary {
  background-color: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background-color: var(--card-bg-hover);
  border-color: var(--gold-solid);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.hero-socials {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.hero-socials a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background-color: var(--card-bg);
}

.hero-socials a:hover {
  color: var(--gold-solid);
  border-color: var(--gold-solid);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px var(--gold-glow);
}

/* ==========================================================================
   Quick Stats Section
   ========================================================================== */
.stats-section {
  padding: 2rem;
  background-color: var(--bg-color-alt);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  position: relative;
  z-index: 15;
}

.stats-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat-card {
  text-align: center;
  padding: 1.5rem;
}

.stat-num {
  font-size: 3rem;
  font-family: var(--font-heading);
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Shared Page/Section Layouts
   ========================================================================== */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 3.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 50px;
  height: 4px;
  background: var(--gold-gradient);
  border-radius: 2px;
}

/* ==========================================================================
   About Section & Venture Studio
   ========================================================================== */
.about-section {
  background-color: var(--bg-color);
}

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

.about-info p {
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.about-info .lead-text {
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
}

.about-meta {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

.meta-item svg {
  color: var(--gold-solid);
}

.about-venture {
  position: relative;
}

.venture-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 3rem 2.5rem;
  border-radius: var(--border-radius);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

.venture-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
  background: var(--gold-gradient);
}

.venture-card:hover {
  transform: translateY(-5px);
  border-color: var(--card-border-hover);
  box-shadow: 0 12px 30px rgba(223, 186, 115, 0.08);
}

.venture-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--gold-accent);
  color: var(--gold-solid);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 5px;
  margin-bottom: 1.5rem;
}

.venture-card h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.venture-card p {
  font-size: 1rem;
  margin-bottom: 2rem;
}

.venture-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vh-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
}

.vh-item svg {
  color: var(--gold-solid);
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   Expertise & Technical Stack Section
   ========================================================================== */
.expertise-section {
  background-color: var(--bg-color-alt);
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 5rem;
}

.expertise-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 2.5rem 2rem;
  border-radius: var(--border-radius);
  transition: var(--transition-smooth);
}

.expertise-card:hover {
  transform: translateY(-5px);
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-md);
}

.card-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius);
  background-color: var(--gold-accent);
  color: var(--gold-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.card-icon-wrapper svg {
  width: 24px;
  height: 24px;
}

.expertise-card h3 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.expertise-card p {
  font-size: 0.95rem;
}

/* Tech Stack Tags Cloud */
.tech-cloud-container {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 3rem;
  text-align: center;
}

.tech-cloud-container h3 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.tech-cloud-sub {
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.tech-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  max-width: 900px;
  margin: 0 auto;
}

.tech-tag {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background-color: var(--bg-color);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
}

.tech-tag:hover, .tech-tag.active {
  background: var(--gold-gradient);
  color: #09090b;
  border-color: transparent;
  transform: scale(1.05);
  box-shadow: 0 4px 12px var(--gold-glow);
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.projects-section {
  background-color: var(--bg-color);
}

.project-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.tab-btn {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn:hover, .tab-btn.active {
  background: var(--gold-gradient);
  color: #09090b;
  border-color: transparent;
  box-shadow: 0 4px 12px var(--gold-glow);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  transition: var(--transition-smooth);
}

.project-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-smooth);
  opacity: 1;
  transform: scale(1);
}

.project-card.fade-out {
  opacity: 0.15;
  transform: scale(0.95);
  pointer-events: none;
}

.project-card.filtered {
  display: none;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--card-border-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.proj-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gold-solid);
  letter-spacing: 0.05em;
}

.proj-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.project-card h3 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.proj-summary {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.proj-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.proj-techs span {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  background-color: var(--bg-color-alt);
  color: var(--text-secondary);
  border-radius: 4px;
  border: 1px solid var(--card-border);
}

.btn-text {
  background: none;
  border: none;
  color: var(--gold-solid);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  align-self: flex-start;
  transition: var(--transition-smooth);
}

.btn-text svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.btn-text:hover {
  color: var(--text-primary);
}

.btn-text:hover svg {
  transform: translate(2px, -2px);
}

/* ==========================================================================
   Experience / Client Engagement Timeline
   ========================================================================== */
.experience-section {
  background-color: var(--bg-color-alt);
}

.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 5px;
  width: 2px;
  height: 100%;
  background: var(--card-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 4rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2.3rem;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold-solid);
  border: 4px solid var(--bg-color-alt);
  box-shadow: 0 0 8px var(--gold-glow);
  z-index: 1;
}

.timeline-content {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 2rem;
  border-radius: var(--border-radius);
  transition: var(--transition-smooth);
}

.timeline-content:hover {
  border-color: var(--card-border-hover);
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-solid);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.timeline-content h3 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.timeline-role {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.timeline-content p {
  font-size: 0.95rem;
}

/* ==========================================================================
   Education & Certifications Section
   ========================================================================== */
.education-section {
  background-color: var(--bg-color);
}

.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

.edu-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  transition: var(--transition-smooth);
}

.edu-card:hover {
  border-color: var(--card-border-hover);
  transform: translateY(-3px);
}

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.edu-header svg {
  color: var(--gold-solid);
  width: 28px;
  height: 28px;
}

.edu-year {
  font-size: 0.85rem;
  font-weight: 700;
  background-color: var(--gold-accent);
  color: var(--gold-solid);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
}

.edu-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.edu-school {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.edu-desc {
  font-size: 0.9rem;
}

.edu-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-solid);
}

/* Languages list */
.languages-box {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  text-align: center;
}

.languages-box h3 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}

.languages-list {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.lang-item {
  font-size: 1.05rem;
}

.lang-item strong {
  color: var(--gold-solid);
}

/* ==========================================================================
   Contact Section & Forms
   ========================================================================== */
.contact-section {
  background-color: var(--bg-color-alt);
  border-top: 1px solid var(--card-border);
}

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

.contact-info p {
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

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

.cd-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.cd-item svg {
  color: var(--gold-solid);
  width: 24px;
  height: 24px;
  margin-top: 3px;
}

.cd-item h4 {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.cd-item a {
  font-size: 1.1rem;
  font-weight: 600;
}

.cd-item a:hover {
  color: var(--gold-solid);
}

.contact-form-container {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 3rem;
  border-radius: var(--border-radius);
}

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

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

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

.form-group input, 
.form-group select, 
.form-group textarea {
  background-color: var(--bg-color);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  border-color: var(--gold-solid);
  outline: none;
  box-shadow: 0 0 8px rgba(223, 186, 115, 0.15);
}

.form-feedback {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-feedback.success {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.form-feedback.error {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--bg-color);
  border-top: 1px solid var(--card-border);
  padding: 3rem 2rem;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer p {
  font-size: 0.9rem;
}

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

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

/* ==========================================================================
   Case Study Modal Popup
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background-color: var(--bg-color-alt);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  max-width: 800px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  border-color: var(--gold-solid);
  color: var(--gold-solid);
  transform: scale(1.1);
}

.modal-body {
  padding: 3.5rem;
}

/* Modal Content Styling (Generated Dynamically) */
.modal-body h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.modal-subtitle {
  color: var(--gold-solid);
  font-weight: 600;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.modal-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.modal-description h3, 
.modal-stack-meta h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 0.5rem;
}

.modal-description p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.modal-info-block {
  margin-bottom: 1.5rem;
}

.modal-info-block h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.modal-info-block p, 
.modal-info-block a {
  font-size: 0.95rem;
  font-weight: 600;
}

.modal-info-block a {
  color: var(--gold-solid);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.modal-info-block a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Fade In Scroll Observer Animations
   ========================================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.appear {
  opacity: 1;
  transform: translateY(0);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-fade-in {
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-fade-in:nth-child(1) { animation-delay: 0.1s; }
.hero-fade-in:nth-child(2) { animation-delay: 0.2s; }
.hero-fade-in:nth-child(3) { animation-delay: 0.3s; }
.hero-fade-in:nth-child(4) { animation-delay: 0.4s; }
.hero-fade-in:nth-child(5) { animation-delay: 0.5s; }
.hero-fade-in:nth-child(6) { animation-delay: 0.6s; }

.modal-body h2 {
  padding-right: 3rem;
}

.modal-tabs {
  flex-wrap: wrap;
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 3.25rem;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .expertise-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .edu-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.5rem 0;
  }
  
  .nav-links {
    display: none; /* Mobile menu hidden by default */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-color-alt);
    border-bottom: 1px solid var(--card-border);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: var(--shadow-lg);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .mobile-nav-toggle {
    display: block;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.5rem;
    min-height: 2.2rem;
  }
  
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .expertise-grid {
    grid-template-columns: 1fr;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .modal-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-body {
    padding: 2.5rem 1.5rem;
  }
  
  .hero-section {
    padding: 7.5rem 1.5rem 3.5rem;
    min-height: auto;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
  }
  
  .hero-cta .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
  
  .project-tabs {
    gap: 0.5rem;
    margin-bottom: 2.5rem;
  }
  
  .tab-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
  }
  
  .footer-container {
  }
}

/* ==========================================================================
   New Styles: About Image Frame, Tabbed Modal, and CLI Terminal
   ========================================================================== */

/* About Section Portrait Styling */
.about-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.about-image-frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 20px rgba(223, 186, 115, 0.15);
  border: 1px solid var(--card-border-hover);
  aspect-ratio: 3/4;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.about-image-frame:hover .portrait-img {
  transform: scale(1.05);
}

.about-image-accent {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border: 2px solid var(--gold-solid);
  border-radius: 16px;
  pointer-events: none;
  opacity: 0.25;
  margin: 10px;
  transition: var(--transition-smooth);
}

.about-image-frame:hover .about-image-accent {
  margin: 6px;
  opacity: 0.6;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Modal Tab Navigation Styling */
.modal-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.modal-tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.modal-tab-btn:hover {
  color: var(--text-primary);
}

.modal-tab-btn.active {
  color: var(--gold-solid);
}

.modal-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -0.6rem;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold-gradient);
}

.modal-tab-content {
  display: none;
}

.modal-tab-content.active {
  display: block;
  animation: fadeInModalContent 0.3s ease;
}

@keyframes fadeInModalContent {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-tab-panels {
  min-height: 250px;
}

/* M-Pesa Parser Sandbox Styling inside Modal */
.mpesa-demo-container {
  background-color: var(--bg-color);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-top: 1rem;
}

.mpesa-demo-container h4 {
  font-size: 1.15rem;
  color: var(--gold-solid);
  margin-bottom: 0.5rem;
}

.demo-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.mpesa-result-box {
  background-color: var(--bg-color-alt);
  border: 1px solid var(--card-border-hover);
  border-radius: var(--border-radius);
  padding: 1.25rem;
}

/* CLI Terminal Widget Styling */
.terminal-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1001;
  font-family: 'Courier New', Courier, monospace;
}

.terminal-toggle-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-color-alt);
  border: 1px solid var(--card-border-hover);
  color: var(--gold-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg), 0 0 15px var(--gold-glow);
  position: relative;
  transition: var(--transition-smooth);
}

.terminal-toggle-btn:hover {
  transform: scale(1.08);
  border-color: var(--gold-solid);
  box-shadow: 0 0 25px rgba(223, 186, 115, 0.4);
}

.terminal-pulse {
  position: absolute;
  top: 0; right: 0;
  width: 12px;
  height: 12px;
  background-color: var(--accent-green);
  border-radius: 50%;
  border: 2px solid var(--bg-color-alt);
}

.terminal-pulse::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: var(--accent-green);
  border-radius: 50%;
  animation: pulse-ring-term 2s infinite ease-in-out;
}

@keyframes pulse-ring-term {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(3); opacity: 0; }
}

.terminal-window {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 420px;
  height: 320px;
  background-color: rgba(10, 10, 12, 0.96);
  border: 1px solid var(--card-border-hover);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.terminal-widget.open .terminal-window {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.terminal-header {
  background-color: #121216;
  border-bottom: 1px solid var(--card-border);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dots .dot.red { background-color: var(--accent-red); }
.terminal-dots .dot.yellow { background-color: #eab308; }
.terminal-dots .dot.green { background-color: var(--accent-green); }

.terminal-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.terminal-minimize {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.terminal-minimize:hover {
  color: var(--text-primary);
}

.terminal-body {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #a7f3d0; /* Emerald green theme tint */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.terminal-output {
  flex-grow: 1;
  overflow-y: auto;
  margin-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.term-welcome {
  color: var(--gold-solid);
  font-weight: bold;
}

.term-hint {
  color: var(--text-secondary);
}

.term-highlight {
  color: #38bdf8; /* sky blue command highlight */
  font-weight: bold;
}

.term-prompt {
  color: var(--gold-solid);
}

.term-cmd-text {
  color: var(--text-primary);
}

.term-error {
  color: #f87171; /* red error */
}

.term-link {
  color: #38bdf8;
  text-decoration: underline;
}

.term-link:hover {
  color: #7dd3fc;
}

.terminal-input-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid rgba(223, 186, 115, 0.05);
  padding-top: 0.5rem;
}

#terminalInput {
  background: none;
  border: none;
  outline: none;
  flex-grow: 1;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
}

/* Terminal Tooltip */
.terminal-tooltip {
  position: absolute;
  right: 70px;
  background-color: var(--bg-color-alt);
  border: 1px solid var(--card-border-hover);
  color: var(--text-primary);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: var(--font-body);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
  transition: var(--transition-smooth);
}

.terminal-toggle-btn:hover .terminal-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Adjustments for Mobile Views */
@media (max-width: 480px) {
  .terminal-window {
    width: calc(100vw - 60px);
    right: 0;
    height: 280px;
  }
  
  .hero-section {
    padding: 7rem 1rem 3rem;
  }
  
  .hero-title {
    font-size: 2.2rem !important;
  }
  
  .hero-subtitle {
    font-size: 1.3rem !important;
  }
  
  .section-title {
    font-size: 2rem !important;
  }
  
  .btn {
    padding: 0.75rem 1.5rem !important;
    font-size: 0.9rem !important;
  }
  
  .modal-tabs {
    gap: 0.25rem;
  }
  
  .modal-tab-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
  
  .stats-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
