/* ===========================================================================
   Henry Phạm Đức — Personal Landing Page
   Tennis & Tai Chi research hub · bilingual EN/VI
   =========================================================================== */

:root {
  /* Color tokens */
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --bg-soft: #f1f3f6;
  --text: #0f172a;
  --text-muted: #475569;
  --text-soft: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  /* Brand */
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-soft: #ccfbf1;
  --navy: #0c1e3e;

  /* Domain palettes */
  --tennis: #2d6a4f;          /* court green */
  --tennis-dark: #1b4332;
  --tennis-soft: #d8f3dc;
  --tennis-bg: #f0f7f3;

  --taichi: #1f2937;          /* yin slate */
  --taichi-accent: #dc2626;   /* yang red */
  --taichi-soft: #fee2e2;
  --taichi-bg: #f5f5f7;
  --taichi-gold: #b45309;

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-tight: 'Inter Tight', var(--font-sans);
  --font-vi: 'Be Vietnam Pro', var(--font-sans);
  --font-serif: 'Noto Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;

  /* Layout */
  --container: 1180px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .10), 0 2px 6px rgba(15, 23, 42, .04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; transition: color .15s; }
a:hover { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }

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

.vi { font-family: var(--font-vi); }

/* ===========================================================================
   Header
   =========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px;
  background: var(--navy); color: #fff;
  display: grid; place-items: center;
  border-radius: 8px; font-weight: 700; font-size: 14px; letter-spacing: .5px;
  font-family: var(--font-vi);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 16px; font-weight: 700; }
.brand-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  color: var(--text); font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
}
.nav-links a:hover { background: var(--bg-soft); text-decoration: none; }
.nav-links .lang-link {
  font-family: var(--font-vi); font-weight: 600; color: var(--teal-dark);
  border: 1px solid var(--teal-soft); background: var(--teal-soft);
}
.nav-links .lang-link:hover { background: var(--teal); color: #fff; border-color: var(--teal); }
.nav-links .email-link {
  font-size: 16px; line-height: 1;
  color: var(--text); padding: 8px 10px;
}
.nav-links .email-link:hover { background: var(--teal-soft); color: var(--teal-dark); }

@media (max-width: 720px) {
  .nav { flex-direction: column; gap: 12px; padding: 12px 16px; }
  .nav-links { flex-wrap: wrap; justify-content: center; }
  .brand-text { display: none; }
}

/* ===========================================================================
   Hero
   =========================================================================== */
.hero {
  position: relative;
  min-height: 560px;
  display: flex; align-items: center;
  color: #fff;
  overflow: hidden;
  background:
    /* Subtle tennis-court-green-to-navy gradient — no baked-in text */
    radial-gradient(ellipse at top right, rgba(13, 148, 136, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(45, 106, 79, 0.45) 0%, transparent 55%),
    linear-gradient(135deg, #0c1e3e 0%, #0a2540 50%, #0d1f3a 100%);
}
.hero::before {
  /* Yin-yang subtle motif on the right edge */
  content: "";
  position: absolute;
  right: -120px; top: 50%;
  transform: translateY(-50%);
  width: 400px; height: 400px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.15) 0%, rgba(220, 38, 38, 0.12) 50%, rgba(13, 148, 136, 0.15) 100%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
}
.hero-bg { display: none; } /* image background disabled — too many baked-in logos */
.hero-inner { position: relative; z-index: 1; padding: 80px 24px; }
.hero-eyebrow {
  font-family: var(--font-vi);
  font-size: 13px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: #cffafe; margin-bottom: 16px;
}
.hero-title {
  font-family: var(--font-tight);
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.08; font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 20px;
  max-width: 820px;
}
.hero-lede {
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.6;
  color: rgba(255, 255, 255, .9);
  max-width: 680px;
  margin-bottom: 14px;
}
.hero-lede.vi { color: rgba(255, 255, 255, .82); font-size: clamp(15px, 1.6vw, 17px); }
.hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px;
  font-weight: 600; font-size: 15px;
  transition: transform .15s, box-shadow .15s, background .15s;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 4px 14px rgba(13, 148, 136, .35); }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-ghost:hover { background: rgba(255, 255, 255, .2); color: #fff; }

/* ===========================================================================
   Section base
   =========================================================================== */
.section { padding: 80px 0; }
.section-title {
  font-family: var(--font-tight);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700; letter-spacing: -.01em;
  margin-bottom: 20px; color: var(--text);
}
.lede { font-size: 17px; line-height: 1.7; color: var(--text-muted); margin-bottom: 16px; }
.lede.vi { font-size: 16px; color: var(--text-soft); }

/* ===========================================================================
   Bio
   =========================================================================== */
.bio { background: var(--bg); border-top: 1px solid var(--border); }
.bio-grid {
  display: grid; gap: 48px;
  grid-template-columns: 1.5fr 1fr;
  align-items: start;
}
.bio-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: sticky; top: 96px;
}
.bio-card h3 {
  font-size: 14px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-soft);
  margin-bottom: 16px;
}
.bio-card dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; }
.bio-card dt { font-weight: 600; color: var(--text); font-size: 14px; }
.bio-card dd { color: var(--text-muted); font-size: 14px; line-height: 1.5; }

