/* ==========================================================================
   Emmanuval P S - Portfolio Stylesheet
   Modern, High-Performance, Glassmorphism & Responsive Design System
   ========================================================================== */

:root {
  /* Dark Theme Palette (Default) */
  --bg-primary: #0a0d14;
  --bg-secondary: #101522;
  --bg-tertiary: #161c2e;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(28, 36, 56, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(99, 102, 241, 0.35);
  --border-glow: rgba(56, 189, 248, 0.5);

  /* Brand Accents */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #818cf8;
  --primary-glow: rgba(99, 102, 241, 0.25);
  
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.25);
  
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  /* Typography Colors */
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  /* Layout & Sizing */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --container-max: 1200px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Elevation & Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.2);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-glass: rgba(0, 0, 0, 0.02);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-highlight: rgba(99, 102, 241, 0.4);
  --border-glow: rgba(99, 102, 241, 0.2);

  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #f8fafc;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
}

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

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.65;
  position: relative;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

::selection {
  background-color: var(--primary);
  color: #ffffff;
}

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

ul {
  list-style: none;
}

button, input, textarea {
  font-family: inherit;
  border: none;
  outline: none;
}

/* ==========================================================================
   Ambient Background Glows
   ========================================================================== */

.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  transition: opacity var(--transition-slow);
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4), transparent 70%);
  top: -150px;
  left: -150px;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.35), transparent 70%);
  top: 35%;
  right: -200px;
}

.glow-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent 70%);
  bottom: 5%;
  left: 10%;
}

