:root {
  --bg:#0b0d12; --surface:#121722; --surface2:#171e2b; --text:#f4f6fb;
  --muted:#9da9bb; --line:#273142; --accent:#64d1c1; --accent2:#9bc4ff;
  --danger:#ff7676; --max:1160px; color-scheme:dark;
}
*{box-sizing:border-box} html{scroll-behavior:smooth}
body{margin:0;background:radial-gradient(circle at 15% -5%,rgba(100,209,193,.12),transparent 32rem),var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.65}
a{color:inherit;text-decoration:none} img{max-width:100%;display:block} button,input,textarea{font:inherit} button{cursor:pointer} code{background:#1c2330;padding:.15rem .35rem;border-radius:6px}
.container{width:min(var(--max),calc(100% - 40px));margin:0 auto}.hidden{display:none!important}
.site-header{position:sticky;top:0;z-index:20;background:rgba(11,13,18,.84);backdrop-filter:blur(18px);border-bottom:1px solid rgba(255,255,255,.06)}
.nav-wrap{min-height:68px;display:flex;align-items:center;justify-content:space-between;gap:24px}.brand{font-weight:760;letter-spacing:-.02em}.nav-links{display:flex;gap:20px;align-items:center;font-size:.94rem;color:#c4ccda}.nav-links a:hover{color:#fff}.admin-link{border:1px solid var(--line);padding:7px 12px;border-radius:999px}
.hero{padding:96px 0 72px}.hero-grid{display:grid;grid-template-columns:1.35fr .75fr;gap:56px;align-items:center}.eyebrow{color:var(--accent);font-size:.78rem;letter-spacing:.16em;font-weight:800;text-transform:uppercase;margin-bottom:10px}
.hero h1,.page-title,.article-title{font-size:clamp(2.5rem,7vw,5.3rem);line-height:.98;margin:0;letter-spacing:-.055em}.hero-copy{color:#bcc5d3;font-size:1.18rem;max-width:760px;margin:28px 0 0}
.button-row{display:flex;gap:12px;margin-top:32px;flex-wrap:wrap}.button{appearance:none;border:1px solid transparent;border-radius:12px;padding:11px 16px;display:inline-flex;align-items:center;justify-content:center;font-weight:720;background:transparent;color:var(--text)}.button.primary{background:var(--accent);color:#07110f}.button.secondary{border-color:var(--line);background:#121722}.button.danger{border-color:rgba(255,118,118,.35);color:var(--danger)}
.hero-panel{border:1px solid var(--line);border-radius:24px;padding:28px;background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.012));box-shadow:0 30px 80px rgba(0,0,0,.25)}.panel-kicker{color:var(--muted);font-size:.9rem}.skill-cloud{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}.skill-cloud span{border:1px solid var(--line);border-radius:999px;padding:9px 13px;background:#0f131b}
.section{padding:72px 0}.section.alt{background:rgba(255,255,255,.018);border-block:1px solid rgba(255,255,255,.05)}.section-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:28px}.section-head h2{margin:0;font-size:clamp(1.8rem,4vw,2.7rem);letter-spacing:-.035em}.text-link{color:var(--accent2)}
.card-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.card{border:1px solid var(--line);border-radius:18px;padding:24px;background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.012));min-height:250px;transition:transform .2s,border-color .2s;text-align:left;color:inherit;width:100%}.card:hover{transform:translateY(-4px);border-color:#44516a}.card h3{font-size:1.25rem;line-height:1.25;margin:18px 0 8px}.card p{color:var(--muted)}.card-image{width:100%;aspect-ratio:16/8;object-fit:cover;border-radius:12px;margin-bottom:18px}.pill{font-size:.75rem;color:var(--accent);border:1px solid #2e5a56;padding:5px 9px;border-radius:999px;display:inline-flex}
.article-wrap{max-width:860px}.markdown{margin-top:32px}.markdown h1,.markdown h2,.markdown h3,.preview-box h1,.preview-box h2,.preview-box h3{letter-spacing:-.025em;line-height:1.2;margin-top:2em}.markdown h1{font-size:2.2rem}.markdown h2{font-size:1.55rem;border-bottom:1px solid var(--line);padding-bottom:.45rem}.markdown p,.markdown li,.preview-box p,.preview-box li{color:#c9d1dc}.markdown a,.preview-box a{color:var(--accent2);text-decoration:underline}.markdown img,.preview-box img{border-radius:14px;border:1px solid var(--line);margin:24px 0}.markdown blockquote{margin:1.5rem 0;padding:.6rem 1.2rem;border-left:3px solid var(--accent);background:#10151f;color:#bfc8d5}.markdown pre{overflow:auto;background:#090b0f;padding:16px;border-radius:12px;border:1px solid var(--line)}
.project-stack{display:grid;gap:26px}.project-card{display:grid;grid-template-columns:.55fr 1fr;gap:32px;border:1px solid var(--line);border-radius:20px;padding:28px;background:var(--surface);scroll-margin-top:90px}.project-card h2{margin-top:0;font-size:2rem}.project-image{border-radius:14px;width:100%;min-height:220px;object-fit:cover}.project-placeholder{display:grid;place-items:center;background:#0e1219;color:#6f7a8b;letter-spacing:.2em;font-size:.8rem}.muted{color:var(--muted)}
.cert-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}.cert-card{border:1px solid var(--line);background:var(--surface);border-radius:18px;overflow:hidden}.cert-image-wrap{aspect-ratio:16/10;background:#0e1219;display:grid;place-items:center;border-bottom:1px solid var(--line)}.cert-image-wrap img{width:100%;height:100%;object-fit:contain}.cert-placeholder{color:#6f7a8b;letter-spacing:.2em;font-size:.8rem}.cert-body{padding:22px}.cert-body h2{margin:0 0 6px;font-size:1.15rem}.cert-body p{margin:4px 0}
.loading,.empty-state{color:var(--muted);padding:20px 0}
.article-overlay{position:fixed;inset:68px 0 0;z-index:15;background:var(--bg);overflow:auto;padding:46px 0 90px}.article-detail-wrap{padding-bottom:60px}.article-title{margin-top:24px}.article-summary{color:var(--muted);font-size:1.12rem}.article-cover{margin:32px 0;width:100%;border-radius:18px;border:1px solid var(--line)}body.article-open{overflow:hidden}
.site-footer{border-top:1px solid var(--line);color:var(--muted);font-size:.88rem}.site-footer .container{padding:28px 0;display:flex;justify-content:space-between;gap:16px}

/* Admin */
.page-top{padding-top:72px;min-height:78vh}.admin-shell{max-width:1320px}.admin-top{display:flex;justify-content:space-between;gap:20px;align-items:center}
.login-card,.editor-card{border:1px solid var(--line);border-radius:20px;background:var(--surface);padding:26px}.login-card{max-width:480px;margin:20px auto}.form-stack{display:grid;gap:16px;margin-top:24px}
label{display:grid;gap:7px;color:#cbd3df;font-size:.9rem}input,textarea{width:100%;color:var(--text);background:#0d1118;border:1px solid #303b4d;border-radius:10px;padding:10px 12px;outline:none}input:focus,textarea:focus{border-color:#5d7b8c;box-shadow:0 0 0 3px rgba(100,209,193,.08)}textarea{resize:vertical}
.notice{margin:16px 0;padding:12px 14px;border:1px solid #3a475c;background:#121925;border-radius:10px;color:#d8e1ee}.admin-tabs{display:flex;gap:8px;margin:24px 0;flex-wrap:wrap}.admin-tabs button{border:1px solid var(--line);background:#10151d;color:#b8c1cf;border-radius:999px;padding:8px 13px}.admin-tabs button.active{background:var(--accent);color:#07110f;border-color:transparent}
.admin-grid{display:grid;grid-template-columns:280px minmax(0,1fr);gap:18px}.admin-list{display:grid;align-content:start;gap:8px}.admin-list>button,.admin-item{width:100%;text-align:left;border:1px solid var(--line);background:#10151d;color:var(--text);border-radius:12px;padding:12px;margin-bottom:8px}.admin-item strong,.admin-item span{display:block}.admin-item span{color:var(--muted);font-size:.78rem;margin-top:4px}.list-new{color:var(--accent)!important}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.form-grid .full{grid-column:1/-1}.content-editor{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.9rem;line-height:1.6}.check{display:flex;align-items:center;gap:8px}.check input{width:auto}.upload-row{display:flex;gap:8px}.upload-row input{flex:1}.file-button{position:relative;overflow:hidden;min-width:94px}.file-button input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer}.upload-inline{display:flex;align-items:center;gap:12px;color:var(--muted)}.editor-actions{display:flex;gap:10px;margin-top:20px}.preview-box{margin-top:28px;padding-top:24px;border-top:1px solid var(--line)}.admin-cert-preview{max-height:360px;object-fit:contain;border:1px solid var(--line);border-radius:12px}.resume-editor{max-width:980px}
@media(max-width:900px){.hero-grid,.project-card,.admin-grid{grid-template-columns:1fr}.card-grid{grid-template-columns:1fr 1fr}.hero{padding-top:64px}}
@media(max-width:650px){.nav-wrap{align-items:flex-start;padding:16px 0}.nav-links{gap:10px;flex-wrap:wrap;justify-content:flex-end;font-size:.82rem}.card-grid,.cert-grid,.form-grid{grid-template-columns:1fr}.form-grid .full{grid-column:auto}.section-head,.site-footer .container{align-items:flex-start;flex-direction:column}.upload-row{flex-direction:column}.hero h1{font-size:3rem}}

/* Resume / 自傳照片尺寸 */
#resume-content img,
#resume-preview img {
  width: 160px;
  height: auto;
  float: right;
  margin: 0 0 20px 28px;
  border-radius: 12px;
}

.hero h1 {
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.08;
  max-width: 1000px;
}

/* =========================================================
   HR Resume Download / Header
   ========================================================= */

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}


/* 履歷下拉選單 */
.resume-dropdown {
  position: relative;
}


/* 移除 details 預設三角形 */
.resume-dropdown summary {
  list-style: none;
}

.resume-dropdown summary::-webkit-details-marker {
  display: none;
}


/* Header 下載履歷按鈕 */
.resume-dropdown > summary {
  min-height: 42px;
  padding: 8px 15px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  color: var(--text);
  background: var(--surface);

  border: 1px solid var(--line);
  border-radius: 11px;

  font-size: .92rem;
  font-weight: 720;

  cursor: pointer;

  transition:
    background .2s,
    border-color .2s,
    transform .2s;
}


.resume-dropdown > summary:hover {
  background: var(--surface2);
  border-color: var(--accent);
}


.resume-dropdown[open] > summary {
  border-color: var(--accent);
  background: rgba(100, 209, 193, .08);
}


/* 下載 icon */
.download-icon {
  color: var(--accent);
  font-size: 1.1rem;
}


/* 下拉箭頭 */
.dropdown-arrow {
  color: var(--muted);
  transition: transform .2s ease;
}


.resume-dropdown[open] .dropdown-arrow {
  transform: rotate(180deg);
}


/* =========================================================
   Resume Dropdown Menu
   ========================================================= */

.resume-dropdown-menu {
  position: absolute;

  top: calc(100% + 10px);
  right: 0;

  width: 300px;

  padding: 8px;

  background: rgba(18, 23, 34, .98);

  border: 1px solid var(--line);
  border-radius: 14px;

  box-shadow:
    0 20px 60px rgba(0, 0, 0, .45);

  backdrop-filter: blur(18px);

  z-index: 100;
}


/* 中文 / 英文履歷選項 */
.resume-dropdown-menu a {
  width: 100%;

  display: flex;
  align-items: center;
  gap: 13px;

  padding: 13px;

  border-radius: 10px;

  transition: background .2s;
}


.resume-dropdown-menu a:hover {
  background: var(--surface2);
}


.resume-dropdown-menu strong {
  display: block;

  color: var(--text);

  font-size: .93rem;
  line-height: 1.3;
}


.resume-dropdown-menu small {
  display: block;

  margin-top: 4px;

  color: var(--muted);

  font-size: .74rem;
  line-height: 1.3;
}


/* PDF Icon */
.pdf-icon {
  width: 40px;
  height: 40px;

  flex-shrink: 0;

  display: grid;
  place-items: center;

  color: #ff8f8f;

  background: rgba(255, 118, 118, .1);

  border: 1px solid rgba(255, 118, 118, .25);
  border-radius: 9px;

  font-size: .67rem;
  font-weight: 850;
}


/* =========================================================
   Resume Section Download Buttons
   ========================================================= */

.resume-section-actions {
  display: flex;
  align-items: center;
  gap: 10px;

  flex-wrap: wrap;
}


.resume-section-actions .button {
  white-space: nowrap;
}


/* =========================================================
   Button Hover
   ========================================================= */

.button {
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease;
}


.button:hover {
  transform: translateY(-2px);
}


.button.primary:hover {
  background: #79dfd0;
}


.button.secondary:hover {
  border-color: #44516a;
  background: var(--surface2);
}


/* =========================================================
   HR 首頁按鈕稍微加大
   ========================================================= */

.hero .button-row .button {
  min-height: 48px;
  padding-left: 18px;
  padding-right: 18px;
}


/* =========================================================
   Resume Section
   ========================================================= */

#resume {
  scroll-margin-top: 68px;
}


#projects,
#articles,
#certifications {
  scroll-margin-top: 68px;
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 650px) {

  .nav-wrap {
    min-height: 62px;
    padding: 10px 0;
    align-items: center;
  }


  .brand {
    font-size: .92rem;
  }


  .resume-dropdown > summary {
    min-height: 40px;
    padding: 7px 11px;
    font-size: .82rem;
  }


  .resume-dropdown-menu {
    position: fixed;

    top: 70px;
    left: 20px;
    right: 20px;

    width: auto;
  }


  .resume-section-actions {
    width: 100%;
  }


  .resume-section-actions .button {
    width: 100%;
  }


  .hero .button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;

    width: 100%;
  }


  .hero .button-row .button {
    width: 100%;
  }

}


/* 超小螢幕 */
@media (max-width: 420px) {

  .hero .button-row {
    grid-template-columns: 1fr;
  }

}
/* =========================
   Contact
========================= */

.contact-intro {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 620px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 30px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;

  min-height: 120px;
  padding: 22px;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;

  color: var(--text);
  text-decoration: none;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 52px;
  height: 52px;

  flex: 0 0 52px;

  border-radius: 14px;

  background: var(--accent);
  color: #08110f;

  font-size: 15px;
  font-weight: 800;
}

.contact-icon-line {
  font-size: 11px;
}

.contact-card div {
  display: flex;
  flex-direction: column;
  gap: 5px;

  min-width: 0;
}

.contact-card small {
  color: var(--muted);
  font-size: 13px;
}

.contact-card strong {
  font-size: 17px;
}

.contact-action {
  margin-top: 4px;

  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}


/* Mobile */

@media (max-width: 760px) {

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

  .contact-card {
    min-height: auto;
  }

}


/* =========================================================
   GIBSON ERP PORTFOLIO — CYBER HERO / HUD MID-UPGRADE
   Append-only overrides: keeps all existing sections/admin styles.
========================================================= */

:root {
  --border: var(--line);
  --cyber-cyan: #69fff0;
  --cyber-blue: #6ea8ff;
  --cyber-violet: #9b7cff;
  --cyber-pink: #ff78db;
}

/* ---------------------------------------------------------
   Hero base
--------------------------------------------------------- */
.cyber-hero {
  --mx: 50%;
  --my: 50%;
  position: relative;
  min-height: 720px;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(0,255,234,.12), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(110,82,255,.15), transparent 34%),
    radial-gradient(circle at 68% 86%, rgba(255,55,205,.09), transparent 30%),
    linear-gradient(135deg, #070a10 0%, #090d17 48%, #070910 100%);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.cyber-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle 430px at var(--mx) var(--my),
      rgba(91,236,255,.14), transparent 62%);
}

