/* Solarized Dark Theme Colors */
:root {
    --base03: #002b36;
    --base02: #073642;
    --base01: #586e75;
    --base00: #657b83;
    --base0: #839496;
    --base1: #93a1a1;
    --base2: #eee8d5;
    --base3: #fdf6e3;
    --yellow: #b58900;
    --orange: #cb4b16;
    --red: #dc322f;
    --magenta: #d33682;
    --violet: #6c71c4;
    --blue: #268bd2;
    --cyan: #2aa198;
    --green: #859900;
}

/* Global Styles */
/* Prevent content shift when scrollbar appears */
html {
    overflow-y: scroll; /* Always show scrollbar */
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: var(--base01) var(--base02); /* For Firefox */
  }
  /* Alternatively, if you want a more modern approach with overlay, you can use: */
  /* Note: This only works in Chrome/Edge as of March 2025 */
  @supports (scrollbar-gutter: stable) {
    html {
      scrollbar-gutter: stable; /* Reserve space for scrollbar */
      overflow-y: auto; /* Let the browser decide when to show scrollbar */
    }
  }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--base03);
    color: var(--base0);
    min-height: 100vh;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Preload Iconify */
.iconify-preload {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    z-index: -1;
}

/* Background split */
.background-split {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(to right, var(--base02) 50%, var(--base03) 50%);
}

/* Site wrapper setup */
.site-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Centered container */
.site-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

/* Ensure columns align with background */
.container-fluid, .row {
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-weight: 600;
    color: var(--base1);
}

p, li, blockquote {
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-size: 1.3rem;
    text-align: justify;
}

a {
    color: var(--cyan);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--blue);
}

/* Code blocks */
pre, code {
    font-family: 'Fira Code', monospace;
}

pre {
    padding: 16px;
    background-color: var(--base02);
}

code {
    font-size: 0.75em;
}

/* Two-column layout */
.nav-column {
    background-color: var(--base02);
    height: 100vh;
    padding: 2rem;
    position: sticky;
    top: 0;
    overflow-y: auto;
    z-index: 10;
}

/* Make sure the nav content stays within the sticky container */
.nav-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    padding-bottom: 80px; /* Make room for the copyright */
}

/* Ensure scrollable content when nav gets too tall */
@media (max-height: 700px) {
    .nav-column {
        overflow-y: auto;
    }
    
    .profile-img {
        width: 100px;
        height: 100px;
    }
    
    .nav-column h2 {
        font-size: 1.5rem;
    }
}

.content-column {
    background-color: var(--base03);
    padding: 2rem;
    min-height: 100vh;
    overflow-y: auto;
}

/* Profile picture */
.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
}

/* Social links */
.social-links a {
    font-size: 1.5rem;
    margin: 0 0.5rem;
    color: var(--base1);
}

.social-links a:hover {
    color: var(--cyan);
}

/* Icon placeholders to prevent jittering */
.icon-placeholder {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    position: relative;
    text-align: center;
}

.nav-icon-placeholder {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
    position: relative;
}

/* Navigation */
.nav-link {
    color: var(--base1);
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 5px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    font-weight: 1000;
}

.nav-link:hover, .nav-link.active {
    background-color: var(--base03);
    color: var(--cyan);
}

.nav-icon {
    margin-right: 0.5rem;
    font-size: 1.25rem;
}

/* Mobile Navigation */
.mobile-nav {
    background-color: var(--base02); /* Match the left column color */
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    max-width: 1200px;
}

/* Mobile header styling */
.mobile-header-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0;
}

.mobile-header {
    display: flex;
    width: 100%;
    align-items: center;
    position: relative;
    height: 40px; /* Match the height of the profile picture */
}

.mobile-profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: 1rem;
    z-index: 1;
}

.mobile-name {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    margin: 0 auto;
    font-family: 'Satisfy', cursive;
    font-weight: normal;
    font-size: 2em;
    top: 50%; /* Center vertically */
    transform: translateY(-50%); /* Perfect vertical centering */
    line-height: 1; /* Prevent extra space from line height */
}

.navbar-toggler {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.mobile-nav-wrapper {
    padding-top: 1rem;
}

#navbarToggleContent .nav-link {
    padding: 0.75rem 0.5rem;
}

#navbarToggleContent .flex-column {
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

/* Blog post cards */
.blog-posts {
    margin-bottom: 1.5rem;
}

