/* Anubhav Jha portfolio — responsive, light, minimal */
:root {
    --ink: #241b19;
    --muted: #776b66;
    --line: #eee2dc;
    --paper: #fffaf7;
    --soft: #fff2ec;
    --green: #e34b2f;
    --green-dark: #bd321f;
    --mint: #ffe0d4;
    --white: #fff;
    --radius: 20px;
    --shadow: 0 22px 65px rgba(132, 52, 31, .11)
}

* {
    box-sizing: border-box
}

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased
}

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

button {
    font: inherit
}

.container {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto
}

.section {
    padding: 88px 0
}

.skip-link {
    position: absolute;
    top: -60px;
    left: 16px;
    background: var(--ink);
    color: white;
    padding: 10px 14px;
    z-index: 99
}

.skip-link:focus {
    top: 12px
}

.site-header {
    height: 76px;
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 250, 247, .9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(238, 226, 220, .85)
}

.nav {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: -.03em
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--green);
    color: white;
    font-family: Manrope, sans-serif;
    font-size: 12px;
    letter-spacing: -.04em
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    color: #59645e;
    font-size: 13px;
    font-weight: 600
}

.nav-links a:hover,
.social-links a:hover,
.text-link:hover {
    color: var(--green)
}

.nav-contact {
    padding: 10px 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink) !important
}

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

.menu-toggle {
    display: none;
    background: none;
    border: 0;
    padding: 8px
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    margin: 5px
}

.hero {
    min-height: 650px;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 55px;
    padding-top: 72px;
    padding-bottom: 100px;
    position: relative
}

.hero-section {
    background-image: radial-gradient(ellipse at 88% 16%, rgba(255, 145, 112, .12), transparent 34%), radial-gradient(ellipse at 2% 88%, rgba(227, 75, 47, .045), transparent 30%);
    background-repeat: no-repeat;
}

.availability {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #4b5d52;
    margin-bottom: 30px
}

.status-dot {
    height: 7px;
    width: 7px;
    background: #4c9b6c;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #ffe5dc
}

.eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .16em;
    color: var(--green);
    margin: 0 0 16px
}

.hero h1,
.section h2 {
    font-family: Manrope, sans-serif;
    letter-spacing: -.065em;
    line-height: 1.11;
    font-weight: 600
}

.hero h1 {
    font-size: clamp(42px, 5.4vw, 68px);
    margin: 0;
    max-width: 690px
}

.muted-heading {
    color: #8a958e
}

.hero-intro {
    font-size: 16px;
    line-height: 1.85;
    color: var(--muted);
    max-width: 540px;
    margin: 24px 0 28px
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 13px;
    padding: 13px 18px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    transition: transform .2s, background .2s, border-color .2s
}

.button:hover {
    transform: translateY(-2px)
}

.button-primary {
    background: var(--green);
    color: white;
    border: 1px solid var(--green)
}

.button-primary:hover {
    background: var(--green-dark)
}

.button-secondary {
    border: 1px solid var(--line);
    background: var(--white)
}

.button-secondary:hover {
    border-color: #b9c8bc
}

.social-links {
    display: flex;
    gap: 24px;
    margin-top: 32px;
    font-size: 12px;
    font-weight: 600;
    color: #58645d
}

.social-links span {
    font-size: 11px;
    margin-left: 3px
}

.hero-aside {
    position: relative;
    max-width: 440px;
    width: 100%;
    justify-self: end
}

.dev-scene {
    position: relative;
    min-height: 390px;
    display: grid;
    place-items: center;
    isolation: isolate
}

.scene-glow {
    position: absolute;
    z-index: -1;
    inset: 12% 3%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(227, 75, 47, .16), rgba(255, 224, 212, .28) 45%, transparent 72%);
    filter: blur(10px);
    animation: glow-breathe 5s ease-in-out infinite
}

.workspace-card {
    position: relative;
    z-index: 1;
    width: min(100%, 390px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 18px;
    background: #211e24;
    color: #f8f3f0;
    box-shadow: 0 28px 70px rgba(54, 33, 29, .24), 0 4px 12px rgba(54, 33, 29, .1);
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    animation: workspace-hover 6s ease-in-out infinite
}

.workspace-topbar {
    height: 45px;
    display: grid;
    grid-template-columns: 54px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: #2a272e
}

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

.window-dots i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff7465
}

.window-dots i:nth-child(2) {
    background: #f2bd63
}

.window-dots i:nth-child(3) {
    background: #78c89a
}

.workspace-title {
    overflow: hidden;
    color: #c3b9c3;
    font: 500 9px "DM Sans", sans-serif;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap
}

.workspace-live {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #a4d9b6;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: .08em
}

.workspace-live i,
.footer-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #74d69a;
    box-shadow: 0 0 9px rgba(116, 214, 154, .75);
    animation: status-pulse 1.8s ease-in-out infinite
}

.workspace-editor {
    min-height: 258px;
    padding: 17px 19px 19px
}

.editor-file {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    color: #c8bdc8;
    font-size: 9px
}

.file-icon {
    color: #e99b78;
    font-size: 12px
}

.file-dirty {
    color: #e99b78;
    font-size: 7px
}

.code-snippet {
    display: grid;
    gap: 7px;
    color: #e4dfe5;
    font: 500 10px/1.5 Consolas, "SFMono-Regular", monospace;
    white-space: nowrap
}

