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

:root {
    --primary-color: #0969da;
    --secondary-color: #0550ae;
    --success-color: #1a7f37;
    --warning-color: #9a6700;
    --danger-color: #cf222e;
    --text-primary: #24292f;
    --text-secondary: #57606a;
    --bg-light: #f6f8fa;
    --bg-white: #ffffff;
    --border-color: #d0d7de;
    --border-muted: #d8dee4;
    --accent-subtle: #ddf4ff;
    --shadow-sm: 0 1px 0 rgba(27, 31, 36, 0.04);
    --shadow-md: 0 3px 6px rgba(140, 149, 159, 0.15);
}

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

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

/* Header */
header {
    background: var(--bg-white);
    color: var(--text-primary);
    padding: 48px 20px 32px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 4px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

header .subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 900px;
    margin: 0 auto 20px;
    line-height: 1.3;
    font-weight: 400;
    font-style: italic;
}

header .byline {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

/* Navigation */
.sticky-nav {
    position: sticky;
    top: 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.sticky-nav .container {
    position: relative;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    color: var(--text-primary);
}

.hamburger {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: background 0.2s;
}

.hamburger::before,
.hamburger::after {
    content: "";
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    position: absolute;
    transition: transform 0.2s;
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    top: 6px;
}

.mobile-menu-toggle.active .hamburger {
    background: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    transform: rotate(45deg) translateY(6px);
}

.mobile-menu-toggle.active .hamburger::after {
    transform: rotate(-45deg) translateY(-6px);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
    justify-content: flex-start;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 12px 16px;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    font-weight: 400;
    font-size: 0.875rem;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--text-primary);
    border-bottom-color: var(--border-muted);
}

.nav-links a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 500;
}

/* Main Content */
main {
    background: white;
    margin: 0 auto;
    padding: 32px 20px;
    max-width: 1200px;
}

.content-section {
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.content-section:last-child {
    border-bottom: none;
}

h2 {
    font-size: 2.25rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
}

h3 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin: 30px 0 15px;
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 20px 0 10px;
    font-weight: 600;
}

p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: var(--text-primary);
}

ul, ol {
    margin-left: 25px;
    margin-bottom: 20px;
}

li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* Highlight Boxes */
.highlight-box {
    background: var(--accent-subtle);
    border: 1px solid #54aeff;
    border-left: 3px solid var(--primary-color);
    padding: 16px;
    border-radius: 6px;
    margin: 20px 0;
}