/* Remove hover effects on post items */
.post-item {
    margin-bottom: 0.75rem;
}

.post-card {
    background-color: var(--base02);
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.post-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.default-post-image {
    width: 100%;
    height: 80px;
    background-color: var(--base03);
    color: var(--base0);
    border-radius: 4px;
}

.post-meta {
    color: var(--base1);
    font-size: 0.8rem;
}

.tag-badge {
    display: inline-block;
    background-color: var(--cyan);
    color: var(--base03);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.3rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

/* Removed tag badge hover effect */

.post-description {
    color: var(--base1);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-size: 0.95rem;
    line-height: 1.4;
}

.read-more {
    color: var(--cyan);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Removed read more hover effect */

.post-stats {
    color: var(--base01);
    font-size: 0.8rem;
}

.reading-time, .post-language, .post-date {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.reading-time .iconify, .post-language .iconify, .post-date .iconify {
    margin-right: 5px;
}

/* Copyright footer styles */
.copyright-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    font-size: 0.75rem;
    color: var(--base01);
    text-align: center;
    margin-top: auto;
    border-top: 1px solid rgba(88, 110, 117, 0.2);
}

.copyright-text {
    margin-bottom: 0.5rem;
}

.made-with {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.made-with a {
    color: var(--base1);
    transition: color 0.2s ease;
}

.made-with a:hover {
    color: var(--cyan);
}

.made-with .iconify {
    font-size: 1.2rem;
}

/* Mobile copyright footer styles */
.mobile-copyright-footer {
    padding: 1rem 0.5rem;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--base01);
    text-align: center;
    border-top: 1px solid rgba(88, 110, 117, 0.2);
}

.mobile-copyright-footer .copyright-text {
    margin-bottom: 0.5rem;
}

.mobile-copyright-footer .made-with {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.mobile-copyright-footer .made-with a {
    color: var(--base1);
}

.mobile-copyright-footer .made-with .iconify {
    font-size: 1.2rem;
}

/* Utility classes */
.text-accent {
    color: var(--cyan);
}

/* Button styles */
.btn-primary {
    background-color: var(--blue);
    border-color: var(--blue);
}

.btn-primary:hover {
    background-color: var(--cyan);
    border-color: var(--cyan);
}

.btn-outline-primary {
    color: var(--blue);
    border-color: var(--blue);
}

.btn-outline-primary:hover {
    background-color: var(--blue);
    color: var(--base03);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .site-container {
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    /* Hide the left background on mobile */
    .background-split {
        background: var(--base03);
    }
    
    .mobile-nav {
        background-color: var(--base02);
    }
    
    .content-column {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .content-column {
        padding: 1rem;
    }
    
    .post-image, .default-post-image {
        height: 60px;
        margin-bottom: 0.5rem;
    }
    
    .post-card {
        padding: 0.75rem !important;
    }
    
    .post-stats {
        margin-top: 0.5rem;
        text-align: left !important;
    }
    
    .reading-time, .post-language, .post-date {
        justify-content: flex-start;
    }
}

/* Responsive adjustments for very small heights */
@media (max-height: 650px) {
    .copyright-footer {
        position: relative;
        margin-top: 1rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--base01);
    }
    
    .nav-content {
        padding-bottom: 0;
    }
}

.content-info {
    font-family: 'Inter',sans-serif;
    font-size: 1rem;
}

.my-3 {
    font-family: 'Satisfy', cursive;
    font-weight: normal;
    font-size: 3em;
}

.mb-1 a {
    color: var(--cyan);
}

/* Archive Page Styles */

/* Search container */
.search-container {
    max-width: 100%;
}

.search-container .input-group {
    overflow: hidden;
}

.search-container .input-group-text {
    color: var(--base1);
    border-color: var(--base01);
}

#article-search {
    color: var(--base1);
    border-color: var(--base01);
}

#article-search::placeholder {
    color: var(--base01);
    opacity: 0.7;
}

#article-search:focus {
    box-shadow: none;
    border-color: var(--base01);
}

/* Article list */
.archive-list {
    margin-bottom: 2rem;
}

.article-list {
    list-style: none;
    padding: 0;
}

/* Article item with fixed icon alignment */
.article-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(88, 110, 117, 0.1);
}

.article-item:last-child {
    border-bottom: none;
}

/* Article info with proper width constraints */
.article-info {
    display: flex;
    align-items: center;
    margin-right: 1rem;
    max-width: calc(100% - 200px); /* Reserve space for meta section */
    flex-shrink: 1; /* Allow this to shrink */
    min-width: 0; /* Required for proper flexbox text truncation */
}

/* Fix icon to prevent it from shrinking */
.article-type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    color: var(--base1);
    width: 1.5rem;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

/* Type-specific icon colors */
.article-type-icon [data-icon="line-md:text-box"] {
    color: var(--cyan);
}

.article-type-icon [data-icon="line-md:external-link"] {
    color: var(--cyan);
}

.article-type-icon [data-icon="line-md:youtube"] {
    color: var(--cyan);
}

.article-type-icon [data-icon="line-md:link"] {
    color: var(--blue);
}

/* Title with truncation */
.article-title {
    color: var(--base1);
    text-decoration: none;
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-size: 1.2rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0; /* Required for text-overflow to work in flexbox */
}

.article-title:hover {
    color: var(--cyan);
}

/* Article meta section with category and date */
.article-meta {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 10px;
}

/* Category styling */
.article-category {
    background-color: var(--base02);
    color: var(--cyan);
    padding: 0 8px; /* Horizontal padding only */
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    display: inline-flex;
    align-items: center; /* Vertically center text */
    height: 1.2rem; /* Fixed height that works with title */
}

/* .article-item[data-type="video"] .article-category {
    background-color: rgba(221, 62, 60, 0.2);
    color: var(--red);
    border-color: var(--red);
} */

/* .article-item[data-type="external"] .article-category {
    background-color: rgba(71, 116, 201, 0.2);
    color: var(--blue);
    border-color: var(--red);
} */

/* Date styling */
.article-date {
    color: var(--base01);
    font-size: 1rem;
    white-space: nowrap;
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    flex-shrink: 0;
}

/* No results message */
#no-results {
    color: var(--base01);
}

