/* ============================================================
   PORTFOLIO DESIGN SYSTEM
   No Bootstrap. No AOS. Pure CSS + keyframes.
   ============================================================ */

/* --- Variables -------------------------------------------- */
:root {
  --p-bg:          #080b10;
  --p-bg2:         #0d1117;
  --p-card:        #111620;
  --p-card-hover:  #161c2a;
  --p-accent:      #ffae00;
  --p-accent-dim:  rgba(255,174,0,0.12);
  --p-accent-mid:  rgba(255,174,0,0.28);
  --p-accent-glow: rgba(255,174,0,0.5);
  --p-text:        #dde3ee;
  --p-text-muted:  #7a8499;
  --p-border:      rgba(255,255,255,0.07);
  --p-border-acc:  rgba(255,174,0,0.22);
  --p-sidebar-w:   300px;
  --p-radius:      12px;
  --p-radius-lg:   18px;
  --p-transition:  0.3s cubic-bezier(0.22,1,0.36,1);
}

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

html { scroll-behavior: smooth; }

body.p-body {
  background: var(--p-bg);
  color: var(--p-text);
  font-family: 'Figtree', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

a, a:hover { text-decoration: none; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4,h5,h6 { margin: 0; }
p { margin: 0; }
img { max-width: 100%; display: block; }
input, textarea, button { font-family: inherit; }
input:focus, textarea:focus { outline: none; }

/* Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--p-accent) #1a1d26;
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #1a1d26; }
::-webkit-scrollbar-thumb { background: var(--p-accent); border-radius: 4px; }

/* --- Keyframes -------------------------------------------- */
@keyframes p-fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes p-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes p-slide-right {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes p-scale-in {
  from { opacity: 0; transform: scale(0.90); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes p-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-7px); }
}
@keyframes p-glow-pulse {
  0%, 100% { box-shadow: 0 0 6px var(--p-accent-mid); }
  50%       { box-shadow: 0 0 22px var(--p-accent-glow); }
}
@keyframes p-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
@keyframes p-spin {
  to { transform: rotate(360deg); }
}
@keyframes p-dot-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}
@keyframes p-line-draw {
  from { height: 0; }
  to   { height: 100%; }
}
@keyframes p-counter-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}
@keyframes p-modal-in {
  from { opacity: 0; transform: scale(0.93) translateY(12px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}
@keyframes p-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- Animate-on-scroll utility ---------------------------- */
.p-animate {
  opacity: 0;
  will-change: opacity, transform;
}
.p-animate.p-visible {
  animation-fill-mode: both;
  animation-duration: 0.65s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 1;
}
.p-animate.p-fade-up.p-visible    { animation-name: p-fade-up; }
.p-animate.p-fade-in.p-visible    { animation-name: p-fade-in; }
.p-animate.p-slide-right.p-visible { animation-name: p-slide-right; }
.p-animate.p-scale-in.p-visible   { animation-name: p-scale-in; }
.p-delay-1.p-visible { animation-delay: 0.08s; }
.p-delay-2.p-visible { animation-delay: 0.16s; }
.p-delay-3.p-visible { animation-delay: 0.24s; }
.p-delay-4.p-visible { animation-delay: 0.32s; }
.p-delay-5.p-visible { animation-delay: 0.40s; }
.p-delay-6.p-visible { animation-delay: 0.48s; }

/* --- Root wrapper ----------------------------------------- */
.p-root {
  display: flex;
  min-height: 100vh;
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
}

/* --- Video background ------------------------------------- */
.p-video-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.p-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.06;
}
.p-video-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--p-bg) 0%, rgba(8,11,16,0.92) 100%);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.p-sidebar {
  width: var(--p-sidebar-w);
  min-width: var(--p-sidebar-w);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0c1018 0%, #080b10 100%);
  border-right: 1px solid var(--p-border);
  z-index: 10;
  padding: 32px 20px 24px;
  scrollbar-width: none;
}
.p-sidebar::-webkit-scrollbar { display: none; }

/* Profile block */
.p-profile {
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--p-border);
  margin-bottom: 20px;
  animation: p-fade-up 0.7s cubic-bezier(0.22,1,0.36,1) both;
}

.p-avatar-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--p-accent-dim);
  border: 2px solid var(--p-accent-mid);
  font-size: 2.4rem;
  color: var(--p-accent);
  margin-bottom: 14px;
  animation: p-glow-pulse 3s ease-in-out infinite;
}

