/* ==========================================================================
   1. CORE STYLE SYSTEM & VARIABLES
   ========================================================================== */
:root {
  --bg: #0b0e17;
  --surface: rgba(18, 24, 41, 0.75);
  --surface-hover: rgba(25, 33, 56, 0.9);
  --surface-2: #141c30;
  
  --text: #f8fafc; 
  --text-muted: #94a3b8; 
  --text-light: #64748b; 
  
  --primary: #245cfd; 
  --secondary: #ff5c35;
  --header-bg: rgba(11, 14, 23, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(36, 92, 253, 0.35);
  
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(0, 0, 0, 0.5);
  
  --img-bg: #151e33;
  --radius-lg: 12px; 
  --radius-md: 8px;
  
  --font-sans: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --spring: cubic-bezier(0.16, 1, 0.3, 1);
  --smooth: cubic-bezier(0.4, 0, 0.2, 1);

  --chat-bg: #141c30;         
  --chat-border: #212c47;     
  --chat-text: #f8fafc;       
  --chat-input-bg: #0b0e17;   
  --chat-primary: #245cfd; 
}

[data-theme="light"] {
  --bg: #f4f6fa; 
  --surface: rgba(255, 255, 255, 0.9);
  --surface-hover: rgba(255, 255, 255, 1);
  --surface-2: #ffffff;
  
  --text: #111827; 
  --text-muted: #4b5563; 
  --text-light: #9ca3af;
  
  --primary: #245cfd;
  --secondary: #ff5c35;
  --header-bg: rgba(244, 246, 250, 0.85);
  --border: #e2e8f0;
  --border-hover: rgba(36, 92, 253, 0.4);
  
  --shadow: rgba(17, 24, 39, 0.04);
  --shadow-hover: rgba(17, 24, 39, 0.09);
  --img-bg: #f8fafc; 

  --chat-bg: #ffffff;         
  --chat-border: #e2e8f0;     
  --chat-text: #111827;       
  --chat-input-bg: #f8fafc;   
  --chat-primary: #245cfd; 
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  min-height: 100vh; 
  transition: background 0.2s ease, color 0.2s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.mesh-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: -2;
  pointer-events: none;
}

.ambient-glow {
  position: fixed; border-radius: 50%; filter: blur(160px); z-index: -1;
  animation: pulseGlow 12s infinite alternate ease-in-out;
}
.glow-1 { width: 600px; height: 600px; background: #1e40af; left: -180px; top: -180px; opacity: 0.15; }
.glow-2 { width: 600px; height: 600px; background: #0369a1; right: -180px; bottom: -180px; opacity: 0.12; }
.glow-3 { width: 400px; height: 400px; background: #1d4ed8; left: 40%; top: 30%; opacity: 0.05; }

@keyframes pulseGlow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.12; }
  100% { transform: scale(1.1) translate(30px, 30px); opacity: 0.18; }
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
.topbar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 16px 40px; background: var(--header-bg); border-bottom: 1px solid var(--border);
  position: fixed; top: 0; left: 0; width: 100%; z-index: 9999; box-sizing: border-box;
  -webkit-transform: translate3d(0,0,0);
  transform: translate3d(0,0,0);
}

@supports (backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px)) {
  .topbar {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
}

.left-section { display: flex; align-items: center; justify-content: flex-start; gap: 12px; }
.brand { font-family: var(--font-sans); font-size: 16px; font-weight: 800; letter-spacing: -0.02em; text-transform: uppercase; }
.brand-accent { color: var(--text-muted); } 
.brand-dot { color: var(--primary); }

.tabs {
  display: flex; gap: 6px; background: var(--surface-2); padding: 5px;
  border-radius: 30px; border: 1px solid var(--border);
  -webkit-transform: translate3d(0,0,0);
  transform: translate3d(0,0,0);
}

@supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
  .tabs {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

.tabs button {
  background: transparent; border: none; color: var(--text-muted); font-size: 13px;
  font-weight: 600; cursor: pointer; padding: 8px 20px; border-radius: 20px;
  transition: all 0.25s var(--smooth); font-family: var(--font-sans);
}
.tabs button:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
[data-theme="light"] .tabs button:hover { background: rgba(0, 0, 0, 0.03); }

.tabs button.active { 
  background: var(--primary); color: #ffffff; 
  font-weight: 700; box-shadow: 0 4px 14px rgba(36, 92, 253, 0.35); border-color: transparent;
}
.right-section { display: flex; justify-content: flex-end; align-items: center; }

/* ==========================================================================
   3. PORTFOLIO CARDS & THEMED ANIMATIONS
   ========================================================================== */
.container { width: 100%; max-width: 1300px; margin: 0 auto; padding: 110px 24px 60px 24px; }
.tab { display: none; opacity: 0; }
.tab.active { display: block; animation: tabFadeIn 0.25s var(--smooth) forwards; }
@keyframes tabFadeIn { from { opacity: 0; transform: translate3d(0, 8px, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }

.reveal { 
  opacity: 0; 
  transform: translate3d(0, 15px, 0); 
  transition: opacity 0.4s var(--smooth), transform 0.4s var(--smooth); 
  will-change: opacity, transform; 
}
.reveal.visible { opacity: 1; transform: translate3d(0,0,0); }

.glass {
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px var(--shadow); transition: transform 0.3s var(--smooth), border-color 0.3s ease, box-shadow 0.3s ease;
  -webkit-transform: translate3d(0,0,0);
  transform: translate3d(0,0,0);
}

@supports (backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px)) {
  .glass {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
}

.card, .research-card, .pub-card, .about-block, .download-card { padding: 28px; margin-bottom: 24px; }
.card:hover, .research-card:hover, .pub-card:hover, .about-block:hover, .download-card:hover {
  transform: translate3d(0, -4px, 0); border-color: var(--border-hover); box-shadow: 0 16px 36px var(--shadow-hover);
}

h1 { 
  font-size: 32px; font-weight: 900; letter-spacing: -0.02em; margin-top: 0; margin-bottom: 32px; 
  background: linear-gradient(135deg, var(--text), var(--primary)); 
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block;
}

.card h3 {
  font-size: 1.4rem; font-weight: 800; margin-top: 0; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block;
}

/* Hero Section */
.hero { min-height: 28vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 20px 20px 10px 20px; }
.hero-badge { padding: 6px 16px; border-radius: 20px; background: rgba(36, 92, 253, 0.1); border: 1px solid rgba(36, 92, 253, 0.25); color: #60a5fa; font-size: 13px; font-weight: 700; margin-bottom: 16px; display: inline-block; }
[data-theme="light"] .hero-badge { color: var(--primary); }

.hero-title { font-size: clamp(3rem, 8vw, 5rem); font-weight: 900; line-height: 1.15; letter-spacing: -0.03em; margin: 0; background: linear-gradient(135deg, var(--text), var(--primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block; }
.hero-subtitle { max-width: 700px; font-size: 1.15rem; line-height: 1.6; color: var(--text-muted); margin: 18px auto 24px; }

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;}
.hero-buttons button { padding: 14px 28px; border: none; border-radius: 30px; cursor: pointer; font-weight: 700; font-size: 14px; transition: all 0.3s var(--spring); }
.hero-buttons button:first-child { background: var(--primary); color: #ffffff; box-shadow: 0 4px 14px rgba(36, 92, 253, 0.3); }
.hero-buttons button:last-child { background: var(--secondary); color: #ffffff; box-shadow: 0 4px 14px rgba(255, 92, 53, 0.3); }
.hero-buttons button:hover { transform: scale(1.03); }

/* Academic Grid */
.about-section { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 32px 0; }
.about-block h3 { font-size: 15px; margin-top: 0; margin-bottom: 8px; font-weight: 800; background: none; -webkit-text-fill-color: var(--text); color: var(--text); }
.about-block img { width: 100%; height: 140px; object-fit: contain; background: var(--img-bg); border-radius: var(--radius-md); margin-bottom: 16px; border: 1px solid var(--border); }

/* Research & Publications */
.research-text h2 { font-size: 20px; font-weight: 800; margin-top: 0; margin-bottom: 12px; }
.research-meta { margin-top: 20px; font-size: 12px; color: var(--text-light); display: flex; gap: 12px; align-items: center; }
.research-meta a, .pub-link { background: rgba(36, 92, 253, 0.1); border: 1px solid rgba(36, 92, 253, 0.25); color: #60a5fa; padding: 6px 14px; border-radius: var(--radius-md); font-weight: 600; text-decoration: none; transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 6px; }
[data-theme="light"] .research-meta a, [data-theme="light"] .pub-link { color: var(--primary); }
.research-meta a:hover, .pub-link:hover { background: var(--primary); color: #ffffff; box-shadow: 0 4px 12px rgba(36, 92, 253, 0.3); }
.research-image { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.research-image img { width: 100%; max-height: 300px; object-fit: contain; border-radius: var(--radius-md); background: var(--img-bg); padding: 8px; border: 1px solid var(--border); cursor: zoom-in; transition: transform 0.4s var(--spring); }
.research-image img:hover { transform: scale(1.03); }

.read-btn, .read-more-btn { background: transparent; border: none; color: #60a5fa; font-weight: 700; cursor: pointer; padding: 0; margin-top: 8px; font-family: var(--font-sans); transition: color 0.2s ease; }
[data-theme="light"] .read-btn, [data-theme="light"] .read-more-btn { color: var(--primary); }
.read-btn:hover, .read-more-btn:hover { color: var(--secondary); }

.pub-list { display: flex; flex-direction: column; gap: 24px; }
.pub-year { display: inline-block; background: rgba(36, 92, 253, 0.1); border: 1px solid rgba(36, 92, 253, 0.25); color: #60a5fa; font-size: 12px; font-weight: 800; padding: 6px 14px; border-radius: 20px; margin-bottom: 12px; }
[data-theme="light"] .pub-year { color: var(--primary); }
.pub-title { font-size: 18px; font-weight: 800; margin-top: 0; margin-bottom: 8px; }
.pub-authors { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.pub-meta { font-size: 13px; color: var(--text-light); margin-bottom: 16px; }
.pub-bottom { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-top: 20px; border-top: 1px solid var(--border); padding-top: 20px; }
.pub-box { background: var(--surface-2); padding: 20px; border-radius: var(--radius-md); border: 1px solid var(--border); }
.pub-toc-box { background: transparent; border: 1px dashed rgba(36, 92, 253, 0.3); }
.pub-box h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; color: #60a5fa; font-weight: 800; }
[data-theme="light"] .pub-box h4 { color: var(--primary); }
.abstract-text { font-size: 13.5px; line-height: 1.6; }
.abstract-text.collapsed { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.toc-image { display: flex; align-items: center; justify-content: center; background: #ffffff; border-radius: var(--radius-md); padding: 8px; border: 1px solid var(--border); }
.toc-img { width: 100%; max-height: 140px; object-fit: contain; cursor: zoom-in; }

/* Gallery & Downloads Grid */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.gallery img { width: 100%; aspect-ratio: 1 / 1; border-radius: var(--radius-md); object-fit: cover; background: var(--img-bg); cursor: zoom-in; border: 1px solid var(--border); transition: transform 0.4s var(--spring); }
.gallery img:hover { transform: scale(1.05); border-color: var(--primary); }

.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 24px; }
.download-card { text-align: center; display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--text); }
.download-card .icon { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; background: rgba(36, 92, 253, 0.1); border-radius: 50%; margin: 0 auto 16px auto; color: #60a5fa; border: 1px solid rgba(36, 92, 253, 0.25); transition: all 0.3s ease; flex-shrink: 0; }
[data-theme="light"] .download-card .icon { color: var(--primary); }
.download-card:hover .icon { background: var(--primary); color: #ffffff; box-shadow: 0 4px 12px rgba(36, 92, 253, 0.4); }
.download-card h3 { margin: 0 0 6px 0; font-size: 16px; font-weight: 800; background: none; -webkit-text-fill-color: var(--text); color: var(--text); }
.download-card p { margin: 0; font-size: 13px; color: var(--text-muted); }

/* ==========================================================================
   DROPDOWN MENU SYSTEM
   ========================================================================== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 20px;
  border-radius: 20px;
  transition: all 0.25s var(--smooth);
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dropdown-trigger .chevron {
  font-size: 8px;
  transition: transform 0.2s var(--smooth);
}

.dropdown:hover .dropdown-trigger {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.dropdown:hover .dropdown-trigger .chevron {
  transform: rotate(180deg);
}

/* Glass Dropdown Overlay Panel */
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  min-width: 180px;
  border-radius: var(--radius-lg);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s var(--smooth), transform 0.25s var(--smooth), visibility 0.25s;
  z-index: 10000;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  text-align: left;
  padding: 10px 16px;
  width: 100%;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropdown-menu button:hover {
  background: var(--primary);
  color: #ffffff;
}

[data-theme="light"] .dropdown-menu button:hover {
  color: #000000; 
}

/* ==========================================================================
   TUTORIALS & OPEN POSITIONS COMPONENT STYLES
   ========================================================================== */
.section-header {
  margin-bottom: 32px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: -20px;
  margin-bottom: 30px;
}

/* Grid Layout for Tutorials */
.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.tutorial-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tutorial-badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(36, 92, 253, 0.1);
  border: 1px solid rgba(36, 92, 253, 0.25);
  color: #60a5fa;
  font-size: 11px;
  font-weight: 700;
  border-radius: 12px;
  margin-bottom: 12px;
}

[data-theme="light"] .tutorial-badge {
  color: var(--primary);
}

.tutorial-card h3 {
  margin: 0 0 12px 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.tutorial-card p {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Open Positions Component */
#jobs-container {
  padding-left: 20px;
  padding-right: 20px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.job-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px; 
  border-radius: var(--radius-lg);
}

.job-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;         
  min-width: 0;  
}

.job-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.job-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
}

.job-status-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 700;
}

.job-status-badge.open {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.job-status-badge.close {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.job-meta-row {
  display: flex;
  gap: 16px;
  color: var(--text-light);
  font-size: 12px;
  flex-wrap: wrap; 
}

.job-description {
  color: var(--text-muted);
  font-size: 13.5px;
  margin: 8px 0 0 0;
  word-wrap: break-word; 
}

/* Keywords Style Elements */
.job-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.job-keyword-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text-muted);
}

[data-theme="light"] .job-keyword-badge {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-muted);
}

.job-action button {
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s var(--spring);
}

.job-action button:hover {
  transform: translateY(-2px);
}

/* Responsiveness adjustments for mobile screens */
@media (max-width: 768px) {
  .job-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
  }
  
  .job-action {
    width: 100%;
  }
  
  .job-action button {
    width: 100%;
    text-align: center;
  }
}

/* ==========================================================================
   4. MDTRANSPORT NATIVE GUI & TERMINAL
   ========================================================================== */
#mdtransport-app {
  --mdt-bg: #0b0e17;
  --mdt-card: #141c30; 
  --mdt-text: #f8fafc; 
  --mdt-text-muted: #94a3b8;
  --mdt-text-invert: #0b0e17;
  
  --mdt-primary: #245cfd; 
  --mdt-primary-hover: #1d4ed8;
  --mdt-input-focus: rgba(36, 92, 253, 0.25);
  
  --mdt-border: #212c47;
  --mdt-input-bg: #0b0e17;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--mdt-text); 
  width: 100%;
  line-height: 1.5;
}

[data-theme='light'] #mdtransport-app {
  --mdt-bg: #f4f6fa;
  --mdt-card: #ffffff;
  --mdt-text: #111827;
  --mdt-text-muted: #4b5563; 
  --mdt-text-invert: #ffffff;
  --mdt-border: #e2e8f0;    
  --mdt-input-bg: #f8fafc;   
  --mdt-input-focus: rgba(36, 92, 253, 0.15);
}

#mdtransport-app #mdt-main-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem) !important; font-weight: 900 !important;
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  -webkit-background-clip: text !important; -webkit-text-fill-color: transparent !important;
  letter-spacing: -0.02em; text-align: center; margin-top: 10px; margin-bottom: 40px; display: block;
}

#mdtransport-app input::placeholder { color: var(--mdt-text-muted); opacity: 0.7; }

#mdtransport-app input, #mdtransport-app select { 
  padding: 8px 10px; margin: 4px 0 8px 0; border-radius: var(--radius-md); 
  border: 1px solid var(--mdt-border); background: var(--mdt-input-bg); 
  color: var(--mdt-text); width: 100%; box-sizing: border-box; 
  font-family: inherit; font-size: 0.9rem; transition: all 0.2s ease;
}

/* Safari Dropdown select layout alignment styling rules */
#mdtransport-app select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-sizing: border-box;
  padding: 8px 30px 8px 10px !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 14px !important;
  height: 38px !important;
}

#mdtransport-app select option { background: var(--mdt-card); color: var(--mdt-text); }

#mdtransport-app h2, #mdtransport-app h3, #mdtransport-app h4, 
#mdtransport-app p, #mdtransport-app label, #mdtransport-app li, 
#mdtransport-app span:not(#mdt-terminal-container span):not(.terminal-title) { 
  color: var(--mdt-text) !important; 
}

#mdtransport-app .hidden, #mdtransport-app .hidden * { display: none !important; }

/* CSS Fade for Tab Switching using translate3d for accelerated composition */
.tab.active { display: block; animation: tabFadeIn 0.18s ease-out forwards; }

#mdtransport-app nav.mdt-nav { 
  background: var(--mdt-input-bg); 
  padding: 5px; 
  margin: 0 auto 30px auto; 
  display: flex; 
  flex-direction: row; 
  gap: 4px; 
  justify-content: center; 
  flex-wrap: wrap; 
  border-radius: 24px; 
  border: 1px solid var(--mdt-border); 
  width: 100%; 
  max-width: 1000px;
}

#mdtransport-app nav.mdt-nav a { 
  flex: 1 1 120px; 
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--mdt-text-muted); 
  text-decoration: none; 
  cursor: pointer; 
  font-size: 0.85rem; 
  padding: 10px 8px; 
  border-radius: 20px; 
  border: none;
  transition: all 0.15s ease; 
  font-weight: 500;
  white-space: nowrap;
}

#mdtransport-app nav.mdt-nav a:hover { 
  color: var(--mdt-text); 
  background: rgba(255, 255, 255, 0.05); 
}

[data-theme='light'] #mdtransport-app nav.mdt-nav a:hover { 
  background: rgba(0, 0, 0, 0.03); 
}

#mdtransport-app nav.mdt-nav a.active { 
  background: var(--mdt-primary) !important; 
  color: #ffffff !important; 
  font-weight: 700; 
  border-color: transparent !important; 
  box-shadow: 0 4px 12px rgba(36, 92, 253, 0.3) !important; 
}

