/* ==========================================================================
   SANDIP FADADU — PORTFOLIO DESIGN SYSTEM
   Professional, Modern, High-Performance CSS (Light & Dark Theme)
   ========================================================================== */

:root,
:root[data-theme="dark"] {
  /* Surface & Base Colors (Dark Theme Default) */
  --bg: #070d14;
  --bg-dots: rgba(56, 189, 248, 0.05);
  --surface: #0c1522;
  --surface-2: #101c2e;
  --surface-3: #16263d;
  --surface-translucent: rgba(12, 21, 34, 0.9);

  /* Borders & Dividers */
  --line: #1c2e47;
  --line-strong: #253e61;
  --line-dashed: #223755;
  --line-focus: #38bdf8;

  /* Typography Colors */
  --text: #f1f5f9;
  --text-heading: #ffffff;
  --muted: #94a3b8;
  --faint: #64748b;

  /* Accent & Interactive (Vibrant Sky Cyan) */
  --accent: #38bdf8;
  --accent-hover: #0ea5e9;
  --accent-light: rgba(56, 189, 248, 0.16);
  --accent-subtle: rgba(56, 189, 248, 0.08);
  --accent-border: rgba(56, 189, 248, 0.35);
  --accent-glow: rgba(56, 189, 248, 0.25);

  /* Status Colors */
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.12);
  --success-border: rgba(52, 211, 153, 0.28);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, 0.12);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.12);

  /* Window & Components */
  --window-bar: #09121d;
  --window-bar-border: #18283d;
  --tag-bg: #101c2e;
  --tag-border: #1c2e47;
  --tag-text: #cbd5e1;

  /* Terminal Component Tokens (Dark Mode) */
  --term-bg: #040911;
  --term-bar-bg: #08121f;
  --term-bar-border: #14283d;
  --term-box-bg: #081322;
  --term-box-border: #152b44;
  --term-box-dashed: #1a3959;
  --term-tag-bg: #0b1a2e;
  --term-tag-border: #1a3858;
  --term-tag-text: #94a3b8;
  --term-input-bg: #071220;
  --term-input-border: #152b44;
  --term-input-text: #f8fafc;
  --term-text-main: #f8fafc;
  --term-text-muted: #8da2b6;
  --term-text-faint: #556c82;
  --term-accent: #38bdf8;
  --term-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(56, 189, 248, 0.08);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.35);
  --shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.65);
  --shadow-xl: 0 28px 65px rgba(0, 0, 0, 0.75);

  /* Radii */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  /* Typography Stacks */
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Monaco, Consolas, monospace;

  /* Layout Dimensions */
  --sidebar-w: 248px;
  --topbar-h: 56px;
  --content-w: 1320px;
}

:root[data-theme="light"] {
  /* Surface & Base Colors (Light Theme) */
  --bg: #f8fafc;
  --bg-dots: rgba(14, 116, 144, 0.045);
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --surface-3: #e2e8f0;
  --surface-translucent: rgba(255, 255, 255, 0.88);
  
  /* Borders & Dividers */
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --line-dashed: #cbd5e1;
  --line-focus: #0284c7;

  /* Typography Colors */
  --text: #0f172a;
  --text-heading: #0f172a;
  --muted: #475569;
  --faint: #64748b;

  /* Accent & Interactive (Ocean Sky Cyan) */
  --accent: #0284c7;
  --accent-hover: #0369a1;
  --accent-light: #e0f2fe;
  --accent-subtle: #f0f9ff;
  --accent-border: #bae6fd;
  --accent-glow: rgba(2, 132, 199, 0.18);

  /* Status Colors */
  --success: #059669;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --warn: #d97706;
  --warn-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;

  /* Window & Components */
  --window-bar: #f8fafc;
  --window-bar-border: #e2e8f0;
  --tag-bg: #f1f5f9;
  --tag-border: #e2e8f0;
  --tag-text: #334155;

  /* Terminal Component Tokens (Light Mode) */
  --term-bg: #ffffff;
  --term-bar-bg: #f8fafc;
  --term-bar-border: #e2e8f0;
  --term-box-bg: #f8fafc;
  --term-box-border: #e2e8f0;
  --term-box-dashed: #cbd5e1;
  --term-tag-bg: #ffffff;
  --term-tag-border: #e2e8f0;
  --term-tag-text: #334155;
  --term-input-bg: #f8fafc;
  --term-input-border: #e2e8f0;
  --term-input-text: #0f172a;
  --term-text-main: #0f172a;
  --term-text-muted: #475569;
  --term-text-faint: #64748b;
  --term-accent: #0284c7;
  --term-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 0 0 1px #e2e8f0;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.07), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 25px 50px -12px rgba(15, 23, 42, 0.12);
}

