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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #171717;
    background-color: #f9fafb;
}

/* Navigation */
.navbar {
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.nav-brand .nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    text-decoration: none;
    transition: opacity 0.2s;
}

.nav-brand .nav-logo:hover {
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    color: #4b5563;
    transition: all 0.2s;
}

.nav-link:hover {
    color: #2563eb;
    background-color: #f9fafb;
}

.nav-link.active {
    color: #2563eb;
    background-color: #eff6ff;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 4rem);
    background-color: #f9fafb;
}

.container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 4rem;
    padding-top: 3rem;
}

.hero-content {
    margin-bottom: 2rem;
}

.profile-section {
    margin-bottom: 2rem;
}

.profile-image-container {
    width: 10rem;
    height: 10rem;
    border-radius: 50%;
    margin: 0 auto 2rem;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.highlight {
    color: #2563eb;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #4b5563;
    max-width: 42rem;
    margin: 0 auto;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
    border: 1px solid #2563eb;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background-color: #f9fafb;
}

.btn-orange {
    background-color: #ea580c;
    color: white;
    border: 1px solid #ea580c;
}

.btn-orange:hover {
    background-color: #c2410c;
}

.btn-success {
    background-color: #16a34a;
    color: white;
    border: 1px solid #16a34a;
}

.btn-success:hover {
    background-color: #15803d;
}

.btn-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
}

/* Sections */
.about-section,
.contact-section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2rem;
    text-align: center;
}

.about-content,
.contact-content {
    max-width: 48rem;
    margin: 0 auto;
}

.about-text,
.contact-text {
    font-size: 1.125rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.contact-link {
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
}

.contact-link:hover {
    color: #1d4ed8;
}

/* Page Headers */
.page-header {
    text-align: center;
    margin-bottom: 4rem;
    padding-top: 3rem;
}

.page-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.25rem;
    color: #4b5563;
    max-width: 42rem;
    margin: 0 auto;
}

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

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

.project-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.project-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.project-image-container {
    height: 10rem;
    position: relative;
    overflow: hidden;
}

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

.project-content {
    padding: 1rem;
}

.project-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.project-description {
    color: #4b5563;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.project-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.tech-tag {
    padding: 0.25rem 0.5rem;
    background-color: #f3f4f6;
    color: #374151;
    font-size: 0.75rem;
    border-radius: 0.25rem;
}

.project-links {
    display: flex;
    gap: 0.75rem;
}

.project-link {
    color: #2563eb;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.project-link:hover {
    color: #1d4ed8;
}

/* Blog */
.social-section {
    margin-bottom: 3rem;
}

.social-card {
    background: linear-gradient(135deg, #eff6ff 0%, #f3e8ff 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
}

.social-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.social-subtitle {
    color: #4b5563;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.social-btn-orange {
    background-color: #f97316;
}

.social-btn-orange:hover {
    background-color: #ea580c;
}

.social-btn-blue {
    background-color: #3b82f6;
}

.social-btn-blue:hover {
    background-color: #2563eb;
}

.social-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
}

