/* ==========================================================================
   Abhishek Raha - Portfolio Stylesheet
   Theme: High-Performance Backend & FinTech Dark Aesthetic
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Raleway:wght@300;400;600;700;800&display=swap');

:root {
  --bg-primary: #0a0d14;
  --bg-secondary: #0f1422;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(0, 242, 254, 0.25);
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-coral: #ff5370;
  --accent-emerald: #10b981;
  --accent-purple: #8b5cf6;
  --accent-amber: #f59e0b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-heading: 'Raleway', sans-serif;
}

/* Reset & Global */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

/* Refined desktop typography across the entire site (subtle +1 step up from 16px default) */
@media (min-width: 992px) {
  html {
    font-size: 17px;
  }
}

@media (min-width: 1400px) {
  html {
    font-size: 17.5px;
  }
}

body {
  font-family: var(--font-sans) !important;
  font-size: 1rem;
  line-height: 1.6;
  background-color: var(--bg-primary);
  color: var(--text-main);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

a {
  text-decoration: none !important;
  color: inherit;
  transition: all 0.25s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.mono {
  font-family: var(--font-mono);
}

.section {
  text-align: center;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

/* Navbar Header */
.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

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

.nav-brand {
  position: static;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

.nav-brand a {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1px;
}

.nav-brand span.slash {
  color: var(--accent-coral);
  font-weight: 900;
}

/* Tech status indicator */
.sys-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #34d399;
  letter-spacing: 0.5px;
}

.sys-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.header-links {
  position: static;
  width: auto;
  z-index: auto;
}

.header-links ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-links li {
  padding: 0;
  display: inline-block;
  float: none;
}

.header-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted) !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.header-links a:hover,
.header-links li.active a {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 2px solid var(--accent-coral);
}

.fa-bars {
  display: none !important;
  color: var(--accent-coral);
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 1001;
}

/* Mobile Nav Screen */
.nav-screen {
  height: 100%;
  z-index: 1100;
  position: fixed;
  background-color: #0b0f19;
  border-left: 1px solid var(--border-color);
  right: -300px;
  width: 300px;
  top: 0;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-screen .fa-times {
  color: var(--accent-coral);
  font-size: 1.8rem;
  float: right;
  padding: 1.5rem;
  cursor: pointer;
}

.nav-container {
  padding-top: 4rem;
}

.nav-links ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 2rem;
}

.nav-links a {
  font-family: var(--font-mono);
  color: var(--text-main);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: left;
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
}

.nav-links a:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
}

/* Main Section (Hero) */
.mainsection {
  background: radial-gradient(circle at 50% 30%, rgba(15, 23, 42, 0.75), rgba(10, 13, 20, 0.95)),
              url("../images/main_bg.jpeg") no-repeat center center;
  background-attachment: fixed;
  background-size: cover;
}

.hero-overlay-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 83, 112, 0.1);
  border: 1px solid rgba(255, 83, 112, 0.3);
  color: var(--accent-coral);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 4.5rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.05;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.hero-title .accent-slash {
  color: var(--accent-coral);
  display: inline-block;
  transform: skewX(-10deg);
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--accent-cyan);
  margin: 1.25rem 0 0.5rem;
  letter-spacing: 0.5px;
}

.hero-typewriter-box {
  min-height: 38px;
  margin: 0.5rem 0 2rem;
}

.hero-typewriter-text {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: #e2e8f0;
  font-weight: 500;
}

.blinking-cursor {
  font-weight: 600;
  margin-left: 2px;
  color: var(--accent-coral) !important;
  animation: blink 1s step-end infinite;
}

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

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 1.5rem 0 2.5rem;
}

.tech-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.tech-pill:hover {
  border-color: var(--accent-cyan);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 242, 254, 0.15);
}

.tech-pill i {
  color: var(--accent-cyan);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.btn-tech-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ff5370, #e11d48);
  color: #ffffff !important;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(255, 83, 112, 0.4);
  transition: all 0.25s ease;
}

.btn-tech-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 83, 112, 0.6);
  color: #ffffff !important;
}

.btn-tech-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-main) !important;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.btn-tech-secondary:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.1);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 242, 254, 0.2);
}

/* Down Arrow */
.fa-chevron-down {
  color: var(--accent-coral) !important;
  bottom: 25px;
  cursor: pointer;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.8rem;
  z-index: 20;
  opacity: 0.8;
  transition: all 0.2s ease;
}

.fa-chevron-down:hover {
  opacity: 1;
  color: var(--accent-cyan) !important;
}

/* Section Header Styles */
.section-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.02em;
}

.section-title span.accent {
  color: var(--accent-coral);
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0.75rem auto 0;
  line-height: 1.6;
}

