/*
Theme Name: Ryan Lin — HUD
Theme URI: https://example.com
Author: Ryan Lin
Author URI: https://example.com
Description: 客製單頁佈景主題,深色科技格線風格,包含自我介紹、頭貼、業務項目與業務主體。
Version: 2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: rl-hud
*/

:root {
  --rl-bg: #0A0C0E;
  --rl-bg-2: #0F1215;
  --rl-panel: #14181C;
  --rl-line: rgba(255,255,255,0.09);
  --rl-line-soft: rgba(255,255,255,0.045);
  --rl-ink: #E9ECEF;
  --rl-ink-soft: #8D96A0;
  --rl-ink-dim: #565E67;
  --rl-cyan: #5FD3D0;
  --rl-amber: #F0A840;
  --rl-red: #E4634B;

  --rl-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --rl-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Noto Sans TC", sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Inter:wght@300;400;500;600;700&display=swap');

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--rl-bg);
  color: var(--rl-ink);
  font-family: var(--rl-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  background-image:
    linear-gradient(var(--rl-line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--rl-line-soft) 1px, transparent 1px);
  background-size: 44px 44px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.rl-wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.rl-mono-tag {
  font-family: var(--rl-mono); font-size: 12px; letter-spacing: .06em; color: var(--rl-cyan);
  display: inline-flex; align-items: center; gap: 8px;
}
.rl-mono-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rl-cyan); box-shadow: 0 0 8px var(--rl-cyan); }

/* ---------- Nav ---------- */
.rl-nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  background: rgba(10,12,14,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rl-line);
}
.rl-nav-left { display: flex; align-items: center; gap: 12px; }
.rl-nav-name { font-size: 14px; font-weight: 500; }
.rl-nav-status { font-family: var(--rl-mono); font-size: 11px; color: var(--rl-ink-dim); margin-left: 4px; white-space: nowrap; }
.rl-nav-links { display: flex; gap: 26px; font-size: 13.5px; color: var(--rl-ink-soft); font-family: var(--rl-mono); flex-wrap: nowrap; margin: 0; }
.rl-nav-links li { display: flex; }
.rl-nav-links a { position: relative; white-space: nowrap; }
.rl-nav-links a:hover { color: var(--rl-cyan); }

@media (max-width: 1080px) and (min-width: 861px) {
  .rl-nav-links { gap: 16px; font-size: 12.5px; }
  .rl-nav { padding: 18px 20px; }
  .rl-nav-status { display: none; }
}

/* ---------- Hero (with profile photo) ---------- */
.rl-hero { padding: 90px 0 70px; position: relative; }
.rl-hero-grid { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: center; }
.rl-hero-label { margin-bottom: 24px; }
.rl-hero h1 {
  font-weight: 700; font-size: clamp(32px, 5.2vw, 54px); line-height: 1.14; margin: 0 0 8px; max-width: 16ch;
  letter-spacing: -0.01em;
}
.rl-hero-role { font-family: var(--rl-mono); font-size: 14px; color: var(--rl-cyan); margin: 0 0 20px; }
.rl-hero h1 span { color: var(--rl-cyan); }
.rl-hero p { font-size: 16px; color: var(--rl-ink-soft); max-width: 52ch; margin: 0 0 28px; }
.rl-hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.rl-btn-primary, .rl-btn-ghost {
  font-size: 13.5px; font-family: var(--rl-mono); padding: 13px 22px; border-radius: 2px;
  display: inline-flex; align-items: center; gap: 8px;
}
.rl-btn-primary { background: var(--rl-cyan); color: #06181A; font-weight: 600; }
.rl-btn-primary:hover { background: #7FE0DD; }
.rl-btn-ghost { border: 1px solid var(--rl-line); color: var(--rl-ink); }
.rl-btn-ghost:hover { border-color: var(--rl-cyan); color: var(--rl-cyan); }

/* ---------- Profile photo frame ---------- */
.rl-photo-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; max-width: 240px; margin: 0 auto; }
.rl-photo-frame {
  width: 100%; max-width: 240px; aspect-ratio: 1 / 1; border-radius: 46%; position: relative;
  background: var(--rl-panel); overflow: hidden; margin: 0 auto;
  box-shadow: 0 0 0 1px var(--rl-line), 0 0 40px rgba(95,211,208,.12);
}
.rl-photo-frame img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(35%) contrast(1.08) brightness(.94) saturate(1.05);
}
.rl-photo-frame::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(95,211,208,.35), inset 0 -30px 40px rgba(0,0,0,.35);
  pointer-events: none;
}
.rl-photo-ring { position: absolute; inset: -14px; pointer-events: none; }
.rl-photo-ring svg { width: 100%; height: 100%; animation: rl-spin 22s linear infinite; }
@keyframes rl-spin { to { transform: rotate(360deg); } }
.rl-photo-placeholder {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 16px;
}
.rl-photo-placeholder span { font-family: var(--rl-mono); font-size: 13px; color: var(--rl-ink-soft); }
.rl-photo-placeholder small { font-family: var(--rl-mono); font-size: 10.5px; color: var(--rl-ink-dim); }
.rl-photo-caption { font-family: var(--rl-mono); font-size: 10.5px; letter-spacing: .05em; color: var(--rl-ink-dim); }
.rl-photo-caption span { color: var(--rl-cyan); }
@media (prefers-reduced-motion: reduce) { .rl-photo-ring svg { animation: none; } }

