/* =====================================================
   Brand Theme - Website / APP / Cyber Security
   Style: Enterprise SaaS + Cyber Security + Technology
   ===================================================== */

:root {

  /* ========================================
     Brand Colors
     ======================================== */

  --primary: #0A4DFF;
  --primary-hover: #2563FF;
  --primary-light: #4F8DFF;

  --secondary: #00C8FF;
  --secondary-hover: #2DD8FF;

  --accent: #64F0FF;

  /* ========================================
     Background Colors
     ======================================== */

  --background: #F6F9FF;
  --background-alt: #EEF4FF;

  --hero-bg: #031B4E;
  --surface-dark: #08245C;

  --card-bg: #FFFFFF;
  --card-bg-hover: #FAFCFF;

  /* ========================================
     Text Colors
     ======================================== */

  --text-primary: #112240;
  --text-secondary: #5F6B87;
  --text-muted: #8A94A8;
  --text-white: #FFFFFF;

  /* ========================================
     Border Colors
     ======================================== */

  --border: #D8E5FF;
  --border-light: #EAF1FF;
  --border-dark: #21428A;

  /* ========================================
     Cyber Security Colors
     ======================================== */

  --security: #0057FF;
  --security-dark: #022A72;
  --security-glow: #6EDCFF;

  /* ========================================
     Status Colors
     ======================================== */

  --success: #16C784;
  --success-bg: #EAFBF3;

  --warning: #FFB020;
  --warning-bg: #FFF6E2;

  --danger: #FF5A5A;
  --danger-bg: #FFF0F0;

  --info: #00C8FF;
  --info-bg: #EAFBFF;

  /* ========================================
     Shadow
     ======================================== */

  --shadow-sm:
    0 2px 8px rgba(10, 77, 255, 0.08);

  --shadow-md:
    0 8px 24px rgba(10, 77, 255, 0.12);

  --shadow-lg:
    0 20px 50px rgba(10, 77, 255, 0.18);

  --shadow-glow:
    0 0 30px rgba(100, 240, 255, 0.35);

  /* ========================================
     Gradients
     ======================================== */

  --gradient-primary:
    linear-gradient(
      135deg,
      #031B4E 0%,
      #0A4DFF 50%,
      #00C8FF 100%
    );

  --gradient-hero:
    linear-gradient(
      120deg,
      #02173D 0%,
      #06318D 35%,
      #0A4DFF 70%,
      #64F0FF 100%
    );

  --gradient-button:
    linear-gradient(
      135deg,
      #0A4DFF 0%,
      #00C8FF 100%
    );

  --gradient-security:
    linear-gradient(
      135deg,
      #022A72 0%,
      #0057FF 50%,
      #64F0FF 100%
    );

  /* ========================================
     Layout
     ======================================== */

  --container-width: 1280px;
  --section-spacing: 120px;
  --card-radius: 20px;
  --button-radius: 12px;

  /* ========================================
     Typography
     ======================================== */

  --font-family:
    "Inter",
    "Noto Sans TC",
    "PingFang TC",
    "Microsoft JhengHei",
    sans-serif;

  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;
  --font-size-2xl: 32px;
  --font-size-3xl: 48px;
  --font-size-4xl: 64px;

  --line-height: 1.7;
}

/* =====================================================
   Animations
   ===================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 200, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(0, 200, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 200, 255, 0);
  }
}

/* =====================================================
   Base Elements
   ===================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font-family);
  line-height: var(--line-height);
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* =====================================================
   Components
   ===================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(246, 249, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  font-size: var(--font-size-xl);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  color: var(--text-secondary);
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--button-radius);
  background: var(--gradient-button);
  color: var(--text-white);
  font-weight: 700;
  line-height: 1.2;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  cursor: pointer;
}

.button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.button.secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.button.secondary:hover {
  background: var(--card-bg-hover);
  border-color: var(--primary);
}

/* =====================================================
   Hero Section
   ===================================================== */

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  padding: 72px 0 56px;
  background:
    linear-gradient(120deg, rgba(3, 27, 78, 0.92), rgba(10, 77, 255, 0.75)),
    url("b.png") center / cover;
  color: var(--text-white);
}

.hero-inner,
.section-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-content {
  max-width: 900px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--secondary);
  font-size: var(--font-size-sm);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(38px, 5.2vw, 66px);
  line-height: 1.05;
  letter-spacing: -1px;
  background: linear-gradient(120deg, #FFFFFF 30%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content .eyebrow,
.hero-content h1,
.hero-content .hero-copy,
.hero-content .hero-actions,
.hero-content .hero-stats {
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-content .eyebrow { animation-delay: 0.1s; }
.hero-content h1 { animation-delay: 0.2s; }
.hero-content .hero-copy { animation-delay: 0.3s; }
.hero-content .hero-actions { animation-delay: 0.4s; }
.hero-content .hero-stats { animation-delay: 0.5s; }

.hero-copy {
  max-width: 660px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 21px);
}

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

.hero .button.secondary {
  color: var(--text-white);
  border-color: rgba(255, 255, 255, 0.6);
}

.hero .button.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--text-white);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 680px;
}

