:root {
    --bg-color: #ffffff;
    --text-color: #222222;
    --text-secondary: #5D5D5D;
    --link-color: #222222;
    --project-bg: #e2e2e2;
    --badge-active-bg: #E1F5E5;
    --badge-active-text: #008635;
    --badge-inactive-bg: #E6E6E6;
    --badge-inactive-text: #696969;
    --skill-tag-bg: #E1E3F5;
    --skill-tag-text: #0C51D9;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e5e5e5;
    --text-secondary: #a3a3a3;
    --link-color: #e5e5e5;
    --project-bg: #2a2a2a;
    --badge-active-bg: #1a3d2e;
    --badge-active-text: #4ade80;
    --badge-inactive-bg: #2a2a2a;
    --badge-inactive-text: #a3a3a3;
    --skill-tag-bg: #1e2746;
    --skill-tag-text: #93c5fd;
}

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  text-decoration: underline;
  opacity: 0.7;
}

.container {
    max-width: 1030px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

@media (min-width: 768px) {
    .container {
        padding: 3.5rem 3rem;
    }
}

/* Header */
.header {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 3rem;
    }
}

.header-content h1 {
    font-size: 28px;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .header-content h1 {
        font-size: 30px;
    }
}

.header-content h2 {
    font-size: 24px;
    font-weight: 400;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .header-content h2 {
        font-size: 26px;
    }
}

.header-nav {
    display: flex;
    gap: 1.5rem;
    font-size: 14px;
    align-items: center;
}

@media (min-width: 768px) {
    .header-nav {
        gap: 2rem;
    }
}

.header-nav a {
    color: var(--link-color);
    text-decoration: none;
    transition: opacity 0.2s;
}

.header-nav a:hover {
    text-decoration: underline;
    opacity: 0.7;
}

.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-color);
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-family: inherit;
    width: 32px;
    height: 32px;
}

.theme-toggle:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
    opacity: 1;
}

.theme-toggle:active {
    opacity: 0.8;
}

.theme-toggle-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.theme-toggle-moon {
    display: block;
}

.theme-toggle-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle-sun {
    display: block;
}

/* Introduction */
.introduction {
    margin-bottom: 3rem;
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.4;
}

@media (min-width: 768px) {
    .introduction {
        font-size: 22px;
        margin-bottom: 3rem;
    }
}

/* Section Heading */
.section-title {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 1rem;
}

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

@media (min-width: 768px) {
    .projects {
        margin-bottom: 3rem;
    }
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.project-image {
    width: 100%;
    aspect-ratio: 5 / 3;
    border-radius: 6px;
    background-color: var(--project-bg);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.project-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.43;
    margin-bottom: 0.75rem;
    flex-grow: 1;
    transition: color 0.3s ease;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    width: fit-content;
}

.badge-active {
    background-color: var(--badge-active-bg);
    color: var(--badge-active-text);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.badge-inactive {
    background-color: var(--badge-inactive-bg);
    color: var(--badge-inactive-text);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Experiences Section */
.experiences {
    margin-bottom: 4rem;
}

.experience-item {
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .experience-item {
        margin-bottom: 4rem;
    }
}

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

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.experience-header-left {
    flex: 1;
}

.experience-company {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.experience-role {
    font-size: 18px;
    font-weight: 500;
}

.experience-date {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.experience-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.375;
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

@media (min-width: 768px) {
    .experiences {
        margin-bottom: 3rem;
    }
    .experience-description {
        font-size: 18px;
    }
}

/* Highlights Grid */
.highlights-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.highlight-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    padding: 0;
    background-color: transparent;
    border-radius: 8px;
    transition: transform 0.2s ease;
    gap: 1rem;
    opacity: 0;
}

.highlight-card.animate {
    animation: fadeInUp 0.6s ease-out forwards;
}

.highlight-card:nth-child(1).animate {
    animation-delay: 0.1s;
}

.highlight-card:nth-child(2).animate {
    animation-delay: 0.2s;
}

.highlight-card:nth-child(3).animate {
    animation-delay: 0.3s;
}

.highlight-card:nth-child(4).animate {
    animation-delay: 0.4s;
}

.highlight-card:hover {
    transform: translateY(-2px);
}

.highlight-icon {
    width: 32px;
    height: 32px;
    margin: 0;
    color: var(--text-color);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    transition: color 0.3s ease;
    flex-shrink: 0;
    padding-top: 2px;
}

.highlight-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.highlight-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    transition: color 0.3s ease;
}

@media (min-width: 768px) {
    .highlight-text {
        font-size: 14px;
    }
}

.skills-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.skills-label {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: color 0.3s ease;
}

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

.skill-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.75rem;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    background-color: var(--skill-tag-bg);
    color: var(--skill-tag-text);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Footer */
.footer {
    max-width: 1030px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    text-align: left;
}

@media (min-width: 768px) {
    .footer {
        padding: 2rem 3rem 3.5rem;
    }
}

.footer-text {
    font-size: 14px;
    color: #999999;
    margin: 0;
    transition: color 0.3s ease;
}

[data-theme="dark"] .footer-text {
    color: #666666;
}