html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Exo 2', sans-serif;
}

.section-fade {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-fade.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-grid {
    position: relative;
    isolation: isolate;
}

.hero-grid::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 50%, transparent 100%);
}

@media print {
    .hero-grid::before {
        display: none;
    }
}

.copy-inline {
    position: relative;
    cursor: pointer;
}

.copy-inline::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translate(-50%, 4px);
    padding: 4px 8px;
    border-radius: 6px;
    background: #111827;
    color: #fff;
    font-size: 11px;
    line-height: 1.4;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.copy-inline:hover::after,
.copy-inline:focus-visible::after,
.copy-inline[data-copied]::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

.copy-inline[data-copied]::after {
    content: 'Copied!';
    background: #1e40af;
}

.expertise-tab {
    background: #fff;
    border-color: #e5e7eb;
    color: #374151;
}

.expertise-tab .tab-icon {
    background: #eff6ff;
    color: #1e40af;
}

.expertise-tab:hover {
    border-color: #bfdbfe;
}

.expertise-tab[aria-selected="true"] {
    background: #1e40af;
    border-color: #1e40af;
    color: #fff;
    box-shadow: 0 4px 12px -4px rgba(30, 64, 175, 0.45);
}

.expertise-tab[aria-selected="true"] .tab-icon {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.expertise-panel:not([hidden]) {
    animation: panel-in 0.25s ease;
}

@keyframes panel-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: none; }
}

.hex {
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.award-ribbon {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}

main [id] {
    scroll-margin-top: 4.5rem;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .section-fade {
        opacity: 1;
        transform: none;
        transition: none;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: #bfdbfe;
    border-radius: 9999px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

#mobile-menu {
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    transition: max-height 0.3s ease;
    display: block;
}

#mobile-menu.hidden {
    max-height: 0;
}

#mobile-menu.is-open {
    max-height: 24rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.prose-content p {
    margin-bottom: 1.1em;
    text-align: justify;
}

.prose-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 1.75em 0 0.6em;
}

.prose-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    margin: 1.5em 0 0.5em;
}

.prose-content ul,
.prose-content ol {
    margin: 0 0 1.1em 1.25em;
}

.prose-content ul {
    list-style: disc;
}

.prose-content ol {
    list-style: decimal;
}

.prose-content a {
    color: #1e40af;
    text-decoration: underline;
}

.prose-content img {
    border-radius: 0.5rem;
    margin: 1.25em 0;
}

.prose-content blockquote {
    border-left: 3px solid #e5e7eb;
    padding-left: 1em;
    color: #6b7280;
    margin: 1.25em 0;
}

.prose-content code {
    background: #f3f4f6;
    padding: 0.15em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.9em;
}

.prose-content pre {
    margin: 0 0 1.25em;
    padding: 1em 1.25em;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 0.75rem;
    overflow-x: auto;
    font-size: 0.85em;
    line-height: 1.6;
}

.prose-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.prose-content li {
    margin-bottom: 0.35em;
}

@media print {
    .no-print {
        display: none !important;
    }

    body {
        color: #000;
    }

    main {
        max-width: 100% !important;
    }

    section {
        break-inside: avoid;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    a {
        color: inherit !important;
        text-decoration: none !important;
    }
}