.cyber-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .16;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,.025) 0,
      rgba(255,255,255,.025) 1px,
      transparent 1px,
      transparent 4px
    );
  mix-blend-mode: screen;
}

/* ---------------------------------------------------------
   FX layer / moving grid / aurora / scan
--------------------------------------------------------- */
.hero-fx,
.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-fx { z-index: 0; }

.hero-grid-lines {
  position: absolute;
  inset: -120px;
  opacity: .28;
  background-image:
    linear-gradient(rgba(96,228,255,.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122,106,255,.12) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(circle at center, #000, transparent 78%);
  mask-image: radial-gradient(circle at center, #000, transparent 78%);
  animation: heroGridMove 18s linear infinite;
  transform-origin: center bottom;
}

@keyframes heroGridMove {
  from {
    transform: perspective(850px) rotateX(58deg) scale(1.25) translateY(-115px);
  }
  to {
    transform: perspective(850px) rotateX(58deg) scale(1.25) translateY(-67px);
  }
}

.hero-aurora {
  position: absolute;
  border-radius: 999px;
  filter: blur(82px);
  opacity: .58;
  animation: auroraMove 10s ease-in-out infinite alternate;
}

.hero-aurora-a {
  width: 430px;
  height: 430px;
  left: -180px;
  top: 80px;
  background: rgba(0,255,229,.28);
}

.hero-aurora-b {
  width: 560px;
  height: 560px;
  right: -190px;
  top: -180px;
  background: rgba(105,75,255,.28);
  animation-delay: -3s;
}

.hero-aurora-c {
  width: 430px;
  height: 430px;
  right: 18%;
  bottom: -300px;
  background: rgba(255,61,204,.18);
  animation-delay: -6s;
}

@keyframes auroraMove {
  0% { transform: translate3d(-20px,-15px,0) scale(.95); }
  100% { transform: translate3d(45px,40px,0) scale(1.12); }
}

.hero-scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 180px;
  top: -220px;
  opacity: .28;
  background:
    linear-gradient(
      to bottom,
      transparent,
      rgba(80,247,255,.05),
      rgba(80,247,255,.18),
      transparent
    );
  animation: scanMove 7s linear infinite;
}

@keyframes scanMove {
  to { transform: translateY(1050px); }
}

/* ---------------------------------------------------------
   Hero layout
--------------------------------------------------------- */
.cyber-hero .hero-content {
  position: relative;
  z-index: 3;
}

.cyber-hero .hero-grid {
  display: grid;
  grid-template-columns: minmax(0,1.2fr) minmax(360px,.8fr);
  gap: clamp(48px,6vw,92px);
  align-items: center;
  width: 100%;
  padding-top: 88px;
  padding-bottom: 88px;
}

.hero-copy-wrap {
  position: relative;
  min-width: 0;
  animation: heroLeftIn .9s cubic-bezier(.2,.8,.2,1) both;
}

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

/* ---------------------------------------------------------
   Status / eyebrow / title
--------------------------------------------------------- */
.system-pill {
  width: max-content;
  max-width: 100%;
  margin-bottom: 26px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(91,235,255,.28);
  border-radius: 999px;
  color: #a6f7ff;
  background: rgba(10,18,29,.62);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow:
    inset 0 0 20px rgba(42,220,255,.04),
    0 0 30px rgba(43,216,255,.05);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
}

.system-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #5affd7;
  box-shadow: 0 0 6px #5affd7, 0 0 16px #5affd7;
  animation: systemPulse 1.7s ease-in-out infinite;
}

@keyframes systemPulse {
  50% {
    opacity: .4;
    box-shadow: 0 0 4px #5affd7;
  }
}

.system-code { color: #a69aff; }

.cyber-hero .neon-eyebrow {
  margin-bottom: 18px;
  color: #6ef5e3;
  font-weight: 850;
  letter-spacing: .18em;
  text-shadow: 0 0 24px rgba(67,255,230,.35);
}

.cyber-hero .hero-title,
.cyber-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(3.25rem,5.2vw,5.7rem);
  line-height: 1.01;
  letter-spacing: -.058em;
  font-weight: 900;
  color: transparent;
  background:
    linear-gradient(
      110deg,
      #fff 0%,
      #fff 37%,
      #a7fbff 60%,
      #cab8ff 80%,
      #ffb5ed 100%
    );
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 10px 70px rgba(80,212,255,.09);
  filter: drop-shadow(0 0 26px rgba(105,255,240,.05));
}

.cyber-hero .hero-copy {
  max-width: 790px;
  margin: 30px 0 0;
  color: #c9d2e3;
  font-size: clamp(1.05rem,1.35vw,1.25rem);
  line-height: 1.9;
}

/* ---------------------------------------------------------
   Buttons
--------------------------------------------------------- */
.cyber-hero .hero-actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}

