/* from common.css */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    background-color: #f4f6f8;
    color: #333;
}

a {
    color: #6481A1;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.mdc-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.mdc-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.logo {
    text-align: center;
    display: table;
    margin: auto;
    padding: 4px;
}

.logo p {
    display: table-cell;
    vertical-align: middle;
    font-size: 24px;
}

.slides {
    margin: 10px;
    text-align: center;
}

.mdc-tab {
    --mdc-theme-primary: #6481A1;
    background-color: #ffffff;
}

.profile-card__primary {
    text-align: center;
}

.profile-card__secondary {
    text-align: left;
}

.profile-card__title {
    font-size: 24px;
    font-weight: bold;
    color: var(--app-dark-text-color);
}

.profile-card__subtitle {
    margin: 8px;
}

.profile-card__secondary {
    margin: 8px;
}

.profile-card__image {
    width: 30%;
}

.androidapp-card__primary {
    text-align: center;
}

.androidapp-card__title {
    font-size: 24px;
    font-weight: bold;
    color: var(--app-dark-text-color);
}

.androidapp-card__secondary {
    text-align: left;
}

.invisible {
    display: none;
}

.hidden {
    visibility: hidden;
}

.sns {
    text-align: right;
}

/* from sp.css - default mobile styles */
.profile-card {
    width: 90%;
    margin: 4px;
    padding: 8px;
    display: inline-block;
    vertical-align: top;
}

.androidapp-card {
    width: 80%;
    margin: 8px;
    padding: 8px;
    display: inline-block;
    vertical-align: top;
}

.androidapp-card__image {
    width: 30%;
}

.androidapp-card__secondary {
    text-align: center;
}

.slide-card {
    width: 80%;
    margin: 12px;
    padding: 16px;
    display: inline-block;
    vertical-align: top;
}

#profile-content,
#android-app-content,
#slides-content {
    text-align: center;
    margin-top: 16px;
}


/* from pc.css - styles for screens wider than 900px */
@media screen and (min-width: 900px) {
    .profile-card {
        width: 70%;
    }

    .androidapp-card {
        width: 48%;
        height: 500px;
    }

    .androidapp-card__image {
        width: 20%;
    }

    .slide-card {
        width: 48%;
        margin: 8px;
        /* overriding sp.css */
    }
}

.top-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding-bottom: 1px;
}

#main {
    padding-top: 16px;
}

/* Timeline styles */
.timeline {
    position: relative;
    padding: 20px 0;
    margin-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px;
    height: 100%;
    width: 4px;
    background: #e9ecef;
}

.timeline-item {
    margin-bottom: 20px;
    position: relative;
}

.timeline-marker {
    position: absolute;
    left: -20px;
    top: 0;
    z-index: 1;
}

.timeline-marker h1 {
    background: #6481A1;
    color: white;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 1em;
    margin: 0;
    width: 120px;
    text-align: center;
}

.timeline-content {
    padding-left: 120px;
}

.timeline-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.timeline-card h2 {
    margin-top: 0;
    font-size: 1.2em;
    color: #333;
}

.timeline-card h2 .fas,
.timeline-card h2 .fab {
    margin-right: 10px;
    color: #6481A1;
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 20px;
    left: -10px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 10px 0;
    border-color: transparent #fff transparent transparent;
}

@media screen and (max-width: 899px) {
    .timeline {
        margin-left: 0;
        padding: 20px 10px;
    }

    .timeline::before {
        display: none;
    }

    .timeline-item {
        margin-bottom: 20px;
    }

    .timeline-marker {
        position: static;
        margin-bottom: 10px;
    }

    .timeline-marker h1 {
        width: auto;
    }

    .timeline-content {
        padding-left: 0;
    }

    .timeline-card::before {
        display: none;
    }
}

/* Skill list styles */
.skill-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    padding: 16px 0;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
}

.skill-item-header {
    display: flex;
    align-items: center;
}

.skill-item-header i {
    font-size: 1.5em;
    color: #6481A1;
    margin-right: 15px;
}

.skill-item-header h4 {
    margin: 0;
    font-size: 1.1em;
    color: #333;
}

.skill-item-body .period {
    margin: 0 0 5px 0;
    color: #666;
    font-size: 0.9em;
}

.skill-item-body .details {
    margin: 0;
    color: #888;
    font-size: 0.8em;
}

/* Theme switcher */
.theme-switcher {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 11;
}

/* Dark theme */
body.dark-theme {
    background-color: #121212;
    color: #e0e0e0;
}

