/* ========================
   Security Model - Premium Styling
   ======================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1f2937;
    line-height: 1.7;
}

/* Header Navigation */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1rem 2rem;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #1a1a2e;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    width: 38px;
    height: 38px;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #1f2937;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #6366f1;
}

.nav-link:hover::after {
    width: 100%;
}

/* Main Container */
.main-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem 5rem;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.hero-badge svg {
    width: 18px;
    height: 18px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, #1f2937 0%, #4b5563 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    max-width: 700px;
    margin: 0 auto;
}

/* Section Styling */
.section {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out backwards;
}

.section:nth-child(1) {
    animation-delay: 0.1s;
}

.section:nth-child(2) {
    animation-delay: 0.15s;
}

.section:nth-child(3) {
    animation-delay: 0.2s;
}

.section:nth-child(4) {
    animation-delay: 0.25s;
}

.section:nth-child(5) {
    animation-delay: 0.3s;
}

.section:nth-child(6) {
    animation-delay: 0.35s;
}

.section:nth-child(7) {
    animation-delay: 0.4s;
}

.section:nth-child(8) {
    animation-delay: 0.45s;
}

.section:nth-child(9) {
    animation-delay: 0.5s;
}

.section:hover {
    box-shadow: 0 16px 48px rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.2);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    flex-shrink: 0;
}

.section-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.02em;
}

.section-content {
    color: #4b5563;
    font-size: 1rem;
}

.section-content p {
    margin-bottom: 1rem;
}

.section-content p:last-child {
    margin-bottom: 0;
}

/* Highlight Cards */
.highlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.highlight-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.highlight-card.secure {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

.highlight-card.info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

.highlight-card.warning {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border-color: rgba(234, 179, 8, 0.3);
}

.highlight-card-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 0.75rem;
    color: #10b981;
}

.highlight-card.info .highlight-card-icon {
    color: #3b82f6;
}

.highlight-card.warning .highlight-card-icon {
    color: #eab308;
}

.highlight-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.highlight-card p {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Architecture Diagram */
.architecture-diagram {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 2rem;
    margin: 1.5rem 0;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.diagram-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.diagram-box {
    background: white;
    border-radius: 12px;
    padding: 1.25rem 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid #e2e8f0;
    min-width: 160px;
}

.diagram-box.primary {
    border-color: #6366f1;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
}

.diagram-box h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.diagram-box p {
    font-size: 0.8rem;
    color: #6b7280;
}

.diagram-arrow {
    font-size: 1.5rem;
    color: #6366f1;
    font-weight: bold;
}

/* Communication Cards */
.comm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.comm-card {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.comm-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.comm-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 10px;
}

.comm-card-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.comm-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.comm-card p {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
    border-bottom: 2px solid #e2e8f0;
}

td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    color: #4b5563;
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: rgba(99, 102, 241, 0.03);
}

/* Feature Lists */
.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(99, 102, 241, 0.04);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.feature-list li:hover {
    background: rgba(99, 102, 241, 0.08);
}

.list-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #6366f1;
    margin-top: 2px;
}

.list-icon.check {
    color: #10b981;
}

.list-icon.warning {
    color: #f59e0b;
}

.list-icon.shield {
    color: #6366f1;
}

/* Threat Model Grids */
.threat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.threat-card {
    border-radius: 16px;
    padding: 1.75rem;
}

.threat-card.protects {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.threat-card.limits {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.threat-card h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.threat-card.protects h4 {
    color: #059669;
}

.threat-card.limits h4 {
    color: #b45309;
}

.threat-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.threat-card li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.threat-card.protects li {
    color: #166534;
}

.threat-card.limits li {
    color: #78350f;
}

/* Contact Card */
.contact-card {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.2);
    margin-top: 1.5rem;
}

.contact-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.contact-card p {
    color: #6b7280;
    margin-bottom: 1.25rem;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.contact-email:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    padding: 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-nav p {
    color: #6b7280;
    font-size: 0.9rem;
}

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

.footer-link {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #6366f1;
}

/* Document Info */
.doc-info {
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 3rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.doc-info-item {
    text-align: center;
}

.doc-info-item span {
    display: block;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.doc-info-item strong {
    color: #374151;
    font-size: 0.95rem;
}

/* Related Link */
.related-link {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.related-link p {
    color: #6b7280;
    font-size: 0.95rem;
}

.related-link a {
    color: #6366f1;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-link a:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-container {
        padding: 2rem 1.25rem 3rem;
    }

    .hero {
        margin-bottom: 2.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section {
        padding: 1.75rem;
        border-radius: 16px;
    }

    .section-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .diagram-flow {
        flex-direction: column;
    }

    .diagram-arrow {
        transform: rotate(90deg);
    }

    .highlight-grid,
    .comm-grid,
    .threat-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.85rem;
    }

    th,
    td {
        padding: 0.75rem;
    }

    .footer-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .doc-info {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .section {
        padding: 1.5rem;
    }

    .section-icon {
        width: 40px;
        height: 40px;
    }

    .section-icon svg {
        width: 20px;
        height: 20px;
    }

    .comm-card,
    .threat-card {
        padding: 1.25rem;
    }
}