/* Base & Reset */
:root {
    --color-primary: #1a365d;
    /* Navy Blue */
    --color-accent: #c5a059;
    /* Gold */
    --color-text: #333333;
    --color-text-light: #ffffff;
    --color-bg-light: #f9f9f9;
    --color-bg-dark: #12233d;
    --font-heading: 'Noto Sans JP', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
    background-color: #ffffff;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.8;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 700;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 15px;
}

.section-title.text-white {
    color: var(--color-text-light);
}

.section-line {
    width: 60px;
    height: 3px;
    background-color: var(--color-primary);
    margin: 0 auto;
}

.section-line.line-gold {
    background-color: var(--color-accent);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

.btn-primary:hover {
    background-color: #2c4c7c;
}

.btn-gold {
    background-color: var(--color-accent);
    color: #fff;
    font-weight: bold;
}

.btn-gold:hover {
    background-color: #b08d45;
}

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Header */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 70px;
    display: flex;
    align-items: center;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    color: var(--color-primary);
    font-weight: 700;
}

.nav ul {
    display: flex;
    gap: 30px;
}

.nav a {
    color: var(--color-primary);
    font-weight: 500;
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width 0.3s;
}

.nav a:hover::after {
    width: 100%;
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    position: absolute;
    transition: all 0.3s ease-in-out;
}

.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger span:nth-child(3) {
    bottom: 0;
}

/* Hamburger Active State */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 9px;
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #f0f4f8 0%, #ffffff 100%);
    padding-top: 70px;
}

.hero-sub {
    color: var(--color-accent);
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3rem;
    line-height: 1.4;
    color: var(--color-primary);
    margin-bottom: 30px;
}

.hero-text {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 1rem;
    color: #666;
    margin-bottom: 40px;
}

/* About Section */
.section {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--color-bg-light);
}

.bg-dark {
    background-color: var(--color-bg-dark);
}

.about-text p {
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.about-usps {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.usp-item {
    text-align: center;
    color: var(--color-primary);
}

.usp-item i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--color-primary);
}

.usp-item span {
    display: block;
    font-weight: 700;
    line-height: 1.4;
}

/* Works Section */
.works-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.work-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.work-card:hover {
    transform: translateY(-5px);
}

.placeholder-image {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    font-weight: bold;
}

.work-info {
    padding: 25px;
}

.work-info h3 {
    color: var(--color-primary);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.work-info p {
    color: #666;
    font-size: 0.95rem;
}

/* Skills Section */
/* --- 修正後のコード --- */
.skills-grid {
    display: grid;
    /* 固定の4列から、中身のサイズに合わせて自動調整する設定に変更 */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.skill-item {
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.skill-item:hover {
    border-color: var(--color-accent);
}

.skill-item i {
    font-size: 3rem;
    color: var(--color-accent);
    margin-bottom: 15px;
}

.skill-item h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--color-primary);
}

.skill-item p {
    font-size: 0.9rem;
    color: #888;
}

/* Contact Section */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--color-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* Footer */
/* Footer 拡張 */
.footer {
    background-color: #0d1b2a;
    color: #888;
    text-align: center;
    /* これが中央寄せの魔法です */
    padding: 50px 0 30px;
    font-size: 0.9rem;
}

.privacy-policy {
    max-width: 800px;
    margin: 0 auto 30px;
    text-align: center;
}

.privacy-policy h4 {
    color: var(--color-accent);
    /* ゴールドのアクセント */
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.privacy-policy p {
    font-size: 0.8rem;
    line-height: 1.8;
    color: #aaa;
    /* 少し薄めの色で控えめに */
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 20px;
}

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

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

/* Responsive */
@media (max-width: 768px) {

    .hamburger {
        display: block;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        display: flex;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        z-index: 1000;
    }

    .nav.active {
        right: 0;
    }

    .nav ul {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .nav a {
        font-size: 1.5rem;
    }

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

    .works-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-usps {
        flex-direction: column;
        gap: 20px;
    }
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    /* 既存の余白に合わせて調整してください */
}

.skill-item {
    flex: 0 1 calc(25% - 2rem);
    /* 4列の場合 */
    min-width: 250px;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.profile-photo {
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
    /* 角を少し丸く */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    /* 浮遊感を出す */
}

.about-text {
    flex: 2;
    min-width: 300px;
}

.work-note {
    font-size: 0.8rem;
    color: #999;
    margin-top: 10px;
    font-style: italic;
}

.btn-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--color-primary);
    font-weight: 700;
    border-bottom: 1px solid var(--color-primary);
    padding-bottom: 2px;
}

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