#mdtransport-app .mdt-container { width: 100%; padding-bottom: 40px;}
#mdtransport-app .mdt-content-wrapper { width: 100%; margin: 0 auto; max-width: 100%; } 

#mdtransport-app .mdt-card { 
  background: var(--mdt-card); padding: 30px; border-radius: var(--radius-lg); 
  border: 1px solid var(--mdt-border); margin-bottom: 25px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}
#mdtransport-app .mdt-card h2, #mdtransport-app .mdt-card h3 { 
  margin-top: 0; margin-bottom: 16px; font-size: 1.35rem; font-weight: 600; letter-spacing: -0.025em; background: none; -webkit-text-fill-color: var(--mdt-text);
}

#mdtransport-app .mdt-cfg-section .mdt-grid-3, #mdtransport-app .mdt-cfg-section .mdt-grid-2 { row-gap: 8px; column-gap: 16px; }
#mdtransport-app input:focus, #mdtransport-app select:focus { outline: none; border-color: var(--mdt-primary); box-shadow: 0 0 0 3px var(--mdt-input-focus); }

#mdtransport-app button.mdt-btn { 
  padding: 12px 18px; margin: 8px 0; border-radius: var(--radius-md); background: var(--mdt-primary); 
  color: white !important; cursor: pointer; font-weight: 600; border: none; 
  transition: all 0.2s ease; width: 100%; font-family: inherit; font-size: 0.9rem;
  letter-spacing: 0.01em; box-shadow: 0 4px 6px -1px rgba(36, 92, 253, 0.25);
}
#mdtransport-app button.mdt-btn:hover { background: var(--mdt-primary-hover); transform: translate3d(0, -1px, 0); }
#mdtransport-app button.mdt-btn:active { transform: translate3d(0, 0, 0); }
#mdtransport-app button.mdt-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

