/* ==========================================================================
   PRANAB PURKAIT — CIVIL ENGINEERING PORTFOLIO
   Design System: Architectural Light Mode (Beige, Maroon & Dark Brown)
   ========================================================================== */

:root, body.light-mode {
  /* Warm Architectural Beige Backgrounds */
  --bg-primary: #FAF6F0;
  --bg-secondary: #F2EBE1;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FDFBF8;
  --bg-glass: rgba(250, 246, 240, 0.94);
  --bg-contrast: #231612;

  /* Deep Dark Brown Typography (High contrast & warmth) */
  --text-primary: #231612;
  --text-secondary: #563E34;
  --text-muted: #7E675D;

  /* Regal Deep Maroon Signature Accent */
  --accent-gold: #801825;
  --accent-gold-light: #9E2636;
  --accent-gold-glow: rgba(128, 24, 37, 0.25);
  --maroon-dark: #5C0F1A;
  --maroon-dim: rgba(128, 24, 37, 0.08);
  --maroon-border: rgba(128, 24, 37, 0.28);

  /* Supporting Accents */
  --accent-cyan: #801825;
  --accent-cyan-dim: rgba(128, 24, 37, 0.07);
  --accent-cyan-border: rgba(128, 24, 37, 0.22);
  --accent-amber: #C17326;

  /* Subtle Warm Earth Borders */
  --border-subtle: rgba(70, 35, 25, 0.12);
  --border-active: rgba(128, 24, 37, 0.45);
  --border-cad: rgba(128, 24, 37, 0.22);

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --transition-fast: 0.18s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-card: 0 10px 30px -10px rgba(50, 25, 20, 0.08), 0 2px 8px rgba(50, 25, 20, 0.04);
  --shadow-glow: 0 0 25px rgba(128, 24, 37, 0.15);
  --shadow-cyan: 0 0 20px rgba(128, 24, 37, 0.12);
}

/* Optional Dark Mode Toggle Override */
body.dark-mode {
  --bg-primary: #090e17;
  --bg-secondary: #0f1724;
  --bg-card: rgba(18, 28, 42, 0.85);
  --bg-card-hover: rgba(24, 38, 56, 0.95);
  --bg-glass: rgba(14, 22, 34, 0.88);
  --bg-contrast: #070b12;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-gold: #e5a93c;
  --accent-gold-light: #f5c063;
  --accent-gold-glow: rgba(229, 169, 60, 0.25);
  --maroon-dark: #c4821a;
  --maroon-dim: rgba(229, 169, 60, 0.12);
  --maroon-border: rgba(229, 169, 60, 0.3);

  --accent-cyan: #38bdf8;
  --accent-cyan-dim: rgba(56, 189, 248, 0.15);
  --accent-cyan-border: rgba(56, 189, 248, 0.3);

  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-active: rgba(229, 169, 60, 0.45);
  --border-cad: rgba(56, 189, 248, 0.2);

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(229, 169, 60, 0.18);
  --shadow-cyan: 0 0 20px rgba(56, 189, 248, 0.12);
}

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

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  padding-top: 72px;
  -webkit-font-smoothing: antialiased;
  position: relative;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Architectural CAD Drafting Grid Background */
