:root {
    --blue: #66a3fe;
    --purple: #a78bfa;
    --yellow: #fcd34d;
    --pink: #ff9eaa;
    --green: #4ade80;
    --coral: #f87171;
    --ink: #000;
    --paper: #fff;
    --display: "Alfa Slab One", "Rockwell", Georgia, serif;
    --body: "Inter", "Segoe UI", system-ui, sans-serif;
    --mono: "Space Mono", "Consolas", monospace;
    --shadow: 6px 6px 0 var(--ink);
    --shadow-sm: 4px 4px 0 var(--ink);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--body);
    background: var(--blue);
    color: var(--ink);
    line-height: 1.55;
    font-size: 17px;
}

a {
    color: inherit;
}

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

.wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.disp {
    font-family: var(--display);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.mono {
    font-family: var(--mono);
}

/* scroll progress */
#progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 10px;
    width: 0;
    background: var(--green);
    z-index: 50;
    border-bottom: 2px solid var(--ink);
}

/* nav */
.nav {
    position: relative;
    top: 22px;
    z-index: 40;
    margin: 22px auto 0;
    max-width: 1120px;
    width: calc(100% - 48px);
    background: var(--purple);
    border: 4px solid var(--ink);
    border-radius: 40px;
    box-shadow: var(--shadow);
    padding: 14px 26px;
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.nav .brand {
    font-family: var(--display);
    font-style: italic;
    color: #fff;
    font-size: 1.7rem;
    text-decoration: none;
    -webkit-text-stroke: 1.5px var(--ink);
    paint-order: stroke fill;
    text-shadow: 2px 2px 0 var(--ink);
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.pill {
    display: inline-block;
    background: var(--paper);
    border: 3px solid var(--ink);
    border-radius: 30px;
    padding: 7px 18px;
    font-weight: 700;
    font-size: .92rem;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 3px 3px 0 var(--ink);
}

.pill:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--ink);
}

.pill.contact {
    background: var(--pink);
}

.date {
    background: var(--yellow);
    border: 3px solid var(--ink);
    border-radius: 12px;
    padding: 5px 14px;
    font-family: var(--mono);
    font-size: .9rem;
    box-shadow: 3px 3px 0 var(--ink);
    white-space: nowrap;
}

.date::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 18px;
    background: var(--ink);
    margin-right: 8px;
    vertical-align: -3px;
}

/* generic bits */
.card {
    background: var(--paper);
    border: 4px solid var(--ink);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.badge {
    display: inline-block;
    border: 3px solid var(--ink);
    border-radius: 40px;
    padding: 8px 28px;
    box-shadow: var(--shadow-sm);
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px;
    border: 4px solid var(--ink);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    font-family: var(--body);
    color: var(--ink);
}

.btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--ink);
}

.btn.green {
    background: var(--green);
}

.btn.coral {
    background: var(--coral);
}

.tag {
    display: inline-block;
    border: 2px solid var(--ink);
    border-radius: 8px;
    padding: 1px 9px;
    font-family: var(--mono);
    font-size: .8rem;
    background: var(--paper);
}

h2.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
}

section {
    padding: 56px 0;
}

/* hero */
.hero {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    padding-top: 56px;
    align-items: start;
}

.profile {
    padding: 30px 28px;
    text-align: center;
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--ink);
    background: var(--coral);
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    font-size: 3.4rem;
    color: #fff;
    -webkit-text-stroke: 2px var(--ink);
    paint-order: stroke fill;
}

.profile h1 {
    font-size: 2.2rem;
    line-height: 1.05;
}

.role {
    display: inline-block;
    background: var(--ink);
    color: #fff;
    font-family: var(--mono);
    font-size: .95rem;
    padding: 6px 14px;
    border-radius: 8px;
    margin: 12px 0 20px;
    transform: rotate(-1deg);
}

.facts {
    border-top: 3px solid var(--ink);
    padding-top: 18px;
    text-align: left;
    font-family: var(--mono);
    font-size: .92rem;
    text-transform: uppercase;
}

.facts p {
    margin-bottom: 12px;
}

.facts b {
    border: 2px solid var(--ink);
    padding: 0 5px;
    margin-right: 8px;
}

.facts .l {
    background: var(--yellow);
}

.facts .s {
    background: var(--green);
}

.facts .m {
    background: var(--blue);
}

.profile .btn {
    margin-top: 12px;
}

.socials {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin-top: 22px;
}

