/* ============================================
   THANH NGUYEN (HOLMES) - Portfolio Styles
   Distinctive, creative, tech-forward aesthetic
   ============================================ */

:root {
  --bg-dark: #0a0e14;
  --bg-card: #12171f;
  --accent: #00d4aa;
  --accent-dim: rgba(0, 212, 170, 0.15);
  --accent-glow: rgba(0, 212, 170, 0.4);
  --text: #e6edf3;
  --text-muted: #8b949e;
  --border: rgba(139, 148, 158, 0.2);
  --font-main: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(0, 212, 170, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 170, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: -2;
}

.bg-gradient {
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-dim), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(0, 100, 150, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(0, 150, 120, 0.06), transparent);
  pointer-events: none;
  z-index: -1;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
  z-index: 1000;
  transition: background 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
  background: rgba(10, 14, 20, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8rem 3rem 4rem;
  gap: 4rem;
}

.hero-content {
  max-width: 580px;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  overflow: hidden;
}

.hero-title .line {
  display: block;
  opacity: 0;
  animation: fadeUp 0.8s forwards;
}

.hero-title .line:nth-child(1) { animation-delay: 0.3s; }
.hero-title .line:nth-child(2) { animation-delay: 0.45s; color: var(--accent); }

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s forwards;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 480px;
  opacity: 0;
  animation: fadeUp 0.8s 0.75s forwards;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.9s forwards;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-dark);
  border: 2px solid var(--accent);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Hero visual - floating cards */
.hero-visual {
  position: relative;
  width: 320px;
  height: 320px;
  flex-shrink: 0;
}

.floating-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  animation: float 6s ease-in-out infinite;
}

.floating-card .card-icon {
  font-size: 1.25rem;
}

.card-1 { top: 10%; left: 0; animation-delay: 0s; }
.card-2 { top: 45%; right: -20%; animation-delay: -2s; }
.card-3 { bottom: 15%; left: 10%; animation-delay: -4s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.section {
  padding: 5rem 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  opacity: 0.8;
}

/* About */
.about-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.about-lead {
  font-size: 1.15rem;
  color: var(--text) !important;
}

.about-text em {
  color: var(--accent);
  font-style: normal;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stat {
  text-align: center;
  padding: 1.25rem 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 160px;
}

.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Timeline */
.timeline {
  position: relative;
}

.timeline-line {
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  opacity: 0.4;
}

.timeline-item {
  position: relative;
  padding-left: 3rem;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  transition: transform 0.3s;
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.2);
  box-shadow: 0 0 20px var(--accent-glow);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.timeline-item:hover .timeline-content {
  border-color: rgba(0, 212, 170, 0.3);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.timeline-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.timeline-content ul {
  list-style: none;
}

.timeline-content li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 1.25rem;
  position: relative;
  margin-bottom: 0.4rem;
}

.timeline-content li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: all 0.3s;
  cursor: default;
}

.project-card:hover {
  border-color: rgba(0, 212, 170, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.project-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.project-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tags span {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 6px;
  font-family: var(--font-mono);
}

/* Skills */
.skills-filter {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1rem;
  font-family: var(--font-main);
  font-size: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-tag {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  transition: all 0.3s;
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.02);
}

.skill-tag.hidden {
  display: none;
}

/* Education */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: all 0.3s;
}

.edu-card:hover {
  border-color: rgba(0, 212, 170, 0.3);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.edu-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.edu-school {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.edu-dates {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.edu-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Contact */
.contact-content {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.contact-lead {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s;
}

a.contact-link:hover {
  color: var(--accent);
}

.contact-icon {
  font-size: 1.25rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.social-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: opacity 0.2s;
}

.social-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 3rem;
  border-top: 1px solid var(--border);
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Scroll animations */
[data-aos] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 6rem;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-visual {
    display: none;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .about-stats {
    flex-direction: row;
    justify-content: center;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: 2rem;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 600px) {
  .section,
  .hero {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .nav {
    padding: 1rem 1.5rem;
  }

  .about-stats {
    flex-direction: column;
  }
}
