/* ==========================================================================
   Rajat Patle - Senior Architect & AI Engineer Portfolio
   Design System & Styling
   ========================================================================== */

:root {
  --bg-dark: #07090e;
  --bg-surface: #0d121c;
  --bg-card: #121826;
  --bg-card-hover: #182235;
  --bg-glass: rgba(18, 24, 38, 0.75);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(0, 242, 254, 0.3);
  --border-glow: rgba(0, 242, 254, 0.6);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-purple: #a855f7;
  --accent-green: #10b981;
  --accent-yellow: #f59e0b;
  --accent-red: #ef4444;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 35px -5px rgba(0, 242, 254, 0.15);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  position: relative;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(0, 242, 254, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(168, 85, 247, 0.04) 0%, transparent 40%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography & Helpers */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 50%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-cyan { color: var(--accent-cyan); }
.text-green { color: var(--accent-green); }
.text-yellow { color: var(--accent-yellow); }
.text-purple { color: var(--accent-purple); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

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

.brand-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 2px;
}

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

.brand-name {
  color: #ffffff;
}

.brand-tag {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-left: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
  padding: 6px 4px;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--accent-cyan);
}

.nav-btn-primary {
  background: rgba(0, 242, 254, 0.1);
  color: var(--accent-cyan) !important;
  border: 1px solid var(--border-accent);
  padding: 8px 16px !important;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.nav-btn-primary:hover {
  background: var(--accent-cyan);
  color: #07090e !important;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
}

.mobile-toggle {
  display: none;
  background: transparent;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle .bar {
  width: 24px;
  height: 2px;
  background: var(--text-main);
  transition: var(--transition);
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 80px 0 60px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.hero-glow-1 {
  top: -100px;
  left: -100px;
  background: rgba(0, 242, 254, 0.09);
}

.hero-glow-2 {
  top: 100px;
  right: -100px;
  background: rgba(168, 85, 247, 0.08);
}

.hero-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.status-pill-success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-subtext {
  font-size: 1.12rem;
  color: var(--text-muted);
  line-height: 1.68;
  margin-bottom: 36px;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  color: #07090e;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 242, 254, 0.45);
}

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

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

.btn-outline {
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.btn-outline:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

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

.icon {
  width: 18px;
  height: 18px;
}

/* Hero Specs Grid */
.hero-specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

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

.spec-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.spec-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

/* Hero Telemetry Card */
.telemetry-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.telemetry-header {
  background: #090e17;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

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

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

.dot.red { background-color: #ef4444; }
.dot.yellow { background-color: #f59e0b; }
.dot.green { background-color: #10b981; }

.telemetry-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.telemetry-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.telemetry-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

.telemetry-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.tele-key {
  color: var(--text-dim);
  font-size: 0.76rem;
}

.tele-val {
  color: var(--text-main);
  text-align: right;
  font-size: 0.8rem;
}

.telemetry-progress-block {
  margin-top: 16px;
  padding-top: 12px;
}

.tele-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.tele-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.tele-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
}

.telemetry-code-snippet {
  margin-top: 16px;
  background: #080c14;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--accent-cyan);
  font-size: 0.76rem;
  overflow-x: auto;
}

/* Common Section Headers */
.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  margin-bottom: 56px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid var(--border-accent);
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 14px;
  letter-spacing: 0.05em;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

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

.text-center .section-desc {
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Architecture Blueprint Canvas (Interactive Lab)
   ========================================================================== */
.arch-tabs {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.arch-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: var(--transition);
}

.arch-tab-btn .tab-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.arch-tab-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-accent);
}

.arch-tab-btn.active {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.15);
}

.arch-canvas-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.arch-canvas-header {
  background: #090e17;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.arch-info-label {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #ffffff;
  font-size: 0.95rem;
}

.arch-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.arch-flow-wrapper {
  padding: 40px 24px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  overflow-x: auto;
  position: relative;
  background: 
    radial-gradient(circle at center, rgba(0, 242, 254, 0.03) 0%, transparent 70%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0px, transparent 1px, transparent 32px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.015) 0px, transparent 1px, transparent 32px);
}

/* Diagram Nodes */
.arch-node {
  background: #0f1624;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  min-width: 190px;
  max-width: 210px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.arch-node:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.2);
}

.arch-node.active-node {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.4);
  background: #141f33;
}

.node-category {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.node-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  margin-bottom: 6px;
}

.node-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.flow-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  opacity: 0.6;
}

/* Node Inspector Panel */
.arch-inspector {
  background: #090e17;
  border-top: 1px solid var(--border-subtle);
  padding: 24px 28px;
  transition: var(--transition);
}

.inspector-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.inspector-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.inspector-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.inspector-tech-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.insp-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Career Journey (Timeline)
   ========================================================================== */
.timeline-wrapper {
  position: relative;
  max-width: 940px;
  margin: 0 auto;
}

.timeline-wrapper::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 20px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-cyan) 0%, var(--accent-purple) 60%, rgba(255, 255, 255, 0.1) 100%);
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 56px;
}

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