#no-results .iconify {
    color: var(--base01);
}

/* Modified Article List Mobile Styles */
@media (max-width: 768px) {
    .article-item {
        position: relative;
        padding: 0.75rem 0;
        display: block;
    }
    
    .article-info {
        width: 100%;
        display: flex;
        align-items: center;
        margin-bottom: 0px;
        padding-right: 100px;
        max-width: 100%;
        position: relative;
    }
    
    .article-meta {
        display: block;
        width: 100%;
    }
    
    .article-category {
        position: absolute;
        right: 0;
        /* Precisely position to align with the title instead of the whole item */
        top: 1.1rem; /* Small adjustment to align with title */
        margin: 0;
    }
    
    .article-date {
        display: block;
        padding-left: 2.25rem;
        font-size: 0.9rem;
        margin-top: 0px;
    }
}

/* CV Page Specific Styles */

/* CV Container */
.cv-container {
    max-width: 900px;
    margin: 0 auto;
}

/* CV Header */
/* .cv-header {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(88, 110, 117, 0.2);
} */

.cv-name {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--cyan);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
}

.cv-position {
    color: var(--base1);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
}

.cv-meta {
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-size: 0.95rem;
}

.cv-meta a {
    display: inline-flex;
    align-items: center;
    color: var(--base1);
    transition: color 0.2s;
}

.cv-meta a:hover {
    color: var(--cyan);
}

.cv-meta .iconify {
    margin-right: 0.4rem;
    font-size: 1.1rem;
}

/* Download Buttons */
.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-cv {
    font-family: 'Inter', sans-serif;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--orange);
    border: 1px solid var(--orange);
    transition: all 0.2s ease;
    width: 100%;
}

.btn-cv:hover {
    background-color: var(--orange);
    color: var(--base03);
}

.btn-cv .iconify {
    margin-right: 0.5rem;
}

.btn-source {
    background-color: var(--base02);
    color: var(--blue);
    border: 1px solid var(--blue);
}

.btn-source:hover {
    background-color: var(--blue);
    color: var(--base03);
}

/* Section Styling */
.cv-section {
    margin-bottom: 3rem;
}

.cv-section-title {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(88, 110, 117, 0.2);
    color: var(--cyan);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
}

.cv-section-title .iconify {
    margin-right: 0.75rem;
    font-size: 1.5rem;
}

/* Languages Styling - Centered */
.languages-compact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center language items */
    gap: 1rem;
    padding: 0.5rem 0;
}

.language-item {
    display: flex;
    align-items: center;
    margin-right: 1.5rem;
    margin-bottom: 0.5rem;
}