/* ==========================================================================
   Base & Resets
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  color-scheme: light dark;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  position: relative;
}

/* Subtle Technical Ambient Mesh & Grid Pattern */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
  background-image: 
    radial-gradient(var(--bg-dots) 1px, transparent 1px);
  background-size: 24px 24px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

button, input, textarea, select {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

::selection {
  background: var(--accent-light);
  color: var(--accent);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 14px;
  z-index: 9999;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-family: var(--mono);
  box-shadow: var(--shadow-lg);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}
.skip-link:focus {
  transform: translateY(0);
}

/* ==========================================================================
   App Shell Layout
   ========================================================================== */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
}

/* ==========================================================================
   Sidebar Navigation
   ========================================================================== */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 22px 14px 18px;
  display: flex;
  flex-direction: column;
  z-index: 70;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  scrollbar-width: thin;
}

/* Brand Section */
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 6px 18px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  font-weight: 800;
  font-size: 15px;
  font-family: var(--mono);
  background: var(--accent-subtle);
  box-shadow: 0 2px 8px var(--accent-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}
.brand-mark:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand-copy strong {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-copy span {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* Nav Groups */
.primary-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 16px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.16s ease;
  position: relative;
}
.nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
  transform: translateX(2px);
}
.nav-link.active {
  color: var(--accent);
  background: var(--accent-light);
  font-weight: 600;
  border-color: var(--accent-border);
}
.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
}

.nav-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: inherit;
  flex-shrink: 0;
}
.icon-svg {
  width: 17px;
  height: 17px;
}
.external-indicator {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.7;
}

.system-nav {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0 11px 8px;
  font-family: var(--mono);
  font-weight: 600;
}
.nav-shortcut {
  margin-left: auto;
  font-size: 10px;
  font-family: var(--mono);
  color: var(--faint);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 2px 5px;
  border-radius: 4px;
}

.sidebar-spacer {
  flex: 1;
  min-height: 20px;
}

.sidebar-bottom {
  border-top: 1px solid var(--line);
  padding: 14px 6px 0;
}
.socials {
  display: flex;
  gap: 7px;
  margin-bottom: 12px;
}
.social-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  transition: all 0.18s ease;
}
.social-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
  transform: translateY(-2px);
}
.social-svg {
  width: 16px;
  height: 16px;
}

.sidebar-meta {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
  color: var(--faint);
}