.dark-theme .mdc-card {
    background-color: #1e1e1e;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dark-theme .mdc-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.dark-theme a {
    color: #bb86fc;
}

.dark-theme .top-header {
    background-color: #1e1e1e;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.dark-theme .mdc-tab {
    --mdc-theme-primary: #bb86fc;
    background-color: #1e1e1e;
}

.dark-theme .mdc-tab .mdc-tab__text-label,
.dark-theme .mdc-tab .mdc-tab__icon {
    color: #e0e0e0 !important;
}

.dark-theme .mdc-tab--active .mdc-tab__text-label,
.dark-theme .mdc-tab--active .mdc-tab__icon {
    color: #bb86fc !important;
}

.dark-theme .mdc-tab-indicator__content--underline {
    border-color: #bb86fc;
}

.dark-theme .profile-card__title,
.dark-theme .androidapp-card__title {
    color: #e0e0e0;
}

.dark-theme .timeline-card {
    background: #1e1e1e;
    color: #e0e0e0;
}

.dark-theme .timeline-card h2 {
    color: #e0e0e0;
}

.dark-theme .timeline-card::before {
    border-color: transparent #1e1e1e transparent transparent;
}

.dark-theme .timeline::before {
    background: #333;
}

.dark-theme .skill-item-header h4 {
    color: #e0e0e0;
}

.dark-theme .skill-item-body .period {
    color: #aaa;
}

.dark-theme .skill-item-body .details {
    color: #888;
}

.dark-theme .writing-category h3 {
    color: #e0e0e0;
    border-bottom-color: #333;
}

.dark-theme .writing-item {
    background-color: #2c2c2c;
    border-color: #333;
}

.dark-theme .writing-item a {
    color: #e0e0e0;
}

.dark-theme .writing-item:hover {
    background-color: #383838;
}

.dark-theme .article-card {
    background-color: #2c2c2c;
    border-color: #333;
}

.dark-theme .article-card a {
    color: #e0e0e0;
}

.dark-theme .article-card:hover {
    background-color: #383838;
}

.dark-theme .achievement-card {
    background-color: #1e1e1e;
    border-left-color: #bb86fc;
}

.dark-theme .tech-tag {
    background-color: #333;
    color: #e0e0e0;
}

.dark-theme .tech-tag i {
    color: #aaa;
}

.dark-theme .mdc-icon-button {
    color: #e0e0e0;
}

.dark-theme .logo p {
    color: #e0e0e0;
}

.dark-theme .timeline-marker h1 {
    background: #bb86fc;
    color: #121212;
}

.dark-theme .page_link {
    color: #e0e0e0 !important;
}

.dark-theme .timeline-card h2 .fas,
.dark-theme .timeline-card h2 .fab {
    color: #bb86fc;
}

.dark-theme .skill-item-header i {
    color: #bb86fc;
}

.dark-theme .project-header {
    color: #e0e0e0;
    border-bottom-color: #333;
}

.dark-theme .project-header i {
    color: #bb86fc;
}

/* Writing section styles */
.writing-category {
    margin-bottom: 24px;
}

.writing-category h3 {
    font-size: 1.4em;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
}

.writing-category h3 i {
    margin-right: 10px;
}

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

.writing-item {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.writing-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.writing-item a i {
    color: #868e96;
    margin-left: 10px;
}

.writing-item:hover {
    background-color: #f1f3f5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.writing-item .note {
    list-style: none;
    padding-left: 16px;
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
}

/* Project header styles */
.project-header {
    display: flex;
    align-items: center;
    font-size: 1.1em;
    font-weight: 600;
    color: #343a40;
    margin-top: 20px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #e9ecef;
}

.project-header:first-child {
    margin-top: 0;
}

.project-header i {
    margin-right: 10px;
    color: #6481A1;
}

/* Achievement list styles */
.achievement-list {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
}

.achievement-card {
    background-color: #fff;
    border-left: 4px solid #6481A1;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Article card styles */
.article-list {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}

.article-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.article-card a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.article-card:hover {
    background-color: #f1f3f5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.article-card i {
    color: #868e96;
    margin-left: 10px;
}

/* Tech tag styles */
.tech-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tech-tag {
    display: inline-flex;
    align-items: center;
    background-color: #e9ecef;
    color: #495057;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.tech-tag i {
    margin-right: 6px;
    color: #6c757d;
}

.skill-card small {
    color: #888;
    font-size: 0.8em;
}