:root {
    color-scheme: dark;
    font-family: Consolas, "Courier New", monospace;
    background: #050a07;
    color: #849386;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    --green: #00f477;
    --muted-green: #00a94f;
    --line: rgba(0, 244, 119, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(ellipse at 28% 0%, rgba(0, 115, 49, 0.16), transparent 36rem),
        radial-gradient(ellipse at 88% 28%, rgba(0, 115, 49, 0.12), transparent 32rem),
        radial-gradient(ellipse at 12% 58%, rgba(0, 115, 49, 0.1), transparent 34rem),
        radial-gradient(ellipse at 78% 88%, rgba(0, 115, 49, 0.12), transparent 36rem),
        #050a07;
}

a {
    color: inherit;
}

.page-width {
    width: min(100% - 2 * clamp(24px, 5.8vw, 88px), 1400px);
    margin-inline: auto;
}

.site-header {
    min-height: 88px;
    padding: 0 clamp(28px, 5.8vw, 88px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 244, 119, 0.08);
}

.brand {
    color: var(--green);
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    text-shadow: 0 0 12px rgba(0, 244, 119, 0.5);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: clamp(20px, 3vw, 44px);
}

.nav-toggle {
    display: none;
}

.nav-link {
    color: #849386;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: color 160ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
    color: var(--green);
}

.hero {
    min-height: 645px;
    padding-block: 20px 82px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 400px);
    gap: clamp(42px, 7vw, 100px);
    align-items: center;
}

.hero-copy {
    min-width: 0;
}

.boot-message,
.section-command {
    margin: 0 0 28px;
    color: var(--muted-green);
    font-size: 14px;
    letter-spacing: 0.02em;
}

h1 {
    margin: 0;
    color: var(--green);
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(58px, 7.5vw, 112px);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 1.08;
    text-shadow: 0 0 24px rgba(0, 244, 119, 0.38);
}

.role {
    margin: 30px 0 38px;
    color: var(--green);
    font-size: clamp(19px, 2vw, 26px);
    font-weight: 700;
    line-height: 1.4;
}

.cursor {
    display: inline-block;
    width: 14px;
    height: 1.05em;
    margin-left: 9px;
    vertical-align: -0.16em;
    background: var(--green);
    box-shadow: 0 0 12px rgba(0, 244, 119, 0.65);
    animation: blink 1.1s steps(2, start) infinite;
}

.intro {
    max-width: 860px;
    margin: 0;
    font-size: clamp(17px, 1.55vw, 21px);
    line-height: 1.62;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 52px;
}

.button {
    min-height: 53px;
    padding: 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 244, 119, 0.24);
    border-radius: 4px;
    color: #849386;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button-primary,
.button:hover,
.button:focus-visible {
    border: 2px solid var(--green);
    color: var(--green);
    box-shadow: 0 0 16px rgba(0, 244, 119, 0.3);
}

.button-primary:hover,
.button-primary:focus-visible {
    background: rgba(0, 244, 119, 0.08);
}

.system-monitor {
    width: 100%;
    padding: 20px;
    align-self: center;
    border: 1px solid rgba(0, 244, 119, 0.3);
    border-radius: 10px;
    background: rgba(0, 17, 8, 0.88);
    box-shadow: 0 0 34px rgba(0, 244, 119, 0.07);
    font-size: 12px;
    line-height: 1.6;
}

.monitor-heading {
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 244, 119, 0.2);
    color: var(--green);
    font-weight: 700;
}

.status-light {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px rgba(0, 244, 119, 0.6);
}

.monitor-boot {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 244, 119, 0.2);
    color: #748276;
}

.monitor-boot p,
.monitor-terminal p {
    margin: 0;
}

.monitor-terminal {
    padding-top: 10px;
    color: var(--green);
}

.prompt {
    color: var(--green);
}

.output {
    color: #00d8ff;
}

.console-typing.is-typing::after {
    color: currentColor;
    content: "▋";
    animation: blink 700ms steps(2, start) infinite;
}

.content-section {
    padding-block: 56px 72px;
    scroll-margin-top: 24px;
}

.section-heading {
    position: relative;
    margin-bottom: 50px;
    border-bottom: 1px solid rgba(0, 244, 119, 0.15);
}

.section-command {
    margin-bottom: 6px;
}

.section-heading h2 {
    position: relative;
    width: fit-content;
    margin: 0 0 -1px;
    padding-right: 18px;
    border-bottom: 1px solid rgba(0, 244, 119, 0.15);
    color: var(--green);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.2;
    text-shadow: 0 0 18px rgba(0, 244, 119, 0.25);
}

