/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens ── */
:root {
    --bg:          #0d1117;
    --bg-card:     #161b22;
    --bg-nav:      rgba(13, 17, 23, 0.92);
    --accent:      #00bcd4;
    --accent-dim:  rgba(0, 188, 212, 0.3);
    --text:        #e6edf3;
    --text-muted:  #8b949e;
    --border:      #21262d;
    --mono:        'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    --sans:        'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --radius:      8px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 64px;
}

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ── Hero ── */
.hero {
    display: flex;
    align-items: stretch;
    position: relative;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 75% 50%, rgba(0,188,212,0.06) 0%, transparent 65%);
    pointer-events: none;
}

/* Logo sits directly on the hero background — edges are pre-feathered
   in the image itself so there's no card/box seam against the page */
.hero-logo-panel {
    position: relative;
    z-index: 1;
    flex: 0 0 clamp(200px, 24vw, 320px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
}

.hero-logo-panel img {
    width: 100%;
    max-width: 240px;
    height: auto;
}

.hero-inner {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    padding: 2rem clamp(1.5rem, 4vw, 3.5rem);
}

.hero-eyebrow {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.hero-title {
    font-family: var(--sans);
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-bottom: 1.1rem;
}

.hero-sub {
    font-family: var(--mono);
    font-size: clamp(0.75rem, 1.4vw, 0.875rem);
    color: var(--text-muted);
    letter-spacing: 0.02em;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    max-width: 46ch;
}

.hero-certs {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.4rem 0.6rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
}

.hero-certs .sep { color: var(--border); }

/* ── Framework tagline strip ── */
.framework-line {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    text-align: center;
}

.framework-line p {
    max-width: 840px;
    margin: 0 auto;
    font-family: var(--mono);
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    color: var(--text-muted);
    letter-spacing: 0.01em;
    line-height: 1.6;
}

.framework-line .hl { color: var(--accent); }

/* ── Nav ── */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-nav);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    height: 60px;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

nav a:hover {
    color: var(--accent);
    background: rgba(0,188,212,0.07);
}

nav a.active { color: var(--accent); }

/* ── Main layout ── */
main {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 2rem 5rem;
}

section {
    padding: 4.5rem 0;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

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

.section-content {
    position: relative;
    z-index: 1;
}

/* ── Circuit-trace rails (echo the logo, run the full height of the page) ── */
.circuit-rail {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 160px;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNjAiIGhlaWdodD0iMzAwIj4KICA8ZyBmaWxsPSJub25lIiBzdHJva2U9IiMwMGJjZDQiIHN0cm9rZS13aWR0aD0iMi41Ij4KICAgIDxsaW5lIHgxPSIxNCIgeTE9IjAiIHgyPSIxNCIgeTI9IjMwMCIvPgogICAgPHBhdGggZD0iTTE0IDM1IEg3MCIvPgogICAgPHBhdGggZD0iTTE0IDk1IEg1MCBWMTI1IEg5MCIvPgogICAgPHBhdGggZD0iTTE0IDE3MCBINjAiLz4KICAgIDxwYXRoIGQ9Ik0xNCAyMTAgSDQ1IFYyMzUgSDg1Ii8+CiAgICA8cGF0aCBkPSJNMTQgMjc1IEg2NSIvPgogIDwvZz4KICA8ZyBmaWxsPSIjMDBiY2Q0Ij4KICAgIDxjaXJjbGUgY3g9IjcwIiBjeT0iMzUiIHI9IjQuNSIvPgogICAgPGNpcmNsZSBjeD0iOTAiIGN5PSIxMjUiIHI9IjQuNSIvPgogICAgPGNpcmNsZSBjeD0iNjAiIGN5PSIxNzAiIHI9IjQiLz4KICAgIDxjaXJjbGUgY3g9Ijg1IiBjeT0iMjM1IiByPSI0LjUiLz4KICAgIDxjaXJjbGUgY3g9IjY1IiBjeT0iMjc1IiByPSI0Ii8+CiAgICA8Y2lyY2xlIGN4PSIxNCIgY3k9IjM1IiByPSIzIi8+CiAgICA8Y2lyY2xlIGN4PSIxNCIgY3k9IjE3MCIgcj0iMyIvPgogICAgPGNpcmNsZSBjeD0iMTQiIGN5PSIyNzUiIHI9IjMiLz4KICA8L2c+Cjwvc3ZnPg==");
    background-repeat: repeat-y;
    background-position: top left;
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
}

.circuit-rail--left { left: 0; }

.circuit-rail--right {
    right: 0;
    transform: scaleX(-1);
}

@media (max-width: 900px) {
    .circuit-rail { width: 90px; opacity: 0.2; background-size: 90px auto; }
}

@media (max-width: 600px) {
    .circuit-rail { display: none; }
}

/* ── Stats strip ── */
.stats-strip {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 3rem 2rem 2.5rem;
}

.stats-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem 1.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.stat-num {
    font-family: var(--sans);
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.stat-src {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    opacity: 0.6;
    letter-spacing: 0.04em;
    margin-top: 0.1rem;
}

.stats-footnote {
    max-width: 900px;
    margin: 2.25rem auto 0;
    text-align: center;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* ── Section headings ── */
h2 {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.75rem;
}

/* ── Body text ── */
p {
    color: var(--text);
    margin-bottom: 1rem;
    max-width: 680px;
}

p + p { margin-top: 0; }

/* ── Services list ── */
#services ul {
    list-style: none;
    margin-top: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#services li {
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: border-color 0.2s, background 0.2s;
}

#services li:hover {
    border-color: var(--accent-dim);
    background: #1a2030;
}

#services strong {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
}

#services span {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.55;
}

/* ── Cert grid ── */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.cert {
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: border-color 0.2s;
}

.cert:hover { border-color: var(--accent-dim); }

.cert-code {
    font-family: var(--sans);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.01em;
}

.cert-name {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ── Contact ── */
.email-link {
    display: inline-block;
    font-family: var(--mono);
    font-size: 1.05rem;
    color: var(--accent);
    text-decoration: none;
    margin: 1.5rem 0 0.75rem;
    border-bottom: 1px solid var(--accent-dim);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}

.email-link:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}

.contact-note {
    font-size: 0.825rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    font-family: var(--mono);
    letter-spacing: 0.03em;
}

/* ── Footer ── */
footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    /* Logo panel stacks above the copy instead of sitting beside it */
    .hero {
        flex-direction: column;
    }

    .hero-logo-panel {
        flex: none;
        width: 100%;
        padding: 1.5rem;
    }

    .hero-logo-panel img { max-width: 170px; }

    .hero-inner {
        text-align: center;
        align-items: center;
        padding: 2rem;
    }

    .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-certs { justify-content: center; }
}

@media (max-width: 700px) {
    .stats-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    main { padding: 0 1.25rem 4rem; }
    section { padding: 3rem 0; }
    .cert-grid { grid-template-columns: 1fr; }
    .stats-inner { grid-template-columns: 1fr; }
}
