/* Styling for the entire body of the webpage */
body {
    font-family: Arial, sans-serif; /* Set the default font for the webpage */
    margin: 0; /* Remove default margin */
    padding: 0; /* Remove default padding */
    background-color: #f4f4f4; /* Set a light gray background color */
}

/* Styling for the header section */
header {
    position: relative; /* Set position context for child elements */
    background-color: #333; /* Set a dark gray background color */
    color: #fff; /* Set text color to white */
    text-align: center; /* Center-align the text */
    padding: 1rem 0 0 0; /* Add padding to the top */
    z-index: 9999; /* Ensure the header is on top of other elements */
}

/* Styling for the main title in the header */
header h1 {
    height: 30px; /* Set a fixed height */
    line-height: 30px; /* Vertically center the text */
    margin: 0; /* Remove default margin */
}

/* Styling for the navigation list */
nav ul {
    padding: 0; /* Remove default padding */
    list-style-type: none; /* Remove bullet points */
    overflow: hidden; /* Hide overflowing content */
}

/* Styling for each list item in the navigation */
nav ul li {
    display: inline; /* Display list items in a line */
    margin-right: -5px; /* Adjust spacing between items */
}

/* Styling for the links in the navigation */
nav ul li a {
    text-decoration: none; /* Remove underlines from links */
    color: #fff; /* Set text color to white */
    transition: color 0.3s; /* Smooth transition for color changes */
}

/* Styling for the links when hovered over */
nav ul li a:hover {
    color: #ddd; /* Change color to a lighter gray on hover */
}

/* Styling for general sections on the webpage */
section {
    margin: 20px auto; /* Add margin to top and bottom, center horizontally */
    padding: 20px 40px 20px 40px; /* Add padding on all sides */
    background-color: #fff; /* Set a white background color */
    border-radius: 10px; /* Round the corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
    max-width: 800px; /* Limit the maximum width */
    animation: fadeIn 1.5s; /* Apply a fade-in animation */
}

/* Styling for the h2 headers inside sections */
section h2 {
    position: relative; /* Set position context for pseudo-elements */
    display: inline-block; /* Allow for width to fit content */
    margin-top: 20px; /* Add margin to the top */
    padding-bottom: 3px; /* Add padding to the bottom */
}

/* Styling for a decorative line under h2 headers */
section h2::after {
    content: ""; /* Necessary for pseudo-elements */
    position: absolute; /* Position relative to the h2 */
    left: 0; /* Start from the left edge */
    right: 0; /* End at the right edge */
    height: 6px; /* Set a fixed height */
    background-color: #54dbc2; /* Set a teal background color */
    z-index: -1; /* Place it behind the text */
}

/* Adjust the position of the decorative line for Japanese language */
.lang-ja section h2::after {
    bottom: 5px; /* Position it 5px from the bottom */
}

/* Adjust the position of the decorative line for English language */
.lang-en section h2::after {
    bottom: 1px; /* Position it 1px from the bottom */
}

/* Styling for the h2 header in the contact section */
section#contact h2 {
    margin-bottom: 20px; /* Add margin to the bottom */
}

/* Styling for the icons in the contact section */
.contact-icons {
    margin-bottom: 20px; /* Add margin to the bottom */
}

/* Styling for h3 headers inside sections */
section h3 {
    margin: 0; /* Remove default margin */
}

/* Styling for paragraphs inside sections */
section p {
    margin: 0; /* Remove default margin */
    margin-top: 20px; /* Add margin to the top */
    margin-bottom: 20px; /* Add margin to the bottom */
}

/* Styling for the last unordered list inside sections */
section ul:last-of-type {
    margin-bottom: 20px; /* Add margin to the bottom */
}

/* Styling for the footer */
footer {
    text-align: center; /* Center-align the text */
    padding: 1rem 0; /* Add padding to the top and bottom */
    background-color: #333; /* Set a dark gray background color */
    color: #fff; /* Set text color to white */
}

/* Styling for buttons inside the navigation */
nav ul li button {
    background-color: #333; /* Set a dark gray background color */
    color: #fff; /* Set text color to white */
    border: none; /* Remove borders */
    height: 40px; /* Set a fixed height */
    padding: 10px 20px; /* Add padding on all sides */
    cursor: pointer; /* Change cursor to a hand when hovering */
    transition: background-color 0.3s; /* Smooth transition for background color changes */
}

/* Styling for buttons inside the navigation when hovered over */
nav ul li button:hover {
    background-color: #555; /* Change background color to a medium gray on hover */
}

/* Styling for buttons inside the header */
header button {
    margin-top: 0px; /* Remove margin from the top */
    margin-bottom: 0; /* Remove margin from the bottom */
    background-color: #555; /* Set a medium gray background color */
    color: #fff; /* Set text color to white */
    border: none; /* Remove borders */
    padding: 5px 10px; /* Add padding on all sides */
    cursor: pointer; /* Change cursor to a hand when hovering */
    transition: background-color 0.3s; /* Smooth transition for background color changes */
}