.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(48px, 9vw, 140px);
    align-items: start;
}

.about-copy {
    font-size: 15px;
    line-height: 1.7;
}

.about-copy p {
    margin: 0 0 24px;
}

.timeline {
    display: grid;
    gap: 30px;
}

.timeline-entry {
    position: relative;
    padding-left: 28px;
    border-left: 1px solid rgba(0, 244, 119, 0.35);
    font-size: 12px;
    line-height: 1.55;
}

.timeline-entry::before {
    position: absolute;
    top: 2px;
    left: -6px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px rgba(0, 244, 119, 0.65);
    content: "";
}

.timeline-entry p {
    margin: 0;
}

.timeline-date {
    color: var(--muted-green);
    font-size: 11px;
}

.timeline-entry h3 {
    margin: 2px 0;
    color: var(--green);
    font-size: 14px;
}

.timeline-place {
    margin-bottom: 4px !important;
    color: #687769;
}

.skill-tabs {
    width: fit-content;
    max-width: 100%;
    margin-bottom: 40px;
    display: flex;
    border: 1px solid rgba(0, 244, 119, 0.25);
}

.skill-tab {
    min-height: 44px;
    padding: 0 clamp(14px, 2vw, 28px);
    border: 0;
    border-right: 1px solid rgba(0, 244, 119, 0.2);
    background: transparent;
    color: #687769;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.skill-tab:last-child {
    border-right: 0;
}

.skill-tab:hover,
.skill-tab:focus-visible {
    color: var(--green);
}

.skill-tab.is-selected {
    background: var(--green);
    color: #031008;
}

.skill-list {
    display: grid;
    gap: 16px;
}

.skill-list[hidden] {
    display: none;
}

.skill-row {
    min-height: 30px;
    display: grid;
    grid-template-columns: minmax(140px, 1fr) 70px minmax(140px, 0.9fr);
    gap: 22px;
    align-items: center;
}

.skill-track {
    height: 8px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(0, 244, 119, 0.1);
}

.skill-track span {
    width: var(--skill-level);
    height: 100%;
    display: block;
    border-radius: inherit;
    background: var(--green);
    box-shadow: 0 0 10px rgba(0, 244, 119, 0.75);
}

.skill-row strong {
    color: var(--green);
    text-align: center;
}

.skill-name {
    overflow-wrap: anywhere;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.project-card {
    min-width: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 244, 119, 0.22);
    border-radius: 9px;
    background: rgba(0, 17, 8, 0.72);
    box-shadow: 0 0 20px rgba(0, 244, 119, 0.04);
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 244, 119, 0.55);
    box-shadow: 0 0 24px rgba(0, 244, 119, 0.08);
}

.project-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #627364;
    font-size: 12px;
}

.project-status {
    padding: 4px 12px;
    border: 1px solid currentColor;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 700;
}

.status-work {
    color: #ffb800;
}

.status-paused {
    color: #00d8d8;
}

.status-learning,
.status-finished {
    color: var(--green);
}

.project-card h3 {
    margin: 20px 0 2px;
    color: var(--green);
    font-size: clamp(17px, 2vw, 22px);
}

.project-type {
    margin: 0 0 18px;
    color: #607161;
    font-size: 12px;
}

.project-description {
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.65;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-list span {
    padding: 3px 8px;
    border: 1px solid rgba(0, 244, 119, 0.22);
    border-radius: 2px;
    color: #728375;
    font-size: 10px;
}

.project-link {
    width: 100%;
    margin-top: 18px;
    padding: 16px 0 0;
    display: block;
    border: 0;
    border-top: 1px solid rgba(0, 244, 119, 0.15);
    background: transparent;
    color: var(--green);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
}

.project-link:hover,
.project-link:focus-visible {
    text-shadow: 0 0 10px rgba(0, 244, 119, 0.65);
}

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

.gallery-card {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(0, 244, 119, 0.22);
    border-radius: 8px;
    background: rgba(0, 17, 8, 0.72);
}

.gallery-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    display: block;
    object-fit: cover;
    background: #030805;
}

.gallery-card img.gallery-pong-image {
    aspect-ratio: 2 / 1;
    object-fit: contain;
    image-rendering: pixelated;
}

.gallery-credit {
    color: #748579;
    font-size: 10px;
}

.gallery-credit {
    text-underline-offset: 3px;
}

.gallery-credit[href] {
    color: #9baa9c;
}