.code-line-number {
    display: inline-block;
    width: 25px;
    color: #726d78;
    user-select: none
}

.code-purple {
    color: #c7a5ed
}

.code-blue {
    color: #8fc9e8
}

.code-yellow {
    color: #eccb83
}

.code-green {
    color: #93d3ad
}

.code-caret {
    display: inline-block;
    width: 6px;
    height: 13px;
    margin-left: 4px;
    vertical-align: -2px;
    background: #ed886f;
    animation: caret-blink 1s steps(2, start) infinite
}

.workspace-footer {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 16px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    background: #2a272e;
    color: #bcb3bd;
    font-size: 8px
}

.workspace-footer>span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 7px
}

.workspace-footer>span:last-child {
    color: #8f8791;
    font-size: 7px;
    letter-spacing: .1em
}

.footer-status-dot {
    width: 5px;
    height: 5px
}

.skill-float {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: 12px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 12px 28px rgba(75, 43, 35, .12);
    color: #554640;
    font-size: 10px;
    font-weight: 700;
    animation: badge-float 4s ease-in-out infinite
}

.skill-float span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green)
}

.skill-float-one {
    top: 17px;
    right: -5px;
    animation-delay: -.7s
}

.skill-float-two {
    bottom: 48px;
    left: -22px;
    animation-delay: -1.8s
}

.skill-float-three {
    right: -16px;
    bottom: 26px;
    animation-delay: -2.6s
}

.skill-float-two span {
    background: #5f9e78
}

.skill-float-three span {
    background: #e5a54d
}

.scene-spark {
    position: absolute;
    z-index: 2;
    color: #e34b2f;
    animation: spark-twinkle 2.8s ease-in-out infinite
}

.spark-one {
    top: 69px;
    left: 7%;
    font-size: 17px
}

.spark-two {
    right: 5%;
    bottom: 62px;
    color: #d6a44f;
    font-size: 21px;
    animation-delay: -1.4s
}

.hero-bottom-note {
    position: absolute;
    bottom: 28px;
    left: 0;
    display: flex;
    align-items: center;
    gap: 13px;
    color: #8a958e;
    font-size: 9px;
    letter-spacing: .14em;
    font-weight: 700
}

.hero-bottom-note span:first-child {
    color: var(--green)
}

.hero-bottom-note .line {
    width: 40px;
    height: 1px;
    background: #cbd5cd
}

.section-soft {
    background: var(--soft);
    border-top: 1px solid #f4e7e0;
    border-bottom: 1px solid #f4e7e0
}

.two-column {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 100px
}

.section h2 {
    font-size: clamp(32px, 4vw, 46px);
    margin: 0
}

.about-copy>p {
    margin-top: 0;
    color: var(--muted);
    font-size: 14px
}

.about-copy .large-copy {
    font-family: Manrope, sans-serif;
    font-size: 20px;
    line-height: 1.6;
    letter-spacing: -.03em;
    color: var(--ink);
    margin-bottom: 14px
}

.education-row {
    display: flex;
    gap: 15px;
    border-top: 1px solid #f0ded6;
    padding: 17px 0 3px;
    margin-top: 17px
}

.education-icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid #f1d8ce;
    border-radius: 10px;
    color: var(--green);
    font-size: 10px;
    font-weight: 700
}

.education-row strong,
.education-row span {
    display: block
}

.education-row strong {
    font-size: 12px;
    margin-bottom: 3px
}

.education-row span {
    font-size: 11px;
    color: var(--muted)
}

.section-topline {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 34px
}

.section-count {
    font-size: 10px;
    letter-spacing: .13em;
    color: #8a958e;
    font-weight: 700;
    padding-bottom: 6px
}

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

.project-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 17px;
    overflow: hidden;
    background: white;
    transition: transform .25s, box-shadow .25s
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow)
}

.project-visual {
    height: 210px;
    position: relative;
    overflow: hidden;
    background: #fff0e9
}

.visual-label {
    position: absolute;
    bottom: 14px;
    left: 17px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .16em;
    color: #6e8275
}

.visual-urban {
    background: #fff0e9
}

