/*
Theme Name: Nullbyte
Description: Portfolio theme for Selim Celebi, offensive security. Dark lacquer, one amber accent, Familjen Grotesk.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 0.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nullbyte
Tags: full-site-editing, wide-blocks, accessibility-ready
*/

/* WordPress inserts a block gap between the template's top-level parts
   (header, main, footer). Sections own their rhythm through padding. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

@font-face {
	font-family: "Familjen Grotesk";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url( "/wp-content/uploads/2026/10/familjen-grotesk-latin-wght.woff2" ) format( "woff2" );
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Familjen Grotesk";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url( "/wp-content/uploads/2026/10/familjen-grotesk-latin-ext-wght.woff2" ) format( "woff2" );
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
	--nb-bg: var( --wp--preset--color--base );
	--nb-surface: var( --wp--preset--color--surface );
	--nb-surface-2: var( --wp--preset--color--surface-2 );
	--nb-line: var( --wp--preset--color--hairline );
	--nb-text: var( --wp--preset--color--contrast );
	--nb-muted: var( --wp--preset--color--muted );
	--nb-accent: var( --wp--preset--color--accent );
	--nb-accent-deep: var( --wp--preset--color--accent-deep );
	--nb-signal: var( --wp--preset--color--signal );
	--nb-mono: var( --wp--preset--font-family--mono );
	--nb-sans: "Familjen Grotesk", "Segoe UI", system-ui, sans-serif;
	--nb-body: #c9ced5;
	--nb-radius: 6px;
	--nb-wide: 1180px;
}

/* ------------------------------------------------------------- base */

body {
	font-family: var( --nb-sans );
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	font-kerning: normal;
}

h1, h2, h3, h4, h5, h6,
.wp-block-heading,
.wp-block-post-title,
.wp-block-site-title {
	font-family: var( --nb-sans );
	font-weight: 600;
	text-wrap: balance;
}

p,
li {
	text-wrap: pretty;
}

::selection {
	background: var( --nb-accent );
	color: var( --nb-bg );
}

:focus-visible {
	outline: 2px solid var( --nb-accent );
	outline-offset: 3px;
	border-radius: 2px;
}

a {
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}

code,
kbd,
pre,
samp {
	font-family: var( --nb-mono );
}

.nb-lead p,
p.nb-lead {
	max-width: 62ch;
	font-size: 1.15rem;
	line-height: 1.6;
	color: var( --nb-body );
}

.nb-rule,
hr.nb-rule {
	height: 0;
	border: 0;
	border-top: 1px solid var( --nb-line );
	background: none !important;
	opacity: 1;
	margin-block: 3rem;
}

/* Kept so older markup degrades to nothing instead of a stray label. */
.nb-eyebrow {
	display: none;
}

/* ------------------------------------------------------------- header */