.cyber-hero .button {
  position: relative;
  overflow: hidden;
  min-height: 50px;
  transition:
    transform .25s ease,
    border-color .25s ease,
    box-shadow .25s ease,
    background .25s ease;
}

.cyber-hero .button::before {
  content: "";
  position: absolute;
  width: 55px;
  height: 210%;
  top: -55%;
  left: -100px;
  transform: rotate(20deg);
  background: rgba(255,255,255,.26);
  filter: blur(8px);
  transition: left .55s ease;
}

.cyber-hero .button:hover::before {
  left: calc(100% + 55px);
}

.cyber-hero .button:hover {
  transform: translateY(-4px);
}

.cyber-hero .button.primary {
  color: #04100f;
  border: 1px solid rgba(107,255,228,.8);
  background: linear-gradient(135deg,#61ead8,#65dfff);
  box-shadow:
    0 12px 40px rgba(50,232,217,.20),
    0 0 0 rgba(67,255,230,0);
}

.cyber-hero .button.primary:hover {
  background: linear-gradient(135deg,#77f5e4,#79e8ff);
  box-shadow:
    0 18px 55px rgba(50,232,217,.30),
    0 0 30px rgba(67,255,230,.20);
}

.cyber-hero .button.secondary {
  border: 1px solid rgba(151,166,220,.22);
  background: rgba(13,19,31,.70);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.cyber-hero .button.secondary:hover {
  border-color: rgba(118,231,255,.52);
  background: rgba(23,33,52,.88);
  box-shadow: 0 15px 40px rgba(52,142,255,.12);
}

.button-arrow { margin-left: 8px; }

/* ---------------------------------------------------------
   Tech line
--------------------------------------------------------- */
.hero-tech-line {
  margin-top: 30px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: rgba(163,184,210,.64);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
}

.hero-tech-line i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #62e8ff;
  box-shadow: 0 0 8px #62e8ff;
}

/* =========================================================
   HUD panel
========================================================= */
.cyber-hero .hud-panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(112,159,255,.30);
  border-radius: 32px;
  background:
    linear-gradient(145deg,rgba(19,25,42,.80),rgba(8,12,22,.88));
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  box-shadow:
    0 35px 100px rgba(0,0,0,.46),
    inset 0 0 60px rgba(71,232,255,.045),
    0 0 65px rgba(93,83,255,.09);
  animation: hudFloat 6s ease-in-out infinite;
}

.cyber-hero .hud-panel::before {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  right: -80px;
  top: -95px;
  border-radius: 50%;
  background: rgba(105,74,255,.19);
  filter: blur(52px);
}

.cyber-hero .hud-panel::after {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  left: -120px;
  bottom: -120px;
  border-radius: 50%;
  background: rgba(38,246,228,.13);
  filter: blur(52px);
}

@keyframes hudFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hud-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  z-index: 4;
}