.map-grid {
    position: absolute;
    inset: -30px;
    background-image: linear-gradient(#f1d6ca 1px, transparent 1px), linear-gradient(90deg, #f1d6ca 1px, transparent 1px);
    background-size: 31px 31px;
    transform: rotate(-12deg) scale(1.2)
}

.map-route {
    position: absolute;
    width: 250px;
    height: 150px;
    border: 3px solid #e15a3d;
    border-color: #e15a3d transparent transparent #e15a3d;
    border-radius: 48%;
    transform: rotate(28deg);
    left: 20%;
    top: 20%
}

.map-pin {
    position: absolute;
    z-index: 1;
    color: #fff;
    background: var(--green);
    width: 28px;
    height: 28px;
    border: 5px solid #f6c8b9;
    border-radius: 50%;
    font-size: 8px;
    display: grid;
    place-items: center
}

.pin-a {
    left: 31%;
    top: 29%
}

.pin-b {
    right: 27%;
    bottom: 24%;
    background: #d95b37;
    border-color: #ffe1d2
}

.visual-parking {
    background: #f7eee8
}

.parking-sign {
    position: absolute;
    top: 33px;
    left: calc(50% - 30px);
    width: 60px;
    height: 60px;
    border: 2px solid #c94b32;
    border-radius: 15px;
    display: grid;
    place-items: center;
    color: #c94b32;
    font: 700 31px Manrope;
    transform: rotate(-5deg)
}

.parking-slots {
    position: absolute;
    bottom: 38px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 9px;
    transform: perspective(100px) rotateX(22deg)
}

.parking-slots i {
    height: 60px;
    width: 25px;
    border: 2px solid #e4c9bd;
    border-top: 0;
    border-bottom: 0;
    transform: skewY(-10deg)
}

.visual-parking .visual-label {
    color: #898778
}

.visual-kernel {
    background: #291d1a;
    display: grid;
    place-items: center
}

.terminal-window {
    width: 75%;
    padding: 20px 20px 15px;
    border: 1px solid #6f4035;
    border-radius: 9px;
    background: #38231e;
    box-shadow: 0 15px 30px #35180e80;
    color: #e9c9be;
    font: 10px/1.8 monospace;
    transform: rotate(-2deg)
}

.terminal-dots {
    display: flex;
    gap: 5px;
    margin-bottom: 13px
}

.terminal-dots i {
    height: 6px;
    width: 6px;
    border-radius: 50%;
    background: #e7795c
}

.terminal-window p {
    margin: 4px 0
}

.terminal-window .terminal-green {
    color: #ff9b7e
}

.visual-kernel .visual-label {
    color: #c8a49a
}

.visual-maze {
    background: #fff0eb;
    display: grid;
    place-items: center
}

.maze-board {
    width: 170px;
    height: 130px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 5px;
    transform: rotate(-7deg)
}

.maze-board i {
    background: #f2b8a7;
    border-radius: 3px
}

.maze-board i:nth-child(2n) {
    background: #df563b
}

.maze-board i:nth-child(3n) {
    background: #f8d9ce
}

.maze-player {
    position: absolute;
    width: 15px;
    height: 15px;
    background: #c43c26;
    border: 3px solid #f2b6a6;
    border-radius: 50%;
    top: 42%;
    left: 38%;
    box-shadow: 0 0 0 5px #f9ded4
}

.visual-maze .visual-label {
    color: #a96858
}

.project-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px 22px 23px
}

.project-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 9px;
    letter-spacing: .09em;
    font-weight: 700;
    color: #87928a
}

.project-body h3 {
    font: 700 22px Manrope;
    letter-spacing: -.045em;
    margin: 11px 0 7px
}

.project-body>p {
    font-size: 12px;
    line-height: 1.8;
    color: var(--muted);
    margin: 0 0 17px;
    min-height: 66px
}

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

.tag-list span {
    background: #fff4ef;
    border: 1px solid #f4e7e0;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 9px;
    font-weight: 600;
    color: #65736a
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 18px
}

.project-action {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid #eadbd5;
    border-radius: 8px;
    background: #fffaf7;
    color: #4e403b;
    font-size: 10px;
    font-weight: 700;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease
}

.project-action svg {
    width: 13px;
    height: 13px;
    fill: currentColor
}

.project-action:hover {
    transform: translateY(-2px)
}

.project-demo:hover {
    border-color: #e34b2f;
    background: #fff0eb;
    color: #c43c26
}

.project-repo:hover {
    border-color: #514641;
    background: #332d2a;
    color: #fff
}

.project-action:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px
}

.project-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border-top: 1px solid var(--line);
    margin-top: 25px;
    padding-top: 20px
}

.project-footer p {
    font-size: 12px;
    color: var(--muted);
    margin: 0 auto 0 0
}

.text-link {
    font-size: 11px;
    font-weight: 700
}

.text-link span {
    margin-left: 5px
}

.skills-layout {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 100px
}

.skills-intro {
    font-size: 13px;
    color: var(--muted);
    max-width: 300px;
    margin-top: 20px
}

.skill-group {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 16px;
    border-bottom: 1px solid #f0ded6;
    padding: 18px 0
}

.skill-group:first-child {
    padding-top: 0
}

.skill-number {
    font-size: 10px;
    color: var(--green);
    font-weight: 700;
    padding-top: 4px
}

.skill-group h3 {
    font: 700 14px Manrope;
    margin: 0 0 5px;
    letter-spacing: -.02em
}

.skill-group p {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
    line-height: 1.8
}

.resume-section {
    padding-top: 70px;
    padding-bottom: 70px
}

.resume-panel {
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 32px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    background: white
}

.resume-panel h2 {
    font-size: 32px
}

.resume-panel p:not(.eyebrow) {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 0
}

.resume-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px
}

.contact-section {
    background: #fff0e9;
    border-top: 1px solid #f0ddd5;
    padding: 90px 0 35px
}

.contact-content {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
    align-items: center;
    column-gap: clamp(36px, 7vw, 96px)
}

.contact-content h2 {
    font-size: clamp(42px, 6vw, 66px);
    margin: 0
}

.contact-intro {
    max-width: 460px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8
}

.contact-actions {
    display: grid;
    gap: 12px
}

.linkedin-cta {
    min-height: 132px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 25px 27px;
    border: 1px solid var(--green);
    border-radius: 16px;
    background: linear-gradient(135deg, #e34b2f, #bd321f);
    color: #fff;
    box-shadow: 0 16px 32px rgba(189, 50, 31, .16);
    transition: transform .2s, box-shadow .2s
}

.linkedin-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 38px rgba(189, 50, 31, .22)
}

.linkedin-cta-copy {
    display: grid;
    gap: 10px
}

.linkedin-cta-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .14em;
    opacity: .78
}

