:root {
    /* Google Material Color Palette */
    --bg-color: #FFFFFF; /* Pure White */
    --card-bg: #F8F9FA; /* Light Gray */
    
    --text-main: #202124; /* Dark Gray for high visibility */
    --text-light: #5F6368;
    
    /* Google Colors */
    --google-blue: #4285F4;
    --google-red: #EA4335;
    --google-yellow: #FBBC05;
    --google-green: #34A853;
    
    /* Map Colors */
    --visited-color: var(--google-green); /* Google Green for visited */
    --visited-hover: #3bca62; /* Slightly brighter green for hover */
    --unvisited-color: #E8EAED; /* Light grey for unvisited */
    --unvisited-hover: #DADCE0;
    
    --font-primary: 'M PLUS Rounded 1c', sans-serif;
    
    --shadow-soft: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); /* Material Box Shadow */
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-primary);
    line-height: 1.6;
    padding: 2rem 1rem;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Typography & Utilities */
h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.text-small {
    font-size: 0.85rem;
    color: var(--text-light);
}

.text-light { color: var(--text-light); }
.text-pink { color: #f06292; }
.text-center { text-align: center; }
.mb-3 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }

/* Cards Layout */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Section Top Borders (Google Colors) */
.border-top-blue { border-top: 4px solid var(--google-blue); }
.border-top-red { border-top: 4px solid var(--google-red); }
.border-top-yellow { border-top: 4px solid var(--google-yellow); }
.border-top-green { border-top: 4px solid var(--google-green); }

.drop-shadow {
    box-shadow: var(--shadow-soft);
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .grid-2-col {
        grid-template-columns: 1fr;
    }
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.section-icon {
    color: var(--text-light); /* Neutral icon color next to text */
}

/* ==================================
   1. Header / Profile
================================== */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    background: #FFFFFF;
    border: 1px solid #E8EAED;
}

@media (min-width: 600px) {
    .profile-header {
        flex-direction: row;
        text-align: left;
        padding: 3rem 2rem;
    }
}

.profile-avatar-container {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08); /* slight soft shadow */
    display: block;
}

.profile-info {
    flex-grow: 1;
}

.profile-name {
    font-size: 2.2rem;
}

.profile-affiliation {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.profile-title-badge {
    display: inline-block;
    background-color: #FFFFFF;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-weight: 700;
    color: var(--google-blue); /* Google Blue */
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    border: 1px solid #E8EAED;
}

/* ==================================
   2. Awards
================================== */
.awards-section {
    background: var(--card-bg);
}

.awards-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.award-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background-color: #fff;
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid #E8EAED;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: var(--transition);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.award-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.award-text {
    flex: 1;
    min-width: 0;
}

.award-icon {
    font-size: 2.5rem;
    color: var(--google-yellow); /* Yellow for Awards */
}
.award-icon.silver { color: #9AA0A6; } /* Grey for silver */
.award-icon.bronze { color: #CD7F32; } /* Bronze */

.award-text h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.award-desc {
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 700;
}

.award-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--google-blue);
    text-decoration: none;
    font-weight: bold;
}
.award-link:hover { text-decoration: underline; }

/* ==================================
   3. Projects
================================== */
.project-card {
    border: 1px solid #E8EAED;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    background-color: #FFFFFF;
}

.project-header h3 {
    font-size: 1.2rem;
    color: var(--text-main);
}

.project-desc {
    margin: 1rem 0;
}