/* Styling for buttons inside the header when hovered over */
header button:hover {
    background-color: #777; /* Change background color to a lighter gray on hover */
}

/* Styling for the container holding the profile image */
.profile-container {
    display: flex; /* Use flexbox for layout */
    flex-direction: column; /* Stack children vertically */
    align-items: center; /* Center children horizontally */
    margin-bottom: 5px; /* Add margin to the bottom */
}

/* Styling for the profile image */
.profile-image {
    width: 280px; /* Set a fixed width */
    height: 280px; /* Set a fixed height */
    display: block; /* Display as a block element */
    margin-right: 0; /* Remove margin from the right */
    margin-top: 10px; /* Add margin to the top */
    margin-bottom: 10px; /* Add margin to the bottom */
    object-fit: cover; /* Resize image to cover the container without distortion */
}

/* Initial styling for elements that will fade in */
.fade-in {
    opacity: 0; /* Make it fully transparent */
    transform: translateY(20px); /* Move it 20px down */
    visibility: hidden; /* Hide it from view */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, visibility 0.6s ease-out; /* Smooth transitions for opacity, position, and visibility */
}

/* Styling for elements that have fully faded in */
.is-visible {
    opacity: 1; /* Make it fully visible */
    transform: translateY(0); /* Reset its position */
    visibility: visible; /* Make it visible */
}

/* Styling for the contact icons container */
.contact-icons {
    display: flex; /* Use flexbox for layout */
    gap: 20px; /* Add space between children */
    justify-content: center; /* Center children horizontally */
}

/* Styling to remove bullet points from lists */
.no-bullet {
    list-style-type: none; /* Remove bullet points */
    padding-left: 0; /* Remove default padding on the left */
}

/* Styling for the hamburger menu icon (hidden by default) */
#hamburger-icon {
    display: none; /* Hide it by default */
    flex-direction: column; /* Stack children vertically */
    justify-content: space-between; /* Evenly space children */
    width: 30px; /* Set a fixed width */
    height: 20px; /* Set a fixed height */
    cursor: pointer; /* Change cursor to a hand when hovering */
    position: absolute; /* Position it relative to its nearest positioned ancestor */
    top: 50%; /* Position it at the vertical center */
    right: 20px; /* 20px from the right edge */
    transform: translateY(-50%); /* Vertically center it */
}

/* Styling for the lines inside the hamburger icon */
#hamburger-icon > div {
    width: 100%; /* Take the full width of the parent */
    height: 4px; /* Set a fixed height */
    background-color: white; /* Set a white background color */
}

/* Styling for the slide-out menu (hidden by default) */
#slide-menu {
    position: fixed; /* Fix it to the viewport */
    top: 0; /* Start from the top edge */
    right: -230px; /* Start 230px to the right (hidden by default) */
    width: 230px; /* Set a fixed width */
    height: 100vh; /* Take the full height of the viewport */
    background-color: #333; /* Set a dark gray background color */
    transition: right 0.3s; /* Smooth transition for the right position */
    z-index: 20000; /* Ensure it's on top of other elements */
    padding-top: 20px; /* Add padding to the top */
}

/* Styling for the links inside the slide-out menu */
#slide-menu a {
    display: block; /* Display as a block element */
    color: #fff; /* Set text color to white */
    height: 40px; /* Set a fixed height */
    line-height: 40px; /* Vertically center the text */
    text-decoration: none; /* Remove underlines from links */
    padding: 10px 20px; /* Add padding on all sides */
    padding-left: 40px; /* Add more padding to the left */
    transition: background-color 0.3s; /* Smooth transition for background color changes */
}

/* Styling for the links inside the slide-out menu when hovered over */
#slide-menu a:hover {
    background-color: #555; /* Change background color to a medium gray on hover */
}

/* Styling for the close button inside the slide-out menu */
#slide-menu-close {
    position: absolute; /* Position it relative to its nearest positioned ancestor */
    top: calc(10px + 40px); /* Calculate its top position */
    left: -40px; /* Position it 40px to the left (partially hidden) */
    width: 30px; /* Set a fixed width */
    height: 30px; /* Set a fixed height */
    cursor: pointer; /* Change cursor to a hand when hovering */
    transform: translateY(-50%); /* Vertically center it */
    display: none; /* Hide it by default */
}

/* Display the close button when the menu is opened */
#slide-menu.opened #slide-menu-close {
    display: block; /* Display it as a block element */
}

