/* color theme */

:root {
    /* background & foreground colors */

    --background: #1a1b26;
    --background-alternative: #24283b;
    --background-dark: #16161e;
    --background-highlight: #292e42;

    --foreground: #c0caf5;
    --foreground-dim: #a9b1d6;

    /* misc colors */

    --comment: #565f89;

    --space: #3b4261;

    /* color pallete */

    --blue: #7aa2f7;
    --purple: #bb9af7;
    --cyan: #7dcfff;
    --green: #9ece6a;
    --yellow: #e0af68;
    --red: #f7768e;
    --teal: #73daca;
    
    --border: #3b4261;
    --row: 26px;

    --bar-height: calc(var(--row) * 2 + 1px);
    --tab-height: 38px;

    /* font */

    /* add a bunch of fallback fonts in case the client doesn't have a font */
    --monospace-font: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    /* animation timing */

    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    /* set the color scheme to dark for browsers that support it */

    color-scheme: dark;
}

/*****************************************************/

/* remove default margin and padding from everything */
* {
    box-sizing: border-box;

    margin: 0;
    padding: 0;
}

/* page styles */

body {
    background: var(--background);

    color: var(--foreground-dim);

    font-family: var(--monospace-font);
    font-size: 15px;
    line-height: 1.75;
    font-variant-ligatures: none;

    padding-top: var(--tab-height);

    /* add padding to the bottom of the page for device safe areas */
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 48px);

    overflow-x: hidden;
}

/* element styling */

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

p {
    margin-bottom: 16px;
}

h2 {
    display: inline-block;
    position: relative;

    color: var(--foreground);

    font-size: clamp(23px, 3.2vw, 30px);
    font-weight: 700;
    letter-spacing: -0.3px;

    margin-bottom: 22px;
}

h2 .hashtag {
    color: var(--blue);
    font-weight: 600;

    margin-right: 10px;
}

/* gradient underline & effects */
h2::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -6px;

    width: 100%;
    height: 2px;

    background: linear-gradient(90deg, var(--blue), var(--purple), transparent);

    transform: scaleX(0);
    transform-origin: left;

    transition: transform 0.9s var(--ease) 0.2s;
}

h2.animate-in-done::after {
    transform: scaleX(1);
}

strong {
    color: var(--foreground);
    font-weight: 600;
}

.large-text {
    opacity: 0;
    transform: translateY(18px);

    animation: rise-effect 0.9s var(--ease) forwards;
}

.large-text-h1 { animation-delay: 0.1s; }
.large-text-h2 { animation-delay: 0.25s; }
.large-text-h3 { animation-delay: 0.4s; }
.large-text-h4 { animation-delay: 0.55s; }
.large-text-h5 { animation-delay: 0.7s; }
.large-text-h6 { animation-delay: 0.9s; }

@keyframes rise-effect {
    to {
        opacity: 1;
        transform: none;
    }
}

/* custom scrollbar */

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--space) var(--background-dark);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--space);
    border-radius: 5px;
    border: 2px solid var(--background-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--comment);
}

/* top tabs */

#top-tabs {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--tab-height);

    z-index: 150;

    background: var(--background-dark);

    border-bottom: 1px solid #101017;

    display: flex;
    align-items: stretch;

    overflow-x: auto;
    scrollbar-width: none;

    font-size: 12.5px;
    
    white-space: nowrap;
}

#top-tabs::-webkit-scrollbar { display: none; } /* remove scrollbar from top area */

.tab {
    display: flex;
    align-items: center;

    color: var(--comment);
    background: var(--background-dark);
    
    gap: 7px;
    padding: 0 15px;
    border-right: 1px solid #101017;
    position: relative;

    transition: background 0.25s, color 0.25s;
}

.tab::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    top: 0;

    height: 2px;

    background: var(--blue);

    transform: scaleX(0);
    transform-origin: left;

    transition: transform 0.35s var(--ease);
}

.tab:hover {
    color: var(--foreground-dim);
    background: var(--background);

    text-shadow: none;
}

.tab .tab-number {
    color: var(--space);
    font-size: 11px;
}

.tab .tab-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: transparent;

    flex: none;

    transition: background 0.3s, box-shadow 0.3s;
}

.tab.tab-selected {
    background: var(--background);
    color: var(--blue);
}

.tab.tab-selected::after {
    transform: scaleX(1);
}

.tab.tab-selected .tab-number {
    color: var(--comment);
}

.tab.tab-selected .tab-dot {
    background: var(--green);
    box-shadow: 0 0 8px rgba(158, 206, 106, 0.7);
}

/* background */