#mdtransport-app button.mdt-btn-secondary { background: var(--mdt-border); color: var(--mdt-text) !important; border: 1px solid var(--mdt-border); box-shadow: none; }
#mdtransport-app button.mdt-btn-secondary:hover { background: var(--mdt-input-bg); }

#mdtransport-app button.mdt-btn-danger,
#mdtransport-app button[style*="red"],
#mdtransport-app button[style*="rgb(239, 68, 68)"],
#mdtransport-app button[style*="#ef4444"],
#mdtransport-app button[style*="#dc2626"] {
  background: var(--mdt-primary) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(36, 92, 253, 0.3) !important;
}
#mdtransport-app button.mdt-btn-danger:hover,
#mdtransport-app button[style*="red"]:hover,
#mdtransport-app button[style*="#ef4444"]:hover {
  background: var(--mdt-primary-hover) !important;
  transform: translate3d(0, -2px, 0);
}

#mdtransport-app .mdt-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
#mdtransport-app .mdt-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
#mdtransport-app .mdt-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
#mdtransport-app .mdt-grid-analysis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
#mdt-cfg-tasks { margin-left: 0; }

#mdtransport-app .mdt-grid-2 > *,
#mdtransport-app .mdt-grid-3 > *,
#mdtransport-app .mdt-grid-4 > *,
#mdtransport-app .mdt-grid-analysis > *,
#mdtransport-app .mdt-dashboard > * {
  min-width: 0;
}