.gallery-card figcaption {
    min-height: 76px;
    padding: 14px;
    display: grid;
    align-content: center;
    gap: 5px;
    font-size: 13px;
}

.gallery-card figcaption strong {
    color: var(--green);
}

.gallery-card figcaption span {
    color: #728375;
    font-size: 11px;
}

.gallery-card figcaption .gallery-credit {
    font-size: 10px;
    line-height: 1.4;
}

.table-scroll {
    overflow-x: auto;
    border: 1px solid rgba(0, 244, 119, 0.2);
    border-radius: 8px;
}

.project-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    text-align: left;
}

.project-table caption {
    padding: 14px 16px;
    color: #849386;
    text-align: left;
}

.project-table th,
.project-table td {
    padding: 14px 16px;
    border-top: 1px solid rgba(0, 244, 119, 0.13);
}

.project-table thead th {
    color: var(--green);
    background: rgba(0, 244, 119, 0.05);
    font-size: 12px;
}

.project-table tbody th {
    color: #a7b5a9;
    font-weight: 700;
}

.project-table tbody tr:hover {
    background: rgba(0, 244, 119, 0.035);
}

.project-table a {
    color: var(--green);
    text-underline-offset: 3px;
}

.project-table a:hover,
.project-table a:focus-visible {
    text-shadow: 0 0 10px rgba(0, 244, 119, 0.65);
}

.project-page {
    min-height: calc(100vh - 174px);
    padding-block: 72px 100px;
}

.project-page .section-heading {
    margin-bottom: 32px;
}

.project-page .project-status {
    width: fit-content;
    margin-bottom: 14px;
    display: inline-block;
}

.project-page h1 {
    margin: 0 0 10px;
    color: var(--green);
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.1;
}

.project-page .project-type {
    margin-bottom: 0;
}

.project-detail-content {
    max-width: 780px;
    font-size: 15px;
    line-height: 1.8;
}

.project-detail-content h2 {
    margin: 38px 0 10px;
    color: var(--green);
    font-size: 21px;
}

.project-detail-content p {
    margin: 0 0 18px;
}

.project-detail-content ul {
    padding-left: 22px;
}

.project-detail-content li {
    margin-bottom: 8px;
}

.project-page .tag-list {
    margin-top: 28px;
}

.project-back {
    margin-top: 42px;
    display: inline-block;
    color: var(--green);
    font-weight: 700;
    text-decoration: none;
}

.project-back:hover,
.project-back:focus-visible {
    text-shadow: 0 0 10px rgba(0, 244, 119, 0.65);
}

.unity-game-section {
    margin-top: 64px;
}

.unity-game-section .section-heading {
    margin-bottom: 20px;
}

.unity-game-section .section-heading h2 {
    color: var(--green);
    font-size: clamp(24px, 3.5vw, 36px);
    text-shadow: 0 0 18px rgba(0, 244, 119, 0.2);
}

.unity-game-intro {
    max-width: 780px;
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.75;
}

.unity-game-frame {
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(0, 244, 119, 0.28);
    border-radius: 10px;
    background: #050a07;
    box-shadow: 0 0 30px rgba(0, 244, 119, 0.07);
}

.unity-game-frame iframe {
    width: 100%;
    height: clamp(400px, 65vw, 680px);
    display: block;
    border: 0;
    background: #050a07;
}

.esp32-lab {
    margin-top: 72px;
}

.esp32-lab .section-heading h2 {
    color: var(--green);
    text-shadow: 0 0 18px rgba(0, 244, 119, 0.25);
}

.esp32-lab-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
    gap: 24px;
    align-items: start;
}

.code-window,
.demo-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(0, 244, 119, 0.22);
    border-radius: 10px;
    background: rgba(2, 12, 7, 0.94);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22), 0 0 26px rgba(0, 244, 119, 0.04);
}

.code-window-bar {
    min-height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(0, 244, 119, 0.16);
    background: rgba(0, 244, 119, 0.035);
    color: #aebbb0;
    font-size: 12px;
}

.window-dots {
    display: flex;
    gap: 6px;
}

.window-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff5f57;
}

.window-dots span:nth-child(2) {
    background: #febc2e;
}

.window-dots span:nth-child(3) {
    background: #28c840;
}

.code-language {
    margin-left: auto;
    padding: 3px 8px;
    border: 1px solid rgba(0, 244, 119, 0.2);
    border-radius: 4px;
    color: var(--green);
    font-size: 10px;
}

.cpp-code {
    max-height: 760px;
    margin: 0;
    padding: 16px 0;
    overflow: auto;
    color: #c7d1c9;
    font-size: 12px;
    line-height: 1.65;
    tab-size: 2;
}

