/* ============ Reset & Base ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: -apple-system, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
    line-height: 1.7;
    color: #1a1a1a;
    background: #fafafa;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

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

/* ============ Buttons ============ */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary {
    background: #1a1a1a;
    color: #fff;
}
.btn-primary:hover {
    background: #333;
}
.btn-secondary {
    background: transparent;
    color: #1a1a1a;
    border: 1.5px solid #ccc;
}
.btn-secondary:hover {
    border-color: #1a1a1a;
}

/* ============ Header / Nav ============ */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    z-index: 1000;
}
.navbar { padding: 0; }
.nav-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}
.logo h2 {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: -0.3px;
}
.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}
.nav-link {
    display: block;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 400;
    color: #666;
    border-radius: 6px;
    transition: all 0.15s;
}
.nav-link:hover {
    color: #1a1a1a;
    background: rgba(0,0,0,0.04);
}
.hamburger { display: none; flex-direction: column; cursor: pointer; gap: 5px; }
.bar { width: 20px; height: 2px; background: #1a1a1a; border-radius: 2px; transition: 0.2s; }

/* ============ Hero ============ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: #fafafa;
    padding-top: 60px;
}
.hero-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 80px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.hero-title {
    font-size: 44px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -1px;
    color: #1a1a1a;
    margin-bottom: 16px;
}
.hero-subtitle {
    font-size: 18px;
    color: #888;
    font-weight: 400;
    margin-bottom: 12px;
}
.hero-description {
    font-size: 16px;
    color: #999;
    margin-bottom: 32px;
    line-height: 1.8;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-image { display: flex; justify-content: center; align-items: center; }
.hero-graphic {
    width: 320px;
    height: 320px;
    background: linear-gradient(135deg, #f5f5f5, #eee);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.code-animation { width: 200px; }
.code-line {
    height: 4px;
    background: #ddd;
    margin: 14px 0;
    border-radius: 2px;
    animation: pulse 3s ease-in-out infinite;
}
.code-line:nth-child(1) { width: 75%; animation-delay: 0s; }
.code-line:nth-child(2) { width: 100%; animation-delay: 0.8s; }
.code-line:nth-child(3) { width: 55%; animation-delay: 1.6s; }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* ============ Sections ============ */
section { padding: 100px 0; }

.section-header {
    margin-bottom: 56px;
}
.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.section-header p {
    font-size: 16px;
    color: #999;
}

/* ============ About ============ */
.about { background: #fff; }
.about-text h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
}
.about-text > p {
    font-size: 15px;
    color: #666;
    line-height: 1.9;
    margin-bottom: 40px;
}
.about-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.feature {
    padding: 28px;
    border-radius: 12px;
    border: 1px solid #eee;
    transition: border-color 0.2s;
}
.feature:hover { border-color: #ccc; }
.feature-icon { margin-bottom: 16px; line-height: 0; }
.feature h4 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.feature p { font-size: 14px; color: #888; line-height: 1.6; }

/* ============ Services ============ */
.services { background: #fafafa; }
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.service-card {
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid #eee;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.service-card > p { flex: 1; }
.service-card:hover {
    border-color: #ddd;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.service-icon { margin-bottom: 16px; line-height: 0; }
.service-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.service-card > p { font-size: 14px; color: #888; margin-bottom: 20px; line-height: 1.6; }
.service-card ul { list-style: none; }
.service-card ul li {
    padding: 4px 0;
    font-size: 14px;
    color: #666;
    padding-left: 16px;
    position: relative;
}
.service-card ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ccc;
}

/* ============ Portfolio ============ */
.portfolio { background: #fff; }
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.portfolio-item {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.portfolio-item:hover {
    border-color: #ddd;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.portfolio-image {
    height: 160px;
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
    display: flex;
    align-items: center;
    justify-content: center;
}
.placeholder-image {
    font-size: 14px;
    color: #aaa;
    font-weight: 500;
}
.portfolio-content { padding: 20px; }
.portfolio-content h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.portfolio-content p { font-size: 13px; color: #888; line-height: 1.6; margin-bottom: 12px; }
.portfolio-tech { display: flex; gap: 6px; flex-wrap: wrap; }
.tech-tag {
    background: #f5f5f5;
    color: #666;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
}

/* ============ Tools ============ */
.tools { background: #fafafa; }
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.tool-card {
    background: #fff;
    padding: 28px;
    border-radius: 12px;
    border: 1px solid #eee;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.tool-card p { flex: 1; }
.tool-card .tool-features { margin-top: auto; }
.tool-card:hover {
    border-color: #ddd;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.tool-icon { margin-bottom: 16px; line-height: 0; }
.tool-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.tool-card p { font-size: 14px; color: #888; line-height: 1.7; margin-bottom: 16px; }
.tool-features { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.feature-tag {
    background: #f5f5f5;
    color: #666;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
}
.tool-card:nth-child(3) .feature-tag { background: #f5f5f5; color: #666; }
.tool-card:nth-child(3) { border-color: #eee; }
.tool-card:nth-child(3):hover { border-color: #ddd; box-shadow: 0 4px 20px rgba(0,0,0,0.04); }
.tool-btn {
    display: inline-block;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: all 0.15s;
}
.tool-btn:hover {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

/* ============ Contact ============ */
.contact { background: #fff; }
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: start;
}
.contact-item {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    align-items: flex-start;
}
.contact-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: #f5f5f5; border-radius: 10px; flex-shrink: 0; }
.contact-details h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.contact-details p { font-size: 14px; color: #888; }
.contact-form { background: #fafafa; padding: 32px; border-radius: 12px; }
.form-group { margin-bottom: 16px; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #999;
}
.form-group textarea { resize: vertical; min-height: 100px; }

/* ============ Footer ============ */
.footer {
    background: #1a1a1a;
    color: #999;
    padding: 48px 0 24px;
}
.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}
.footer-section h3 { color: #fff; font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.footer-section h4 { color: #ccc; font-size: 14px; font-weight: 500; margin-bottom: 12px; }
.footer-section p { font-size: 14px; line-height: 1.7; }
.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 8px; }
.footer-section ul li a { color: #888; font-size: 14px; transition: color 0.15s; }
.footer-section ul li a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-menu {
        position: fixed;
        left: 0;
        top: 60px;
        width: 100%;
        flex-direction: column;
        background: rgba(250,250,250,0.98);
        backdrop-filter: blur(12px);
        padding: 12px;
        gap: 2px;
        transform: translateY(-120%);
        transition: transform 0.25s ease;
        border-bottom: 1px solid #eee;
    }
    .nav-menu.active { transform: translateY(0); }
    .nav-link { padding: 12px 16px; }

    .hero { min-height: auto; padding-top: 60px; }
    .hero-container { grid-template-columns: 1fr; gap: 40px; padding: 60px 24px; }
    .hero-title { font-size: 32px; }
    .hero-image { display: none; }

    .about-features { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .tools-grid { grid-template-columns: 1fr; }
    .contact-content { grid-template-columns: 1fr; gap: 32px; }
    .footer-content { grid-template-columns: 1fr; gap: 24px; }
    .section-header h2 { font-size: 26px; }
    section { padding: 64px 0; }
}

/* ============ Animation ============ */
@media (prefers-reduced-motion: no-preference) {
    .fade-in {
        opacity: 0;
        transform: translateY(12px);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }
    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }
}
