@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap");

* {
    box-sizing: border-box;
}

:root {
    --font-body: "Inter", Arial, sans-serif;
    --font-display: "Space Grotesk", "Inter", Arial, sans-serif;
    --ink: #101418;
    --muted: #5c6670;
    --line: #d9e1e8;
    --panel: #ffffff;
    --soft: #f4f7f9;
    --surface: #ffffff;
    --surface-subtle: #eef3f5;
    --surface-warm: #f6f3ec;
    --inverted-surface: #101418;
    --accent: #0f7b6c;
    --accent-dark: #075e53;
    --warm: #9a5d00;
    --focus: #0f6b61;
    --blue: #2662a8;
}

html[data-theme='dark'] {
    --ink: #eff5fb;
    --muted: #9cb4c8;
    --line: rgba(255, 255, 255, 0.12);
    --panel: rgba(6, 10, 16, 0.92);
    --soft: #06111a;
    --surface: #0a101a;
    --surface-subtle: #0d1824;
    --surface-warm: #0a141e;
    --inverted-surface: #071019;
    --accent: #4ad4b9;
    --accent-dark: #0d6f59;
    --warm: #f0c369;
    --focus: #72e6d0;
    --blue: #79bfff;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: radial-gradient(circle at top right, rgba(74, 212, 185, 0.16), transparent 22%),
        radial-gradient(circle at bottom left, rgba(240, 184, 79, 0.14), transparent 22%),
        var(--soft);
    font-size: 16px;
    line-height: 1.6;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 4px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: 16px;
    z-index: 30;
    padding: 0.75rem 1rem;
    background: #0f7b6c;
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transform: translateY(-120%);
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0;
}

.skip-link:focus {
    transform: translateY(0);
    opacity: 1;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px clamp(18px, 5vw, 72px);
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(16, 20, 24, 0.08);
    backdrop-filter: blur(18px);
}

html[data-theme='dark'] .site-header {
    background: rgba(5, 9, 16, 0.78);
    border-color: rgba(255, 255, 255, 0.08);
}

.brand {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #09131f, #27445d);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 800;
    text-decoration: none;
}

nav {
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 28px);
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 700;
}

nav a {
    text-decoration: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 28px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(16, 20, 24, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--ink);
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid rgba(16, 20, 24, 0.08);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 1);
}

.theme-toggle--compact {
    min-width: 46px;
    justify-content: center;
    padding: 12px 14px;
}

html[data-theme='dark'] .nav-toggle,
html[data-theme='dark'] .theme-toggle {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.nav-menu.open {
    display: flex;
}

nav a:hover,
.project-card a:hover,
.writing-card a:hover,
.text-link:hover,
.social-links a:hover {
    color: var(--accent);
}

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 92vh;
    display: flex;
    align-items: center;
    padding: 140px clamp(20px, 6vw, 88px) 72px;
    color: #fff;
    background: radial-gradient(circle at 80% 22%, rgba(74, 212, 185, 0.28), transparent 23%),
        radial-gradient(circle at bottom left, rgba(240, 184, 79, 0.12), transparent 18%),
        url("../images/cloud-platform-social.png") center / cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(120deg, rgba(2, 12, 24, 0.88), rgba(2, 12, 24, 0.68) 45%, rgba(8, 13, 18, 0.35));
}

.hero-scene {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    perspective: 1100px;
}

.scene-orb,
.scene-plane {
    position: absolute;
    display: block;
    transform-style: preserve-3d;
}

.scene-orb {
    border-radius: 50%;
    filter: blur(1px);
}

.scene-orb-one {
    top: 12%;
    right: 7%;
    width: clamp(240px, 32vw, 500px);
    aspect-ratio: 1;
    border: 1px solid rgba(138, 255, 234, 0.42);
    background: radial-gradient(circle at 32% 28%, rgba(120, 255, 228, 0.64), rgba(44, 162, 185, 0.15) 38%, transparent 68%);
    box-shadow: inset -36px -44px 80px rgba(3, 15, 32, 0.72), 0 0 110px rgba(75, 224, 198, 0.2);
    transform: rotateX(58deg) rotateZ(-22deg) translateZ(20px);
}

.scene-orb-two {
    right: 23%;
    bottom: -16%;
    width: clamp(130px, 18vw, 280px);
    aspect-ratio: 1;
    border: 1px solid rgba(240, 184, 79, 0.36);
    background: radial-gradient(circle at 32% 28%, rgba(255, 221, 143, 0.52), rgba(240, 184, 79, 0.08) 44%, transparent 70%);
    box-shadow: inset -22px -28px 60px rgba(3, 15, 32, 0.76), 0 0 80px rgba(240, 184, 79, 0.12);
    transform: rotateX(65deg) rotateZ(38deg) translateZ(-80px);
}

