/* ==========================================================================
   Design System & Theme Tokens (Clean & Bright Modern Engineering)
   ========================================================================== */
:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  
  --border-subtle: #e2e8f0;
  --border-accent: #cbd5e1;
  --border-glow: rgba(37, 99, 235, 0.25);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-accent: #0284c7;

  --accent-cyan: #0284c7;
  --accent-blue: #2563eb;
  --accent-indigo: #4f46e5;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  
  --grad-primary: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #4f46e5 100%);
  --grad-cyan: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  --grad-card: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);

  --font-sans: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

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

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.12);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  line-height: 1.65;
  background: var(--bg-primary);
  min-height: 100vh;
}

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

ul {
  list-style: none;
}

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

/* Typography & Utility */
.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.section {
  padding: 90px 0;
  position: relative;
}

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

.section-header.text-center {
  text-align: center;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--accent-blue);
  background: rgba(37, 99, 235, 0.08);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(37, 99, 235, 0.2);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 12px 24px;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.02rem;
  border-radius: var(--radius-md);
}

.btn-primary {
  background: var(--grad-primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  filter: brightness(1.05);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-primary);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

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

.btn-block {
  width: 100%;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  background: var(--grad-primary);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: -0.02em;
}

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

.logo-text .name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1.2;
}

.logo-text .role {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--accent-blue);
  letter-spacing: 0.04em;
  font-weight: 600;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent-blue);
}

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

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

/* ==========================================================================
   Hero Section (Clean Bright with Lab Background)
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 150px 0 90px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
  background: 
    linear-gradient(90deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.93) 50%, rgba(255, 255, 255, 0.86) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, transparent 60%, rgba(248, 250, 252, 0.98) 100%),
    url('assets/lab_hero.jpg') right center / cover no-repeat;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: 15%;
  right: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}

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

.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.25);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--accent-emerald);
  font-weight: 600;
  margin-bottom: 22px;
}

.status-indicator.live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulseLive 2s infinite;
}

@keyframes pulseLive {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-title {
  font-size: 3.1rem;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  color: var(--text-primary);
}

.hero-title-sub {
  display: block;
  font-size: 1.1rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.hero-description {
  font-size: 1.12rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 34px;
}

.hero-description strong {
  color: var(--text-primary);
  font-weight: 700;
}

.hero-action-group {
  display: flex;
  gap: 16px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 28px;
}

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

.metric-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
  line-height: 1.2;
}

.metric-value .unit {
  font-size: 0.95rem;
  color: var(--accent-blue);
  margin-left: 2px;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 600;
}

/* Hero Visual: System Diagram Card (Light Glass) */
.system-diagram-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
}

.diagram-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 18px;
}

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

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

.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #10b981; }

.diagram-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  font-weight: 700;
}

.pulse-chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-blue);
  background: rgba(37, 99, 235, 0.08);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(37, 99, 235, 0.2);
  font-weight: 700;
}

.diagram-layers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.diagram-layer {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.diagram-layer:hover {
  background: #ffffff;
  border-color: var(--accent-blue);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.diagram-layer.highlight {
  background: rgba(37, 99, 235, 0.04);
  border-color: rgba(37, 99, 235, 0.3);
}

.layer-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-blue);
  width: 130px;
  flex-shrink: 0;
}

.layer-info {
  flex: 1;
  padding: 0 12px;
}

.layer-info strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.layer-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.data-stream-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 18px;
}

.pulse-line {
  position: absolute;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-blue));
  opacity: 0.5;
}

.protocol-badge {
  background: #ffffff;
  border: 1px solid var(--border-accent);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-blue);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  z-index: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

.diagram-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.diagram-footer .status-text {
  font-size: 0.85rem;
  color: var(--accent-emerald);
  font-weight: 700;
}

/* ==========================================================================
   Services Section (3 Pillars - Light Modern)
   ========================================================================== */
.services-section {
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
}

.services-3grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.service-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
}

.service-box:hover {
  border-color: rgba(37, 99, 235, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.service-box:hover::before {
  opacity: 1;
}

.service-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.service-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-blue);
  line-height: 1;
}

.service-category-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-blue);
  background: rgba(37, 99, 235, 0.08);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(37, 99, 235, 0.2);
  text-transform: uppercase;
}

.service-content h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.service-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 18px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tech-tags span {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.feature-bullets {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.feature-bullets li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  position: relative;
  padding-left: 16px;
  line-height: 1.5;
}

.feature-bullets li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-blue);
  font-weight: bold;
}

/* ==========================================================================
   Projects Section (Clean Bright & High Contrast Tech)
   ========================================================================== */
.projects-section {
  position: relative;
  background: 
    linear-gradient(180deg, #f1f5f9 0%, #eef2f6 50%, #f8fafc 100%),
    url('assets/iot_dashboard.jpg') center center / cover no-repeat;
  border-bottom: 1px solid var(--border-accent);
}

.project-filter-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  background: #ffffff;
  border: 1px solid var(--border-accent);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.filter-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.project-cards-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.project-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-xl);
  padding: 34px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 10px 25px -5px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 14px 34px -4px rgba(37, 99, 235, 0.16);
  transform: translateY(-4px);
}