.hud-tl {
  top: 16px;
  left: 16px;
  border-top: 2px solid #58f4ee;
  border-left: 2px solid #58f4ee;
}

.hud-tr {
  top: 16px;
  right: 16px;
  border-top: 2px solid #9e8cff;
  border-right: 2px solid #9e8cff;
}

.hud-bl {
  bottom: 16px;
  left: 16px;
  border-bottom: 2px solid #9e8cff;
  border-left: 2px solid #9e8cff;
}

.hud-br {
  bottom: 16px;
  right: 16px;
  border-bottom: 2px solid #58f4ee;
  border-right: 2px solid #58f4ee;
}

.panel-status {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: rgba(181,198,224,.68);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .15em;
}

.panel-status > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* ---------------------------------------------------------
   Energy core
--------------------------------------------------------- */
.hud-core {
  position: relative;
  z-index: 3;
  width: 190px;
  height: 190px;
  margin: 24px auto 32px;
  display: grid;
  place-items: center;
}

.orbit {
  position: absolute;
  border-radius: 50%;
}

.orbit-one {
  inset: 0;
  border: 1px solid rgba(105,239,255,.28);
  border-top-color: #62f8ef;
  box-shadow: inset 0 0 20px rgba(98,248,239,.03);
  animation: orbitSpin 8s linear infinite;
}