.cad-grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-size: 40px 40px, 40px 40px, 200px 200px, 200px 200px;
  background-image: 
    linear-gradient(to right, rgba(128, 24, 37, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(128, 24, 37, 0.045) 1px, transparent 1px),
    linear-gradient(to right, rgba(86, 62, 52, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(86, 62, 52, 0.055) 1px, transparent 1px);
  opacity: 0.95;
}

body.dark-mode .cad-grid-bg {
  background-image: 
    linear-gradient(to right, rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(to right, rgba(229, 169, 60, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(229, 169, 60, 0.055) 1px, transparent 1px);
}

/* Global Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Typography Helpers */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.highlight-text {
  color: var(--accent-gold);
  background: linear-gradient(135deg, #801825 0%, #ad2d3e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.dark-mode .highlight-text {
  background: linear-gradient(135deg, #e5a93c 0%, #ffd080 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-gold);
  background: rgba(128, 24, 37, 0.08);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(128, 24, 37, 0.25);
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 680px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #801825 0%, #63101b 100%);
  color: #FAF6F0;
  box-shadow: 0 4px 18px rgba(128, 24, 37, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #962231 0%, #801825 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(128, 24, 37, 0.38);
}

body.dark-mode .btn-primary {
  background: linear-gradient(135deg, #e5a93c 0%, #c4821a 100%);
  color: #0b0f17;
  box-shadow: 0 4px 18px var(--accent-gold-glow);
}

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

.btn-outline:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(128, 24, 37, 0.05);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
  background: rgba(128, 24, 37, 0.04);
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body.dark-mode .site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

/* Sleek Dark Maroon Tab-Synced Moving Bar along Navbar */
.scroll-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2.5px;
  width: 0;
  background: linear-gradient(90deg, #5C0F1A 0%, #801825 55%, #A52A3A 100%);
  box-shadow: 0 1px 8px rgba(128, 24, 37, 0.45);
  z-index: 105;
  pointer-events: none;
  border-radius: 0 2px 2px 0;
  transition: width 0.1s ease-out;
  will-change: width;
}

body.dark-mode .scroll-progress-bar {
  background: linear-gradient(90deg, #a86c12 0%, #e5a93c 55%, #f5c063 100%);
  box-shadow: 0 1px 8px rgba(229, 169, 60, 0.5);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-avatar-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #801825;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(128, 24, 37, 0.25);
  background: var(--bg-card);
  flex-shrink: 0;
}

.nav-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

body.dark-mode .brand-avatar-badge {
  border-color: #e5a93c;
  box-shadow: 0 0 10px rgba(229, 169, 60, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--accent-gold);
  font-family: var(--font-mono);
  font-weight: 600;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
  padding: 0.35rem 0.2rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-gold);
}

.nav-link.active {
  font-weight: 700;
  text-shadow: 0 0 12px rgba(128, 24, 37, 0.15);
}

body.dark-mode .nav-link.active {
  text-shadow: 0 0 12px rgba(229, 169, 60, 0.3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cad-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-gold);
  background: rgba(128, 24, 37, 0.08);
  border: 1px solid rgba(128, 24, 37, 0.25);
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cad-mode-btn:hover {
  background: rgba(128, 24, 37, 0.15);
}

.cad-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 6px var(--accent-gold);
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(128, 24, 37, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: rgba(128, 24, 37, 0.15);
  border-color: var(--accent-gold);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  padding: 1.5rem 0 2rem;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
  width: 100%;
}

.personal-greeting {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.greeting-wave {
  font-size: 1.15rem;
  display: inline-block;
  animation: wave 2.2s infinite;
  transform-origin: 70% 70%;
}

@keyframes wave {
  0% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
  60% { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

.hero-title {
  font-size: clamp(2.3rem, 4.2vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
  line-height: 1.1;
}

.hero-designation {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 600;
  color: var(--accent-gold);
  letter-spacing: -0.01em;
  margin-bottom: 0.85rem;
}

body.dark-mode .hero-designation {
  color: var(--accent-gold);
}

.hero-lead {
  font-size: 0.98rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

/* Hero Metrics */
.hero-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.metric-card {
  display: flex;
  flex-direction: column;
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1;
}

.metric-plus {
  color: var(--text-primary);
}

.metric-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.25;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-cta-group .btn {
  padding: 0.65rem 1.15rem;
  font-size: 0.85rem;
}

/* Clean Hero Portrait Visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-cad);
  box-shadow: 0 16px 40px -10px rgba(50, 25, 20, 0.15), var(--shadow-glow);
  background: var(--bg-secondary);
  width: 100%;
  max-width: 440px;
}

.hero-img,
.portrait-hero-img {
  width: 100%;
  height: 440px;
  max-height: calc(100vh - 180px);
  object-fit: cover;
  object-position: center 18%;
  display: block;
  transition: transform var(--transition-slow);
  filter: contrast(1.02) brightness(1.01);
}

.hero-image-frame:hover .portrait-hero-img {
  transform: scale(1.02);
}

/* ==========================================================================
   TRUST BANNER
   ========================================================================== */
.trust-banner {
  padding: 2.2rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.trust-label {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.trust-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.75rem 2.5rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.trust-item:hover {
  color: var(--accent-gold);
}

.dept-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
  background: rgba(128, 24, 37, 0.08);
  border: 1px solid rgba(128, 24, 37, 0.22);
  border-radius: var(--radius-sm);
  color: var(--accent-gold);
}

/* ==========================================================================
   ABOUT / MY STORY
   ========================================================================== */
.section {
  padding: 5.5rem 0;
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
}

.about-card h3 {
  font-size: 1.45rem;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.profile-bio-card p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.profile-bio-card p strong {
  color: var(--text-primary);
}

.personal-philosophy-quote {
  position: relative;
  background: rgba(128, 24, 37, 0.05);
  border-left: 3px solid var(--accent-gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.25rem 1.5rem 1.25rem 2.2rem;
  margin-top: 1.75rem;
}

.quote-mark {
  position: absolute;
  top: 0.15rem;
  left: 0.6rem;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--accent-gold);
  opacity: 0.4;
  line-height: 1;
}

.personal-philosophy-quote p {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: 0.5rem !important;
  line-height: 1.6;
}

.quote-author {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-gold);
  font-weight: 700;
  display: block;
}

.specs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.specs-list li {
  display: flex;
  flex-direction: column;
  border-left: 3px solid var(--accent-gold);
  padding-left: 1rem;
}

.spec-title {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.spec-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ==========================================================================
   LANDMARK PROJECTS
   ========================================================================== */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.filter-btn.active {
  background: #801825;
  color: #FAF6F0;
  border-color: #801825;
  box-shadow: 0 4px 15px rgba(128, 24, 37, 0.25);
}

body.dark-mode .filter-btn.active {
  background: #e5a93c;
  color: #0b0f17;
  border-color: #e5a93c;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 1.75rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
  box-shadow: var(--shadow-card);
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.project-img-wrapper {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.fallback-blueprint {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F0E8DD 0%, #E2D6C6 100%);
  border-bottom: 1px solid var(--border-cad);
}

body.dark-mode .fallback-blueprint {
  background: linear-gradient(135deg, #0e1724 0%, #162438 100%);
}

.blueprint-card-graphic {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.blueprint-icon {
  font-size: 2.4rem;
}

.blueprint-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
}

.project-tag-badge {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  background: rgba(250, 246, 240, 0.92);
  backdrop-filter: blur(6px);
  color: var(--accent-gold);
  border: 1px solid rgba(128, 24, 37, 0.35);
  border-radius: var(--radius-sm);
}

body.dark-mode .project-tag-badge {
  background: rgba(8, 13, 21, 0.85);
  color: var(--accent-gold);
}

.project-body {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  font-family: var(--font-mono);
}

.meta-location {
  color: var(--accent-gold);
  font-weight: 600;
}

.project-name {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.project-personal-note {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.6;
  flex-grow: 1;
  background: rgba(128, 24, 37, 0.04);
  border-left: 2px solid var(--accent-gold);
  padding: 0.65rem 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.project-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 1.4rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-subtle);
}

.btn-card-action {
  width: 100%;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.65rem;
  background: rgba(128, 24, 37, 0.04);
  color: var(--accent-gold);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-card-action:hover {
  background: var(--accent-gold);
  color: #FAF6F0;
  border-color: var(--accent-gold);
}

/* ==========================================================================
   CAREER TIMELINE
   ========================================================================== */
.timeline-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

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

.timeline-track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background: linear-gradient(to bottom, #801825 0%, #381E15 60%, rgba(128, 24, 37, 0.1) 100%);
}

.timeline-item {
  position: relative;
  padding-left: 55px;
  margin-bottom: 2.75rem;
}

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

.timeline-dot {
  position: absolute;
  left: 12px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid #801825;
  box-shadow: 0 0 10px rgba(128, 24, 37, 0.3);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-fast);
}

.timeline-card:hover {
  border-color: var(--accent-gold);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  display: block;
  margin-bottom: 0.35rem;
}

.timeline-role {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.timeline-org {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.timeline-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.15rem;
}

.timeline-badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.t-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  background: rgba(128, 24, 37, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
}

/* ==========================================================================
   EXPERTISE MATRIX
   ========================================================================== */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.8rem;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
}

.pillar-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.pillar-icon {
  font-size: 2.2rem;
  margin-bottom: 1.25rem;
}

.pillar-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.pillar-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.pillar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pillar-list li {
  font-size: 0.84rem;
  color: var(--text-secondary);
  position: relative;
  padding-left: 1.1rem;
}

.pillar-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-gold);
  font-weight: bold;
}

/* ==========================================================================
   CIVIL ESTIMATOR SECTION
   ========================================================================== */
.calculator-section {
  padding: 5rem 0;
}

.estimator-box {
  background: linear-gradient(135deg, #F5EDE3 0%, #ECE1D3 100%);
  border: 1px solid rgba(128, 24, 37, 0.3);
  border-radius: var(--radius-xl);
  padding: 3rem;
  box-shadow: var(--shadow-card), 0 0 25px rgba(128, 24, 37, 0.1);
  position: relative;
}

body.dark-mode .estimator-box {
  background: linear-gradient(135deg, rgba(14, 22, 34, 0.95) 0%, rgba(18, 29, 44, 0.9) 100%);
}

.estimator-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
  background: rgba(128, 24, 37, 0.1);
  border: 1px solid var(--accent-gold);
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.estimator-header h2 {
  font-size: 1.95rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.estimator-header p {
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.estimator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.input-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}

.input-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.55rem;
  display: flex;
  justify-content: space-between;
}

.highlight-val {
  color: var(--accent-gold);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
}

.calc-select {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.calc-select:focus {
  border-color: var(--accent-gold);
}

.calc-range {
  width: 100%;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.results-card {
  background: #231612; /* Deep Espresso Dark Brown for maximum architectural punch */
  color: #FAF6F0;
  border: 1px solid rgba(128, 24, 37, 0.4);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 15px 35px rgba(35, 22, 18, 0.25);
}

.result-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: #EFA94A;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.calc-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.c-metric {
  display: flex;
  flex-direction: column;
}

.c-label {
  font-size: 0.78rem;
  color: #D3C3B9;
  margin-bottom: 0.25rem;
}

.c-val {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 700;
  color: #F8D082;
}

.c-val small {
  font-size: 0.85rem;
  color: #E2D6C6;
}

.calc-note {
  font-size: 0.78rem;
  color: #B5A196;
  line-height: 1.5;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  padding-top: 0.85rem;
}

/* ==========================================================================
   EDUCATION SECTION
   ========================================================================== */
.education-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.6rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

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

.edu-year {
  font-family: var(--font-mono);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1;
  margin-bottom: 1rem;
}

.edu-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-gold);
  background: rgba(128, 24, 37, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.65rem;
}

.edu-degree {
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.edu-board {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.edu-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
}

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

.contact-title {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.contact-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

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

.c-method-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(50, 25, 20, 0.04);
}

.c-method-item .c-icon {
  font-size: 1.4rem;
}

.c-method-item strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.c-method-item span, .c-method-item a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.c-method-item a:hover {
  color: var(--accent-gold);
}

.consultation-form {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
}

.consultation-form h3 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(128, 24, 37, 0.12);
}

.form-feedback {
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
  font-weight: 500;
}

.form-feedback.success {
  color: #15803d;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(35, 22, 18, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-window {
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(50, 25, 20, 0.35);
  padding: 2.5rem;
}

.resume-modal-window {
  max-width: 850px;
  padding: 2rem;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 1.6rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

/* Detailed Project Modal Content */
.modal-project-header {
  margin-bottom: 1.5rem;
}

.modal-project-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold);
  background: rgba(128, 24, 37, 0.08);
  border: 1px solid var(--accent-gold);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.modal-project-title {
  font-size: 1.85rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.modal-project-meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-weight: 600;
}

.modal-project-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-subtle);
}

.modal-specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
}

.modal-specs-table th, .modal-specs-table td {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-subtle);
  text-align: left;
}

.modal-specs-table th {
  background: rgba(128, 24, 37, 0.06);
  color: var(--accent-gold);
  font-family: var(--font-mono);
  font-weight: 700;
}

.modal-specs-table td {
  color: var(--text-secondary);
}

/* Resume Modal Sheets */
.resume-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.resume-tabs {
  display: flex;
  gap: 0.5rem;
}

.res-tab-btn {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
}

.res-tab-btn.active {
  background: #801825;
  color: #FAF6F0;
  border-color: #801825;
}

.resume-view-panel {
  display: none;
}

.resume-view-panel.active {
  display: block;
}

.printable-resume-sheet {
  background: #ffffff;
  color: #231612;
  padding: 2.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-body);
}

.printable-resume-sheet .sheet-header h1 {
  font-size: 1.7rem;
  color: #231612;
  margin-bottom: 0.25rem;
}

.printable-resume-sheet .sheet-header p {
  color: #563E34;
  font-size: 0.88rem;
}

.printable-resume-sheet hr {
  margin: 1rem 0;
  border: none;
  border-top: 1px solid #e2d6c6;
}

.printable-resume-sheet .sheet-section {
  margin-bottom: 1.25rem;
}

.printable-resume-sheet .sheet-section h3 {
  font-size: 0.95rem;
  color: #801825;
  border-bottom: 1px solid #e2d6c6;
  padding-bottom: 0.25rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.printable-resume-sheet .sheet-section p, .printable-resume-sheet .sheet-section li {
  font-size: 0.84rem;
  color: #38251e;
  line-height: 1.55;
}

.printable-resume-sheet ul {
  padding-left: 1.25rem;
}



.resume-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: #231612; /* Deep Espresso Dark Brown */
  border-top: 1px solid rgba(128, 24, 37, 0.25);
  padding: 3.5rem 0;
  color: #FAF6F0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: #FAF6F0;
  margin-bottom: 0.25rem;
}

.footer-left p {
  color: #D3C3B9;
  font-size: 0.88rem;
}

.footer-left .footer-sub {
  color: #B5A196;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}

.footer-nav a {
  color: #D3C3B9;
  text-decoration: none;
  font-size: 0.88rem;
  transition: color var(--transition-fast);
}

.footer-nav a:hover {
  color: #F8D082;
}

.copyright {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #9E887E;
}

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero-visual {
    order: -1;
  }
  .hero-img,
  .portrait-hero-img {
    height: 380px;
    max-height: 50vh;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .education-cards-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
    width: 100%;
    max-width: 100%;
  }

  .site-header {
    width: 100%;
    max-width: 100%;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.open {
    display: flex;
  }

  .mobile-toggle {
    display: flex;
  }

  .hero-section {
    min-height: auto;
    padding: 2rem 0;
  }

  .hero-metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    padding: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .metric-value {
    font-size: 1.45rem;
  }

  .metric-label {
    font-size: 0.68rem;
  }

  .estimator-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .results-card {
    padding: 1.25rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Timeline Mobile Optimization */
  .timeline-container {
    padding: 1rem 0;
  }

  .timeline-item {
    padding-left: 36px;
    margin-bottom: 2rem;
  }

  .timeline-track {
    left: 10px;
  }

  .timeline-dot {
    left: 2px;
    width: 16px;
    height: 16px;
  }

  .timeline-card {
    padding: 1.25rem 1rem;
  }

  /* Trust Logos Mobile Optimization */
  .trust-logos {
    gap: 1rem 1.25rem;
  }

  .trust-item {
    font-size: 0.82rem;
  }

  .dept-code {
    font-size: 0.75rem;
    padding: 0.2rem 0.45rem;
  }

  /* Modals Mobile Optimization */
  .modal-backdrop {
    padding: 1rem;
  }

  .modal-window {
    padding: 1.25rem;
    max-height: 85vh;
  }

  .printable-resume-sheet {
    padding: 1.25rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .footer-nav {
    flex-wrap: wrap;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 64px;
  }

  .header-inner {
    height: 64px;
  }

  .nav-menu {
    top: 64px;
  }

  .brand-name {
    font-size: 1.02rem;
  }

  .brand-avatar-badge {
    width: 36px;
    height: 36px;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .hero-designation {
    font-size: 1.15rem;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-img,
  .portrait-hero-img {
    height: 320px;
  }

  .calc-metrics {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .c-val {
    font-size: 1.55rem;
  }
}