.linkedin-cta strong {
    font-family: Manrope, sans-serif;
    font-size: clamp(18px, 2vw, 23px);
    line-height: 1.25;
    letter-spacing: -.04em
}

.linkedin-cta-arrow {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    font-size: 18px
}

.contact-email-card {
    display: grid;
    gap: 4px;
    padding: 16px 20px;
    border: 1px solid #f0d9d0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .68)
}

.contact-email-prompt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #dca08d;
    padding-bottom: 7px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.025em;
    width: fit-content
}

.contact-email:hover {
    color: var(--green)
}

.contact-bottom {
    grid-column: 1 / -1;
    margin-top: 90px;
    padding-top: 20px;
    border-top: 1px solid #f0d9d0;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #748077;
    font-size: 10px
}

.contact-bottom div {
    display: flex;
    gap: 22px
}

.contact-bottom a:hover {
    color: var(--green)
}

.footer {
    background: var(--paper);
    padding: 18px 0
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px
}

.footer .brand {
    font-size: 12px
}

.footer .brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    font-size: 10px
}

.footer-inner>span {
    font-size: 10px;
    color: #8a958e
}

@media(min-width:1300px) {
    .hero {
        min-height: 710px
    }
}

@media(max-width:850px) {
    .section {
        padding: 70px 0
    }

    .contact-content {
        grid-template-columns: minmax(0, 1fr) minmax(270px, .9fr);
        column-gap: 28px
    }

    .hero {
        gap: 30px;
        min-height: auto;
        padding-top: 65px;
        padding-bottom: 95px
    }

    .hero h1 {
        font-size: clamp(40px, 6.5vw, 58px)
    }

    .hero-aside {
        max-width: 340px
    }

    .dev-scene {
        min-height: 370px
    }

    .two-column,
    .skills-layout {
        gap: 45px
    }

    .project-visual {
        height: 180px
    }

    .project-body {
        padding: 18px
    }

    .project-body>p {
        min-height: 90px
    }

    .resume-panel {
        padding: 28px
    }

    .resume-actions {
        max-width: 270px
    }
}

@media(max-width:640px) {
    .container {
        width: min(100% - 36px, 500px)
    }

    .site-header {
        height: 66px
    }

    .menu-toggle {
        display: block;
        cursor: pointer
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 65px;
        left: 0;
        right: 0;
        padding: 18px 20px 22px;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 16px 24px #17211d0b;
        flex-direction: column;
        align-items: stretch;
        gap: 0
    }

    .nav-links.is-open {
        display: flex
    }

    .nav-links>a {
        padding: 12px 3px
    }

    .nav-links .nav-contact {
        margin-top: 7px;
        text-align: center;
        padding: 11px
    }

    .hero {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 42px;
        padding-top: 48px;
        padding-bottom: 86px
    }

    .availability {
        margin-bottom: 22px
    }

    .hero h1 {
        font-size: clamp(39px, 10vw, 53px)
    }

    .hero-intro {
        font-size: 14px;
        margin: 19px 0 23px
    }

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

    .button {
        padding: 13px 10px;
        gap: 7px;
        font-size: 11px
    }

    .social-links {
        gap: 19px;
        margin-top: 25px
    }

    .hero-aside {
        max-width: 420px;
        align-self: center;
        width: calc(100% - 10px)
    }

    .dev-scene {
        min-height: 340px
    }

    .workspace-card {
        transform: none
    }

    .skill-float {
        padding: 8px 10px;
        font-size: 9px
    }

    .skill-float-two {
        left: -12px
    }

    .skill-float-three {
        right: -9px
    }

    .hero-bottom-note {
        bottom: 28px
    }

    .section {
        padding: 62px 0
    }

    .two-column,
    .skills-layout {
        grid-template-columns: 1fr;
        gap: 28px
    }

    .section h2 {
        font-size: 35px
    }

    .about-copy .large-copy {
        font-size: 18px
    }

    .section-topline {
        align-items: start;
        gap: 12px
    }

    .section-count {
        white-space: nowrap;
        padding-top: 8px;
        font-size: 8px
    }

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

    .project-visual {
        height: 190px
    }

    .project-body>p {
        min-height: 0
    }

    .project-footer {
        gap: 14px
    }

    .project-footer p {
        flex-basis: 100%
    }

    .skills-layout {
        gap: 28px
    }

    .skill-group:first-child {
        padding-top: 15px
    }

    .resume-section {
        padding: 48px 0
    }

    .resume-panel {
        align-items: stretch;
        flex-direction: column;
        padding: 25px 22px;
        gap: 22px
    }

    .resume-panel h2 {
        font-size: 29px
    }

    .resume-actions {
        max-width: none;
        display: grid;
        grid-template-columns: 1fr 1fr
    }

    .contact-section {
        padding: 65px 0 25px
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 27px
    }

    .contact-actions {
        max-width: 520px
    }

    .linkedin-cta {
        min-height: 112px;
        padding: 21px
    }

    .contact-content h2 {
        font-size: clamp(39px, 10vw, 52px)
    }

    .contact-bottom {
        margin-top: 45px;
        align-items: flex-start;
        flex-direction: column
    }

    .contact-bottom div {
        gap: 18px
    }

    .footer-inner {
        flex-wrap: wrap
    }

    .footer-inner>span:nth-child(2) {
        display: none
    }

    .footer-inner>span:last-child {
        margin-left: auto
    }
}

