/* ==========================================================================
   Long Hải — Developer Website
   Modern SaaS-style static site · Pure CSS
   ========================================================================== */

:root {
  --color-bg: #0b0f19;
  --color-bg-elevated: #111827;
  --color-bg-card: #151d2e;
  --color-surface: #1a2332;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.14);

  --color-text: #e8edf5;
  --color-text-muted: #94a3b8;
  --color-text-subtle: #64748b;

  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-primary-glow: rgba(59, 130, 246, 0.35);
  --color-accent: #22d3ee;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.5);

  --header-height: 72px;
  --container-max: 1120px;
  --section-padding: 96px;
}

/* Reset & Base */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent);
}

strong {
  font-weight: 600;
  color: var(--color-text);
}

/* Layout */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-padding) 0;
}

.section-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 56px;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.0625rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.0625rem;
}

.logo:hover {
  color: var(--color-text);
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--color-text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px 24px;
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav:not([hidden]) {
  display: flex;
}

.mobile-nav a {
  padding: 12px 16px;
  color: var(--color-text-muted);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav a:hover,
.mobile-nav a[aria-current="page"] {
  color: var(--color-text);
  background: var(--color-surface);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  color: #fff;
  background: var(--color-primary);
  box-shadow: 0 0 0 0 var(--color-primary-glow);
}

.btn-primary:hover {
  color: #fff;
  background: var(--color-primary-hover);
  box-shadow: 0 4px 24px var(--color-primary-glow);
}

.btn-secondary {
  color: var(--color-text);
  background: var(--color-surface);
  border-color: var(--color-border-strong);
}

.btn-secondary:hover {
  color: var(--color-text);
  background: var(--color-bg-card);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  color: var(--color-text-muted);
  background: transparent;
  border-color: var(--color-border);
}

.btn-ghost:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

.btn-block {
  width: 100%;
}

/* Hero */

.hero {
  position: relative;
  padding: 120px 0 100px;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  margin-bottom: 24px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-accent);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 100px;
}

.hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-lead {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  max-width: 600px;
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.6;
}

/* About */

.about {
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  padding: 32px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  color: var(--color-primary);
  background: rgba(59, 130, 246, 0.12);
  border-radius: var(--radius-md);
}

.card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.card p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* Tech Stack */

.tech-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  list-style: none;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 16px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.tech-item:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.tech-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.tech-desc {
  font-size: 0.8125rem;
  color: var(--color-text-subtle);
  line-height: 1.4;
}

/* Contact */

.contact-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
  padding: 48px;
  background: linear-gradient(135deg, var(--color-bg-card) 0%, var(--color-surface) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.contact-content h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.contact-content > p {
  color: var(--color-text-muted);
  margin-bottom: 20px;
  max-width: 480px;
}

.contact-email {
  display: inline-block;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 12px;
  word-break: break-all;
}

.contact-email:hover {
  color: var(--color-primary);
}

.contact-meta {
  font-size: 0.875rem;
  color: var(--color-text-subtle);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 200px;
}

/* Footer */

.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-inner p {
  font-size: 0.875rem;
  color: var(--color-text-subtle);
}

.footer-inner nav {
  display: flex;
  gap: 24px;
}

.footer-inner nav a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.footer-inner nav a:hover {
  color: var(--color-text);
}

/* Legal / Privacy Page */

.legal-page {
  padding: 64px 0 var(--section-padding);
}

.legal-container {
  max-width: 760px;
}

.legal-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
}

.legal-header h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.legal-meta {
  font-size: 0.875rem;
  color: var(--color-text-subtle);
  margin-bottom: 20px;
}

.legal-intro {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.legal-section {
  margin-bottom: 40px;
}

.legal-section h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--color-text);
}

.legal-section h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 24px 0 10px;
  color: var(--color-text);
}

.legal-section p {
  color: var(--color-text-muted);
  margin-bottom: 12px;
  line-height: 1.7;
}

.legal-section ul {
  margin: 12px 0 16px 24px;
  color: var(--color-text-muted);
}

.legal-section li {
  margin-bottom: 8px;
  line-height: 1.65;
}

.legal-section a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-contact {
  font-style: normal;
  padding: 24px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  line-height: 1.8;
}

.legal-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

/* Responsive */

@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .tech-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-card {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 36px;
  }

  .contact-links {
    flex-direction: row;
    min-width: unset;
  }

  .contact-links .btn {
    flex: 1;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 72px;
  }

  .nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 80px 0 64px;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-links {
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

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

  .contact-card {
    padding: 28px 20px;
  }

  .card {
    padding: 24px;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
