/**
 * Portfolio Styles
 * Unified stylesheet for portfolio documentation
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --primary: #1a365d;
    --secondary: #2c5282;
    --accent: #3182ce;
    --success: #27ae60;
    --warning: #d4ac0d;
    --bg: #f7fafc;
    --bg-light: #f5f5f5;
    --text: #2d3748;
    --text-muted: #718096;
    --border: #e2e8f0;
    --code-bg: #1a202c;
    --white: #ffffff;
    --doc-width: 90%;
}

/* ============================================
   Reset & Base
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* ============================================
   Layout
   ============================================ */
.container {
    max-width: var(--doc-width);
    margin: 0 auto;
    padding: 20px;
}

main {
    max-width: var(--doc-width);
    margin: 0 auto;
    padding: 2rem;
}

/* ============================================
   Confidentiality Notice
   ============================================ */
.confidentiality-notice {
    /* max-width: var(--doc-width); */
    background: #fef9e7;
    border-left: 4px solid var(--warning);
    padding: 1rem 2rem;
    font-size: 0.9rem;
    color: #5a5a5a;
    line-height: 1.5;
    margin:auto;
}

.confidentiality-notice strong {
    color: #7d6608;
}

/* ============================================
   Header
   ============================================ */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 3rem 2rem;
    text-align: center;
    /* max-width: var(--doc-width); */
    margin: auto
}

header h1 {
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    font-weight: 300;
}

header .role {
    font-size: 0.95rem;
    opacity: 0.8;
    font-style: italic;
}

.badge-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* ============================================
   Sections
   ============================================ */
section {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0.5, 0.5);
    padding: 2rem;
    margin: auto;
    margin-bottom: 10px;
    max-width: var(--doc-width);
    
}

/* ============================================
   Typography
   ============================================ */
h2 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
}

h3 {
    font-size: 1.15rem;
    color: var(--secondary);
    margin: 1.5rem 0 0.75rem;
}

h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    text-decoration: underline;
}

/* ============================================
   Metrics
   ============================================ */
.metrics-row,
.key-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.metric,
.metric-card {
    text-align: center;
    padding: 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    border-radius: 8px;
}

.metric .value,
.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

.metric .label,
.metric-label {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

/* ============================================
   Technology Stack
   ============================================ */
.tech-stack,
.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-tag {
    background: #e2e8f0;
    color: var(--text);
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: "SF Mono", Monaco, Consolas, monospace;
    border: 1px solid #ddd;
}

/* ============================================
   Cards Grid
   ============================================ */
.overview-grid,
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.overview-card,
.skill-card {
    background: var(--bg);
    padding: 1.25rem;
    border-radius: 6px;
    border-left: 4px solid var(--accent);
}

.overview-card h4,
.skill-card h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.overview-card p,
.skill-card p {
    font-size: 0.9rem;
    color: #4a5568;
    margin: 0;
}

/* ============================================
   Note Boxes
   ============================================ */
.note-box,
.architecture-note {
    background: #ebf8ff;
    border-left: 4px solid var(--accent);
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    border-radius: 0 6px 6px 0;
    font-size: 0.9rem;
}

.architecture-note {
    background: #e8f4fd;
    color: var(--text);
    font-size: 14px;
}

/* ============================================
   Diagrams
   ============================================ */
.diagram-container {
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
}

.architecture-diagram {
    background: var(--code-bg);
    color: #e2e8f0;
    padding: 2rem;
    border-radius: 6px;
    font-family: "SF Mono", Monaco, Consolas, monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    line-height: 1.5;
    margin: 1.25rem 0;
    text-align: center;
}

.mermaid {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    overflow-x: auto;
    font-size: 12px;
}

/* ============================================
   Legend
   ============================================ */
.legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.legend-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #ecf0f1;
    border-radius: 4px;
    font-size: 13px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-right: 10px;
}

/* ============================================
   Lists
   ============================================ */
ul {
    line-height: 1.8;
    margin-left: 20px;
}

li {
    margin: 6px 0;
}

.challenge-list {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
}

.challenge-list li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg);
    border-radius: 4px;
    border-left: 3px solid var(--accent);
    font-size: 0.95rem;
}

/* ============================================
   Related Project Section
   ============================================ */
section.related-project {
    border-left: 4px solid var(--success);
    background: linear-gradient(to right, #f0fdf4, var(--white));
}

section.related-project h2 {
    color: #166534;
    border-bottom-color: var(--success);
}

.related-link {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: var(--success);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.related-link:hover {
    background: #219a52;
    text-decoration: none;
}

/* ============================================
   Footer
   ============================================ */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    header {
        padding: 2rem 1rem;
    }

    header h1 {
        font-size: 1.75rem;
    }

    main,
    .container {
        padding: 1rem;
    }

    section {
        padding: 1.25rem;
    }

    .metrics-row,
    .key-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .overview-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .badge-row {
        gap: 0.5rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
}

@media (max-width: 480px) {

    .metrics-row,
    .key-metrics {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .tech-stack,
    .tech-list {
        gap: 0.4rem;
    }

    .tech-tag {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}