.p-profile-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--p-accent);
  margin-bottom: 4px;
}

.p-profile-role {
  font-size: 0.82rem;
  color: var(--p-text-muted);
  line-height: 1.4;
}

/* Contact info */
.p-contact-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.p-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--p-text-muted);
  transition: color var(--p-transition);
}
.p-contact-item:hover { color: var(--p-text); }

.p-contact-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--p-card);
  border: 1px solid var(--p-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--p-accent);
  font-size: 0.7rem;
}

/* Social links */
.p-socials {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.p-social-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--p-card);
  border: 1px solid var(--p-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--p-text-muted);
  font-size: 1rem;
  transition: all var(--p-transition);
  cursor: pointer;
}
.p-social-btn:hover {
  background: var(--p-accent-dim);
  border-color: var(--p-border-acc);
  color: var(--p-accent);
  transform: translateY(-2px);
}

/* Resume button */
.p-resume-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  background: var(--p-accent);
  color: #080b10;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--p-radius);
  border: none;
  cursor: pointer;
  transition: all var(--p-transition);
  text-decoration: none;
  margin-bottom: 28px;
}
.p-resume-btn:hover {
  background: #ffc233;
  color: #080b10;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--p-accent-mid);
}

/* Navigation */
.p-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.p-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--p-radius);
  color: var(--p-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--p-transition);
  border: 1px solid transparent;
  position: relative;
}
.p-nav-item:hover {
  background: var(--p-accent-dim);
  color: var(--p-text);
  border-color: var(--p-border-acc);
}
.p-nav-item.active {
  background: var(--p-accent-dim);
  color: var(--p-accent);
  border-color: var(--p-border-acc);
}
.p-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--p-accent);
}

.p-nav-icon {
  width: 22px;
  text-align: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.p-main {
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
  padding: 0 40px 80px;
  position: relative;
  z-index: 1;
}

/* --- Section spacing -------------------------------------- */
.p-section {
  padding: 56px 0;
  border-bottom: 1px solid var(--p-border);
}
.p-section:last-child { border-bottom: none; }

/* --- Section heading -------------------------------------- */
.p-section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 100px;
  background: var(--p-accent-dim);
  border: 1px solid var(--p-border-acc);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--p-accent);
  margin-bottom: 16px;
}

.p-section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 10px;
}
.p-section-title span { color: var(--p-accent); }

.p-section-desc {
  font-size: 0.95rem;
  color: var(--p-text-muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 36px;
}

/* ============================================================
   HERO / ABOUT
   ============================================================ */
.p-hero-greeting {
  font-size: 0.9rem;
  color: var(--p-accent);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.p-hero-greeting::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--p-accent);
  display: block;
}

.p-hero-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 8px;
}
.p-hero-name .p-accent { color: var(--p-accent); }

.p-hero-role {
  font-size: 1.1rem;
  color: var(--p-text-muted);
  margin-bottom: 24px;
}

.p-hero-summary {
  font-size: 0.95rem;
  color: var(--p-text-muted);
  line-height: 1.8;
  max-width: 680px;
  padding: 20px 24px;
  background: var(--p-card);
  border: 1px solid var(--p-border);
  border-left: 3px solid var(--p-accent);
  border-radius: 0 var(--p-radius) var(--p-radius) 0;
  margin-bottom: 36px;
}

/* Stat cards */
.p-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.p-stat-card {
  background: var(--p-card);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-lg);
  padding: 24px 20px;
  text-align: center;
  transition: all var(--p-transition);
  position: relative;
  overflow: hidden;
}
.p-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--p-accent), transparent);
  opacity: 0;
  transition: opacity var(--p-transition);
}
.p-stat-card:hover {
  background: var(--p-card-hover);
  border-color: var(--p-border-acc);
  transform: translateY(-4px);
}
.p-stat-card:hover::before { opacity: 1; }