.orbit-two {
  inset: 18px;
  border: 1px dashed rgba(168,137,255,.38);
  border-right-color: #aa8dff;
  animation: orbitSpinReverse 5s linear infinite;
}

.orbit-three {
  inset: 39px;
  border: 1px solid rgba(255,112,225,.27);
  border-left-color: #ff80df;
  animation: orbitSpin 3.6s linear infinite;
}

@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}

@keyframes orbitSpinReverse {
  to { transform: rotate(-360deg); }
}

.core-glow {
  position: absolute;
  width: 102px;
  height: 102px;
  border-radius: 50%;
  background:
    radial-gradient(
      circle,
      rgba(91,248,255,.48),
      rgba(99,91,255,.15) 46%,
      transparent 72%
    );
  filter: blur(5px);
  animation: corePulse 2.3s ease-in-out infinite;
}

@keyframes corePulse {
  50% {
    transform: scale(1.2);
    opacity: .65;
  }
}

.core-center {
  position: relative;
  width: 84px;
  height: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(110,255,244,.55);
  color: #fff;
  background:
    radial-gradient(
      circle at 40% 30%,
      rgba(85,234,255,.40),
      rgba(53,60,130,.27),
      rgba(10,14,25,.94)
    );
  box-shadow:
    inset 0 0 28px rgba(82,230,255,.18),
    0 0 25px rgba(66,236,255,.14),
    0 0 60px rgba(118,79,255,.13);
}

