/* SECTION 1: Shared colors and base page styles. */
:root {
    --paper: #f6f7f2;
    --ink: #1d241c;
    --muted: #73796e;
    --line: #d3d8ca;
    --accent: #d4ff63;
    --panel: #ecefe6
}

* {
    box-sizing: border-box
}

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

body {
    margin: 0;
    padding-top: 76px; /* room for the fixed header */
    background: var(--paper);
    color: var(--ink);
    font: 15px/1.6 Arial, Helvetica, sans-serif
}

a {
    color: inherit;
    text-decoration: none
}

button,
input,
textarea {
    font: inherit;
    color: inherit
}

button,
a,
input,
textarea {
    outline-offset: 5px
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #8cecff
}

button {
    cursor: pointer
}

button:disabled {
    cursor: wait;
    opacity: .65
}

/* SECTION 2: Header, brand, and navigation. */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 76px;
    z-index: 1000;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line)
}

.brand {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 10px
}

.brand-mark {
    font-size: 35px;
    font-weight: 400
}

.brand sup {
    font: 9px monospace;
    letter-spacing: 0;
    align-self: flex-start;
    margin-top: 18px
}

nav {
    display: flex;
    align-items: center;
    gap: 35px;
    font-size: 12px
}

.nav-contact {
    border: 1px solid var(--ink);
    padding: 10px 17px;
    min-width: 125px
}

.nav-contact span {
    float: right
}

/* SECTION 3: Main width, introduction, and small labels. */
main {
    max-width: 1120px;
    margin: auto;
    padding: 0 32px
}

.hero {
    padding: 82px 0 74px;
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 70px;
    align-items: center
}

.eyebrow {
    font: 10px/1.8 'Courier New', monospace;
    letter-spacing: 1.3px
}

.hero h1 {
    font-size: clamp(36px, 4.4vw, 59px);
    line-height: 1.09;
    letter-spacing: -2.8px;
    font-weight: 500;
    margin: 20px 0
}

mark {
    color: inherit;
    background: linear-gradient(transparent 70%, var(--accent) 70%);
    padding: 0 3px 2px 0
}

.hero-description {
    max-width: 520px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
    margin: 25px 0
}

.text-link {
    display: inline-flex;
    gap: 35px;
    border-bottom: 1px solid var(--ink);
    padding: 4px 0;
    font-size: 13px
}

.hero-note {
    border-left: 1px solid var(--line);
    padding-left: 28px;
    font-size: 13px;
    color: var(--muted)
}

.hero-note .eyebrow {
    color: var(--ink);
    font-size: 9px
}

.availability {
    border-top: 1px solid var(--line);
    padding-top: 14px;
    font: 9px monospace;
    display: flex;
    align-items: center;
    gap: 8px
}

.availability i {
    height: 6px;
    width: 6px;
    background: #658a24;
    border-radius: 50%
}

/* SECTION 4: Project heading, filters, search, and cards. */
.section-head {
    border-top: 1px solid var(--line);
    padding-top: 19px;
    display: flex;
    justify-content: space-between
}

.work-intro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0 20px
}

.work-intro p {
    max-width: 310px;
    color: var(--muted);
    font-size: 13px;
    margin: 0
}

h2 {
    font-size: 36px;
    line-height: 1.2;
    letter-spacing: -1.5px;
    font-weight: 500;
    margin: 12px 0 20px
}

.tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px
}

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

.filters button {
    background: transparent;
    border: 1px solid transparent;
    padding: 7px 13px;
    font: 11px monospace
}

.filters button[aria-pressed=true] {
    border-color: var(--ink);
    background: var(--accent)
}

.filters button:hover {
    border-color: var(--line)
}

.search {
    position: relative
}

.search input {
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    width: 185px;
    padding: 7px 24px 7px 5px;
    font-size: 12px
}

.search span:not(.sr-only) {
    position: absolute;
    right: 4px
}

.projects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px
}

.project {
    border: 1px solid var(--line);
    border-radius: 3px;
    overflow: hidden;
    background: #fff;
    transition: transform .2s, border-color .2s
}

.project:hover {
    transform: translateY(-3px);
    border-color: #929e81
}

.image-button {
    display: block;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 22px;
    background: var(--panel);
    width: 100%;
    position: relative
}

