/* ═══════════════════════════════════════
   PORTFOLIO BUILDER UI STYLES
   ═══════════════════════════════════════ */
:root {
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --accent: #3b82f6;
    --accent-dark: #2563eb;
    --border: var(--gray-200);
    --font: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
    --mono: 'DM Mono', monospace;
    --radius: 12px;
}

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

body { font-family: var(--font); background: linear-gradient(135deg, #fce7f3 0%, #e0e7ff 50%, #d1fae5 100%); color: var(--gray-900); line-height: 1.5; height: 100vh; overflow: hidden; display: flex; flex-direction: column; }

/* Builder Layout */
.pb-nav { height: 72px; background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255, 255, 255, 0.3); display: flex; align-items: center; padding: 0 32px; gap: 20px; flex-shrink: 0; z-index: 100; margin: 16px 20px; border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,0.04); }
.pb-nav-logo { font-size: 1.1rem; font-weight: 800; color: var(--gray-900); text-decoration: none; display: flex; align-items: center; gap: 12px; letter-spacing: -0.02em; }
.pb-nav-badge { width: 32px; height: 32px; border-radius: 10px; background: var(--gray-900); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 0.65rem; color: #fff; }
.pb-tag { font-family: var(--mono); font-size: 0.7rem; color: var(--accent); font-weight: 700; background: rgba(59, 130, 246, 0.1); padding: 5px 14px; border-radius: 100px; text-transform: uppercase; }
.pb-spacer { flex: 1; }
.pb-btn { font-size: 0.9rem; font-weight: 700; padding: 10px 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.6); color: var(--gray-700); cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: inline-flex; align-items: center; gap: 8px; backdrop-filter: blur(10px); }
.pb-btn:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.pb-btn-primary { background: #111827; color: #fff; border: none; }
.pb-btn-primary:hover { background: #000; box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.pb-btn-accent { background: #3b82f6; color: #fff; border: none; }
.pb-btn-accent:hover { background: #2563eb; box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3); }

.pb-layout { display: grid; grid-template-columns: 420px 1fr; flex: 1; overflow: hidden; padding: 0 20px 20px; gap: 20px; min-height: 0; }
.pb-sidebar { background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(24px); border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 24px; overflow-y: auto; display: flex; flex-direction: column; box-shadow: 0 8px 32px rgba(0,0,0,0.04); min-height: 0; }
.pb-panel-header { padding: 28px; border-bottom: 1px solid rgba(255, 255, 255, 0.3); position: sticky; top: 0; background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(16px); z-index: 10; }
.pb-panel-header h2 { font-size: 1.25rem; font-weight: 800; color: var(--gray-900); letter-spacing: -0.03em; }
.pb-panel-header p { font-size: 0.9rem; color: var(--gray-500); margin-top: 6px; }

.pb-tpl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.3); }
.pb-tpl-item { padding: 16px 8px; border: 2px solid transparent; background: rgba(255, 255, 255, 0.5); border-radius: 16px; text-align: center; cursor: pointer; transition: all 0.2s; font-size: 0.8rem; font-weight: 700; color: var(--gray-500); border: 1px solid rgba(255,255,255,0.4); }
.pb-tpl-item:hover { background: rgba(255,255,255,0.8); transform: translateY(-2px); }
.pb-tpl-item.active { border-color: var(--accent); background: #fff; color: var(--accent); box-shadow: 0 8px 20px rgba(59, 130, 246, 0.1); }
.pb-tpl-icon { font-size: 1.6rem; margin-bottom: 6px; }

.pb-sections { flex: 1; padding: 0; }
.pb-sec { border-bottom: 1px solid rgba(255, 255, 255, 0.3); }
.pb-sec-head { display: flex; align-items: center; gap: 14px; padding: 20px 28px; cursor: pointer; transition: background 0.15s; user-select: none; }
.pb-sec-head:hover { background: rgba(255, 255, 255, 0.3); }
.pb-sec-label { flex: 1; font-size: 1rem; font-weight: 700; color: var(--gray-800); }
.pb-sec-toggle { font-size: 0.8rem; color: var(--gray-400); transition: transform 0.2s; }
.pb-sec.open .pb-sec-toggle { transform: rotate(180deg); }
.pb-sec-body { display: none; padding: 0 28px 28px; }
.pb-sec.open .pb-sec-body { display: block; }

.pb-fg { margin-bottom: 18px; }
.pb-fl { display: block; font-size: 0.85rem; font-weight: 700; color: var(--gray-600); margin-bottom: 8px; }
.pb-fi { width: 100%; padding: 12px 16px; border: 1px solid rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.6); border-radius: 12px; font-family: var(--font); font-size: 0.95rem; color: var(--gray-900); outline: none; transition: all 0.2s; }
.pb-fi:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1); }
textarea.pb-fi { resize: vertical; min-height: 100px; line-height: 1.6; }
.pb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pb-entry { background: rgba(255, 255, 255, 0.4); border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 16px; padding: 20px; margin-bottom: 16px; position: relative; }
.pb-entry-del { position: absolute; top: 16px; right: 16px; font-size: 0.75rem; color: #ef4444; cursor: pointer; background: #fff; border: 1px solid rgba(239, 68, 68, 0.2); border-radius: 8px; padding: 5px 10px; font-weight: 700; }
.pb-add-entry { font-size: 0.9rem; color: var(--accent); cursor: pointer; font-weight: 700; padding: 12px 0; display: flex; align-items: center; gap: 10px; }

.pb-preview { background: #e2e8f0; padding: 40px; overflow-y: auto; display: flex; justify-content: center; align-items: flex-start; }
.pb-preview-frame { width: 100%; max-width: 1000px; background: #fff; box-shadow: 0 20px 50px rgba(0,0,0,0.1); border-radius: 8px; min-height: 100%; overflow: visible; position: relative; transform: translate(0, 0); }

/* Lock Screen */
.pb-lock {
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(65, 105, 225, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.15) 0%, transparent 40%),
    #050811;
  backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  text-align: center;
  padding: 40px;
  color: #fff;
}
.pb-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  padding: 8px 16px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}
.pb-lock-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fbbf24, #f43f5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulse-lock 2s infinite alternate;
}
.pb-lock-title {
  font-size: 2rem;
  font-weight: 850;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.pb-lock-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 32px;
  max-width: 440px;
  line-height: 1.6;
}
.pb-lock-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  background: linear-gradient(135deg, #fbbf24, #f43f5e);
  color: #fff;
  font-weight: 800;
  border-radius: 16px;
  text-decoration: none;
  font-size: 1rem;
  box-shadow: 0 20px 40px rgba(244, 63, 94, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.pb-lock-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 25px 50px rgba(244, 63, 94, 0.4);
}
.pb-lock-back {
  transition: color 0.2s;
}
.pb-lock-back:hover {
  color: #fff !important;
}
@keyframes pulse-lock {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(1.06); opacity: 1; }
}