.project-strengths h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}
.tag-google-blue { background-color: var(--google-blue); color: white; }
.tag-google-red { background-color: var(--google-red); color: white; }
.tag-google-yellow { background-color: var(--google-yellow); color: #000; }
.tag-google-green { background-color: var(--google-green); color: white; }
.tag-dark { background-color: #3C4043; color: white; }

.project-links {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==================================
   4. Skills & Media
================================== */
.certifications .cert-item {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
}
.cert-item i { color: var(--google-green); }

.media-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.stat-box {
    flex: 1;
    background-color: #FFFFFF;
    border: 1px solid #E8EAED;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
}
.stat-unit {
    font-size: 1rem;
    font-weight: normal;
}
.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.2rem;
    font-weight: bold;
}

/* ==================================
   Goals (今年の目標)
================================== */
.goal-list {
    list-style: none !important;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 0 !important;
    margin: 0 !important;
}

.goal-list li {
    padding: 0.8rem 1.2rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    display: flex;
    align-items: center;
    border: 2px solid transparent;
    transition: var(--transition);
    background-color: #FFFFFF;
    margin-left: 0 !important;
}

/* 未達成状態 */
.goal-unachieved {
    color: var(--text-main);
    border-color: #E8EAED;
}
.goal-unachieved::before {
    content: "\f111"; /* fa-circle regular */
    font-family: "Font Awesome 6 Free";
    font-weight: 400;
    margin-right: 12px;
    color: #9AA0A6;
    font-size: 1.2rem;
}
.goal-unachieved::after {
    content: "未達成";
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-light);
    background-color: #E8EAED;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 達成状態 */
.goal-achieved {
    background-color: #fce8e6; /* Google Red lightened */
    color: var(--google-red);
    border-color: #fad2cf;
    box-shadow: 0 4px 10px rgba(234, 67, 53, 0.1);
}
.goal-achieved::before {
    content: "\f058"; /* fa-circle-check solid */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 12px;
    color: var(--google-red);
    font-size: 1.2rem;
}
.goal-achieved::after {
    content: "達成！ 🎉";
    margin-left: auto;
    font-size: 0.85rem;
    color: #fff;
    background-color: var(--google-red);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-weight: bold;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    white-space: nowrap;
    flex-shrink: 0;
}
@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* 挑戦中状態 */
.goal-challenging {
    background-color: #fffdf5;
    color: var(--text-main);
    border-color: #fce8b2;
    box-shadow: 0 4px 10px rgba(251, 188, 5, 0.1);
}
.goal-challenging::before {
    content: "\f135"; /* fa-rocket */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 12px;
    color: var(--google-yellow);
    font-size: 1.2rem;
}
.goal-challenging::after {
    content: "挑戦中 🔥";
    margin-left: auto;
    font-size: 0.85rem;
    color: #000;
    background-color: var(--google-yellow);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .goal-list li {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }
    .goal-unachieved::after, .goal-achieved::after, .goal-challenging::after {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
    .goal-unachieved::before, .goal-achieved::before, .goal-challenging::before {
        margin-right: 8px;
        font-size: 1.1rem;
    }
}

/* ==================================
   Buttons
================================== */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn-primary { background-color: var(--google-blue); color: white; }
.btn-primary:hover { background-color: #3367D6; }

.btn-secondary { background-color: var(--card-bg); color: var(--text-main); border: 2px solid #e0e0e0; }
.btn-secondary:hover { background-color: #f5f5f5; }

.btn-note { background-color: var(--google-blue); color: white; padding: 0.6rem 2rem; border-radius: 30px;}
.btn-note:hover { background-color: #3367D6; }


/* ==================================
   5. Hobbies
================================== */
.hobby-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hobby-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hobby-icon {
    width: 40px;
    height: 40px;
    background-color: #E8EAED;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--google-blue);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.hobby-text {
    font-weight: 700;
}
.hobby-text span {
    font-weight: normal;
    font-size: 0.85rem;
    color: var(--text-light);
}

.buran-illustration {
    position: relative;
    text-align: center;
    background-color: #FFFFFF;
    border-radius: 16px;
    padding: 1.5rem;
    border: 2px dashed #DADCE0;
}
.buran-caption {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    font-weight: bold;
}

/* ==================================
   5. Travel Map (Japan Block Map)
================================== */
.map-section {
    background-color: var(--card-bg);
}

.map-container {
    width: 100%;
    overflow-x: auto; /* Allow scrolling on small devices */
    padding: 1rem 0;
}

.japan-map-grid {
    display: grid;
    /* We'll use a 16x16 grid and size each block */
    grid-template-columns: repeat(16, 25px);
    grid-template-rows: repeat(16, 25px);
    gap: 3px;
    width: max-content;
    margin: 0 auto;
}

@media (min-width: 600px) {
    .japan-map-grid {
        grid-template-columns: repeat(16, 35px);
        grid-template-rows: repeat(16, 35px);
        gap: 4px;
    }
}

.pref-block {
    background-color: var(--unvisited-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
    color: #9e9e9e;
    cursor: default;
    transition: var(--transition);
}

.pref-block.visited {
    background-color: var(--visited-color);
    color: #FFFFFF;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.pref-block.visited:hover {
    background-color: var(--visited-hover);
    transform: scale(1.1);
    z-index: 10;
}

/* Specific double size blocks (e.g. Hokkaido, Tokyo) */
.pref-block.hokkaido {
    grid-column: 15 / span 2;
    grid-row: 1 / span 2;
}
.pref-block.okinawa {
    grid-column: 1 / span 2;
    grid-row: 15 / span 2;
}

/* Map Legend */
.map-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    gap: 0.5rem;
    font-weight: bold;
}
.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
}
.legend-color.visited { background-color: var(--visited-color); }
.legend-color.unvisited { background-color: var(--unvisited-color); }

/* ==================================
   Modal
================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    position: relative;
    border-top: 8px solid var(--google-blue);
    animation: slideUp 0.3s;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close-btn:hover { color: #333; }

.modal-title {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    border-bottom: 2px dashed #eee;
    padding-bottom: 0.5rem;
}

.modal-body ul {
    list-style: none;
}
.modal-body li {
    margin-bottom: 0.8rem;
}

/* Article Cards inside Modal */
.article-card-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-main);
    background-color: var(--bg-color);
    border: 1px solid #E8EAED;
    border-radius: 8px;
    padding: 0.5rem;
    transition: var(--transition);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.article-card:hover {
    background-color: #F1F3F4;
    border-color: #DADCE0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.article-thumb {
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    border: 1px solid #E8EAED;
}

.article-thumb-wide {
    width: 100px;
    height: 52px; /* ~1.91:1 */
}

@media (min-width: 480px) {
    .article-thumb-wide {
        width: 130px;
        height: 68px;
    }
}

.article-thumb-square {
    width: 60px;
    height: 60px;
}

@media (min-width: 480px) {
    .article-thumb-square {
        width: 80px;
        height: 80px;
    }
}

.article-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* Prevents flex child from overflowing when text truncates */
}

.article-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    font-size: 0.8rem;
    color: var(--google-blue);
    font-weight: bold;
}

.modal-body a {
    color: var(--google-blue);
    text-decoration: none;
    font-weight: bold;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}
.modal-body a i {
    margin-top: 0.2rem;
}
.modal-body a:hover {
    text-decoration: underline;
}
.dummy-text {
    color: var(--text-light);
    font-style: italic;
    text-align: center;
    padding: 1rem 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0;}
    to { transform: translateY(0); opacity: 1;}
}

/* ==================================
   Mobile Extra Fixes
================================== */
@media (max-width: 600px) {
    .award-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .article-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.8rem;
    }
    .article-thumb-wide, .article-thumb-square {
        width: 100%;
        height: 120px;
    }
    .article-info {
        width: 100%;
    }
}