.code-line {
    min-height: 1.65em;
    padding-right: 18px;
    display: block;
    white-space: pre;
}

.code-line::before {
    width: 48px;
    margin-right: 16px;
    padding-right: 12px;
    display: inline-block;
    border-right: 1px solid rgba(0, 244, 119, 0.12);
    color: #52665a;
    content: counter(code-line);
    counter-increment: code-line;
    text-align: right;
    user-select: none;
}

.cpp-code code {
    counter-reset: code-line;
}

.code-comment {
    color: #6f8b73;
    font-style: italic;
}

.code-preprocessor {
    color: #c586c0;
}

.code-header {
    color: #ce9178;
}

.code-string {
    color: #ce9178;
}

.code-keyword {
    color: #569cd6;
}

.code-type {
    color: #4ec9b0;
}

.code-constant,
.code-number {
    color: #b5cea8;
}

.demo-panel {
    padding: 20px;
}

.demo-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.demo-heading .section-command {
    margin-bottom: 4px;
    font-size: 10px;
}

.demo-heading h3 {
    margin: 0;
    color: var(--green);
    font-size: 19px;
}

.demo-live {
    padding: 5px 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(0, 244, 119, 0.18);
    border-radius: 99px;
    color: #829587;
    font-size: 9px;
    white-space: nowrap;
}

.demo-live span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d8a93c;
}

.demo-live.is-running span {
    background: var(--green);
    box-shadow: 0 0 8px rgba(0, 244, 119, 0.7);
}

.demo-note,
.demo-hint {
    color: #829587;
    font-size: 11px;
    line-height: 1.65;
}

.demo-note {
    margin: 14px 0;
}

.device-stage {
    min-height: 300px;
    padding: 20px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(0, 244, 119, 0.1);
    border-radius: 8px;
    background:
        radial-gradient(ellipse at center, rgba(0, 244, 119, 0.08), transparent 66%),
        #030805;
}

.device-frame {
    width: 190px;
    padding: 10px;
    border: 2px solid #46514a;
    border-radius: 19px;
    background: linear-gradient(145deg, #303a33, #111713 55%, #28332b);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.device-screen {
    min-height: 246px;
    padding: 18px 10px;
    border: 1px solid rgba(0, 244, 119, 0.3);
    border-radius: 8px;
    background: #020805;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.9), 0 0 16px rgba(0, 244, 119, 0.06);
    color: var(--green);
    font-size: 12px;
    line-height: 1.4;
    transition: opacity 180ms ease, box-shadow 180ms ease;
}

.device-screen.is-off {
    opacity: 0.34;
}

.device-screen.is-off .device-content {
    visibility: hidden;
}

.device-screen.is-on {
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 244, 119, 0.13);
}