/* Toggle & Switch */
.pb-toggle { display: flex; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.pb-toggle label { font-size: 0.9rem; font-weight: 700; color: var(--gray-800); flex: 1; }
.pb-switch { width: 44px; height: 24px; background: var(--gray-200); border-radius: 12px; position: relative; cursor: pointer; transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.pb-switch.on { background: var(--accent); }
.pb-switch::after { content: ''; position: absolute; width: 18px; height: 18px; background: #fff; border-radius: 50%; top: 3px; left: 3px; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.pb-switch.on::after { transform: translateX(20px); }

/* ── PORTFOLIO COMMON STYLES ── */
.portfolio-wrap { scroll-behavior: smooth; color: var(--gray-900); background: var(--white); font-family: var(--font); }
.p-container { max-width: 1000px; margin: 0 auto; padding: 0 40px; }
.p-section { padding: 100px 0; }
.p-sec-title { font-size: 2rem; font-weight: 800; margin-bottom: 48px; letter-spacing: -0.03em; }

/* Nav */
.p-nav { position: sticky; top: 0; z-index: 1000; transition: all 0.3s; background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(0,0,0,0.05); }
.p-nav-toggle { display: none; background: none; border: none; font-size: 1.8rem; color: var(--gray-900); cursor: pointer; z-index: 2001; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.p-nav-toggle .bi-x { display: none; }
.p-nav.mobile-open .p-nav-toggle { transform: rotate(90deg); }
.p-nav.mobile-open .p-nav-toggle .bi-list { display: none; }
.p-nav.mobile-open .p-nav-toggle .bi-x { display: block; }

.p-mobile-menu { 
  display: none; 
  position: absolute; 
  top: 100%; 
  left: 0; 
  right: 0; 
  background: var(--white); 
  border-bottom: 1px solid var(--gray-200); 
  padding: 24px; 
  flex-direction: column; 
  gap: 12px; 
  z-index: 2000; 
  box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
  backdrop-filter: blur(20px); 
}
.p-nav.mobile-open .p-mobile-menu { 
  display: flex; 
}
.p-mobile-nav-top.mobile-open .p-mobile-menu {
  display: flex;
}
.p-mobile-link { 
  text-decoration: none; 
  color: var(--gray-900); 
  font-weight: 700; 
  font-size: 1.1rem; 
  padding: 12px 20px; 
  border-radius: 12px; 
  transition: all 0.2s; 
}
.p-mobile-link:hover { 
  background: var(--gray-50); 
  color: var(--accent); 
}

.p-nav-container { max-width: 1200px; margin: 0 auto; height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 40px; }
.p-nav-logo { font-weight: 900; font-size: 1.25rem; letter-spacing: -0.04em; }
.p-nav-links { display: flex; gap: 32px; }
.p-nav-link { text-decoration: none; color: var(--gray-600); font-weight: 600; font-size: 0.9rem; transition: color 0.2s; }
.p-nav-link:hover { color: var(--gray-900); }

/* Dropdowns */
.p-nav-dropdown { position: relative; display: inline-block; }
.p-nav-drop-btn { cursor: pointer; display: flex; align-items: center; gap: 6px; }
.p-nav-drop-content { position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(10px); background: #fff; border: 1px solid var(--gray-100); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); padding: 8px; min-width: 180px; opacity: 0; visibility: hidden; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1001; }
.p-nav-dropdown:hover .p-nav-drop-content { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.p-nav-drop-content a { display: block; padding: 10px 16px; text-decoration: none; color: var(--gray-600); font-weight: 600; font-size: 0.85rem; border-radius: 8px; transition: all 0.2s; }
.p-nav-drop-content a:hover { background: var(--gray-50); color: var(--gray-900); padding-left: 20px; }

/* Dark template dropdowns */
.ptpl-midnight .p-nav-drop-content, .ptpl-neon .p-nav-drop-content { background: var(--gray-800); border-color: var(--gray-700); }
.ptpl-midnight .p-nav-drop-content a, .ptpl-neon .p-nav-drop-content a { color: var(--gray-400); }
.ptpl-midnight .p-nav-drop-content a:hover, .ptpl-neon .p-nav-drop-content a:hover { background: var(--gray-700); color: #fff; }



/* Hero */
.p-hero { padding: 120px 0 80px; text-align: center; }
.p-avatar-wrap { margin-bottom: 32px; }
.p-avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.p-name { font-size: 4rem; font-weight: 900; letter-spacing: -0.05em; line-height: 1; margin-bottom: 16px; }
.p-role { font-size: 1.5rem; color: var(--gray-500); font-weight: 600; margin-bottom: 24px; }
.p-tagline { font-size: 1.1rem; color: var(--gray-600); max-width: 600px; margin: 0 auto 40px; line-height: 1.6; }
.p-hero-actions { display: flex; justify-content: center; gap: 16px; }

/* Components */
.p-btn { padding: 12px 28px; border-radius: 50px; font-weight: 700; text-decoration: none; font-size: 0.95rem; transition: all 0.2s; display: inline-flex; align-items: center; }
.p-btn-primary { background: var(--gray-900); color: #fff; }
.p-btn-primary:hover { transform: scale(1.05); }
.p-btn-outline { border: 2px solid var(--gray-200); color: var(--gray-700); }
.p-btn-outline:hover { background: var(--gray-50); border-color: var(--gray-400); }

.p-card { background: var(--gray-50); border-radius: var(--radius); padding: 32px; border: 1px solid var(--gray-200); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.p-card:hover { transform: translateY(-5px); border-color: var(--gray-300); background: #fff; box-shadow: 0 20px 40px rgba(0,0,0,0.05); }

.p-tags { display: flex; flex-wrap: wrap; gap: 12px; }
.p-tag { padding: 8px 20px; border-radius: 50px; background: var(--gray-100); color: var(--gray-700); font-weight: 600; font-size: 0.85rem; border: 1px solid var(--gray-200); }
.p-tag-sm { font-size: 0.75rem; padding: 4px 12px; background: var(--gray-100); color: var(--gray-600); border-radius: 4px; font-weight: 600; }

/* Experience */
.p-timeline { position: relative; padding-left: 32px; }
.p-timeline::before { content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 2px; background: var(--gray-200); }
.p-timeline-item { position: relative; margin-bottom: 40px; }
.p-timeline-dot { position: absolute; left: -36px; top: 20px; width: 10px; height: 10px; border-radius: 50%; background: var(--gray-900); border: 2px solid #fff; box-shadow: 0 0 0 4px var(--gray-200); }
.p-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.p-card-title { font-size: 1.25rem; font-weight: 800; color: var(--gray-900); }
.p-card-date { font-size: 0.85rem; color: var(--gray-500); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.p-card-subtitle { font-weight: 700; color: var(--accent); margin-bottom: 12px; font-size: 1rem; }
.p-card-desc { color: var(--gray-600); font-size: 0.95rem; line-height: 1.6; }

/* Projects */
.p-grid { display: grid; gap: 24px; }
.p-project-grid { grid-template-columns: repeat(2, 1fr); }
.p-project-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.p-project-img { width: 100%; height: 200px; object-fit: cover; }
.p-project-img-placeholder { width: 100%; height: 200px; background: linear-gradient(135deg, #f3f4f6, #e5e7eb); }
.p-project-content { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.p-project-links { margin-top: auto; padding-top: 16px; display: flex; gap: 16px; }
.p-link { text-decoration: none; color: var(--gray-900); font-weight: 700; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 6px; transition: color 0.2s; }
.p-link:hover { color: var(--accent, #3b82f6); }

/* Contact */
.p-contact-card { text-align: center; }
.p-contact-intro { font-size: 1.2rem; color: var(--gray-600); margin-bottom: 32px; }
.p-contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.p-contact-item { text-decoration: none; color: var(--gray-900); font-weight: 700; font-size: 1rem; padding: 12px 24px; border: 1px solid var(--gray-200); border-radius: 12px; transition: all 0.2s; display: inline-flex; align-items: center; gap: 10px; }
.p-contact-item i { font-size: 1.1rem; }
.p-contact-item:hover { background: var(--gray-100); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.06); }

/* Footer */
.p-footer { padding: 60px 0; border-top: 1px solid var(--gray-100); text-align: center; color: var(--gray-500); font-size: 0.9rem; }
.p-powered-by { margin-top: 8px; font-size: 0.8rem; }
.p-powered-by a { color: var(--gray-900); text-decoration: none; font-weight: 700; }

/* ── ARCHITECTURES ── */
.p-sidebar-layout { display: flex; min-height: 100vh; position: relative; }
.p-aside { width: 280px; height: 100vh; position: sticky; left: 0; top: 0; background: var(--white); border-right: 1px solid var(--gray-100); padding: 40px; display: flex; flex-direction: column; z-index: 1000; }
.p-aside-logo { font-size: 1.5rem; font-weight: 900; margin-bottom: 60px; letter-spacing: -0.05em; }
.p-aside-nav { display: flex; flex-direction: column; gap: 8px; flex: 1; overflow-y: auto; }
.p-aside-link { text-decoration: none; color: var(--gray-500); font-weight: 700; font-size: 0.95rem; transition: all 0.2s; padding: 8px 0; display: block; }
.p-aside-link:hover { color: var(--gray-900); padding-left: 4px; }
.p-aside-group { margin: 12px 0; }
.p-aside-group-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gray-400); font-weight: 800; margin-bottom: 8px; }
.p-aside-group-items { padding-left: 12px; border-left: 1px solid var(--gray-100); display: flex; flex-direction: column; gap: 4px; }
.p-aside-sublink { font-size: 0.85rem; padding: 4px 0; }
.p-aside-footer { font-size: 0.8rem; color: var(--gray-400); margin-top: 40px; }
.parch-sidebar .p-main { flex: 1; width: calc(100% - 280px); }
.parch-sidebar .p-container { max-width: 900px; margin-left: 0; padding: 0 60px; }

.parch-split .p-nav-logo { display: none; }

/* Mobile Navigation for Sidebar/Split Architectures */
.p-mobile-nav-top { display: none; height: 60px; background: #fff; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--gray-100); position: sticky; top: 0; z-index: 1000; width: 100%; }
.p-mobile-nav-logo { font-weight: 900; font-size: 1.1rem; }
.p-mobile-nav-toggle { font-size: 1.5rem; background: none; border: none; cursor: pointer; color: var(--gray-900); display: flex; align-items: center; }
.p-mobile-nav-toggle .bi-x { display: none; }
.p-mobile-nav-top.mobile-open .bi-list { display: none; }
.p-mobile-nav-top.mobile-open .bi-x { display: block; }
.p-mobile-nav-top.mobile-open .p-mobile-menu { display: flex; }

.p-dashboard-layout { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; padding: 60px 0; align-items: start; }
.parch-dashboard .p-section { padding: 40px; grid-column: span 6; height: 100%; background: var(--white); border-radius: 24px; border: 1px solid var(--gray-100); box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
.parch-dashboard .p-container { max-width: none; padding: 0; }
.parch-dashboard #hero,
.parch-dashboard #projects,
.parch-dashboard #experience,
.parch-dashboard #education,
.parch-dashboard #certifications,
.parch-dashboard #testimonials,
.parch-dashboard #services,
.parch-dashboard #github_sync { grid-column: span 12; }
.parch-dashboard #about { grid-column: span 7; }
.parch-dashboard #skills { grid-column: span 5; }
.parch-dashboard .p-sec-title { font-size: 1.25rem; margin-bottom: 24px; border-bottom: 1px solid var(--gray-100); padding-bottom: 12px; }
.parch-dashboard .p-footer { grid-column: span 12; width: 100%; }

/* ── PREVIEW SIMULATION (When in builder mobile preview) ── */
.pb-layout.preview-mode .pb-preview-frame .p-sidebar-layout,
.pb-layout.preview-mode .pb-preview-frame .p-split-layout { flex-direction: column !important; }

.pb-layout.preview-mode .pb-preview-frame .p-aside {
  display: none !important;
}
.pb-layout.preview-mode .pb-preview-frame .p-split-hero { 
  width: 100% !important; 
  height: auto !important; 
  position: static !important; 
  padding: 40px 24px !important;
}

.pb-layout.preview-mode .pb-preview-frame .p-nav-links { display: none !important; }
.pb-layout.preview-mode .pb-preview-frame .p-nav-toggle { display: block !important; }
.pb-layout.preview-mode .pb-preview-frame .p-mobile-menu { position: absolute !important; top: 100% !important; height: auto !important; }

.pb-layout.preview-mode .pb-preview-frame .p-main,
.pb-layout.preview-mode .pb-preview-frame .p-split-content { width: 100% !important; }

.pb-layout.preview-mode .pb-preview-frame .p-name { font-size: 2.2rem !important; text-align: center !important; }
.pb-layout.preview-mode .pb-preview-frame .p-role { text-align: center !important; }
.pb-layout.preview-mode .pb-preview-frame .p-tagline { text-align: center !important; }
.pb-layout.preview-mode .pb-preview-frame .p-hero-actions { justify-content: center !important; flex-direction: column !important; }
.pb-layout.preview-mode .pb-preview-frame .p-btn { width: 100% !important; justify-content: center !important; }
.pb-layout.preview-mode .pb-preview-frame .p-container { padding: 0 20px !important; }

.pb-layout.preview-mode .pb-preview-frame .p-project-grid,
.pb-layout.preview-mode .pb-preview-frame .p-services-grid,
.pb-layout.preview-mode .pb-preview-frame .p-testimonial-grid,
.pb-layout.preview-mode .pb-preview-frame .p-edu-grid,
.pb-layout.preview-mode .pb-preview-frame .p-project-grid-compact,
.pb-layout.preview-mode .pb-preview-frame .ptpl-bento .p-bento-grid { grid-template-columns: 1fr !important; }

/* ── TEMPLATES ── */

/* Midnight: Professional Dark */
.ptpl-midnight { background: #0b0f1a; color: #f9fafb; --white: #0b0f1a; --gray-50: #161d2f; --gray-100: #1f2937; --gray-200: #374151; --gray-700: #cbd5e1; --gray-600: #9ca3af; --gray-900: #f9fafb; --accent: #60a5fa; }
.ptpl-midnight .p-nav { background: rgba(11, 15, 26, 0.8); border-bottom-color: rgba(255,255,255,0.05); }
.ptpl-midnight .p-card { background: #161d2f; border-color: #242e42; }
.ptpl-midnight .p-btn-primary { background: #f9fafb; color: #0b0f1a; }
.ptpl-midnight .p-btn-outline { border-color: #374151; color: #f3f4f6; }
.ptpl-midnight .p-avatar { border-color: #161d2f; }
.ptpl-midnight .p-timeline::before { background: #374151; }
.ptpl-midnight .p-pill { background: #161d2f; color: #60a5fa; border-color: #242e42; box-shadow: none; }
.ptpl-midnight .p-pill:hover { background: #1f2937; border-color: #60a5fa; }

/* Daylight: Clean & Minimal (Default is mostly Daylight) */
.ptpl-daylight { --accent: #000; }
.ptpl-daylight .p-nav-logo { letter-spacing: -0.05em; }



/* Bento: Structured Grid */
.ptpl-bento { background: #f8fafc; color: #0f172a; --white: #fff; --gray-50: #f1f5f9; --gray-100: #e2e8f0; --gray-200: #cbd5e1; --gray-600: #475569; --gray-900: #0f172a; --accent: #3b82f6; }
.ptpl-bento .p-dashboard-layout { padding: 40px 24px; }
.ptpl-bento .p-nav { background: rgba(248, 250, 252, 0.8); backdrop-filter: blur(12px); border-bottom: none; }
.ptpl-bento .p-bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ptpl-bento .p-bento-grid .p-card:nth-child(1) { grid-column: span 2; }
.ptpl-bento .p-bento-grid .p-card:nth-child(4) { grid-column: span 2; }

/* Elegant: High-End Editorial */
.ptpl-elegant { font-family: 'Plus Jakarta Sans', sans-serif; --gray-900: #0f172a; --accent: #0f172a; }
.ptpl-elegant .p-name { font-family: Georgia, serif; font-weight: 400; font-size: clamp(3rem, 7vw, 5rem); letter-spacing: -0.04em; margin-bottom: 24px; color: #000; }
.ptpl-elegant .p-sec-title { font-family: Georgia, serif; font-size: 2rem; border-bottom: 1px solid #000; padding-bottom: 12px; margin-bottom: 60px; }
.ptpl-elegant .p-hero { padding: 160px 0 100px; border-bottom: 1px solid var(--gray-100); text-align: left; }
.ptpl-elegant .p-hero-actions { justify-content: flex-start; }
.ptpl-elegant .p-tagline { margin-left: 0; text-align: left; max-width: 600px; font-size: 1.2rem; color: var(--gray-600); }
.ptpl-elegant .p-card { border-radius: 0; border: none; border-bottom: 1px solid var(--gray-100); padding: 32px 0; background: transparent; }
.ptpl-elegant .p-card:hover { transform: none; box-shadow: none; border-bottom-color: #000; }

.pb-preview { background: rgba(0,0,0,0.02); padding: 60px; overflow-y: auto; display: flex; justify-content: center; align-items: flex-start; min-height: 0; }
.pb-preview-frame { width: 100%; max-width: 1000px; background: #fff; box-shadow: 0 30px 60px rgba(0,0,0,0.08); border-radius: 20px; min-height: 100%; overflow: visible; position: relative; border: 1px solid rgba(255,255,255,0.5); transform: translate(0, 0); }

/* Sticky Preview Polish */
.pb-preview-frame .p-nav,
.pb-preview-frame .p-mobile-nav-top {
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}
.pb-preview-frame .p-aside {
  border-top-left-radius: inherit;
  border-bottom-left-radius: inherit;
}
.pb-preview-frame .p-footer {
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}

/* Scrollbar */
.pb-sidebar::-webkit-scrollbar { width: 6px; }
.pb-sidebar::-webkit-scrollbar-track { background: transparent; }
.pb-sidebar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.05); border-radius: 10px; }
.pb-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.1); }

/* Milestones (Timeline) */
.p-milestones { display: flex; flex-direction: column; gap: 40px; position: relative; max-width: 800px; margin: 0 auto; }
.p-milestones::before { content: ''; position: absolute; left: 60px; top: 0; bottom: 0; width: 2px; background: var(--gray-100); }
.p-milestone { display: flex; gap: 40px; position: relative; }
.p-milestone-year { width: 120px; text-align: right; font-weight: 800; font-size: 1.1rem; color: var(--accent); padding-top: 4px; flex-shrink: 0; }
.p-milestone-content { background: var(--gray-50); padding: 32px; border-radius: 20px; flex: 1; border: 1px solid var(--gray-100); transition: all 0.3s; }
.p-milestone:hover .p-milestone-content { transform: translateX(10px); background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.05); border-color: var(--accent); }
.p-milestone-title { font-weight: 800; margin-bottom: 8px; color: var(--gray-900); }
.p-milestone-desc { color: var(--gray-600); font-size: 0.95rem; line-height: 1.6; }

/* Certifications */
.p-cert-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.p-cert-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; }
.p-cert-info { flex: 1; }


/* Pills */
.p-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.p-pill { padding: 10px 24px; border-radius: 50px; background: #fff; border: 1px solid var(--gray-200); font-weight: 700; font-size: 0.9rem; box-shadow: 0 2px 10px rgba(0,0,0,0.02); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.p-pill:hover { border-color: var(--accent); background: var(--gray-50); transform: translateY(-2px); }

/* Bubbles */
.p-bubbles { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.p-bubble { width: 100px; height: 100px; border-radius: 50%; display: flex; align-items: center; justify-content: center; text-align: center; background: var(--gray-50); border: 1px solid var(--gray-200); font-size: 0.8rem; font-weight: 800; padding: 10px; transition: all 0.3s; }
.p-bubble:hover { transform: scale(1.1) rotate(5deg); background: var(--accent); color: #fff; border-color: var(--accent); }

/* Bold Skills */
.p-bold-skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px; background: #000; border: 2px solid #000; }
.p-bold-skill { background: #fff; padding: 24px; font-weight: 900; font-size: 1.2rem; text-transform: uppercase; }

/* Compact Projects */
.p-project-grid-compact { grid-template-columns: repeat(3, 1fr); gap: 16px; }
.p-project-card-compact { padding: 16px; }
.p-project-card-compact .p-project-img { height: 140px; border-radius: 8px; }

/* Glow (Neon) */
.ptpl-neon .p-card { box-shadow: 0 0 20px rgba(0, 255, 136, 0.05); }
.ptpl-neon .p-btn-primary { box-shadow: 0 0 30px rgba(0, 255, 136, 0.4); }

/* ── NEW SECTION STYLES ── */

/* Services */
.p-services-grid { grid-template-columns: repeat(3, 1fr); }
.p-service-card { text-align: center; padding: 40px 24px; }
.p-service-icon { font-size: 2rem; color: var(--accent, #3b82f6); margin-bottom: 16px; }

/* Achievements */
.p-achievements-grid { grid-template-columns: 1fr; }
.p-achievement-card { display: flex; align-items: flex-start; gap: 20px; }
.p-achievement-icon { font-size: 1.5rem; color: #f59e0b; flex-shrink: 0; padding-top: 4px; }

/* Publications */
.p-publications-grid { grid-template-columns: 1fr; }
.p-publication-card { display: flex; align-items: center; gap: 16px; }
.p-publication-meta { display: flex; flex-direction: column; gap: 2px; min-width: 120px; }
.p-publication-publisher { font-size: 0.8rem; color: var(--accent, #3b82f6); font-weight: 600; }
.p-publication-arrow { margin-left: auto; font-size: 1.2rem; color: var(--gray-400); transition: transform 0.2s; }
.p-publication-card:hover .p-publication-arrow { transform: translateX(4px); color: var(--accent, #3b82f6); }

/* Languages */
.p-languages-wrap { display: flex; flex-wrap: wrap; gap: 16px; }
.p-language-item { display: flex; align-items: center; gap: 12px; padding: 14px 24px; background: var(--gray-50, #f9fafb); border: 1px solid var(--gray-200, #e5e7eb); border-radius: 12px; min-width: 180px; }
.p-language-name { font-weight: 700; font-size: 0.95rem; }
.p-language-level { font-size: 0.8rem; color: var(--gray-500, #6b7280); font-weight: 500; }

/* About */
.p-about-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: start; }
.p-about-text { font-size: 1.05rem; line-height: 1.8; color: var(--gray-600); white-space: pre-wrap; }
.p-about-stats { display: flex; flex-direction: column; gap: 24px; }
.p-stat { text-align: center; }
.p-stat-val { display: block; font-size: 2rem; font-weight: 900; color: var(--gray-900); }
.p-stat-lbl { font-size: 0.85rem; color: var(--gray-500); }

/* Testimonials */
.p-testimonial-grid { grid-template-columns: repeat(2, 1fr); }
.p-testimonial-card { padding: 32px; }
.p-testimonial-quote { font-size: 1rem; line-height: 1.7; color: var(--gray-600); font-style: italic; margin-bottom: 20px; }
.p-testimonial-author { display: flex; flex-direction: column; }
.p-testimonial-author strong { font-size: 0.9rem; }
.p-testimonial-author span { font-size: 0.8rem; color: var(--gray-500); }

/* Education */
.p-edu-grid { grid-template-columns: repeat(2, 1fr); }
.p-card-meta { font-size: 0.85rem; color: var(--gray-500); margin-top: 4px; }



/* ── 6 NEW TEMPLATE THEMES ── */

/* Nordic: Scandinavian clean, cool blue-grey palette */
.ptpl-nordic { background: #f7f9fc; --gray-50: #edf1f7; --gray-100: #e2e8f0; --gray-200: #cbd5e1; --accent: #5b7fa6; }
.ptpl-nordic .p-nav { background: rgba(247,249,252,0.9); }
.ptpl-nordic .p-card { border-radius: 20px; }
.ptpl-nordic .p-name { color: #1e3a5f; }
.ptpl-nordic .p-sec-title { color: #1e3a5f; font-weight: 700; }
.ptpl-nordic .p-btn-primary { background: #1e3a5f; }
.ptpl-nordic .p-tag { background: rgba(91,127,166,0.1); color: #5b7fa6; border-color: rgba(91,127,166,0.2); }

/* Brutalist: Raw, bold, large type, stark contrast */
.ptpl-brutalist { background: #fff; font-family: 'DM Mono', monospace; --font: 'DM Mono', monospace; }
.ptpl-brutalist .p-nav { background: #fff; border-bottom: 3px solid #000; border-radius: 0; }
.ptpl-brutalist .p-name { font-size: clamp(2rem, 5vw, 5rem); text-transform: uppercase; letter-spacing: -0.06em; }
.ptpl-brutalist .p-sec-title { text-transform: uppercase; letter-spacing: 0.1em; font-size: 1.2rem; border-bottom: 3px solid #000; padding-bottom: 12px; }
.ptpl-brutalist .p-card { border: 2px solid #000; border-radius: 0; }
.ptpl-brutalist .p-card:hover { transform: none; box-shadow: 6px 6px 0 #000; }
.ptpl-brutalist .p-btn-primary { border-radius: 0; border: 2px solid #000; }
.ptpl-brutalist .p-tag { border-radius: 0; border: 1px solid #000; background: transparent; }
.ptpl-brutalist .p-pill { background: #fff; color: #000; border: 2px solid #000; border-radius: 0; box-shadow: none; }
.ptpl-brutalist .p-pill:hover { background: #000; color: #fff; transform: translate(-2px, -2px); box-shadow: 4px 4px 0 #000; }

/* Brutalist Hero Photo Layout */
.p-hero-bold-layout {
  display: flex;
  flex-direction: column-reverse;
  gap: 40px;
  text-align: left;
}
@media (min-width: 768px) {
  .p-hero-bold-layout.has-photo {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 60px;
    align-items: center;
  }
}
.p-hero-bold-photo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}
@media (min-width: 768px) {
  .p-hero-bold-photo-wrap {
    justify-content: flex-end;
  }
}

.ptpl-brutalist .p-avatar {
  width: 220px !important;
  height: 220px !important;
  border-radius: 0 !important;
  border: 4px solid #000 !important;
  box-shadow: 10px 10px 0 #000 !important;
  object-fit: cover;
  transition: transform 0.2s, box-shadow 0.2s;
}
.ptpl-brutalist .p-avatar:hover {
  transform: translate(-4px, -4px);
  box-shadow: 14px 14px 0 #000 !important;
}

/* Nordic Hero Layout */
.ptpl-nordic .p-hero--nordic {
  padding: 120px 0 80px;
}
.p-hero-nordic-layout {
  display: flex;
  flex-direction: column-reverse;
  gap: 40px;
  text-align: center;
}
.p-hero-nordic-photo-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.p-hero-nordic-text {
  text-align: center;
}

@media (min-width: 901px) {
  .p-hero-nordic-layout.has-photo {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 40px;
    align-items: center;
  }
  .p-hero-nordic-photo-wrap {
    justify-content: flex-end;
  }
  .p-hero-nordic-text {
    text-align: left;
  }
}

.ptpl-nordic .p-hero-nordic-photo-wrap .p-avatar {
  position: relative;
  z-index: 2;
  width: 240px !important;
  height: 240px !important;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70% !important;
  border: 6px solid #fff !important;
  box-shadow: 0 20px 40px rgba(30, 58, 95, 0.1) !important;
  object-fit: cover;
  animation: morphAvatar 12s ease-in-out infinite alternate;
  transition: transform 0.3s ease;
}
.ptpl-nordic .p-hero-nordic-photo-wrap .p-avatar:hover {
  transform: translateY(-8px) scale(1.02);
}
.p-hero-nordic-photo-bg {
  position: absolute;
  width: 285px;
  height: 285px;
  background: linear-gradient(135deg, rgba(91, 127, 166, 0.18) 0%, rgba(30, 58, 95, 0.05) 100%);
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  animation: morphBlob 12s ease-in-out infinite alternate;
  z-index: 1;
}
.p-hero-nordic-intro {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #5b7fa6;
  font-weight: 700;
  margin-bottom: 12px;
}

@keyframes morphBlob {
  0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
  100% { border-radius: 70% 30% 50% 50% / 30% 60% 40% 70%; }
}
@keyframes morphAvatar {
  0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  100% { border-radius: 50% 50% 30% 70% / 50% 60% 40% 50%; }
}

/* Custom Responsive Image Adjustments */
@media (max-width: 900px) {
  .ptpl-brutalist .p-avatar {
    width: 150px !important;
    height: 150px !important;
  }
  .ptpl-nordic .p-avatar {
    width: 160px !important;
    height: 160px !important;
  }
  .ptpl-nordic .p-hero-nordic-photo-bg {
    width: 190px;
    height: 190px;
  }
}
@media (max-width: 480px) {
  .ptpl-brutalist .p-avatar {
    width: 120px !important;
    height: 120px !important;
  }
  .ptpl-nordic .p-avatar {
    width: 130px !important;
    height: 130px !important;
  }
  .ptpl-nordic .p-hero-nordic-photo-bg {
    width: 150px;
    height: 150px;
  }
}

/* Editor Mobile Simulation Overrides */
.pb-layout.preview-mode .p-hero-bold-layout.has-photo {
  display: flex !important;
  flex-direction: column-reverse !important;
  gap: 40px !important;
}
.pb-layout.preview-mode .p-hero-bold-photo-wrap {
  justify-content: center !important;
}
.pb-layout.preview-mode .p-hero-nordic-layout.has-photo {
  display: flex !important;
  flex-direction: column-reverse !important;
  gap: 40px !important;
}
.pb-layout.preview-mode .p-hero-nordic-photo-wrap {
  justify-content: center !important;
}
.pb-layout.preview-mode .p-hero-nordic-text {
  text-align: center !important;
}




/* Neon: Dark background, vibrant neon accents */
.ptpl-neon { background: #0a0a1a; color: #e0e0ff; --white: #0a0a1a; --gray-50: #12122a; --gray-100: #1a1a3a; --gray-200: #2a2a4a; --gray-700: #a0a0cc; --gray-400: #8b8bad; --gray-500: #a0a0cc; --gray-600: #c0c0e0; --gray-900: #e0e0ff; --accent: #00ff88; }
.ptpl-neon .p-nav { background: rgba(10,10,26,0.9); border-bottom: 1px solid rgba(0,255,136,0.15); }
.ptpl-neon .p-name { color: #00ff88; text-shadow: 0 0 40px rgba(0,255,136,0.3); }
.ptpl-neon .p-sec-title { color: #00ff88; }
.ptpl-neon .p-card { background: rgba(18,18,42,0.8); border: 1px solid rgba(0,255,136,0.12); }
.ptpl-neon .p-card:hover { border-color: rgba(0,255,136,0.4); box-shadow: 0 0 30px rgba(0,255,136,0.08); }
.ptpl-neon .p-btn-primary { background: #00ff88; color: #0a0a1a; font-weight: 800; }
.ptpl-neon .p-btn-outline { border-color: rgba(0,255,136,0.3); color: #00ff88; }
.ptpl-neon .p-tag { background: rgba(0,255,136,0.08); color: #00ff88; border-color: rgba(0,255,136,0.2); }
.ptpl-neon .p-timeline::before { background: rgba(0,255,136,0.2); }
.ptpl-neon .p-avatar { border-color: rgba(0,255,136,0.3); }
.ptpl-neon .p-role, .ptpl-neon .p-tagline, .ptpl-neon .p-card-desc { color: #e0e0ff !important; }
.ptpl-neon .p-pill { background: rgba(18, 18, 42, 0.8); color: #00ff88; border-color: rgba(0, 255, 136, 0.25); box-shadow: 0 0 15px rgba(0, 255, 136, 0.05); }
.ptpl-neon .p-pill:hover { background: rgba(0, 255, 136, 0.1); border-color: #00ff88; box-shadow: 0 0 25px rgba(0, 255, 136, 0.25); }

/* Minimal: Ultra-clean, generous whitespace, no borders */
.ptpl-minimal { background: #fff; }
.ptpl-minimal .p-nav { background: #fff; border-bottom: none; box-shadow: none; }
.ptpl-minimal .p-section { padding: 80px 0; }
.ptpl-minimal .p-sec-title { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--gray-400); font-weight: 600; }
.ptpl-minimal .p-card { background: transparent; border: none; padding: 24px 0; border-bottom: 1px solid var(--gray-100); border-radius: 0; }
.ptpl-minimal .p-card:hover { transform: none; box-shadow: none; background: transparent; }
.ptpl-minimal .p-tag { background: transparent; border: 1px solid var(--gray-200); }
.ptpl-minimal .p-hero { padding: 160px 0 100px; }
.ptpl-minimal .p-name { font-weight: 400; letter-spacing: -0.04em; }

/* ── RESPONSIVE: BUILDER UI ── */
@media (max-width: 900px) {
    body { height: auto; overflow: visible; }
    .pb-nav { 
      margin: 10px; 
      padding: 0 16px; 
      height: 60px; 
      position: sticky; 
      top: 10px; 
      gap: 10px;
    }
    .pb-nav-logo span { display: none; }
    .pb-btn { padding: 8px 12px; font-size: 0.8rem; }
    .pb-btn i { font-size: 1rem; }
    .pb-btn span { display: none; }
    
    .pb-layout { 
      grid-template-columns: 1fr !important; 
      padding: 0 10px 10px;
      height: calc(100vh - 80px);
      overflow: hidden;
    }
    
    .pb-sidebar { 
      height: 100%;
      border-radius: 24px;
      background: rgba(255, 255, 255, 0.75);
      backdrop-filter: blur(24px);
      border: 1px solid rgba(255, 255, 255, 0.4);
      color: var(--gray-900);
    }
    
    /* Toggle Preview Mode */
    .pb-layout.preview-mode .pb-sidebar { display: none; }
    .pb-layout.preview-mode .pb-preview { display: flex; }
    
    .pb-preview { 
      display: none; 
      padding: 10px;
      height: 100%;
    }
    .pb-preview-frame { border-radius: 12px; }

    .pb-tpl-grid { grid-template-columns: repeat(3, 1fr); padding: 15px; }
    .pb-tpl-item { padding: 12px 6px; }

    .mobile-preview-toggle {
      display: flex !important;
      position: fixed;
      bottom: 25px;
      left: 50%;
      transform: translateX(-50%);
      background: var(--gray-900);
      color: #fff;
      padding: 12px 24px;
      border-radius: 100px;
      z-index: 1000;
      box-shadow: 0 10px 30px rgba(0,0,0,0.3);
      font-weight: 800;
      font-size: 0.9rem;
      align-items: center;
      gap: 10px;
      border: none;
      cursor: pointer;
    }
}

/* ── RESPONSIVE: PORTFOLIO TEMPLATES ── */
@media (max-width: 900px) {
    /* --- Navigation --- */
    .p-nav-links { display: none !important; }
    .p-nav-toggle { display: block !important; }
    .p-nav-container { padding: 0 20px !important; height: 60px !important; }
    
    /* --- Architecture Layouts --- */
    .p-sidebar-layout, .p-split-layout { flex-direction: column !important; min-height: auto !important; }
    .p-mobile-nav-top { display: flex !important; }
    .p-aside {
      display: none !important;
    }
    .p-split-hero { 
      width: 100% !important; 
      height: auto !important; 
      position: static !important; 
      border-right: none !important; 
      border-bottom: 1px solid var(--gray-100) !important; 
      padding: 0 !important; 
    }
    .p-aside-logo, .p-split-hero .p-nav { display: none !important; }
    .p-aside-nav { display: none !important; }
    .p-split-hero-content { padding: 40px 20px !important; text-align: center !important; }
    .parch-sidebar .p-main, .parch-split .p-split-content { width: 100% !important; }
    .parch-dashboard .p-section { grid-column: span 12 !important; padding: 30px 20px !important; }
    .parch-split .p-nav { display: none !important; }
    
    /* --- Container & Spacing --- */
    .p-container { padding: 0 20px !important; }
    .p-hero { padding: 60px 0 40px !important; }
    .p-section { padding: 60px 0 !important; }
    .p-sec-title { font-size: 1.5rem !important; margin-bottom: 32px !important; }
    .p-footer { padding: 40px 0 !important; }

    /* --- Hero --- */
    .p-name { font-size: 2.2rem !important; word-break: break-word !important; text-align: inherit !important; }
    .p-role { font-size: 1.1rem !important; text-align: inherit !important; }
    .p-tagline { text-align: inherit !important; margin: 0 auto 32px !important; font-size: 1rem !important; }
    .p-avatar { width: 100px !important; height: 100px !important; }
    .p-hero-actions { flex-direction: column !important; width: 100% !important; justify-content: inherit !important; gap: 12px !important; }
    .p-btn { width: 100% !important; justify-content: center !important; }

    /* Hero split variant (inline grid: 1fr 1fr) */
    .p-hero--split > .p-container { grid-template-columns: 1fr !important; gap: 32px !important; text-align: center !important; }
    .p-hero--split > .p-container > div:last-child { order: -1 !important; }

    /* --- About --- */
    .p-about-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
    .p-about-text { font-size: 0.95rem !important; }
    .p-about-stats { flex-direction: row !important; flex-wrap: wrap !important; gap: 16px !important; justify-content: center !important; }

    /* --- Skills --- */
    /* Tags, Pills */
    .p-tags, .p-pills { gap: 8px !important; }
    .p-tag { padding: 6px 14px !important; font-size: 0.8rem !important; }
    .p-pill { padding: 8px 18px !important; font-size: 0.82rem !important; }

    /* Bubbles – shrink so they don't overflow */
    .p-bubbles { gap: 10px !important; }
    .p-bubble { width: 80px !important; height: 80px !important; font-size: 0.7rem !important; padding: 8px !important; }

    /* Bold skills grid */
    .p-bold-skills { grid-template-columns: repeat(2, 1fr) !important; }
    .p-bold-skill { padding: 16px !important; font-size: 0.9rem !important; }

    /* Skills grid variant (inline grid-template-columns) */
    .p-section [style*="grid-template-columns: repeat(auto-fill"] { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important; }

    /* --- Experience --- */
    /* Cards variant (inline grid: repeat(2,1fr)) */
    .p-section [style*="grid-template-columns:repeat(2"] { grid-template-columns: 1fr !important; }
    .p-section [style*="grid-template-columns: repeat(2"] { grid-template-columns: 1fr !important; }

    /* List variant (inline grid: 200px 1fr) */
    .p-section [style*="grid-template-columns:200px"] { grid-template-columns: 1fr !important; }
    .p-section [style*="grid-template-columns: 200px"] { grid-template-columns: 1fr !important; }

    /* Minimal variant (inline flex with gap:40px) */
    .p-section [style*="gap:40px"][style*="display:flex"] { flex-direction: column !important; gap: 8px !important; }
    .p-section [style*="width:120px"][style*="flex-shrink:0"] { width: auto !important; }

    /* Stack variant – already using p-card so inherits, but fix inner flex */
    .p-card-header { flex-direction: column !important; gap: 4px !important; align-items: flex-start !important; }
    .p-card-title { font-size: 1.1rem !important; }
    .p-card-date { font-size: 0.8rem !important; }
    .p-card-desc { font-size: 0.9rem !important; }

    /* Timeline */
    .p-timeline { padding-left: 24px !important; }

    /* --- Projects --- */
    /* All named project grids → 1 col */
    .p-grid, .p-project-grid, .p-services-grid, .p-testimonial-grid, .p-edu-grid, .p-project-grid-compact, .ptpl-bento .p-bento-grid { 
      grid-template-columns: 1fr !important; 
      gap: 16px !important; 
    }
    .ptpl-bento .p-bento-grid .p-card:nth-child(1), .ptpl-bento .p-bento-grid .p-card:nth-child(4) { grid-column: span 1 !important; }

    /* Editorial variant (inline grid: 1fr 1fr) — image above text */
    .p-section [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; gap: 20px !important; }
    .p-section [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; gap: 20px !important; }

    /* List variant (inline grid: 1fr auto) */
    .p-section [style*="grid-template-columns:1fr auto"] { grid-template-columns: 1fr !important; }
    .p-section [style*="grid-template-columns: 1fr auto"] { grid-template-columns: 1fr !important; }

    .p-project-img { height: 180px !important; }
    .p-project-content { padding: 20px !important; }
    .p-project-links { flex-wrap: wrap !important; gap: 12px !important; }
    .p-project-card-compact .p-project-img { height: 120px !important; }

    /* --- Milestones --- */
    .p-milestones::before { left: 20px !important; }
    .p-milestone { gap: 12px !important; flex-direction: column !important; }
    .p-milestone-year { width: auto !important; text-align: left !important; padding-left: 40px !important; font-size: 1rem !important; }
    .p-milestone-content { padding: 20px !important; border-radius: 16px !important; }
    .p-milestone:hover .p-milestone-content { transform: none !important; }

    /* --- Education --- */
    .p-edu-grid { grid-template-columns: 1fr !important; }

    /* --- Certifications --- */
    .p-cert-grid { grid-template-columns: 1fr !important; }
    .p-cert-card { flex-direction: column !important; align-items: flex-start !important; gap: 12px !important; }

    /* --- Services --- */
    .p-services-grid { grid-template-columns: 1fr !important; }
    .p-service-card { text-align: left !important; padding: 24px !important; }
    /* Services list variant (inline flex, gap:24px) */
    .p-section [style*="gap:24px"][style*="align-items:center"] { flex-direction: column !important; align-items: flex-start !important; gap: 12px !important; }

    /* --- Testimonials --- */
    .p-testimonial-grid { grid-template-columns: 1fr !important; }
    .p-testimonial-card { padding: 24px !important; }
    .p-testimonial-quote { font-size: 0.95rem !important; }

    /* --- Achievements --- */
    .p-achievements-grid { grid-template-columns: 1fr !important; }
    /* Timeline achievements variant */
    .p-section [style*="padding-left:40px"] { padding-left: 32px !important; }

    /* --- Publications --- */
    .p-publications-grid { grid-template-columns: 1fr !important; }
    .p-publication-card { flex-direction: column !important; align-items: flex-start !important; gap: 8px !important; }
    .p-publication-meta { flex-direction: row !important; gap: 8px !important; min-width: auto !important; }
    .p-publication-arrow { display: none !important; }

    /* --- Languages --- */
    .p-languages-wrap { gap: 10px !important; }
    .p-language-item { min-width: auto !important; flex: 1 1 calc(50% - 10px) !important; padding: 12px 16px !important; }

    /* --- Contact --- */
    .p-contact-links { gap: 12px !important; }
    .p-contact-item { width: 100% !important; justify-content: center !important; font-size: 0.9rem !important; }
    .p-contact-card { padding: 32px 20px !important; }

    /* --- Dashboard Layout --- */
    .p-dashboard-layout { grid-template-columns: 1fr !important; gap: 16px !important; padding: 30px 0 !important; }

    /* --- Cards General --- */
    .p-card { padding: 24px !important; border-radius: 16px !important; }
}

/* ── RESPONSIVE: EXTRA SMALL SCREENS ── */
@media (max-width: 480px) {
    .p-name { font-size: 1.8rem !important; }
    .p-role { font-size: 1rem !important; }
    .p-sec-title { font-size: 1.25rem !important; margin-bottom: 24px !important; }
    .p-hero { padding: 48px 0 32px !important; }
    .p-section { padding: 40px 0 !important; }
    .p-container { padding: 0 16px !important; }
    .p-avatar { width: 80px !important; height: 80px !important; }

    .p-card { padding: 20px !important; }
    .p-card-title { font-size: 1rem !important; }

    .p-bubble { width: 65px !important; height: 65px !important; font-size: 0.6rem !important; }
    .p-bold-skills { grid-template-columns: 1fr !important; }
    .p-bold-skill { font-size: 0.8rem !important; padding: 12px !important; }

    .p-milestone-content { padding: 16px !important; }
    .p-milestone-year { font-size: 0.9rem !important; }

    .p-language-item { flex: 1 1 100% !important; }

    .p-contact-item { padding: 10px 16px !important; font-size: 0.85rem !important; }

    .p-footer { padding: 30px 0 !important; font-size: 0.8rem !important; }

    /* Brutalist name override */
    .ptpl-brutalist .p-name { font-size: 1.6rem !important; }
    /* Elegant name override */
    .ptpl-elegant .p-name { font-size: 1.8rem !important; }

    /* Share bar at bottom */
    .port-share-bar { bottom: 12px !important; right: 12px !important; }
    .port-share-btn { padding: 6px 10px !important; font-size: 0.7rem !important; }
}