/* ==========================================================================
   Main Content & Topbar
   ========================================================================== */
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  border-bottom: 1px solid var(--line);
  background: var(--surface-translucent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.topbar-inner {
  height: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.crumb {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  min-width: 0;
}
.crumb span {
  color: var(--faint);
}
.crumb strong {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Buttons */
.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  box-shadow: var(--shadow-xs);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.mini-btn:hover:not(:disabled) {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--surface-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.mini-btn:active:not(:disabled) {
  transform: translateY(0);
}
.mini-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mini-btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #ffffff;
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.mini-btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  box-shadow: 0 4px 14px var(--accent-glow);
  color: #ffffff;
}

.mini-btn.full {
  width: 100%;
}

.kbd {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
  background: var(--surface-2);
  color: var(--faint);
  line-height: 1;
}

.palette-ico, .theme-ico, .tiny-icon {
  width: 15px;
  height: 15px;
  display: inline-block;
  vertical-align: middle;
}

.mobile-toggle {
  display: none;
  font-size: 15px;
  padding: 0 9px;
  min-height: 34px;
}

/* ==========================================================================
   Page Layout & Container Spacing
   ========================================================================== */
.container, .home-container {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 28px;
}

.page {
  padding: 32px 0 80px;
  flex: 1;
}

.home-page {
  padding: 24px 0 60px;
  flex: 1;
}

/* Page Headings */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 4px 0 10px;
  color: var(--text-heading);
}
.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 720px;
}
.page-head-code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.eyebrow {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.box-title {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* ==========================================================================
   Window Container (macOS / IDE Aesthetic)
   ========================================================================== */
.window {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.window-bar {
  height: 40px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--window-bar-border);
  background: var(--window-bar);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}

.dots {
  display: flex;
  gap: 7px;
  align-items: center;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.dot.red { background: #ff5f56; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.dot.amber { background: #ffbd2e; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.dot.green { background: #27c93f; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }

.window-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.window-actions {
  white-space: nowrap;
  font-size: 10px;
  color: var(--faint);
}

/* ==========================================================================
   Home Workspace Section
   ========================================================================== */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: stretch;
}

.terminal-window,
.terminal-full {
  min-height: 600px;
  display: flex;
  flex-direction: column;
  background: var(--term-bg) !important;
  border: 1px solid var(--term-bar-border) !important;
  border-radius: 12px !important;
  box-shadow: var(--term-shadow) !important;
  overflow: hidden;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.terminal-window .window-bar,
.terminal-full .window-bar {
  background: var(--term-bar-bg) !important;
  border-bottom: 1px solid var(--term-bar-border) !important;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-window .window-title,
.terminal-full .window-title {
  color: var(--term-text-muted) !important;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.terminal-window .window-actions,
.terminal-full .window-actions {
  color: var(--term-text-faint) !important;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.terminal-window .dots .dot.red,
.terminal-full .dots .dot.red {
  background: #ef4444 !important;
}
.terminal-window .dots .dot.amber,
.terminal-full .dots .dot.amber {
  background: #f59e0b !important;
}
.terminal-window .dots .dot.green,
.terminal-full .dots .dot.green {
  background: #10b981 !important;
}

.terminal-shell {
  background: var(--term-bg);
  padding: 24px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease;
}

.terminal-output {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  scroll-behavior: smooth;
  flex: 1;
  padding-right: 4px;
}

.terminal-output::-webkit-scrollbar {
  width: 6px;
}
.terminal-output::-webkit-scrollbar-track {
  background: transparent;
}
.terminal-output::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 9999px;
}
.terminal-output::-webkit-scrollbar-thumb:hover {
  background: var(--line-strong);
}

.terminal-static {
  margin: 0 0 2px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--term-text-muted);
}
.terminal-static .accent-text,
.terminal-window .accent-text,
.terminal-full .accent-text {
  color: var(--term-accent) !important;
  font-weight: 700;
}

/* Terminal Hero Card */
.terminal-window .term-box,
.terminal-full .term-box {
  border-radius: 10px;
  padding: 20px 22px;
  background: var(--term-box-bg);
  border: 1px solid var(--term-box-border);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.terminal-window .hero-term,
.terminal-full .hero-term {
  background: var(--term-box-bg);
  border: 1px solid var(--term-box-border);
  box-shadow: none;
}

.hero-term .eyebrow {
  color: var(--term-accent) !important;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.hero-term h1 {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--term-text-main) !important;
}

.hero-term p {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--term-text-muted) !important;
}

.hero-term .hero-tagline {
  font-size: 14px;
  line-height: 1.6;
  font-weight: 700;
  color: var(--term-text-main) !important;
  margin-bottom: 14px;
  font-family: inherit;
}

.hero-tech {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.terminal-window .hero-tech .tag,
.terminal-full .hero-tech .tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border: 1px solid var(--term-tag-border) !important;
  background: var(--term-tag-bg) !important;
  border-radius: 6px;
  color: var(--term-tag-text) !important;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  transition: all 0.18s ease;
}

.terminal-window .hero-tech .tag:hover,
.terminal-full .hero-tech .tag:hover {
  border-color: var(--term-accent) !important;
  color: var(--term-accent) !important;
  background: var(--accent-light) !important;
  transform: translateY(-1px);
}

/* Command Help Box */
.terminal-window .command-help,
.terminal-full .command-help {
  border: 1px dashed var(--term-box-dashed) !important;
  background: var(--term-box-bg) !important;
}

.command-help .box-title {
  color: var(--term-accent) !important;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.term-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 32px;
}

.cmd-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 13px;
  padding: 2px 0;
}

.cmd {
  color: var(--term-accent) !important;
  font-weight: 700;
}

.cmd-desc {
  color: var(--term-text-muted) !important;
}

/* Terminal Input Line */
.terminal-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--term-input-bg) !important;
  border: 1px solid var(--term-input-border) !important;
  min-height: 44px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.2s ease;
}

.terminal-input-wrap:focus-within {
  border-color: var(--term-accent) !important;
  box-shadow: 0 0 0 3px var(--accent-glow) !important;
}

.prompt {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--term-accent) !important;
  font-weight: 700;
  white-space: nowrap;
}

.terminal-input {
  width: 100%;
  min-width: 20px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--term-input-text) !important;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
  caret-color: var(--term-accent);
}

.terminal-tip {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--term-text-faint) !important;
}

/* Interactive Autocomplete Suggestions */
.term-suggest-box {
  margin: 6px 0 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
}
.term-suggest-box .suggest-label {
  color: var(--term-text-faint);
  font-size: 11px;
  margin-right: 4px;
}
.term-suggest-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  background: var(--term-tag-bg);
  border: 1px solid var(--term-tag-border);
  border-radius: 4px;
  color: var(--term-accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.term-suggest-pill:hover {
  background: var(--accent-light);
  border-color: var(--term-accent);
  transform: translateY(-1px);
}

/* Side Stack */
.home-side-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-card {
  padding: 20px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 8px;
}
.panel-title span {
  color: var(--faint);
  font-weight: normal;
}

.panel-list {
  display: flex;
  flex-direction: column;
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
}
.kv:last-child {
  border-bottom: 0;
}
.kv > span:first-child {
  color: var(--faint);
  font-size: 11px;
}
.kv > strong, .kv > span:last-child {
  color: var(--text);
  text-align: right;
  font-weight: 600;
}

.online {
  color: var(--success) !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
}

/* Quote Card */
.home-quote-card {
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
}
.quote-mark {
  font-size: 26px;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1;
}
.home-quote-card p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
  margin: 6px 0 12px;
  font-style: italic;
}
.home-quote-card .by {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--faint);
  text-align: right;
}

