:root {
    color-scheme: dark;
    --bg: #071019;
    --surface: rgba(9, 19, 29, 0.86);
    --surface-strong: rgba(13, 25, 38, 0.96);
    --text: #f3f7f6;
    --muted: #88939e;
    --line: rgba(116, 138, 154, 0.28);
    --accent: #20d7ff;
    --accent-dark: #12a8c7;
    --lime: #b8ff3d;
    --soft: rgba(32, 215, 255, 0.08);
    --grid-line: rgba(55, 80, 98, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
        radial-gradient(circle at 76% 66%, rgba(32, 215, 255, 0.13), transparent 22%),
        var(--bg);
    background-size: 96px 96px, 96px 96px, 100% 100%, auto;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

a,
button,
h1,
h2,
h3,
p,
span,
b,
dd,
dt,
li {
    overflow-wrap: break-word;
    word-break: normal;
}

a {
    color: inherit;
}

main {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding-top: 88px;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 20;
    width: 100%;
    min-height: 76px;
    background: rgba(7, 16, 25, 0.9);
    border-bottom: 1px solid rgba(116, 138, 154, 0.16);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1120px, calc(100% - 32px));
    min-height: 76px;
    margin: 0 auto;
}

.identity {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
}

.monogram {
    font-size: 30px;
    font-weight: 900;
}

.identity-rule {
    width: 2px;
    height: 34px;
    background: var(--accent);
    box-shadow: 0 0 14px rgba(32, 215, 255, 0.7);
}

.identity-name {
    font-size: 20px;
    font-weight: 800;
}

nav {
    display: flex;
    align-items: center;
    gap: 34px;
}

nav a {
    color: rgba(243, 247, 246, 0.58);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
}

nav a:hover,
nav a.active {
    color: var(--text);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.7fr);
    gap: 42px;
    align-items: center;
    min-height: 620px;
    padding: 46px 0 68px;
}

.eyebrow,
.section-label,
.panel-row,
.radar-card,
.project-index,
.project-state,
.pipeline,
.contact-links {
    font-family: Consolas, "Courier New", monospace;
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--lime);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 18px;
    font-size: clamp(58px, 9vw, 94px);
    line-height: 0.92;
    letter-spacing: 0;
}

.role {
    margin-bottom: 14px;
    color: var(--accent);
    font-size: 26px;
    font-weight: 900;
}

.intro {
    max-width: 620px;
    margin-bottom: 0;
    color: #a5afb9;
    font-size: 18px;
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.primary-cta,
.secondary-cta,
.project-link,
.contact-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 6px;
    font-weight: 900;
    text-decoration: none;
}

.primary-cta,
.project-link {
    border: 1px solid transparent;
    background: var(--accent);
    color: #061018;
    box-shadow: 0 0 24px rgba(32, 215, 255, 0.24);
}

.secondary-cta,
.contact-links a {
    border: 1px solid rgba(32, 215, 255, 0.72);
    background: rgba(32, 215, 255, 0.08);
    color: var(--text);
}

.hero-panel,
.project-card,
.skills-grid > div,
.contact-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(12px);
}

.hero-panel {
    display: grid;
    min-width: 0;
    gap: 12px;
    padding: 18px;
}

.panel-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(116, 138, 154, 0.18);
    color: var(--muted);
    font-size: 13px;
}

.panel-row b {
    min-width: 0;
    color: var(--text);
    text-align: right;
}

.radar-card {
    display: grid;
    gap: 10px;
    min-height: 180px;
    margin-top: 8px;
    padding: 18px;
    border: 1px solid rgba(32, 215, 255, 0.32);
    border-radius: 8px;
    background:
        radial-gradient(circle at 50% 64%, rgba(32, 215, 255, 0.18), transparent 36%),
        repeating-radial-gradient(circle at 50% 64%, transparent 0 28px, rgba(32, 215, 255, 0.16) 29px 30px);
    color: rgba(154, 166, 177, 0.72);
    font-size: 13px;
}

.content-section {
    padding: 92px 0;
    border-top: 1px solid rgba(116, 138, 154, 0.18);
}

.section-label {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.section-label span {
    color: var(--accent);
}

.about-grid,
.section-heading-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
    gap: 42px;
    align-items: start;
}

