:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --background-color: #f4f4f4;
    --accent-color: #e74c3c;
    --font-main: 'Noto Sans TC', '微軟正黑體', sans-serif;
    --font-heading: 'Noto Serif TC', '標楷體', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--background-color);
    font-size: 18px;
}

.navbar {
    background-color: var(--secondary-color);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-logo {
    color: #fff;
    font-size: 1.75rem;
    text-decoration: none;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: 1rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1.1rem;
}

.nav-link:hover {
    color: var(--accent-color);
}

.menu-icon {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #fff;
    transition: all 0.3s ease-in-out;
}

@media (max-width: 768px) {
    .menu-icon {
        display: block;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 5rem;
        flex-direction: column;
        background-color: var(--secondary-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 2.5rem 0;
    }
}

.hero {
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 6rem 2rem;
    margin-top: 4rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.tagline {
    font-size: 1.5rem;
    font-style: italic;
}

main {
    max-width: 1000px;
    margin: 4rem auto;
    padding: 0 2rem;
}

section {
    margin-bottom: 4rem;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.portfolio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.portfolio-item i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.contact-info {
    list-style: none;
}

.contact-info li {
    margin-bottom: 0.5rem;
}

.btn-toggle {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    font-size: 1rem;
}

.btn-toggle:hover {
    background-color: var(--accent-color);
}

.hidden {
    display: none;
}

footer {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 3rem 0;
    font-size: 0.9rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-logo-img {
    max-width: 100px;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
}

.footer-contact a {
    color: #fff;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

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

    .tagline {
        font-size: 1.25rem;
    }

    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    h5 { font-size: 1.1rem; }
    h6 { font-size: 1rem; }
}

@media print {
    body {
        font-size: 12pt;
        line-height: 1.6;
        background: none;
        color: #000;
    }

    .navbar, .hero, .btn-toggle, footer {
        display: none;
    }

    main {
        margin: 0;
        padding: 0;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    img {
        max-width: 100% !important;
    }

    @page {
        margin: 2cm;
    }
}

.modification-record {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    border-left: 5px solid var(--primary-color);
}

.modification-record h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.modification-record p {
    margin-bottom: 1rem;
}

.modification-record ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.modification-record li {
    margin-bottom: 0.5rem;
}

.modification-record pre {
    background-color: #f8f8f8;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

#details {
    margin-top: 2rem;
    background-color: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
}

#details h3 {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.btn-toggle {
    display: inline-block;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .modification-record {
        padding: 1.5rem;
    }
}

.section-block {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    margin-bottom: 4rem;
}

.section-block h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.service-list {
    list-style-type: none;
    padding: 0;
}

.service-list li {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
}

.service-list i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-right: 1rem;
    width: 30px;
    text-align: center;
    flex-shrink: 0;
}

.service-item-content {
    flex-grow: 1;
}

.service-item-content strong {
    display: block;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .service-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .service-list i {
        margin-bottom: 0.5rem;
    }

    .service-item-content {
        width: 100%;
    }
}

.contact-list {
    list-style-type: none;
    padding: 0;
}

.contact-list li {
    margin-bottom: 1rem;
}

.contact-list i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.about-list {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.about-list li {
    margin-bottom: 0.75rem;
}

.content-wrapper p {
    margin-bottom: 1rem;
}

.portfolio-embed {
    width: 100%;
    text-align: center;
    padding: 2rem 0;
}

.portfolio-embed p {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.portfolio-link {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-size: 1.1rem;
}

.portfolio-link:hover {
    background-color: var(--accent-color);
}

.portfolio-link i {
    margin-right: 0.5rem;
}

.notion-embed {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 8px;
    margin-bottom: 2rem;
}