/* Quick Actions */
.action-row {
  color: var(--muted);
  transition: all 0.16s ease;
  border-radius: 4px;
  padding: 9px 6px;
}
.action-row:hover {
  color: var(--accent);
  background: var(--surface-2);
  padding-left: 10px;
}

/* ==========================================================================
   About Page Layout
   ========================================================================== */
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

.about-hero-card {
  min-height: 440px;
}

.about-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  padding: 26px;
}

.identity-block {
  border-right: 1px solid var(--line);
  padding-right: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.sf-avatar {
  width: 110px;
  height: 110px;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: var(--radius-xl);
  background: var(--accent-subtle);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 800;
  box-shadow: 0 4px 16px var(--accent-glow);
  margin-bottom: 16px;
}

.identity-command {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  margin-bottom: 8px;
}
.identity-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-heading);
}
.identity-role {
  font-size: 12px;
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 600;
  margin-top: 4px;
}

.about-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about-copy p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}

.facts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.facts-grid > div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--surface-2);
  transition: all 0.18s ease;
}
.facts-grid > div:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.facts-grid span {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--faint);
  letter-spacing: 0.06em;
}
.facts-grid strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}

.about-panels {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.detail-card {
  padding: 22px;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text);
}
.check-list li::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.detail-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* ==========================================================================
   Experience Page Layout
   ========================================================================== */
.timeline-shell {
  padding: 0;
}

.timeline-list {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px 24px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.timeline-date {
  font-family: var(--mono);
  text-align: right;
  padding-top: 4px;
}
.timeline-date strong {
  display: block;
  font-size: 20px;
  color: var(--accent);
  font-weight: 800;
}
.timeline-date span {
  display: block;
  font-size: 12px;
  color: var(--faint);
  margin-top: 2px;
}

.timeline-marker {
  position: relative;
  align-self: stretch;
  display: flex;
  justify-content: center;
}
.timeline-marker::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: -24px;
  width: 2px;
  background: var(--line);
}
.timeline-marker::after {
  content: "";
  position: absolute;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
  z-index: 1;
}

.timeline-card {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}
.timeline-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.timeline-card h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 4px 0 2px;
  color: var(--text-heading);
}
.timeline-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 10px;
  font-family: var(--mono);
}
.timeline-card > p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 16px;
}

.domain-grid {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.domain-grid span {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 500;
}

.experience-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 18px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.experience-columns h4 {
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--mono);
}
.compact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.compact-list li {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  position: relative;
  padding-left: 16px;
}
.compact-list li::before {
  content: "•";
  position: absolute;
  left: 2px;
  color: var(--accent);
  font-weight: bold;
}

.mini-meta-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.mini-meta-row span, .mini-meta-row i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 4px;
}
.mini-meta-row.large span {
  font-size: 11px;
  padding: 5px 9px;
}

/* ==========================================================================
   Skills Page Layout
   ========================================================================== */
.skills-shell {
  padding: 0;
}

.skills-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  align-items: center;
}
.primary-skills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.primary-skills span {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.primary-skills strong {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 2px 10px var(--accent-glow);
}
.skills-note {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  font-style: italic;
  border-left: 2px solid var(--line-strong);
  padding-left: 14px;
}

.skill-grid {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}

.skill-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}
.skill-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.tag-grid {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.tag-grid.large span {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  transition: all 0.16s ease;
}
.tag-grid.large span:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--accent);
}

/* ==========================================================================
   Projects Page Layout
   ========================================================================== */
.project-browser {
  padding: 0;
}

.project-toolbar {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 9999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.16s ease;
}
.filter-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}
.filter-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.project-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9999px;
  padding: 0 14px;
  min-width: 260px;
  box-shadow: var(--shadow-xs);
}
.project-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.project-search span {
  color: var(--faint);
  font-size: 13px;
}
.project-search input {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 8px 0;
  width: 100%;
}