.image-button img {
    width: 100%;
    height: 226px;
    object-fit: contain;
    display: block;
    filter: saturate(.85);
    box-shadow: 0 5px 12px #1d241c12
}

.image-button:after {
    content: '↗';
    position: absolute;
    bottom: 15px;
    right: 16px;
    border: 1px solid var(--line);
    background: var(--paper);
    width: 28px;
    height: 28px
}

.project-meta {
    padding: 23px 25px 25px
}

.project-top {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font: 9px monospace;
    letter-spacing: 1px
}

.project h3 {
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -.7px;
    margin: 12px 0 8px
}

.project p {
    font-size: 13px;
    line-height: 1.7;
    color: var(--muted);
    min-height: 44px;
    margin: 0 0 18px
}

.tags {
    display: flex;
    gap: 7px;
    flex-wrap: wrap
}

.tag {
    font: 10px monospace;
    padding: 5px 8px;
    border: 1px solid var(--line);
    background: var(--paper)
}

.project-links {
    display: flex;
    justify-content: space-between;
    margin-top: 22px;
    font-size: 11px
}

.project-links button {
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 2px;
    background: transparent
}

.project-links a:hover,
.text-link:hover {
    color: #c9f8ff
}

/* SECTION 5: Biography, profile sheet, and skill labels. */
.about {
    margin-top: 85px;
    padding: 45px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    border-top: 1px solid var(--line)
}

.about h2,
.contact h2 {
    font-size: 42px;
    margin: 24px 0
}

.about p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9
}

.profile-sheet {
    background: white;
    padding: 28px;
    transform: rotate(1deg);
    border: 1px solid var(--line)
}

.profile-sheet h3 {
    font-size: 22px;
    font-weight: 500;
    margin: 16px 0
}

dl {
    margin: 20px 0 26px
}

dl div {
    display: grid;
    grid-template-columns: 95px 1fr;
    padding: 12px 0;
    border-top: 1px dashed var(--line)
}

dt {
    font: 9px monospace;
    color: var(--muted);
    padding-top: 4px
}

dd {
    font-size: 12px;
    margin: 0
}

.barcode {
    height: 21px;
    width: 85px;
    background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 3px, var(--muted) 3px 4px, transparent 4px 7px);
    margin-top: 25px
}

/* SECTION 6: Work approach and contact form layout. */
.approach {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin: 12px 0 75px
}

.approach article {
    border-top: 1px solid var(--line);
    padding-top: 17px
}

.approach h3 {
    font-size: 14px;
    font-weight: 500
}

.approach p {
    font-size: 12px;
    color: var(--muted)
}

.contact {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    align-items: start;
    gap: 48px;
    padding: 45px 0 65px;
    border-top: 1px solid var(--line)
}

.contact > div,
.contact > form {
    min-width: 0;
    width: 100%;
    align-self: start
}

.contact h2 {
    margin-top: 12px;
    margin-bottom: 18px
}

.contact form {
    margin: 0
}

.contact p {
    color: var(--muted);
    font-size: 13px
}

.contact .small {
    font-size: 10px;
    margin-top: 30px
}

label {
    display: block;
    font-size: 11px
}

form input,
textarea {
    display: block;
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    padding: 12px;
    margin: 8px 0 20px;
    border-radius: 0;
    font-size: 13px
}

textarea {
    resize: vertical
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px
}

.primary {
    background: var(--accent);
    border: 1px solid var(--ink);
    padding: 12px 16px;
    width: 100%;
    text-align: left;
    font-size: 12px
}

.primary span {
    float: right
}

/* SECTION 7: Footer, accessibility helpers, and project dialog. */
footer {
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 25px 5%;
    font-size: 11px;
    color: var(--muted)
}

footer strong {
    color: var(--ink);
    margin-right: 16px
}

footer .eyebrow {
    font-size: 9px
}

.honeypot {
    position: absolute;
    left: -9999px
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%)
}

.skip {
    position: absolute;
    left: 10px;
    top: -80px;
    background: var(--accent);
    padding: 10px;
    z-index: 1100
}

.skip:focus {
    top: 10px
}

dialog {
    border: 1px solid var(--line);
    padding: 36px;
    width: min(780px, 92vw);
    max-height: 90vh;
    background: var(--paper);
    color: var(--ink)
}