/* Container Utility */
.tech-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  position: relative;
  z-index: 10;
  width: 100%;
}

.tech-container.about-container {
  max-width: 1240px;
  padding: 2.5rem 1.5rem;
}

/* Glass Card */
.tech-card-glass {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  text-align: left;
}

.tech-card-glass:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   Interactive Terminal Section
   ========================================================================== */
.terminal-window {
  background: #090d16;
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 242, 254, 0.08);
  overflow: hidden;
  font-family: var(--font-mono);
  text-align: left;
  max-width: 960px;
  margin: 0 auto;
}

.terminal-header {
  background: #0f1626;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

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

.terminal-body {
  padding: 1.25rem 1.5rem;
  max-height: 420px;
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.6;
}

.terminal-output {
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
}

.term-green { color: #34d399; }
.term-cyan { color: #38bdf8; }
.term-yellow { color: #fbbf24; }
.term-coral { color: #ff5370; }
.term-dim { color: #64748b; }
.term-bold { font-weight: 700; color: #ffffff; }

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.terminal-prompt {
  color: #38bdf8;
  font-weight: 600;
  white-space: nowrap;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 0;
}

.terminal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(15, 22, 38, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.term-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.term-chip:hover {
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

/* ==========================================================================
   Selected Achievements / Telemetry Bar
   ========================================================================== */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 1rem;
}

.telemetry-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.75rem 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.telemetry-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-coral), var(--accent-cyan));
  opacity: 0.8;
}

.telemetry-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 242, 254, 0.1);
}

.telemetry-icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  color: var(--accent-cyan);
}

.telemetry-value {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.telemetry-card.highlight .telemetry-value {
  background: linear-gradient(135deg, #ff5370, #ff8e53);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.telemetry-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.telemetry-detail {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.aboutme {
  background: radial-gradient(circle at 80% 20%, rgba(15, 23, 42, 0.85), rgba(10, 13, 20, 0.95)),
              url("../images/james-bold-lMQv3xVa8X4-unsplash.jpg") no-repeat center center;
  background-attachment: fixed;
  background-size: cover;
}

.about-split-layout {
  display: block;
  width: 100%;
}

.about-bio-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.75rem 2rem;
}

.about-bio-text {
  font-size: 1rem;
  color: #cbd5e1;
  line-height: 1.6;
}

.about-bio-text p {
  color: #cbd5e1;
  font-size: 0.98rem;
  margin-bottom: 0.85rem;
}

.about-bio-highlight {
  border-left: 3px solid var(--accent-coral);
  padding-left: 1.1rem;
  margin: 1rem 0;
  font-style: italic;
  color: #f1f5f9;
  font-size: 0.96rem;
}

.about-meta-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.about-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.about-meta-item i {
  color: var(--accent-cyan);
  font-size: 1.1rem;
}

.about-code-card {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  font-family: var(--font-mono);
}

.code-editor-header {
  background: #0f172a;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-editor-tabs {
  display: flex;
  gap: 8px;
}

.code-tab {
  font-size: 0.78rem;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.1);
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.code-body {
  padding: 1.25rem 1.5rem;
  font-size: 0.86rem;
  line-height: 1.65;
  color: #e2e8f0;
  overflow-x: auto;
}

.code-body pre {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
}

.kw { color: #f43f5e; font-weight: 600; }
.type { color: #38bdf8; }
.var { color: #cbd5e1; }
.str { color: #34d399; }
.num { color: #fbbf24; }
.comment { color: #64748b; font-style: italic; }

/* ==========================================================================
   Work Experience Section
   ========================================================================== */
.experience {
  background: radial-gradient(circle at 20% 80%, rgba(15, 23, 42, 0.9), rgba(10, 13, 20, 0.98)),
              url("../images/work-timeline.jpg") no-repeat center center;
  background-attachment: fixed;
  background-size: cover;
  padding: 4rem 0;
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.exp-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 2rem;
  text-align: left;
  backdrop-filter: blur(12px);
  position: relative;
  transition: all 0.3s ease;
}

.exp-card:hover {
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 242, 254, 0.1);
  transform: translateY(-2px);
}

.exp-card-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1rem;
}

.exp-role-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.exp-company {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent-coral);
  font-weight: 600;
}

.exp-company-sub {
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 400;
}

.exp-badge-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
  white-space: nowrap;
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1.25rem;
}

.exp-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.exp-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exp-bullets li {
  position: relative;
  padding-left: 22px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #cbd5e1;
}

.exp-bullets li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent-coral);
  font-weight: 700;
}

/* ==========================================================================
   Technologies & Skills Section
   ========================================================================== */
.skills {
  background: radial-gradient(circle at 50% 50%, #111827 0%, #080b11 100%);
  padding: 4rem 0;
}

.skills-filter-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 2.5rem;
}

.skill-filter-btn {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
}

.skill-filter-btn:hover,
.skill-filter-btn.active {
  background: rgba(0, 242, 254, 0.12);
  border-color: var(--accent-cyan);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 242, 254, 0.2);
}

.skillcontainer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 20px;
  max-width: 1040px;
  margin: 0 auto;
}

.skillsiknow {
  width: 100%;
  aspect-ratio: 1;
  perspective: 1000px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
  border-radius: 14px;
}

.skillsiknow:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
}