.scene-plane {
    top: -35%;
    right: -12%;
    width: min(62vw, 880px);
    height: min(62vw, 880px);
    border: 1px solid rgba(145, 241, 230, 0.14);
    background-image: linear-gradient(rgba(126, 255, 231, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(126, 255, 231, 0.08) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(circle, #000 16%, transparent 70%);
    transform: rotateX(66deg) rotateZ(31deg) translateZ(-160px);
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    align-items: end;
    gap: clamp(24px, 5vw, 80px);
    width: 100%;
}

.hero-content {
    max-width: 860px;
    padding: 32px;
    border-radius: 32px;
    backdrop-filter: blur(20px);
    background: rgba(5, 10, 20, 0.56);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.24);
    transform: translateZ(30px);
}

.signal-panel {
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    background: rgba(6, 16, 26, 0.65);
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(22px);
    transform: perspective(1200px) rotateX(2deg) rotateY(-6deg) translateZ(50px);
    transform-style: preserve-3d;
}

.signal-status {
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.8rem;
    font-weight: 800;
}

.signal-status span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #4ad4b9;
    box-shadow: 0 0 0 5px rgba(74, 212, 185, 0.16);
}

.signal-label {
    margin: 36px 0 8px;
    color: var(--warm);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.signal-panel h2 {
    margin-bottom: 24px;
    font-size: clamp(1.65rem, 2.8vw, 2.4rem);
}

.signal-panel ul {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.signal-panel li {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.92rem;
    font-weight: 600;
}

.signal-panel li span {
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 800;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--warm);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero .eyebrow,
.page-hero .eyebrow,
.contact-section .eyebrow {
    color: #f0c369;
}

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

h1,
h2,
h3,
.hero-title,
.signal-status,
.signal-label,
.button,
.metrics strong,
.project-card a,
.writing-card a,
.article-navigation a {
    font-family: var(--font-display);
}

h1 {
    margin-bottom: 18px;
    font-size: clamp(3rem, 8vw, 6.5rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
}

h2 {
    margin-bottom: 18px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

h3 {
    margin-bottom: 10px;
    font-size: 1.18rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero-title {
    max-width: 760px;
    margin-bottom: 16px;
    font-size: clamp(1.35rem, 3vw, 2.25rem);
    line-height: 1.2;
    font-weight: 700;
}

.hero-copy {
    max-width: 660px;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.08rem;
}

.hero-actions,
.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 14px 22px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.button:hover,
.project-card a:hover,
.writing-card a:hover,
.text-link:hover,
.social-links a:hover {
    transform: translateY(-1px);
}

.button.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    box-shadow: 0 20px 45px rgba(15, 123, 108, 0.24);
}

.button.primary:hover {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
}

.button.secondary {
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.contact-section .button.secondary {
    border-color: rgba(255, 255, 255, 0.24);
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    background: transparent;
    color: #fff;
    padding: 24px clamp(20px, 6vw, 88px);
}

.metrics div {
    min-height: 140px;
    padding: 28px;
    border-radius: 24px;
    border: 1px solid rgba(16, 20, 24, 0.12);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.16);
}

.metrics strong {
    display: block;
    font-size: 2.1rem;
    line-height: 1;
    color: var(--ink);
}

.metrics span {
    display: block;
    margin-top: 10px;
    color: #46515f;
    font-weight: 700;
}

html[data-theme='dark'] .metrics div {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(10, 16, 26, 0.9);
}

html[data-theme='dark'] .metrics strong {
    color: #fff;
}

html[data-theme='dark'] .metrics span {
    color: #b8c7d4;
}

.section {
    padding: clamp(64px, 8vw, 112px) clamp(20px, 6vw, 88px);
}

.two-column {
    display: grid;
    grid-template-columns: minmax(240px, 0.85fr) minmax(300px, 1.15fr);
    gap: clamp(32px, 6vw, 96px);
    background: var(--surface);
}

.section-copy {
    color: var(--muted);
    font-size: 1.05rem;
}

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

.timeline-section {
    background: var(--surface-subtle);
}

.timeline {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.timeline article,
.project-card,
.writing-card,
.oss-grid>article,
.skill-groups>div {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(16, 20, 24, 0.08);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(16, 20, 24, 0.08);
    backdrop-filter: blur(18px);
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

html[data-theme='dark'] .timeline article,
html[data-theme='dark'] .project-card,
html[data-theme='dark'] .writing-card,
html[data-theme='dark'] .oss-grid>article,
html[data-theme='dark'] .skill-groups>div {
    background: rgba(10, 16, 26, 0.82);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
}

.timeline article,
.project-card,
.writing-card {
    padding: 28px;
}

.timeline span,
.project-card span,
.writing-card span {
    display: block;
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.timeline p,
.project-card p,
.writing-card p,
.oss-grid p {
    margin-bottom: 0;
    color: var(--muted);
}

.projects-section,
.writing-section,
.oss-section,
.skills-section {
    background: transparent;
}

.project-grid,
.writing-grid,
.oss-grid,
.skill-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.project-card,
.writing-card {
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

.timeline article:hover,
.project-card:hover,
.writing-card:hover,
.oss-grid>article:hover,
.skill-groups>div:hover {
    transform: translateY(-5px);
    border-color: rgba(15, 123, 108, 0.34);
    box-shadow: 0 34px 90px rgba(16, 20, 24, 0.14);
}

@media (hover: hover) and (pointer: fine) {
    .project-card:hover,
    .writing-card:hover {
        transform: perspective(1100px) rotateX(2deg) rotateY(-3deg) translateY(-8px);
    }

    .project-card:nth-child(even):hover,
    .writing-card:nth-child(even):hover {
        transform: perspective(1100px) rotateX(2deg) rotateY(3deg) translateY(-8px);
    }

    .signal-panel:hover {
        transform: perspective(1200px) rotateX(0deg) rotateY(-2deg) translateY(-6px) translateZ(50px);
    }
}

.project-card a,
.writing-card a {
    margin-top: auto;
    padding-top: 22px;
    color: var(--blue);
    font-weight: 800;
    text-decoration: none;
}

.project-card a::after,
.writing-card a::after,
.text-link::after {
    content: " →";
}

.oss-section {
    background: transparent;
}

.oss-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.oss-grid>article {
    padding: 28px;
}

.oss-grid strong {
    display: block;
    margin-bottom: 14px;
    color: var(--blue);
    font-size: 2.2rem;
    line-height: 1;
}

.writing-section {
    background: transparent;
}

.writing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.writing-search {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
}

.search-label {
    font-weight: 800;
    color: var(--text);
}

.search-input {
    width: 100%;
    min-height: 48px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid rgba(16, 20, 24, 0.12);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
}

html[data-theme='dark'] .search-input {
    background: rgba(10, 16, 26, 0.88);
    border-color: rgba(255, 255, 255, 0.12);
}

.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-pill {
    border: 1px solid rgba(16, 20, 24, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    padding: 10px 14px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tag-pill:hover {
    transform: translateY(-1px);
}

.tag-pill.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

.clear-filters {
    border: none;
    background: transparent;
    color: var(--blue);
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    margin-top: 8px;
    text-decoration: underline;
}

.clear-filters:hover,
.clear-filters:focus {
    color: var(--text);
}

.clear-filters:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    text-decoration: none;
}

.search-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.tag-filter-help {
    color: var(--muted);
    margin: 12px 0 6px;
    font-size: 0.95rem;
}

.result-count {
    color: var(--muted);
    font-weight: 700;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
}

.card-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.card-tag {
    display: inline-flex;
    border-radius: 999px;
    background: rgba(16, 20, 24, 0.04);
    border: 1px solid rgba(16, 20, 24, 0.08);
    color: var(--text);
    padding: 8px 10px;
    font-size: 0.78rem;
    text-transform: none;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.tag-link {
    border: 1px solid rgba(16, 20, 24, 0.16);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    color: var(--text);
    padding: 8px 12px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.tag-link:hover,
.tag-link:focus {
    transform: translateY(-1px);
    border-color: var(--blue);
}

.no-results {
    margin-top: 18px;
    color: var(--muted);
    font-style: italic;
}

.hidden {
    display: none !important;
}

.skills-section {
    background: transparent;
}

.text-link {
    display: inline-flex;
    margin-top: 24px;
    color: var(--blue);
    font-weight: 800;
    text-decoration: none;
}

.page-hero {
    padding: 150px clamp(20px, 6vw, 88px) 78px;
    background: var(--inverted-surface);
    color: #fff;
}

.page-hero h1 {
    max-width: 960px;
    margin-bottom: 22px;
    font-size: clamp(2.6rem, 6vw, 5.4rem);
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.14rem;
}

.page-section {
    padding-top: 64px;
}

.article {
    max-width: 860px;
    margin: 0 auto;
    padding: 140px 20px 88px;
    background: var(--panel);
}

.reading-progress {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 40;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.reading-progress span {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleX(var(--reading-progress, 0));
    transform-origin: left center;
    background: linear-gradient(90deg, var(--accent), var(--blue), var(--warm));
    box-shadow: 0 0 16px rgba(74, 212, 185, 0.6);
}

.article h1 {
    margin-bottom: 18px;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.article h2 {
    margin-top: 42px;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.article p {
    color: var(--muted);
    font-size: 1.08rem;
}

.article .article-meta {
    margin-bottom: 34px;
    color: var(--accent);
    font-weight: 800;
}

.article-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid rgba(16, 20, 24, 0.1);
}

.article-navigation a {
    padding: 18px;
    border: 1px solid rgba(16, 20, 24, 0.12);
    border-radius: 16px;
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.article-navigation a span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
}

.article-navigation a:hover,
.article-navigation a:focus {
    border-color: var(--blue);
    transform: translateY(-2px);
}

.article-navigation .next-article {
    text-align: right;
}

html[data-theme='dark'] .article-navigation {
    border-color: rgba(255, 255, 255, 0.14);
}

html[data-theme='dark'] .article-navigation a {
    border-color: rgba(255, 255, 255, 0.16);
}

.skills-section {
    background: var(--surface-warm);
}

.skill-groups {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.skill-groups>div {
    padding: 24px;
}

.skill-groups ul {
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
}

.skill-groups li+li {
    margin-top: 8px;
}

.contact-section {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: center;
    padding: clamp(54px, 7vw, 88px) clamp(20px, 6vw, 88px);
    background: var(--inverted-surface);
    color: #fff;
}

.contact-section p:not(.eyebrow) {
    max-width: 680px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.76);
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px clamp(20px, 6vw, 88px);
    background: var(--panel);
    color: var(--muted);
}

.site-footer p {
    margin: 0;
}

.social-links {
    display: flex;
    gap: 14px;
    font-size: 1.2rem;
}

.social-links a {
    color: var(--muted);
}

@media (max-width: 900px) {

    .hero-grid {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .signal-panel {
        max-width: 680px;
        transform: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 16px;
        left: 16px;
        flex-direction: column;
        padding: 18px;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid rgba(16, 20, 24, 0.08);
        border-radius: 18px;
        box-shadow: 0 20px 48px rgba(16, 20, 24, 0.12);
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu a {
        padding: 12px 0;
    }

    .theme-toggle {
        display: none;
    }

    .theme-toggle--compact {
        display: inline-flex;
    }

    .metrics,
    .timeline,
    .project-grid,
    .writing-grid,
    .oss-grid,
    .skill-groups,
    .two-column,
    .contact-section {
        grid-template-columns: 1fr;
    }

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

    .contact-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .site-header {
        align-items: flex-start;
        padding: 12px 16px;
    }

    .nav-menu {
        display: none;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px 14px;
        max-width: 300px;
        font-size: 0.82rem;
    }

    .site-header > nav:not(.nav-menu) {
        flex: 1;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 6px 12px;
        font-size: 0.78rem;
        line-height: 1.35;
    }

    .site-header > nav:not(.nav-menu) a {
        padding: 5px 0;
    }

    .theme-toggle--compact {
        min-width: 40px;
        min-height: 40px;
        padding: 8px;
    }

    .theme-toggle--compact .theme-text {
        display: none;
    }

    .hero {
        min-height: 92vh;
        padding: 120px 18px 48px;
    }

    .hero-content,
    .signal-panel {
        padding: 22px;
        border-radius: 20px;
    }

    .hero-overlay {
        background: rgba(8, 13, 18, 0.76);
    }

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

    .metrics div {
        min-height: 100px;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .section,
    .contact-section,
    .page-hero {
        padding-left: 18px;
        padding-right: 18px;
    }

    .page-hero {
        padding-top: 132px;
    }

    .article {
        padding-top: 124px;
    }

    .article-navigation {
        grid-template-columns: 1fr;
    }

    .article-navigation .next-article {
        text-align: left;
    }

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

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .signal-panel,
    .timeline article:hover,
    .project-card:hover,
    .writing-card:hover,
    .oss-grid>article:hover,
    .skill-groups>div:hover {
        transform: none !important;
    }
}
