/* Reset và thiết lập cơ bản */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-color: hsl(0, 0%, 92.2%);
    outline-color: hsl(0, 0%, 70.8%);
}

/* Biến CSS cho màu sắc và font chữ */
:root {
    --background: hsl(0, 0%, 100%);
    --foreground: hsl(0, 0%, 14.5%);
    --muted-foreground: hsl(0, 0%, 55.6%);
    --border: hsl(0, 0%, 92.2%);
    --radius: 0.625rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Dark mode */
html.dark {
    --background: hsl(0, 0%, 14.5%);
    --foreground: hsl(0, 0%, 98.5%);
    --muted-foreground: hsl(0, 0%, 70.8%);
    --border: hsl(0, 0%, 26.9%);
}

/* === BODY & BACKGROUND === */
body {
  min-height: 100vh;
  position: relative;
  /* Giảm độ sáng của gradient background */
  background: linear-gradient(-45deg, #e8eaf6, #b0b5c9, #7eaed9, #a084ba);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
  overflow-x: hidden;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Particle effect layer */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image: 
    radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(3px 3px at 60% 70%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(2px 2px at 50% 50%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(4px 4px at 80% 10%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(2px 2px at 90% 60%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(3px 3px at 30% 80%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(2px 2px at 15% 90%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(3px 3px at 70% 40%, rgba(255, 255, 255, 0.7), transparent);
  background-size: 200% 200%, 250% 250%, 300% 300%, 200% 200%, 250% 250%, 300% 300%, 200% 200%, 250% 250%;
  background-position: 0% 0%, 100% 100%, 50% 50%, 0% 100%, 100% 0%, 25% 75%, 75% 25%, 50% 0%;
  animation: particleFloat 25s ease-in-out infinite;
}

@keyframes particleFloat {
  0%, 100% { background-position: 0% 0%, 100% 100%, 50% 50%, 0% 100%, 100% 0%, 25% 75%, 75% 25%, 50% 0%; }
  25% { background-position: 100% 0%, 0% 100%, 75% 25%, 100% 100%, 0% 0%, 75% 25%, 25% 75%, 0% 50%; }
  50% { background-position: 100% 100%, 0% 0%, 50% 50%, 100% 0%, 0% 100%, 50% 50%, 50% 50%, 100% 50%; }
  75% { background-position: 0% 100%, 100% 0%, 25% 75%, 0% 0%, 100% 100%, 25% 75%, 75% 25%, 50% 100%; }
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Tăng độ tối của overlay */
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
  z-index: 0;
}

html.dark body {
  /* Giữ nguyên dark mode */
  background: linear-gradient(-45deg, #2d3748, #4a5568, #5a7a9f, #6b7ca8);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
}

html.dark body::after {
  background-image: 
    radial-gradient(2px 2px at 20% 30%, rgba(142, 197, 252, 0.6), transparent),
    radial-gradient(3px 3px at 60% 70%, rgba(185, 147, 214, 0.5), transparent),
    radial-gradient(2px 2px at 50% 50%, rgba(159, 172, 230, 0.4), transparent),
    radial-gradient(4px 4px at 80% 10%, rgba(142, 197, 252, 0.6), transparent),
    radial-gradient(2px 2px at 90% 60%, rgba(185, 147, 214, 0.5), transparent),
    radial-gradient(3px 3px at 30% 80%, rgba(159, 172, 230, 0.4), transparent),
    radial-gradient(2px 2px at 15% 90%, rgba(142, 197, 252, 0.6), transparent),
    radial-gradient(3px 3px at 70% 40%, rgba(185, 147, 214, 0.5), transparent);
}

html.dark body::before {
  background: rgba(0, 0, 0, 0.25);
}

main, nav, footer {
  position: relative;
  z-index: 1;
}

/* === TEXT SHADOWS === */
h1, h2, h3, .intro-description p, .work-role, .connect-description {
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8), 0 2px 6px rgba(0, 0, 0, 0.1);
}

html.dark h1, html.dark h2, html.dark h3, 
html.dark .intro-description p, html.dark .work-role, 
html.dark .connect-description {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* === NAVIGATION === */
nav {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: none;
}

@media (min-width: 1024px) {
    nav { display: block; }
}

.nav-dots {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-dot {
    width: 0.5rem;
    height: 2rem;
    border-radius: 9999px;
    background-color: hsl(0, 0%, 55.6%);
    opacity: 0.3;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    position: relative;
}

.nav-dot:hover { 
    opacity: 0.6;
    transform: scale(1.2); /* Thêm hiệu ứng phóng to khi hover */
}

.nav-dot.active {
    background-color: var(--foreground);
    opacity: 1;
    height: 2.5rem; /* Dot active cao hơn */
}

/* === TOOLTIP CHO NAV-DOT === */
/* Tooltip text với màu sắc gradient đẹp mắt */
.nav-dot::after {
    content: attr(data-title);
    position: absolute;
    left: calc(100% + 1rem);
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    
    /* Gradient background đẹp */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    white-space: nowrap;
    letter-spacing: 0.025em;
    
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    
    /* Shadow để nổi bật */
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3),
                0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Mũi tên tooltip với màu gradient */
.nav-dot::before {
    content: '';
    position: absolute;
    left: calc(100% + 0.5rem);
    top: 50%;
    transform: translateY(-50%);
    border-width: 0.5rem;
    border-style: solid;
    border-color: transparent #667eea transparent transparent;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
}

/* Khi hover => hiện tooltip */
.nav-dot:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0.25rem) scale(1);
}

.nav-dot:hover::before {
    opacity: 1;
}

/* Dark mode - đổi sang màu sáng hơn */
html.dark .nav-dot::after {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #1a1a1a;
    box-shadow: 0 8px 16px rgba(79, 172, 254, 0.4),
                0 4px 8px rgba(0, 0, 0, 0.3);
}

html.dark .nav-dot::before {
    border-color: transparent #4facfe transparent transparent;
}

/* === MAIN LAYOUT === */
main {
    max-width: 56rem;
    margin: 0 auto;
    padding: 1.5rem;
}

@media (min-width: 640px) { main { padding: 2rem; } }
@media (min-width: 1024px) { main { padding: 4rem; } }

/* === HEADER === */
header {
    min-height: 100vh;
    display: flex;
    align-items: center;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro-grid {
    display: grid;
    gap: 3rem;
    width: 100%;
}

@media (min-width: 1024px) {
    .intro-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 4rem;
    }
}

.intro-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 640px) { .intro-left { gap: 2rem; } }
@media (min-width: 1024px) { .intro-left { grid-column: span 3; } }

/* === PROFILE SECTION === */
.intro-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.profile-label {
    position: relative;
    display: inline-block;
}

.profile-label::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, transparent);
    animation: labelGlow 3s ease-in-out infinite;
}

@keyframes labelGlow {
    0%, 100% { opacity: 0.3; width: 40px; }
    50% { opacity: 1; width: 60px; }
}

/* Profile Image */
.profile-image-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    position: relative;
}

@media (min-width: 1024px) {
    .profile-image-wrapper {
        position: absolute;
        top: 3rem;
        left: 0;
        justify-content: flex-start;
        margin-bottom: 0;
    }
    
    .intro-right .info-block {
        margin-top: 220px;
    }
}

.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    animation: fadeInScale 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards, 
                float 6s ease-in-out 1s infinite;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

html.dark .profile-avatar {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

@media (min-width: 640px) {
    .profile-avatar { width: 160px; height: 160px; }
}

@media (min-width: 1024px) {
    .profile-avatar { width: 180px; height: 180px; }
}

/* Avatar Glow */
.avatar-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3), transparent 70%);
    animation: glowPulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.1); }
}