.socials a {
    font-weight: 800;
    font-family: var(--mono);
    font-size: .95rem;
    text-decoration: none;
    border-bottom: 3px solid var(--ink);
}

.socials a:hover {
    background: var(--yellow);
}

.hero-right {
    display: grid;
    gap: 34px;
}

.hi {
    background: var(--yellow);
    padding: 34px 40px;
}

.hi h2 {
    font-size: 3rem;
    margin-bottom: 18px;
}

.hi p {
    font-size: 1.2rem;
    margin-bottom: 16px;
    max-width: 60ch;
}

mark {
    background: var(--paper);
    border: 2px solid var(--ink);
    padding: 0 6px;
    font-weight: 600;
}

.open {
    display: inline-block;
    background: var(--paper);
    border: 4px solid var(--ink);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 14px 22px;
    font-weight: 700;
    margin-top: 6px;
}

/* terminal */
.terminal {
    background: #000;
    border: 4px solid var(--ink);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    max-width: 760px;
}

.term-bar {
    background: #e5e7eb;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 3px solid var(--ink);
    font-family: var(--mono);
    font-size: .8rem;
    font-weight: 700;
}

.term-bar i {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--ink);
    display: inline-block;
}

.term-bar i:nth-child(1) {
    background: #ff5f57
}

.term-bar i:nth-child(2) {
    background: #febc2e
}

.term-bar i:nth-child(3) {
    background: #28c840
}

.term-bar span {
    flex: 1;
    text-align: center;
    margin-right: 50px;
}

.term-body {
    padding: 18px 22px;
    font-family: var(--mono);
    font-size: .95rem;
    color: #fff;
    height: 260px;
    overflow-y: auto;
}

.term-body .info {
    color: #66a3fe;
    white-space: pre-wrap;
}

.term-body .cmd {
    color: #fff;
}

.term-line {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.term-line label {
    color: #fff;
    white-space: nowrap;
}

.term-line input {
    flex: 1;
    background: transparent;
    border: 0;
    color: #fff;
    font: inherit;
    outline: none;
    min-width: 0;
}

.term-line:focus-within {
    outline: 2px dashed #66a3fe;
    outline-offset: 2px;
}

/* big sections */
.panel {
    border: 4px solid var(--ink);
    border-radius: 36px;
    box-shadow: var(--shadow);
    padding: 44px 40px 48px;
}

.panel.pink {
    background: var(--pink);
}

.panel.yellow {
    background: var(--yellow);
}

.panel.green {
    background: var(--green);
}

.panel .badge {
    margin-bottom: 36px;
}

/* experience */
.exp-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 26px 44px;
    align-items: start;
}

.exp-meta .date-pill {
    display: inline-block;
    background: var(--paper);
    border: 4px solid var(--ink);
    border-radius: 40px;
    box-shadow: var(--shadow-sm);
    padding: 12px 24px;
    font-weight: 800;
    font-size: 1.15rem;
}

.exp-meta p {
    margin-top: 16px;
    font-weight: 700;
}

.win {
    background: var(--paper);
    border: 4px solid var(--ink);
    box-shadow: var(--shadow);
}

.win-bar {
    background: var(--pink);
    border-bottom: 4px solid var(--ink);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: .75rem;
}

.win-bar i {
    width: 14px;
    height: 14px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: #fff;
}

.win-bar span {
    margin-left: auto;
}

.win-body {
    padding: 28px 30px 34px;
}

.win-body h3 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.org {
    display: inline-block;
    background: var(--pink);
    border: 4px solid var(--ink);
    border-radius: 40px;
    box-shadow: var(--shadow-sm);
    padding: 8px 24px;
    font-weight: 800;
    font-size: 1.3rem;
    margin-bottom: 22px;
}

.inner {
    border: 4px solid var(--ink);
    border-radius: 18px;
    background: #f8f9fb;
    padding: 20px 24px;
    font-weight: 600;
}