.project-grid {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.project-card[hidden] {
  display: none !important;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.project-visual {
  height: 120px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
  position: relative;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 12px 14px;
  overflow: hidden;
}
.project-index {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 800;
  color: var(--line-strong);
  line-height: 1;
}
.visual-type {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.visual-lines {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image: repeating-linear-gradient(45deg, var(--accent) 0, var(--accent) 1px, transparent 0, transparent 16px);
}

.project-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.project-kicker {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.project-content h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text-heading);
  line-height: 1.3;
}
.project-content p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 16px;
  flex: 1;
}
.project-link {
  margin-top: 16px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.16s ease;
}
.project-card:hover .project-link {
  transform: translateX(3px);
}

.empty-state {
  padding: 60px 24px;
  text-align: center;
  color: var(--muted);
}
.empty-state strong {
  display: block;
  font-size: 18px;
  color: var(--text);
  margin-bottom: 6px;
}

/* ==========================================================================
   Project Detail Case Study Pages
   ========================================================================== */
.project-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.project-detail-head h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 4px 0 10px;
  color: var(--text-heading);
}
.project-detail-head p {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 16px;
  max-width: 760px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  min-height: 280px;
  margin-bottom: 28px;
}
.detail-visual {
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line);
  padding: 30px;
}
.detail-visual span {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}
.detail-summary {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.case-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.case-tabs a {
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  font-weight: 500;
}
.case-tabs a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.case-section {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 20px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.section-index {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.85;
}
.case-section h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 4px 0 10px;
  color: var(--text-heading);
}
.case-section p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.feature-item {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.feature-item span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
}
.feature-item strong {
  font-size: 13.5px;
  color: var(--text);
}

.arch-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.arch-node {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  min-width: 130px;
}
.arch-node span {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--faint);
}
.arch-node strong {
  font-size: 14px;
  color: var(--text);
}
.arch-node small {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
}
.arch-arrow {
  color: var(--accent);
  font-size: 18px;
  font-weight: bold;
}

.next-step {
  padding: 28px;
  margin-top: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: var(--surface-2);
}
.next-step h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 4px 0 0;
}

/* ==========================================================================
   Resume Page Layout
   ========================================================================== */
.resume-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.resume-paper {
  background: #ffffff !important;
  color: #1e293b !important;
  padding: 44px 48px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line-strong);
}
:root[data-theme="dark"] .resume-paper {
  background: #0d1726 !important;
  color: #f1f5f9 !important;
}

.paper-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 24px;
}
.paper-header h2 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: inherit;
}
.paper-header p {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin: 4px 0 0;
}
.paper-contact {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  text-align: right;
  line-height: 1.6;
}

.paper-section {
  margin-bottom: 24px;
}
.paper-section h3 {
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin: 0 0 12px;
}
.paper-section p {
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0 0 8px;
}
.paper-section ul {
  margin: 6px 0 0;
  padding-left: 20px;
}
.paper-section li {
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 5px;
}

.resume-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.muted-note {
  font-size: 11.5px;
  color: var(--faint);
  margin-top: 10px;
  line-height: 1.5;
}

/* ==========================================================================
   Contact Page Layout
   ========================================================================== */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 24px;
}

.contact-hero,
.contact-form-card {
  display: flex;
  flex-direction: column;
}

.contact-hero .window-bar,
.contact-form-card .window-bar {
  border-bottom: 1px solid var(--line);
}

.contact-hero-inner {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

.contact-terminal h2 {
  font-size: 26px;
  font-weight: 800;
  margin: 4px 0 10px;
  letter-spacing: -0.02em;
  color: var(--text-heading);
}

.contact-terminal p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 18px;
}

.contact-primary {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  color: inherit;
}

.contact-method:hover {
  border-color: var(--accent);
  background: var(--surface);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.method-ico-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.contact-method:hover .method-ico-wrap {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--accent);
}

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

.method-body {
  flex: 1;
  min-width: 0;
}

.method-body strong {
  display: block;
  font-size: 13px;
  color: var(--text-heading);
  font-weight: 600;
}

.method-body span {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.method-arrow {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 14px;
  transition: transform 0.2s ease;
}

.contact-method:hover .method-arrow {
  transform: translate(2px, -2px);
}

.contact-status-card {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-heading);
}

.status-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.status-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.social-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.social-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}

.social-link-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.social-link-grid .social-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.social-link-grid .social-pill:hover {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}

.social-link-grid .social-pill .social-svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
  flex-shrink: 0;
}

.social-link-grid .social-pill span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-link-grid .social-pill .arrow {
  font-size: 11px;
  color: var(--faint);
  font-weight: normal;
  transition: transform 0.18s ease, color 0.18s ease;
  flex-shrink: 0;
}

.social-link-grid .social-pill:hover .arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.social-link-grid .social-pill:last-child:nth-child(odd) {
  grid-column: span 2;
}

