/* Portfolio Page Styles */

.portfolio-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 40px;
    background: var(--bg-elevated);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.portfolio-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--color-primary);
}

.portfolio-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.portfolio-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.project-card {
    background: var(--bg-surface);
    border-radius: 8px;
    padding: 25px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.project-card.phone-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    grid-template-rows: auto auto 1fr auto;
    column-gap: 20px;
    row-gap: 0;
    grid-template-areas:
        "title title"
        "image description"
        "image tech"
        "highlight highlight";
}

.project-card.phone-layout .project-title {
    grid-area: title;
    margin-bottom: 20px;
}

.project-card.phone-layout .project-screenshot {
    grid-area: image;
    height: 350px;
    align-self: start;
}

.project-card.phone-layout .project-description {
    grid-area: description;
    margin-bottom: 10px;
}

.project-card.phone-layout .project-tech {
    grid-area: tech;
    align-self: start;
    margin-bottom: 0;
}

.project-card.phone-layout .project-highlight {
    grid-area: highlight;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary);
}

.project-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tech-tag {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--link-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.project-link:hover {
    text-decoration: underline;
}

.project-screenshot {
    width: 100%;
    height: 180px;
    background: var(--bg-surface-alt);
    border-radius: 6px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.project-screenshot.no-image {
    display: none;
}

.project-screenshot:hover {
    border-color: var(--color-primary);
}

.project-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    pointer-events: none;
}

.carousel-btn {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    pointer-events: all;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-indicator.active {
    background: rgba(255, 255, 255, 1);
}

.project-screenshot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.project-screenshot-placeholder i {
    font-size: 2rem;
}

.project-info {
    background: var(--highlight-blue-bg);
    border-left: 4px solid var(--highlight-blue-border);
    border-radius: 4px;
    padding: 12px 16px;
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--highlight-blue-text);
    line-height: 1.6;
    white-space: pre-line;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.project-info i {
    color: var(--highlight-blue-border);
    flex-shrink: 0;
    margin-top: 2px;
}

.project-info code {
    background: var(--highlight-blue-code-bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    color: var(--highlight-blue-text);
}

.project-highlight {
    background: var(--highlight-purple-bg);
    border-left: 4px solid var(--highlight-purple-border);
    border-radius: 4px;
    padding: 12px 16px;
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--highlight-purple-text);
    line-height: 1.6;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.project-highlight i {
    color: var(--highlight-purple-border);
    flex-shrink: 0;
    margin-top: 2px;
}

.back-link {
    display: inline-block;
    margin-top: 30px;
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .portfolio-container {
        padding: 30px 20px;
        margin: 20px auto;
    }

    .portfolio-title {
        font-size: 2rem;
    }

    .project-card.phone-layout {
        display: block;
    }

    .project-card.phone-layout .project-screenshot {
        height: 180px;
        margin-bottom: 15px;
    }
}