html.dark .avatar-glow {
    background: radial-gradient(circle, rgba(79, 172, 254, 0.3), transparent 70%);
}

@media (max-width: 640px) { .avatar-glow { width: 150px; height: 150px; } }
@media (min-width: 1024px) { .avatar-glow { width: 240px; height: 240px; } }

/* === TYPOGRAPHY === */
h1 {
    font-size: 3rem;
    font-weight: 600; /* Tăng từ 300 lên 600 để đậm hơn */
    letter-spacing: -0.02em;
    line-height: 1.2;
    /* Gradient đậm hơn với màu sắc rõ ràng hơn */
    background: linear-gradient(135deg, #4c5fd7 0%, #5a3a8f 25%, #d946c0 50%, #2d8ed6 75%, #00c3e6 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 15s ease infinite;
}

@keyframes gradientText {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@media (min-width: 640px) { h1 { font-size: 3.75rem; } }
@media (min-width: 1024px) { h1 { font-size: 4.5rem; } }

h1 .muted { 
    /* Sửa lỗi: không dùng transparent, dùng màu thật */
    background: linear-gradient(135deg, #3b4ab8 0%, #5a3a8f 50%, #4c5fd7 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700; /* Đậm hơn "Nguyễn" */
    animation: gradientText 15s ease infinite;
}

.intro-description {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 28rem;
}

.intro-description p {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    line-height: 1.6;
}

@media (min-width: 640px) {
    .intro-description p { font-size: 1.25rem; }
}

.intro-description .highlight { color: var(--foreground); }

/* === BUTTONS === */
.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-back, .btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn-back {
    color: var(--foreground);
    background-color: transparent;
    border: 1px solid var(--border);
}

.btn-back::before, .btn-download::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.btn-back:hover::before, .btn-download:hover::before {
    width: 300px;
    height: 300px;
}

.btn-back:hover {
    border-color: #667eea;
    background-color: rgba(0, 0, 0, 0.03);
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

html.dark .btn-back:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-download {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
}

.btn-download:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

html.dark .btn-download {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

html.dark .btn-download:hover {
    background: linear-gradient(135deg, #00f2fe, #4facfe);
}

@media (max-width: 640px) {
    .profile-actions { flex-direction: column; width: 100%; }
    .btn-back, .btn-download { width: 100%; justify-content: center; }
}

/* === STATUS & BADGES === */
.status-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

@media (min-width: 640px) {
    .status-info {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
}

.status-badge, .location-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.location-badge {
    color: var(--muted-foreground);
}

.location-badge svg {
    opacity: 0.7;
}

.pulse-dot {
    width: 0.5rem;
    height: 0.5rem;
    background-color: #22c55e;
    border-radius: 50%;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* === RIGHT COLUMN === */
.intro-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
    position: relative;
}

@media (min-width: 640px) { .intro-right { gap: 2rem; } }
@media (min-width: 1024px) {
    .intro-right {
        grid-column: span 2;
        justify-content: flex-end;
        margin-top: 0;
    }
}

.info-block {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    font-family: 'Courier New', monospace;
}

.tech-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tech-label svg {
    opacity: 0.7;
}

/* === SKILLS === */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    background-color: transparent;
    cursor: pointer;
    transition: border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-tag::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
    transition: left 0.5s ease;
}

.skill-tag:hover {
    border-color: hsl(0, 0%, 55.6%);
    opacity: 0.5;
}

.skill-tag:hover::after {
    left: 100%;
}

/* === SECTIONS === */
section {
    min-height: auto;
    padding: 2rem 0;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Delay animation cho từng section */
#goals { animation-delay: 0.1s; }
#work { animation-delay: 0.2s; }
#interests { animation-delay: 0.3s; }
#certifications { animation-delay: 0.4s; }
#gallery { animation-delay: 0.5s; }
#thoughts { animation-delay: 0.6s; }
#connect { animation-delay: 0.7s; }

@media (min-width: 640px) { section { padding: 3rem 0; } }
@media (min-width: 1024px) { section { padding: 4rem 0; } }

h2 {
    font-size: 1.875rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    h2 {
        font-size: 2.25rem;
        margin-bottom: 2rem;
    }
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .section-header {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        margin-bottom: 2rem;
    }
}

.section-header .date-range {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    font-family: 'Courier New', monospace;
}

/* === WORK SECTION === */
.work-items {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 640px) { .work-items { gap: 3rem; } }

.work-item {
    display: grid;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid hsl(0, 0%, 92.2%);
    transition: all 0.5s ease;
}

html.dark .work-item {
    border-bottom-color: hsl(0, 0%, 26.9%);
}

@media (min-width: 640px) {
    .work-item { gap: 2rem; padding: 2rem 0; }
}

@media (min-width: 1024px) {
    .work-item {
        grid-template-columns: repeat(12, 1fr);
        gap: 2rem;
    }
}

.work-year {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--muted-foreground);
    transition: color 0.5s ease;
}

@media (min-width: 640px) { .work-year { font-size: 1.5rem; } }
@media (min-width: 1024px) { .work-year { grid-column: span 2; } }

.work-item:hover .work-year {
    color: var(--foreground);
}

.work-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 1024px) {
    .work-details { grid-column: span 6; }
}

.work-role {
    font-size: 1.125rem;
    font-weight: 500;
}

@media (min-width: 640px) { .work-role { font-size: 1.25rem; } }

.work-company { color: var(--muted-foreground); }

.work-description {
    color: var(--muted-foreground);
    line-height: 1.6;
    max-width: 32rem;
}

.work-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

@media (min-width: 1024px) {
    .work-tech {
        grid-column: span 4;
        justify-content: flex-end;
        margin-top: 0;
    }
}

.tech-tag {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.project-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
}

/* === GOALS SECTION === */
#goals { min-height: auto; padding: 2rem 0; }

@media (min-width: 640px) { #goals { padding: 3rem 0; } }
@media (min-width: 1024px) { #goals { padding: 4rem 0; } }

.goals-content { max-width: 48rem; }

.goal-statement {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--muted-foreground);
}

@media (min-width: 640px) {
    .goal-statement { font-size: 1.25rem; }
}

/* === INTERESTS SECTION === */
.interests-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .interests-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .interests-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.interest-card {
    padding: 2rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: all 0.3s ease;
}

.interest-card:hover {
    border-color: hsl(0, 0%, 55.6%);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.interest-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.interest-card h3 {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--foreground);
}

.interest-card p {
    font-size: 0.95rem;
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* === CERTIFICATIONS SECTION === */
.cert-placeholder {
    padding: 3rem 2rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.cert-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.cert-placeholder p {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

/* === GALLERY SECTION === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (min-width: 640px) { .gallery-grid { gap: 2rem; } }

@media (min-width: 1024px) {
    .gallery-grid {
        max-width: 48rem;
        margin: 0 auto;
    }
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: hsl(0, 0%, 55.6%);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* === THOUGHTS SECTION === */
.thoughts-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 640px) { .thoughts-grid { gap: 2rem; } }
@media (min-width: 1024px) {
    .thoughts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.thought-card {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.5s ease;
    cursor: pointer;
}

@media (min-width: 640px) {
    .thought-card { padding: 2rem; }
}

.thought-card:hover {
    border-color: hsl(0, 0%, 55.6%);
    opacity: 0.5;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.thought-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    font-family: 'Courier New', monospace;
    margin-bottom: 1rem;
}

.thought-card h3 {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

@media (min-width: 640px) {
    .thought-card h3 { font-size: 1.25rem; }
}

.thought-card:hover h3 {
    color: var(--muted-foreground);
}

.thought-excerpt {
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* === CONNECT SECTION === */
.connect-grid {
    display: grid;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .connect-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4rem;
    }
}

.connect-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 640px) { .connect-left { gap: 2rem; } }

.connect-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    line-height: 1.6;
}

@media (min-width: 640px) {
    .connect-description { font-size: 1.25rem; }
}

.email-wrapper {
    margin-top: 1.5rem;
}

.email-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--foreground);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1rem;
}

@media (min-width: 640px) {
    .email-link { font-size: 1.125rem; }
}

.email-link:hover {
    color: var(--muted-foreground);
}

.connect-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 640px) { .connect-right { gap: 2rem; } }

.social-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .social-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.social-card {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-card:hover {
    border-color: hsl(0, 0%, 55.6%);
    opacity: 0.5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.social-card-name {
    color: var(--foreground);
    transition: color 0.3s ease;
    margin-bottom: 0.5rem;
}

.social-card:hover .social-card-name {
    color: var(--muted-foreground);
}

.social-card-handle {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* === FOOTER === */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    footer { padding: 4rem 0; gap: 2rem; }
}

@media (min-width: 1024px) {
    footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.footer-credit {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(1.5rem); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInImage {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.fade-in {
    animation: fadeInImage 1s ease-in-out;
}

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

/* Smooth scroll cho toàn trang */
html {
  scroll-behavior: smooth;
}

/* Interactive Gradient Background - Professional Version with Idle Animation */
.gradient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  
  /* Sử dụng màu gradient từ body hiện tại */
  background: linear-gradient(120deg, #e8eaf6, #b0b5c9, #7eaed9, #a084ba);
  background-size: 200% 200%;
  background-position: 50% 50%;
  
  pointer-events: none;
  transition: filter 0.3s ease;
  filter: brightness(1.05);
  
  /* Subtle breathing glow effect */
  animation: subtleGlow 8s ease-in-out infinite alternate;
}

@keyframes subtleGlow {
  0% { 
    filter: brightness(1.05) saturate(1); 
  }
  100% { 
    filter: brightness(1.15) saturate(1.1); 
  }
}

/* Dark mode gradient */
html.dark .gradient-bg {
  background: linear-gradient(120deg, #2d3748, #4a5568, #5a7a9f, #6b7ca8);
  filter: brightness(0.95);
  animation: subtleGlowDark 8s ease-in-out infinite alternate;
}

@keyframes subtleGlowDark {
  0% { 
    filter: brightness(0.95) saturate(1); 
  }
  100% { 
    filter: brightness(1.05) saturate(1.1); 
  }
}

/* Vô hiệu hóa animation khi chuột di chuyển */
body.has-mouse .gradient-bg {
  animation: none;
}