.inner .dots {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.inner .dots i {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 2px solid var(--ink);
}

.inner .dots i:nth-child(1) {
    background: #ff5f57
}

.inner .dots i:nth-child(2) {
    background: #febc2e
}

.inner .dots i:nth-child(3) {
    background: #28c840
}

/* projects */
.proj-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.proj {
    background: var(--paper);
    border: 4px solid var(--ink);
    border-radius: 26px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.proj .bar {
    height: 20px;
    border-bottom: 4px solid var(--ink);
}

.proj .inside {
    padding: 22px 24px 26px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.proj header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.proj h3 {
    font-size: 1.5rem;
    line-height: 1.1;
}

.icons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.icon {
    width: 42px;
    height: 42px;
    border: 3px solid var(--ink);
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-family: var(--mono);
    font-weight: 700;
    font-size: .78rem;
    text-decoration: none;
    background: var(--ink);
    color: #fff;
}

.icon.live {
    background: var(--green);
    color: var(--ink);
}

.icon:hover {
    transform: translate(-2px, -2px);
    box-shadow: 3px 3px 0 var(--ink);
}

.feat {
    display: inline-block;
    width: fit-content;
    background: var(--coral);
    color: #fff;
    border: 2px solid var(--ink);
    border-radius: 8px;
    font-weight: 800;
    font-size: .78rem;
    padding: 3px 10px;
    margin-top: 14px;
}

.proj .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 14px 0 16px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--ink);
}

.proj ul {
    margin-left: 22px;
    font-size: .98rem;
}

.proj li {
    margin-bottom: 8px;
}

/* skills */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.skill {
    background: var(--paper);
    border: 4px solid var(--ink);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

.skill h3 {
    display: inline-block;
    border: 3px solid var(--ink);
    padding: 2px 12px;
    font-size: 1.3rem;
    margin-bottom: 16px;
}

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

.chip {
    border: 3px solid var(--ink);
    border-radius: 30px;
    padding: 3px 14px;
    font-weight: 700;
    font-size: .93rem;
}

/* learning */
.learn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.learn {
    background: var(--paper);
    border: 4px solid var(--ink);
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
    padding: 26px 28px;
}

.learn h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.learn ul {
    margin-left: 22px;
}

.learn li {
    margin-bottom: 7px;
}

/* education + doodle */
.edu-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 40px;
    align-items: start;
}

.edu-list {
    display: grid;
    gap: 36px;
}

.edu {
    position: relative;
    background: var(--paper);
    border: 4px solid var(--ink);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    padding: 30px 26px 24px;
}

.edu .yr {
    position: absolute;
    top: -22px;
    left: -14px;
    background: var(--ink);
    color: #fff;
    font-family: var(--mono);
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 8px;
    transform: rotate(-4deg);
}

.edu h3 {
    font-size: 1.35rem;
    line-height: 1.2;
    margin-bottom: 6px;
}

.edu p {
    font-weight: 500;
}

.doodle {
    border: 8px solid var(--yellow);
    border-radius: 20px;
    background: #2a2a2a;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.doodle canvas {
    display: block;
    width: 100%;
    height: 420px;
    cursor: crosshair;
    touch-action: none;
}

.doodle .hint {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 3rem;
    color: #444;
    pointer-events: none;
}

.tools {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    gap: 8px;
    background: #3a3a3a;
    border: 2px solid #555;
    border-radius: 12px;
    padding: 8px;
}

.tools button {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 3px solid transparent;
    cursor: pointer;
}

.tools button[aria-pressed="true"] {
    border-color: #fff;
}

.tools .clear {
    background: #3a3a3a;
    color: #fff;
    border: 2px solid #777;
    font-size: .75rem;
    width: auto;
    padding: 0 10px;
    font-family: var(--mono);
}

.boredom {
    display: inline-block;
    background: var(--paper);
    border: 3px solid var(--ink);
    border-radius: 30px;
    padding: 8px 20px;
    font-family: var(--mono);
    font-weight: 700;
    margin-top: 16px;
    box-shadow: 3px 3px 0 var(--ink);
}


/* coding trigger + leetcode card */
#coding dialog {
    background: var(--yellow);
    width: min(900px, calc(100% - 32px));
    padding: 40px;
}

.lc-card {
    background: #0d1117;
    border: 4px solid var(--ink);
    border-radius: 14px;
    padding: 26px 30px 30px;
    color: #fff;
    font-family: var(--mono);
}

.lc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 10px;
}

.lc-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #66a3fe;
}

.lc-rank {
    color: var(--green);
    font-weight: 700;
}