.language-name {
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-size: 1.2rem;
    color: var(--base1);
    font-weight: bold;
    display: flex;
    align-items: center;
    margin-right: 0.75rem;
    line-height: 1;
}

.language-level {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    position: relative;
    top: 0px;
}

.language-level.native {
    background-color: var(--cyan);
    color: var(--base03);
    font-weight: bold;
}

.language-level.fluent {
    background-color: var(--blue);
    color: var(--base03);
}

.language-level.basic {
    background-color: var(--blue);
    color: var(--base03);
}

/* Timeline Styling */
.timeline-wrapper {
    display: flex;
    justify-content: flex-start; /* Left-aligned for consistency */
    width: 100%; /* Ensure full width */
}

.timeline {
    position: relative;
    padding-left: 2rem;
    width: 80%; /* Fixed width for all timelines */
    max-width: 650px;
    margin-left: 170px; /* Space for dates on the left */
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px; /* Start from the center of the first dot */
    bottom: 0;
    width: 2px;
    background: rgba(88, 110, 117, 0.2);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--cyan);
    box-shadow: 0 0 0 4px var(--base03);
    z-index: 2;
}

.timeline-date {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--base02);
    color: var(--cyan);
    border: 1px solid var(--cyan);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    position: absolute;
    left: -2rem;
    top: 0.15rem; /* Align with the marker vertically */
    transform: translateX(-100%);
    margin-left: -15px;
    white-space: nowrap;
}

.timeline-content {
    padding-top: 0.25rem; /* Add some top padding to shift content down */
}

.timeline-title {
    margin-bottom: 0.25rem;
    font-size: 1.4rem;
    color: var(--cyan);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-weight: 600;
}

.timeline-subtitle {
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    color: var(--base1);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 500;
}

.timeline-description {
    color: var(--base00);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-size: 1.1rem;
}

/* Thesis section styling - Updated */
.thesis-section {
    background-color: var(--base02);
    border-radius: 6px;
    padding: 1rem;
    position: relative;
    width: 100%;
    max-width: 540px; /* Set appropriate fixed width for desktop */
}

.thesis-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.thesis-info {
    width: 100%;
    padding-right: 0; /* Remove right padding */
    margin-bottom: 1rem; /* Add bottom margin for buttons */
}

.thesis-title {
    color: var(--cyan);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.thesis-name {
    color: var(--base1);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-size: 1rem;
    margin-bottom: 0;
    font-style: italic;
    white-space: normal;
    word-wrap: break-word;
}

.thesis-lab {
    color: var(--base1);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-size: 1rem;
    margin-bottom: 0;
    white-space: normal;
    word-wrap: break-word;
}

.thesis-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
}

/* Role dots on the timeline */
.job-roles {
    position: relative;
    margin-top: 1rem;
}

.job-role-container {
    position: relative;
    display: flex;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.job-role-container:last-child {
    margin-bottom: 0;
}

.role-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--cyan);
    position: absolute;
    left: -2rem;
    top: 0.6rem;
    z-index: 2;
    margin-left: 3.5px;
}

.role-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Job roles and dates styles */
.job-role {
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    color: var(--cyan);
    font-size: 1.1rem;
    font-weight: bold;
}

.job-date {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background-color: var(--base02);
    color: var(--cyan);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    margin-bottom: 0;
    position: absolute;
    left: -2rem;
    top: 0.15rem; /* Match the alignment with timeline-date */
    transform: translateX(-100%);
    margin-left: -15px;
    white-space: nowrap;
    width: fit-content;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    margin-bottom: 1.5rem;
}

.skill-category-title {
    color: var(--base1);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(88, 110, 117, 0.1);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
}

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

.skill-item {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    background-color: var(--base02);
    color: var(--base1);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: background-color 0.2s, color 0.2s;
}

.skill-item .iconify {
    margin-right: 0.4rem;
}

.skill-item:hover {
    background-color: var(--cyan);
    color: var(--base03);
}

/* Certifications Styling */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.certification-item {
    background-color: var(--base02);
    border-radius: 6px;
    padding: 1.25rem;
}

.certification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.certification-title {
    margin: 0;
    font-size: 1.3rem;
    color: var(--base1);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
}

.certification-score {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: var(--cyan);
    color: var(--base03);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-weight: bold;
    font-size: 0.9rem;
}