.stat {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--card-radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.stat:hover {
  transform: translateY(-4px);
  border-color: rgba(100, 240, 255, 0.4);
  box-shadow: 0 10px 30px rgba(0, 200, 255, 0.15);
}

.stat strong {
  display: block;
  font-size: var(--font-size-2xl);
  line-height: 1.1;
  color: var(--secondary);
}

.stat span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--font-size-sm);
}

/* =====================================================
   Sections General
   ===================================================== */

section {
  padding: 84px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  margin-bottom: 32px;
}

.section-head h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.section-head p {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--text-secondary);
}

/* =====================================================
   About Section
   ===================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  align-items: start;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--card-bg);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.panel:hover {
  box-shadow: var(--shadow-lg);
}

.bio {
  padding: 30px;
  font-size: var(--font-size-lg);
}

.bio p:last-child {
  margin-bottom: 0;
}

.quick-info {
  padding: 24px;
}

.info-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.info-row:last-child {
  border-bottom: 0;
}

.info-row dt {
  color: var(--text-secondary);
  font-weight: 700;
}

.info-row dd {
  margin: 0;
  color: var(--text-primary);
  font-weight: 700;
}

/* =====================================================
   Projects Section (Work Band)
   ===================================================== */

.work-band {
  background: var(--background-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--card-bg);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-media {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
}

.project-card:nth-child(1) .project-media {
  background-image: url("w1.png");
}

.project-card:nth-child(2) .project-media {
  background-image: url("w2.png");
}

.project-card:nth-child(3) .project-media {
  background-image: url("w3.png");
}

.project-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.project-body a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card-bg);
  color: var(--primary);
  font-size: var(--font-size-sm);
  font-weight: 700;
  transition: all 0.2s ease;
}

.project-body a::after {
  content: "→";
  font-weight: bold;
  transition: transform 0.2s ease;
}

.project-body a:hover {
  background: var(--primary);
  color: var(--text-white);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.project-body a:hover::after {
  transform: translateX(3px);
}

.tag {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--border-light);
  color: var(--primary);
  font-size: var(--font-size-xs);
  font-weight: 800;
}

.project-body h3,
.service h3,
.timeline-item h3 {
  margin-bottom: 8px;
  color: var(--text-primary);
  line-height: 1.3;
}

.project-body p,
.service p,
.timeline-item p {
  margin-bottom: 0;
  color: var(--text-secondary);
}

/* =====================================================
   Services Section
   ===================================================== */

.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.service {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--card-bg);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.service:hover {
  transform: translateY(-4px);
  border-color: var(--primary-light);
  box-shadow: 0 12px 30px rgba(10, 77, 255, 0.08);
}

.service-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--primary);
  font-weight: 900;
}

/* =====================================================
   Experience Section (Timeline)
   ===================================================== */

.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 2px solid var(--border);
  display: grid;
  gap: 24px;
  max-width: 860px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 24px;
  padding: 26px 30px;
  border: 1px solid var(--border-light);
  border-radius: var(--card-radius);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -40px;
  top: 32px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 3px solid var(--secondary);
  box-shadow: 0 0 0 1px var(--primary);
  animation: pulseGlow 2s infinite;
  z-index: 2;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.timeline-item:hover {
  transform: translateY(-2px) translateX(4px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.timeline-item:hover::before {
  transform: scale(1.3);
  background: var(--primary);
  border-color: var(--secondary);
  box-shadow: 0 0 8px var(--secondary);
}

.timeline-date {
  color: var(--secondary);
  font-weight: 900;
}

/* =====================================================
   Contact Section
   ===================================================== */

.contact {
  background: radial-gradient(circle at 80% 20%, rgba(10, 77, 255, 0.15) 0%, transparent 50%), var(--hero-bg);
  color: var(--text-white);
  position: relative;
  overflow: hidden;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 30px;
  align-items: center;
}

.contact h2 {
  margin-bottom: 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.16;
}

.contact p {
  max-width: 660px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: var(--font-size-lg);
}

.contact-box {
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.contact-box a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-white);
  font-weight: 700;
  overflow-wrap: anywhere;
  transition: color 0.2s ease;
}

.contact-box a:hover {
  color: var(--secondary);
}

.contact-box a:last-child {
  border-bottom: 0;
}

/* =====================================================
   Footer Section
   ===================================================== */

footer {
  padding: 24px 0;
  background: #021233;
  color: rgba(255, 255, 255, 0.66);
  font-size: var(--font-size-sm);
}

.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* =====================================================
   Media Queries
   ===================================================== */

@media (max-width: 900px) {
  .nav {
    min-height: auto;
    padding: 18px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    min-height: auto;
    padding: 76px 0 50px;
  }

  .hero-stats,
  .projects,
  .services,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .nav-links {
    gap: 16px;
    font-size: var(--font-size-sm);
  }

  h1 {
    font-size: 40px;
  }

  section {
    padding: 64px 0;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .bio,
  .quick-info,
  .project-body,
  .service,
  .timeline-item,
  .contact-box {
    padding: 20px;
  }

  .info-row,
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .timeline {
    padding-left: 20px;
  }

  .timeline-item::before {
    left: -28px;
    top: 24px;
  }
}