/* Portfolio — Phạm Đình Minh Hiếu | K70 UET | Theme: World-Class Cosmic Pink 3D */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-deep: #0b0510;
  --bg-card: rgba(22, 10, 32, 0.65);
  --bg-elevated: #261138;
  --accent: #ec4899; 
  --accent-light: #f472b6; 
  --accent-glow: #db2777; 
  --purple-galaxy: #a855f7; 
  --cyan-star: #22d3ee; 
  --text: #fae8ff; 
  --text-muted: #d8b4e2; 
  --radius: 16px;
  --radius-lg: 24px;
  --font: "Plus Jakarta Sans", "Be Vietnam Pro", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; cursor: none; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(236, 72, 153, 0.15), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.15), transparent 25%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- THANH TIẾN ĐỘ CUỘN (SCROLL PROGRESS) --- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px;
  background: linear-gradient(to right, var(--accent-light), var(--purple-galaxy), var(--cyan-star));
  width: 0%; z-index: 999999; box-shadow: 0 0 10px var(--accent-light);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(236, 72, 153, 0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.noise-bg {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.cursor-dot, .cursor-outline {
  position: fixed; top: 0; left: 0; transform: translate(-50%, -50%); border-radius: 50%; z-index: 99999; pointer-events: none;
}
.cursor-dot { width: 8px; height: 8px; background-color: var(--accent-light); box-shadow: 0 0 12px 2px var(--accent-light); transition: transform 0.2s ease-out; }
.cursor-outline { width: 36px; height: 36px; border: 2px solid rgba(244, 114, 182, 0.4); box-shadow: 0 0 15px rgba(236, 72, 153, 0.2); transition: width 0.2s, height 0.2s, background-color 0.2s, border 0.2s, transform 0.2s; }

.w-full { width: 100%; display: flex; justify-content: center; }
a, button { cursor: none; }

/* ——— NAV ——— */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0.8rem 0; 
  background: rgba(11, 5, 16, 0.55); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(236, 72, 153, 0.15);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.site-nav.nav-hidden { transform: translateY(-100%); }
.site-nav .container { padding: 0; display: flex; align-items: center; position: relative; }

/* Logo Text Fix */
.logo, .logo:visited, .logo:hover, .logo:active { 
  font-weight: 800; font-size: 1.2rem; color: var(--accent-light) !important; text-decoration: none !important; 
}
.logo span { color: #fff !important; text-shadow: 0 0 10px rgba(236, 72, 153, 0.8); }

.nav-links { display: flex; gap: 2rem; list-style: none; position: absolute; left: 50%; transform: translateX(-50%); }
.nav-links a { color: var(--text-muted); font-size: 0.9rem; font-weight: 600; text-decoration: none; transition: all 0.3s ease; }
.nav-links a:hover { color: #fff; text-shadow: 0 0 12px rgba(244, 114, 182, 0.8); }

/* ——— HERO & BACKGROUND VIDEO ——— */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; perspective: 1000px; }

/* --- ẢNH NỀN CHÍNH --- */
.hero-bg { 
  position: absolute; 
  inset: 0; 
  z-index: 0; 
  overflow: hidden;
}

.hero-bg img.hero-image { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  opacity: 1; 
  /* Làm tối ảnh nhẹ (brightness 0.75) và tăng màu sắc để chữ không bị chìm */
  filter: contrast(1.1) brightness(0.75) saturate(1.1); 
} 

/* Lớp phủ gradient (Chỉ làm nền dưới chân tối để đọc nội dung cuộn mượt hơn) */
.hero-overlay { 
  position: absolute; 
  inset: 0; 
  background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(11,5,16,0.5) 80%, var(--bg-deep) 100%); 
  z-index: 1; 
  pointer-events: none;
}

/* --- FIX TEXT BỊ NHÒE MÀU --- */
.hero-content { 
  position: relative; 
  z-index: 10; 
  max-width: 820px; 
}

.hero h1 { 
  font-size: clamp(2.5rem, 5vw, 4rem); 
  font-weight: 800; 
  line-height: 1.1; 
  margin-bottom: 1rem;
  color: #ffffff; /* Ép màu trắng tinh khiết */
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 0, 0, 0.7); /* Bóng đổ cực sâu */
}

.solid-name {
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 0, 0, 0.7);
}