#mdtransport-app .mdt-dashboard { display: grid; grid-template-columns: 320px 1fr; gap: 30px; }
@media (max-width: 900px) { #mdtransport-app .mdt-dashboard { grid-template-columns: 1fr; } }

#mdtransport-app .mdt-st-tabs { display: flex; flex-direction: row; border-bottom: 2px solid var(--mdt-border); margin-bottom: 25px; gap: 25px; overflow: visible; }
@media (max-width: 768px) { #mdtransport-app .mdt-st-tabs { justify-content: flex-start; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; -ms-overflow-style: none; } #mdtransport-app .mdt-st-tabs::-webkit-scrollbar { display: none; } }
#mdtransport-app .mdt-st-tab { padding: 12px 4px; cursor: pointer; color: var(--mdt-text-muted); font-weight: 600; font-size: 0.9rem; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s ease; }
#mdtransport-app .mdt-st-tab:hover { color: var(--mdt-text); }
#mdtransport-app .mdt-st-tab.active { color: var(--mdt-primary); border-bottom-color: var(--mdt-primary); }

#mdtransport-app .mdt-cfg-section { position: relative; z-index: 5; padding-top: 5px; }
#mdtransport-app .mdt-task-cb { transform: scale(1.0); margin-right: 8px; cursor: pointer; width: 15px !important; height: 15px !important; accent-color: var(--mdt-primary); }
#mdtransport-app .mdt-task-label { font-size: 0.9rem; cursor: pointer; display: inline-flex; align-items: center; margin-bottom: 0px; padding: 5px 10px; border-radius: 6px; background: var(--mdt-input-bg); border: 1px solid var(--mdt-border); transition: all 0.2s ease; }
#mdtransport-app .mdt-task-label:hover { border-color: var(--mdt-primary); }

#mdtransport-app .mdt-timer-box { font-size: 26px; font-weight: 700; color: var(--mdt-primary); font-family: 'JetBrains Mono', monospace; text-align: center; border: 1px solid var(--mdt-border); background: var(--mdt-input-bg); padding: 10px; border-radius: 8px; margin-bottom: 20px; }
#mdtransport-app .mdt-workspace-item { background: var(--mdt-input-bg); padding: 12px 14px; margin-bottom: 8px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; border: 1px solid var(--mdt-border); }
#mdtransport-app .mdt-workspace-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 10px; flex-grow: 1; }

.terminal-window-wrapper { 
  border: 1px solid var(--mdt-border); 
  border-radius: var(--radius-lg); 
  overflow: hidden; 
  margin-top: 15px; 
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15); 
  background: #0b0d14 !important;
}
.terminal-title-bar { background: #12151f; border-bottom: 1px solid var(--mdt-border); padding: 10px 15px; display: flex; align-items: center; 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: #94a3b8 !important; 
  font-family: 'JetBrains Mono', monospace; 
  font-size: 11px; 
  margin-left: 10px; 
  flex-grow: 1; 
  display: inline-block;
}

#mdtransport-app #mdt-terminal-container { 
  height: 520px; 
  background: #0b0d14 !important; 
  padding: 12px; 
  border: none; 
  border-radius: 0; 
  margin-top: 0; 
  box-sizing: border-box;
}

#mdtransport-app .mdt-info-box { background: rgba(36, 92, 253, 0.08); border-left: 4px solid var(--primary); color: var(--mdt-text); padding: 15px; margin-bottom: 20px; border-radius: 6px; font-size: 0.9rem; }
#mdtransport-app .mdt-success-box { background: rgba(34, 197, 94, 0.08); border-left: 4px solid #22c55e; color: var(--mdt-text); padding: 15px; margin-bottom: 20px; border-radius: 6px; font-size: 0.9rem; }
#mdtransport-app .mdt-warning-box { background: rgba(245, 158, 11, 0.08); border-left: 4px solid #f59e0b; color: var(--mdt-text); padding: 15px; margin-bottom: 20px; border-radius: 6px; font-size: 0.9rem; }