.p-stat-icon {
  font-size: 1.5rem;
  color: var(--p-accent);
  margin-bottom: 12px;
  display: block;
}
.p-stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 8px;
}
.p-stat-label {
  font-size: 0.8rem;
  color: var(--p-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Info cards */
.p-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.p-info-card {
  background: var(--p-card);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  padding: 20px 22px;
  transition: all var(--p-transition);
}
.p-info-card:hover {
  border-color: var(--p-border-acc);
  background: var(--p-card-hover);
}
.p-info-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--p-accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.p-info-card p {
  font-size: 0.88rem;
  color: var(--p-text-muted);
  line-height: 1.7;
}

/* ============================================================
   SKILLS
   ============================================================ */

/* Radial rings grid */
.p-sk-rings-section { margin-bottom: 40px; }
.p-sk-rings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 16px;
}

.p-sk-ring-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.p-sk-ring-wrap {
  position: relative;
  width: 96px;
  height: 96px;
}

.p-sk-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.p-sk-ring-track {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 7;
}

.p-sk-ring-fill {
  fill: none;
  stroke: var(--p-accent);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: var(--sk-circ);
  stroke-dashoffset: var(--sk-circ);
  filter: drop-shadow(0 0 5px rgba(255,174,0,0.45));
}

/* Fire the fill animation when parent p-animate gains p-visible */
.p-sk-ring-item.p-visible .p-sk-ring-fill {
  animation: p-ring-grow 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.15s forwards;
}
@keyframes p-ring-grow {
  to { stroke-dashoffset: var(--sk-offset); }
}

.p-sk-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.p-sk-ring-pct {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--p-accent);
  font-family: 'Playfair Display', serif;
  line-height: 1;
}
.p-sk-ring-unit {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--p-text-muted);
}
.p-sk-ring-name {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--p-text);
  text-align: center;
  line-height: 1.3;
}

/* Category tiles grid */
.p-sk-cats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.p-sk-cat-tile {
  background: var(--p-card);
  border: 1px solid var(--p-border);
  border-left: 2px solid var(--p-accent);
  border-radius: 12px;
  padding: 18px 20px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.p-sk-cat-tile:hover {
  border-color: var(--p-border-acc);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  transform: translateY(-2px);
}

.p-sk-cat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
}
.p-sk-cat-icon { font-size: 1rem; line-height: 1; }
.p-sk-cat-name {
  font-size: 0.83rem;
  font-weight: 700;
  color: #fff;
  flex: 1;
}
.p-sk-cat-count {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--p-accent);
  background: var(--p-accent-dim);
  border: 1px solid var(--p-border-acc);
  padding: 1px 7px;
  border-radius: 10px;
}

.p-sk-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.p-sk-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 5px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--p-border);
  font-size: 0.68rem;
  color: var(--p-text-muted);
  transition: all 0.25s;
  cursor: default;
  white-space: nowrap;
}
.p-sk-chip:hover {
  background: var(--p-accent-dim);
  border-color: var(--p-border-acc);
  color: var(--p-text);
  transform: translateY(-2px);
}
.p-sk-chip.primary {
  border-color: var(--p-border-acc);
  color: var(--p-text);
  background: var(--p-accent-dim);
}

.p-sk-chip-img {
  width: 13px;
  height: 13px;
  object-fit: contain;
}
.p-sk-chip-emoji { font-size: 0.8rem; line-height: 1; }

/* ============================================================
   EXPERIENCE TIMELINE
   ============================================================ */
.p-timeline {
  position: relative;
  padding-left: 28px;
}
.p-timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--p-accent), transparent);
}

.p-timeline-item {
  position: relative;
  margin-bottom: 32px;
}
.p-timeline-item:last-child { margin-bottom: 0; }

.p-timeline-dot {
  position: absolute;
  left: -28px;
  top: 16px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--p-card);
  border: 2px solid var(--p-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.p-timeline-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--p-accent);
  animation: p-dot-blink 2s ease-in-out infinite;
}

.p-exp-card {
  background: var(--p-card);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-lg);
  padding: 24px;
  transition: all var(--p-transition);
}
.p-exp-card:hover {
  border-color: var(--p-border-acc);
  background: var(--p-card-hover);
}

.p-exp-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.p-exp-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 4px;
}
.p-exp-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.p-exp-meta { flex: 1; min-width: 0; }

