/* ===== 全域 ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #1f2937 0, #020617 45%, #020617 100%);
    color: #e5e7eb;
    line-height: 1.6;
}

/* 背景發光效果 */
.bg-glow {
    position: fixed;
    inset: -200px;
    background:
        radial-gradient(circle at 10% 20%, rgba(56,189,248,0.18) 0, transparent 40%),
        radial-gradient(circle at 80% 10%, rgba(129,140,248,0.18) 0, transparent 45%),
        radial-gradient(circle at 50% 90%, rgba(45,212,191,0.18) 0, transparent 40%);
    opacity: 0.8;
    z-index: -1;
}

/* ===== 導覽列 ===== */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
    background: rgba(2,6,23,0.9);
    border-bottom: 1px solid rgba(148,163,184,0.2);
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    letter-spacing: 0.05em;
    font-size: 1.1rem;
}

.logo span {
    color: #22d3ee;
}

.top-nav nav a {
    margin-left: 1.5rem;
    font-size: 0.95rem;
    color: #e5e7eb;
    text-decoration: none;
    opacity: 0.9;
}

.top-nav nav a:hover {
    color: #22d3ee;
}

/* ===== 排版容器 ===== */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

/* ===== Hero 區塊 ===== */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
    gap: 2.5rem;
    align-items: center;
    padding: 2.5rem 0 3rem;
}

.tagline {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #38bdf8;
    margin-bottom: 0.8rem;
}

.hero h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.hero h1 span {
    color: #22d3ee;
}

.hero-sub {
    color: #cbd5f5;
    font-size: 0.95rem;
    max-width: 34rem;
}

.hero-buttons {
    margin-top: 1.6rem;
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.6rem;
    border-radius: 999px;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn.primary {
    background: linear-gradient(135deg, #22d3ee, #0ea5e9);
    color: #020617;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(34,211,238,0.35);
}

.btn.primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.btn.ghost {
    border-color: rgba(148,163,184,0.7);
    color: #e5e7eb;
    background: rgba(15,23,42,0.7);
}

.btn.ghost:hover {
    border-color: #22d3ee;
}

/* Hero 右側卡片 */
.hero-card {
    background: rgba(15,23,42,0.9);
    border-radius: 1.4rem;
    border: 1px solid rgba(148,163,184,0.3);
    padding: 1.8rem;
    box-shadow: 0 24px 60px rgba(15,23,42,0.9);
}

.avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 999px;
    border: 2px solid #22d3ee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #e5e7eb;
    margin-bottom: 1rem;
    background: radial-gradient(circle at 30% 0, #22d3ee33 0, #020617 60%);
}

.hero-card h2 {
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
}

.hero-card p {
    font-size: 0.9rem;
    color: #cbd5f5;
    margin-bottom: 0.7rem;
}

.hero-card ul {
    list-style: none;
    font-size: 0.85rem;
    color: #9ca3af;
}

.hero-card li {
    margin-bottom: 0.25rem;
}

/* ===== 通用 Section ===== */
.section {
    margin-top: 3rem;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.two-col {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 2rem;
}

.info-list {
    margin-top: 1.6rem;   /* 讓右邊整組往下對齊左邊文字開頭 */
}

.info-list div {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: #cbd5f5;
}

.info-list span {
    color: #9ca3af;
}

/* ===== Grid & Cards ===== */
.grid {
    display: grid;
    gap: 1.5rem;
}

.skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.project-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.cert-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
    background: rgba(15,23,42,0.9);
    border-radius: 1.1rem;
    border: 1px solid rgba(148,163,184,0.25);
    padding: 1.2rem 1.5rem;
    box-shadow: 0 16px 40px rgba(15,23,42,0.85);
}

.card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
}

.card p {
    font-size: 0.9rem;
    color: #cbd5f5;
}

/* 技能 Tag */
.tag-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;

    gap: 0.4rem;
}

.tag-list li {
    font-size: 0.78rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(15,118,110,0.25);
    border: 1px solid rgba(45,212,191,0.35);
    color: #a5f3fc;
}

/* Project 卡片 */
.project-card {
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at 0 0, rgba(34,211,238,0.25), transparent 55%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card h3 {
    margin-bottom: 0.4rem;
}

.project-tag {
    font-size: 0.78rem;
    color: #38bdf8;
    margin-bottom: 0.5rem;
}

/* Certifications */
.cert-card h3 {
    margin-bottom: 0.3rem;
}

/* Contact */
.contact-text {
    max-width: 32rem;
    font-size: 0.95rem;
    color: #cbd5f5;
    margin-bottom: 1rem;
}

.contact-box {
    background: rgba(15,23,42,0.9);
    border-radius: 1rem;
    border: 1px solid rgba(148,163,184,0.3);
    padding: 1.2rem 1.5rem;
    max-width: 30rem;
    font-size: 0.9rem;
}

.contact-box span {
    color: #9ca3af;
}

/* Footer */
.footer {
    border-top: 1px solid rgba(148,163,184,0.3);
    padding: 1rem 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #9ca3af;
    background: rgba(2,6,23,0.95);
}

/* ===== RWD ===== */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero-card {
        order: -1;
    }

    .two-col {
        grid-template-columns: 1fr;
    }

    .top-nav nav a {
        margin-left: 0.9rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 640px) {
    .top-nav {
        padding: 0.7rem 1rem;
    }

    .container {
        padding-inline: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .top-nav nav {
        display: none; /* 先簡單處理，小螢幕直接隱藏 menu */
    }
}
