/* ===== 基本樣式 ===== */
body {
    margin: 0;
    font-family: "Arial", sans-serif;
    background: #f9f9f9;
    color: #333;
}

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

/* ===== Navbar ===== */
.nav-section {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 10px 0;
}

.nav-list {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list li {
    margin: 0 15px;
    font-weight: 700;
    transition: 0.3s;
}

.nav-list li a {
    color: #0078d7;
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s;
}

.nav-list li a:hover {
    background: #0078d7;
    color: #fff;
}

.nav-list li a i {
    margin-right: 5px;
}

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

.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 140px 60px 60px 60px;
    background: linear-gradient(to right, #6a11cb, #2575fc);
    color: #fff;
    min-height: 100vh;
    flex-wrap: wrap;
}

.hero-left h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.hero-left p.lead {
    font-size: 24px;
    margin-bottom: 20px;
}

.hero-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.hero-text {
    text-align: center;
}

.hero-text p, 
.hero-text blockquote {
    margin: 10px 0;
}

.hero-text blockquote {
    font-style: italic;
    border-left: 4px solid #fff;
    padding-left: 15px;
}

.hero-right .photo-frame {
    width: 400px;
    height: 400px;
    border: 5px solid #fff;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.hero-right .photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#typed-text {
    font-size: 20px;
    font-weight: 400;
    white-space: pre-wrap; /* 保留換行 */
    border-right: 2px solid #fff; /* 光標 */
    animation: blink 0.7s step-end infinite;
    margin-top: 20px;
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* 隱藏原始文字 */
.to-type {
    display: none;
}

.hero-right blockquote {
    font-style: italic;
    border-left: 4px solid #fff;
    padding-left: 15px;
    margin: 20px 0;
}

.social-links a {
    margin-right: 15px;
    color: #fff;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #ffeb3b;
}

/* ===== About Section ===== */
/* About Section - 圖片 */
.photo-frame.small {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  width: 180px;   /* 可以調整大小 */
  height: 180px;  /* 跟 width 一樣，才會是正圓 */
  margin-bottom: 20px;
}

.photo-frame.small img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 確保不會變形 */
  border-radius: 50%;
}
.about-content {
    display: flex;
    justify-content: space-between;
    padding: 60px;
    gap: 20px;
    flex-wrap: wrap;
    background: #f9f9f9;
}

.about-left, .about-right {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    flex: 1;
    min-width: 250px;
}

.about-left h2, .about-right h3 {
    color: #0078d7;
    margin-bottom: 20px;
}

.about-right ul {
    list-style: none;
    padding: 0;
}

.about-right ul li {
    background: #f0f0f0;
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    transition: transform 0.3s, background 0.3s;
}

.about-right ul li:hover {
    transform: translateY(-3px);
    background: #e0e7ff;
}

/* About small photo */
.about-left .photo-frame.small {
    width: 150px;
    height: 150px;
    border-radius: 15px;
    margin-bottom: 20px;
}

/* ===== Recent Posts ===== */
.posts-section {
    padding: 60px;
    background: #f0f4f8;
}

.posts-section h2 {
    color: #0078d7;
    margin-bottom: 30px;
}

.posts-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.post-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

.post-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.post-card .post-content {
    padding: 15px;
}

.post-card .post-content h3 {
    margin: 0 0 10px;
    color: #0078d7;
}

.post-card .post-content p {
    color: #666;
    font-size: 14px;
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 20px;
    background: #0078d7;
    color: #fff;
}

/* ===== Fade-in 效果 ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 響應式 ===== */
@media (max-width: 992px) {
    .hero-section, .about-content {
        flex-direction: column;
        padding: 80px 30px;
    }

    .hero-left, .hero-right,
    .about-left, .about-right {
        width: 100%;
        text-align: center;
        margin-bottom: 30px;
    }

    .nav-list {
        flex-direction: column;
    }

    .nav-list li {
        margin: 5px 0;
    }
}

@media (max-width: 576px) {
    .hero-left h1 { font-size: 32px; }
    .hero-left p.lead { font-size: 20px; }
    .hero-right p, .hero-right blockquote { font-size: 16px; }
    .about-left h2, .about-right h3 { font-size: 18px; }
}
.icon-link {
  margin-left: 8px;
  color: #0078d7;
  font-size: 18px;
  transition: color 0.3s;
}

.icon-link:hover {
  color: #ff4081; /* hover 顏色，可換 bilibili 藍 (#00a1d6) */
}