.timeline-dot {
  position: absolute;
  left: 12px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 3px solid var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan);
  z-index: 2;
}

.timeline-item.current .timeline-dot {
  background: var(--accent-green);
  border-color: #ffffff;
  box-shadow: 0 0 16px var(--accent-green);
}

.timeline-meta {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

.timeline-company {
  font-weight: 700;
  color: #ffffff;
  font-size: 1.05rem;
}

.timeline-location {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  transition: var(--transition);
}

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

.card-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

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

.card-role {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.card-summary {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.card-highlights {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.highlight-item {
  font-size: 0.9rem;
  color: #cbd5e1;
  padding-left: 14px;
  border-left: 2px solid var(--border-accent);
}

.highlight-item strong {
  color: #ffffff;
}

.card-tech-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.card-tech-pills span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 2px 10px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Featured Case Studies (Projects Grid)
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 28px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

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

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

.project-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid var(--border-accent);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}

.project-sys-id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
  line-height: 1.35;
}

.project-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.project-details-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  background: #090e17;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.86rem;
  color: #e2e8f0;
}

.detail-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.project-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.tech-stack-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tech-stack-tags span {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ==========================================================================
   Skill Arsenal Matrix
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px;
}

.skill-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  transition: var(--transition);
}

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

.cat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.cat-icon-wrap.ai-icon { background: rgba(0, 242, 254, 0.12); color: var(--accent-cyan); }
.cat-icon-wrap.backend-icon { background: rgba(16, 185, 129, 0.12); color: var(--accent-green); }
.cat-icon-wrap.cloud-icon { background: rgba(245, 158, 11, 0.12); color: var(--accent-yellow); }
.cat-icon-wrap.sec-icon { background: rgba(168, 85, 247, 0.12); color: var(--accent-purple); }

.cat-icon {
  width: 24px;
  height: 24px;
}

.cat-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.cat-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  min-height: 40px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.skill-tag.highlight {
  border-color: var(--border-accent);
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.06);
}

.skill-tag:hover {
  border-color: var(--accent-cyan);
  color: #ffffff;
}

/* ==========================================================================
   Principles Section (The Engineering Creed)
   ========================================================================== */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.principle-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  position: relative;
  transition: var(--transition);
}

.principle-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-card);
}

.p-num {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.12);
  margin-bottom: 16px;
}

.p-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.p-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   Interactive CLI Terminal
   ========================================================================== */
.interactive-terminal {
  max-width: 860px;
  margin: 0 auto;
  background: #080c14;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 242, 254, 0.1);
}

.terminal-bar {
  background: #0d121c;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-bar-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.terminal-bar-actions {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.terminal-screen {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  min-height: 340px;
  max-height: 480px;
  overflow-y: auto;
}

.terminal-line {
  margin-bottom: 8px;
  line-height: 1.5;
}

.terminal-quick-cmds {
  display: flex;
  gap: 8px;
  margin: 14px 0 20px;
  flex-wrap: wrap;
}

.cmd-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  padding: 3px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  transition: var(--transition);
}

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

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