#mdtransport-app .mdt-doc-tabs { display: flex; flex-direction: row; border-bottom: 1px solid var(--mdt-border); margin-bottom: 25px; gap: 8px; flex-wrap: wrap; }
#mdtransport-app .mdt-doc-tab { padding: 10px 18px; cursor: pointer; background: rgba(255, 255, 255, 0.03); border-radius: 8px 8px 0 0; border: 1px solid var(--mdt-border); border-bottom: none; color: var(--mdt-text-muted) !important; font-size: 0.9rem; font-weight: 500; transition: all 0.2s ease; }
[data-theme='light'] #mdtransport-app .mdt-doc-tab { background: rgba(0, 0, 0, 0.02); }

#mdtransport-app .mdt-doc-tab.active, [data-theme='light'] #mdtransport-app .mdt-doc-tab.active { 
  background: var(--mdt-primary) !important; 
  font-weight: 700; color: #ffffff !important; border-color: transparent !important; 
}
#mdtransport-app .mdt-doc-content { line-height: 1.6; }
#mdtransport-app pre { background: #0b0e17 !important; padding: 15px; border-radius: var(--radius-md); border: 1px solid var(--mdt-border); overflow-x: auto; margin-top: 8px; margin-bottom: 20px; }
#mdtransport-app code { color: #60a5fa !important; font-family: 'JetBrains Mono', monospace !important; font-size: 0.85rem !important; white-space: pre-wrap; background: transparent; }

/* ==========================================================================
   5. FLOATING CHATBOT WIDGETS
   ========================================================================== */
#chatbot-toggle {
  position: fixed; bottom: 25px; right: 25px; 
  background: var(--primary) !important; 
  color: #ffffff !important; border: none; border-radius: 50%; width: 56px; height: 56px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(36, 92, 253, 0.4); font-size: 24px; z-index: 10000;
  display: flex; align-items: center; justify-content: center; transition: transform 0.2s ease;
}
#chatbot-toggle:hover { transform: scale(1.08); }