.flip-card-front {
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.skillsiknow:hover .flip-card-front {
  border-color: var(--accent-cyan);
}

.flip-card-front img,
.flip-card-front i.devicon {
  width: 52px;
  height: 52px;
  font-size: 50px;
  margin-bottom: 8px;
  object-fit: contain;
}

.flip-card-front span.skill-name {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
}

.flip-card-back {
  background: #0f172a;
  border: 1px solid var(--accent-coral);
  transform: rotateY(180deg);
  box-shadow: 0 6px 20px rgba(255, 83, 112, 0.3);
}

.flip-card-back span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.35;
}

.flip-card-back small {
  display: block;
  font-size: 0.65rem;
  color: var(--accent-cyan);
  margin-top: 6px;
}

/* ==========================================================================
   Certifications, Honors & Education Section
   ========================================================================== */
.recognition-section {
  background: radial-gradient(circle at 10% 50%, #0d121f 0%, #06090e 100%);
  padding: 4rem 0;
}

.recognition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  max-width: 1040px;
  margin: 0 auto;
}

.recognition-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.75rem;
  text-align: left;
  position: relative;
  transition: all 0.3s ease;
}

.recognition-card:hover {
  border-color: rgba(255, 83, 112, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 83, 112, 0.1);
  transform: translateY(-3px);
}

.recog-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.25rem;
}

.recog-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 83, 112, 0.12);
  border: 1px solid rgba(255, 83, 112, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-coral);
  font-size: 1.3rem;
}

.recog-icon-box.cyan {
  background: rgba(0, 242, 254, 0.12);
  border-color: rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
}

.recog-icon-box.amber {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--accent-amber);
}

.recog-category-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.recog-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.recog-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.recog-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.recog-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f1f5f9;
}

.recog-item-sub {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.recog-year {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.projects-section {
  background: #090d16;
  padding: 4rem 0;
}

.content-slide {
  max-width: 960px;
  margin: 0 auto;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 2rem;
  text-align: left;
}

.project-card h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.5rem 0;
}

.project-card p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.project-frame-box {
  width: 100%;
  height: 420px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
}

.project-frame-box iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.images-container {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-height: 420px;
  background: #000;
}

.slide-image {
  display: none;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.slide-image.active {
  display: block;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contactme {
  background: radial-gradient(circle at 50% 100%, #151c2e 0%, #07090e 100%);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border-color);
}

.contact-card {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.contact-card h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1rem;
}

.contact-card p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: #ffffff;
  font-size: 1.4rem;
  transition: all 0.25s ease;
}

.social-btn:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 242, 254, 0.25);
}

.contact-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.25s ease;
}

.contact-quick-pill:hover {
  border-color: var(--accent-coral);
  color: #ffffff;
}

.footer-copy {
  margin-top: 3rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ==========================================================================
   Spotlight Projects / "My Works" Section Styling
   ========================================================================== */
#projects-section .tech-container {
  max-width: 1560px;
  width: 94%;
  padding: 3rem 1.5rem;
}

.spotlight-projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.25rem;
  margin-top: 2.25rem;
  text-align: left;
}

.project-spotlight-card {
  background: rgba(13, 18, 32, 0.78);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.project-spotlight-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-spotlight-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 28px rgba(0, 242, 254, 0.15);
}

.project-spotlight-card:hover::before {
  opacity: 1;
}

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

.project-badge-tech {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.project-ext-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.project-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.project-icon-link:hover {
  color: #ffffff;
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.15);
  transform: translateY(-2px);
}

.project-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.4rem 0;
  letter-spacing: -0.01em;
}

.project-tagline {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--accent-cyan);
  margin-bottom: 1.15rem;
  font-weight: 500;
  line-height: 1.45;
}

.project-desc {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #94a3b8;
  margin-bottom: 1.35rem;
}

.project-feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(10, 13, 20, 0.65);
  border-radius: 10px;
  border-left: 3px solid var(--accent-cyan);
}

.project-feature-item {
  font-size: 0.86rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  line-height: 1.45;
}

.project-feature-item i {
  color: var(--accent-cyan);
  font-size: 0.85rem;
  width: 14px;
}