.background {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
    background: repeating-linear-gradient(90deg, transparent 0 35px, rgba(86, 95, 137, 0.06) 35px 36px);
}

/* glare effects */

.glare {
    position: absolute;

    width: 58vmax;
    height: 58vmax;

    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.08;
}

.glare-1 {
    background: var(--blue);

    top: -28vmax;
    left: -18vmax;

    animation: drift-1 38s ease-in-out infinite alternate;
}

.glare-2 {
    background: var(--purple);

    bottom: -32vmax;
    right: -22vmax;

    animation: drift-2 46s ease-in-out infinite alternate;
}

.glare-3 {
    background: var(--teal);

    width: 36vmax;
    height: 36vmax;
    top: 40vh;
    left: 55vw;
    opacity: 0.05;

    animation: drift-3 52s ease-in-out infinite alternate;
}

@keyframes drift-1 { to { transform: translate(11vmax, 9vmax) scale(1.08); } }
@keyframes drift-2 { to { transform: translate(-9vmax, -11vmax) scale(1.05); } }
@keyframes drift-3 { to { transform: translate(-14vmax, 6vmax) scale(1.12); } }

.mouse-glare {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s;
    background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(122, 162, 247, 0.07), transparent 60%);
}

/* sections */

section {
    position: relative;

    padding: 78px 0 26px;

    scroll-margin-top: calc(var(--tab-height) + 14px);
}

.section-content {
    max-width: 1060px;

    margin: 0 auto;
    padding: 0 24px 0 84px;
}

/* line numbers */

.line-numbers {
    position: absolute;
    top: 78px;
    bottom: 26px;
    left: 24px;

    width: 40px;

    overflow: hidden;

    color: #2c3352;
    font-size: 12.5px;
    line-height: var(--row);
    text-align: right;
    white-space: pre;

    /* no mouse selection or hover cursor change */
    user-select: none;
    pointer-events: none;

    /* fade the numbers out towards the bottom */
    -webkit-mask-image: linear-gradient(180deg, #000 88%, transparent);
    mask-image: linear-gradient(180deg, #000 88%, transparent);
}

/* intro section */

#intro {
    min-height: calc(88vh - var(--tab-height));

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.intro-title {
    font-size: clamp(38px, 7vw, 74px);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.08;

    margin-bottom: 20px;

    background: linear-gradient(100deg, var(--foreground) 0%, var(--blue) 30%, var(--purple) 55%, var(--blue) 80%, var(--foreground) 100%);
    background-size: 200% 100%;

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    color: var(--foreground);

    animation: shimmer-effect 14s linear infinite, rise-effect 0.9s var(--ease) 0.25s forwards;
}

@keyframes shimmer-effect {
    to {
        background-position: -200% 0;
    }
}

.intro-subtitle {
    color: var(--comment);

    font-size: 14px;

    margin-bottom: 36px;
}

/* console text */

.console-text-line {
    color: var(--foreground);

    font-size: clamp(15px, 2.3vw, 19px);

    min-height: 1.8em;
    margin-bottom: 14px;
}

.console-text-line .pr {
    color: var(--green);

    margin-right: 10px;
}

/* boxes */

.boxes {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;
}

.box {
    display: inline-flex;
    align-items: baseline;

    background: rgba(36, 40, 59, 0.75);

    border: 1px solid var(--border);
    border-radius: 8px;

    gap: 8px;
    padding: 9px 15px;

    font-size: 13.5px;

    transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.box:hover {
    border-color: var(--blue);

    transform: translateY(-3px);

    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(122, 162, 247, 0.3), 0 0 24px rgba(122, 162, 247, 0.12);
}

.box .key {
    color: var(--cyan);
    font-size: 12.5px;
}

.box .equals {
    color: var(--comment);
}

.box .value {
    color: var(--green);
    white-space: nowrap;
}

.box:hover .value {
    color: var(--teal);
}

/* currently doing */

.current {
    align-self: flex-start;

    display: inline-flex;
    align-items: center;

    background: rgba(158, 206, 106, 0.07);

    border: 1px solid rgba(158, 206, 106, 0.3);
    border-radius: 8px;

    gap: 10px;
    padding: 8px 14px;

    margin-top: 34px;

    color: var(--foreground-dim);
    font-size: 13px;

    transition: border-color 0.3s, box-shadow 0.3s;
}

.current:hover {
    border-color: rgba(158, 206, 106, 0.6);

    box-shadow: 0 0 22px rgba(158, 206, 106, 0.12);
}

.current .orb {
    position: relative;

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--green);

    flex: none;
}

.current .orb::after {
    content: "";

    position: absolute;
    inset: -4px;

    border-radius: 50%;
    border: 1px solid var(--green);

    animation: ring-effect 1.2s var(--ease) infinite;
}

@keyframes ring-effect {
    0% { transform: scale(0.4); opacity: 0.9; }
    100% { transform: scale(1.4); opacity: 0; }
}

.current a {
    color: var(--green);
}

/* cursor effect */

.cursor {
    display: inline-block;

    width: 9px;
    height: 1.05em;

    background: var(--green);

    vertical-align: -0.18em;

    margin-left: 2px;

    animation: blink-effect 1s steps(1) infinite;
}

@keyframes blink-effect {
    50% { opacity: 0; }
}

/* scroll hint */

.scroll-hint {
    margin-top: 56px;

    color: var(--space);
    font-size: 12.5px;

    animation: hint-jumping 2.6s ease-in-out infinite;
}

@keyframes hint-jumping {
    0%, 100% { opacity: 0.5; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(5px); }
}

/* scroll animate into view */

.animate-in {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(6px);

    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease);
}

.animate-in.animate-in-done {
    opacity: 1;
    transform: none;
    filter: none;
}

.animate-in-1 { transition-delay: 0.08s; }
.animate-in-2 { transition-delay: 0.16s; }
.animate-in-3 { transition-delay: 0.24s; }
.animate-in-4 { transition-delay: 0.32s; }
.animate-in-5 { transition-delay: 0.40s; }
.animate-in-6 { transition-delay: 0.48s; }

/* about section */

.about-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    align-items: start;

    gap: 40px;
}

