/* ==========================================================================
   Portfolio CSS - Dung Phan
   Minimalistic Modern Design System
   ========================================================================== */

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: #fafafa;
  min-height: 100vh;
}

/* Ensure body takes full height for footer positioning */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  z-index: 1000;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: -0.5px;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: #6b7280;
  font-weight: 400;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #1a1a1a;
}

/* ==========================================================================
   Main Content
   ========================================================================== */

main {
  margin-top: 100px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  padding: 0.8rem 1.8rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: -0.2px;
}

.btn-primary {
  background: #1a1a1a;
  color: white;
}

.btn-primary:hover {
  background: #000;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
  background: #f9fafb;
  color: #1a1a1a;
  border-color: #d1d5db;
}

/* ==========================================================================
   Home Page - Hero Section
   ========================================================================== */

.hero {
  text-align: center;
  padding: 6rem 0 8rem 0;
  color: #1a1a1a;
  background: #fafafa;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  letter-spacing: -2px;
  color: #1a1a1a;
}

.hero .tagline {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #6b7280;
  font-weight: 500;
}

.hero .subtitle {
  font-size: 1.1rem;
  margin-bottom: 4rem;
  color: #9ca3af;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   Home Page - Stats Section
   ========================================================================== */

.stats {
  background: white;
  padding: 4rem 0;
  margin: 0;
  border-top: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-card {
  background: transparent;
  padding: 2rem 1rem;
  border-radius: 0;
  color: #1a1a1a;
  transition: none;
}

.stat-card:hover {
  transform: none;
}

.stat-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #6b7280;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-card p {
  font-size: 1.8rem;
  color: #1a1a1a;
  font-weight: 600;
  letter-spacing: -1px;
}

/* ==========================================================================
   Projects Section (Home & Projects Page)
   ========================================================================== */

.projects {
  background: #fafafa;
  padding: 6rem 0;
  border-radius: 0;
  margin-top: 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 4rem;
  color: #1a1a1a;
  position: relative;
  font-weight: 600;
  letter-spacing: -1px;
}

.section-title::after {
  display: none;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: #fff;
  border-radius: 8px;
  padding: 2.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid #f3f4f6;
}

.project-card::before {
  display: none;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #e5e7eb;
}

.project-icon {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #6b7280;
}

.project-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.project-card h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
}

.project-card p {
  color: #6b7280;
  margin-bottom: 2rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 2rem;
}

.tech-tag {
  background: #f3f4f6;
  color: #6b7280;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link {
  text-decoration: none;
  color: #6b7280;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s ease;
  font-size: 0.85rem;
}

.project-link:hover {
  color: #1a1a1a;
}

/* ==========================================================================
   Projects Page Specific
   ========================================================================== */

.projects-hero {
  background: #fafafa;
  padding: 6rem 0 4rem 0;
  text-align: center;
  margin-top: 100px;
}

.projects-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
  letter-spacing: -1.5px;
}

.projects-hero .subtitle {
  font-size: 1.1rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
  font-weight: 300;
  line-height: 1.6;
}

.projects-list {
  background: white;
  padding: 4rem 0 6rem 0;
  border-top: 1px solid #f3f4f6;
}

.projects-list .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.projects-list .project-card {
  background: #fafafa;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  padding: 3rem;
  transition: all 0.2s ease;
  position: relative;
}

.projects-list .project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #e5e7eb;
}

.projects-list .btn {
  padding: 0.8rem 1.8rem;
  background: #1a1a1a;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.projects-list .btn:hover {
  background: #000;
  transform: translateY(-1px);
}

/* ==========================================================================
   About Page
   ========================================================================== */

.about-hero {
  background: #fafafa;
  padding: 6rem 0 4rem 0;
  text-align: center;
  margin-top: 100px;
}

.about-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
  letter-spacing: -1.5px;
}

.about-hero .subtitle {
  font-size: 1.1rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
  font-weight: 300;
  line-height: 1.6;
}

.about-content {
  background: white;
  padding: 6rem 0;
  border-top: 1px solid #f3f4f6;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-text h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.about-text p {
  color: #6b7280;
  line-height: 1.7;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.about-text .highlight {
  color: #1a1a1a;
  font-weight: 500;
}

.skills-section {
  background: #fafafa;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  padding: 3rem;
}

.skills-section h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 2.5rem;
  letter-spacing: -0.5px;
  text-align: center;
}

.skills-grid {
  display: grid;
  gap: 2.5rem;
}

.skill-category {
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 2rem;
}