.project-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  margin-bottom: 1.75rem;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.project-spotlight-card:hover .project-tag {
  border-color: rgba(0, 242, 254, 0.2);
  color: #cbd5e1;
}

.project-card-footer {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-project-preview {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.3rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(79, 172, 254, 0.25));
  border: 1px solid var(--accent-cyan);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-project-preview:hover {
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  color: #0a0d14;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.4);
  transform: translateY(-2px);
}

.btn-project-github {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.btn-project-github:hover {
  color: #ffffff;
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Modal Popup Styling for Embedded GitHub Pages
   ========================================================================== */
.modal-open-lock {
  overflow: hidden !important;
}

.repo-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.repo-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.repo-modal-dialog {
  width: 100%;
  max-width: 1240px;
  height: 88vh;
  background: #0b0f19;
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: 12px;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 242, 254, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(12px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s ease, height 0.3s ease;
}

.repo-modal-overlay.active .repo-modal-dialog {
  transform: scale(1) translateY(0);
}

.repo-modal-dialog.is-fullscreen {
  max-width: 98vw;
  height: 96vh;
}

.repo-modal-header {
  height: 52px;
  background: #0f1524;
  border-bottom: 1px solid var(--border-color);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.repo-modal-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.repo-modal-close-dot,
.repo-modal-expand-dot {
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.repo-modal-close-dot:hover,
.repo-modal-expand-dot:hover {
  opacity: 0.8;
  transform: scale(1.15);
}

.repo-modal-titles {
  display: flex;
  flex-direction: column;
}

.repo-modal-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.repo-modal-subtitle {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-cyan);
}

.repo-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-modal-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-modal-action:hover {
  color: #ffffff;
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.12);
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-modal-close:hover {
  color: var(--accent-coral);
  background: rgba(255, 83, 112, 0.12);
}

.repo-modal-address-bar {
  background: #090d16;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 6px 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.repo-modal-url-text {
  flex: 1;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.repo-modal-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  color: #10b981;
}

.repo-modal-body {
  flex: 1;
  position: relative;
  background: #000000;
  width: 100%;
  height: calc(100% - 88px);
}

.repo-modal-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0b0f19;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  z-index: 2;
}

.spinner-circle {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(0, 242, 254, 0.15);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
  to {
    transform: rotate(360deg);
  }
}

.repo-modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
  display: block;
}

/* ==========================================================================
   Responsive Rules
   ========================================================================== */
@media (max-width: 1180px) {
  /* spotlight: switch to single column on tablets and laptops for comfortable width */
  #projects-section .tech-container {
    max-width: 720px;
  }
  .spotlight-projects-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 768px) {
  .fa-bars {
    display: block !important;
  }
  .header-links {
    display: none;
  }
  .nav-header {
    padding: 0 1.25rem;
  }
  .achievements-grid {
    grid-template-columns: 1fr;
  }
  .recognition-grid {
    grid-template-columns: 1fr;
  }
  /* spotlight cards */
  .spotlight-projects-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 1.5rem;
  }
  .project-spotlight-card {
    padding: 1.25rem;
  }
  .project-card-header {
    gap: 0.5rem;
  }
  .project-card-footer {
    flex-direction: column;
    gap: 0.5rem;
  }
  .btn-project-preview,
  .btn-project-github {
    width: 100%;
    justify-content: center;
  }
  /* about */
  .about-bio-card {
    padding: 1.25rem;
  }
  .tech-container.about-container {
    padding: 1.5rem 1rem;
  }
  /* modal */
  .repo-modal-overlay {
    padding: 0;
  }
  .repo-modal-dialog {
    height: 100dvh;
    border-radius: 0;
    width: 100%;
  }
  .repo-modal-address-bar {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn-tech-primary,
  .btn-tech-secondary {
    width: 100%;
    justify-content: center;
  }
  .exp-card {
    padding: 1.25rem;
  }
  .sys-status-badge {
    display: none;
  }
  /* spotlight on very small screens */
  .project-tech-tags {
    gap: 0.3rem;
  }
  .tech-tag {
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
  }
  .project-features li {
    font-size: 0.8rem;
  }
}
/* Mobile text sizing – retain original mobile font sizes while keeping desktop sizes unchanged */
@media (max-width: 504px) {
  .hero-title {
    font-size: 2.2rem; /* same as 480px rule to avoid oversized title */
    line-height: 1.2;
    word-wrap: break-word;
    max-width: 100%;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .hero-typewriter-text {
    font-size: 1rem;
  }
  .section-title {
    font-size: 2rem;
  }
  /* ensure body text scales naturally – no change needed */
}

/* Mobile top padding to avoid hero badge being hidden under nav bar */
@media (max-width: 650px) {
  .hero-content {
    padding-top: 4rem; /* add space above hero badge */
  }
}