@media(max-width:360px) {
    .container {
        width: calc(100% - 28px)
    }

    .hero-actions,
    .resume-actions {
        grid-template-columns: 1fr
    }

    .social-links {
        gap: 13px;
        font-size: 11px
    }

    .profile-facts {
        font-size: 9px
    }

    .project-meta {
        font-size: 8px
    }

    .project-body h3 {
        font-size: 20px
    }
}

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

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important
    }
}


/* Clean, minimal resume dropdown — no entrance animation */
.resume-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center
}

.resume-trigger {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    background: var(--green);
    color: #fff !important;
    border: 1px solid var(--green);
    border-radius: 9px;
    padding: 10px 16px;
    box-shadow: none;
    transition: background-color .18s, border-color .18s
}

.resume-trigger:hover {
    background: var(--green-dark);
    border-color: var(--green-dark)
}

.resume-trigger:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 4px
}

.dropdown-chevron {
    display: inline-block;
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transform-origin: center;
    transition: transform .18s ease
}

.resume-trigger[aria-expanded="true"] .dropdown-chevron {
    transform: translateY(2px) rotate(225deg)
}

.resume-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 245px;
    padding: 6px;
    background: #fff;
    border: 1px solid #f0ded8;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(80, 35, 20, .12);
    z-index: 50
}

.resume-menu[hidden] {
    display: none
}

.resume-menu a {
    display: grid;
    grid-template-columns: 30px 1fr 14px;
    align-items: center;
    gap: 10px;
    padding: 11px 9px;
    border-radius: 6px;
    transition: background-color .15s, color .15s
}

.resume-menu a:hover,
.resume-menu a:focus-visible {
    background: #fff0eb;
    outline: none
}

.resume-menu a:focus-visible {
    box-shadow: inset 0 0 0 2px #e34b2f
}

.resume-menu-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: #fff0eb;
    color: #bd321f;
    font-size: 10px;
    font-weight: 800
}

.resume-menu strong,
.resume-menu small {
    display: block
}

.resume-menu strong {
    font-size: 12px;
    color: var(--ink)
}

.resume-menu small {
    font-size: 10px;
    color: #8b7770;
    margin-top: 1px
}

.resume-menu-arrow {
    font-size: 12px;
    color: var(--green)
}

/* Entrance and scroll-reveal motion stays deliberately restrained. */
@keyframes hero-enter {
    from {
        opacity: 0;
        transform: translateY(16px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes glow-breathe {
    0%,
    100% {
        opacity: .65;
        transform: scale(.94)
    }

    50% {
        opacity: 1;
        transform: scale(1.06)
    }
}

@keyframes workspace-hover {
    0%,
    100% {
        transform: perspective(1000px) rotateY(-5deg) rotateX(2deg) translateY(0)
    }

    50% {
        transform: perspective(1000px) rotateY(-3deg) rotateX(1deg) translateY(-7px)
    }
}

@keyframes badge-float {
    0%,
    100% {
        transform: translateY(0) rotate(-2deg)
    }

    50% {
        transform: translateY(-9px) rotate(1deg)
    }
}

@keyframes status-pulse {
    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 9px rgba(116, 214, 154, .75)
    }

    50% {
        opacity: .55;
        box-shadow: 0 0 3px rgba(116, 214, 154, .35)
    }
}

@keyframes caret-blink {
    to {
        visibility: hidden
    }
}

@keyframes spark-twinkle {
    0%,
    100% {
        opacity: .55;
        transform: scale(.8) rotate(-15deg)
    }

    50% {
        opacity: 1;
        transform: scale(1.15) rotate(15deg)
    }
}

.hero-copy>* {
    animation: hero-enter .65s both;
    animation-timing-function: cubic-bezier(.2, .7, .2, 1)
}

.hero-copy>*:nth-child(1) {
    animation-delay: .04s
}

.hero-copy>*:nth-child(2) {
    animation-delay: .11s
}

.hero-copy>*:nth-child(3) {
    animation-delay: .18s
}

.hero-copy>*:nth-child(4) {
    animation-delay: .25s
}

.hero-copy>*:nth-child(5) {
    animation-delay: .32s
}

.hero-aside {
    animation: hero-enter .8s .18s both cubic-bezier(.2, .7, .2, 1)
}

.project-card {
    will-change: transform
}

.project-visual {
    transition: filter .3s
}

.project-card:hover .project-visual {
    filter: saturate(1.12)
}

.project-card:hover .map-route {
    animation: route-drift 1.5s ease-in-out infinite alternate
}

@keyframes route-drift {
    from {
        transform: rotate(28deg) translate(0, 0)
    }

    to {
        transform: rotate(31deg) translate(4px, -3px)
    }
}

.reveal-ready .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .65s ease, transform .65s cubic-bezier(.2, .7, .2, 1)
}

.reveal-ready .reveal.is-visible {
    opacity: 1;
    transform: translateY(0)
}

.reveal-ready .project-card {
    transition: opacity .65s ease, transform .65s cubic-bezier(.2, .7, .2, 1), box-shadow .25s
}

.reveal-ready .project-card.reveal {
    transform: translateY(18px)
}

.reveal-ready .project-card.reveal.is-visible {
    transform: translateY(0)
}

@media(max-width:640px) {
    .resume-dropdown {
        display: block;
        width: 100%;
        padding: 5px 0 0
    }

    .resume-trigger {
        width: 100%;
        justify-content: center
    }

    .resume-menu {
        position: static;
        width: 100%;
        margin-top: 9px;
        box-shadow: 0 10px 28px rgba(77, 35, 24, .09);
        animation: none
    }

    .nav-links {
        gap: 0
    }

    .nav-links>a {
        padding: 12px 3px
    }

    .nav-links .resume-dropdown {
        margin-top: 5px
    }

    .nav-links .resume-dropdown .resume-menu a {
        padding: 11px 10px
    }
}

@media(prefers-reduced-motion:reduce) {

    .hero-copy>*,
    .hero-aside,
    .dev-scene,
    .dev-scene *,
    .project-card:hover .map-route {
        animation: none !important
    }

    .workspace-card {
        transform: none
    }

    .reveal-ready .reveal,
    .reveal-ready .project-card {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important
    }

    .resume-menu {
        animation: none
    }
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 8px
}

.eyebrow::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: #e34b2f;
    transform: rotate(45deg);
    flex: 0 0 auto
}