.core-center::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.05);
  box-shadow: 0 0 35px rgba(105,255,240,.10);
}

.core-center span {
  font-size: 18px;
  font-weight: 850;
  letter-spacing: .08em;
}

.core-center small {
  margin-top: 2px;
  color: #72f2eb;
  font-size: 7px;
  letter-spacing: .3em;
}

/* ---------------------------------------------------------
   HUD skills / footer
--------------------------------------------------------- */
.cyber-hero .panel-kicker {
  position: relative;
  z-index: 3;
  color: #9db7e6;
}

.cyber-hero .hud-skills {
  position: relative;
  z-index: 3;
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cyber-hero .hud-skills span {
  position: relative;
  cursor: default;
  overflow: hidden;
  padding: 9px 14px;
  border: 1px solid rgba(131,165,228,.24);
  border-radius: 999px;
  color: #edf5ff;
  background: rgba(8,13,23,.64);
  box-shadow: inset 0 0 20px rgba(75,225,255,.02);
  transition:
    transform .25s ease,
    border-color .25s ease,
    box-shadow .25s ease,
    color .25s ease;
}

.cyber-hero .hud-skills span:hover {
  transform: translateY(-4px) scale(1.03);
  color: #fff;
  border-color: rgba(92,242,255,.58);
  box-shadow:
    0 0 22px rgba(72,222,255,.16),
    inset 0 0 24px rgba(104,78,255,.11);
}

.hud-footer {
  position: relative;
  z-index: 3;
  margin-top: 25px;
  padding-top: 15px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  color: rgba(155,175,203,.52);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .18em;
}

/* ---------------------------------------------------------
   JS generated particles
--------------------------------------------------------- */
.hero-particle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  color: hsl(var(--hue) 100% 76%);
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  opacity: 0;
  animation:
    particleFloat
    var(--duration)
    ease-in-out
    var(--delay)
    infinite;
}

@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(.4);
  }
  25% { opacity: .68; }
  75% { opacity: .35; }
  100% {
    opacity: 0;
    transform: translateY(-90px) translateX(25px) scale(1.1);
  }
}

/* ---------------------------------------------------------
   Give lower sections a subtle unified tech feel
--------------------------------------------------------- */
.card,
.project-card,
.cert-card,
.contact-card {
  box-shadow: 0 14px 45px rgba(0,0,0,.12);
}

.card:hover,
.project-card:hover,
.cert-card:hover,
.contact-card:hover {
  border-color: rgba(100,209,193,.50);
}