.certification-meta {
    color: var(--base0);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.certification-issuer {
    color: var(--base00);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 0.25rem;
}

.certification-date-pill {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background-color: var(--base03);
    color: var(--cyan);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    /* Center CV header info on mobile */
    .cv-header-info {
        text-align: center;
        width: 100%;
    }

    .cv-header-info p {
        text-align: center;
        width: 100%;
    }
    
    .cv-meta {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .cv-meta a {
        margin-right: 0 !important;
    }
    
    /* Center mb-4 heading for all pages on mobile */
    .mb-4 {
        text-align: center;
    }
    
    .cv-name {
        font-size: 2rem;
    }
    
    .cv-actions {
        width: 100%;
    }
    
    .download-buttons {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .btn-cv {
        flex: 1;
        max-width: 180px;
    }
    
    .skills-grid, .certifications-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Timeline adjustments for mobile */
    .timeline-wrapper {
        justify-content: flex-start;
    }
    
    .timeline {
        max-width: 100%;
        margin-left: 0;
        padding-left: 1.5rem;
        width: 100%;
    }
    
    .timeline-marker {
        left: -1.5rem;
    }
    
    .timeline-date {
        position: relative; /* Changed from absolute to relative */
        left: auto;
        top: -4px;
        transform: none;
        margin-left: 0;
        margin-bottom: 0.5rem;
        display: inline-block;
    }

    .job-date {
        position: relative; /* Changed from absolute to relative */
        left: auto;
        top: auto;
        transform: none;
        margin-left: 0;
        margin-bottom: 0.3rem;
        display: inline-block;
    }
    
    .role-dot {
        left: -1.5rem;
    }
    
    /* For small screens with constrained width, reposition role dates */
    @media (max-width: 500px) {
        .timeline-date, .job-date {
            position: static;
            transform: none;
            margin-left: 0;
            margin-bottom: 0.5rem;
            display: inline-block;
            width: fit-content;
        }
        
        /* Move dates above roles on very small screens */
        .role-content {
            display: flex;
            flex-direction: column;
        }
    }
    
    /* Thesis section responsive adjustments */
    .thesis-section {
        max-width: 100%;
        padding: 0.75rem;
    }

    .thesis-buttons {
        justify-content: center;
    }

    .thesis-buttons .btn-cv {
        flex: 1;
        max-width: 100%;
    }
}

/* Job Cards Styling */
.job-cards-container {
    display: flex;
    flex-direction: column;
}

.job-card {
    background-color: var(--base02);
    border-radius: 6px;
    padding: 1.25rem;
    max-width: 540px;
    margin-top: 1rem;
}

.job-card-header {
    margin-bottom: 0.75rem;
}

.job-card-title {
    color: var(--cyan);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.job-card-description {
    color: var(--base1);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    text-align: left;
}

.job-card-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background-color: var(--base03);
    color: var(--base1);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    transition: background-color 0.2s, color 0.2s;
}

.tech-tag .iconify {
    margin-right: 0.4rem;
    font-size: 1rem;
}

.tech-tag:hover {
    background-color: var(--cyan);
    color: var(--base03);
}

/* Responsive adjustments for job cards */
@media (max-width: 768px) {
    .job-card {
        max-width: 100%;
        padding: 1rem;
    }
    
    .job-card-title {
        font-size: 1rem;
    }
    
    .job-card-description {
        font-size: 0.95rem;
    }
    
    .tech-tag {
        font-size: 0.75rem;
    }
}




















/* Projects Page Specific Styles - Updated */

/* Projects Container */
.projects-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Projects Section */
.projects-section {
    margin-bottom: 3rem;
}

.projects-section-title {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(88, 110, 117, 0.2);
    color: var(--cyan);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
}

.projects-section-title .iconify {
    margin-right: 0.75rem;
    font-size: 1.5rem;
}

/* Coming Soon Section */
.coming-soon-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background-color: var(--base02);
    border-radius: 6px;
}

.coming-soon-message {
    display: flex;
    align-items: center;
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-size: 1.5rem;
    color: var(--base1);
}

.warning-icon {
    font-size: 2rem;
    color: var(--orange);
    margin-right: 1rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

/* Project Card */
.project-card {
    background-color: var(--base02);
    border-radius: 6px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 320px;
}

.project-card-header {
    margin-bottom: 1rem;
}

/* New wrapper for category and year to keep them together */
.project-header-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.project-year-pill, .project-category {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    background-color: var(--base03);
    color: var(--cyan);
    border: 1px solid var(--cyan);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-category .iconify {
    margin-right: 0.4rem;
    font-size: 1rem;
}

.project-card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
    color: var(--cyan);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-weight: 600;
}

.project-description {
    color: var(--base1);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.2rem; /* Ensure consistent height with 3 lines */
}

.project-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    margin-top: auto;
}

.tech-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background-color: var(--base03);
    color: var(--base1);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    transition: background-color 0.2s, color 0.2s;
}

.tech-tag .iconify {
    margin-right: 0.4rem;
    font-size: 1rem;
}

.tech-tag:hover {
    background-color: var(--cyan);
    color: var(--base03);
}

/* Project links styling */
.project-links {
    margin-top: auto;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-project {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background-color: transparent;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-github {
    color: var(--blue);
    border: 1px solid var(--blue);
}

.btn-github:hover {
    background-color: var(--blue);
    color: var(--base03);
}

.btn-website {
    color: var(--cyan);
    border: 1px solid var(--cyan);
}

.btn-website:hover {
    background-color: var(--cyan);
    color: var(--base03);
}

.btn-project .iconify {
    margin-right: 0.5rem;
}

/* Design Grid - updated for fixed number of items per row */
.design-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Exactly 3 items per row on desktop */
    gap: 1.5rem;
}

/* Design Item */
.design-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background-color: var(--base02);
}

.design-image {
    width: 100%;
    height: 100%;
}

.design-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Updated overlay to scale content based on screen size */
.design-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 43, 54, 0.9); /* base03 with opacity */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1.25rem;
    overflow: hidden; /* Prevent scrollbar */
}