.p-exp-company {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.p-exp-company i { color: var(--p-accent); font-size: 0.8rem; }

.p-exp-title {
  font-size: 0.85rem;
  color: var(--p-accent);
  font-weight: 600;
  margin-bottom: 4px;
}

.p-exp-dates {
  font-size: 0.78rem;
  color: var(--p-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.p-exp-note {
  display: inline-block;
  font-size: 0.72rem;
  color: #f87171;
  margin-top: 4px;
}

.p-exp-divider {
  height: 1px;
  background: var(--p-border);
  margin: 14px 0;
}

.p-exp-responsibilities {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.p-exp-resp-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--p-text-muted);
  line-height: 1.5;
}
.p-exp-resp-item i {
  color: var(--p-accent);
  font-size: 0.75rem;
  margin-top: 3px;
  flex-shrink: 0;
}

/* ============================================================
   PORTFOLIO
   ============================================================ */

/* Stats bar */
.p-port-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  padding: 14px 20px;
  background: var(--p-card);
  border: 1px solid var(--p-border);
  border-radius: 10px;
  flex-wrap: wrap;
}
.p-port-stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--p-text-muted);
}
.p-port-stat-item strong {
  color: var(--p-accent);
  font-size: 1rem;
  font-weight: 700;
}
.p-port-stat-sep {
  width: 1px;
  height: 24px;
  background: var(--p-border);
}

/* Filter tabs */
.p-port-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.p-port-filter {
  padding: 6px 18px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 1px solid var(--p-border);
  background: transparent;
  color: var(--p-text-muted);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--p-transition);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}
.p-port-filter:hover { border-color: var(--p-border-acc); color: var(--p-text); }
.p-port-filter.p-active {
  background: var(--p-accent);
  border-color: var(--p-accent);
  color: #0a0a0a;
}
.p-port-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  font-size: 0.6rem;
  margin-left: 6px;
}
.p-port-filter.p-active .p-port-filter-count { background: rgba(0,0,0,0.2); }

/* Bento grid */
.p-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 14px;
}
.p-bento-2x2 { grid-column: span 2; grid-row: span 2; }
.p-bento-1x2 { grid-row: span 2; }
.p-bento-2x1 { grid-column: span 2; }

/* Card base */
.p-bento-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--p-border);
  cursor: pointer;
  background: var(--p-card);
  transition: border-color 0.35s, transform 0.35s cubic-bezier(0.22,1,0.36,1), box-shadow 0.35s, opacity 0.35s, filter 0.35s;
}
.p-bento-card:hover {
  border-color: var(--p-border-acc);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.p-bento-card.p-bento-dim {
  opacity: 0.18;
  pointer-events: none;
  filter: grayscale(1);
}

/* Image */
.p-bento-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22,1,0.36,1), filter 0.4s;
}
.p-bento-card:hover .p-bento-img {
  transform: scale(1.07);
  filter: brightness(0.4);
}

/* Always-visible bottom name bar */
.p-bento-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px 16px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  display: flex;
  align-items: flex-end;
  gap: 8px;
  z-index: 2;
  transition: opacity 0.3s;
}
.p-bento-card:hover .p-bento-bar { opacity: 0; }
.p-bento-bar-num {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--p-accent);
  font-family: monospace;
  opacity: 0.8;
  flex-shrink: 0;
}
.p-bento-bar-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hover reveal panel */
.p-bento-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.94) 0%, rgba(0,0,0,0.5) 55%, transparent 100%);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s cubic-bezier(0.22,1,0.36,1), transform 0.35s cubic-bezier(0.22,1,0.36,1);
  z-index: 3;
}
.p-bento-card:hover .p-bento-panel {
  opacity: 1;
  transform: translateY(0);
}

/* Category label */
.p-bento-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--p-accent);
  margin-bottom: 6px;
}
.p-bento-cat::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--p-accent);
  flex-shrink: 0;
}

/* Title inside hover panel */
.p-bento-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.3;
}
.p-bento-2x2 .p-bento-title { font-size: 1.25rem; }

/* Tech tags in hover panel */
.p-bento-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}
.p-bento-tag {
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255,174,0,0.3);
  color: rgba(255,255,255,0.8);
  background: rgba(255,174,0,0.08);
  white-space: nowrap;
}

/* View button */
.p-bento-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #0a0a0a;
  background: var(--p-accent);
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  width: fit-content;
}
.p-bento-btn:hover { background: #ffd44d; transform: scale(1.04); }

/* Top accent line on hover */
.p-bento-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--p-accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 4;
}
.p-bento-card:hover::before { opacity: 1; }