.form-card-inner {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.form-title h2 {
  font-size: 26px;
  font-weight: 800;
  margin: 4px 0 6px;
  letter-spacing: -0.02em;
  color: var(--text-heading);
}

.form-subtext {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 22px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

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

.field-label {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}

.field-label .req {
  color: var(--accent);
  font-weight: bold;
}

.field-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.field-input-box .field-ico {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--faint);
  pointer-events: none;
  transition: color 0.18s ease;
}

.field-input-box input,
.field-input-box select {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px 10px 42px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13.5px;
  outline: 0;
  transition: all 0.18s ease;
}

.textarea-box {
  width: 100%;
  align-items: stretch;
}

.field-input-box textarea,
.textarea-box textarea {
  width: 100%;
  min-height: 130px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  outline: 0;
  resize: vertical;
  transition: all 0.18s ease;
}

.field-input-box input::placeholder,
.field-input-box textarea::placeholder {
  color: var(--faint);
  opacity: 0.7;
}

.field-input-box:focus-within .field-ico {
  color: var(--accent);
}

.field-input-box input:focus,
.field-input-box select:focus,
.field-input-box textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.select-box select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 36px;
}

.select-arrow {
  position: absolute;
  right: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  pointer-events: none;
}

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

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 24px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
}

.submit-btn .btn-arrow {
  font-family: var(--mono);
  transition: transform 0.18s ease;
}

.submit-btn:hover .btn-arrow {
  transform: translateX(3px);
}