#chatbot-window {
  display: none; position: fixed; bottom: 95px; right: 25px; width: 360px; max-width: calc(100vw - 50px);
  height: 500px; background-color: var(--chat-bg) !important; border: 1px solid var(--border) !important; 
  border-radius: var(--radius-lg); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); flex-direction: column; overflow: hidden; z-index: 10000; font-family: inherit;
}
.chatbot-header { background: var(--primary) !important; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; }
.chatbot-header h4 { margin: 0 !important; color: #ffffff !important; font-size: 1rem !important; font-weight: 800 !important; }
.chatbot-close { cursor: pointer; font-size: 1.2rem; color: #ffffff !important; font-weight: normal; }
.chatbot-messages { flex: 1; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; background-color: var(--chat-bg) !important; scroll-behavior: smooth;}
.chat-msg { padding: 10px 14px; border-radius: 12px; font-size: 0.85rem; max-width: 80%; line-height: 1.4; word-wrap: break-word; flex-shrink: 0;}

.chat-msg code { font-family: 'JetBrains Mono', monospace !important; font-size: 0.8rem !important; background-color: rgba(0, 0, 0, 0.15); padding: 2px 6px; border-radius: 4px; color: #60a5fa !important; }
[data-theme='light'] .chat-msg code { background-color: rgba(0, 0, 0, 0.05); }
.chat-msg ul { margin: 8px 0 !important; padding-left: 20px !important; }
.chat-msg li { margin-bottom: 4px; color: inherit !important; }

.chat-msg.bot { background-color: #e2e8f0 !important; color: #0f172a !important; align-self: flex-start; margin-right: auto; border: 1px solid #cbd5e1 !important; }
.chat-msg.user { background: var(--primary) !important; color: #ffffff !important; align-self: flex-end; margin-left: auto; box-shadow: 0 4px 12px rgba(36, 92, 253, 0.2); }
[data-theme='dark'] .chat-msg.bot { background-color: var(--surface) !important; color: #f8fafc !important; border: 1px solid var(--border) !important; }

.chatbot-input-area { display: flex; border-top: 1px solid var(--border); padding: 12px; background-color: var(--chat-bg) !important; }
.chatbot-input-area input { flex: 1; border: 1px solid var(--border) !important; border-radius: 20px; padding: 10px 16px; background-color: var(--chat-input-bg) !important; color: var(--chat-text) !important; outline: none; font-size: 0.9rem; margin: 0; }
.chatbot-input-area button { background: none; border: none; color: var(--primary) !important; margin-left: 10px; font-weight: 800; cursor: pointer; font-size: 1rem; }

#mdtransport-app .mdt-chat-container { border: 1px solid var(--mdt-border); border-radius: var(--radius-lg); overflow: hidden; background-color: var(--chat-bg) !important; display: flex; flex-direction: column; height: 500px; margin-top: 15px; }
#mdtransport-app .mdt-chat-messages { flex: 1; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; background-color: var(--chat-bg) !important; }
#mdtransport-app .mdt-chat-input-area { display: flex; flex-direction: row; align-items: center; border-top: 1px solid var(--mdt-border); padding: 14px; background-color: var(--chat-bg) !important; }
#mdtransport-app .mdt-chat-input-area input { flex: 1; border: 1px solid var(--mdt-border) !important; border-radius: var(--radius-md); padding: 10px 14px; background-color: var(--chat-input-bg) !important; color: var(--chat-text) !important; outline: none; font-size: 0.95rem; margin: 0; }
#mdtransport-app .mdt-chat-input-area button { background: none; border: none; color: var(--mdt-primary) !important; margin-left: 14px; font-weight: 800; cursor: pointer; font-size: 0.95rem; }

/* ==========================================================================
   6. FOOTER, MODALS & THEME TOGGLE
   ========================================================================== */
.site-footer { margin-top: auto; padding: 32px; background: var(--surface); border-top: 1px solid var(--border); text-align: center; }
.footer-icons { display: flex; justify-content: center; align-items: center; gap: 16px; margin-bottom: 16px; }
.footer-icons img { width: 24px; height: 24px; object-fit: contain; opacity: 0.6; transition: opacity 0.2s ease; }
.footer-icons img:hover { opacity: 1; }
.footer-text { font-size: 13px; color: var(--text-light); }

.theme-switch { position: relative; width: 48px; height: 26px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; padding: 0; }
.switch-thumb { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--text); transition: transform 0.3s var(--spring); }
[data-theme="dark"] .switch-thumb { transform: translate3d(22px, 0, 0); }
.sun, .moon { position: absolute; font-size: 11px; } .sun { left: 6px; } .moon { right: 6px; }

.img-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: center; z-index: 2000; cursor: zoom-out; }
.zoomed-img { max-width: 90%; max-height: 85vh; border-radius: var(--radius-lg); background: #ffffff; padding: 8px; }

/* ==========================================================================
   7. MOBILE SYSTEMS & MEDIA QUERIES
   ========================================================================== */
.menu-btn { display: none; background: transparent; border: none; color: var(--text); cursor: pointer; padding: 4px; }

.mobile-menu { 
  position: fixed; top: 0; left: -280px; width: 260px; height: 100%; 
  background: var(--bg); border-right: 1px solid var(--border); 
  padding: 24px; display: flex; flex-direction: column; gap: 8px; 
  transition: transform 0.4s var(--spring); z-index: 2000; 
  box-shadow: 4px 0 24px rgba(0,0,0,0.1); 
}

[data-theme="light"] .mobile-menu { background: #ffffff; }
[data-theme="light"] .mobile-menu button { color: #0f172a; font-weight: 700; }
[data-theme="light"] .mobile-menu-header .brand { color: #0f172a; }
[data-theme="light"] .close-menu-btn { color: #64748b; }
[data-theme="light"] .mobile-menu button:hover { background: #f1f5f9; }

.mobile-menu.open { transform: translate3d(280px, 0, 0); }
.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.close-menu-btn { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; transition: color 0.2s ease;}
.mobile-menu button { background: transparent; border: none; color: var(--text); font-size: 15px; text-align: left; padding: 12px 16px; border-radius: var(--radius-md); cursor: pointer; font-family: var(--font-sans); font-weight: 600; }
.mobile-menu button:hover { background: var(--surface-2); }
.mobile-menu button.active, [data-theme="light"] .mobile-menu button.active { background: var(--primary); color: #ffffff; }
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 1500; }
.overlay.show { opacity: 1; visibility: visible; }

@media (min-width: 901px) { 
  .research-card { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; } 
  .research-image { margin-top: 0; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } 
}

@media (max-width: 900px) { 
  .pub-bottom { grid-template-columns: 1fr; } 
  .about-section { grid-template-columns: 1fr; } 
}

@media (max-width: 768px) { 
  .topbar { display: flex; justify-content: space-between; padding: 16px 24px; } 
  .menu-btn { display: block; } 
  .desktop-tabs { display: none; } 
  .container { padding: 80px 16px 32px 16px; } 
  h1 { font-size: 24px; } 
  .hero-title { font-size: 2.5rem; } 
  
  #mdtransport-app .mdt-dashboard { grid-template-columns: 1fr !important; } 
  #mdtransport-app .mdt-grid-2,
  #mdtransport-app .mdt-grid-3,
  #mdtransport-app .mdt-grid-4 { 
    grid-template-columns: 1fr !important; 
    gap: 16px;
  }
  #mdtransport-app .mdt-grid-analysis { 
    grid-template-columns: 1fr !important; 
  }

  #mdtransport-app nav.mdt-nav {
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    padding: 6px 12px;
  }
  #mdtransport-app nav.mdt-nav::-webkit-scrollbar {
    display: none;
  }
  #mdtransport-app nav.mdt-nav a {
    flex: 0 0 auto !important;
    padding: 10px 16px;
    font-size: 0.8rem;
  }

  #mdtransport-app .mdt-card {
    padding: 20px 15px !important;
    max-width: 100%;
    overflow: hidden;
  }
  .terminal-window-wrapper,
  #mdtransport-app #mdt-terminal-container {
    max-width: 100% !important;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .terminal-body {
    font-size: 11px !important;
    padding: 12px !important;
  }
  .term-row, .term-pre, .terminal-body pre {
    white-space: pre-wrap !important;
    word-break: break-all !important;
  }
  #mdtransport-app #mdt-terminal-container,
  #mdtransport-app #mdt-terminal-container .xterm {
    font-size: 11px !important;
    padding: 8px !important;
  }
}

@media (max-width: 480px) {
  .terminal-body {
    font-size: 9.5px !important;
    padding: 8px !important;
  }
  #mdtransport-app #mdt-terminal-container,
  #mdtransport-app #mdt-terminal-container .xterm {
    font-size: 9.5px !important;
    padding: 6px !important;
  }
}

/* ==========================================================================
   8. UNBOXED MINIMALIST STYLE SYSTEM OVERRIDES
   ========================================================================== */
.about-bio-container {
  max-width: 800px;
  margin: 0 auto 48px auto;
  text-align: center;
}
.about-bio {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-muted);
}
.about-section .about-block {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 16px;
  transition: transform 0.3s var(--smooth);
}
.about-section .about-block:hover {
  transform: translate3d(0, -4px, 0);
  box-shadow: none;
}
.about-section .about-block img {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--img-bg);
}
.about-focus {
  text-align: center;
  max-width: 800px;
  margin: 48px auto 0 auto;
}
.about-focus h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.focus-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.research-portfolio-list {
  display: flex;
  flex-direction: column;
}
.research-card-clean {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.3s ease;
}
.research-card-clean:last-child {
  border-bottom: none;
}
.research-card-clean h2 {
  font-size: 22px;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--text);
}
@media (min-width: 901px) {
  .research-card-clean {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    align-items: start;
  }
}

.contact-clean {
  margin-top: 24px;
}
.contact-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}
.contact-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 2px solid var(--border);
  padding-left: 16px;
}
.contact-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
}
.contact-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.contact-value a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.contact-value a:hover {
  color: var(--secondary);
}

.codes-header {
  margin-bottom: 40px;
}
.codes-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 800px;
}
.download-grid-clean {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.download-card-clean {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  color: var(--text);
  padding: 24px;
  border-left: 2px solid var(--border);
  transition: border-color 0.3s ease, transform 0.3s var(--smooth);
}
.download-card-clean:hover {
  border-color: var(--primary);
  transform: translate3d(4px, 0, 0);
}
.download-card-clean .icon {
  color: #60a5fa;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
[data-theme="light"] .download-card-clean .icon {
  color: var(--primary);
}
.download-card-clean h3 {
  margin: 0 0 6px 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}
.download-card-clean p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ==========================================================================
   9. UNBOXED MINIMALIST ACADEMIC ALIGNMENT
   ========================================================================== */
.about-academic-list {
  display: flex;
  flex-direction: column;
  gap: 56px;
  margin: 64px 0;
}

.about-row-clean {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.about-row-clean:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.about-text-content h3 {
  font-size: 22px;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 16px;
  background: none;
  -webkit-text-fill-color: var(--text);
  color: var(--text);
}

.about-text-content p {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin: 0;
}

.about-image-card {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--img-bg);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--smooth);
  -webkit-transform: translate3d(0,0,0);
  transform: translate3d(0,0,0);
}

.about-image-card:hover {
  border-color: var(--primary);
  transform: translate3d(0, -4px, 0);
  box-shadow: 0 12px 24px var(--shadow-hover);
}

.about-image-card img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
}

