:root {
            --bg: #0a1020;
            --bg-soft: #121b33;
            --surface: rgba(255, 255, 255, 0.06);
            --surface-border: rgba(255, 255, 255, 0.14);
            --text: #f4f7ff;
            --text-soft: #bcc8e6;
            --primary: #79a5ff;
            --accent: #64e8d8;
            --danger: #ff8fa3;
            --shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
        }

        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            font-family: Inter, "Segoe UI", Roboto, Arial, "Hiragino Sans", "Noto Sans CJK JP", "Microsoft YaHei", sans-serif;
            background:
                radial-gradient(circle at 20% 20%, rgba(121, 165, 255, 0.22), transparent 40%),
                radial-gradient(circle at 80% 0%, rgba(100, 232, 216, 0.18), transparent 45%),
                var(--bg);
            color: var(--text);
            line-height: 1.65;
            overflow-x: clip;
        }

        a {
            color: #9fc0ff;
            text-decoration: none;
        }

        a:hover {
            text-decoration: underline;
        }

        .container {
            max-width: 1180px;
            margin: 0 auto;
            padding: 0 20px;
            min-width: 0;
        }

        h1,
        h2,
        h3,
        p,
        li,
        .lead,
        .lead-secondary,
        .section-note,
        .project-text {
            overflow-wrap: anywhere;
            word-break: break-word;
        }

        .hero {
            padding: 54px 0 34px;
        }

        .hero-panel {
            background: linear-gradient(135deg, rgba(121, 165, 255, 0.16), rgba(100, 232, 216, 0.08));
            border: 1px solid var(--surface-border);
            border-radius: 24px;
            box-shadow: var(--shadow);
            padding: 34px;
            backdrop-filter: blur(6px);
        }

        .hero-grid {
            display: grid;
            grid-template-columns: 170px 1fr;
            gap: 26px;
            align-items: center;
        }

        .profile-photo {
            width: 170px;
            height: 170px;
            border-radius: 20px;
            object-fit: cover;
            border: 2px solid rgba(255, 255, 255, 0.45);
            box-shadow: 0 18px 30px rgba(0, 0, 0, 0.33);
        }

        h1 {
            font-size: clamp(30px, 4.5vw, 48px);
            line-height: 1.1;
            margin: 0 0 12px;
        }

        .lead {
            margin: 0 0 16px;
            color: var(--text-soft);
            font-size: 18px;
            max-width: 760px;
        }

        .lead-secondary {
            margin: 0 0 12px;
            color: var(--text-soft);
            max-width: 780px;
            font-size: 16px;
        }

        .chips {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 12px;
        }

        .chip {
            background: rgba(255, 255, 255, 0.11);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 999px;
            padding: 8px 14px;
            font-size: 14px;
            color: #eaf0ff;
        }

        .quick-actions {
            margin-top: 22px;
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .btn {
            display: inline-block;
            padding: 11px 16px;
            border-radius: 12px;
            font-weight: 600;
            border: 1px solid transparent;
            text-decoration: none;
            transition: transform 0.2s ease, background 0.2s ease;
        }

        .btn:hover {
            transform: translateY(-2px);
            text-decoration: none;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary), #8f89ff);
            color: #0c1225;
        }

        .btn-ghost {
            background: rgba(255, 255, 255, 0.06);
            color: var(--text);
            border-color: rgba(255, 255, 255, 0.2);
        }

        section {
            padding: 26px 0 10px;
        }

        h2 {
            font-size: clamp(24px, 4vw, 34px);
            margin: 0 0 18px;
        }

        .section-note {
            margin: -4px 0 20px;
            color: var(--text-soft);
        }

        .grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 16px;
        }

        .services-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 14px;
        }

        .service-card {
            display: block;
        }

        .service-card h3 {
            margin: 0 0 14px;
            font-size: 19px;
            line-height: 1.35;
            padding-bottom: 8px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.18);
        }

        .service-card-content p:last-child {
            margin-bottom: 0;
        }

        .portfolio-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 14px;
        }

        .portfolio-card {
            display: block;
        }

        .portfolio-card h2 {
            margin: 0 0 14px;
            font-size: 19px;
            line-height: 1.35;
            padding-bottom: 8px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.18);
        }

        .collaboration-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 14px;
        }

        .collaboration-card {
            display: block;
        }

        .collaboration-card h3 {
            margin: 0 0 14px;
            font-size: 19px;
            line-height: 1.35;
            padding-bottom: 8px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.18);
        }

        .collaboration-card-content p:last-child {
            margin-bottom: 0;
        }

        .projects-with-thumbs {
            display: grid;
            gap: 10px;
        }

        .projects-with-thumbs li {
            padding-left: 0;
            margin-bottom: 0;
        }

        .projects-with-thumbs li::before {
            display: none;
        }

        .project-link {
            display: grid;
            grid-template-columns: 132px minmax(0, 1fr);
            gap: 12px;
            align-items: center;
            text-decoration: none;
            min-width: 0;
        }

        .project-link:hover {
            text-decoration: none;
        }

        .project-thumb {
            width: 132px;
            aspect-ratio: 16 / 10;
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.24);
            background:
                linear-gradient(135deg, rgba(121, 165, 255, 0.28), rgba(100, 232, 216, 0.18)),
                repeating-linear-gradient(
                    -45deg,
                    rgba(255, 255, 255, 0.06) 0,
                    rgba(255, 255, 255, 0.06) 8px,
                    rgba(255, 255, 255, 0.02) 8px,
                    rgba(255, 255, 255, 0.02) 16px
                );
            display: grid;
            place-items: center;
            color: #d9e5ff;
            font-size: 12px;
            font-weight: 600;
            letter-spacing: 0.02em;
            box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
        }

        .project-text {
            color: var(--text-soft);
            line-height: 1.45;
            min-width: 0;
        }

        .card,
        .portfolio-card,
        .service-card,
        .collaboration-card,
        #portfolio {
            min-width: 0;
        }

        .project-thumb-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: inherit;
            display: block;
        }

        .card {
            background: var(--surface);
            border: 1px solid var(--surface-border);
            border-radius: 18px;
            padding: 20px;
            box-shadow: 0 10px 20px rgba(3, 6, 16, 0.3);
            height: 100%;
        }

        .card h3 {
            margin: 0 0 10px;
            font-size: 20px;
        }

        .card p {
            margin: 0 0 10px;
            color: var(--text-soft);
        }

        .card ul {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .card li {
            margin-bottom: 8px;
            position: relative;
            padding-left: 16px;
            color: var(--text-soft);
        }

        .card li::before {
            content: "";
            position: absolute;
            left: 0;
            top: 10px;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--accent), var(--primary));
        }

        .contact-list {
            list-style: none;
            margin: 0;
            padding: 0;
            display: grid;
            gap: 10px;
        }

        .contact-list li {
            background: var(--surface);
            border: 1px solid var(--surface-border);
            border-radius: 12px;
            padding: 12px 14px;
        }

        .error-box {
            background: rgba(255, 143, 163, 0.1);
            border: 1px solid rgba(255, 143, 163, 0.55);
            color: #ffd7df;
            border-radius: 16px;
            padding: 26px;
            text-align: center;
            margin-top: 28px;
        }

        .error-lang-messages {
            list-style: none;
            margin: 18px 0 0;
            padding: 0;
            text-align: left;
            display: grid;
            gap: 12px;
        }

        .error-lang-messages li {
            background: rgba(0, 0, 0, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 12px;
            padding: 12px 14px;
            line-height: 1.5;
        }

        .error-lang-messages strong {
            display: inline-block;
            min-width: 2.5em;
            margin-right: 8px;
            color: #fff;
        }

        .error-home-links {
            margin-top: 20px;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: center;
        }

        footer {
            margin-top: 34px;
            border-top: 1px solid rgba(255, 255, 255, 0.13);
            color: var(--text-soft);
            padding: 24px 0 30px;
            text-align: center;
            font-size: 14px;
        }

        @media (max-width: 780px) {
            .hero {
                padding-top: 22px;
            }

            .hero-panel {
                padding: 22px;
                border-radius: 18px;
            }

            .hero-grid {
                grid-template-columns: 1fr;
                text-align: center;
            }

            .profile-photo {
                margin: 0 auto;
                width: 132px;
                height: 132px;
            }

            .chips,
            .quick-actions {
                justify-content: center;
            }

            .project-link {
                grid-template-columns: 1fr;
                gap: 10px;
                align-items: start;
            }

            .projects-with-thumbs {
                gap: 12px;
            }

            .projects-with-thumbs li {
                border: 1px solid rgba(255, 255, 255, 0.14);
                border-radius: 14px;
                background: rgba(255, 255, 255, 0.05);
                padding: 12px;
            }

            .project-thumb {
                width: 100%;
                max-width: 132px;
            }

            .site-nav {
                align-items: stretch;
            }

            .lang-switcher {
                flex: 1 1 100%;
                justify-content: center;
                gap: 6px;
            }

            .lang-switcher a {
                padding: 5px 8px;
                font-size: 12px;
            }

        }

        .site-nav {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 16px 0 8px;
            flex-wrap: wrap;
        }

        .site-nav-links {
            display: flex;
            gap: 14px;
            flex-wrap: wrap;
        }

        .site-nav a.nav-link {
            color: var(--text-soft);
            font-weight: 500;
        }

        .site-nav a.nav-link.active {
            color: var(--text);
        }

        .lang-switcher {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: flex-end;
        }

        .lang-switcher a {
            padding: 6px 10px;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.18);
            color: var(--text-soft);
            font-size: 13px;
            font-weight: 600;
            flex: 0 0 auto;
        }

        .lang-switcher a.active {
            background: rgba(255, 255, 255, 0.1);
            color: var(--text);
        }

        .page-intro {
            padding: 28px 0 8px;
        }

        .portfolio-teaser {
            text-align: left;
        }

        .portfolio-teaser .btn {
            margin-top: 8px;
        }