/* Number watermark decoration */
.p-bento-watermark {
  position: absolute;
  top: 10px; right: 14px;
  font-size: 3.5rem;
  font-weight: 900;
  color: rgba(255,174,0,0.07);
  font-family: monospace;
  line-height: 1;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.3s;
}
.p-bento-card:hover .p-bento-watermark { opacity: 0; }

/* Tech tags shared (also used in modal) */
.p-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.p-tech-tag {
  font-size: 0.65rem;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(255,174,0,0.08);
  border: 1px solid rgba(255,174,0,0.25);
  color: var(--p-text-muted);
  white-space: nowrap;
  transition: all var(--p-transition);
}
.p-tech-tag:hover {
  border-color: var(--p-border-acc);
  color: var(--p-text);
  background: rgba(255,174,0,0.14);
}

/* ============================================================
   CUSTOM MODAL
   ============================================================ */
.p-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: p-backdrop-in 0.25s ease;
}

.p-modal {
  background: var(--p-card);
  border: 1px solid var(--p-border-acc);
  border-radius: var(--p-radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: p-modal-in 0.3s cubic-bezier(0.22,1,0.36,1);
  position: relative;
}

.p-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--p-border);
  color: var(--p-text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--p-transition);
}
.p-modal-close:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
  border-color: var(--p-border-acc);
}

.p-modal-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--p-radius-lg) var(--p-radius-lg) 0 0;
  max-height: 320px;
}
.p-modal-img-wrap img {
  width: 100%;
  display: block;
  object-fit: cover;
}
.p-modal-img-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--p-card), transparent);
  pointer-events: none;
}

.p-modal-body {
  padding: 22px 26px 28px;
}
.p-modal-body-cat {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--p-accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.p-modal-body-cat::before {
  content: '';
  width: 14px;
  height: 1px;
  background: var(--p-accent);
}
.p-modal-body-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--p-text);
  margin-bottom: 16px;
}
.p-modal-desc {
  font-size: 0.82rem;
  color: var(--p-text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.p-modal-links {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.p-modal-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s;
  cursor: pointer;
}
.p-modal-link-btn.github {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--p-border);
  color: var(--p-text);
}
.p-modal-link-btn.github:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--p-border-acc);
  color: #fff;
}
.p-modal-link-btn.demo {
  background: var(--p-accent);
  border: 1px solid var(--p-accent);
  color: #0a0a0a;
}
.p-modal-link-btn.demo:hover { background: #ffd44d; }

/* Bento card description in hover panel */
.p-bento-desc {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.55;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.p-bento-2x2 .p-bento-desc { -webkit-line-clamp: 3; }

/* Bento action row (Details + icon buttons) */
.p-bento-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.p-bento-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.8);
  font-size: 0.72rem;
  text-decoration: none;
  transition: all 0.2s;
}
.p-bento-btn-outline:hover {
  border-color: var(--p-accent);
  color: var(--p-accent);
  background: rgba(255,174,0,0.1);
}

/* Experience logo fallback for entries without an image */
.p-exp-logo-fallback {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--p-accent-dim);
  border: 1px solid var(--p-border-acc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--p-accent);
  flex-shrink: 0;
}

/* Avatar photo (when photo is set in personal data) */
.p-avatar-photo {
  position: relative;
  z-index: 2;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--p-accent);
  box-shadow: 0 0 24px var(--p-accent-mid);
}

.p-modal-body-tags-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--p-text-muted);
  margin-bottom: 8px;
}

/* ============================================================
   CERTIFICATIONS
   ============================================================ */
.p-cert-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 32px;
}
.p-cert-stat-item {
  text-align: center;
}
.p-cert-stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--p-accent);
  display: block;
  line-height: 1;
}
.p-cert-stat-label {
  font-size: 0.75rem;
  color: var(--p-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.p-cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.p-cert-card {
  background: var(--p-card);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all var(--p-transition);
  position: relative;
  overflow: hidden;
}
.p-cert-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--p-accent), transparent);
  opacity: 0;
  transition: opacity var(--p-transition);
}
.p-cert-card:hover {
  border-color: var(--p-border-acc);
  background: var(--p-card-hover);
  transform: translateY(-3px);
}
.p-cert-card:hover::before { opacity: 1; }