.hero-tagline { 
  font-size: 1.15rem; 
  color: #ffffff; /* Ép màu trắng để dễ đọc trên nền video */
  max-width: 600px; 
  margin: 0 auto 2rem; 
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.8);
}

.hero-badge { display: inline-block; padding: 0.45rem 1.2rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; color: #fff; background: rgba(236, 72, 153, 0.1); border: 1px solid rgba(244, 114, 182, 0.3); box-shadow: 0 0 20px rgba(236, 72, 153, 0.2); backdrop-filter: blur(4px); margin-bottom: 1.5rem; text-shadow: none; }

.hero-cta { display: flex; gap: 1rem; justify-content: center; }
.btn { display: inline-flex; align-items: center; padding: 0.8rem 1.8rem; border-radius: 999px; font-weight: 600; font-size: 0.95rem; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); text-decoration: none; border: none; background: transparent; }
.btn-primary { background: linear-gradient(135deg, #ec4899, #9333ea); color: #fff; box-shadow: 0 8px 24px rgba(236, 72, 153, 0.3); }
.btn-ghost { border: 1px solid rgba(244, 114, 182, 0.4); color: #fff; background: rgba(236, 72, 153, 0.05); }
.btn:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(236, 72, 153, 0.5); }
.scroll-hint { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 2; color: var(--accent-light); font-size: 0.85rem; font-weight: 600; text-decoration: none; animation: float 2s ease-in-out infinite; text-shadow: 0 0 10px rgba(244,114,182,0.5); }
@keyframes float { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ——— GLASS CARD (Độ sâu 3D Inner Shadow) ——— */
.container { width: min(1140px, 92vw); margin-inline: auto; padding: 5rem 0; }
.section-label { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; }
.section-title { font-size: 2.5rem; font-weight: 800; margin-bottom: 3rem; }

.glass-card {
  background: var(--bg-card); backdrop-filter: blur(12px); border: 1px solid rgba(244, 114, 182, 0.1); border-radius: var(--radius-lg); position: relative; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 10px 30px -10px rgba(0,0,0,0.5);
  transition: box-shadow 0.4s ease-out; transform-style: preserve-3d;
}
.glass-card::before { content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0; transition: opacity 0.3s; background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(236, 72, 153, 0.15), transparent 40%); }
.glass-card:hover::before { opacity: 1; }
.glass-card:hover { box-shadow: inset 0 0 0 1px rgba(236, 72, 153, 0.3), 0 20px 40px -10px rgba(236, 72, 153, 0.25); }
.glass-card > * { position: relative; z-index: 1; transform: translateZ(20px); }

/* ——— ABOUT ——— */
.about-grid { display: grid; grid-template-columns: 280px 1fr; gap: 4rem; align-items: center; }
.profile-wrap { position: relative; }
.profile-ring { position: absolute; inset: -12px; border-radius: 50%; border: 2px dashed rgba(244, 114, 182, 0.4); animation: spin 20s linear infinite; box-shadow: 0 0 20px rgba(236,72,153,0.2) inset; }
@keyframes spin { to { transform: rotate(360deg); } }
.profile-photo { width: 280px; height: 280px; border-radius: 50%; object-fit: cover; border: 4px solid rgba(236, 72, 153, 0.3); box-shadow: 0 0 40px rgba(236, 72, 153, 0.3); }
.about-text p { color: var(--text-muted); margin-bottom: 1.2rem; font-size: 1.1rem; }
.about-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.tag { padding: 0.4rem 1rem; background: rgba(236, 72, 153, 0.1); border-radius: 999px; font-size: 0.85rem; font-weight: 600; color: var(--accent-light); border: 1px solid rgba(236, 72, 153, 0.2); }

/* ——— BENTO GRID ——— */
.projects { padding: 5rem 0; background: linear-gradient(180deg, transparent 0%, rgba(236, 72, 153, 0.08) 50%, transparent 100%); position: relative; }
.interest-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 2rem; perspective: 1000px; }
.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; perspective: 1000px; }
.project-card, .interest-card { display: flex; flex-direction: column; }
.project-card.span-2 { grid-column: span 2; }
.project-thumb, .interest-visual { height: 180px; background: rgba(0,0,0,0.3); border-bottom: 1px solid rgba(255,255,255,0.05); }
.project-body, .interest-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.project-num { font-size: 0.75rem; font-weight: 800; color: var(--accent-light); letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.project-body h3, .interest-body h4 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.project-body p, .interest-body p { font-size: 0.9rem; color: var(--text-muted); flex: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.project-tags span { font-size: 0.75rem; padding: 0.25rem 0.6rem; background: rgba(255,255,255,0.05); color: var(--cyan-star); border-radius: 4px; border: 1px solid rgba(34,211,238,0.2); }

/* ——— THUMBNAILS MOCKUPS ——— */
.mock-ide { height: 100%; background: #0f0514; padding: 12px; font-family: monospace; font-size: 10px; color: #f9a8d4; overflow: hidden; }
.mock-ide .bar { height: 20px; background: #2a0a38; margin: -12px -12px 10px; display: flex; align-items: center; gap: 5px; padding: 0 10px; }
.mock-ide .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.mock-ide .dot:nth-child(1) { background: #ff5f57; }
.mock-ide .dot:nth-child(2) { background: #febc2e; }
.mock-ide .dot:nth-child(3) { background: #28c840; }
.mock-ide .kw { color: #a855f7; font-weight: bold; }
.mock-ide .fn { color: #22d3ee; }
.mock-sport { height: 100%; background: linear-gradient(135deg, #be185d, #831843); display: flex; align-items: center; justify-content: center; position: relative; }
.mock-sport::before { content: ""; width: 70%; height: 55%; border: 3px solid rgba(255, 255, 255, 0.4); border-radius: 4px; }
.mock-food { height: 100%; background: linear-gradient(160deg, #9d174d, #4c0519); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 16px; }
.mock-food span { background: rgba(255,255,255,0.1); border-radius: 6px; }
.mock-ielts { height: 100%; background: linear-gradient(160deg, #6b21a8, #db2777); padding: 20px; display: flex; justify-content: space-between; flex-direction: column; }
.mock-ielts .lines { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.mock-ielts .lines i { display: block; height: 6px; background: rgba(255, 255, 255, 0.25); border-radius: 3px; }
.mock-ielts .lines i:nth-child(1) { width: 90%; }
.mock-ielts .lines i:nth-child(2) { width: 70%; }
.mock-ielts .lines i:nth-child(3) { width: 85%; }
.mock-ielts .target { align-self: flex-end; font-size: 2rem; }
.thumb-folder { padding: 1.5rem; height: 100%; background: linear-gradient(135deg, #3b154a, #160a20); display: flex; align-items: center; }
.laptop-frame { background: #4a1d63; border-radius: 8px 8px 0 0; padding: 8px 8px 0; width: 60%; box-shadow: 0 10px 20px rgba(0,0,0,0.6); }
.laptop-screen { background: #0f0514; padding: 12px; font-size: 11px; color: #e8a1ff; font-family: monospace; overflow: hidden; white-space: nowrap; }
.thumb-pdf { height: 100%; background: linear-gradient(135deg, #581c87, #160a20); display: flex; align-items: center; justify-content: center; gap: 1.5rem; }
.pdf-doc { width: 80px; height: 110px; background: #fdf2f8; border-radius: 4px; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.search-ops { font-family: monospace; font-size: 12px; color: var(--cyan-star); }
.thumb-ai { height: 100%; display: grid; grid-template-columns: 1fr 1fr; }
.ai-before { background: #2a0a38; padding: 16px; font-size: 11px; color: #94a3b8; filter: blur(0.5px); }
.ai-after { background: linear-gradient(135deg, #4c1d95, #9d174d); padding: 16px; font-size: 11px; border-left: 2px solid var(--accent); }
.chat-bubble { background: rgba(244,114,182,0.2); padding: 10px; border-radius: 8px; margin-top: 10px; color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.thumb-content { height: 100%; display: flex; background: #2d114a; }
.thumb-content .panel { padding: 16px; font-size: 10px; color: #e8a1ff; flex: 1; border-right: 1px solid rgba(255,255,255,0.1); }
.thumb-content .preview { flex: 1.2; background: linear-gradient(160deg, #ec4899, #a855f7); display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 12px; }
.thumb-security { height: 100%; background: linear-gradient(135deg, #831843, #160a20); display: flex; align-items: center; justify-content: center; gap: 2rem; }
.shield-icon { font-size: 3rem; filter: drop-shadow(0 0 15px rgba(236,72,153,0.5)); }
.verified-stamp { border: 2px solid var(--accent-light); padding: 10px; border-radius: 8px; font-weight: 800; font-size: 11px; transform: rotate(-5deg); color: var(--accent-light); }

/* ——— REFLECTION & WORKSPACE ——— */
.reflection-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.workspace-mock { height: 100%; min-height: 400px; background: linear-gradient(160deg, #2a0a38, #100517); border-radius: var(--radius-lg); position: relative; padding: 2rem; display: flex; flex-direction: column; justify-content: flex-end; }
.lamp-glow { position: absolute; top: 10%; left: 10%; width: 200px; height: 200px; background: radial-gradient(circle, rgba(236,72,153,0.4), transparent 60%); }
.reflection-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 2rem 0; perspective: 1000px; }
.reflection-col { padding: 1.5rem; }
.reflection-col h4 { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; color: #fff; }
.reflection-col ul { list-style: none; }
.reflection-col li { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0.75rem; padding-left: 1.25rem; position: relative; }
.reflection-col li::before { content: "✦"; position: absolute; left: 0; color: var(--accent-light); font-size: 0.8rem; }
.reflection-future { padding: 1.5rem; background: rgba(236, 72, 153, 0.1); border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; font-size: 1rem; color: var(--text-muted); }

/* ——— MODAL ĐẲNG CẤP ——— */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(5, 2, 8, 0.9); backdrop-filter: blur(10px);
  z-index: 10000; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all 0.4s ease; perspective: 2000px;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
  width: 90%; max-width: 700px; max-height: 85vh; overflow-y: auto; padding: 3rem;
  transform: translateY(60px) rotateX(10deg) scale(0.9); transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 30px 60px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(236,72,153,0.3);
}
.modal-overlay.active .modal-content { transform: translateY(0) rotateX(0) scale(1); }
.modal-close { position: absolute; top: 1.5rem; right: 1.5rem; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: #fff; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; transition: all 0.3s; }
.modal-close:hover { background: var(--accent); transform: rotate(90deg); }
.modal-body h3 { font-size: 1.8rem; margin: 0.5rem 0 1.5rem; }
.modal-body p, .modal-body li { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 1rem; }
.modal-body ul { padding-left: 1.5rem; }

/* Responsive */
@media (max-width: 1024px) {
  .bento-grid, .interest-grid { grid-template-columns: repeat(2, 1fr); }
  .reflection-inner, .reflection-split { grid-template-columns: 1fr; }
  .project-card.span-2 { grid-column: span 2; }
  .about-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .about-meta { justify-content: center; }
  .nav-links { display: none; }
}
@media (max-width: 768px) {
  .bento-grid, .interest-grid { grid-template-columns: 1fr; }
  .project-card.span-2 { grid-column: span 1; }
  .cursor-dot, .cursor-outline { display: none; }
  * { cursor: auto; } 
  .glass-card { transform: none !important; }
}