@media (min-width: 901px) {
  .about-row-clean {
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
    align-items: center;
  }
}

/* ==========================================================================
   VERTICAL STACKED ANIMATION & BIOGRAPHY SYSTEM
   ========================================================================== */
.home-animation-section {
  max-width: 1000px; 
  width: 100%;
  margin: 15px auto; 
  padding: 0 24px;
  box-sizing: border-box;
}

.section-divider {
  border: 0;
  height: 1px;
  background: var(--border);
  max-width: 1250px;
  width: 100%;
  margin: 60px auto;
}

.home-bio-section {
  max-width: 1250px; 
  width: 100%;
  margin: 0 auto 60px auto;
  text-align: center;
  padding: 0 24px;
  box-sizing: border-box;
}

.home-bio-section .about-bio {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin: 0;
}

.terminal-column {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* ==========================================================================
   INTEGRATED MOCK GUI PANEL
   ========================================================================== */
.mock-gui-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  font-family: var(--font-sans);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  text-align: left;
}

.mock-gui-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.mock-gui-title {
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
}

.mock-gui-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.gui-tab {
  font-size: 10.5px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

[data-theme="light"] .gui-tab {
  background: rgba(0, 0, 0, 0.02);
}

.gui-tab.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(36, 92, 253, 0.25);
}

.mock-gui-body {
  min-height: 68px;
  display: flex;
  align-items: center;
}

.gui-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  width: 100%;
}

.gui-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gui-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-light);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.gui-value {
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-theme="light"] .gui-value {
  background: rgba(0, 0, 0, 0.03);
}

.gui-value.highlight {
  border-color: rgba(36, 92, 253, 0.6);
  background: rgba(36, 92, 253, 0.05);
}

/* ==========================================================================
   TERMINAL WINDOW LAYOUT
   ========================================================================== */