.section .eyebrow {
  text-shadow: 0 0 20px rgba(100,209,193,.12);
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media (max-width: 980px) {
  .cyber-hero {
    min-height: auto;
  }

  .cyber-hero .hero-grid {
    grid-template-columns: 1fr;
    padding-top: 70px;
    padding-bottom: 80px;
  }

  .cyber-hero .hero-title,
  .cyber-hero h1 {
    font-size: clamp(3rem,10vw,5rem);
  }

  .cyber-hero .hud-panel {
    max-width: 650px;
  }
}

@media (max-width: 650px) {
  .cyber-hero .hero-grid {
    padding-top: 48px;
    padding-bottom: 64px;
    gap: 42px;
  }

  .cyber-hero .hero-title,
  .cyber-hero h1 {
    font-size: clamp(2.55rem,12.6vw,3.9rem);
    line-height: 1.04;
  }

  .system-code {
    display: none;
  }

  .hud-core {
    width: 150px;
    height: 150px;
  }

  .hero-tech-line {
    display: none;
  }

  .cyber-hero .hud-panel {
    padding: 24px 20px;
    border-radius: 26px;
  }

  .panel-status {
    font-size: 8px;
  }
}

/* ---------------------------------------------------------
   Accessibility
--------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hero-grid-lines,
  .hero-aurora,
  .hero-scanline,
  .hud-panel,
  .orbit,
  .core-glow,
  .hero-particle,
  .system-dot,
  .hero-copy-wrap {
    animation: none !important;
  }
}


/* =========================================================
   LEGENDARY LIGHT WHALE — FINAL UPGRADE
   Click/tap destination + water spray + light particles
   + click energy wave + autonomous cruise
========================================================= */

.cyber-hero {
  --whale-x: 44px;
  --whale-y: 36px;
  --whale-tilt: 0deg;
  --whale-facing: 1;
  --whale-scale: 1;
}


/* ---------------------------------------------------------
   Whale position layer
--------------------------------------------------------- */

.light-whale {
  position: absolute;
  left: 0;
  top: 0;

  width: clamp(210px, 25vw, 360px);
  aspect-ratio: 520 / 280;

  z-index: 2;

  pointer-events: none;

  opacity: .92;

  transform:
    translate3d(
      var(--whale-x),
      var(--whale-y),
      0
    )
    rotate(var(--whale-tilt))
    scale(var(--whale-scale));

  transform-origin: center center;

  will-change: transform;

  filter:
    drop-shadow(0 0 18px rgba(105,255,240,.22))
    drop-shadow(0 0 48px rgba(155,124,255,.13));

  transition:
    filter .3s ease,
    opacity .3s ease;
}


/* Keep movement transform separate from the breathing animation */
.whale-svg-shell {
  position: absolute;
  inset: 0;

  transform:
    scaleX(var(--whale-facing));

  transform-origin: center center;

  animation:
    whaleBreathing 5.6s ease-in-out infinite alternate;

  will-change: transform;
}


.whale-svg {
  width: 100%;
  height: 100%;

  display: block;

  overflow: visible;
}


/* ---------------------------------------------------------
   Organic / legendary motion
--------------------------------------------------------- */

.whale-aura {
  transform-origin: center;
  animation:
    whaleAuraPulse 4.2s ease-in-out infinite;
}


.whale-body-path {
  animation:
    whaleBodyGlow 3.8s ease-in-out infinite;
}


.whale-tail-group {
  transform-origin: 108px 145px;

  animation:
    whaleTailWave 1.7s ease-in-out infinite;
}


.whale-fin-top {
  transform-origin: 282px 83px;

  animation:
    whaleFinTopWave 2.9s ease-in-out infinite;
}


.whale-fin-side {
  transform-origin: 301px 193px;

  animation:
    whaleFinSideWave 2.3s ease-in-out infinite;
}


.whale-trails {
  animation:
    whaleTrailDrift 2.8s ease-in-out infinite;
}


.whale-runes {
  animation:
    whaleRuneGlow 3.2s ease-in-out infinite;
}


.whale-holo-dots {
  animation:
    whaleHoloDots 2.4s ease-in-out infinite;
}


@keyframes whaleBreathing {

  0% {
    transform:
      scaleX(var(--whale-facing))
      translateY(0)
      scale(1);
  }

  100% {
    transform:
      scaleX(var(--whale-facing))
      translateY(9px)
      scale(1.015);
  }

}


@keyframes whaleAuraPulse {

  0%,
  100% {
    opacity: .58;
    transform: scale(.96);
  }

  50% {
    opacity: .94;
    transform: scale(1.08);
  }

}


@keyframes whaleBodyGlow {

  0%,
  100% {
    opacity: .94;
    filter: brightness(1);
  }

  50% {
    opacity: 1;
    filter: brightness(1.14);
  }

}


@keyframes whaleTailWave {

  0%,
  100% {
    transform: rotate(4deg);
  }

  50% {
    transform: rotate(-10deg);
  }

}


@keyframes whaleFinTopWave {

  0%,
  100% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(-8deg);
  }

}


@keyframes whaleFinSideWave {

  0%,
  100% {
    transform: rotate(1deg);
  }

  50% {
    transform: rotate(9deg);
  }

}


@keyframes whaleTrailDrift {

  0%,
  100% {
    opacity: .62;
    transform: translateX(0);
  }

  50% {
    opacity: .92;
    transform: translateX(-7px);
  }

}


@keyframes whaleRuneGlow {

  0%,
  100% {
    opacity: .52;
    filter: drop-shadow(0 0 1px rgba(105,255,240,0));
  }

  50% {
    opacity: .95;
    filter: drop-shadow(0 0 5px rgba(105,255,240,.48));
  }

}


@keyframes whaleHoloDots {

  0%,
  100% {
    opacity: .38;
  }

  50% {
    opacity: 1;
  }

}


/* ---------------------------------------------------------
   Hover energy
--------------------------------------------------------- */

.cyber-hero:hover .light-whale {
  opacity: .99;

  filter:
    drop-shadow(0 0 26px rgba(105,255,240,.34))
    drop-shadow(0 0 58px rgba(155,124,255,.18));
}


/* ---------------------------------------------------------
   Whale effects layer
--------------------------------------------------------- */

.whale-fx-layer {
  position: absolute;
  inset: 0;

  overflow: visible;

  pointer-events: none;

  transform:
    scaleX(var(--whale-facing));

  transform-origin: center center;
}


/* Water bead */
.whale-water-drop {
  position: absolute;

  width: var(--drop-w, 6px);
  height: var(--drop-h, 14px);

  border-radius: 999px;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.98),
      rgba(153,255,250,.92) 44%,
      rgba(96,214,255,.54)
    );

  box-shadow:
    0 0 8px rgba(122,255,239,.62),
    0 0 18px rgba(90,213,255,.24);

  opacity: 0;

  pointer-events: none;

  will-change: transform, opacity;
}