.device-title {
    margin: 0;
    color: var(--green);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.device-divider {
    height: 1px;
    margin: 12px -10px 13px;
    background: var(--green);
    box-shadow: 0 0 6px rgba(0, 244, 119, 0.6);
}

.device-menu {
    display: grid;
    gap: 8px;
}

.device-menu-item {
    min-height: 27px;
    padding: 5px 8px;
    color: var(--green);
    transition: background 120ms ease, color 120ms ease;
}

.device-menu-item.is-selected {
    background: #ed2939;
    color: #fff;
    box-shadow: 0 0 10px rgba(237, 41, 57, 0.2);
}

.demo-controls {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.demo-controls .button {
    min-height: 42px;
    padding-inline: 12px;
    font-size: 11px;
}

.demo-controls .button:disabled {
    border-color: rgba(0, 244, 119, 0.12);
    color: #55645a;
    cursor: not-allowed;
    transform: none;
}

.demo-controls .button.is-pressing {
    transform: translateY(1px);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.35);
}

.demo-status {
    min-height: 1.6em;
    margin: 12px 0 0;
    color: var(--green);
    font-size: 11px;
}

.demo-hint {
    margin: 5px 0 0;
    font-size: 10px;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
    gap: clamp(48px, 10vw, 160px);
    align-items: start;
}

.contact-copy {
    font-size: 16px;
    line-height: 1.75;
}

.contact-copy > p {
    max-width: 560px;
    margin: 0 0 30px;
}

.contact-links {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
    list-style: none;
}

.contact-links li {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 18px;
}

.contact-links li > span:first-child {
    color: var(--green);
}

.contact-links a {
    text-decoration-color: rgba(132, 147, 134, 0.45);
    text-underline-offset: 4px;
}

.contact-links a:hover,
.contact-links a:focus-visible {
    color: var(--green);
}

.contact-form {
    display: grid;
    gap: 10px;
}

.contact-form label {
    margin-top: 8px;
    color: var(--green);
    font-size: 12px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(0, 244, 119, 0.25);
    border-radius: 4px;
    outline: none;
    background: rgba(0, 17, 8, 0.78);
    color: #d0ded2;
    font: inherit;
}

.contact-form input {
    min-height: 44px;
}

.contact-form textarea {
    min-height: 130px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 12px rgba(0, 244, 119, 0.12);
}

.contact-form input:focus:invalid,
.contact-form textarea:focus:invalid {
    border-color: #ff8a76;
}

.send-button {
    width: 100%;
    margin-top: 8px;
    color: var(--green);
}

.contact-form-note {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
}

.site-footer {
    min-height: 86px;
    margin-top: 24px;
    padding-block: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border-top: 1px solid rgba(0, 244, 119, 0.15);
    color: #607161;
    font-size: 12px;
}

.legal-page {
    min-height: calc(100vh - 174px);
    padding-block: 72px 100px;
}

.legal-page h1,
.legal-page h2 {
    color: var(--green);
}

.legal-page h1 {
    font-size: clamp(36px, 6vw, 64px);
}

.legal-page p {
    max-width: 720px;
    line-height: 1.8;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: inherit;
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: var(--green);
}

@keyframes blink {
    to {
        visibility: hidden;
    }
}

@media (max-width: 900px) {
    .hero {
        min-height: unset;
        grid-template-columns: 1fr;
        gap: 42px;
        padding-top: 56px;
    }

    .system-monitor {
        max-width: 460px;
    }

    .about-layout,
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .esp32-lab-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cpp-code {
        max-height: 600px;
    }
}

@media (max-width: 600px) {
    .site-header {
        position: relative;
        z-index: 2;
        min-height: 76px;
        padding: 14px 24px;
        align-items: center;
    }

    .main-nav {
        position: absolute;
        top: calc(100% - 1px);
        right: 0;
        left: 0;
        padding: 10px 24px 20px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border-bottom: 1px solid rgba(0, 244, 119, 0.2);
        background: #050a07;
        box-shadow: 0 16px 24px rgba(0, 0, 0, 0.4);
    }

    .main-nav.is-open {
        display: flex;
    }

    .nav-toggle {
        min-height: 42px;
        padding: 0 12px;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        border: 1px solid rgba(0, 244, 119, 0.3);
        border-radius: 4px;
        background: transparent;
        color: var(--green);
        font: inherit;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
    }

    .nav-toggle-icon,
    .nav-toggle-icon::before,
    .nav-toggle-icon::after {
        width: 18px;
        height: 2px;
        display: block;
        background: currentColor;
    }

    .nav-toggle-icon {
        position: relative;
    }

    .nav-toggle-icon::before,
    .nav-toggle-icon::after {
        position: absolute;
        left: 0;
        content: "";
    }

    .nav-toggle-icon::before {
        top: -6px;
    }

    .nav-toggle-icon::after {
        top: 6px;
    }

    .nav-link {
        padding-block: 12px;
        border-bottom: 1px solid rgba(0, 244, 119, 0.1);
        font-size: 12px;
    }

    .nav-link:last-child {
        border-bottom: 0;
    }

    .hero {
        padding-top: 48px;
    }

    .boot-message {
        font-size: 12px;
    }

    .role {
        margin: 22px 0 28px;
    }

    .hero-actions {
        gap: 14px;
        margin-top: 34px;
    }

    .button {
        min-height: 48px;
        padding: 0 16px;
        font-size: 13px;
    }

    .system-monitor {
        padding: 16px;
        font-size: 11px;
    }

    .content-section {
        padding-block: 44px 52px;
    }

    .section-heading {
        margin-bottom: 34px;
    }

    .skill-tabs {
        width: 100%;
    }

    .skill-tab {
        flex: 1;
        min-height: 42px;
        padding-inline: 6px;
        font-size: 10px;
    }

    .skill-row {
        grid-template-columns: minmax(70px, 1fr) 45px minmax(100px, 0.9fr);
        gap: 12px;
        font-size: 12px;
    }

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

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

    .cpp-code {
        font-size: 10px;
    }

    .code-line::before {
        width: 34px;
        margin-right: 10px;
        padding-right: 8px;
    }

    .demo-panel {
        padding: 16px;
    }

    .project-card {
        padding: 20px;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