.lc-main {
    display: flex;
    gap: 34px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.lc-ring {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 6px solid #2a2f3a;
    display: grid;
    place-items: center;
    font-size: 2.1rem;
    font-weight: 700;
    flex-shrink: 0;
    position: relative;
}

.lc-ring svg {
    position: absolute;
    inset: 0;
    transform: rotate(-90deg);
}

.lc-bars {
    flex: 1;
    min-width: 220px;
    display: grid;
    gap: 14px;
}

.lc-bar-row {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-bottom: 4px;
}

.lc-bar-track {
    height: 7px;
    background: #2a2f3a;
    border-radius: 4px;
    overflow: hidden;
}

.lc-bar-fill {
    height: 100%;
    border-radius: 4px;
}

.lc-easy .lc-bar-fill,
.lc-easy-c {
    color: #4ade80;
}

.lc-med .lc-bar-fill,
.lc-med-c {
    color: #fbbf24;
}

.lc-hard .lc-bar-fill,
.lc-hard-c {
    color: #f87171;
}

.lc-heat-label {
    font-weight: 700;
    color: #66a3fe;
    margin-bottom: 10px;
}

.lc-heat {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(7, 1fr);
    gap: 3px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.lc-heat i {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: #161b22;
    display: block;
}

.lc-heat-dates {
    display: flex;
    justify-content: space-between;
    color: #8b949e;
    font-size: .8rem;
    margin-top: 8px;
}

.lc-view {
    display: block;
    text-align: center;
    background: var(--blue);
    color: var(--ink);
    border: 3px solid var(--ink);
    border-radius: 10px;
    padding: 12px;
    font-family: var(--body);
    font-weight: 800;
    text-decoration: none;
    margin-top: 24px;
}

.lc-status {
    color: #8b949e;
    text-align: center;
    padding: 40px 0;
    font-family: var(--mono);
}

.coding-trigger {
    background: var(--paper);
    border: 4px solid var(--ink);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 34px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.coding-trigger p {
    max-width: 46ch;
    font-weight: 500;
    margin-top: 6px;
}

/* beyond code + contact */
.beyond {
    background: var(--purple);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 34px 40px;
}

.beyond h2 {
    font-size: 2.2rem;
}

.beyond p {
    margin-top: 6px;
    max-width: 52ch;
    font-weight: 500;
}

.open-btn {
    background: var(--yellow);
    border: 4px solid var(--ink);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    padding: 14px 28px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1.05rem;
    cursor: pointer;
    font-family: var(--body);
}

.open-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--ink);
}

.contact-card {
    background: var(--pink);
    padding: 44px 40px;
    text-align: center;
}

.contact-card h2 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin-bottom: 14px;
}

.contact-card p {
    max-width: 50ch;
    margin: 0 auto 26px;
    font-size: 1.1rem;
    font-weight: 500;
}

.contact-card .row {
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-card .btn {
    width: auto;
    padding: 14px 30px;
}

footer {
    text-align: center;
    padding: 34px 0 60px;
    font-family: var(--mono);
    font-weight: 700;
}

/* modal */
dialog {
    border: 4px solid var(--ink);
    border-radius: 0;
    box-shadow: 10px 10px 0 var(--ink);
    background: var(--purple);
    width: min(760px, calc(100% - 32px));
    padding: 34px;
    margin: auto;
    max-height: 88vh;
    overflow-y: auto;
}

dialog::backdrop {
    background: rgba(0, 0, 0, .55);
}

dialog header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

dialog h2 {
    font-size: 2rem;
}

.close {
    background: var(--paper);
    border: 4px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    padding: 8px 20px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    font-family: var(--body);
}

.story {
    background: var(--paper);
    border: 4px solid var(--ink);
    border-radius: 18px;
    padding: 22px 26px;
    margin-bottom: 18px;
}

.story h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.story .tag {
    margin-bottom: 10px;
    background: var(--yellow);
}

@media (max-width: 1000px) {

    .hero,
    .edu-grid,
    .exp-grid,
    .learn-grid {
        grid-template-columns: 1fr;
    }

    .proj-grid,
    .skill-grid {
        grid-template-columns: 1fr 1fr;
    }

    .nav ul {
        order: 3;
        flex-basis: 100%;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    .proj-grid,
    .skill-grid {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 30px 20px 34px;
        border-radius: 28px;
    }

    .hi {
        padding: 26px 22px;
    }

    .hi h2 {
        font-size: 2.3rem;
    }

    .beyond {
        grid-template-columns: 1fr;
        padding: 26px 22px;
    }

    .nav {
        top: 12px;
        padding: 12px 16px;
        width: calc(100% - 24px);
    }

    .wrap {
        padding: 0 14px;
    }

    .date {
        display: none;
    }
}

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

    .pill:hover,
    .btn:hover,
    .icon:hover,
    .open-btn:hover {
        transform: none;
    }
}