.project-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, .12), transparent 55%)
}

.project-card:hover {
    border-color: #edc9bb
}


/* Live LeetCode profile widget */
.leetcode-section {
    background: linear-gradient(180deg, #fffaf7 0%, #fff5f0 100%);
    border-top: 1px solid #f4e4dc;
    border-bottom: 1px solid #f4e4dc
}

.leetcode-heading {
    align-items: end;
    gap: 28px
}

.leetcode-intro {
    max-width: 540px;
    color: var(--muted);
    font-size: 13px;
    margin: 15px 0 0;
    line-height: 1.8
}

.leetcode-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
    padding: 11px 15px;
    border: 1px solid #efcfc3;
    border-radius: 9px;
    background: #fff;
    color: #bd321f;
    font-size: 11px;
    font-weight: 700;
    transition: background-color .18s, border-color .18s
}

.leetcode-profile-link:hover {
    background: #fff0e9;
    border-color: #e8ad9b
}

.leetcode-widget {
    border: 1px solid #efded6;
    border-radius: 22px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(132, 52, 31, .07)
}

.leetcode-widget-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 27px;
    border-bottom: 1px solid #f2e5df
}

.leetcode-user {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0
}

.leetcode-avatar {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 15px;
    background: linear-gradient(145deg, #f05b3d, #bd321f);
    color: white;
    font: 800 18px Manrope;
    flex-shrink: 0
}

.leetcode-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.leetcode-user-name {
    font: 700 15px Manrope;
    letter-spacing: -.025em
}

.leetcode-handle {
    font-size: 11px;
    color: #9a766b
}

.leetcode-handle:hover {
    color: var(--green)
}

.leetcode-live-status {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #8a7770;
    font-size: 10px;
    white-space: nowrap
}

.leetcode-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #e8a04b;
    box-shadow: 0 0 0 4px #fff1e5
}

.leetcode-live-status.is-live .leetcode-live-dot {
    background: #48a879;
    box-shadow: 0 0 0 4px #e8f7ee
}

.leetcode-live-status.is-error .leetcode-live-dot {
    background: #c75a42;
    box-shadow: 0 0 0 4px #fff0eb
}

.leetcode-stats-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: 13px;
    padding: 20px 22px
}

.leetcode-stat {
    min-width: 0;
    border: 1px solid #f1e4de;
    border-radius: 15px;
    padding: 18px 18px 16px;
    background: #fffdfc
}

.leetcode-stat-total {
    background: linear-gradient(135deg, #fff4ee, #fffaf7);
    border-color: #f1d8cd
}

.leetcode-stat-label {
    display: block;
    color: #8d7a73;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase
}

.leetcode-stat-value {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-top: 9px;
    font: 700 clamp(25px, 3vw, 35px)/1.2 Manrope;
    letter-spacing: -.06em;
    color: #2b211e
}

.leetcode-stat-value strong {
    font-weight: 800
}

.leetcode-stat-value>span {
    font-size: 14px;
    font-weight: 600;
    color: #a18b82;
    letter-spacing: -.02em
}

.leetcode-stat-foot {
    display: block;
    margin-top: 9px;
    color: #9b8981;
    font-size: 10px;
    line-height: 1.5
}

.leetcode-progress-track {
    height: 5px;
    background: #f1dfd7;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 13px
}

.leetcode-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f27857, #bd321f);
    transition: width .6s ease
}

.leetcode-details-grid {
    display: grid;
    grid-template-columns: .83fr 1.17fr;
    align-items: stretch;
    gap: 13px;
    padding: 0 22px 14px
}

.leetcode-activity-column {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 13px;
    min-width: 0
}

.leetcode-panel {
    border: 1px solid #f0e2dc;
    border-radius: 15px;
    padding: 21px;
    background: #fff
}

.leetcode-panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 14px;
    margin-bottom: 22px
}

.leetcode-kicker {
    display: block;
    font-size: 9px;
    letter-spacing: .15em;
    color: #c15a41;
    font-weight: 800;
    margin-bottom: 5px
}

.leetcode-panel-heading h3 {
    font: 700 17px/1.35 Manrope;
    letter-spacing: -.04em;
    margin: 0
}

.leetcode-panel-mark {
    color: #d5b7ab;
    font: 700 11px Manrope
}

.difficulty-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%
}

.easy-dot {
    background: #3b9b73
}

.medium-dot {
    background: #d89b34
}

.hard-dot {
    background: #d95a47
}

.difficulty-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px
}