h2 {
    margin-bottom: 0;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1;
}

.about-copy,
.section-heading-row > p,
.contact-panel p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.facts {
    display: grid;
    gap: 10px;
    margin: 28px 0 0;
}

.facts div {
    display: grid;
    grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(116, 138, 154, 0.18);
}

.facts dt {
    color: var(--accent);
    font-family: Consolas, "Courier New", monospace;
}

.facts dd {
    margin: 0;
    color: var(--text);
    font-weight: 800;
    text-align: right;
    overflow-wrap: normal;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 34px;
}

.secondary-projects {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
}

.project-card {
    display: grid;
    grid-template-rows: auto minmax(220px, auto) 1fr;
    gap: 16px;
    min-height: 500px;
    min-width: 0;
    padding: 18px;
}

.featured-project {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 22px;
    min-height: 430px;
}

.featured-project .project-topline {
    grid-column: 1 / -1;
}

.featured-project .project-visual {
    min-height: 320px;
}

.project-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.project-index {
    color: var(--accent);
    font-size: 13px;
}

.project-state {
    color: var(--lime);
    font-size: 12px;
}

.project-visual {
    position: relative;
    display: grid;
    min-height: 240px;
    min-width: 0;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(32, 215, 255, 0.16);
    border-radius: 8px;
    background:
        linear-gradient(rgba(32, 215, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(32, 215, 255, 0.06) 1px, transparent 1px),
        rgba(5, 13, 22, 0.54);
    background-size: 32px 32px;
}

.secondary-projects .project-card {
    min-height: 390px;
}

.secondary-projects .project-visual {
    min-height: 170px;
}

.mini-sudoku {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    width: min(210px, 72%);
    aspect-ratio: 1;
    border: 2px solid var(--accent);
    background: var(--accent);
}

.mini-sudoku span {
    display: grid;
    place-items: center;
    border-right: 1px solid rgba(32, 215, 255, 0.38);
    border-bottom: 1px solid rgba(32, 215, 255, 0.38);
    background: #0d1722;
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.language-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.language-list span {
    padding: 6px 9px;
    border: 1px solid rgba(32, 215, 255, 0.34);
    border-radius: 999px;
    background: rgba(32, 215, 255, 0.08);
    color: var(--text);
    font-size: 13px;
    line-height: 1;
}

.pipeline {
    position: absolute;
    left: 16px;
    top: 16px;
    display: grid;
    gap: 8px;
}

.pipeline span {
    padding: 7px 9px;
    border: 1px solid rgba(32, 215, 255, 0.45);
    border-radius: 6px;
    color: var(--lime);
    font-size: 11px;
    font-weight: 900;
}

.flow-visual,
.server-visual {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.flow-node,
.server-node,
.json-card,
.receipt-card {
    border: 1px solid rgba(32, 215, 255, 0.42);
    border-radius: 8px;
    background: rgba(7, 16, 25, 0.86);
    color: var(--text);
    font-weight: 900;
}

.flow-node,
.server-node {
    width: min(100%, 230px);
    min-width: 0;
    padding: 13px 18px;
    text-align: center;
}

.accent {
    color: var(--lime);
}

.receipt-visual {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 20px;
}

.receipt-card {
    display: grid;
    gap: 9px;
    width: 100%;
    padding: 18px;
    font-family: Consolas, "Courier New", monospace;
}

.receipt-card i {
    height: 1px;
    background: rgba(32, 215, 255, 0.5);
}

.json-card {
    padding: 18px;
    color: var(--lime);
    font-family: Consolas, "Courier New", monospace;
}

.project-body h3 {
    margin-bottom: 10px;
    font-size: 28px;
    line-height: 1.1;
}

.secondary-projects .project-body h3 {
    font-size: 23px;
}

.project-body p {
    color: var(--muted);
    line-height: 1.6;
}

.project-body ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.project-body li {
    padding: 8px 10px;
    border: 1px solid rgba(116, 138, 154, 0.24);
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
}

.project-link {
    width: max-content;
    margin-top: 18px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.learning-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 34px;
}

.learning-grid > div {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(9, 19, 29, 0.62);
}

.learning-grid span {
    color: var(--lime);
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    font-weight: 900;
}

.learning-grid h3 {
    margin: 14px 0 10px;
    color: var(--text);
}

.learning-grid p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.6;
}

.skills-grid > div {
    padding: 20px;
}

.skills-grid h3 {
    color: var(--accent);
}

.skills-grid p {
    color: var(--muted);
    line-height: 1.6;
}

.contact-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 26px;
    align-items: end;
    padding: 24px;
    min-width: 0;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 920px) {
    main {
        width: min(100% - 24px, 1120px);
        padding-top: 112px;
    }

    .site-header {
        min-height: 96px;
    }

    .header-inner {
        align-items: center;
        flex-direction: row;
        gap: 14px;
        width: min(100% - 24px, 1120px);
        min-height: 96px;
        padding: 10px 0;
    }

    nav {
        display: flex;
        flex: 1;
        justify-content: flex-end;
        min-width: 0;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    nav::-webkit-scrollbar {
        display: none;
    }

    nav a {
        flex: 0 0 auto;
        padding: 9px 6px;
        border: 1px solid var(--line);
        border-radius: 6px;
        background: rgba(9, 19, 29, 0.58);
        text-align: center;
    }

    .hero,
    .about-grid,
    .section-heading-row,
    .contact-panel {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        max-width: 620px;
    }

    .project-grid,
    .secondary-projects,
    .learning-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .section-heading-row {
        grid-template-columns: 1fr;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        min-height: auto;
    }
}

@media (max-width: 760px) {
    .facts dd {
        text-align: left;
    }

    .language-list {
        justify-content: flex-start;
    }

    .section-heading-row > p {
        max-width: 620px;
    }
}

@media (max-width: 560px) {
    main {
        width: min(100% - 16px, 1120px);
        padding-top: 126px;
    }

    .site-header {
        min-height: 112px;
    }

    .header-inner {
        align-items: stretch;
        flex-direction: column;
        justify-content: center;
        width: min(100% - 16px, 1120px);
        min-height: 112px;
        gap: 12px;
    }

    nav {
        width: 100%;
        justify-content: space-between;
        gap: 6px;
        overflow-x: visible;
        padding-bottom: 0;
    }

    nav a {
        flex: 1 1 0;
        min-width: 0;
        padding: 8px 4px;
        font-size: 12px;
    }

    .identity {
        width: 100%;
    }

    .identity-name {
        flex: 1;
    }

    h1 {
        font-size: 44px;
    }

    h2 {
        font-size: 30px;
    }

    .role {
        font-size: 19px;
    }

    .hero {
        min-height: auto;
        padding: 28px 0 48px;
    }

    .intro,
    .about-copy,
    .section-heading-row > p,
    .contact-panel p {
        font-size: 15px;
    }

    .hero-panel,
    .project-card,
    .skills-grid > div,
    .contact-panel,
    .learning-grid > div {
        padding: 14px;
    }

    .radar-card {
        min-height: 128px;
    }

    .hero-actions,
    .contact-links {
        display: grid;
        grid-template-columns: 1fr;
    }

    .project-card {
        grid-template-rows: auto auto auto;
        min-height: auto;
        padding: 14px;
    }

    .featured-project {
        grid-template-columns: 1fr;
    }

    .project-visual {
        min-height: 190px;
    }

    .featured-project .project-visual {
        min-height: 230px;
    }

    .mini-sudoku {
        width: min(178px, 68%);
    }

    .mini-sudoku span {
        font-size: 11px;
    }

    .pipeline {
        left: 10px;
        top: 10px;
        gap: 5px;
    }

    .pipeline span {
        padding: 5px 7px;
        font-size: 9px;
    }

    .receipt-visual {
        grid-template-columns: 1fr;
    }

    .facts div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .facts dd {
        text-align: left;
    }
}

@media (max-width: 380px) {
    h1 {
        font-size: 38px;
    }

    h2 {
        font-size: 27px;
    }

    .identity-name {
        font-size: 16px;
    }

    .monogram {
        font-size: 25px;
    }

    .identity-rule {
        height: 28px;
    }

    .project-body h3 {
        font-size: 22px;
    }

    nav {
        justify-content: flex-start;
        overflow-x: auto;
    }

    nav a {
        flex: 0 0 auto;
        min-width: 74px;
    }
}