.nb-header {
	position: relative;
	z-index: 40;
	padding-block: 0.85rem;
	background: var( --wp--preset--color--base, #08090b );
	border-bottom: 1px solid var( --nb-line );
}

.nb-header-inner {
	gap: 1.25rem;
	align-items: center;
}

.nb-brand {
	gap: 0.7rem !important;
	align-items: center;
}

.nb-brand-mark {
	margin: 0;
	display: block;
	width: 2.6rem;
	line-height: 0;
	color: var( --nb-accent );
}

.nb-brand-mark svg {
	display: block;
	width: 100%;
	height: auto;
}

.nb-brand-text {
	gap: 0 !important;
}

.nb-site-title,
.nb-site-title a {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.2;
	color: var( --nb-text ) !important;
	text-decoration: none !important;
}

.nb-brand-sub {
	margin: 0;
	font-size: 0.82rem;
	line-height: 1.3;
	color: var( --nb-muted );
}

.nb-nav {
	font-size: 0.95rem;
}

.nb-nav .wp-block-navigation__container {
	gap: 1.6rem;
}

.nb-nav .wp-block-navigation-item__content {
	color: var( --nb-muted );
	text-decoration: none;
	padding-block: 0.3rem;
	transition: color 0.15s ease;
}

.nb-nav .wp-block-navigation-item__content:hover,
.nb-nav .current-menu-item > .wp-block-navigation-item__content,
.nb-nav .wp-block-navigation-item__content[aria-current="page"] {
	color: var( --nb-text );
}

.nb-nav .wp-block-navigation-item__content[aria-current="page"] {
	text-decoration: underline;
	text-decoration-color: var( --nb-accent );
	text-decoration-thickness: 2px;
	text-underline-offset: 0.45em;
}

.nb-nav .wp-block-navigation__responsive-container-open,
.nb-nav .wp-block-navigation__responsive-container-close {
	color: var( --nb-text );
}

/* ------------------------------------------------------------- page scaffold */

.nb-main-front,
.nb-main-front > .entry-content,
.nb-main > .entry-content {
	padding-left: 0;
	padding-right: 0;
}

.nb-main-front {
	padding-block: 0;
}

/* Home sections are full-bleed groups; let them span the viewport so their
   inner wide containers line up with the header. */
.nb-main-front > .entry-content {
	max-width: none !important;
}

.nb-main {
	padding-block: clamp( 2.75rem, 6vw, 4.5rem ) clamp( 3.5rem, 8vw, 6.5rem );
}

.nb-page-head {
	margin-bottom: clamp( 2rem, 5vw, 3.25rem );
}

/* Pages read from one left edge: the title and every top-level block share it. */
.nb-page > .wp-block-post-content > * {
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.nb-page-head h1,
.nb-page-head .wp-block-post-title {
	margin: 0;
	font-size: clamp( 2.3rem, 5vw, 3.5rem );
	line-height: 1.04;
	letter-spacing: -0.03em;
}

.nb-page-head .nb-lead {
	margin: 1rem 0 0;
}

/* ------------------------------------------------------------- buttons */

.wp-element-button,
.wp-block-button__link {
	font-family: var( --nb-sans );
	font-size: 0.98rem;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.2;
	border-radius: var( --nb-radius );
	padding: 0.8rem 1.25rem;
}

.nb-btn-primary .wp-element-button {
	background: var( --nb-accent );
	border: 1px solid var( --nb-accent );
	color: var( --nb-bg );
	transition: background-color 0.15s ease;
}

.nb-btn-primary .wp-element-button:hover,
.nb-btn-primary .wp-element-button:focus-visible {
	background: #ffc75a;
	border-color: #ffc75a;
	color: var( --nb-bg );
	text-decoration: none;
}

.nb-btn-ghost .wp-element-button {
	background: transparent;
	border: 1px solid #3a424e;
	color: var( --nb-text );
	transition: border-color 0.15s ease, color 0.15s ease;
}

.nb-btn-ghost .wp-element-button:hover,
.nb-btn-ghost .wp-element-button:focus-visible {
	background: transparent;
	border-color: var( --nb-accent );
	color: var( --nb-accent );
	text-decoration: none;
}

.nb-actions {
	gap: 0.75rem !important;
}

.nb-arrow-link a,
a.nb-arrow-link {
	font-weight: 600;
	color: var( --nb-accent );
	text-decoration: underline;
	text-decoration-color: rgba( 255, 178, 36, 0.45 );
}

.nb-arrow-link a:hover,
a.nb-arrow-link:hover {
	text-decoration-color: var( --nb-accent );
}

/* ------------------------------------------------------------- home: hero */

.nb-hero {
	padding-block: clamp( 3.5rem, 9vw, 7rem ) clamp( 3rem, 7vw, 5.5rem );
}

.nb-hero-cols {
	gap: clamp( 2rem, 6vw, 5rem ) !important;
	align-items: center;
}

.nb-hero-title {
	margin: 0 0 1.5rem;
	max-width: 15ch;
	font-size: clamp( 2.7rem, 6.4vw, 4.9rem );
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.035em;
}

.nb-hero-sub {
	margin: 0 0 1.25rem;
	max-width: 52ch;
	font-size: 1.18rem;
	line-height: 1.6;
	color: var( --nb-body );
}

.nb-hero-status {
	margin: 0 0 2rem;
	font-size: 0.98rem;
	color: var( --nb-text );
}

.nb-hero-status strong {
	font-weight: 600;
	color: var( --nb-accent );
}

.nb-portrait {
	margin: 0;
}

.nb-portrait img {
	display: block;
	width: 100%;
	max-width: 300px;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 50%;
	background: var( --nb-surface );
	border: 1px solid var( --nb-line );
}

.nb-hero-portrait-col {
	display: flex;
	justify-content: flex-end;
}

/* ------------------------------------------------------------- home: sections */

.nb-sec {
	padding-block: 0 clamp( 3rem, 7vw, 5.5rem );
}

.nb-sec > .nb-sec-grid {
	padding-top: clamp( 3rem, 7vw, 5.5rem );
	border-top: 1px solid var( --nb-line );
}

.nb-sec-grid {
	display: grid;
	grid-template-columns: minmax( 0, 15rem ) minmax( 0, 1fr );
	column-gap: clamp( 2rem, 5vw, 4.5rem );
	row-gap: 1.5rem;
	align-items: start;
}

.nb-sec-grid > * {
	margin-block: 0 !important;
}

.nb-sec-title {
	margin: 0;
	font-size: clamp( 1.35rem, 2.2vw, 1.65rem );
	line-height: 1.15;
	letter-spacing: -0.02em;
	position: sticky;
	top: 6.5rem;
}

.nb-sec-body > * {
	max-width: 46rem;
}

.nb-sec-body > .nb-wide-media,
.nb-sec-body > .wp-block-table,
.nb-sec-body > .wp-block-query {
	max-width: none;
}

.nb-sec-body > * + * {
	margin-block-start: 1.25rem;
}

.nb-sec-body p {
	color: var( --nb-body );
}

/* Track record: real numbers belong in a table, not in a row of stat tiles. */
.nb-record {
	margin: 0;
	overflow-x: auto;
}

.nb-record table {
	width: 100%;
	border-collapse: collapse;
	font-size: 1rem;
}

.nb-record th,
.nb-record td {
	padding: 0.95rem 1rem 0.95rem 0;
	border: 0;
	border-bottom: 1px solid var( --nb-line );
	text-align: left;
	vertical-align: baseline;
}

.nb-record thead th {
	padding-top: 0;
	font-size: 0.85rem;
	font-weight: 500;
	color: var( --nb-muted );
	border-bottom-color: #3a424e;
}

.nb-record td:first-child {
	font-weight: 600;
	color: var( --nb-text );
	width: 34%;
}

.nb-record td:nth-child( 2 ) {
	color: var( --nb-body );
}

.nb-record td:last-child,
.nb-record th:last-child {
	padding-right: 0;
	text-align: right;
	white-space: nowrap;
	font-family: var( --nb-mono );
	font-size: 0.86rem;
	color: var( --nb-muted );
}

.nb-record strong {
	font-weight: 600;
	color: var( --nb-accent );
}

/* Photographs */
.nb-photo {
	margin: 0;
}

.nb-photo img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var( --nb-radius );
}

.nb-sec-body .nb-photo img {
	aspect-ratio: 16 / 9;
	object-fit: cover;
	object-position: 50% 62%;
}

.nb-photo figcaption,
.nb-photo .wp-element-caption {
	margin: 0.7rem 0 0;
	font-size: 0.86rem;
	line-height: 1.5;
	color: var( --nb-muted );
	text-align: left;
}

.nb-photo a {
	display: block;
}

.nb-photo-pair {
	display: grid !important;
	grid-template-columns: 4fr 3fr;
	gap: 1rem !important;
	align-items: start;
}

.nb-photo-pair > * {
	margin: 0 !important;
}

/* Capabilities */
.nb-caps {
	display: grid !important;
	gap: 0 !important;
}

.nb-cap {
	display: grid;
	grid-template-columns: minmax( 0, 15rem ) minmax( 0, 1fr );
	column-gap: 2rem;
	padding-block: 1.2rem;
	border-bottom: 1px solid var( --nb-line );
}

.nb-cap:first-child {
	padding-top: 0;
}

.nb-cap > * {
	margin: 0 !important;
}

.nb-cap h3 {
	font-size: 1.1rem;
	line-height: 1.35;
}

.nb-cap p {
	color: var( --nb-body );
}

/* Featured research */
.nb-feature-title {
	margin: 0;
	font-size: clamp( 1.4rem, 2.6vw, 1.9rem );
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.nb-feature-title a {
	color: var( --nb-text );
	text-decoration: none;
}

.nb-feature-title a:hover {
	color: var( --nb-accent );
}

ul.nb-findings {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var( --nb-line );
}

ul.nb-findings li {
	display: flex;
	gap: 0.9rem;
	align-items: baseline;
	margin: 0;
	padding: 0.7rem 0;
	border-bottom: 1px solid var( --nb-line );
	color: var( --nb-body );
	font-size: 0.98rem;
}

.nb-tag {
	flex: 0 0 auto;
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1;
	padding: 0.32rem 0.5rem;
	border-radius: 4px;
	color: var( --nb-signal );
	border: 1px solid rgba( 67, 201, 122, 0.45 );
}

ul.nb-findings code {
	font-size: 0.85em;
	color: var( --nb-text );
}

/* Latest entries: a list, dated in the margin. */
.nb-entries .wp-block-post-template {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var( --nb-line );
}

.nb-entries .wp-block-post-template > li {
	margin: 0;
}

.nb-entry {
	display: grid;
	grid-template-columns: 7.5rem minmax( 0, 1fr );
	column-gap: 1.5rem;
	padding-block: 1.15rem;
	border-bottom: 1px solid var( --nb-line );
}

.nb-entry > * {
	margin: 0 !important;
}

.nb-entry .wp-block-post-date {
	grid-row: 1 / span 2;
	padding-top: 0.2rem;
	font-family: var( --nb-mono );
	font-size: 0.82rem;
	color: var( --nb-muted );
}

.nb-entry .wp-block-post-title {
	font-size: 1.12rem;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.nb-entry .wp-block-post-title a {
	color: var( --nb-text );
	text-decoration: none;
}

.nb-entry .wp-block-post-title a:hover {
	color: var( --nb-accent );
}

.nb-entry .wp-block-post-excerpt {
	margin-top: 0.3rem !important;
}

.nb-entry .wp-block-post-excerpt__excerpt {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.55;
	color: var( --nb-muted );
}

.nb-entry .wp-block-post-excerpt__more-text {
	display: none;
}

/* ------------------------------------------------------------- blog index */

.nb-write-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 2.5rem;
}

.nb-write-filter a {
	font-size: 0.92rem;
	color: var( --nb-muted );
	text-decoration: none;
	padding: 0.4rem 0.8rem;
	border: 1px solid var( --nb-line );
	border-radius: 999px;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.nb-write-filter a:hover,
.nb-write-filter a[aria-current="page"] {
	color: var( --nb-text );
	border-color: var( --nb-accent );
}

.nb-archive .wp-block-post-template {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var( --nb-line );
}

.nb-post-row {
	display: grid;
	grid-template-columns: 13rem minmax( 0, 1fr );
	column-gap: clamp( 1.25rem, 3vw, 2.25rem );
	padding-block: 1.5rem;
	border-bottom: 1px solid var( --nb-line );
	align-items: start;
}

.nb-post-row > * {
	margin: 0 !important;
}

.nb-post-row .wp-block-post-featured-image {
	margin: 0;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: 4px;
	background: var( --nb-surface );
}

.nb-post-row .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nb-post-row-body {
	grid-column: 2;
	display: flex;
	flex-direction: column;
	gap: 0.4rem !important;
}

.nb-post-row-body > * {
	margin: 0 !important;
}

.nb-post-row .wp-block-post-date {
	font-family: var( --nb-mono );
	font-size: 0.82rem;
	color: var( --nb-muted );
}

.nb-post-row .wp-block-post-title {
	font-size: clamp( 1.2rem, 2vw, 1.4rem );
	line-height: 1.25;
	letter-spacing: -0.015em;
}

.nb-post-row .wp-block-post-title a {
	color: var( --nb-text );
	text-decoration: none;
}

.nb-post-row .wp-block-post-title a:hover {
	color: var( --nb-accent );
}

.nb-post-row .wp-block-post-excerpt__excerpt {
	margin: 0;
	font-size: 0.98rem;
	line-height: 1.6;
	color: var( --nb-body );
	max-width: 62ch;
}

.nb-post-row .wp-block-post-excerpt__more-text {
	display: none;
}

.nb-pagination {
	margin-top: 2.5rem;
	font-size: 0.95rem;
}

.nb-pagination a {
	color: var( --nb-muted );
	text-decoration: none;
}

.nb-pagination a:hover,
.nb-pagination .current {
	color: var( --nb-accent );
}

/* ------------------------------------------------------------- single post */

.nb-post-meta {
	gap: 0.5rem !important;
	font-size: 0.92rem;
	color: var( --nb-muted );
	margin-bottom: 1rem;
}

.nb-post-meta > *,
.nb-post-meta p {
	margin: 0;
	font-size: inherit;
}

.nb-post-meta a {
	color: var( --nb-muted );
	text-decoration: underline;
	text-decoration-color: var( --nb-line );
}

.nb-post-meta a:hover {
	color: var( --nb-accent );
}

.nb-single .nb-post-head h1,
.nb-single .wp-block-post-title {
	margin: 0;
	font-size: clamp( 2.1rem, 4.6vw, 3.2rem );
	line-height: 1.06;
	letter-spacing: -0.03em;
}

.nb-post-hero {
	margin-block: 2.25rem 2.5rem !important;
}

.nb-post-hero img {
	width: 100%;
	max-height: 460px;
	object-fit: cover;
	border-radius: var( --nb-radius ) !important;
}

.nb-single .wp-block-post-content {
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var( --nb-body );
}

/* A reading column, left-aligned under the title like every other page. */
.nb-single .wp-block-post-content > * {
	max-width: 44rem;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.nb-single .wp-block-post-content > pre,
.nb-single .wp-block-post-content > .wp-block-table,
.nb-single .wp-block-post-content > .wp-block-image,
.nb-single .wp-block-post-content > .wp-block-gallery,
.nb-single .wp-block-post-content > .alignwide {
	max-width: 56rem;
}

.nb-single .wp-block-post-content > .alignfull {
	max-width: none;
}

.nb-single .wp-block-post-content strong {
	color: var( --nb-text );
	font-weight: 600;
}

.nb-single .wp-block-post-content h2 {
	margin-top: 2.75rem;
	font-size: 1.6rem;
	letter-spacing: -0.02em;
	color: var( --nb-text );
}

.nb-single .wp-block-post-content h3 {
	margin-top: 2rem;
	font-size: 1.25rem;
	color: var( --nb-text );
}

.nb-single .wp-block-post-content a {
	color: var( --nb-accent );
	text-decoration: underline;
	text-decoration-color: rgba( 255, 178, 36, 0.45 );
}

.nb-single .wp-block-post-content a:hover {
	text-decoration-color: var( --nb-accent );
}

.nb-single .wp-block-post-content img {
	border-radius: var( --nb-radius );
}

.nb-single .wp-block-post-content figcaption {
	font-size: 0.86rem;
	color: var( --nb-muted );
}

.nb-single blockquote,
.nb-single .wp-block-quote {
	margin: 2rem 0;
	padding: 0 0 0 1.25rem;
	border-left: 1px solid var( --nb-accent );
	color: var( --nb-text );
	font-size: 1.15rem;
	line-height: 1.55;
}

.nb-single blockquote cite {
	display: block;
	margin-top: 0.6rem;
	font-size: 0.9rem;
	font-style: normal;
	color: var( --nb-muted );
}

.nb-single pre,
.wp-block-code {
	padding: 1rem 1.2rem;
	background: var( --nb-surface );
	border: 1px solid var( --nb-line );
	border-radius: var( --nb-radius );
	font-size: 0.86rem;
	line-height: 1.6;
	color: #d6dbe1;
	overflow-x: auto;
}

.nb-single :not( pre ) > code {
	padding: 0.1em 0.35em;
	background: var( --nb-surface-2 );
	border-radius: 3px;
	font-size: 0.88em;
	color: var( --nb-text );
}

.nb-single .wp-block-table table {
	border-collapse: collapse;
	width: 100%;
	font-size: 0.95rem;
}

.nb-single .wp-block-table th,
.nb-single .wp-block-table td {
	padding: 0.65rem 0.8rem 0.65rem 0;
	border: 0;
	border-bottom: 1px solid var( --nb-line );
	text-align: left;
}

.nb-single .wp-block-table thead th {
	color: var( --nb-muted );
	font-weight: 500;
}

.nb-single ul,
.nb-single ol {
	padding-left: 1.2rem;
}

.nb-single li + li {
	margin-top: 0.35rem;
}

.nb-single li::marker {
	color: var( --nb-accent-deep );
}

.nb-post-nav {
	gap: 1rem;
	font-size: 0.98rem;
}

.nb-post-nav a {
	color: var( --nb-muted );
	text-decoration: none;
}

.nb-post-nav a:hover {
	color: var( --nb-accent );
}

/* ------------------------------------------------------------- pages */

.nb-prose > * {
	max-width: 68ch;
}

.nb-prose p,
.nb-prose li {
	color: var( --nb-body );
}

.nb-prose strong {
	color: var( --nb-text );
	font-weight: 600;
}

.nb-prose h2 {
	margin-top: 3rem;
	font-size: 1.6rem;
	letter-spacing: -0.02em;
}

.nb-prose h3 {
	margin-top: 2rem;
	font-size: 1.2rem;
}

.nb-prose a:not( .wp-element-button ) {
	text-decoration: underline;
	text-decoration-color: rgba( 255, 178, 36, 0.45 );
}

.nb-meta-line {
	margin-top: 0.4rem !important;
	font-size: 0.92rem;
	color: var( --nb-muted ) !important;
}

/* Projects */
.nb-project {
	padding-block: clamp( 2.25rem, 5vw, 3.25rem );
	border-top: 1px solid var( --nb-line );
}

.nb-project:first-of-type {
	border-top: 0;
	padding-top: 0;
}

.nb-project > * {
	max-width: 68ch;
}

.nb-project > .nb-wide-media,
.nb-project > .nb-facts,
.nb-project > .nb-photo-pair {
	max-width: none;
}

.nb-project h2 {
	margin: 0;
	font-size: clamp( 1.6rem, 3vw, 2.1rem );
	line-height: 1.12;
	letter-spacing: -0.025em;
}

.nb-project h3 {
	margin: 2.5rem 0 0;
	font-size: 1.3rem;
	line-height: 1.25;
}

.nb-project h3 + * {
	margin-top: 0.9rem !important;
}

.nb-project p {
	color: var( --nb-body );
}

.nb-facts {
	display: grid !important;
	grid-template-columns: repeat( 4, minmax( 0, 1fr ) );
	gap: 0 !important;
	margin-block: 1.75rem !important;
	border-top: 1px solid var( --nb-line );
	border-bottom: 1px solid var( --nb-line );
}

.nb-fact {
	margin: 0 !important;
	padding: 1rem 1rem 1rem 0;
}

.nb-fact + .nb-fact {
	padding-left: 1rem;
	border-left: 1px solid var( --nb-line );
}

.nb-fact > * {
	margin: 0 !important;
}

.nb-fact-n {
	font-size: clamp( 1.6rem, 3.4vw, 2.3rem );
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.02em;
	color: var( --nb-text ) !important;
}

.nb-fact-l {
	margin-top: 0.45rem !important;
	font-size: 0.9rem;
	line-height: 1.4;
	color: var( --nb-muted ) !important;
}

.nb-sources {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var( --nb-line );
}

.nb-sources li {
	margin: 0 !important;
	padding: 0.75rem 0;
	border-bottom: 1px solid var( --nb-line );
	font-size: 0.98rem;
	color: var( --nb-muted );
}

.nb-sources a {
	font-weight: 600;
	color: var( --nb-text );
	text-decoration: underline;
	text-decoration-color: var( --nb-line );
}

.nb-sources a:hover {
	color: var( --nb-accent );
	text-decoration-color: var( --nb-accent );
}

/* Contact */
.nb-contact-grid {
	gap: clamp( 2rem, 6vw, 4.5rem ) !important;
}

.nb-contact-notes > * + * {
	margin-top: 1.75rem !important;
}

.nb-note {
	padding-top: 1.1rem;
	border-top: 1px solid var( --nb-line );
}

.nb-note > * {
	margin: 0 !important;
}

.nb-note h3 {
	font-size: 1.05rem;
	margin-bottom: 0.4rem !important;
}

.nb-note p {
	font-size: 0.98rem;
	line-height: 1.6;
	color: var( --nb-body );
}

.nb-note p + p {
	margin-top: 0.5rem !important;
}

/* SureForms, mapped onto the theme */
.srfm-form-container,
.srfm-form-container * {
	--srfm-color-scheme-primary: var( --nb-accent );
	--srfm-color-scheme-text-on-primary: var( --nb-bg );
	--srfm-color-input-label: var( --nb-text );
	--srfm-color-input-text: var( --nb-text );
	--srfm-color-input-placeholder: #7d8590;
	--srfm-color-input-background: var( --nb-surface );
	--srfm-color-input-border: var( --nb-line );
	--srfm-color-input-prefix: var( --nb-muted );
	--srfm-color-input-description: var( --nb-muted );
	--srfm-color-input-label-required: var( --nb-accent );
	--srfm-color-input-background-disabled: var( --nb-surface );
}

.srfm-form-container {
	background: transparent;
	padding: 0;
	font-family: var( --nb-sans );
}

.nb-contact-form-col .srfm-form-container,
.nb-contact-form-col form {
	background: transparent !important;
}

.srfm-form-container .srfm-block-wrap label,
.srfm-form-container .srfm-block label {
	font-family: var( --nb-sans );
	font-size: 0.95rem !important;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
	color: var( --nb-text ) !important;
	margin-bottom: 0.4rem;
}

.srfm-form-container input[type="text"],
.srfm-form-container input[type="email"],
.srfm-form-container input[type="tel"],
.srfm-form-container input[type="url"],
.srfm-form-container input[type="number"],
.srfm-form-container textarea,
.srfm-form-container select {
	background: var( --nb-surface ) !important;
	border: 1px solid #3a424e !important;
	border-radius: var( --nb-radius ) !important;
	color: var( --nb-text ) !important;
	font-family: var( --nb-sans ) !important;
	font-size: 1rem !important;
	padding: 0.75rem 0.9rem !important;
	box-shadow: none !important;
	transition: border-color 0.15s ease;
}

.srfm-form-container input:focus,
.srfm-form-container textarea:focus,
.srfm-form-container select:focus {
	border-color: var( --nb-accent ) !important;
	box-shadow: 0 0 0 1px var( --nb-accent ) !important;
	outline: none !important;
}

.srfm-form-container ::placeholder {
	color: #7d8590 !important;
	opacity: 1;
}

.srfm-form-container .srfm-description,
.srfm-form-container .srfm-error-message {
	font-family: var( --nb-sans );
	font-size: 0.86rem;
}

.srfm-form-container .srfm-submit-button button,
.srfm-form-container button.srfm-button,
.srfm-form-container .srfm-submit-richtext,
.srfm-form-container button[type="submit"] {
	background: var( --nb-accent ) !important;
	background-image: none !important;
	border: 1px solid var( --nb-accent ) !important;
	border-radius: var( --nb-radius ) !important;
	color: var( --nb-bg ) !important;
	font-family: var( --nb-sans ) !important;
	font-size: 1rem !important;
	font-weight: 600 !important;
	letter-spacing: 0;
	padding: 0.8rem 1.4rem !important;
	box-shadow: none !important;
	transition: background-color 0.15s ease;
}

.srfm-form-container .srfm-submit-button button:hover,
.srfm-form-container button[type="submit"]:hover {
	background: #ffc75a !important;
	border-color: #ffc75a !important;
	color: var( --nb-bg ) !important;
}

.srfm-form-container input[type="checkbox"] {
	accent-color: var( --nb-accent );
	width: 1rem;
	height: 1rem;
}

.srfm-form-container .srfm-gdpr-block label,
.srfm-form-container .srfm-checkbox-label {
	text-transform: none !important;
	letter-spacing: 0 !important;
	font-family: var( --nb-sans ) !important;
	font-size: 0.92rem !important;
	font-weight: 400 !important;
	color: var( --nb-muted ) !important;
}

.srfm-success-box,
.srfm-single-form .srfm-success-box {
	background: var( --nb-surface ) !important;
	border: 1px solid rgba( 67, 201, 122, 0.45 ) !important;
	color: var( --nb-text ) !important;
	border-radius: var( --nb-radius ) !important;
}

/* 404 */
.nb-404 .wp-block-search__input {
	background: var( --nb-surface );
	border: 1px solid #3a424e;
	border-radius: var( --nb-radius );
	color: var( --nb-text );
	padding: 0.7rem 0.9rem;
	font-family: var( --nb-sans );
	font-size: 1rem;
}

.nb-404 .wp-block-search__inside-wrapper {
	gap: 0.5rem;
	max-width: 32rem;
}

.nb-404 .wp-block-search__button {
	margin-left: 0;
	background: var( --nb-accent );
	color: var( --nb-bg );
	border: 1px solid var( --nb-accent );
}

/* ------------------------------------------------------------- footer */

.nb-footer {
	padding-block: 3rem 2.5rem;
	border-top: 1px solid var( --nb-line );
}

.nb-footer-top {
	gap: 2rem;
	align-items: flex-start;
}

.nb-footer-brand {
	gap: 0.3rem !important;
}

.nb-footer-name {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 600;
	color: var( --nb-text );
}

.nb-footer-tag,
.nb-footer-meta {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var( --nb-muted );
}

.nb-footer-links {
	gap: 1.5rem !important;
	font-size: 0.95rem;
}

.nb-footer-links p {
	margin: 0;
}

.nb-footer-links a {
	color: var( --nb-muted );
	text-decoration: none;
	transition: color 0.15s ease;
}

.nb-footer-links a:hover {
	color: var( --nb-text );
}

.nb-footer-meta a {
	color: var( --nb-muted );
	text-decoration: underline;
	text-decoration-color: var( --nb-line );
}

.nb-footer-meta a:hover {
	color: var( --nb-text );
}

.nb-footer .nb-rule {
	margin-block: 2rem 1.5rem;
}

.nb-footer-bottom {
	gap: 0.75rem 2rem;
}

/* ------------------------------------------------------------- motion */

@media ( prefers-reduced-motion: reduce ) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* ------------------------------------------------------------- responsive */

@media ( max-width: 900px ) {
	.nb-sec-grid {
		grid-template-columns: minmax( 0, 1fr );
	}

	.nb-sec-title {
		position: static;
	}

	.nb-cap {
		grid-template-columns: minmax( 0, 1fr );
		row-gap: 0.4rem;
	}

	.nb-facts {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}

	.nb-fact:nth-child( 3 ) {
		padding-left: 0;
		border-left: 0;
	}

	.nb-fact:nth-child( n + 3 ) {
		border-top: 1px solid var( --nb-line );
	}
}

@media ( max-width: 781px ) {
	.nb-header {
		padding-block: 0.7rem;
	}

	.nb-brand-sub {
		display: none;
	}

	.nb-hero {
		padding-block: 2.5rem 3rem;
	}

	.nb-hero-cols {
		gap: 1.5rem !important;
	}

	.nb-hero-portrait-col {
		order: -1;
		justify-content: flex-start;
	}

	.nb-portrait img {
		max-width: 112px;
	}

	.nb-hero-sub {
		font-size: 1.08rem;
	}

	.nb-record td:first-child {
		width: auto;
	}

	.nb-record thead {
		display: none;
	}

	.nb-record tr {
		display: grid;
		grid-template-columns: minmax( 0, 1fr ) auto;
		column-gap: 1rem;
		padding-block: 0.85rem;
		border-bottom: 1px solid var( --nb-line );
	}

	.nb-record td {
		padding: 0;
		border: 0;
	}

	.nb-record td:nth-child( 2 ) {
		grid-column: 1 / -1;
		grid-row: 2;
		margin-top: 0.25rem;
		font-size: 0.95rem;
	}

	.nb-photo-pair {
		grid-template-columns: minmax( 0, 1fr );
	}

	.nb-entry {
		grid-template-columns: minmax( 0, 1fr );
		row-gap: 0.3rem;
	}

	.nb-entry .wp-block-post-date {
		grid-row: auto;
		padding-top: 0;
	}

	.nb-post-row {
		grid-template-columns: minmax( 0, 1fr );
		row-gap: 0.9rem;
	}

	.nb-post-row-body {
		grid-column: auto;
	}

	.nb-post-row .wp-block-post-featured-image {
		aspect-ratio: 16 / 9;
	}

	.nb-footer-top,
	.nb-footer-bottom {
		flex-direction: column;
		align-items: flex-start;
	}

	.nb-post-hero img {
		max-height: 260px;
	}
}

@media ( max-width: 480px ) {
	.nb-facts {
		grid-template-columns: minmax( 0, 1fr ) minmax( 0, 1fr );
	}

	.nb-footer-links {
		gap: 1rem !important;
	}
}

/* ------------------------------------------------------------- motion
   Two moments, both additive. Everything below is skipped for visitors who
   ask for reduced motion, and the pages read fine without JavaScript. */

@media ( prefers-reduced-motion: no-preference ) {
	.nb-hero .nb-hero-sub,
	.nb-hero .nb-hero-status,
	.nb-hero .nb-actions,
	.nb-hero .nb-portrait {
		animation: nb-rise 0.9s cubic-bezier( 0.2, 0.7, 0.15, 1 ) both;
	}

	.nb-hero .nb-hero-sub {
		animation-delay: 0.45s;
	}

	.nb-hero .nb-hero-status {
		animation-delay: 0.55s;
	}

	.nb-hero .nb-actions {
		animation-delay: 0.65s;
	}

	.nb-hero .nb-portrait {
		animation: nb-pop 1.1s cubic-bezier( 0.2, 0.7, 0.15, 1 ) 0.2s both;
	}

	.nb-hero-title.is-split .nb-w {
		display: inline-block;
		overflow: hidden;
		vertical-align: top;
		padding-bottom: 0.14em;
		margin-bottom: -0.14em;
	}

	.nb-hero-title.is-split .nb-w > span {
		display: inline-block;
		transform: translateY( 108% );
		animation: nb-word 0.95s cubic-bezier( 0.2, 0.75, 0.12, 1 ) forwards;
		animation-delay: calc( var( --i ) * 55ms + 60ms );
	}

	.nb-bugnote {
		animation: nb-fade 0.6s ease 1.3s both;
	}
}

@keyframes nb-rise {
	from {
		opacity: 0;
		transform: translateY( 16px );
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes nb-pop {
	from {
		opacity: 0;
		transform: scale( 0.94 );
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes nb-word {
	to {
		transform: none;
	}
}

@keyframes nb-fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Home hero: salt stops bugs */
.nb-hero.has-bugs {
	position: relative;
	isolation: isolate;
	overflow: hidden;
}

.nb-bugfield {
	position: absolute;
	inset: 0;
	z-index: -1;
	display: block;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.nb-bugnote {
	min-height: 1.5em;
	margin: 2.25rem 0 0 !important;
	font-family: var( --nb-mono );
	font-size: 0.8rem;
	letter-spacing: 0;
	color: var( --nb-muted );
}

/* About: the terminal */
.nb-term-mount:empty {
	display: none;
}

.nb-term-mount {
	margin-block: 2.25rem 2.75rem !important;
	max-width: 46rem !important;
}

.nb-term {
	overflow: hidden;
	font-variant-ligatures: none;
	background: #0c0e12;
	border: 1px solid var( --nb-line );
	border-radius: var( --nb-radius );
	font-family: var( --nb-mono );
	font-size: 0.86rem;
	line-height: 1.6;
	color: var( --nb-body );
}

.nb-term-bar {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.5rem 0.9rem;
	border-bottom: 1px solid var( --nb-line );
	background: var( --nb-surface );
	font-size: 0.76rem;
	color: var( --nb-muted );
}

.nb-term-hint {
	color: var( --nb-accent );
}

.nb-term-body {
	height: 21rem;
	padding: 0.85rem 0.95rem 1rem;
	overflow-y: auto;
	cursor: text;
	scrollbar-width: thin;
	scrollbar-color: var( --nb-line ) transparent;
}

.nb-t-line {
	min-height: 1.6em;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.nb-t-prompt,
.nb-term-prompt {
	color: var( --nb-accent );
}

.nb-t-k {
	color: var( --nb-text );
}

.nb-t-dir {
	color: var( --nb-signal );
}

.nb-t-dim {
	color: var( --nb-muted );
}

.nb-term a {
	color: var( --nb-accent );
	text-decoration: underline;
	text-decoration-color: rgba( 255, 178, 36, 0.45 );
}

.nb-term-line {
	display: flex;
	align-items: baseline;
	gap: 1ch;
	margin: 0;
}

.nb-term-prompt {
	flex: none;
	white-space: nowrap;
}

.nb-term-line input {
	flex: 1;
	min-width: 0;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	outline: 0;
	border-radius: 0;
	box-shadow: none;
	font: inherit;
	color: var( --nb-text );
	caret-color: var( --nb-accent );
}

.nb-term:focus-within {
	border-color: #3a414b;
}

.nb-term-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin-top: 0.8rem;
}

.nb-term-chips button {
	padding: 0.32rem 0.7rem;
	background: transparent;
	border: 1px solid var( --nb-line );
	border-radius: 4px;
	font-family: var( --nb-mono );
	font-size: 0.78rem;
	color: var( --nb-muted );
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.nb-term-chips button:hover {
	color: var( --nb-text );
	border-color: #3a414b;
}

@media ( max-width: 781px ) {
	.nb-term-body {
		height: 18rem;
	}

	.nb-term-line input {
		font-size: 16px;
	}

	.nb-term-prompt {
		font-size: 0.78rem;
	}

	.nb-term-hint {
		display: none;
	}
}

/* Small touches */
@media ( prefers-reduced-motion: no-preference ) {
	body:not( .page-id-563 ) .nb-page-head > *,
	.nb-single .nb-post-head > * {
		animation: nb-rise 0.7s cubic-bezier( 0.2, 0.7, 0.15, 1 ) both;
	}

	body:not( .page-id-563 ) .nb-page-head > * + *,
	.nb-single .nb-post-head > * + * {
		animation-delay: 0.08s;
	}

	.nb-post-row .wp-block-post-featured-image img {
		transition: transform 0.6s cubic-bezier( 0.2, 0.7, 0.15, 1 );
	}

	.nb-post-row:hover .wp-block-post-featured-image img {
		transform: scale( 1.04 );
	}

	.nb-photo img {
		transition: filter 0.3s ease;
	}

	.nb-photo a:hover img {
		filter: brightness( 1.08 );
	}
}

.nb-record tbody tr {
	transition: background-color 0.15s ease;
}

.nb-record tbody tr:hover {
	background: var( --nb-surface );
}

/* About: terminal or short CV */
.nb-view-tabs {
	display: flex;
	gap: 0.3rem;
	margin: 2.25rem 0 0.7rem !important;
	font-family: var( --nb-mono );
	font-size: 0.78rem;
}

.nb-view-tabs button {
	padding: 0.3rem 0.75rem;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 4px;
	font: inherit;
	color: var( --nb-muted );
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.nb-view-tabs button:hover {
	color: var( --nb-text );
}

.nb-view-tabs button[aria-pressed="true"] {
	color: var( --nb-text );
	background: var( --nb-surface );
	border-color: var( --nb-line );
}

.nb-view-tabs ~ .nb-term-mount,
.nb-view-tabs ~ .nb-tldr {
	margin-top: 0 !important;
}

.nb-term-mount.is-off,
.nb-tldr.is-off {
	display: none !important;
}

.nb-term-skip {
	margin: -0.2rem -0.45rem -0.2rem 0;
	padding: 0.2rem 0.45rem;
	background: transparent;
	border: 0;
	border-radius: 4px;
	font: inherit;
	color: var( --nb-muted );
	cursor: pointer;
}

.nb-term-skip:hover {
	color: var( --nb-text );
	background: var( --nb-surface-2 );
}

.nb-tldr {
	box-sizing: border-box;
	margin-block: 2.25rem 2.75rem !important;
	max-width: 46rem !important;
	padding: 1.35rem 1.5rem 1.5rem;
	background: var( --nb-surface );
	border: 1px solid var( --nb-line );
	border-radius: var( --nb-radius );
}

.nb-tldr:focus {
	outline: none;
}

.nb-tldr > * {
	max-width: none !important;
}

.nb-tldr-head {
	margin: 0 0 1rem !important;
	font-size: 1.05rem;
	line-height: 1.55;
	color: var( --nb-body );
}

.nb-tldr-head strong {
	color: var( --nb-text );
	font-weight: 600;
}

.nb-cv {
	margin: 0 !important;
	overflow: visible;
}

.nb-cv table {
	width: 100%;
	table-layout: auto !important;
	border-collapse: collapse;
	font-size: 0.95rem;
	line-height: 1.55;
}

.nb-cv th,
.nb-cv td {
	padding: 0.65rem 0;
	border: 0 !important;
	border-top: 1px solid var( --nb-line ) !important;
	vertical-align: top;
	text-align: left;
}

.nb-cv th {
	width: 7.5rem;
	padding-top: 0.8rem;
	padding-right: 1rem;
	font-family: var( --nb-mono );
	font-size: 0.74rem;
	font-weight: 500;
	color: var( --nb-muted );
}

.nb-cv td {
	color: var( --nb-body );
}

.nb-cv td strong {
	color: var( --nb-text );
	font-weight: 600;
}

.nb-tldr .nb-actions {
	margin-top: 1.25rem !important;
}

@media ( max-width: 600px ) {
	.nb-tldr {
		padding: 1.1rem 1.1rem 1.25rem;
	}

	.nb-cv tr {
		display: block;
		padding: 0.65rem 0;
		border-top: 1px solid var( --nb-line );
	}

	.nb-cv th,
	.nb-cv td {
		display: block;
		width: auto;
		padding: 0;
		border: 0 !important;
	}

	.nb-cv th {
		margin-bottom: 0.15rem;
	}
}

.nb-t-flag {
	color: var( --nb-accent );
	font-weight: 600;
}

.nb-term.is-pwned {
	border-color: var( --nb-accent-deep );
}

.nb-footer-flag {
	margin: 0.85rem 0 0 !important;
	font-family: var( --nb-mono );
	font-size: 0.76rem;
	color: var( --nb-muted );
}

.nb-footer-flag code {
	padding: 0;
	background: none;
	font-size: inherit;
	color: var( --nb-text );
}