.p-cert-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--p-card);
  border: 1px solid var(--p-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--p-accent);
  font-size: 1.1rem;
  transition: all var(--p-transition);
}
.p-cert-card:hover .p-cert-icon-wrap {
  background: var(--p-accent-dim);
  border-color: var(--p-border-acc);
}

.p-cert-info { flex: 1; min-width: 0; }
.p-cert-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.3;
}
.p-cert-issuer {
  font-size: 0.76rem;
  color: var(--p-text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.p-cert-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.p-cert-badge.cloud    { background: rgba(59,130,246,0.15);  color:#60a5fa; border:1px solid rgba(59,130,246,0.25); }
.p-cert-badge.mobile   { background: rgba(16,185,129,0.15);  color:#34d399; border:1px solid rgba(16,185,129,0.25); }
.p-cert-badge.fullstack{ background: rgba(139,92,246,0.15);  color:#a78bfa; border:1px solid rgba(139,92,246,0.25); }
.p-cert-badge.testing  { background: rgba(244,63,94,0.15);   color:#fb7185; border:1px solid rgba(244,63,94,0.25); }
.p-cert-badge.network  { background: rgba(245,158,11,0.15);  color:#fbbf24; border:1px solid rgba(245,158,11,0.25); }

/* ============================================================
   AWARDS
   ============================================================ */
.p-awards-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--p-border-acc);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.p-awards-section-title i { color: var(--p-accent); }

.p-awards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 36px;
}

.p-award-card {
  background: var(--p-card);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  padding: 18px 16px;
  transition: all var(--p-transition);
}
.p-award-card:hover {
  border-color: var(--p-border-acc);
  background: var(--p-card-hover);
  transform: translateY(-3px);
}
.p-award-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.p-award-card-top i { color: var(--p-accent); font-size: 1rem; }
.p-award-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--p-accent);
}
.p-award-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
  line-height: 1.4;
}
.p-award-issuer {
  font-size: 0.76rem;
  color: var(--p-text-muted);
}

/* ============================================================
   AWARD SLIDER / CAROUSEL
   ============================================================ */
.p-carousel-wrap {
  position: relative;
  overflow: hidden;
}

.p-carousel-track {
  display: flex;
  gap: 16px;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.p-carousel-slide {
  flex-shrink: 0;
  width: calc(33.333% - 11px);
  border-radius: var(--p-radius-lg);
  overflow: hidden;
  border: 1px solid var(--p-border);
  cursor: pointer;
  position: relative;
  height: 300px;
  transition: all var(--p-transition);
}
.p-carousel-slide:hover {
  border-color: var(--p-border-acc);
  transform: translateY(-4px);
}
.p-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22,1,0.36,1);
}
.p-carousel-slide:hover img { transform: scale(1.06); }

.p-carousel-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,11,16,0.9) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
}
.p-carousel-slide-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
}
.p-carousel-slide-sub {
  font-size: 0.75rem;
  color: var(--p-text-muted);
}

.p-carousel-zoom-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  border: 1px solid var(--p-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--p-accent);
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity var(--p-transition);
}
.p-carousel-slide:hover .p-carousel-zoom-icon { opacity: 1; }

.p-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(8,11,16,0.8);
  border: 1px solid var(--p-border-acc);
  backdrop-filter: blur(4px);
  color: var(--p-text);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: all var(--p-transition);
}
.p-carousel-btn:hover {
  background: var(--p-accent-dim);
  color: var(--p-accent);
}
.p-carousel-btn.prev { left: -20px; }
.p-carousel-btn.next { right: -20px; }

.p-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 20px;
}
.p-carousel-dot {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: all var(--p-transition);
  border: none;
  padding: 0;
}
.p-carousel-dot.active {
  width: 24px;
  background: var(--p-accent);
}
.p-carousel-dot:not(.active) {
  width: 6px;
}
.p-carousel-dot:hover { background: var(--p-accent-mid); }

/* ============================================================
   EDUCATION
   ============================================================ */
.p-edu-card {
  background: var(--p-card);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  transition: all var(--p-transition);
}
.p-edu-card:hover {
  border-color: var(--p-border-acc);
  background: var(--p-card-hover);
}

.p-edu-logo {
  flex-shrink: 0;
  width: 80px;
}