.terminal-window-wrapper {
  background: #0b0d14 !important; 
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.terminal-title-bar {
  background: #0b0d14;
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.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: #94a3b8 !important; 
  font-family: var(--font-mono);
  font-size: 11px;
  margin-left: 10px;
  letter-spacing: 0.02em;
}

.terminal-body {
  height: 380px; 
  background: #090a0f !important;
  color: #e4e4e7 !important;
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  overflow-y: auto;
  overflow-x: hidden;
  text-align: left;
  border: none;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  flex-grow: 1;
  box-sizing: border-box;
  width: 100%;
}

.term-row {
  margin-bottom: 8px;
  word-wrap: break-word;
  white-space: pre-wrap;
  box-sizing: border-box;
  width: 100%;
}

.term-pre {
  display: block;
  font-family: var(--font-mono);
  white-space: pre;
  overflow-x: auto;
  width: 100%;
}

.term-prompt { color: #60a5fa; font-weight: 700; }
.term-green { color: #4ade80; }
.term-cyan { color: #38bdf8; }
.term-yellow { color: #facc15; }
.term-magenta { color: #f472b6; }
.term-bold { font-weight: bold; color: #ffffff; }
.term-dim { color: #52525b; }

.typed-command { color: #f4f4f5; font-weight: 500; }

.cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background-color: #e4e4e7;
  margin-left: 4px;
  animation: blink 0.8s infinite;
  vertical-align: middle;
}

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

.block-fade {
  animation: fadeInBlock 0.25s ease-out forwards;
}

@keyframes fadeInBlock {
  from { opacity: 0; transform: translate3d(0, 4px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Responsive Overrides */
@media (max-width: 900px) {
  .home-animation-section {
    padding: 0 16px;
    margin: 30px auto;
  }
  .home-bio-section {
    padding: 0 16px;
    margin-bottom: 50px;
  }
  .terminal-body {
    height: 320px;
  }
}

/* ==========================================================================
   LIVE WRITING INDICATORS
   ========================================================================== */
.typewrite {
  opacity: 0;
  transition: opacity 0.15s ease-in;
}

.typewrite.typing-live::after {
  content: '|';
  margin-left: 2px;
  animation: cursor-blink-live 0.75s infinite;
  color: var(--text-muted);
}

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

/* ==========================================================================
   AWARDS TIMELINE STYLES
   ========================================================================== */
.awards-container {
  max-width: 1000px;
  margin: 0;
  padding: 20px 0;
}

.header-group {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  border-bottom: 3px solid var(--primary);
  padding-bottom: 10px;
}

.header-group h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
}

.awards-timeline-group {
  position: relative;
  border-left: 2px solid var(--border);
  margin-left: 15px;
  padding-left: 5px;
}

/* Award Item Card Base */
.award-item {
  position: relative;
  padding: 15px 20px 15px 30px;
  margin-bottom: 15px;
  background: var(--surface-2);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-left: 5px solid var(--border);
  transition: all 0.3s var(--smooth);
}

.award-item:hover {
  border-left: 5px solid var(--secondary);
  background: var(--surface-hover);
  box-shadow: 0 4px 12px var(--shadow-hover);
  transform: translate3d(6px, 0, 0);
}

/* Timeline Dot Indicator */
.award-item::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 22px;
  width: 12px;
  height: 12px;
  background: var(--bg);
  border: 3px solid var(--border);
  border-radius: 50%;
  transition: all 0.3s var(--smooth);
  z-index: 10;
}

.award-item:hover::before {
  border-color: var(--secondary);
  background: var(--secondary);
}

.year {
  font-weight: 800;
  color: var(--primary);
  font-size: 0.95rem;
  display: block;
  margin-bottom: 4px;
}

.award-title {
  font-size: 1.1rem;
  font-weight: 600;
  display: block;
  color: var(--text);
}

.recipient {
  font-weight: 800;
  color: var(--secondary);
}

.sub-info {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
}

/* Highlight Custom Style Settings */
.special-highlight {
  border-left: 5px solid var(--secondary);
  background: rgba(255, 153, 0, 0.04);
}

[data-theme="light"] .special-highlight {
  background: #fffef0; 
}

/* Timeline Spacers */
.section-spacer {
  margin-top: 60px;
}

@media (max-width: 600px) {
  .award-item {
    padding-left: 20px;
  }
}

/* ==========================================================================
   NEWS & ANNOUNCEMENTS STYLES
   ========================================================================== */
.news-timeline-wrapper {
  max-width: 950px;
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-item {
  transition: all 0.3s var(--smooth);
  box-sizing: border-box;
}

/* 1. External Card layout */
.news-item.external-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 4px 15px var(--shadow);
}

.news-item.external-card:hover {
  transform: translate3d(0, -3px, 0);
  border-color: var(--border-hover);
  box-shadow: 0 12px 28px var(--shadow-hover);
}

.news-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.news-date {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.news-source-tag {
  background: rgba(36, 92, 253, 0.1);
  color: #60a5fa;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(36, 92, 253, 0.15);
}

[data-theme="light"] .news-source-tag {
  color: var(--primary);
}

.news-title-link a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.35;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  transition: color 0.2s ease;
}

.news-title-link a:hover {
  color: var(--secondary);
}

.external-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 6px;
  color: var(--text-light);
  transition: color 0.2s ease;
}

.news-title-link a:hover .external-icon {
  color: var(--secondary);
}

.news-card-desc {
  margin: 12px 0 16px 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.news-footer-link a {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease;
}

.news-footer-link a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

/* 2. Manual Announcement bar layout */
.news-item.announcement-bar {
  display: flex;
  background: var(--surface);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 24px;
  gap: 24px;
  align-items: center;
}

.news-item.announcement-bar:hover {
  border-left-color: var(--secondary);
  background: var(--surface-hover);
  transform: translate3d(4px, 0, 0);
}

.news-announcement-aside {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 110px;
  flex-shrink: 0;
}

.news-date-badge {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
}

.news-type-badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-light);
}

.news-announcement-body p {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .news-item.announcement-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px 20px;
  }
  .news-announcement-aside {
    min-width: auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  .news-type-badge::before {
    content: "•";
    margin-right: 8px;
    color: var(--border);
  }
}

/* ==========================================================================
   PEOPLE & ALUMNI STYLES
   ========================================================================== */
.people-container {
  max-width: 1600px; 
  margin: 0 auto;
  padding: 20px 0;
}

/* Unified Rich Card Layout (Current Members & Rich Alumni) */
.people-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}

.alumni-rich-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.alumni-rich-card {
  display: grid;
  grid-template-columns: 224px 1fr; 
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow);
  transition: transform 0.3s var(--smooth), border-color 0.3s ease, box-shadow 0.3s ease;
}

.alumni-rich-card:hover {
  transform: translate3d(0, -3px, 0);
  border-color: var(--border-hover);
  box-shadow: 0 12px 28px var(--shadow-hover);
}

.alumni-rich-img {
  width: 224px; 
  height: 100%;
  min-height: 224px; 
  overflow: hidden;
  background: var(--img-bg);
  border-right: 1px solid var(--border);
}

.alumni-rich-img img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  transition: transform 0.4s var(--smooth);
}

.alumni-rich-card:hover .alumni-rich-img img {
  transform: scale(1.05);
}

.alumni-rich-info {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.alumni-rich-header {
  margin-bottom: 8px;
}

.alumni-rich-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px 0;
}

.alumni-rich-sub {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.alumni-rich-bio {
  margin: 0 0 16px 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.people-social {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.people-social:hover {
  color: var(--primary);
}

/* Alumni Section Wrapper */
.alumni-container-wrapper {
  margin-top: 60px;
}

.alumni-group {
  margin-bottom: 40px;
}

.alumni-section-title {
  color: var(--text);
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 24px;
  font-size: 1.45rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Undergraduate List Cards */
.alumni-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alumni-card {
  background: var(--surface-2);
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.2s var(--smooth), background-color 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
}

.alumni-card:hover {
  transform: translate3d(8px, 0, 0);
  background-color: var(--surface-hover);
  box-shadow: 0 4px 14px var(--shadow-hover);
}

.alumni-name {
  font-weight: 700;
  color: var(--text);
  font-size: 1.1rem;
  display: block;
  margin-bottom: 6px;
}

.alumni-role-dates {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 2px;
}

.alumni-role-dates:last-of-type {
  margin-bottom: 0;
}

.alumni-destination {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.82rem;
  background: rgba(36, 92, 253, 0.08);
  color: #60a5fa;
  padding: 3px 12px;
  border-radius: 4px;
  font-weight: 700;
  border-left: 2px solid var(--primary);
}

[data-theme="light"] .alumni-destination {
  background: #e1f0fa;
  color: #2980b9;
}

/* Responsive Rules for Small Screens */
@media (max-width: 768px) {
  .alumni-rich-card {
    grid-template-columns: 1fr; 
  }
  .alumni-rich-img {
    width: 100%;
    height: 240px; 
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .alumni-rich-info {
    padding: 18px 20px;
  }
}

/* ==========================================================================
   TEACHING & CURRICULUM STYLES
   ========================================================================== */
.teaching-container {
  max-width: 1600px; 
  margin: 0 auto;
  padding: 20px 0;
}

.teaching-section {
  margin-bottom: 50px;
}

.teaching-institution {
  color: var(--text);
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 24px;
  font-size: 1.45rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* 3-Column Flexible Grid Structure */
.teaching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

/* Course Cards */
.course-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  box-shadow: 0 4px 12px var(--shadow);
  transition: transform 0.3s var(--smooth), border-color 0.3s ease, box-shadow 0.3s ease;
}

.course-card:hover {
  transform: translate3d(0, -3px, 0);
  border-color: var(--border-hover);
  box-shadow: 0 12px 24px var(--shadow-hover);
}

.course-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
}

.course-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.course-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 20px;
}

[data-theme="light"] .course-tag {
  background: rgba(0, 0, 0, 0.02);
}

.course-title {
  margin: 0 0 20px 0;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--text);
  flex-grow: 1;
}

.course-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  gap: 12px;
}

.course-years {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

/* Badge for Instructor Roles */
.instructor-status {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
}

.instructor-status.primary-instructor {
  background: rgba(36, 92, 253, 0.08);
  color: #60a5fa;
  border: 1px solid rgba(36, 92, 253, 0.15);
}

[data-theme="light"] .instructor-status.primary-instructor {
  background: #e1f0fa;
  color: #2980b9;
  border-color: #2980b930;
}

.instructor-status.co {
  background: rgba(245, 158, 11, 0.08);
  color: #fca5a5;
  border: 1px solid rgba(245, 158, 11, 0.15);
}

[data-theme="light"] .instructor-status.co {
  background: #fef3c7;
  color: #d97706;
  border-color: #d9770630;
}

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