/* 
  =========================================
  DESIGN SYSTEM & BASE STYLES - TS. CHUNG TẤN PHONG PORTFOLIO
  =========================================
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  /* Color Palette (Deep Ocean & Zen Teal) */
  --bg-dark: #060b13;
  --bg-deep: #0b1524;
  --bg-card: rgba(15, 29, 49, 0.4);
  --bg-card-hover: rgba(20, 38, 64, 0.6);
  
  --accent-cyan: #22d3ee;
  --accent-teal: #14b8a6;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  --gradient-primary: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  --gradient-water: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-deep) 100%);
  --gradient-glow: radial-gradient(circle, rgba(34, 211, 238, 0.15) 0%, rgba(6, 11, 19, 0) 70%);
  
  --border-glass: rgba(255, 255, 255, 0.05);
  --border-glass-active: rgba(34, 211, 238, 0.3);
  
  --shadow-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --shadow-accent: 0 0 25px rgba(34, 211, 238, 0.25);
  
  /* Fonts */
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  /* Layout */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-dark);
  background-image: var(--gradient-water);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-deep);
  border: 2px solid var(--bg-dark);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Background Glow Elements */
.bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: var(--gradient-glow);
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  opacity: 0.6;
}

.bg-glow-1 { top: 10%; left: -10%; }
.bg-glow-2 { top: 40%; right: -10%; }
.bg-glow-3 { bottom: 10%; left: 10%; }

/* Typography & Layout Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

img {
  max-width: 100%;
  display: block;
}

/* Section Common Styling */
section {
  padding: 6rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-subtitle {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: block;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 30%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* 
  =========================================
  COMPONENTS
  =========================================
*/

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--bg-dark);
  box-shadow: 0 4px 15px rgba(34, 211, 238, 0.2);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-accent);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border-color: var(--border-glass);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-cyan);
  transform: translateY(-3px);
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--shadow-glow);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass-active);
  transform: translateY(-5px);
}

/* 
  =========================================
  HEADER / NAVIGATION
  =========================================
*/
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  transition: var(--transition-smooth);
  padding: 1.5rem 0;
}

header.scrolled {
  background: rgba(6, 11, 19, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  padding: 1rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo svg {
  width: 28px;
  height: 28px;
  fill: var(--accent-cyan);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.25rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--text-primary);
  margin: 5px 0;
  transition: var(--transition-fast);
}

/* 
  =========================================
  HERO SECTION
  =========================================
*/
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 8rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  color: var(--accent-cyan);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.badge svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-title span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 580px;
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-wrapper {
  position: relative;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  padding: 10px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.3) 0%, rgba(59, 130, 246, 0.3) 100%);
  box-shadow: var(--shadow-glow);
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--bg-dark);
  position: relative;
}

.avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.avatar-wrapper:hover .avatar-inner img {
  transform: scale(1.05);
}

/* Floating water ripples decoration */
.ripple {
  position: absolute;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 50%;
  animation: ripple-pulse 6s infinite linear;
}

.ripple-1 { width: 440px; height: 440px; animation-delay: 0s; }
.ripple-2 { width: 500px; height: 500px; animation-delay: 2s; }

@keyframes ripple-pulse {
  0% { transform: scale(0.95); opacity: 0.2; }
  50% { transform: scale(1.05); opacity: 0.5; }
  100% { transform: scale(0.95); opacity: 0.2; }
}

/* 
  =========================================
  ABOUT / JOURNEY (TIMELINE)
  =========================================
*/
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  margin-bottom: 6rem;
}

.about-text h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
}

.stat-num {
  font-size: 2.25rem;
  font-weight: 800;
  font-family: var(--font-heading);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--bg-dark));
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  right: -8px;
  background-color: var(--bg-dark);
  border: 4px solid var(--accent-cyan);
  top: 22px;
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 0 10px var(--accent-cyan);
  transition: var(--transition-fast);
}

.left {
  left: 0;
}

.right {
  left: 50%;
}

.right::after {
  left: -8px;
}

.timeline-content {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  position: relative;
  border-radius: 20px;
}

.timeline-item:hover::after {
  background-color: var(--accent-cyan);
  transform: scale(1.2);
}

.timeline-date {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--accent-cyan);
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: block;
}