/* ---------- Readout stats (hero) ---------- */
.rl-readout { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rl-line); }
.rl-readout-item { display: flex; flex-direction: column; gap: 4px; }
.rl-readout-item .k { font-family: var(--rl-mono); font-size: 10.5px; color: var(--rl-ink-dim); letter-spacing: .06em; }
.rl-readout-item .v { font-family: var(--rl-mono); font-size: 13px; color: var(--rl-ink); }
.rl-readout-item .v.rl-readout-active { color: var(--rl-cyan); }

/* ---------- Tag chips ---------- */
.rl-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.rl-tags span { font-size: 12.5px; font-family: var(--rl-mono); border: 1px solid var(--rl-line); border-radius: 999px; padding: 6px 14px; color: var(--rl-ink-soft); }

/* ---------- Section shell ---------- */
.rl-section { padding: 66px 0; border-top: 1px solid var(--rl-line); }
.rl-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 36px; gap: 20px; }
.rl-section-head h2 { font-weight: 600; font-size: 26px; margin: 0; }
.rl-section-head p { font-size: 13.5px; color: var(--rl-ink-soft); max-width: 40ch; margin: 6px 0 0; }
.rl-section-num { font-family: var(--rl-mono); font-size: 13px; color: var(--rl-ink-dim); }

/* ---------- Experience timeline ---------- */
.rl-exp-list { position: relative; padding-left: 28px; }
.rl-exp-list::before { content: ""; position: absolute; top: 6px; bottom: 6px; left: 5px; width: 1px; background: var(--rl-line); }
.rl-exp-item { position: relative; margin-bottom: 40px; }
.rl-exp-item:last-child { margin-bottom: 0; }
.rl-exp-node {
  position: absolute; left: -28px; top: 6px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--rl-bg); border: 1px solid var(--rl-cyan); box-shadow: 0 0 8px rgba(95,211,208,.5);
}
.rl-exp-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; flex-wrap: wrap; }
.rl-exp-role { font-family: var(--rl-mono); font-size: 11.5px; color: var(--rl-cyan); letter-spacing: .04em; text-transform: uppercase; }
.rl-exp-company { font-weight: 600; font-size: 19px; margin-top: 4px; }
.rl-exp-date { font-family: var(--rl-mono); font-size: 12px; color: var(--rl-ink-dim); white-space: nowrap; }
.rl-exp-desc { font-size: 14.5px; color: var(--rl-ink-soft); max-width: 62ch; margin: 0 0 14px; }
.rl-exp-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.rl-exp-tags span { font-size: 11.5px; font-family: var(--rl-mono); border: 1px solid var(--rl-line); border-radius: 2px; padding: 5px 10px; color: var(--rl-ink-dim); }

/* ---------- Skill groups ---------- */
.rl-skill-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rl-line); border: 1px solid var(--rl-line); }
.rl-skill-group { background: var(--rl-panel); padding: 24px 22px; }
.rl-skill-group-head { margin-bottom: 16px; }

/* ---------- Generic inner page (page.php fallback, e.g. if you add extra WP pages) ---------- */
.rl-page { padding: 90px 0 100px; }
.rl-page h1 { font-weight: 700; font-size: clamp(30px, 5vw, 46px); margin: 0 0 28px; }
.rl-page-body { font-size: 15.5px; color: var(--rl-ink-soft); max-width: 68ch; }
.rl-page-body p { margin: 0 0 18px; }
.rl-page-body a { color: var(--rl-cyan); text-decoration: underline; }

/* ---------- Footer ---------- */
.rl-footer { border-top: 1px solid var(--rl-line); padding: 22px 0 36px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-family: var(--rl-mono); font-size: 11.5px; color: var(--rl-ink-dim); }
.rl-footer-links { display: flex; gap: 18px; margin: 0; }
.rl-footer-links a:hover { color: var(--rl-cyan); }

/* ---------- Reveal ---------- */
.rl-reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.rl-reveal.rl-in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .rl-reveal { transition: none !important; opacity: 1 !important; transform: none !important; } }

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--rl-cyan); outline-offset: 2px;
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .rl-nav-links { display: none; }
  .rl-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .rl-photo-frame { max-width: 220px; }
  .rl-exp-top { flex-direction: column; gap: 4px; }
}
@media (max-width: 560px) {
  .rl-skill-groups { grid-template-columns: 1fr; }
  .rl-exp-list { padding-left: 22px; }
  .rl-exp-node { left: -22px; }
}
