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

:root {
    /* Aligned with njvanas.github.io + typing-speed-test companion pages */
    --header-h: 5.5rem;
    --bg-deep: #0a0e27;
    --bg-elevated: rgba(30, 41, 59, 0.5);
    --bg-card: rgba(15, 23, 42, 0.5);
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --text-primary: #e2e8f0;
    --text-gray-300: #d1d5db;
    --text-gray-400: #9ca3af;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-ring: #3b82f6;
    --blue-300: #93c5fd;
    --blue-400: #60a5fa;
    --border: rgba(51, 65, 85, 0.5);
    --border-strong: #334155;
    --border-footer: #1e293b;
    --success: #22c55e;
    --success-bg: rgba(22, 163, 74, 0.15);
    --warning: #fbbf24;
    --warning-bg: rgba(234, 179, 8, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-deep);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    width: 100%;
}

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

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.scroll-target {
    scroll-margin-top: calc(var(--header-h) + 0.5rem);
}

/* Main band — same rhythm as typing-speed-test (main-wrap) */
.main-shell {
    position: relative;
    flex: 1;
    width: 100%;
    padding: calc(var(--header-h) + 2rem) 0 2.5rem;
    overflow: hidden;
    isolation: isolate;
}

.main-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
    background:
        linear-gradient(to right, rgba(37, 99, 235, 0.12), rgba(147, 51, 234, 0.1)),
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 75% 70%, rgba(147, 51, 234, 0.12) 0%, transparent 45%);
}

.main-shell .hero,
.main-shell .cicd-section,
.main-shell .about {
    position: relative;
    z-index: 1;
}

/* Header — fixed + transparent until scroll (matches portfolio Header.tsx) */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        backdrop-filter 0.3s ease;
}

.site-header--scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-bottom-color: rgba(30, 41, 59, 0.6);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.site-header__nav {
    padding: 1rem 0;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
}

/* Brand row — same pattern as typing-speed-test (NJ van As · Project) */
.site-header__brand {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
}

.site-header__name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.2s ease;
}

.site-header__name:hover {
    color: var(--blue-300);
}

.site-header__sep {
    color: #64748b;
    font-weight: 600;
}

.site-header__page {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-gray-400);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.75rem 1.25rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-gray-300);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #fff;
}

/* Hero — compact intro like typing-speed-test (hero-intro), not full viewport */
.hero {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 2rem;
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
}

.hero__inner {
    position: relative;
}

.hero-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--blue-300);
    margin-bottom: 1rem;
}

.hero__title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero__subtitle {
    font-size: clamp(1.25rem, 2.5vw, 1.875rem);
    font-weight: 300;
    color: var(--blue-300);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.hero__lead {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: #cbd5e1;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.65;
}

@media (min-width: 768px) {
    .hero__lead {
        font-size: 1.25rem;
    }
}

.hero-sub {
    font-size: 0.95rem !important;
    color: var(--text-gray-400) !important;
    margin-bottom: 1.25rem !important;
}

.hero__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

@media (min-width: 40rem) {
    .hero__actions {
        flex-direction: row;
        justify-content: center;
    }
}

.inline-link {
    color: var(--blue-300);
    text-decoration: none;
    border-bottom: 1px solid rgba(147, 197, 253, 0.35);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.inline-link:hover {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

/* Buttons — portfolio primary / outline CTAs */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.25;
    border-radius: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.15s ease;
}

.btn--primary {
    background: var(--accent);
    color: #fff;
    border: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.25);
}

.btn--primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.btn--primary:active {
    transform: translateY(1px);
}

.btn--outline {
    background: transparent;
    color: var(--blue-400);
    border: 2px solid var(--blue-400);
}

.btn--outline:hover {
    background: var(--blue-400);
    color: #fff;
}

#message {
    margin-top: 1.5rem;
    font-size: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    display: inline-block;
    color: #e2e8f0;
}

#message.hidden {
    display: none;
}

/* Section titles — compact like typing-speed-test .section-title */
.section-head {
    text-align: center;
    margin-bottom: 1.75rem;
}

.section-head__title {
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.65rem;
    letter-spacing: -0.02em;
}

.section-head__rule {
    width: 3rem;
    height: 0.2rem;
    background: var(--accent-ring);
    margin: 0 auto 1rem;
    border-radius: 9999px;
}

.section-head__lead {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 40rem;
    margin: 0 auto;
    line-height: 1.55;
}

/* CI/CD Section */
.cicd-section {
    padding: 0 0 2.5rem;
    background: transparent;
}

.pipeline-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 1.25rem 0;
    padding: 1.25rem 1rem;
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
    background: var(--bg-elevated);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.pipeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.85rem;
    min-width: 132px;
    max-width: 160px;
    background: var(--bg-card);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
}

.pipeline-step:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px -8px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

.step-icon {
    font-size: 2rem;
    margin-bottom: 0.65rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.step-content {
    text-align: center;
}

.step-content h3 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.step-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}

.step-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.45rem 0.9rem;
    border-radius: 9999px;
    margin-top: 0.5rem;
}

.step-status.active {
    background: var(--warning-bg);
    color: #fbbf24;
    border: 1px solid rgba(234, 179, 8, 0.25);
}