.project-accent-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
}

.project-accent-bar.firmware {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
}

.project-accent-bar.app {
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
}

.project-accent-bar.web {
  background: linear-gradient(90deg, #10b981, #06b6d4);
}

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

.project-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.project-badge.status-active {
  background: rgba(5, 150, 105, 0.08);
  color: var(--accent-emerald);
  border-color: rgba(5, 150, 105, 0.25);
}

.project-badge.status-highlight {
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-blue);
  border-color: rgba(37, 99, 235, 0.25);
}

.project-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Bioreactor Image Wrapper */
.project-media-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--border-subtle);
  background: #f8fafc;
  max-height: 240px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.project-media-wrapper.dual-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: #0f172a;
}

.dual-img-box {
  overflow: hidden;
  height: 240px;
  position: relative;
}

.dual-img-box .project-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.project-thumb-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  transition: transform var(--transition-normal);
}

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

.media-overlay-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.4) 70%, transparent 100%);
  padding: 10px 14px;
  font-size: 0.78rem;
  color: #ffffff;
  font-family: var(--font-mono);
  font-weight: 600;
}

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

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

.project-details {
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  border: 1px solid var(--border-subtle);
}

.detail-row {
  display: flex;
  font-size: 0.85rem;
  line-height: 1.5;
}

.detail-row .label {
  width: 95px;
  color: var(--text-muted);
  flex-shrink: 0;
  font-weight: 700;
}

.detail-row .val {
  color: var(--text-primary);
  flex: 1;
}

.project-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.project-chips span {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  background: rgba(37, 99, 235, 0.06);
  color: var(--accent-blue);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(37, 99, 235, 0.15);
  font-weight: 600;
}

/* ==========================================================================
   Principles & Profile Section
   ========================================================================== */
.principles-section {
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 60px;
}

.principle-item {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  transition: all var(--transition-normal);
}

.principle-item:hover {
  border-color: rgba(37, 99, 235, 0.4);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.principle-icon {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-blue);
  margin-bottom: 16px;
}

.principle-item h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
}

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

.engineer-profile-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: 40px;
  display: flex;
  gap: 36px;
  align-items: center;
  box-shadow: var(--shadow-md);
}

.profile-avatar-box {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
}

.profile-avatar-box .profile-initials {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono);
}

.profile-avatar-box .profile-badge {
  position: absolute;
  bottom: -4px;
  background: #ffffff;
  border: 1px solid var(--accent-blue);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-blue);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.profile-body {
  flex: 1;
}

.profile-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.profile-title-group h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
}

.profile-title-group .sub-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 6px;
}

.edu-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: var(--accent-blue);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.profile-summary {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.75;
  margin-bottom: 16px;
}

.career-milestones {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  padding: 14px 16px;
  background: #f1f5f9;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.milestone-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-right: 4px;
}

.milestone-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: #ffffff;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.profile-contact-chips {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-contact-chips .chip {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.88rem;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all var(--transition-fast);
}

.profile-contact-chips a.chip:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* ==========================================================================
   Process Section
   ========================================================================== */
.process-section {
  background: #f8fafc;
  border-bottom: 1px solid var(--border-subtle);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  position: relative;
}

.process-step {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.process-step:hover {
  border-color: rgba(37, 99, 235, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-blue);
  margin-bottom: 14px;
}

.process-step h4 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text-primary);
  line-height: 1.4;
}

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

/* ==========================================================================
   Contact / Conversion Section
   ========================================================================== */
.contact-section {
  background: #ffffff;
}

.contact-box {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 56px;
  background: #ffffff;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: 56px;
  box-shadow: var(--shadow-lg);
}

.contact-info h2 {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.contact-info p {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.contact-info .highlight-text {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 32px;
}

.direct-contact-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 28px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-item .icon {
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
}

.contact-item .label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.contact-item .value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.contact-item a.value:hover {
  color: var(--accent-blue);
}

/* Contact Form */
.inquiry-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background: #ffffff;
}

.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
}

.custom-checkbox input {
  display: none;
}

.custom-checkbox .box {
  width: 18px;
  height: 18px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: #f1f5f9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.custom-checkbox input:checked + .box {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.custom-checkbox input:checked + .box::after {
  content: '✓';
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: bold;
}

.custom-checkbox:hover .box {
  border-color: var(--accent-blue);
}

.form-notice {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0;
  background: #0f172a;
  color: #ffffff;
}

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

.footer-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  display: block;
  margin-bottom: 6px;
}

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

.footer-left .copyright {
  margin-top: 12px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: #64748b;
}

.footer-right {
  text-align: right;
}