.p-edu-info { flex: 1; }
.p-edu-dates {
  font-size: 0.78rem;
  color: var(--p-accent);
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.p-edu-degree {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.p-edu-institution {
  font-size: 0.88rem;
  color: var(--p-text-muted);
}

/* ============================================================
   CONTACT
   ============================================================ */
.p-contact-form-wrap {
  background: var(--p-card);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-lg);
  padding: 32px;
}
.p-contact-form-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 24px;
}

.p-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.p-form-full { grid-column: span 2; }

.p-input-wrap {
  position: relative;
}
.p-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  padding: 13px 16px;
  color: var(--p-text);
  font-size: 0.9rem;
  transition: all var(--p-transition);
}
.p-input:focus {
  border-color: var(--p-accent-mid);
  background: rgba(255,174,0,0.04);
  box-shadow: 0 0 0 3px var(--p-accent-dim);
}
.p-input::placeholder { color: var(--p-text-muted); }

textarea.p-input {
  min-height: 130px;
  resize: vertical;
}

.p-form-submit {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.p-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--p-accent);
  color: #080b10;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  border-radius: var(--p-radius);
  border: none;
  cursor: pointer;
  transition: all var(--p-transition);
}
.p-submit-btn:hover:not(:disabled) {
  background: #ffc233;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--p-accent-mid);
}
.p-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.p-submit-btn .p-btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,0,0,0.3);
  border-top-color: #080b10;
  border-radius: 50%;
  animation: p-spin 0.7s linear infinite;
}

.p-form-success {
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: var(--p-radius);
  color: #4ade80;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   PRELOADER
   ============================================================ */
.p-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--p-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}
.p-preloader.hidden {
  opacity: 0;
  pointer-events: none;
}
.p-preloader-ring {
  width: 48px;
  height: 48px;
  border: 3px solid var(--p-card);
  border-top-color: var(--p-accent);
  border-radius: 50%;
  animation: p-spin 0.8s linear infinite;
}

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
.p-scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--p-accent);
  color: #080b10;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px var(--p-accent-mid);
  transition: all var(--p-transition);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}
.p-scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.p-scroll-top:hover {
  background: #ffc233;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--p-accent-glow);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  :root { --p-sidebar-w: 260px; }
  .p-main { padding: 0 24px 60px; }
}

@media (max-width: 900px) {
  .p-bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }
  .p-bento-2x2 { grid-column: span 2; grid-row: span 1; }
  .p-bento-1x2 { grid-row: span 1; }
  .p-bento-2x1 { grid-column: span 2; }
  .p-awards-grid { grid-template-columns: repeat(2, 1fr); }
  .p-carousel-slide { width: calc(50% - 8px); }
}

@media (max-width: 768px) {
  .p-root { flex-direction: column; }

  .p-sidebar {
    width: 100%;
    min-width: 0;
    height: auto;
    position: static;
    padding: 20px 16px;
    border-right: none;
    border-bottom: 1px solid var(--p-border);
  }

  .p-profile { padding-bottom: 16px; margin-bottom: 16px; }
  .p-avatar-ring { width: 64px; height: 64px; font-size: 1.8rem; }

  .p-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .p-nav-item {
    flex: 0 0 auto;
    padding: 7px 12px;
    font-size: 0.78rem;
  }
  .p-nav-item::before { display: none; }

  .p-socials { justify-content: center; }
  .p-resume-btn { margin-bottom: 16px; }
  .p-contact-info { display: none; }

  .p-main { padding: 0 16px 48px; }
  .p-section { padding: 40px 0; }

  .p-stats-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .p-stat-card { padding: 16px 12px; }
  .p-stat-number { font-size: 1.8rem; }

  .p-cert-grid { grid-template-columns: 1fr; }
  .p-awards-grid { grid-template-columns: 1fr 1fr; }

  .p-bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }
  .p-bento-2x2,
  .p-bento-1x2,
  .p-bento-2x1 { grid-column: span 1; grid-row: span 1; }
  .p-port-stat-sep { display: none; }

  .p-carousel-slide { width: calc(100% - 0px); }
  .p-carousel-btn.prev { left: 0; }
  .p-carousel-btn.next { right: 0; }

  .p-edu-card { flex-direction: column; gap: 16px; text-align: center; }
  .p-edu-logo { width: 60px; }
  .p-edu-dates { justify-content: center; }

  .p-form-grid { grid-template-columns: 1fr; }
  .p-form-full { grid-column: span 1; }

  .p-cert-stats { gap: 20px; }
}