.timeline-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.timeline-desc {
  font-size: 0.925rem;
  color: var(--text-secondary);
}

/* 
  =========================================
  PHILOSOPHY SECTION
  =========================================
*/
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.philosophy-card {
  text-align: center;
}

.philosophy-icon {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  background: rgba(34, 211, 238, 0.05);
  border: 1px solid rgba(34, 211, 238, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  color: var(--accent-cyan);
  transition: var(--transition-smooth);
}

.philosophy-icon svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.philosophy-card:hover .philosophy-icon {
  background: var(--gradient-primary);
  color: var(--bg-dark);
  transform: rotate(10deg);
  box-shadow: var(--shadow-accent);
}

.philosophy-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.philosophy-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* 
  =========================================
  PROJECTS SECTION
  =========================================
*/
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.project-card {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-img-wrapper {
  position: relative;
  height: 220px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-glass);
}

.project-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.project-card:hover .project-img-wrapper img {
  transform: scale(1.05);
}

.project-tag {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(6, 11, 19, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

.project-body {
  padding: 2.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-body h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.project-body p {
  color: var(--text-secondary);
  font-size: 0.925rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--accent-cyan);
  font-family: var(--font-heading);
}

.project-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: var(--transition-fast);
}

.project-link:hover svg {
  transform: translateX(5px);
}

/* 
  =========================================
  SERVICES SECTION
  =========================================
*/
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
}

.service-icon {
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
}

.service-icon svg {
  width: 40px;
  height: 40px;
  fill: currentColor;
}

.service-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.service-price {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  border-top: 1px solid var(--border-glass);
  padding-top: 1.5rem;
}

.service-price span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* 
  =========================================
  TESTIMONIALS SECTION
  =========================================
*/
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
}

.testimonial-card {
  position: relative;
}

.quote-icon {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: rgba(34, 211, 238, 0.08);
}

.quote-icon svg {
  width: 80px;
  height: 80px;
  fill: currentColor;
}

.testimonial-content {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.author-avatar {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent-cyan);
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-name {
  font-weight: 700;
  font-size: 1.1rem;
  display: block;
}

.author-role {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 
  =========================================
  CONTACT SECTION
  =========================================
*/
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 5rem;
}

.contact-info h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.contact-item-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.05);
  border: 1px solid rgba(34, 211, 238, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.contact-item-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.contact-item-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contact-item-content p, .contact-item-content a {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.contact-item-content a:hover {
  color: var(--accent-cyan);
}

/* Form Styles */
.contact-form-wrapper {
  position: relative;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

input, textarea {
  width: 100%;
  background: rgba(6, 11, 19, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  background: rgba(6, 11, 19, 0.7);
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.1);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

/* 
  =========================================
  FOOTER
  =========================================
*/
footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border-glass);
  background-color: #04080e;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.social-links {
  display: flex;
  gap: 1.25rem;
}

.social-link {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.social-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.social-link:hover {
  background: var(--gradient-primary);
  color: var(--bg-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-accent);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 2rem;
}

.copyright {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* 
  =========================================
  RESPONSIVE DESIGN (MEDIA QUERIES)
  =========================================
*/
@media (max-width: 1024px) {
  .hero-title {
    font-size: 3.25rem;
  }
  .about-grid, .contact-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
  .philosophy-grid, .projects-grid, .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  section {
    padding: 4rem 0;
  }
  .section-title {
    font-size: 2rem;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-btns {
    justify-content: center;
  }
  .hero-visual {
    order: -1;
  }
  .avatar-wrapper {
    width: 280px;
    height: 280px;
  }
  .ripple-1 { width: 320px; height: 320px; }
  .ripple-2 { width: 360px; height: 360px; }
  
  .timeline::after {
    left: 31px;
  }
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 0;
  }
  .timeline-item.right {
    left: 0;
  }
  .timeline-item::after {
    left: 23px;
    right: auto;
  }
  .timeline-item.right::after {
    left: 23px;
  }
  
  .philosophy-grid, .projects-grid, .services-grid, .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: rgba(6, 11, 19, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
    transition: var(--transition-smooth);
    border-left: 1px solid var(--border-glass);
    z-index: 99;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .mobile-menu-btn {
    display: block;
    z-index: 100;
  }
  
  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -8px);
  }
  
  .footer-grid {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
}