.difficulty-card {
    min-width: 0;
    padding: 11px 10px 10px;
    border: 1px solid #f0e7e2;
    border-top: 2px solid var(--difficulty-color);
    border-radius: 9px;
    background: #fdfaf8
}

.difficulty-easy {
    --difficulty-color: #3b9b73
}

.difficulty-medium {
    --difficulty-color: #d89b34
}

.difficulty-hard {
    --difficulty-color: #d95a47
}

.difficulty-card-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #75635c;
    font-size: 9px;
    font-weight: 700
}

.difficulty-easy .difficulty-dot {
    background: #3b9b73
}

.difficulty-medium .difficulty-dot {
    background: #d89b34
}

.difficulty-hard .difficulty-dot {
    background: #d95a47
}

.activity-panel {
    display: flex;
    flex-direction: column
}

.activity-panel .leetcode-panel-heading {
    align-items: center;
    margin-bottom: 14px
}

.activity-metrics {
    display: grid;
    flex: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px
}

.activity-metric {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 13px;
    border: 1px solid #f0e7e2;
    border-radius: 10px;
    background: #fdfaf8
}

.activity-metric-label {
    color: #82736c;
    font-size: 9px;
    line-height: 1.4
}

.activity-metric>div {
    display: flex;
    align-items: baseline;
    gap: 5px
}

.activity-metric strong {
    color: #2b211e;
    font: 700 clamp(20px, 2vw, 27px)/1 Manrope, sans-serif;
    letter-spacing: -.05em
}

.activity-metric>div span {
    color: #9b8981;
    font-size: 9px
}

.difficulty-card>strong {
    display: block;
    overflow: hidden;
    margin-top: 12px;
    color: #2b211e;
    font: 700 20px/1.1 Manrope, sans-serif;
    letter-spacing: -.045em;
    text-overflow: ellipsis
}

.leetcode-panel-note {
    font-size: 10px;
    color: #a08d85;
    margin: 20px 0 0;
    line-height: 1.6
}

.rating-panel {
    min-width: 0
}

.rating-chart-wrap {
    width: 100%;
    min-height: 190px;
    position: relative
}

.rating-chart-wrap svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible
}

.rating-chart-wrap svg text {
    font-family: "DM Sans", sans-serif;
    fill: #9b8981;
    font-size: 10px
}

.rating-chart-wrap .rating-gridline {
    stroke: #f0e4de;
    stroke-width: 1;
    stroke-dasharray: 3 5
}

.rating-chart-wrap .rating-interaction-surface {
    fill: transparent;
    pointer-events: all
}

.rating-chart-wrap .rating-area {
    fill: url(#lc-rating-gradient)
}

.rating-chart-wrap .rating-line {
    fill: none;
    stroke: #e34b2f;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round
}

.rating-chart-wrap .rating-point {
    fill: #fff;
    stroke: #e34b2f;
    stroke-width: 2.5;
    pointer-events: none
}

.rating-chart-wrap .rating-peak-label {
    fill: #bd321f;
    stroke: #fffaf7;
    stroke-width: 4px;
    stroke-linejoin: round;
    paint-order: stroke;
    font-size: 10px;
    font-weight: 800;
    pointer-events: none
}

.rating-chart-wrap .rating-peak-halo {
    fill: rgba(227, 75, 47, .16);
    stroke: none;
    pointer-events: none
}

.rating-chart-wrap .rating-peak {
    fill: #bd321f;
    stroke: #fff;
    stroke-width: 3
}

.rating-chart-wrap .rating-hit-area {
    fill: transparent;
    stroke: transparent;
    pointer-events: all;
    outline: none
}

.rating-chart-wrap .rating-hit-area:focus-visible {
    fill: rgba(227, 75, 47, .1);
    stroke: #bd321f;
    stroke-width: 1.5
}

.rating-chart-wrap .rating-point.rating-active {
    fill: #fff;
    stroke: #a32e1c;
    stroke-width: 4;
    transform: scale(1.65);
    transform-box: fill-box;
    transform-origin: center
}

.rating-hover-details {
    display: grid;
    grid-template-columns: 1.6fr 1.2fr .8fr 1.2fr .8fr;
    gap: 10px;
    margin-top: 5px;
    padding: 12px 13px;
    border: 1px solid #f0e2dc;
    border-radius: 10px;
    background: #fffaf7
}

.rating-hover-details[hidden] {
    display: none
}

.rating-hover-details>div {
    display: grid;
    min-width: 0;
    gap: 4px
}

.rating-hover-details>div>span {
    color: #a08d85;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: .08em;
    white-space: nowrap
}

.rating-hover-details>div>strong {
    overflow: hidden;
    color: #473832;
    font-size: 9px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap
}

.rating-change {
    font-size: 10px;
    font-weight: 800
}

.rating-change.is-up {
    color: #388b67
}

.rating-change.is-down {
    color: #c94b36
}

.leetcode-chart-loading {
    display: grid;
    place-items: center;
    min-height: 190px;
    color: #a08d85;
    font-size: 11px;
    text-align: center
}

.rating-chart-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    color: #9b8981;
    font-size: 10px
}

.badges-panel {
    margin: 0 22px 0
}

.leetcode-badge-count {
    font-size: 10px;
    color: #a28a80;
    background: #fff4ef;
    border: 1px solid #f2e1d9;
    border-radius: 999px;
    padding: 6px 10px;
    white-space: nowrap
}

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