.terminal-prompt {
  color: var(--accent-green);
  white-space: nowrap;
}

.terminal-input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  width: 100%;
}

.code-pill {
  font-family: var(--font-mono);
  background: rgba(0, 242, 254, 0.1);
  color: var(--accent-cyan);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* Contact & Collaboration Section */
.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-card);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
}

.contact-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 16px 0;
  line-height: 1.2;
}

.contact-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.work-mode-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.relo-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.92rem;
  color: #cbd5e1;
}

.relo-icon {
  color: var(--accent-green);
  font-weight: 800;
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.channel-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.94rem;
  transition: var(--transition);
}

.channel-link:hover {
  color: var(--accent-cyan);
  transform: translateX(3px);
}

.channel-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-cyan);
}

.direct-card {
  background: #090e17;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.direct-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.direct-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.action-buttons-vertical {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.notice-callout {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 16px;
}

.notice-title {
  font-weight: 700;
  font-size: 0.82rem;
  color: #a7f3d0;
  margin-bottom: 4px;
}

.notice-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border-subtle);
  background: #06080d;
  font-size: 0.86rem;
  color: var(--text-dim);
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   Video Architecture Deep Dive Section (Unified Studio Card)
   ========================================================================== */
.video-section {
  position: relative;
  padding: 80px 0;
  background: linear-gradient(180deg, var(--bg-dark) 0%, rgba(13, 18, 28, 0.6) 50%, var(--bg-dark) 100%);
}

.video-studio-card {
  max-width: 1060px;
  margin: 36px auto 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card), 0 0 45px -15px rgba(0, 242, 254, 0.12);
  transition: var(--transition);
}

.video-studio-card:hover {
  border-color: var(--border-accent);
}

.video-studio-header {
  background: #090e17;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  gap: 12px;
}

.video-studio-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.video-studio-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.video-studio-body {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: stretch;
}

.video-viewport {
  background: #06080d;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-subtle);
  min-height: 100%;
}

.video-screen-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.architecture-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #090d16;
  outline: none;
  display: block;
}

.video-status-strip {
  padding: 12px 18px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.status-strip-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.strip-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulseGreen 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes pulseGreen {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.strip-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  transition: var(--transition);
  white-space: nowrap;
}

.strip-link:hover {
  background: var(--accent-cyan);
  color: #07090e;
}

.video-studio-nav {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-card);
}

.studio-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.nav-header-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--accent-cyan);
}

.nav-header-hint {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chapter-btn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: left;
  transition: var(--transition);
  color: var(--text-main);
  cursor: pointer;
}

.chapter-btn:hover {
  background: rgba(0, 242, 254, 0.05);
  border-color: var(--border-accent);
}

.chapter-btn.active {
  background: rgba(0, 242, 254, 0.08);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px -2px rgba(0, 242, 254, 0.15);
}

.chapter-time {
  padding: 3px 6px;
  background: rgba(0, 242, 254, 0.1);
  color: var(--accent-cyan);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  flex-shrink: 0;
}

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