dialog::backdrop {
    background: #1d241c80;
    backdrop-filter: blur(3px)
}

.close {
    position: absolute;
    right: 10px;
    top: 8px;
    border: 0;
    background: transparent;
    font-size: 27px
}

dialog img {
    width: 100%;
    max-height: 380px;
    object-fit: contain;
    background: var(--panel);
    margin-top: 18px
}

dialog h2 {
    font-size: 31px
}

dialog p {
    color: var(--muted);
    font-size: 14px
}

.limitation {
    border-left: 3px solid var(--accent);
    padding-left: 15px
}

.empty {
    grid-column: 1/-1;
    padding: 45px;
    border: 1px dashed var(--line);
    color: var(--muted)
}

/* SECTION 8: Local admin editor and contact inbox. */
.admin {
    max-width: 980px;
    padding: 40px 28px;
    margin: auto
}

.admin textarea {
    font: 12px/1.6 monospace
}

.admin-panel {
    margin-top: 30px;
    border-top: 1px solid var(--line);
    padding-top: 20px
}

.admin-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap
}

.admin-controls button {
    padding: 8px 15px
}

.message {
    border: 1px solid var(--line);
    background: white;
    padding: 20px;
    margin: 16px 0
}

.message p {
    white-space: pre-wrap;
    overflow-wrap: anywhere
}

.message button {
    background: transparent;
    border: 1px solid var(--line);
    padding: 5px 12px
}

.error {
    color: #ff8a78 !important
}

.hidden {
    display: none
}

/* SECTION 9: Mobile layouts and reduced motion preferences. */
@media(max-width:760px) {
    header {
        padding: 0 22px;
        height: 72px
    }

    .brand {
        font-size: 19px
    }

    nav {
        gap: 18px
    }

    nav a:first-child {
        display: inline
    }

    .nav-contact {
        min-width: auto;
        padding: 7px 10px
    }

    .nav-contact span {
        margin-left: 12px
    }

    main {
        padding: 0 22px
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 50px 0
    }

    .hero h1 {
        font-size: 43px;
        letter-spacing: -2px
    }

    .hero-note {
        display: none
    }

    .work-intro {
        align-items: start;
        gap: 20px
    }

    .work-intro h2 {
        font-size: 29px;
        flex-shrink: 0
    }

    .work-intro p {
        font-size: 11px;
        max-width: 180px
    }

    .tools {
        align-items: stretch;
        flex-direction: column
    }

    .search input {
        width: 100%
    }

    .projects {
        grid-template-columns: 1fr
    }

    .image-button img {
        height: 230px
    }

    .about {
        grid-template-columns: 1fr;
        gap: 35px;
        margin-top: 55px
    }

    .about h2,
    .contact h2 {
        font-size: 37px
    }

    .profile-sheet {
        transform: none
    }

    .approach {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 45px
    }

    .contact {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-top: 35px
    }

    footer {
        flex-wrap: wrap;
        gap: 18px;
        padding: 25px 22px
    }

    .section-head .eyebrow {
        font-size: 9px
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0
    }

    dialog {
        padding: 28px 20px
    }

    .project-meta {
        padding: 20px
    }

    .filters button {
        padding: 7px 10px
    }
}

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

    .project {
        transition: none
    }
}

/* CONTACT LINKS: Visible phone/email actions work on static hosting too. */
.contact-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    margin-top: 25px;
}

.contact-details a {
    font-size: 13px;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
}

.work-section {
    margin-top: 65px;
}

.work-section .approach {
    margin-bottom: 45px;
}

/* Cards without photos start directly with their content, without blank covers. */
.projects { align-items: start; }


/* === CINEMATIC BLACK GLASS + POWER-CORE CURSOR === */
:root {
    --paper: #000000;
    --ink: #f5f7ff;
    --muted: #a4a9b8;
    --line: rgba(255,255,255,.16);
    --accent: #8cecff;
    --panel: rgba(255,255,255,.055);
}
html, body { background: #000 !important; color: #f5f7ff; }
body { position: relative; isolation: isolate; }
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
      radial-gradient(ellipse at 18% 14%, rgba(0,150,255,.10), transparent 34%),
      radial-gradient(ellipse at 82% 38%, rgba(145,40,255,.10), transparent 32%),
      radial-gradient(ellipse at 50% 100%, rgba(0,255,220,.055), transparent 38%),
      #000;
}
/* .contact and dialog are intentionally NOT in this list.
   .contact has no side padding, so a glass fill touched the text edge.
   dialog gets its own solid surface below. */
