/* MoreProjects page styles */
html {
    font-family: 'Inter', sans-serif;
}

body {
    margin: 0;
    background: #f9fafb;
    color: #111827;
    transition: background-color .25s, color .25s;
}

html.dark body {
    background: #0b1220;
    color: #e6eef8;
}

.mp-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.mp-header {
    position: sticky;
    top: 0;
    background: rgba(249, 250, 251, 0.9);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    z-index: 40;
}

html.dark .mp-header {
    background: rgba(17, 24, 39, 0.85);
    border-color: rgba(255, 255, 255, 0.04);
}

.mp-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.mp-site-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0b1220;
    text-decoration: none;
}

html.dark .mp-site-title {
    color: #ffffff;
}

.mp-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.mp-theme-select {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f3f4f6;
    color: #374151;
}

html.dark .mp-theme-select {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
}

.mp-back {
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #1e3a8a;
    background: transparent;
    border: 1px solid rgba(30, 58, 138, 0.08);
}

html.dark .mp-back {
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.12);
}

.mp-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
}

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

.mp-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(12, 18, 31, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
}

html.dark .mp-card {
    background: #0b1220;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.6);
    border-color: rgba(255, 255, 255, 0.04);
}

.mp-card-media {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.mp-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.mp-card:hover .mp-card-img {
    transform: scale(1.05);
}

.mp-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 40%);
    pointer-events: none;
}

.mp-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.mp-card-title {
    margin: 0;
    font-size: 1.125rem;
    color: #0b1220;
}

html.dark .mp-card-title {
    color: #fff;
}

.mp-card-desc {
    margin: 0;
    color: #475569;
    font-size: .95rem;
}

html.dark .mp-card-desc {
    color: #cbd5e1;
}

.mp-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mp-tag {
    background: rgba(59, 130, 246, 0.08);
    color: #1e3a8a;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .75rem;
}

html.dark .mp-tag {
    background: rgba(99, 102, 241, 0.08);
    color: #93c5fd;
}

.mp-card-footer {
    padding: 14px;
    border-top: 1px solid rgba(15, 23, 42, 0.04);
    display: flex;
    justify-content: flex-end;
}

html.dark .mp-card-footer {
    border-color: rgba(255, 255, 255, 0.04);
}

.mp-btn {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.mp-btn-primary {
    background: #2563eb;
    color: #fff;
}

.mp-btn-primary:hover {
    background: #1e40af;
}

/* Modal styles */
.mp-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
}

.mp-modal.hidden {
    display: none;
}

.mp-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(4px);
}

.mp-modal-panel {
    position: relative;
    width: min(980px, 96%);
    max-height: 90vh;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(#0b1220, #071022);
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.6);
}

.mp-modal-hero {
    position: relative;
    height: 220px;
}

.mp-modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mp-modal-close {
    position: absolute;
    right: 16px;
    top: 16px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    font-size: 20px;
    cursor: pointer;
}

.mp-modal-content {
    padding: 22px 28px;
    color: #e6eef8;
}

.mp-modal-title {
    margin: 0 0 12px;
    font-size: 1.75rem;
    color: #fff;
}

.mp-modal-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.mp-modal-details {
    color: #cbd5e1;
    line-height: 1.6;
}

.mp-modal-links {
    margin-top: 18px;
    display: flex;
    gap: 12px;
}

.mp-modal-links .mp-btn {
    padding: 10px 14px;
    border-radius: 8px;
}

.mp-modal-links .mp-btn-primary {
    background: #2563eb;
    color: #fff;
}

.mp-modal-links .mp-btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #e6eef8;
}

/* Reveal animation (used by main script) */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

/* small utilities */
.mp-container h1 {
    margin-top: 0;
}

/* Resume button in header */
.mp-resume {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #2b5bfb;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border: none;
}

.mp-resume:hover {
    background: #2b5bfb;
}

html.dark .mp-resume {
    background: #2b5bfb;
}

/* Button animation helpers */
.btn-animate {
    transition: transform 160ms cubic-bezier(.2, .8, .2, 1), box-shadow 160ms;
}

.btn-animate:active {
    transform: scale(0.97);
}

.btn-click {
    transform: scale(0.96);
    transition: transform 150ms ease-in-out;
}

.mp-main {
    padding: 40px 0 80px;
}

.mp-page-title {
    font-size: 2rem;
    margin: 0 0 12px;
    color: #0b1220;
}

html.dark .mp-page-title {
    color: #fff;
}

.mp-lead {
    color: #475569;
    margin-bottom: 22px;
}

html.dark .mp-lead {
    color: #cbd5e1;
}

.mp-return-wrap {
    margin-top: 28px;
    text-align: center;
}

.mp-return {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 10px;
    background: #ffffff;
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.12);
    text-decoration: none;
    font-weight: 600;
}

.mp-return:hover {
    background: #f3f4f6;
}

html.dark .mp-return {
    background: #0b1220;
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.12);
}

html.dark .mp-return:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Basic theming to match main site; supports .dark on html */
html {
    font-family: 'Inter', sans-serif;
}

body {
    background: #f9fafb;
    color: #111827;
    transition: background-color .25s, color .25s;
}

html.dark body {
    background: #0b1220;
    color: #e6eef8;
}

.project-card {
    border: 1px solid rgba(15, 23, 42, 0.04);
}

html.dark .project-card {
    border-color: rgba(255, 255, 255, 0.04);
}

/* Button click animation state (class added by JS) */
.btn-click {
    transform: scale(0.96);
    transition: transform 150ms ease-in-out;
}

/* Reuse focus-ring styling */
.focus-ring {
    outline: none;
}

.focus-ring:focus {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

/* Simple hover/active animations for preview buttons */
.btn-animate {
    transition: transform 160ms cubic-bezier(.2, .8, .2, 1), box-shadow 160ms;
}

.btn-animate:active {
    transform: scale(0.97);
}

/* Card subtle entrance animation when reveal class used */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}