/* ==========================================================================
   Layout & Container
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.section {
  padding: 6.5rem 0;
  position: relative;
  z-index: 1;
}

.bg-alt {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-slow), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-panel:hover {
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-glow), var(--shadow-md);
}

.highlight-border {
  border-color: var(--border-highlight);
}

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

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 0.3rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.section-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
}

.section-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
  border-radius: var(--radius-full);
  margin: 1.25rem auto 0;
}

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

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 74px;
  z-index: 1000;
  transition: background-color var(--transition-normal), backdrop-filter var(--transition-normal), border-bottom var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(248, 250, 252, 0.9);
}

.nav-container {
  max-width: var(--container-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  font-size: 1.35rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.brand-code {
  color: var(--accent-cyan);
}

.brand-accent {
  color: var(--primary-light);
}

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

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
  transition: width var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

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

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

.theme-toggle-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  border-color: var(--border-highlight);
  color: var(--accent-cyan);
  transform: rotate(15deg);
}

.sun-icon { display: none; }
.moon-icon { display: inline-block; }

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

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 22px;
  background: transparent;
  cursor: pointer;
}

.mobile-menu-btn span {
  width: 100%;
  height: 2.5px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

/* ==========================================================================
   Buttons & Interactive Elements
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #4338ca);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #3730a3);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

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

.btn-glass:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-2px);
  color: var(--primary-light);
}

.btn-outline {
  border: 1px solid var(--border-highlight);
  color: var(--primary-light);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--primary);
}

.btn-whatsapp {
  background: #25d366;
  color: #ffffff;
}

.btn-whatsapp:hover {
  background: #1eb855;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

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

.hero-section {
  padding-top: 10rem;
  padding-bottom: 4rem;
  position: relative;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
}

.pulsing-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

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

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin-bottom: 0.75rem;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 10%, #818cf8 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .gradient-text {
  background: linear-gradient(135deg, #1e1b4b 10%, #4338ca 50%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.role-wrapper {
  display: flex;
  align-items: center;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
  min-height: 2.2rem;
}

.role-static {
  color: var(--text-secondary);
}

.cursor {
  display: inline-block;
  width: 2px;
  background-color: var(--accent-cyan);
  animation: blink 1s infinite;
}

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

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

.hero-description strong {
  color: var(--text-main);
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.quick-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.quick-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.quick-link:hover {
  color: var(--primary-light);
}

/* Terminal Card in Hero */
.terminal-card {
  background: rgba(13, 17, 28, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .terminal-card {
  background: #0f172a;
  color: #f8fafc;
}

.terminal-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.85rem 1.2rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.window-controls {
  display: flex;
  gap: 6px;
}

.control {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.control.close { background: #ef4444; }
.control.minimize { background: #f59e0b; }
.control.expand { background: #10b981; }

.terminal-title {
  margin-left: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: #94a3b8;
}

.terminal-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.terminal-body {
  padding: 1.35rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
}

.token-keyword { color: #f43f5e; font-weight: 600; }
.token-type { color: #38bdf8; }
.token-prop { color: #e2e8f0; }
.token-string { color: #a7f3d0; }
.token-number { color: #fbbf24; }
.token-fn { color: #c084fc; font-weight: 600; }
.token-comment { color: #64748b; font-style: italic; }

.terminal-footer {
  background: rgba(0, 0, 0, 0.2);
  padding: 0.85rem 1.2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stat-pill {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

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

/* Metrics Bar */
.metrics-bar {
  margin-top: 5rem;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-glass);
  padding: 2.2rem 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metric-number {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  font-family: var(--font-mono);
}

.metric-plus {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-light);
  line-height: 1;
}

.metric-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

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

.about-card {
  padding: 2.5rem 2rem;
}

.about-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.15));
  border: 1px solid var(--border-highlight);
  color: var(--accent-cyan);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.about-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: var(--text-main);
}

.about-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

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

.skills-filter-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.skill-tab {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.skill-tab:hover, .skill-tab.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 15px var(--primary-glow);
}

/* ==========================================================================
   Stack-Agnostic & Logic-First Engineering Banner
   ========================================================================== */

.polyglot-logic-banner {
  margin-bottom: 2.75rem;
  padding: 2.5rem;
  border: 1px solid var(--border-highlight);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(6, 182, 212, 0.06));
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.logic-banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.logic-banner-title {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.logic-banner-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 950px;
  margin-bottom: 2rem;
}

.logic-banner-desc strong {
  color: var(--text-main);
}

.logic-pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
}

.logic-pillar {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  color: var(--accent-cyan);
}

.pillar-info strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.pillar-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

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

.skill-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 1.15rem 1.35rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 1.1rem;
  transition: all var(--transition-fast);
}

.skill-chip:hover {
  transform: translateY(-3px);
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-sm);
}

.skill-icon {
  font-size: 1.85rem;
  width: 36px;
  text-align: center;
}

.skill-info {
  display: flex;
  flex-direction: column;
}

.skill-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

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

/* ==========================================================================
   Projects Section
   ========================================================================== */

.project-filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.75rem;
}

.project-filter-btn {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.3rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.project-filter-btn:hover, .project-filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 15px var(--primary-glow);
}

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

.project-card {
  display: flex;
  flex-direction: column;
  padding: 2.2rem;
  height: 100%;
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 0.95rem;
}

.project-badge {
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
}

.saas-badge {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.enterprise-badge {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.ai-badge {
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.project-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 0.45rem;
}

.project-company {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.15rem;
  width: fit-content;
}

.project-company i {
  font-size: 0.8rem;
  opacity: 0.85;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.project-features {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.feature-item {
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.feature-item i {
  color: var(--accent-emerald);
  margin-top: 0.25rem;
  font-size: 0.75rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

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

/* ==========================================================================
   Architecture Flow Section
   ========================================================================== */

.architecture-diagram-container {
  padding: 3rem 2.5rem;
}

.diagram-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 3.5rem;
  overflow-x: auto;
  padding: 1rem 0;
}

.flow-card {
  flex: 1;
  min-width: 170px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.flow-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
}

.flow-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin: 0 auto 0.85rem;
}

.flow-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

.flow-card p {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.flow-sub {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  display: block;
}

.flow-arrow {
  color: var(--primary-light);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.principle-item {
  display: flex;
  flex-direction: column;
}

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

.principle-header i {
  color: var(--accent-cyan);
  font-size: 1.15rem;
}

.principle-header h5 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.principle-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

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

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto 4rem;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent-cyan), transparent);
}

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

.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 1.5rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.timeline-content {
  padding: 2.2rem;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.timeline-badge {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
}

.timeline-badge.current {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.timeline-badge.past {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.timeline-badge.entry {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.timeline-date, .timeline-location {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.timeline-role {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.timeline-company {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 1.25rem;
}

.timeline-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.timeline-bullets li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  position: relative;
  padding-left: 1.25rem;
}

.timeline-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary-light);
}

.timeline-bullets li strong {
  color: var(--text-main);
}

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

.timeline-tags span {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

/* ==========================================================================
   Education & Languages Section
   ========================================================================== */

.credentials-container {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.credential-block {
  display: flex;
  flex-direction: column;
}

.sub-heading {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sub-heading i {
  color: var(--accent-cyan);
}

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

.edu-card {
  padding: 1.85rem 2rem;
  display: flex;
  gap: 1.35rem;
  align-items: center;
  height: 100%;
}

.edu-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.edu-details {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.edu-top-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.edu-degree {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
}

.edu-year {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

.edu-school {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0;
}

/* Languages Grid */
.languages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.lang-card {
  padding: 1.75rem 1.4rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.lang-header {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.lang-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.lang-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  width: fit-content;
}

.lang-badge.fluent {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.lang-badge.native {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.lang-badge.working {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.lang-badge.conversational {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.lang-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.95rem;
}

[data-theme="light"] .lang-progress-bar {
  background: rgba(0, 0, 0, 0.08);
}

.lang-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
}

.fluent-fill {
  width: 95%;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
}

.native-fill {
  width: 100%;
  background: linear-gradient(90deg, #10b981, #06b6d4);
}

.working-fill {
  width: 85%;
  background: linear-gradient(90deg, #a78bfa, #818cf8);
}

.conversational-fill {
  width: 75%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.lang-desc {
  font-size: 0.835rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Light Theme High-Contrast Overrides */
[data-theme="light"] .edu-card,
[data-theme="light"] .lang-card,
[data-theme="light"] .polyglot-logic-banner {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .edu-degree,
[data-theme="light"] .lang-name,
[data-theme="light"] .logic-banner-title {
  color: #0f172a;
}

[data-theme="light"] .edu-school {
  color: #334155;
}

[data-theme="light"] .lang-desc,
[data-theme="light"] .logic-banner-desc {
  color: #475569;
}

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

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

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

.contact-info-card {
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.contact-icon {
  font-size: 1.4rem;
  color: var(--primary-light);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-details {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

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

.contact-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.copy-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.status-pill-sm {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.social-links-card {
  padding: 1.5rem 1.75rem;
}

.social-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 1rem;
}

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

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.social-btn.linkedin:hover {
  background: #0a66c2;
  border-color: #0a66c2;
  color: #ffffff;
}

.social-btn.github:hover {
  background: #24292e;
  border-color: #24292e;
  color: #ffffff;
}

.social-btn.cv:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

/* Contact Form */
.contact-form-wrapper {
  padding: 2.5rem;
}

.form-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.form-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}

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

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

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

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon i {
  position: absolute;
  left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.input-with-icon input,
.contact-form textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  padding: 0.85rem 1.1rem;
  transition: all var(--transition-fast);
}

.input-with-icon input {
  padding-left: 2.85rem;
}

.input-with-icon input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-tertiary);
}

.contact-form textarea {
  resize: vertical;
  min-height: 110px;
}

.form-feedback {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

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

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

.hidden { display: none !important; }

/* ==========================================================================
   Project Modal Component
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 8, 15, 0.8);
  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 var(--transition-normal);
  padding: 1.5rem;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 2.5rem;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.modal-backdrop.open .modal-dialog {
  transform: scale(1);
}

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

.modal-close-btn:hover {
  background: var(--accent-rose);
  color: #ffffff;
  border-color: var(--accent-rose);
}

/* Modal Content Styles */
.modal-header-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.modal-proj-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 0.45rem;
}

.modal-company {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  width: fit-content;
}

.modal-company i {
  font-size: 0.82rem;
  opacity: 0.85;
}

.modal-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 1.5rem;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-section-title i {
  color: var(--accent-cyan);
}

.modal-body p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.98rem;
}

.modal-highlights-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0.75rem 0;
}

.modal-highlights-list li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.modal-highlights-list li i {
  color: var(--accent-emerald);
  margin-top: 0.3rem;
  font-size: 0.85rem;
}

.modal-tech-box {
  margin-top: 1.75rem;
  padding: 1.25rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.modal-tech-box span {
  display: inline-block;
  margin-right: 0.45rem;
  margin-bottom: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */

.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #10b981;
  color: #ffffff;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.35);
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-normal);
  z-index: 3000;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

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

.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 4.5rem 0 3rem;
  background: var(--bg-primary);
  position: relative;
  z-index: 1;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.footer-copy {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 320px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

.footer-nav a:hover {
  color: var(--primary-light);
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}

.footer-socials {
  display: flex;
  gap: 0.85rem;
}

.footer-socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.footer-socials a:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

.copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

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

  .languages-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .diagram-flow {
    flex-wrap: wrap;
    justify-content: center;
  }

  .flow-arrow {
    display: none;
  }

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

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

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }

  .footer-right {
    grid-column: span 2;
    align-items: flex-start;
  }
}

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

  .languages-grid {
    grid-template-columns: 1fr;
  }

  .polyglot-logic-banner {
    padding: 1.75rem 1.4rem;
  }
  .nav-links {
    position: fixed;
    top: 74px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    transform: translateY(-150%);
    transition: transform var(--transition-normal);
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .mobile-menu-btn {
    display: flex;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .timeline {
    padding-left: 2rem;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-right {
    grid-column: span 1;
  }
}

@media (max-width: 480px) {
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

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

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

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

  .terminal-body {
    font-size: 0.78rem;
    padding: 1rem;
  }
}