@media (max-width: 480px) {
  .p-stats-grid { grid-template-columns: 1fr; max-width: 220px; margin-left: auto; margin-right: auto; }
  .p-awards-grid { grid-template-columns: 1fr; }
  .p-hero-name { font-size: 1.8rem; }
  .p-contact-form-wrap { padding: 20px 16px; }
  .p-card-3d { padding: 24px 18px; }
  .p-card-3d-initials { font-size: 2.4rem; width: 72px; height: 72px; }
  .p-hero-card-area { max-width: 260px; }
}

/* ============================================================
   CHAT POPUP
   ============================================================ */

/* FAB trigger button */
.p-chat-fab {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 1100;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--p-accent);
  color: #000;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,174,0,0.45);
  transition: transform var(--p-transition), box-shadow var(--p-transition), background var(--p-transition);
}
.p-chat-fab:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(255,174,0,0.6); }
.p-chat-fab--active { background: var(--p-card); color: var(--p-accent); border: 1px solid var(--p-border-acc); }

/* Popup panel */
.p-chat-popup {
  position: fixed;
  bottom: 92px;
  left: 28px;
  z-index: 1099;
  width: 340px;
  max-height: 520px;
  background: var(--p-card);
  border: 1px solid var(--p-border-acc);
  border-radius: var(--p-radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0,0,0,0.55);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.97);
  transform-origin: bottom left;
  transition: opacity 0.25s ease, transform 0.25s ease;
  overflow: hidden;
}
.p-chat-popup--open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

/* Header */
.p-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--p-bg2);
  border-bottom: 1px solid var(--p-border);
  flex-shrink: 0;
}
.p-chat-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--p-accent-dim);
  border: 1px solid var(--p-border-acc);
  color: var(--p-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.p-chat-header-name { font-size: 0.88rem; font-weight: 600; color: var(--p-text); }
.p-chat-header-status { font-size: 0.72rem; color: var(--p-text-muted); display: flex; align-items: center; gap: 5px; margin-top: 1px; }
.p-chat-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #3fb950;
  display: inline-block;
  animation: p-dot-pulse 2s ease-in-out infinite;
}
@keyframes p-dot-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.p-chat-header-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--p-text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  line-height: 1;
  transition: color var(--p-transition);
}
.p-chat-header-close:hover { color: var(--p-accent); }

/* Messages area */
.p-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.p-chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.p-chat-msg--user { flex-direction: row-reverse; }
.p-chat-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--p-accent-dim);
  border: 1px solid var(--p-border-acc);
  color: var(--p-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  flex-shrink: 0;
}
.p-chat-msg-bubble {
  max-width: 78%;
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-line;
  word-break: break-word;
}
.p-chat-msg--bot  .p-chat-msg-bubble { background: var(--p-bg2); border: 1px solid var(--p-border); border-bottom-left-radius: 4px; color: var(--p-text); }
.p-chat-msg--user .p-chat-msg-bubble { background: var(--p-accent); color: #000; border-bottom-right-radius: 4px; font-weight: 500; }

/* Typing indicator */
.p-chat-typing { display: flex; align-items: center; gap: 5px; padding: 12px 14px; }
.p-chat-typing span {
  width: 7px; height: 7px;
  background: var(--p-text-muted);
  border-radius: 50%;
  display: inline-block;
  animation: p-typing 1.2s ease-in-out infinite;
}
.p-chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.p-chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes p-typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-6px); opacity: 1; }
}

/* Input row */
.p-chat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--p-border);
  background: var(--p-bg2);
  flex-shrink: 0;
}
.p-chat-input {
  flex: 1;
  background: var(--p-card);
  border: 1px solid var(--p-border);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 0.82rem;
  color: var(--p-text);
  transition: border-color var(--p-transition);
}
.p-chat-input:focus { border-color: var(--p-border-acc); }
.p-chat-input::placeholder { color: var(--p-text-muted); }
.p-chat-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--p-accent);
  color: #000;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--p-transition), transform var(--p-transition);
  align-self: center;
}
.p-chat-send:hover:not(:disabled) { transform: scale(1.1); }
.p-chat-send:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 480px) {
  .p-chat-popup { width: calc(100vw - 32px); left: 16px; bottom: 84px; }
  .p-chat-fab   { bottom: 20px; left: 16px; }
}