/* Spark emitted with the spray */
.whale-light-particle {
  position: absolute;

  width: var(--spark-size, 4px);
  height: var(--spark-size, 4px);

  border-radius: 50%;

  background: currentColor;

  color: var(--spark-color, #82fff2);

  box-shadow:
    0 0 8px currentColor,
    0 0 18px currentColor;

  opacity: 0;

  pointer-events: none;

  will-change: transform, opacity;
}


/* Tiny mist cloud */
.whale-spray-mist {
  position: absolute;

  width: 44px;
  height: 24px;

  margin-left: -22px;
  margin-top: -12px;

  border-radius: 50%;

  background:
    radial-gradient(
      ellipse at center,
      rgba(210,255,255,.42),
      rgba(121,240,255,.13) 55%,
      transparent 74%
    );

  filter: blur(6px);

  pointer-events: none;

  opacity: 0;
}


/* ---------------------------------------------------------
   Click / touch energy wave
--------------------------------------------------------- */

.hero-click-fx {
  position: absolute;
  inset: 0;

  z-index: 2;

  pointer-events: none;

  overflow: hidden;
}


.hero-target-wave {
  position: absolute;

  width: 20px;
  height: 20px;

  margin-left: -10px;
  margin-top: -10px;

  border-radius: 50%;

  border:
    1.5px solid rgba(110,255,245,.88);

  box-shadow:
    0 0 15px rgba(100,244,255,.62),
    0 0 35px rgba(145,122,255,.28),
    inset 0 0 14px rgba(100,244,255,.13);

  pointer-events: none;

  opacity: 0;

  will-change: transform, opacity;
}


.hero-target-dot {
  position: absolute;

  width: 5px;
  height: 5px;

  margin-left: -2.5px;
  margin-top: -2.5px;

  border-radius: 50%;

  background: #dffffd;

  box-shadow:
    0 0 8px #79fff2,
    0 0 20px rgba(145,122,255,.65);

  pointer-events: none;
}


/* ---------------------------------------------------------
   "Target acquired" short body flash
--------------------------------------------------------- */

.light-whale.whale-arrived {
  filter:
    drop-shadow(0 0 32px rgba(105,255,240,.55))
    drop-shadow(0 0 78px rgba(155,124,255,.26));
}


/* ---------------------------------------------------------
   Mobile
--------------------------------------------------------- */

@media (max-width: 650px) {

  .light-whale {
    width: clamp(170px, 44vw, 245px);
    opacity: .88;
  }

}


/* ---------------------------------------------------------
   Reduced motion
--------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

  .whale-svg-shell,
  .whale-aura,
  .whale-body-path,
  .whale-tail-group,
  .whale-fin-top,
  .whale-fin-side,
  .whale-trails,
  .whale-runes,
  .whale-holo-dots {
    animation: none !important;
  }

}

/* ========================================
   Article Search
======================================== */

.article-heading-row {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.article-heading-row h2 {
  margin: 0;
}

.article-search {
  position: relative;
  width: 320px;
  max-width: 100%;
}

.article-search input {
  width: 100%;
  height: 52px;

  padding: 0 48px 0 48px;

  border-radius: 14px;

  border: 1px solid rgba(80, 235, 220, 0.3);

  background:
    linear-gradient(
      135deg,
      rgba(20, 25, 32, 0.95),
      rgba(10, 13, 18, 0.95)
    );

  color: #ffffff;

  font-size: 16px;

  outline: none;

  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.article-search input::placeholder {
  color: rgba(190, 205, 220, 0.55);
}

.article-search input:focus {
  border-color: #55e8dc;

  box-shadow:
    0 0 0 3px rgba(85, 232, 220, 0.08),
    0 0 24px rgba(85, 232, 220, 0.12);

  transform: translateY(-1px);
}

.search-icon {
  position: absolute;

  left: 17px;
  top: 50%;

  transform: translateY(-50%);

  color: #55e8dc;

  font-size: 24px;

  pointer-events: none;
}

.clear-search {
  position: absolute;

  right: 12px;
  top: 50%;

  transform: translateY(-50%);

  width: 30px;
  height: 30px;

  border: 0;
  border-radius: 50%;

  background: transparent;

  color: rgba(255, 255, 255, 0.5);

  font-size: 22px;

  cursor: pointer;

  opacity: 0;
  pointer-events: none;

  transition:
    color 0.2s ease,
    background 0.2s ease,
    opacity 0.2s ease;
}

.clear-search.show {
  opacity: 1;
  pointer-events: auto;
}

.clear-search:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.search-result-text {
  margin-top: 14px;

  min-height: 22px;

  color: #8fa6bd;

  font-size: 14px;
}

.article-card.search-hidden {
  display: none;
}


/* 手機 */
@media (max-width: 768px) {

  .article-heading-row {
    align-items: flex-start;
    gap: 22px;
  }

  .article-search {
    width: 100%;
  }

}
