/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4da6ff;
    --primary-hover: #3399ff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --text-color: #2c3e50;
    --text-light: #6c757d;
    --bg-color: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --border-color: #dee2e6;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.16);
    --max-width: 1400px;
    --border-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-size: 16px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Navigation */
.site-nav {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.site-logo:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-menu a {
    padding: 0.5rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    font-weight: 500;
}

.nav-menu a:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

.nav-menu a.active {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 1rem;
    right: 1rem;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Page Headers */
.page-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-color) 100%);
    border-radius: var(--border-radius);
}

.page-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    color: var(--text-light);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Hero Section */
.hero {
    padding: 5rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-color) 100%);
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-description {
    max-width: 700px;
    margin: 0 auto 2rem;
    color: var(--text-light);
    font-size: 1.125rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.hero-contact-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.hero-contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.hero-contact-card .contact-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.hero-contact-card .contact-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    object-fit: contain;
}

.hero-contact-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.hero-contact-card p {
    color: var(--text-light);
    margin-bottom: 0;
    font-size: 0.875rem;
}

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

@media (max-width: 480px) {
    .hero-contact-grid {
        grid-template-columns: 1fr;
    }
}

/* Buttons */
.btn {
    padding: 0.875rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    border: 2px solid transparent;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Cards and Grids */
.highlights {
    margin-bottom: 4rem;
}

.highlights h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--text-color);
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* 2-column grids for awards and certifications */
.awards-grid,
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

/* 3-column grid for experiences */
.experiences-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 1024px) {
    .awards-grid,
    .experiences-list,
    .certifications-grid {
        grid-template-columns: 1fr;
    }
}

.highlight-card {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.highlight-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.highlight-card h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.highlight-card ul {
    list-style: none;
    padding: 0;
}

.highlight-card li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.highlight-card li:last-child {
    border-bottom: none;
}

.highlight-card .date {
    font-size: 0.875rem;
    color: var(--text-light);
}

.view-all {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
}

.view-all:hover {
    transform: translateX(4px);
}

.project-card,
.award-card,
.experience-card,
.certification-card {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.project-card:hover,
.award-card:hover,
.experience-card:hover,
.certification-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

/* Overlay-style project cards */
.project-card--overlay {
    position: relative;
    display: block;
    padding: 0;
    height: 320px;
}

.project-card--overlay .project-card__link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.project-card__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card__top {
    position: absolute;
    left: 0; right: 0; top: 0;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    color: #fff;
    background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.0) 100%);
}