.leetcode-badge {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #f1e5df;
    border-radius: 12px;
    background: #fffdfc;
    transition: border-color .18s, transform .18s
}

.leetcode-badge:hover {
    border-color: #e9b9a9;
    transform: translateY(-2px)
}

.leetcode-badge-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    border-radius: 12px;
    background: #fff0e9;
    color: #c34a30;
    font-size: 18px;
    overflow: hidden
}

.leetcode-badge-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px
}

.leetcode-badge-name {
    display: block;
    overflow: hidden;
    color: #4a3932;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.45;
    text-overflow: ellipsis
}

.leetcode-badge-level {
    display: block;
    margin-top: 3px;
    color: #a28b80;
    font-size: 9px
}

.leetcode-badge-skeleton {
    display: contents
}

.leetcode-badge-skeleton span {
    height: 66px;
    border: 1px solid #f3e9e4;
    border-radius: 12px;
    background: linear-gradient(90deg, #fffaf7, #fff, #fffaf7);
    background-size: 200% 100%;
    animation: lc-skeleton 1.4s ease-in-out infinite
}

@keyframes lc-skeleton {
    to {
        background-position: -200% 0
    }
}

.leetcode-empty-badges {
    font-size: 11px;
    color: #9b8981
}

.leetcode-widget-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 21px;
    padding: 16px 25px;
    border-top: 1px solid #f2e5df;
    background: #fffdfc;
    color: #a08d85;
    font-size: 10px
}

.leetcode-refresh {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: #bd321f;
    font: 700 10px "DM Sans", sans-serif;
    cursor: pointer;
    padding: 6px
}

.leetcode-refresh:hover {
    text-decoration: underline
}

.leetcode-refresh:disabled {
    opacity: .5;
    cursor: wait
}

.leetcode-error {
    margin: 0;
    padding: 0 25px 18px;
    color: #b64a32;
    font-size: 11px
}

.leetcode-error[hidden],
.leetcode-empty-badges[hidden] {
    display: none
}

@media(max-width:850px) {
    .leetcode-details-grid {
        grid-template-columns: 1fr
    }

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

    .leetcode-stats-grid {
        grid-template-columns: 1.2fr 1fr 1fr
    }

    .leetcode-stat {
        padding: 15px
    }
}

@media(max-width:640px) {
    .rating-hover-details {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }

    .leetcode-heading {
        align-items: start;
        flex-direction: column
    }

    .leetcode-profile-link {
        align-self: flex-start
    }

    .leetcode-widget-top {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px
    }

    .leetcode-stats-grid {
        grid-template-columns: 1fr 1fr;
        padding: 14px;
        gap: 9px
    }

    .leetcode-stat-total {
        grid-column: 1/-1
    }

    .leetcode-stat {
        padding: 15px
    }

    .leetcode-stat-value {
        font-size: 28px
    }

    .leetcode-details-grid {
        padding: 0 14px 12px;
        gap: 12px
    }

    .leetcode-panel {
        padding: 16px
    }

    .leetcode-panel-heading h3 {
        font-size: 16px
    }

    .rating-chart-wrap {
        min-height: 160px
    }

    .leetcode-chart-loading {
        min-height: 160px
    }

    .badges-panel {
        margin: 0 14px
    }

    .leetcode-badges {
        grid-template-columns: 1fr 1fr;
        gap: 8px
    }

    .leetcode-badge {
        padding: 9px;
        gap: 8px
    }

    .leetcode-badge-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        border-radius: 10px
    }

    .leetcode-badge-name {
        font-size: 9px
    }

    .leetcode-widget-footer {
        align-items: flex-start;
        flex-direction: column;
        padding: 15px 18px;
        gap: 7px
    }

    .leetcode-error {
        padding: 0 18px 18px
    }
}

@media(max-width:360px) {
    .leetcode-stats-grid {
        grid-template-columns: 1fr
    }

    .leetcode-stat-total {
        grid-column: auto
    }

    .leetcode-badges {
        grid-template-columns: 1fr
    }

    .leetcode-widget-top {
        gap: 12px
    }

    .leetcode-live-status {
        white-space: normal
    }
}

@media(prefers-reduced-motion:reduce) {

    .leetcode-progress-track span,
    .leetcode-badge,
    .leetcode-badge-skeleton span {
        transition: none !important;
        animation: none !important
    }
}

/* LeetCode badges: recent-first preview with an explicit View all control */
.leetcode-badges-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0
}

.leetcode-view-all {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #efcfc3;
    border-radius: 999px;
    padding: 7px 10px;
    background: #fff;
    color: #bd321f;
    font: 700 10px "DM Sans", sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .18s, border-color .18s
}

.leetcode-view-all:hover {
    background: #fff0e9;
    border-color: #e8ad9b
}

.leetcode-view-all:focus-visible {
    outline: 2px solid #e34b2f;
    outline-offset: 3px
}

.leetcode-view-all[hidden] {
    display: none
}

.leetcode-badge-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px
}

.leetcode-badges {
    align-items: stretch
}

.leetcode-badge {
    min-height: 68px
}

@media(max-width:440px) {
    .leetcode-badges-actions {
        gap: 6px
    }

    .leetcode-badge-count {
        padding: 5px 7px
    }

    .leetcode-view-all {
        padding: 6px 8px
    }

    .leetcode-badge {
        align-items: flex-start
    }

    .leetcode-badge-icon {
        margin-top: 2px
    }
}