.hero-note, .project, .profile-sheet, .approach article,
.search input, form input, textarea, .nav-contact, .filters button,
.tag, .message, .admin-panel, .image-button, .empty {
    background: rgba(255,255,255,.055) !important;
    color: #f5f7ff;
    border-color: rgba(255,255,255,.16) !important;
    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
}
header {
    background: rgba(0,0,0,.66);
    color: #f5f7ff;
    border-color: rgba(255,255,255,.16);
    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
    box-shadow: 0 10px 35px rgba(0,0,0,.24);
}
dialog {
    background: rgba(8,11,18,.97);
    color: #f5f7ff;
    border-color: rgba(255,255,255,.16);
}
.brand, nav, .hero h1, h2, .project h3, .profile-sheet h3, dt, dd,
footer strong, .hero-note .eyebrow { color: #f5f7ff; }
mark {
    color: #fff !important;
    background: linear-gradient(transparent 68%, rgba(0,210,255,.42) 68%) !important;
}
.hero-description, .hero-note, .work-intro p, .project p, .project-top,
.about p, .contact p, footer, .contact .small { color: #a4a9b8 !important; }
.availability i { background: #65f4ff !important; box-shadow: 0 0 12px #65f4ff; }
.section-head, .about, .contact, .approach article { border-color: rgba(255,255,255,.17) !important; }
.filters button[aria-pressed=true], .primary {
    color: #fff !important;
    background: rgba(0,190,255,.19) !important;
    border-color: rgba(92,225,255,.65) !important;
}
.text-link, .project-links a, .project-links button { color: #a7f3ff; border-color: rgba(167,243,255,.5); }
.project { border-radius: 18px; box-shadow: 0 12px 45px rgba(0,0,0,.22); }
.project:hover { border-color: rgba(95,225,255,.55) !important; box-shadow: 0 15px 55px rgba(0,155,255,.12); }
.image-button { border-radius: 0; }
.image-button img { border-radius: 10px; box-shadow: 0 8px 35px rgba(0,0,0,.45); }
.tag { border-radius: 999px; }
.profile-sheet { border-radius: 22px; }
form input, textarea { border-radius: 12px; }
.primary { border-radius: 12px; }
dialog { border-radius: 22px; }
dialog::backdrop { background: rgba(0,0,0,.8); backdrop-filter: blur(8px); }
footer { border-color: rgba(255,255,255,.16); }
#power-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 15;
    pointer-events: none;
}
#power-core {
    position: fixed;
    left: 0; top: 0;
    width: 28px; height: 28px;
    z-index: 30;
    pointer-events: none;
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%,-50%);
    background: radial-gradient(circle, #fff 0 5%, #a8f8ff 10% 20%, #00bfff 32%, rgba(0,110,255,.24) 57%, transparent 72%);
    filter: drop-shadow(0 0 9px #16cfff) drop-shadow(0 0 22px #006eff);
    transition: opacity .2s;
}
#power-core::before, #power-core::after {
    content: "";
    position: absolute;
    inset: -8px;
    border: 1px solid rgba(125,240,255,.85);
    border-radius: 50%;
    animation: core-orbit 1.7s linear infinite;
}
#power-core::after { inset: -14px 0; transform: rotate(60deg); animation-duration: 2.3s; border-color: rgba(160,105,255,.7); }
#power-core.is-active { opacity: 1; }
#power-core.is-charging { animation: core-charge .7s ease-in-out infinite alternate; }
#power-core.is-burst { animation: core-burst .5s ease-out; }
.power-ripple {
    position: fixed;
    z-index: 14;
    width: 12px; height: 12px;
    border: 1px solid rgba(117,235,255,.95);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%,-50%);
    animation: power-ripple .8s ease-out forwards;
    box-shadow: 0 0 20px rgba(0,190,255,.5), inset 0 0 12px rgba(0,190,255,.25);
}
@keyframes core-orbit { to { transform: rotate(360deg); } }
@keyframes core-charge { from { scale: .8; filter: brightness(1); } to { scale: 1.28; filter: brightness(1.8) drop-shadow(0 0 20px #00d9ff); } }
@keyframes core-burst { 0% { scale: 1; } 45% { scale: 2.7; filter: brightness(2.5); } 100% { scale: 1; } }
@keyframes power-ripple { to { width: 190px; height: 190px; opacity: 0; border-width: 0; } }
@media (pointer: coarse), (prefers-reduced-motion: reduce) {
    #power-core { display: none; }
    #power-canvas { opacity: .45; }
}

/* === RECRUITER-FOCUSED HERO, CATEGORIZED SKILLS, AND BACKGROUND-ONLY FX === */
:root { --cinematic-hue: 190deg; }
body::before {
    background:
      radial-gradient(ellipse at 18% 12%, hsl(var(--cinematic-hue) 100% 50% / .12), transparent 35%),
      radial-gradient(ellipse at 82% 38%, hsl(calc(var(--cinematic-hue) + 95deg) 90% 55% / .09), transparent 34%),
      radial-gradient(ellipse at 50% 100%, hsl(calc(var(--cinematic-hue) + 160deg) 100% 50% / .055), transparent 42%),
      #000;
    transition: background 450ms ease;
}
/* Animation layers are deliberately behind every readable/control surface. */
#power-canvas { z-index: 0 !important; opacity: .72; }
#power-core { z-index: 0 !important; opacity: 0; }
.power-ripple { z-index: 0 !important; }
/* The header, skip link and dialogs keep their own positioning (fixed / absolute / top layer).
   Only main and footer need to be lifted above the background effects. */
body > main, body > footer { position: relative; z-index: 1; }
body > .skip { z-index: 1100; }
body > dialog { z-index: 1100; }
main, footer { isolation: isolate; }
.hero { grid-template-columns: minmax(0, 1fr) 220px; }
.hero-description { max-width: 690px; }
.hero-actions, .footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.hero-actions { margin-top: 26px; }
.action-button {
    display: inline-flex; align-items: center; justify-content: center; gap: 18px;
    min-height: 43px; padding: 10px 15px; border: 1px solid rgba(255,255,255,.2);
    border-radius: 12px; background: rgba(255,255,255,.055); color: #f5f7ff;
    font-size: 12px; line-height: 1.3; backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%); transition: border-color .2s, background .2s, transform .2s;
}
.action-button:hover { border-color: rgba(140,236,255,.72); background: rgba(0,190,255,.13); transform: translateY(-2px); }
.action-button.primary-action { border-color: rgba(140,236,255,.55); background: rgba(0,190,255,.15); }
.skill-groups { display: grid; gap: 15px; margin-top: 10px; }
.skill-group { padding-top: 12px; border-top: 1px solid rgba(255,255,255,.12); }
.skill-group h4 { margin: 0 0 8px; color: #e9f8ff; font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.skill-group .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-group .tag { margin: 0; padding: 4px 8px; font-size: 10px; line-height: 1.4; }
.contact-details { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 9px; }
.contact-details .action-button { font-size: 12px; }
/* Same border on all four sides (the old .contact-details a rule only colored the bottom). */
.contact-details a.action-button { border: 1px solid rgba(255,255,255,.2); }
.contact-details a.action-button.primary-action { border-color: rgba(140,236,255,.55); }
.contact-details a.action-button:hover { border-color: rgba(140,236,255,.72); }
.footer-links { gap: 16px; }
.footer-links a { font-size: 12px; }
#bio { max-width: 660px; }
@media (max-width: 760px) {
    .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 54px; }
    .hero-note { border-left: 0; border-top: 1px solid rgba(255,255,255,.15); padding: 18px 0 0; }
    .hero-actions { gap: 8px; }
    .action-button { padding: 10px 12px; }
    .contact-details { flex-direction: row; }
}
@media (prefers-reduced-motion: reduce) {
    body::before, .action-button { transition: none; }
}


/* === SKILL CATEGORY BUTTONS + CONSISTENT RESPONSIVE CARD ALIGNMENT === */
.skill-category-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; gap:9px; margin-top:12px; }
.skill-category-button { appearance:none; width:100%; min-width:0; min-height:72px; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:13px 12px; margin:0; text-align:left; color:#f5f7ff; font:inherit; cursor:pointer; border:1px solid rgba(140,236,255,.23); border-radius:13px; background:linear-gradient(135deg,rgba(0,190,255,.11),rgba(255,255,255,.035)) !important; box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 8px 22px rgba(0,0,0,.12); backdrop-filter:blur(16px) saturate(140%); -webkit-backdrop-filter:blur(16px) saturate(140%); transition:transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease; }
.skill-category-button:hover,.skill-category-button:focus-visible { transform:translateY(-2px); border-color:rgba(140,236,255,.8); background:linear-gradient(135deg,rgba(0,190,255,.22),rgba(255,255,255,.06)) !important; box-shadow:0 10px 28px rgba(0,160,255,.12),inset 0 1px 0 rgba(255,255,255,.1); }
.skill-button-copy { min-width:0; display:flex; flex-direction:column; gap:5px; }
.skill-button-copy strong { font-size:11px; line-height:1.35; font-weight:650; color:#f5f7ff; overflow-wrap:anywhere; }
.skill-button-copy small { color:#a4a9b8; font-size:9px; line-height:1.35; }
.skill-button-icon { display:grid; place-items:center; flex:0 0 25px; width:25px; height:25px; border:1px solid rgba(140,236,255,.32); border-radius:8px; color:#a7f3ff; font-size:14px; }
.skill-dialog { width:min(540px,calc(100vw - 28px)); max-height:min(78vh,680px); overflow:auto; padding:clamp(18px,4vw,28px); color:#f5f7ff; background:rgba(7,10,16,.96) !important; border:1px solid rgba(140,236,255,.34) !important; border-radius:20px; box-shadow:0 25px 100px rgba(0,0,0,.7),0 0 45px rgba(0,160,255,.09); }
.skill-dialog::backdrop { background:rgba(0,0,0,.78); backdrop-filter:blur(12px); }
.skill-dialog-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.skill-dialog-head .eyebrow { margin:0 0 8px; color:#8cecff; font-size:10px; letter-spacing:.12em; }
.skill-dialog-head h2 { margin:0; font-size:clamp(22px,5vw,30px); line-height:1.15; overflow-wrap:anywhere; }
.skill-dialog-close { display:grid; place-items:center; flex:0 0 36px; width:36px; height:36px; border:1px solid rgba(255,255,255,.2); border-radius:11px; color:#f5f7ff; background:rgba(255,255,255,.07); font-size:23px; cursor:pointer; }
.skill-dialog-close:hover { border-color:rgba(140,236,255,.8); background:rgba(0,190,255,.14); }
.skill-dialog-description { margin:16px 0 18px; color:#a4a9b8; font-size:12px; line-height:1.6; }
.skill-dialog-tags { display:flex; flex-wrap:wrap; align-items:flex-start; gap:8px; }
.skill-dialog-tags .tag { display:inline-flex; align-items:center; min-height:32px; max-width:100%; margin:0; padding:7px 11px; white-space:normal; overflow-wrap:anywhere; line-height:1.35; font-size:11px; }
.projects { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; grid-auto-rows:1fr; gap:clamp(12px,2vw,20px); }
.project { display:flex; flex-direction:column; min-width:0; height:100%; box-sizing:border-box; }
.project > p { overflow-wrap:anywhere; }
.project .project-links { margin-top:auto; padding-top:14px; display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
/* Keep the fixed image height. The old ".project img" rule set height:auto + cover and made cards uneven. */
.project .image-button img { width:100%; height:226px; max-width:100%; object-fit:contain; }
.approach { align-items:stretch; }
.approach article { height:100%; min-width:0; box-sizing:border-box; }
.profile-sheet,.about > div,.contact > div,.contact form { min-width:0; }
.profile-sheet { overflow:hidden; }
@media (max-width:760px) { .skill-category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .projects { grid-template-columns:minmax(0,1fr); grid-auto-rows:auto; } .project { height:auto; } .project .image-button img { height:230px; } }
@media (max-width:390px) { .skill-category-grid { grid-template-columns:minmax(0,1fr); } .skill-category-button { min-height:64px; } }
@media (prefers-reduced-motion:reduce) { .skill-category-button { transition:none; } }


/* === REFINED ALIGNMENT PASS === */
html { scroll-padding-top: 90px; }
body { overflow-x: clip; }
header nav { gap: clamp(16px, 2.5vw, 35px); }
header nav a { white-space: nowrap; }
main { width: 100%; }
.hero {
  grid-template-columns: minmax(0, 1fr) minmax(210px, 250px);
  gap: clamp(28px, 5vw, 64px);
  padding-top: clamp(46px, 6vw, 72px);
  padding-bottom: clamp(48px, 6vw, 70px);
  align-items: center;
}
.hero > div { min-width: 0; }
.hero h1 { max-width: 760px; overflow-wrap: normal; }
.hero-note {
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 16px 44px rgba(0,0,0,.2);
}
.hero-note .eyebrow { display: block; line-height: 1.8; overflow-wrap: anywhere; }
.hero-note p { line-height: 1.7; margin: 16px 0; }
.availability { flex-wrap: wrap; }
.about {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 64px);
  margin-top: 44px;
  padding: 42px 0;
}
.about > div { min-width: 0; }
.profile-sheet {
  transform: none !important;
  align-self: start;
  padding: clamp(18px, 2.3vw, 26px);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.025)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 18px 48px rgba(0,0,0,.18);
}
.profile-sheet h3 { margin: 10px 0 14px; }
.profile-sheet dl { margin: 12px 0 18px; }
.profile-sheet dl div { padding: 9px 0; }
.profile-sheet .barcode { margin-top: 16px; }
.skill-category-grid { gap: 8px; }
.skill-category-button { min-height: 62px; padding: 10px 11px; }
.work-section { min-width: 0; }
.work-intro {
  align-items: flex-end;
  gap: 24px;
  margin: 22px 0 24px;
}
.work-intro h2 { max-width: 620px; margin-bottom: 0; }
.work-intro p { max-width: 300px; flex: 0 1 300px; }
.approach {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 12px 0 68px;
}
.approach article {
  min-width: 0;
  min-height: 180px;
  padding: 19px;
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.approach article .eyebrow { color: #8cecff; }
.approach h3 { margin: 14px 0 8px; line-height: 1.45; }
.approach p { margin: 0; line-height: 1.7; overflow-wrap: anywhere; }
footer { gap: 18px; }
footer > * { min-width: 0; }
#power-canvas { z-index: 0 !important; pointer-events: none !important; }
#power-core { z-index: 0 !important; pointer-events: none !important; }
@media (max-width: 900px) {
  .hero { gap: 28px; grid-template-columns: minmax(0, 1fr) minmax(190px, 225px); }
  .about { gap: 28px; }
  .profile-sheet { padding: 18px; }
  .work-intro { align-items: flex-start; }
}
@media (max-width: 760px) {
  body { padding-top: 100px; }
  html { scroll-padding-top: 130px; }
  header {
    height: auto;
    min-height: 76px;
    padding: 10px 20px;
    gap: 16px;
    flex-wrap: wrap;
  }
  header nav {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
  }
  header nav a { font-size: 11px; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 42px 0 48px;
  }
  .hero-note { display: block; padding: 17px; }
  .hero-note .eyebrow br { display: none; }
  .about {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    margin-top: 34px;
    padding: 34px 0;
  }
  .profile-sheet { width: 100%; }
  .work-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
  .work-intro h2 { font-size: clamp(26px, 7vw, 34px); }
  .work-intro p { max-width: 100%; flex-basis: auto; }
  .approach { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 44px; }
  .approach article { min-height: 0; padding: 17px; }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 420px) {
  header { padding-inline: 16px; }
  header nav { justify-content: flex-start; column-gap: 18px; row-gap: 12px; }
  main { padding-inline: 16px; }
  .hero h1 { font-size: clamp(34px, 10vw, 42px); letter-spacing: -1.8px; }
  .skill-category-grid { grid-template-columns: minmax(0, 1fr); }
  .form-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .approach article, .profile-sheet, .hero-note { transition: none !important; }
  .project, .action-button, .skill-category-button { transition: none; }
  .project:hover, .action-button:hover, .skill-category-button:hover { transform: none; }
  .power-ripple { display: none; }
}

/* Contact form fields fill their column. */
.contact form input,
.contact form textarea { width: 100%; box-sizing: border-box; }