.step-status.success {
    background: var(--success-bg);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    animation: blink 1.5s infinite;
}

.step-status.active .status-dot {
    background-color: var(--warning);
}

.step-status.success .status-dot {
    background-color: var(--success);
    animation: none;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.pipeline-arrow {
    font-size: 1.35rem;
    color: var(--blue-400);
    font-weight: bold;
    margin: 0 0.15rem;
    animation: slide 2s infinite;
}

@keyframes slide {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.deployment-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin: 1.25rem 0;
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--bg-elevated);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -8px rgba(0, 0, 0, 0.35);
    border-color: rgba(59, 130, 246, 0.25);
}

.info-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.info-content h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.info-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

#deploy-status {
    color: #4ade80;
    font-weight: 600;
}

.workflow-link {
    text-align: center;
    margin-top: 1.25rem;
}

.workflow-button.workflow-button {
    font-size: 0.95rem;
    padding: 0.85rem 1.75rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(6px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #1e293b;
    margin: auto;
    padding: 0;
    border-radius: 0.75rem;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    animation: slideUp 0.3s ease;
    position: relative;
    overflow: hidden;
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    color: var(--text-muted);
    font-size: 1.75rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s ease, transform 0.2s ease;
    line-height: 1;
    background: none;
    border: none;
    padding: 0.25rem;
}

.modal-close:hover,
.modal-close:focus {
    color: #93c5fd;
    transform: scale(1.1);
}

.modal-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #172554 100%);
    color: #fff;
    padding: 2rem;
    text-align: center;
}

.modal-icon {
    font-size: 3.5rem;
    margin-bottom: 0.75rem;
    display: inline-block;
    animation: pulse 2s infinite;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 700;
}

.modal-body {
    padding: 1.75rem;
}

.modal-body p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.modal-details {
    background: rgba(15, 23, 42, 0.6);
    padding: 1.25rem;
    border-radius: 0.5rem;
    margin: 1.25rem 0;
    border: 1px solid var(--border);
}

.modal-details h3 {
    font-size: 1.05rem;
    color: var(--blue-300);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.modal-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-details li {
    padding: 0.65rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-primary);
    line-height: 1.55;
}

.modal-details li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-ring);
    font-weight: bold;
    font-size: 1rem;
}

.modal-details li:not(:last-child) {
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.modal-result {
    background: var(--success-bg);
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--success);
    margin-top: 1.25rem;
}

.modal-result strong {
    color: #86efac;
    display: block;
    margin-bottom: 0.35rem;
}

.modal-result span {
    color: #cbd5e1;
    font-size: 0.95rem;
}

/* About Section */
.about {
    margin-top: 1.5rem;
    padding: 2rem 0 0;
    border-top: 1px solid var(--border);
    background: transparent;
}

.about__body {
    max-width: 56rem;
    margin: 0 auto;
}

.about__body p {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #cbd5e1;
    line-height: 1.6;
}

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

/* Footer — matches portfolio Footer.tsx (slate-900 / slate-800 borders) */
.site-footer {
    width: 100%;
    margin-top: auto;
    background: var(--slate-900);
    border-top: 1px solid var(--border-footer);
    color: var(--text-gray-400);
    font-size: 0.9375rem;
}

.site-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1.5rem 1.5rem;
}

.site-footer__grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .site-footer__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2rem;
    }
}

.site-footer__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 1rem;
}

.site-footer__tagline {
    margin: 0 0 1rem;
    color: var(--text-gray-400);
    line-height: 1.625;
}

.site-footer__social {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer__social li {
    margin: 0;
}

.site-footer__social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.5rem;
    background: var(--slate-800);
    color: var(--text-gray-400);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: background 0.3s ease;
}

.site-footer__social-btn:hover {
    background: var(--accent);
}

/* External Lucide-style SVGs (icons/*.svg) — same as typing-speed-test */
.site-footer__icon-img {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    object-fit: contain;
}

.site-footer__social-btn:hover .site-footer__icon-img {
    filter: brightness(0) invert(1);
}

.site-footer__heading {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.site-footer__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer__list li {
    margin-bottom: 0.5rem;
}

.site-footer__list li:last-child {
    margin-bottom: 0;
}

.site-footer__list a {
    color: var(--text-gray-400);
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer__list a:hover {
    color: #fff;
}

.site-footer__list--muted li {
    color: var(--text-gray-400);
}

.site-footer__bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-footer);
}

@media (min-width: 768px) {
    .site-footer__bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.site-footer__legal,
.site-footer__made {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-gray-400);
}

.site-footer__made {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.site-footer__heart {
    color: #ef4444;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }

    .main-shell {
        padding: calc(var(--header-h) + 1.25rem) 0 2rem;
    }

    .section-head {
        margin-bottom: 1.35rem;
    }

    .pipeline-container {
        flex-direction: column;
        padding: 1rem 0.85rem;
    }

    .pipeline-arrow {
        transform: rotate(90deg);
        margin: 0.25rem 0;
    }

    .deployment-info {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .modal-header {
        padding: 1.5rem;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    .modal-icon {
        font-size: 2.75rem;
    }

    .modal-body {
        padding: 1.35rem;
    }

    .modal-body p {
        font-size: 0.95rem;
    }
}