.footer-nav {
  display: flex;
  gap: 20px;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.footer-nav a {
  font-size: 0.9rem;
  color: #cbd5e1;
}

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

.footer-meta {
  font-size: 0.82rem;
  color: #94a3b8;
  font-family: var(--font-mono);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1080px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .services-3grid {
    grid-template-columns: 1fr;
  }
  .project-cards-container {
    grid-template-columns: 1fr;
  }
  .principles-grid {
    grid-template-columns: 1fr;
  }
  .process-steps {
    grid-template-columns: 1fr;
  }
  .contact-box {
    grid-template-columns: 1fr;
    padding: 36px;
  }
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-right {
    text-align: left;
  }
  .footer-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }

  .container {
    padding: 0 18px;
  }

  .site-header {
    height: 66px;
  }

  .header-container {
    height: 66px;
  }

  .logo-text .name {
    font-size: 1.05rem;
  }

  .logo-text .role {
    font-size: 0.7rem;
  }

  /* Mobile Nav Drawer */
  .mobile-menu-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 2px solid var(--accent-blue);
    padding: 20px 24px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

  .main-nav a {
    display: block;
    padding: 10px 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--border-subtle);
  }

  .main-nav li:last-child a {
    border-bottom: none;
    text-align: center;
    margin-top: 8px;
  }

  /* Hero Section Mobile */
  .hero-section {
    padding: 100px 0 60px;
    background-position: center right;
  }

  .hero-title {
    font-size: 2.0rem;
    line-height: 1.3;
  }

  .hero-title-sub {
    font-size: 0.92rem;
  }

  .hero-description {
    font-size: 1.0rem;
    line-height: 1.7;
    margin-bottom: 28px;
  }

  .hero-action-group {
    flex-direction: column;
    gap: 12px;
  }

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

  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding-top: 24px;
  }

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

  /* Diagram Card Mobile */
  .system-diagram-card {
    padding: 18px 14px;
  }

  .diagram-layer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px 14px;
  }

  .layer-badge {
    width: 100%;
    font-size: 0.72rem;
  }

  .layer-info {
    padding: 0;
    width: 100%;
  }

  .layer-info strong {
    font-size: 0.92rem;
  }

  .layer-info p {
    font-size: 0.74rem;
  }

  /* Filter Tabs Mobile */
  .project-filter-tabs {
    gap: 8px;
    margin-bottom: 28px;
  }

  .filter-btn {
    font-size: 0.82rem;
    padding: 8px 14px;
  }

  /* Project Cards Mobile */
  .project-card {
    padding: 24px 18px;
  }

  .project-media-wrapper,
  .dual-img-box,
  .project-thumb-img {
    height: 190px;
  }

  .project-title {
    font-size: 1.2rem;
    line-height: 1.4;
  }

  .project-desc {
    font-size: 0.9rem;
    margin-bottom: 18px;
  }

  .detail-row {
    flex-direction: column;
    gap: 2px;
    padding-bottom: 6px;
    border-bottom: 1px dashed #e2e8f0;
  }

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

  .detail-row .label {
    width: 100%;
    font-size: 0.78rem;
    color: var(--accent-blue);
  }

  .detail-row .val {
    font-size: 0.85rem;
  }

  /* Profile Card Mobile */
  .engineer-profile-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 18px;
    gap: 20px;
  }

  .profile-avatar-box {
    width: 80px;
    height: 80px;
  }

  .profile-avatar-box .profile-initials {
    font-size: 1.8rem;
  }

  .profile-title-group h3 {
    font-size: 1.35rem;
  }

  .career-milestones {
    padding: 12px;
  }

  .milestone-title {
    width: 100%;
    margin-bottom: 4px;
  }

  .milestone-tag {
    font-size: 0.75rem;
    padding: 3px 8px;
  }

  .profile-contact-chips {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .profile-contact-chips .chip {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* Contact Form Mobile */
  .contact-box {
    padding: 24px 18px;
    gap: 32px;
  }

  .contact-info h2 {
    font-size: 1.75rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .checkbox-group {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .form-group input,
  .form-group textarea {
    font-size: 16px; /* Prevents iOS auto-zoom on input focus */
    padding: 12px 14px;
  }

  .section-title {
    font-size: 1.85rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .hero-status-pill {
    font-size: 0.78rem;
    padding: 5px 10px;
  }

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

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

  .project-filter-tabs .filter-btn {
    width: 100%;
    text-align: center;
  }
}

/* ==========================================================================
   Image Lightbox Modal
   ========================================================================== */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.image-modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
}

.modal-container {
  position: relative;
  z-index: 10;
  max-width: 95vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
  padding: 16px;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-container img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #f8fafc;
}

.modal-caption {
  margin-top: 12px;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}

.modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  border: 2px solid #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.2s, background 0.2s;
}

.modal-close:hover {
  background: var(--accent-blue);
  transform: scale(1.1);
}

.zoomable-img {
  cursor: zoom-in !important;
}

@media (max-width: 768px) {
  .project-media-wrapper.dual-media {
    grid-template-columns: 1fr 1fr;
    max-height: 180px;
  }
  .dual-img-box {
    height: 180px;
  }
  .modal-container {
    padding: 10px;
    max-width: 98vw;
  }
  .modal-container img {
    max-height: 72vh;
  }
  .modal-close {
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
}