.project-card__top .project-title { color: #fff; margin: 0 0 0.15rem 0; }
.project-card__top .project-subtitle { color: #e5e7eb; margin: 0; font-size: 0.95rem; }

.project-card__badges {
    position: absolute;
    left: 1rem; right: 1rem;
    bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.project-card__badges .lang-tag,
.project-card__badges .field-tag,
.project-card__badges .tech-tag { background: #000; color: #fff; border: 1px solid #000; }

/* Keep project badges opaque black on hover as well */
.project-card__badges .lang-tag:hover,
.project-card__badges .field-tag:hover,
.project-card__badges .tech-tag:hover { background: #000; color: #fff; border-color: #000; transform: none; }

.project-card__bottom {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.25) 100%);
}

.project-card__bottom .project-description { color: #e5e7eb; margin: 0; }

.project-card__bottom-right { display: flex; gap: 0.5rem; align-items: center; }

.date-badge {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    white-space: nowrap;
}

/* Light variant for date in header (outside the image) */
.date-badge--light {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-weight: 400;
    font-size: 0.85rem;
    padding: 0;
    border-radius: 0;
}

.project-card__hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.2px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.project-card--overlay:hover .project-card__top,
.project-card--overlay:hover .project-card__bottom,
.project-card--overlay:hover .project-card__badges { opacity: 0; }
.project-card--overlay:hover .project-card__hover { opacity: 1; }
.project-card--overlay:hover .project-card__image { transform: scale(1.06); }

/* Stacked project card: header above, footer below, image center */
.project-card--stacked { padding: 0; position: relative; }
.project-card--stacked .project-card__header,
.project-card--stacked .project-card__footer {
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
}
.project-card--stacked .project-card__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.project-card--stacked .project-card__header .header-right { margin-left: auto; }
.project-card--stacked .project-card__header .project-title { margin: 0; }
.project-card--stacked .project-card__header .project-subtitle { margin: 0.15rem 0 0 0; color: var(--primary-color); min-height: 1.2em; }
.project-card--stacked .project-card__image-wrap { position: relative; height: 320px; }
.project-card--stacked .project-card__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.project-card--stacked .project-card__hover { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; opacity: 0; transition: opacity 0.25s ease; }
.project-card--stacked:hover .project-card__hover { opacity: 1; }
.project-card--stacked:hover .project-card__image { transform: scale(1.06); }
.project-card--stacked .project-card__footer { display: flex; align-items: center; justify-content: space-between; padding-bottom: 2.25rem; }
.project-card--stacked .project-card__footer .project-description {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.project-card--stacked:hover .project-card__footer { padding-bottom: 2.75rem; }
.project-card--stacked:hover .project-card__footer .project-description {
    -webkit-line-clamp: unset;
    display: block;
}
.project-card--stacked .footer-right { display: flex; gap: 0.5rem; align-items: center; }

/* Fixed status badge in the very bottom-right corner */
.project-status--fixed {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
}

@media (max-width: 768px) {
    .project-card--overlay { height: 220px; }
    .project-card--stacked .project-card__image-wrap { height: 220px; }
}

/* Project Specific */
.thumbnail-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    width: 100%;
    height: 320px;
    display: block;
    background-color: #000;
}

.project-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
    transition: var(--transition);
}

.award-thumbnail,
.exp-thumbnail,
.cert-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
    transition: var(--transition);
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.thumbnail-container:hover .thumbnail-overlay {
    opacity: 1;
}

.overlay-text {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
    padding: 1rem;
}

.project-card:hover .project-thumbnail,
.award-card:hover .award-thumbnail,
.experience-card:hover .exp-thumbnail,
.certification-card:hover .cert-thumbnail {
    transform: scale(1.05);
}

/* Container heights for different layouts */
.projects-grid .thumbnail-container {
    height: 320px;
}

.awards-grid .thumbnail-container,
.experiences-grid .thumbnail-container,
.certifications-grid .thumbnail-container {
    height: 260px;
}

.project-content,
.award-content,
.exp-content,
.cert-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-title,
.award-title,
.exp-title,
.cert-title {
    font-size: 1.375rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.project-title a,
.award-title a,
.exp-title a,
.cert-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.project-title a:hover,
.award-title a:hover,
.exp-title a:hover,
.cert-title a:hover {
    color: var(--primary-color);
}

.project-subtitle,
.award-subtitle,
.exp-subtitle {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-description,
.award-description,
.exp-description,
.cert-description {
    color: var(--text-light);
    line-height: 1.6;
    flex-grow: 1;
}

.project-meta {
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}

.award-meta,
.exp-meta,
.cert-meta {
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}

.project-date {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.project-status {
    margin-left: auto;
}

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

.project-association {
    font-size: 0.75rem;
    color: var(--text-light);
    font-style: italic;
    background: var(--bg-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
    margin-left: 1rem;
}

/* Tags */
.skill-tags,
.project-tags,
.project-languages,
.project-tech,
.exp-roles,
.exp-industries {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
    align-items: center;
}

.skill-tag,
.lang-tag,
.tech-tag,
.field-tag,
.role-tag,
.industry-tag,
.language-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--transition);
}

.lang-tag:hover,
.tech-tag:hover,
.field-tag:hover,
.role-tag:hover,
.industry-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Skills Grid */
.skills {
    background: var(--bg-secondary);
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
}

.skills h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-category {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.skill-category h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Footer */
.site-footer {
    background: var(--bg-secondary);
    color: var(--text-color);
    margin-top: 5rem;
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    margin: 0;
    color: var(--text-color);
}

.social-links {
    display: flex;
    gap: 2rem;
}

.social-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.social-links a:hover {
    color: white;
    transform: translateY(-2px);
}

/* Contact Form */
.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-intro {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin: 3rem 0;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.contact-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.contact-card .contact-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.contact-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    object-fit: contain;
}

.contact-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-card p {
    color: var(--text-light);
    margin-bottom: 0;
}

.contact-link {
    color: var(--primary-color);
    font-weight: 600;
    word-break: break-word;
}

@media (max-width: 600px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-form-section {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
}

.contact-form {
    max-width: 600px;
    margin: 2rem auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-color);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-note {
    text-align: center;
    color: var(--text-light);
    margin-top: 1rem;
}

.resume-section {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-radius: var(--border-radius);
}

/* Filter Buttons */
.projects-filter {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.625rem 1.25rem;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Status Badges */
.project-status {
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-finished {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-completed {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.status-in-progress {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.status-planned {
    background: rgba(0, 102, 204, 0.1);
    color: var(--primary-color);
}

/* Year sections for awards */
.year-section {
    margin-bottom: 4rem;
}

.year-header {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

/* Experience sections */
.experience-section {
    margin-bottom: 4rem;
}

.experience-section h2 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.exp-duration,
.award-date,
.cert-date {
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 600;
}

.award-placement {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-color);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
        gap: 0.5rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a.active::after {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .highlights-grid,
    /* Keep two columns for projects on small screens when possible */
    .awards-grid,
    .experiences-grid,
    .certifications-grid,
    .gallery-grid { grid-template-columns: 1fr; }

    /* Two-column layout for projects on narrow viewports */
    .projects-grid { grid-template-columns: repeat(2, 1fr); }

    .main-content {
        padding: 2rem 1rem;
    }

    .page-title {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .contact-form-section {
        padding: 2rem 1rem;
    }

    /* Reduce fixed thumbnail heights on small screens */
    .thumbnail-container { height: 220px; }

    /* About section: stack with image below text */
    .about-section .about-item { flex-direction: column; align-items: flex-start; }
    .about-section .about-item img { order: 2; width: 100%; max-width: 420px; align-self: center; }
    .about-section .about-item > div { order: 1; width: 100%; }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e9ecef;
        --text-light: #adb5bd;
        --bg-color: #1a1a1a;
        --bg-secondary: #2d2d2d;
        --bg-tertiary: #3a3a3a;
        --border-color: #404040;
    }

    .site-nav {
        background: rgba(26, 26, 26, 0.95);
    }

    .highlight-card,
    .project-card,
    .award-card,
    .experience-card,
    .certification-card,
    .contact-card,
    .skill-category {
        background: var(--bg-secondary);
    }

    .form-group input,
    .form-group textarea {
        background: var(--bg-secondary);
        color: var(--text-color);
    }
}

/* Detail Page Styles */
.detail-thumbnail-container {
    margin: 2rem 0;
    text-align: center;
}

.detail-thumbnail {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.detail-content {
    margin: 2rem 0;
    font-size: 1.125rem;
    line-height: 1.8;
}

.detail-content h1,
.detail-content h2,
.detail-content h3,
.detail-content h4,
.detail-content h5,
.detail-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.detail-content p {
    margin-bottom: 1.5rem;
}

.detail-content ul,
.detail-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.detail-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: var(--border-radius);
}

.detail-gallery {
    margin-top: 3rem;
}

.detail-gallery h2 {
    margin-bottom: 2rem;
    color: var(--text-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.gallery-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* Explore Section */
.explore-section {
    padding: 3rem 2rem;
    margin: 3rem auto;
    max-width: var(--max-width);
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.explore-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid var(--border-color);
}

.explore-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.explore-count {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.explore-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.explore-description {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
}

@media (max-width: 1024px) {
    .explore-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .explore-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    /* On very small phones, allow projects to stack */
    .projects-grid { grid-template-columns: 1fr; }
}

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

@media (max-width: 480px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}