.design-overlay-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.design-item:hover .design-image img {
    transform: scale(1.05);
}

.design-item:hover .design-overlay {
    opacity: 1;
}

.design-title {
    color: var(--cyan);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-size: 1rem; /* Reduced size for desktop */
    margin-bottom: 0.3rem; /* Reduced spacing */
    text-align: center;
}

.design-description {
    color: var(--base1);
    font-family: 'Crimson Text', 'Noto Serif JP', serif;
    font-size: 0.85rem; /* Reduced size for desktop */
    line-height: 1.3;
    margin-bottom: 0.6rem; /* Reduced spacing */
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 3.9rem; /* ~3 lines of text */
}

.design-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem; /* Reduced gap */
    margin-bottom: 0.5rem; /* Reduced spacing */
    justify-content: center;
}

.design-technologies .tech-tag {
    font-size: 0.7rem; /* Smaller tech tags */
    padding: 0.15rem 0.4rem; /* Smaller padding */
}

.btn-design {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.6rem; /* Smaller button */
    background-color: transparent;
    color: var(--cyan);
    border: 1px solid var(--cyan);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem; /* Smaller font */
    font-weight: 500;
    transition: all 0.2s ease;
    margin-top: 0.3rem;
}

.btn-design:hover {
    background-color: var(--cyan);
    color: var(--base03);
}

.btn-design .iconify {
    margin-right: 0.3rem;
    font-size: 0.9rem; /* Smaller icon */
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .design-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 items per row on tablet */
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .design-grid {
        grid-template-columns: repeat(2, 1fr); /* Keep 2 items per row on mobile */
    }
    
    .project-title {
        font-size: 1.2rem;
    }
    
    .project-description {
        font-size: 1rem;
        margin-bottom: 1rem; /* Reduced spacing on mobile */
        min-height: auto; /* Allow variable height on mobile */
    }
    
    .project-card {
        min-height: auto; /* Allow variable height on mobile */
        padding: 1.25rem;
    }
    
    /* Keep header meta items together on mobile */
    .project-header-meta {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .project-technologies {
        margin-bottom: 1rem; /* Reduced spacing on mobile */
    }
    
    /* Increase design overlay content size for mobile */
    .design-overlay {
        padding: 0.75rem;
    }
    
    .design-title {
        font-size: 1.1rem;
        margin-bottom: 0.4rem;
    }
    
    .design-description {
        font-size: 0.9rem;
        line-height: 1.3;
        margin-bottom: 0.7rem;
        line-clamp: 4;
        -webkit-line-clamp: 4; /* Allow one more line on mobile */
        max-height: 4.8rem;
    }
    
    .design-technologies .tech-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
    
    .btn-design {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }
}