/* Styling for the diagonal lines of the close button */
#slide-menu-close:before, #slide-menu-close:after {
    content: ''; /* Necessary for pseudo-elements */
    position: absolute; /* Position relative to the close button */
    top: 50%; /* Position it at the vertical center */
    left: 50%; /* Position it at the horizontal center */
    width: 100%; /* Take the full width of the parent */
    height: 4px; /* Set a fixed height */
    background-color: #333; /* Set a dark gray background color */
}

/* Rotate the first diagonal line of the close button to form an "X" */
#slide-menu-close:before {
    transform: translate(-50%, -50%) rotate(45deg); /* Center it and rotate it 45 degrees */
}

/* Rotate the second diagonal line of the close button to form an "X" */
#slide-menu-close:after {
    transform: translate(-50%, -50%) rotate(-45deg); /* Center it and rotate it -45 degrees */
}

/* Media query for screens with a maximum width of 768px (e.g., mobile devices) */
@media (max-width: 768px) {
    /* Display the hamburger icon on small screens */
    #hamburger-icon {
        display: flex; /* Display it using flexbox */
    }

    /* Adjust the margins for sections on small screens */
    section {
        margin: 20px 10px; /* Add margin to the top and bottom, reduce horizontal margins */
    }

    /* Hide the navigation on small screens */
    nav {
        display: none; /* Hide it */
    }

    /* Adjust the styling for the header on small screens */
    header {
        padding-top: 20px; /* Add padding to the top */
        padding-bottom: 20px; /* Add padding to the bottom */
        position: fixed; /* Fix it to the viewport */
        top: 0; /* Start from the top edge */
        left: 0; /* Start from the left edge */
        width: 100%; /* Take the full width of the viewport */
        z-index: 9999; /* Ensure it's on top of other elements */
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
    }

    /* Adjust the padding for the body on small screens */
    body {
        padding-top: 70px; /* Add padding to the top to account for the fixed header */
    }
}

/* Styling for an overlay (presumably used when the slide-out menu is open) */
#overlay {
    position: fixed; /* Fix it to the viewport */
    top: 0; /* Start from the top edge */
    left: 0; /* Start from the left edge */
    z-index: 10000; /* Ensure it's below the slide-out menu but above other elements */
    width: 100%; /* Take the full width of the viewport */
    height: 100%; /* Take the full height of the viewport */
    background-color: rgba(255, 255, 255, 0.7); /* Set a semi-transparent white background */
    display: none;
    transition: opacity 0.2s;  /* ここを追加 */
    opacity: 0;  /* ここを追加 */
}

/* Styling for the close button inside the slide-out menu */
#slide-menu .close-button {
    position: absolute; /* Position it relative to its nearest positioned ancestor */
    left: -40px; /* Position it 40px to the left (partially hidden) */
    top: 10px; /* Position it 10px from the top */
}

/* Styling for the content of a project */
.project-content {
    display: block; /* Display as a block element */
    justify-content: space-between; /* Evenly space children horizontally */
    align-items: flex-start; /* Align children to the start vertically */
    margin-top: 10px; /* Add margin to the top */
    margin-bottom: 5px; /* Add margin to the bottom */
}

/* Styling for the description of a project */
.project-description {
    padding-bottom: 20px; /* Add padding to the bottom */
}

/* Styling for the images of a project */
.project-images {
    display: flex; /* Use flexbox for layout */
    flex-direction: row; /* Stack children horizontally */
    flex-wrap: wrap;
    justify-content: center;
    /*justify-content: center; /* Center children horizontally */
    gap: 20px; /* Add space between children */
    align-items: flex-end; /* Align children to the end vertically */
}

/* Styling for the container holding an image */
.image-container {
    display: flex; /* Use flexbox for layout */
    flex-direction: column; /* Stack children vertically */
    align-items: center; /* Center children horizontally */
    margin-bottom: 20px; /* Add margin to the bottom */
}

/* Styling for the caption of an image */
.image-caption {
    text-align: center; /* Center-align the text */
    margin-top: 5px; /* Add margin to the top */
}

/* Styling to clear floats */
.clearfix::after {
    content: ""; /* Necessary for pseudo-elements */
    display: table; /* Use table display */
    clear: both; /* Clear both left and right floats */
}

/* Styling for tool cards */
.tool-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 10px;
    padding: 16px 20px;
    border-left: 4px solid #54dbc2;
    background-color: #f7fefe;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.tool-card-info {
    flex: 1;
}

.tool-card-title {
    margin: 0 0 8px 0;
    font-size: 1rem;
}

.tool-card-description {
    margin: 0 !important;
    font-size: 0.92rem;
    color: #555;
}

.tool-card-link {
    display: inline-block;
    white-space: nowrap;
    padding: 8px 16px;
    background-color: #54dbc2;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.tool-card-link:hover {
    background-color: #3cbfab;
}

@media (max-width: 768px) {
    .tool-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Styling for responsive video embeds */
.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-top: 24px;
    border-radius: 6px;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