.blog-section {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.blog-header {
    padding: 1rem 1.5rem;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.blog-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.blog-posts {
    border-top: 1px solid #e5e7eb;
}

.blog-post {
    padding: 1rem 1.5rem;
    transition: background-color 0.2s;
}

.blog-post:hover {
    background-color: #f9fafb;
}

/* Blog Post Separator */
.blog-separator {
    border: none;
    height: 1px;
    background-color: #e5e7eb;
    margin: 0;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
}

.post-date {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Blog Post Links and Excerpts */
.post-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.post-link:hover {
    text-decoration: none;
}

.post-excerpt {
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Individual Blog Post Page */
.blog-post-header {
    margin-bottom: 2rem;
}

.back-link {
    display: inline-block;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: #374151;
}

.blog-post-content {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.post-intro {
    font-size: 1.25rem;
    color: #374151;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    font-weight: 500;
}

.blog-post-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 2.5rem 0 1.5rem 0;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.75rem;
}

.blog-post-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 2rem 0 1rem 0;
}

.blog-post-content p {
    color: #374151;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.blog-post-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.blog-post-content li {
    color: #374151;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.blog-post-content strong {
    color: #111827;
    font-weight: 600;
}

.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

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

.tag {
    background-color: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.post-navigation {
    text-align: center;
    margin-top: 2rem;
}

.nav-btn {
    display: inline-block;
    background-color: #3b82f6;
    color: white;
    padding: 10px 20px;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.nav-btn:hover {
    background-color: #2563eb;
}

/* Games */
.games-section {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.games-header {
    padding: 1rem 1.5rem;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.games-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.games-list {
    border-top: 1px solid #e5e7eb;
}

.game-item {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s;
}

.game-item:hover {
    background-color: #f9fafb;
}

.game-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: inherit;
}

.game-thumbnail {
    flex-shrink: 0;
}

.game-image {
    width: 5rem;
    height: 5rem;
    border-radius: 0.5rem;
    object-fit: cover;
}

.game-info {
    flex: 1;
    min-width: 0;
}

.game-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.game-description {
    color: #4b5563;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Game Pages */
.game-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-top: 3rem;
}

.game-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.game-stats,
.control-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
}

/* Rules Section */
.rules-section {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.rules-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 0.75rem;
}

.rules-content {
    color: #1e3a8a;
}

.rules-content p {
    margin-bottom: 0.5rem;
}

/* Game Board */
.game-board-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

/* Queens Puzzle Board - More specific to avoid conflicts */
.game-board-container .queens-board,
#gameBoard.queens-board {
    display: grid !important;
    grid-template-columns: repeat(10, 1fr) !important;
    grid-template-rows: repeat(10, 1fr) !important;
    gap: 0.25rem;
    border: 2px solid #d1d5db;
    background-color: #d1d5db;
    padding: 0.25rem;
    width: fit-content;
    margin: 0 auto;
    /* Force grid behavior */
    grid-auto-flow: row;
    grid-auto-rows: 1fr;
    grid-auto-columns: 1fr;
    /* Additional grid properties */
    align-items: stretch;
    justify-items: stretch;
    /* Ensure proper sizing */
    min-width: 320px;
    min-height: 320px;
}

/* Memory Match Cards */
.memory-card {
    width: 5rem;
    height: 5rem;
    border-radius: 0.5rem;
    border: 2px solid;
    transition: all 0.3s;
    transform: scale(1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.memory-card.flipped,
.memory-card.matched {
    background-color: white;
    border-color: #3b82f6;
    transform: scale(1);
}

.memory-card:not(.flipped):not(.matched) {
    background-color: #3b82f6;
    border-color: #2563eb;
}

.memory-card:not(.flipped):not(.matched):hover {
    background-color: #2563eb;
    transform: scale(1.05);
}

.memory-card.matched {
    opacity: 0.75;
}

.memory-card .card-symbol {
    opacity: 0;
    transition: opacity 0.3s;
}

.memory-card.flipped .card-symbol,
.memory-card.matched .card-symbol {
    opacity: 1;
}

/* Queens Puzzle Cells */
.queens-cell {
    width: 3rem;
    height: 3rem;
    min-width: 3rem;
    min-height: 3rem;
    border: 1px solid #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 700;
    transition: all 0.2s;
    cursor: pointer;
    box-sizing: border-box;
}

.queens-cell:hover {
    opacity: 0.8;
}

.queens-cell.wrong {
    color: #dc2626;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
}

.spinner {
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    width: 4rem;
    height: 4rem;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #6b7280;
}

/* Win Message */
.win-message {
    text-align: center;
    margin-bottom: 2rem;
}

.win-content {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.win-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #166534;
    margin-bottom: 0.5rem;
}

.win-text {
    color: #15803d;
    margin-bottom: 1rem;
}

/* Game Info */
.game-info {
    text-align: center;
}

.info-card {
    background-color: #f9fafb;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.info-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    font-size: 0.875rem;
    color: #4b5563;
}

.info-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .page-title {
        font-size: 1.875rem;
    }
    
    .game-title {
        font-size: 1.875rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .game-stats,
    .control-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .game-board {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .memory-card {
        width: 4rem;
        height: 4rem;
        font-size: 1.25rem;
    }
    
    /* Queens board responsive adjustments handled by main rule */
    
    .queens-cell {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
    
    /* Blog post responsive adjustments */
    .blog-post-content {
        padding: 1.5rem;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    .post-intro {
        font-size: 1rem;
    }
    
    .blog-post-content h2 {
        font-size: 1.25rem;
    }
    
    .blog-post-content h3 {
        font-size: 1.125rem;
    }
    
    .post-tags {
        justify-content: center;
    }
    
    /* Blog post image responsive adjustments */
    /* .blog-post-content img {
        max-width: 90%;
        margin: 1.5rem auto;
    } */
}