.highlight-box h3 {
    margin-top: 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.highlight-box ul {
    margin-bottom: 0;
}

/* Intro Note */
.intro-note {
    background: var(--bg-light);
    border-left: 3px solid var(--text-secondary);
    padding: 20px 24px;
    border-radius: 6px;
    margin: 24px 0 32px;
}

.intro-note p {
    font-style: italic;
    color: var(--text-secondary);
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

/* Info, Warning, and Success Boxes */
.info-box {
    background: #ddf4ff;
    border: 1px solid #54aeff;
    border-left: 3px solid var(--primary-color);
    padding: 16px;
    border-radius: 6px;
    margin: 20px 0;
}

.warning-box {
    background: #fff8c5;
    border: 1px solid #d4a72c;
    border-left: 3px solid var(--warning-color);
    padding: 16px;
    border-radius: 6px;
    margin: 20px 0;
}

.warning-box h3 {
    color: var(--text-primary);
    margin-top: 0;
    font-size: 1rem;
    font-weight: 600;
}

.success {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border-muted);
    padding: 10px 12px;
    border-radius: 6px;
    margin-top: 12px;
    font-weight: 500;
}

.warning {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border-muted);
    padding: 10px 12px;
    border-radius: 6px;
    margin-top: 12px;
    font-weight: 500;
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.comparison-item {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 16px;
}

.comparison-item h4 {
    color: var(--text-primary);
    margin-top: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.comparison-item p {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Priority List */
.priority-list {
    margin: 24px 0;
}

.priority-item {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
    border-left-width: 3px;
}

.priority-item.critical {
    border-left-color: var(--danger-color);
    background: #ffebe9;
}

.priority-item.high {
    border-left-color: #fb8500;
    background: #fff8c5;
}

.priority-item.medium {
    border-left-color: var(--primary-color);
    background: #ddf4ff;
}

.priority-item h4 {
    margin-top: 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

/* Structured List */
.structured-list {
    counter-reset: item;
    list-style: none;
    margin-left: 0;
}

.structured-list > li {
    counter-increment: item;
    margin-bottom: 25px;
    padding-left: 0;
}

.structured-list > li::before {
    content: counter(item);
    background: var(--primary-color);
    color: white;
    font-weight: bold;
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    margin-right: 15px;
}

.structured-list > li > strong {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.structured-list ul {
    margin-top: 10px;
}

/* Checklist */
.checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.check-item {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.check-item h4 {
    color: var(--primary-color);
    margin-top: 0;
}

/* Scope Section */
.scope-section {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid var(--primary-color);
}

.scope-section h4 {
    color: var(--primary-color);
    margin-top: 0;
}

/* Responsibility Grid */
.responsibility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.responsibility-item {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
}

.responsibility-item h4 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 1.25rem;
}

.responsibility-item p {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Answer Box */
.answer-box {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 3px solid var(--danger-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin: 25px 0;
}

.answer-box .large-text {
    font-size: 1.75rem;
    color: var(--danger-color);
    margin: 0;
}

/* Pitfall List */
.pitfall-list {
    margin: 30px 0;
}

.pitfall-item {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
}

.pitfall-item h3 {
    color: var(--danger-color);
    margin-top: 0;
    font-size: 1.35rem;
}

.pitfall-item .wrong {
    color: var(--danger-color);
    font-weight: 600;
    padding: 10px 15px;
    background: #fee2e2;
    border-radius: 6px;
    margin: 10px 0;
}

.pitfall-item .wrong::before {
    content: "✗ ";
    font-weight: bold;
}

.pitfall-item .correct {
    color: var(--success-color);
    font-weight: 600;
    padding: 10px 15px;
    background: #d1fae5;
    border-radius: 6px;
    margin: 10px 0;
}

.pitfall-item .correct::before {
    content: "✓ ";
    font-weight: bold;
}

/* Note */
.note {
    background: #ddf4ff;
    border: 1px solid #54aeff;
    border-left: 3px solid #0969da;
    padding: 12px;
    border-radius: 6px;
    margin: 16px 0;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

/* Summary Section */
.summary-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 40px;
    border-radius: 12px;
    border: 2px solid var(--success-color);
}

.summary-section h2 {
    color: var(--success-color);
}

.checklist-summary {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: var(--shadow-md);
}

.check-list {
    list-style: none;
    margin-left: 0;
}

.check-list li {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: var(--bg-light);
    border-radius: 6px;
    border-left: 4px solid var(--success-color);
    transition: transform 0.2s;
}

.check-list li:hover {
    transform: translateX(5px);
    background: #f0fdf4;
}

.check-list li::before {
    content: "✓";
    color: var(--success-color);
    font-weight: bold;
    margin-right: 12px;
    font-size: 1.2rem;
}

.remember-box {
    background: #eff6ff;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 25px;
    margin-top: 25px;
}

.remember-box h3 {
    color: var(--primary-color);
    margin-top: 0;
}

/* Exception Examples */
.exception-examples {
    margin: 30px 0;
}

.exception-item {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.exception-item.low-severity {
    border-left-width: 6px;
    border-left-color: #10b981;
    background: #f0fdf4;
}

.exception-item.medium-severity {
    border-left-width: 6px;
    border-left-color: var(--warning-color);
    background: #fffbeb;
}

.exception-item.high-severity {
    border-left-width: 6px;
    border-left-color: #f59e0b;
    background: #fef3c7;
}

.exception-item.critical-severity {
    border-left-width: 6px;
    border-left-color: var(--danger-color);
    background: #fef2f2;
}

.exception-item h4 {
    margin-top: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.exception-title,
.exception-desc,
.mgmt-response {
    margin: 15px 0;
    padding: 12px;
    border-radius: 6px;
    background: white;
}

.evaluation {
    margin-top: 20px;
    padding: 15px;
    background: #eff6ff;
    border-left: 4px solid var(--primary-color);
    border-radius: 6px;
}

.evaluation strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 10px;
}

/* Framework Comparison */
.framework-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.framework-item {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.framework-item h4 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 1.4rem;
}

.framework-type {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Vendor Questions */
.question-category {
    margin: 25px 0;
}

.vendor-questions-list {
    list-style: none;
    margin-left: 0;
}

.vendor-questions-list li {
    padding: 12px 15px;
    margin-bottom: 8px;
    background: var(--bg-light);
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
    transition: background 0.2s;
}

.vendor-questions-list li:hover {
    background: #e0f2fe;
}

.vendor-questions-list li::before {
    content: "?";
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 10px;
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background: white;
    border-radius: 50%;
    font-size: 0.9rem;
}

/* Timeline and Cost */
.timeline-section,
.cost-breakdown {
    margin: 30px 0;
}

.timeline-item,
.cost-item {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

.timeline-item h4,
.cost-item h4 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 1.25rem;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 15px;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 32px auto;
    padding: 32px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.contact-intro {
    max-width: 600px;
    margin: 0 auto 24px auto;
    text-align: center;
}

.contact-intro p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.contact-footer {
    max-width: 600px;
    margin: 32px auto 0 auto;
    text-align: center;
}

.contact-footer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.linkedin-link,
.linkedin-link:visited {
    color: #0a66c2;
}

.linkedin-link:hover {
    color: #004182;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-white);
    transition: border-color 0.15s;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.submit-button:hover {
    background: var(--secondary-color);
}

.submit-button:active {
    transform: translateY(1px);
}

.hidden {
    display: none;
}

/* Resources Section */
.resource-list {
    margin-top: 24px;
}

.resource-item {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.resource-item h4 {
    margin: 0 0 8px 0;
    font-size: 1.0625rem;
    font-weight: 600;
}

.resource-item h4 a {
    color: var(--primary-color);
    text-decoration: none;
}

.resource-item h4 a:hover {
    text-decoration: underline;
}

.resource-author {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0 0 8px 0;
    font-style: italic;
}

.resource-use {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
}

/* Footer */
footer {
    background: var(--bg-light);
    color: var(--text-secondary);
    padding: 48px 20px 32px;
    margin-top: 64px;
    border-top: 1px solid var(--border-color);
}

.author-section {
    background: var(--bg-white);
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.author-section h3 {
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.125rem;
    font-weight: 600;
}

.author-section p {
    max-width: 900px;
    margin: 0 auto 12px;
    line-height: 1.6;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.contact-link:hover {
    text-decoration: underline;
}

.footer-meta {
    text-align: center;
}

.footer-meta p {
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.footer-meta .small {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 32px 20px 24px;
    }

    header h1 {
        font-size: 1.75rem;
    }

    header .subtitle {
        font-size: 1.125rem;
        margin-bottom: 12px;
    }

    header .byline {
        font-size: 0.8125rem;
    }

    /* Hamburger menu on mobile */
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--bg-white);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

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

    .nav-links a {
        padding: 12px 16px;
        border-bottom: 1px solid var(--border-color);
        border-left: 2px solid transparent;
        font-size: 0.875rem;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-links a.active {
        border-left-color: var(--primary-color);
        border-bottom-color: transparent;
        background: var(--accent-subtle);
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.35rem;
    }

    .sticky-nav .container {
        flex-direction: column;
        gap: 5px;
    }

    .sticky-nav a {
        text-align: center;
        width: 100%;
    }

    .comparison-grid,
    .responsibility-grid {
        grid-template-columns: 1fr;
    }

    main {
        margin: 20px auto;
        padding: 20px 15px;
    }

    .structured-list > li::before {
        display: block;
        margin-bottom: 10px;
    }
}

@media print {
    .sticky-nav {
        position: relative;
    }

    .content-section {
        page-break-inside: avoid;
    }
}