.chapter-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.chapter-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.studio-metrics-grid {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.metric-item {
  padding: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-align: center;
}

.metric-val {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.metric-lbl {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   Comprehensive Responsive Architecture (iPads, Tablets & Mobile Phones)
   ========================================================================== */

/* 1. Large Tablets & iPads in Landscape (1024px and below) */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .hero-specs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .video-studio-card {
    max-width: 100%;
  }
}

/* 2. iPads in Portrait & Mid-size Tablets (900px and below) */
@media (max-width: 900px) {
  .mobile-toggle {
    display: flex;
    z-index: 1001;
    padding: 6px;
    cursor: pointer;
  }

  .mobile-toggle.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .mobile-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  .mobile-toggle.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: auto;
    background: rgba(7, 9, 14, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 20px 24px 28px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85);
    z-index: 999;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    font-size: 1rem;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
  }

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

  .nav-btn-primary {
    text-align: center;
    margin-top: 8px;
    padding: 12px 20px !important;
    font-size: 0.95rem;
  }

  .video-studio-body {
    grid-template-columns: 1fr;
  }

  .video-viewport {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .arch-flow-wrapper {
    justify-content: flex-start;
    padding: 28px 18px;
    -webkit-overflow-scrolling: touch;
  }

  body.menu-open {
    overflow: hidden;
  }
}

/* 3. Phablets & Mobile Devices (768px and below) */
@media (max-width: 768px) {
  .section-title {
    font-size: 1.85rem;
  }

  .hero-title {
    font-size: 2.05rem;
    line-height: 1.25;
  }

  .contact-box {
    padding: 24px;
  }

  .timeline-wrapper::before {
    left: 12px;
  }

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

  .timeline-dot {
    left: 4px;
    top: 6px;
  }

  .timeline-card {
    padding: 20px 18px;
  }

  .card-role {
    font-size: 1.15rem;
  }

  .card-summary {
    font-size: 0.88rem;
  }

  .highlight-item {
    font-size: 0.82rem;
    line-height: 1.45;
  }
}

/* 4. Small Mobile Phones (640px and below) */
@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 54px 0;
  }

  .hero-section {
    padding: 42px 0 32px;
  }

  .hero-title {
    font-size: 1.75rem;
    line-height: 1.25;
  }

  .hero-subtext {
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 24px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 32px;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .hero-specs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .spec-card {
    padding: 12px 10px;
  }

  .spec-value {
    font-size: 1.25rem;
  }

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

  .telemetry-card {
    border-radius: var(--radius-md);
  }

  .telemetry-header {
    padding: 10px 14px;
  }

  .telemetry-title {
    font-size: 0.72rem;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .telemetry-body {
    padding: 14px;
  }

  .telemetry-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 6px 0;
  }

  .tele-key {
    font-size: 0.7rem;
  }

  .tele-val {
    font-size: 0.75rem;
    text-align: left;
  }

  .telemetry-code-snippet {
    font-size: 0.7rem;
    padding: 8px;
    overflow-x: auto;
  }

  /* Architecture Tabs on Mobile */
  .arch-tabs {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .arch-tab-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  .arch-canvas-header {
    padding: 12px 16px;
  }

  .arch-info-label {
    font-size: 0.82rem;
  }

  .arch-hint {
    font-size: 0.7rem;
  }

  /* Video Studio Card Mobile */
  .video-studio-header {
    padding: 10px 14px;
  }

  .video-studio-title {
    font-size: 0.72rem;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .video-studio-badge {
    font-size: 0.62rem;
    padding: 2px 7px;
  }

  .video-status-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }

  .status-strip-left {
    font-size: 0.75rem;
  }

  .status-strip-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .status-strip-actions .strip-link {
    width: 100%;
    justify-content: center;
    padding: 8px 12px;
    font-size: 0.78rem;
  }

  .video-studio-nav {
    padding: 16px 14px;
  }

  .chapter-btn {
    padding: 10px 12px;
    min-height: 48px;
  }

  .chapter-title {
    font-size: 0.8rem;
  }

  .chapter-desc {
    font-size: 0.7rem;
  }

  .studio-metrics-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding-top: 10px;
  }

  .metric-item {
    padding: 6px 4px;
  }

  .metric-val {
    font-size: 0.82rem;
  }

  .metric-lbl {
    font-size: 0.58rem;
  }

  /* Projects & Case Studies */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .project-card {
    padding: 22px 18px;
  }

  .project-title {
    font-size: 1.15rem;
  }

  .project-desc {
    font-size: 0.84rem;
  }

  /* Skills & Arsenal */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .skill-category-card {
    padding: 22px 18px;
  }

  /* Terminal Section */
  .interactive-terminal {
    border-radius: var(--radius-lg);
  }

  .terminal-bar {
    padding: 10px 14px;
  }

  .terminal-bar-title {
    font-size: 0.72rem;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .terminal-screen {
    padding: 16px 14px;
    font-size: 0.76rem;
    min-height: 260px;
  }

  .cmd-chip {
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  /* Footer */
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
}