@media (max-width: 800px) {
  .bio-grid { grid-template-columns: 1fr; gap: 32px; }
  .bio-card { position: static; }
}

/* ===========================================================================
   Domain (Tennis / Taichi) sections
   =========================================================================== */
.domain { position: relative; overflow: hidden; }
.domain-tennis { background: var(--tennis-bg); }
.domain-taichi { background: var(--taichi-bg); }
.domain-bg {
  position: absolute; inset: 0; z-index: 0;
  opacity: .06; pointer-events: none;
  background-position: center; background-size: cover; background-repeat: no-repeat;
}
.domain-tennis .domain-bg {
  /* Soft teal/court-green texture using CSS only — no baked-in marketing text */
  background:
    radial-gradient(circle at 20% 30%, rgba(45, 106, 79, 0.6) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(13, 148, 136, 0.5) 0%, transparent 40%),
    var(--tennis-bg);
}
.domain-taichi .domain-bg {
  background-image: url('../images/taichi-hero.jpg');
  background-position: center 50%;
  background-size: 1400px auto;
  background-repeat: no-repeat;
  opacity: .05;
  mix-blend-mode: multiply;
}
.domain .container { position: relative; z-index: 1; }
.domain-header { text-align: center; margin-bottom: 56px; }
.domain-eyebrow {
  font-size: 14px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.domain-tennis .domain-eyebrow { color: var(--tennis); }
.domain-taichi .domain-eyebrow { color: var(--taichi-accent); font-family: var(--font-vi); }
.domain-sub { font-size: 17px; color: var(--text-muted); max-width: 620px; margin: 0 auto; }

/* Project grid */
.project-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-bottom: 56px;
}
.project-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: var(--text);
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  position: relative;
  box-shadow: var(--shadow);
}
.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
  text-decoration: none;
}
.domain-tennis .project-card:hover { border-color: var(--tennis); }
.domain-taichi .project-card:hover { border-color: var(--taichi); }
.project-badge {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  margin-bottom: 14px;
}
.domain-tennis .project-badge { background: var(--tennis-soft); color: var(--tennis-dark); }
.domain-taichi .project-badge { background: var(--taichi-soft); color: var(--taichi-accent); }
.project-card h3 {
  font-family: var(--font-tight);
  font-size: 20px; font-weight: 700; line-height: 1.3;
  margin-bottom: 10px;
}
.project-card p { color: var(--text-muted); font-size: 14.5px; line-height: 1.55; }
.card-meta {
  margin-top: 14px !important; padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 12.5px !important;
  color: var(--text-soft) !important;
  font-family: var(--font-vi);
}

/* Domain extra (link list + crossover essay) */
.domain-extra {
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 820px;
  margin: 0 auto;
}
.domain-extra h3 {
  font-size: 18px; font-weight: 700; margin-bottom: 16px;
  color: var(--text);
}
.domain-extra p { color: var(--text-muted); }
.link-list { list-style: none; padding: 0; }
.link-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px; color: var(--text-muted);
}
.link-list li:last-child { border-bottom: none; }

/* ===========================================================================
   Connect
   =========================================================================== */
.connect { background: var(--bg); border-top: 1px solid var(--border); }
.connect-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 40px;
}
.connect-card {
  display: block;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: var(--text);
  text-align: center;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  box-shadow: var(--shadow);
}
.connect-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: var(--teal-dark);
}
.connect-icon {
  font-size: 40px; line-height: 1;
  margin-bottom: 14px;
}
.connect-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.connect-card p { color: var(--text-muted); font-size: 14px; }
.connect-card .card-meta { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.connect-footer {
  text-align: center; color: var(--text-soft);
  font-size: 14px; margin-top: 32px;
}
.connect-license {
  text-align: center; color: var(--text-soft);
  font-size: 13px; line-height: 1.6;
  max-width: 640px; margin: 16px auto 0;
  padding: 16px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ===========================================================================
   Footer
   =========================================================================== */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, .75);
  padding: 24px 0;
  font-size: 13px;
  text-align: center;
}
.site-footer a { color: #cffafe; }

/* ===========================================================================
   Responsive
   =========================================================================== */
@media (max-width: 720px) {
  .section { padding: 56px 0; }
  .domain-header { margin-bottom: 36px; }
  .project-grid, .connect-grid { gap: 16px; }
  .project-card, .connect-card, .domain-extra { padding: 20px; }
}