.form-note {
  font-size: 11.5px;
  color: var(--muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.note-ico {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex-shrink: 0;
}

.form-state {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  min-height: 20px;
}

.contact-footer-note {
  margin-top: 4px;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact-footer-note strong {
  display: block;
  font-size: 13.5px;
  color: var(--text-heading);
  margin-top: 2px;
}

/* ==========================================================================
   Full Terminal Mode & Dynamic Terminal Outputs
   ========================================================================== */
.terminal-full-page {
  padding-bottom: 40px;
}
.terminal-full {
  min-height: calc(100vh - 160px);
}
.terminal-shell.full {
  min-height: calc(100vh - 200px);
}

.prompt-line {
  font-family: var(--mono);
  font-size: 13.5px;
  margin-top: 6px;
  display: flex;
  gap: 10px;
  align-items: baseline;
  color: var(--term-text-main);
}
.prompt-line .pfx {
  color: var(--term-accent);
  font-weight: 700;
  white-space: nowrap;
}

.plain-output {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--term-text-main);
  padding: 4px 0;
}
.plain-output.success { color: #10b981 !important; }
.plain-output.error { color: #ef4444 !important; }
.plain-output.warn { color: #f59e0b !important; }

.rich-output {
  margin: 8px 0;
}
.terminal-shell .rich-card {
  border: 1px solid var(--term-box-border);
  background: var(--term-box-bg);
  border-radius: 10px;
  padding: 20px;
  color: var(--term-text-main);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.terminal-shell .rich-card h3 {
  margin: 4px 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--term-text-main);
}
.terminal-shell .rich-card .eyebrow,
.terminal-shell .rich-card .box-title {
  color: var(--term-accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.terminal-shell .rich-card p {
  color: var(--term-text-muted);
  line-height: 1.6;
}
.terminal-shell .rich-list > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 4px 0;
}
.terminal-shell .rich-list b { color: var(--term-accent); }
.terminal-shell .rich-list span { color: var(--term-text-muted); }

.about-terminal-output {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.about-terminal-output .identity-role {
  color: var(--term-accent);
  font-family: var(--mono);
  font-size: 12.5px;
  margin-bottom: 8px;
}
.about-terminal-output .sf-avatar {
  background: var(--term-tag-bg);
  border: 1px solid var(--term-tag-border);
  color: var(--term-accent);
  width: 72px;
  height: 72px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
}
.facts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.terminal-shell .facts-grid > div {
  padding: 8px 12px;
  border: 1px solid var(--term-box-border);
  border-radius: 6px;
  background: var(--term-box-bg);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.terminal-shell .facts-grid span {
  font-size: 11px;
  color: var(--term-text-faint);
  font-family: var(--mono);
}
.terminal-shell .facts-grid strong {
  font-size: 13px;
  color: var(--term-text-main);
}

.skill-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.terminal-shell .skill-column {
  border: 1px solid var(--term-box-border);
  border-radius: 8px;
  padding: 14px;
  background: var(--term-box-bg);
}
.terminal-shell .skill-column h4 {
  margin: 0 0 10px;
  color: var(--term-accent);
  font-family: var(--mono);
  font-size: 12px;
}
.terminal-shell .skill-column ul {
  margin: 0;
  padding-left: 18px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--term-text-muted);
}

.project-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.terminal-shell .project-tile {
  border: 1px solid var(--term-box-border);
  border-radius: 8px;
  background: var(--term-box-bg);
  padding: 14px;
  transition: all 0.16s ease;
  color: inherit;
  text-decoration: none;
}
.terminal-shell .project-tile:hover {
  border-color: var(--term-accent);
  transform: translateY(-2px);
}
.terminal-shell .project-tile h4 {
  margin: 4px 0;
  font-size: 15px;
  color: var(--term-text-main);
}
.terminal-shell .project-tile p {
  font-size: 12px;
  color: var(--term-text-muted);
  margin: 0 0 8px;
}
.terminal-shell .project-link {
  color: var(--term-accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

.experience-mini .row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
}
.experience-mini .date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--term-accent);
  font-weight: bold;
}
.experience-mini strong {
  color: var(--term-text-main);
}
.experience-mini small {
  color: var(--term-text-faint);
  display: block;
  font-size: 11.5px;
  margin-bottom: 6px;
}
.experience-mini p {
  color: var(--term-text-muted);
  font-size: 13px;
  margin: 0 0 8px;
}
.mini-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mini-meta-row span {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--term-tag-bg);
  border: 1px solid var(--term-tag-border);
  color: var(--term-tag-text);
  padding: 2px 8px;
  border-radius: 4px;
}

.resume-mini {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 12px 0;
}
.terminal-shell .resume-mini .sheet {
  width: 70px;
  height: 90px;
  border: 1px solid var(--term-box-border);
  background: var(--term-box-bg);
  border-radius: 4px;
  padding: 8px;
}
.terminal-shell .resume-mini .rhead { height: 6px; width: 60%; background: var(--term-accent); margin-bottom: 6px; }
.terminal-shell .resume-mini .line { height: 4px; background: var(--term-box-border); margin-bottom: 4px; }
.terminal-shell .resume-mini .line.w { width: 90%; }
.terminal-shell .resume-mini .line.m { width: 70%; }
.terminal-shell .resume-mini .note {
  font-size: 12px;
  color: var(--term-text-muted);
  line-height: 1.5;
}
.terminal-shell .resume-mini code {
  color: var(--term-accent);
  background: var(--term-tag-bg);
  padding: 1px 5px;
  border-radius: 3px;
}

.contact-mini {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.terminal-shell .contact-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid var(--term-box-border);
  border-radius: 6px;
  background: var(--term-box-bg);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--term-text-main);
  text-decoration: none;
}
.terminal-shell .contact-row:hover {
  border-color: var(--term-accent);
  color: var(--term-accent);
}

.terminal-shell .window-footer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.terminal-shell .mini-btn {
  background: var(--term-tag-bg);
  border: 1px solid var(--term-tag-border);
  color: var(--term-text-main);
}
.terminal-shell .mini-btn:hover {
  border-color: var(--term-accent);
  color: var(--term-accent);
}
.terminal-shell .mini-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 700;
}
.terminal-shell .tag {
  background: var(--term-tag-bg);
  border: 1px solid var(--term-tag-border);
  color: var(--term-tag-text);
}

.terminal-shell .project-tile .visual {
  height: 90px;
  background: var(--term-input-bg);
  border-radius: 6px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.terminal-shell .project-tile .visual .grid {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image: radial-gradient(var(--term-accent) 1px, transparent 1px);
  background-size: 12px 12px;
}
.terminal-shell .project-tile .terminal-sim {
  position: relative;
  display: flex;
  gap: 4px;
}
.terminal-shell .project-tile .terminal-sim i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--term-accent);
  opacity: 0.6;
  display: inline-block;
}
.terminal-shell .project-tile .body {
  display: flex;
  flex-direction: column;
}
.terminal-shell .project-tile .eyebrow {
  color: var(--term-accent);
  font-family: var(--mono);
  font-size: 11px;
}

.rich-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.terminal-shell .rich-tile {
  border: 1px solid var(--term-box-border);
  background: var(--term-box-bg);
  border-radius: 6px;
  padding: 12px 14px;
}
.terminal-shell .rich-tile h4 {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--term-text-main);
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.theme-toggle:hover .theme-ico {
  transform: rotate(20deg);
  transition: transform 0.25s ease;
}

.theme-label {
  text-transform: uppercase;
  font-family: var(--mono);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.project-detail-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.visual-lines.big {
  opacity: 0.25;
}


/* ==========================================================================
   Command Palette Modal
   ========================================================================== */
.command-palette {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  z-index: 120;
}
.command-palette.open {
  display: flex;
}

.palette-card {
  width: min(620px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.palette-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}
.palette-input {
  width: 100%;
  height: 52px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14.5px;
}

.palette-list {
  max-height: 52vh;
  overflow-y: auto;
  padding: 8px;
}

.palette-item {
  width: 100%;
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 13px;
  transition: all 0.14s ease;
}
.palette-item:hover, .palette-item.active {
  background: var(--surface-2);
  color: var(--text);
}
.palette-item .p-cmd {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
}
.palette-item .p-desc {
  color: var(--muted);
  font-size: 12px;
}
.palette-item kbd {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
}

.palette-hint {
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  background: var(--surface-2);
}
.palette-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

/* Toast */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 180;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Overlay for Mobile Drawer */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 14, 24, 0.6);
  z-index: 80;
  display: none;
  cursor: pointer;
}
body.sidebar-open {
  overflow: hidden;
}
body.sidebar-open .overlay {
  display: block;
}

/* Site Footer */
.site-footer {
  padding: 20px 28px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  margin-top: auto;
}

/* Redirect & 404 */
.redirect-card, .not-found {
  padding: 60px 30px;
  text-align: center;
  max-width: 600px;
  margin: 40px auto;
}
.nf-code {
  font-family: var(--mono);
  font-size: 72px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
}
.mini-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}

/* Animations */
.reveal {
  animation: fadeIn 0.4s ease both;
}
.delay-1 {
  animation-delay: 0.08s;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Laptop / Medium Desktop (<= 1200px) */
@media (max-width: 1200px) {
  :root {
    --sidebar-w: 230px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Tablet (<= 992px) */
@media (max-width: 992px) {
  :root {
    --sidebar-w: 0px;
  }
  .app-shell {
    display: block;
    position: static;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 290px;
    height: 100vh;
    z-index: 100 !important;
    background: var(--surface);
    transform: translateX(-105%);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.4);
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
    z-index: 100 !important;
  }
  .mobile-toggle {
    display: inline-flex;
  }

  .workspace {
    grid-template-columns: 1fr;
  }
  .home-side-stack {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
  .about-layout, .resume-layout, .contact-layout {
    grid-template-columns: 1fr;
  }
  .skills-top {
    grid-template-columns: 1fr;
  }
  .detail-hero {
    grid-template-columns: 1fr;
  }
  .detail-visual {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    min-height: 200px;
  }
  .experience-columns {
    grid-template-columns: 1fr;
  }
}

/* Mobile Devices (<= 768px) */
@media (max-width: 768px) {
  .container, .home-container {
    padding: 0 16px;
  }
  .topbar-inner {
    padding: 0 16px;
  }
  .top-actions .mini-btn span.kbd,
  .top-actions .mini-btn span:not(.theme-ico):not(.palette-ico) {
    display: none;
  }
  .top-actions .mini-btn {
    min-width: 36px;
    padding: 0 10px;
  }

  .page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .page-head h1 {
    font-size: 32px;
  }

  .terminal-shell {
    padding: 18px 16px;
  }
  .terminal-window {
    min-height: 520px;
  }
  .hero-term {
    padding: 16px 18px;
  }
  .hero-term h1 {
    font-size: 21px;
  }
  .term-grid {
    grid-template-columns: 1fr;
  }
  .cmd-row {
    grid-template-columns: 100px 1fr;
  }

  .home-side-stack {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    padding: 18px;
    gap: 20px;
  }
  .identity-block {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
    padding-bottom: 20px;
  }

  .timeline-list {
    padding: 20px 16px;
  }
  .timeline-item {
    grid-template-columns: 90px 20px minmax(0, 1fr);
    gap: 10px;
  }
  .timeline-date strong {
    font-size: 17px;
  }
  .timeline-card {
    padding: 16px;
  }

  .project-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .project-search {
    min-width: 0;
  }
  .project-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
  .case-section {
    grid-template-columns: 36px 1fr;
    gap: 14px;
    padding: 24px 0;
  }

  .resume-paper {
    padding: 24px 20px;
  }
  .paper-header {
    flex-direction: column;
    gap: 12px;
  }
  .paper-contact {
    text-align: left;
  }

  .contact-hero-inner,
  .form-card-inner {
    padding: 20px 18px;
  }
  .form-grid-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .form-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .submit-btn {
    width: 100%;
  }
  .social-link-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .command-palette {
    padding-top: 6vh;
  }
  .palette-item {
    grid-template-columns: 110px 1fr;
  }
  .palette-item kbd {
    display: none;
  }
}

/* Small Mobile (<= 480px) */
@media (max-width: 480px) {
  .page-head h1 {
    font-size: 27px;
  }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .timeline-marker {
    display: none;
  }
  .timeline-date {
    text-align: left;
    display: flex;
    gap: 8px;
    align-items: baseline;
  }
  .facts-grid {
    grid-template-columns: 1fr;
  }
  .skill-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .skill-columns {
    grid-template-columns: 1fr;
  }
  .next-step {
    flex-direction: column;
    align-items: flex-start;
  }
  .social-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #111111 !important;
  }
  body::before, .sidebar, .topbar, .command-palette, .toast, .site-footer, .resume-side, .overlay {
    display: none !important;
  }
  .main, .app-shell, .page, .container {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
  }
  .resume-paper {
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
  }
}