.indent {
    border-left: 3px solid var(--purple);

    padding: 2px 0 2px 18px;

    color: var(--foreground-dim);

    margin: 20px 0 0;
}

.indent .indent-arrow {
    color: var(--purple);
}

.statistics {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 12px;
}

.statistic {
    background: rgba(36, 40, 59, 0.7);

    border: 1px solid var(--border);
    border-radius: 8px;

    padding: 14px 16px;

    transition: opacity 0.8s var(--ease), filter 0.8s var(--ease), border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}

.statistic:hover {
    border-color: rgba(122, 162, 247, 0.55);

    transform: translateY(-3px);

    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.statistic .statistic-value {
    display: block;

    color: var(--foreground);

    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.statistic .statistic-value i {
    color: var(--yellow);
    font-style: normal;
    margin-left: 2px;
    margin-right: 2px;
}

.statistic .statistic-label {
    color: var(--comment);
    font-size: 11.5px;
}

/* tags */

.tags {
    display: flex;
    flex-wrap: wrap;

    gap: 9px;
}

.tag {
    display: inline-flex;
    align-items: center;

    background: var(--background-alternative);

    border: 1px solid var(--border);
    border-radius: 6px;

    padding: 5px 13px;

    color: var(--foreground-dim);
    font-size: 13px;

    transition: border-color 0.25s, color 0.25s, transform 0.3s var(--ease), box-shadow 0.3s;
}

.tag:hover {
    border-color: var(--cyan);

    color: var(--foreground);

    transform: translateY(-2px);

    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* experience section */

.experience {
    display: grid;

    gap: 18px;
}

.experience-item {
    display: grid;
    grid-template-columns: 150px 1fr;

    gap: 22px;

    background: rgba(36, 40, 59, 0.55);

    border: 1px solid var(--border);
    border-radius: 12px;

    padding: 22px 26px;

    transition: opacity 0.8s var(--ease), filter 0.8s var(--ease), border-color 0.3s, transform 0.35s var(--ease), box-shadow 0.35s;
}

.experience-item:hover {
    border-color: rgba(122, 162, 247, 0.5);

    transform: translateY(-3px);

    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}

.experience-when {
    color: var(--comment);
    font-size: 12.5px;
    line-height: 1.6;

    padding-top: 3px;
}

.experience-when b {
    display: block;

    color: var(--foreground-dim);
    font-weight: 500;
}

.experience-item h3 {
    font-size: 16.5px;

    margin-bottom: 2px;
}

.experience-item h3 .experience-title {
    color: var(--blue);
}

.experience-item h3 .experience-subtitle {
    color: var(--comment);
    font-weight: 400;
}

.experience-role {
    color: var(--purple);
    font-size: 13px;

    margin-bottom: 10px;
}

.experience-item ul {
    list-style: none;
    font-size: 13.5px;
}

.experience-item li {
    position: relative;

    padding-left: 20px;

    margin-bottom: 6px;
}

.experience-item li::before {
    content: "-";

    position: absolute;
    left: 2px;

    color: var(--teal);
}

.experience-item .tag {
    background: var(--background);
    font-size: 12px;

    padding: 3px 10px;
}

.experience-item .tags {
    margin-top: 14px;
}

/* projects section */

.cards {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 18px;
}

.card {
    display: flex;
    flex-direction: column;

    background: rgba(36, 40, 59, 0.55);

    border: 1px solid var(--border);
    border-radius: 12px;

    padding: 22px 24px;

    transition: opacity 0.8s var(--ease), filter 0.8s var(--ease), border-color 0.3s, transform 0.35s var(--ease), box-shadow 0.35s;
}

.card-wide {
    /* use full row (all columns) */
    grid-column: 1 / -1;
}

.card:hover {
    border-color: rgba(122, 162, 247, 0.5);

    transform: translateY(-3px);

    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}

.card-header {
    margin-bottom: 12px;
}

.card h3 {
    font-size: 17px;
}

.card h3 .card-title {
    color: var(--blue);
}

.card h3 .card-slash {
    color: var(--comment);
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 10px;

    color: var(--comment);
    font-size: 12px;
}

.card-links {
    display: inline-flex;

    gap: 12px;
}

.card-links a {
    color: var(--cyan);

    border-bottom: 1px solid transparent;

    transition: border-color 0.25s;
}

.card-links a:hover {
    border-color: var(--cyan);
}

.card-description {
    color: var(--foreground-dim);
    font-size: 13.5px;
}

/* fix bottom spacing on the last description element in a card */
.card-description:last-of-type {
    margin-bottom: 14px;
}

.card .tags {
    margin-top: auto;
}

.card .tag {
    background: var(--background);
    font-size: 12px;

    padding: 3px 10px;
}

/* status labels */

.status {
    border-radius: 5px;

    padding: 1px 8px;

    font-size: 11px;
}

.status-development {
    background: rgba(224, 175, 104, 0.12);
    border: 1px solid rgba(224, 175, 104, 0.35);
    color: var(--yellow);
}

.status-live {
    background: rgba(158, 206, 106, 0.12);
    border: 1px solid rgba(158, 206, 106, 0.35);
    color: var(--green);
}

.status-retired {
    background: rgba(86, 95, 137, 0.15);
    border: 1px solid var(--border);
    color: var(--comment);
}

/* skills */

.skills {
    margin-top: 30px;
}

.skills:first-of-type {
    margin-top: 4px;
}

.skills-title {
    font-size: 12.5px;
    font-weight: normal;

    color: var(--yellow);

    margin-bottom: 10px;
}

.skills-title .skills-title-gray {
    color: var(--comment)
}

/* education */

.education-degree {
    color: var(--foreground);
    font-size: 15px;
    font-weight: 600;

    margin-bottom: 12px;
}

.education-facts {
    display: flex;
    flex-wrap: wrap;

    gap: 10px 26px;

    margin-bottom: 16px;

    font-size: 13px;
}

.education-fact {
    display: inline-flex;
    align-items: baseline;

    gap: 8px;
}

.education-fact .education-key {
    color: var(--cyan);
}

.education-fact .education-key::after {
    content: ":";

    color: var(--comment);
}

.education-fact .education-value {
    color: var(--foreground-dim);
}

.education-subtitle {
    color: var(--purple);
    font-size: 12.5px;
    font-weight: normal;

    margin-bottom: 10px;
}

/* contact */

.contacts {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 12px;

    margin-bottom: 40px;
}

.contact {
    display: flex;
    flex-direction: column;

    background: rgba(36, 40, 59, 0.55);

    border: 1px solid var(--border);
    border-radius: 10px;

    padding: 16px 20px;

    transition: opacity 0.8s var(--ease), filter 0.8s var(--ease), border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}

.contact:hover {
    border-color: var(--blue);

    transform: translateY(-3px);

    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.contact .contact-key {
    color: var(--cyan);
    font-size: 11.5px;
}

button.contact {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;

    text-align: left;

    cursor: pointer;
}

.contact.copied {
    border-color: var(--green);
}

.contact.copied .contact-value {
    color: var(--green);
}

.contact .contact-key::before {
    content: "[";
    color: var(--comment);
}

.contact .contact-key::after {
    content: "]";
    color: var(--comment);
}

.contact .contact-value {
    color: var(--foreground-dim);
    font-size: 13.5px;

    transition: color 0.3s;
}

.contact:hover .contact-value {
    color: var(--foreground);
}

.contact-footer {
    color: var(--comment);
    font-size: 12px;

    margin-bottom: 0;
}

.contact-footer .contact-footer-comment {
    color: var(--space);
}