.skill-category:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.skill-category h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  background: white;
  color: #6b7280;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.skill-tag:hover {
  background: #f9fafb;
  color: #1a1a1a;
  border-color: #d1d5db;
}

.education-section {
  background: #fafafa;
  padding: 4rem 0;
  border-top: 1px solid #f3f4f6;
}

.education-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.education-content h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 2rem;
  letter-spacing: -0.5px;
}

.education-card {
  background: white;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  padding: 3rem;
  margin-bottom: 2rem;
  transition: all 0.2s ease;
}

.education-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #e5e7eb;
}

.education-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  letter-spacing: -0.3px;
}

.education-card .institution {
  color: #6b7280;
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.education-card .description {
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.6;
}

.cv-section {
  background: white;
  padding: 4rem 0;
  text-align: center;
  border-top: 1px solid #f3f4f6;
}

.cv-section h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
}

.cv-section p {
  color: #6b7280;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.cv-section .btn {
  padding: 1rem 2rem;
  background: #1a1a1a;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cv-section .btn:hover {
  background: #000;
  transform: translateY(-1px);
}

/* ==========================================================================
   Contact Page
   ========================================================================== */

.contact-hero {
  background: #fafafa;
  padding: 6rem 0 4rem 0;
  text-align: center;
  margin-top: 100px;
}

.contact-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
  letter-spacing: -1.5px;
}

.contact-hero .subtitle {
  font-size: 1.1rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
  font-weight: 300;
  line-height: 1.6;
}

.contact-content {
  background: white;
  padding: 6rem 0;
  border-top: 1px solid #f3f4f6;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.contact-info h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 2rem;
  letter-spacing: -0.5px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: #fafafa;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  text-decoration: none;
  color: #1a1a1a;
  transition: all 0.2s ease;
}

.contact-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #e5e7eb;
  background: #f9fafb;
}

.contact-link i {
  font-size: 1.2rem;
  color: #6b7280;
  width: 24px;
  text-align: center;
}

.contact-link .link-content {
  flex: 1;
}

.contact-link .link-label {
  font-size: 0.85rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.2rem;
}

.contact-link .link-value {
  font-size: 1rem;
  font-weight: 500;
  color: #1a1a1a;
}

.contact-link .external-icon {
  font-size: 0.8rem;
  color: #9ca3af;
}

.availability-card {
  background: #fafafa;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
}

.availability-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1rem;
  letter-spacing: -0.3px;
}

.availability-card p {
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #dcfce7;
  color: #16a34a;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.contact-form {
  background: #fafafa;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  padding: 3rem;
}

.contact-form h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
  text-align: center;
}

.contact-form p {
  color: #6b7280;
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
}

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

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 1rem;
  background: white;
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1a1a1a;
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  text-align: center;
}

.form-submit .btn {
  padding: 1rem 2rem;
  background: #1a1a1a;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.form-submit .btn:hover {
  background: #000;
  transform: translateY(-1px);
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  background: #1a1a1a;
  color: #9ca3af;
  padding: 3rem 0;
  text-align: center;
  margin-top: auto;
}

footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

footer p {
  font-size: 0.9rem;
  margin: 0;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero,
.stats,
.projects {
  animation: fadeInUp 0.8s ease-out;
}

.project-card {
  animation: fadeInUp 0.8s ease-out;
}

.project-card:nth-child(2) {
  animation-delay: 0.2s;
}

.project-card:nth-child(3) {
  animation-delay: 0.4s;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 968px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .tagline {
    font-size: 1.2rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .projects-list .container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .projects-list .project-card {
    padding: 2rem;
  }

  .projects-hero {
    padding: 4rem 0 3rem 0;
    margin-top: 100px;
  }

  .projects-hero h1 {
    font-size: 2.5rem;
  }

  .about-hero {
    padding: 4rem 0 3rem 0;
    margin-top: 100px;
  }

  .about-hero h1 {
    font-size: 2.5rem;
  }

  .about-content {
    padding: 4rem 0;
  }

  .about-grid {
    gap: 3rem;
    padding: 0 1rem;
  }

  .skills-section {
    padding: 2rem;
  }

  .education-card {
    padding: 2rem;
  }

  .contact-hero {
    padding: 4rem 0 3rem 0;
    margin-top: 100px;
  }

  .contact-hero h1 {
    font-size: 2.5rem;
  }

  .contact-content {
    padding: 4rem 0;
  }

  .contact-grid {
    gap: 3rem;
    padding: 0 1rem;
  }

  .contact-form {
    padding: 2rem;
  }

  .contact-link {
    padding: 1.2rem;
  }
}