html {
    font-family: Menlo,Monaco,Lucida Console,Courier New,Courier,monospace;
    background: #fff;
    letter-spacing: -.025rem;
    overflow-x: hidden;
}

body, figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding-bottom: 70px;
    overflow-x: hidden;
}

header, main, footer {
    width: 100%;
}

.site-footer {
    max-width: 700px;
    margin: 0 auto 48px;
    height: 60px;
    width: 100%;
    bottom: 0;
    left: 0;
    text-align: left;
    line-height: 60px;
}

.footer-content p {
    margin-bottom: 0;
}

.footer-content a {
    color: #4183C4;
}

a {
    text-decoration: none
}

ul {
    list-style: none;
    margin: 0;
    padding: 0
}

h1,h2,h3,h4 {
    margin: 0;
    font-family: system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif
}

p {
    color: #666;
    font-size: medium;
    line-height: 1.5;
    margin: 0;
    text-wrap: pretty
}

.print {
    display: none!important
}

@media print {
    .no-print {
        display: none!important
    }

    .print {
        display: block!important
    }

    astro-dev-toolbar {
        display: none!important
    }

    article {
        break-inside: avoid
    }
}

section[main] {
    max-width: 700px;
    margin: 0 auto 48px
}

h2[main] {
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.5;
    font-size: x-large;
}

@media (width <= 700px) {
    section[main] {
        margin-bottom: 38px
    }
    section[template] {
        margin-bottom: 38px
    }
}

@media (max-width: 700px) {
    section[main], .site-footer, section[template], h1[cite], p[caption] {
        padding: 1rem 5%;
    }

    h1[cite], p[caption] {
        max-width: fit-content;
    }

    iframe {
        width: 100%;
        height: 400px;
        aspect-ratio: 16 / 9;
    }
}


ul[education] {
    display: flex;
    flex-direction: column;
    gap: 32px
}

article[education] h3[education] {
    font-weight: 500;
    color: #111
}


header[education] {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px
}

time[education] {
    color: #555;
    font-size: medium;
    min-width: 102px
}

@media (width <= 700px) {
    time[education] {
        text-align: right
    }
}

ul[work] {
    display: flex;
    flex-direction: column;
    gap: 32px
}

article[work] h3[work] {
    font-weight: 500;
    color: #111
}

article[work] a[work] {
    color: #111
}

article[work] a[work]:hover {
    text-decoration: underline
}

article[work] h4[work] {
    color: #222;
    font-weight: 400
}

header[work] {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px
}

time[work] {
    color: #555;
    font-size: medium;
    min-width: 102px;
    cursor: default
}

[work][data-title]:hover:after {
    opacity: 1;
    transition: all .1s ease-in-out .5s;
    visibility: visible
}

[work][data-title]:after {
    content: attr(data-title);
    background-color: #333;
    color: #fff;
    font-size: medium;
    font-family: Menlo,Monaco,Lucida Console,Courier New,monospace;
    position: absolute;
    padding: .2rem .5rem;
    bottom: -1.4rem;
    left: 50%;
    white-space: nowrap;
    box-shadow: 1px 1px 1px #222;
    opacity: 0;
    border: 1px solid #111111;
    z-index: 99999;
    visibility: hidden;
    border-radius: 6px
}

[work][data-title] {
    position: relative
}

@media (width <= 700px) {
    time[work] {
        text-align: right
    }
}

.container[header] {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin: auto;
}

.info[header] {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding-right: 32px
}

h1[header] {
    font-size: xx-large;
}

h2[header] {
    color: #444;
    font-weight: 500;
    font-size: large;
    text-wrap: balance
}

img[header] {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    width: 128px;
    border-radius: 16px
}

li[book] {
    padding-bottom: 5%;
}

img[bookimg] {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    width: 125px;
    border-radius: 16px;
    position: relative;
}

h2[book] {
    font-weight: 700;
    line-height: 1.5;
    font-size: x-large;
}

h3[book] {
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
    color: #4183C4;
    text-decoration: none;
    cursor: pointer;
}

h3[subject] {
    text-decoration: double;
    text-decoration: underline;
    font-weight: 700;
    padding-bottom: 2%;
}

.book-info {
    padding-bottom: 1%;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    width: 100%;
    margin: auto;
}

.book {
    padding-bottom: 1%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin: auto;
}

span[header] {
    color: #666;
    display: flex;
    align-items: center;
    gap: .25rem;
    font-size: small;
    letter-spacing: -.05rem
}

footer[header] {
    color: #555;
    font-size: small;
    display: flex;
    gap: 4px;
    margin-top: 8px
}

footer[header] a[header] {
    color: #777;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    padding: 4px;
    height: 32px;
    width: 32px;
    border-radius: 6px;
    transition: all .3s ease
}

footer[header] a[header]:hover {
    background: #eee;
    border: 1px solid #ddd
}

@media (width <= 700px) {
    .container[header] {
        flex-direction: column-reverse
    }

    .info[header] {
        justify-content: center;
        align-items: center;
        padding-right: 0;
        text-align: center
    }

    figure[header] {
        display: flex;
        justify-content: center;
        align-items: center
    }

    h2[header] {
        text-wrap: balance
    }

    figure[header] {
        margin: 0 auto
    }
}

ul[project] {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
    gap: 1rem;
    margin-inline:-16px}

article[project] {
    border-radius: 8px;
    border: 1px solid #f2f2f2;
    gap: 16px;
    display: flex;
    flex-direction: column;
    padding: 16px;
    height: 100%
}

article[project] header[project] {
    flex: 1
}

article[project] h3[project] {
    margin-bottom: 4px
}

article[project] a[project] {
    color: #111
}

article[project] a[pres] a[project]:hover {
    text-decoration: underline
}

article[project] p[project] {
    font-size: medium;
    line-height: 1.2rem;
    margin-bottom: 4px
}

article[project] h3[project] span[project] {
    color: #00bc2f;
    animation-name: flicker;
    animation-duration: 3s;
    animation-timing-function: ease-in;
    animation-iteration-count: infinite;
    text-align: center;
}

footer[project] {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: small;
}

footer[project] span[project] {
    border-radius: 6px;
    background: #eee;
    color: #444;
    font-size: small;
    font-weight: 500;
    padding: .2rem .6rem;
    text-align: center;
}

img[project] {
    float: inline-start;
}

.github-code-link[project] {
    margin-left: 5px
}

@keyframes flicker {
    0% {
        opacity: 1
    }

    50% {
        opacity: .25
    }

    to {
        opacity: 1
    }
}

@media (width <= 700px) {
    ul[project] {
        margin-inline: 0px
    }

    article[project] {
        border: none;
        box-shadow: 0 1px 1px #f2f2f2;
        padding: 0 0 16px
    }
    article[class] {
        border: none;
        box-shadow: 0 1px 1px #f2f2f2;
        padding: 0 0 16px
    }
}

@media print {
    article[project] h3[project] span[project] li[projSkills] {
        animation-name: none
    }
    article[class] {
        animation-name: none
    }
}

ul[skills] {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap
}

li[skills] {
    align-items: center;
    background: #eee;
    border-radius: 6px;
    color: #000;
    display: flex;
    font-size: smaller;
    font-weight: 500;
    gap: 4px;
    padding: .2rem .6rem
}

*:where(:not(html,iframe,canvas,img,svg,video,audio):not(svg *,symbol *)) {
    all: unset;
    display: revert
}

*,*:before,*:after {
    box-sizing: border-box
}

html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none
}

a,button {
    cursor: revert
}

ol,ul,menu,summary {
    list-style: none
}

img {
    max-inline-size: 100%;
    max-block-size: 100%
}

table {
    border-collapse: collapse
}

@keyframes fadeIn {
    0% {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

footer[footer] {
    background: #fdfdfd;
    border-top: 1px solid #eee;
    position: fixed;
    bottom: 0;
    width: 100%;
    padding-block:8px;
    text-align: center;
    view-timeline-name: --revealing;
    view-timeline-axis: block;
    animation: linear .3s fadeIn;
    animation-timeline: --revealing;
    animation-range: entry 100% cover 10%;
}

a[footer] {
    text-decoration: underline;
    color: #4183C4;
}

a[footer]:hover {
    cursor: pointer;
}

h1[footer] {
    font-size: small;
}

main[tmp] {
    padding: 4rem;
    margin: auto;
    width: 100%
}

@media (width <= 700px) {
    main[tmp] {
        padding: 2rem
    }
}

nav {
    width: 100%;  
    text-align: center;  
    margin-bottom: 2%;
}

nav a {
    margin: 0 15px;  
    font-size: large;  
    color: #333;  
    text-decoration: none;  
}

nav a:hover {
    color: #4183C4;
}

nav a.active {
    border-bottom: 2px solid #333;
    font-weight: bold;
}


@media (max-width: 700px) {
    nav {
        padding: 10px 0;  
    }

    nav a {
        margin: 0 10px;  
    }
}

header[top] {
    padding-top: 5%;
}

/* @media (max-width: 600px) {
    header[top] {
        padding-top: 10px;
    } */
/* } */

ul[foot] {
    padding-bottom: 10%;
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap
}

p[click] {
    font-size: small;
    line-height: 1.2rem;
    margin-bottom: 2%;
}

h2[proj] {
    font-weight: 700;
    line-height: 1.5;
    font-size: x-large;
}

a[pres] {
    color: #4183C4;
    font-size: medium;
}

/* a[pres]:hover {
    text-decoration: underline
} */

li[projSkills] {
    border-radius: 6px;
    background: #eee;
    color: #444;
    padding: .2rem .6rem;
    text-align: center;
}

a[proj] {
    color: #111;
    font-size: large;
    font-weight: 500;
}

a[proj]:hover {
    color: #4183C4;
    cursor: pointer;
    /* text-decoration: underline */
}

article[class] {
    border-radius: 8px;
    border: 1px solid #f2f2f2;
    gap: 16px;
    display: flex;
    flex-direction: row;
    padding: 16px;
    gap: 16px;
    height: 100%
}

header[class] {
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: content;
    position: relative;
}

/* header[class]::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0; 
    width: 1px;
    background-color: #ccc;
    margin-left: -4%;
}

header[class]:first-child::before {
    content: none;
} */

article[class] {
    margin-bottom: 4px
}

h3[class] {
    font-weight: 500;
}

article[class] a[class] {
    color: #111
}

article[class] a[pres] a[class]:hover {
    text-decoration: underline
}

p[class] {
    font-size: medium;
    margin-bottom: 5px
}

article[class] p[class] {
    font-size: medium;
    margin-bottom: 4px
}

footer[class] {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: small;
    width: 100%;
}

footer[class] span[class] {
    border-radius: 6px;
    background: #eee;
    color: #444;
    font-size: small;
    font-weight: 500;
    padding: .2rem .6rem;
    text-align: center;
    width: 100%;
}

.content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    gap: 16px;
}

a[alt] {
    color: #4183C4;
}

footer[tran] {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: small;
}

footer[tran] span[tran] {
    border-radius: 6px;
    background: #eee;
    color: #444;
    font-size: small;
    font-weight: 500;
    padding: .2rem .6rem;
    text-align: center;
    margin-bottom: 10px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

footer[tran] span[tran] a.transcriptLink {
    display: block;
    color: inherit;
    text-decoration: none;
}

footer[tran] span[tran] a.transcriptLink:hover {
    transform: scale(1.1);
    cursor: pointer;
    background-color: #eee;
}

footer[tran] span[tran] a.transcriptLink.active {
    transform: scale(1.15);
    background-color: #eee;
    color: #444;
}

hr {
    display: block;
    unicode-bidi: isolate;
    margin-block-start: 0.5em;
    margin-block-end: 0.5em;
    margin-inline-start: auto;
    margin-inline-end: auto;
    overflow: hidden;
    border-style: inset;
    border-width: 1px;
}

body[main] {
    text-align: center;
    color: #000;
}

button[main] {
    color: #4183C4;
    cursor: pointer;
}


/* ------------------------Blog------------------------ */

h1[cite] {
    word-spacing: 5px;
    font-size: x-large;
    margin-bottom: 5%;
    padding-top: 5%;
    display: block;
    margin: auto;
    width: 500px;
    text-align: left;
    color: #444;
}

article[blog] {
    border-radius: 8px;
    border: 1px solid #f2f2f2;
    gap: 16px;
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 16px;
    height: 100%
}

header[blog] {
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: content;
    position: relative;
}

article[blog] {
    margin-bottom: 4px
}

h3[blog] {
    font-weight: 500;
}

article[blog] a[blog] {
    margin-bottom: 8px;
    font-weight: 600;
    line-height: 1.5;
    font-size: x-large;
    width: fit-content;
}

article[blog] a[blog]:hover {
    color: #4183C4;
}

p[blog] {
    font-size: medium;
    margin-bottom: 5px
}

article[blog] p[blog] {
    font-size: medium;
    margin-bottom: 4px
}

a[read] {
    color: #4183C4;
    font-size: medium;
    width: fit-content;
}

#blog-categories nav a {
    margin-right: 10px;
    color: #4183C4;
    cursor: pointer;
}

.entry p {
    font-size: large;
    line-height: 1.6;
    color: #444;
}

h2[blog] {
    font-weight: bolder;
    font-size: x-large;
    text-decoration: underline;
    margin-top: 5%;
}

h2[template] {
    margin-top: 2%;
    font-weight: bolder;
    font-size: xx-large;
}

p[topic_date] {
    margin-top: 2%;
    font-size: medium;
    color: #000;
}

p[template] {
    font-size: medium;
    margin-top: 10%;
    margin-bottom: 5%;
}

h1[template] {
    padding-top: 5%;
    font-size: large;
    color: #444;
}

section[template] {
    max-width: 700px;
    margin: 0 auto 48px
}

@media (width <= 700px) {
    section[template] {
        margin-bottom: 38px
    }
}

nav[blog] {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    font-size: small;
}

[blog] button, [topic_date] button {
    border-radius: 6px;
    background: #eee;
    color: #444;
    font-size: small;
    font-weight: 500;
    padding: 0.2rem 0.6rem;
    text-align: center;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

[blog] button:hover, [topic_date] button:hover,
[blog] button.active, [topic_date] button.active {
    transform: scale(1.1);
}

[blog] button.active, [topic_date] button.active {
    transform: scale(1.1);
    background-color: #d8d8d8;
}

[template] img {
    padding-top: 5%;
    width: 500px;
    display: block;
    margin: auto;
}

p[caption] {
    font-size: medium;
    margin-bottom: 5%;
    display: block;
    margin: auto;
    width: 500px;
    text-align: center;
}

[template] a {
    color: #4183C4;
}

[template] hr {
    display: block;
    unicode-bidi: isolate;
    margin-block-start: 0.5em;
    margin-block-end: 0.5em;
    margin-inline-start: auto;
    margin-inline-end: auto;
    overflow: hidden;
    border-style: inset;
    border-width: 1px;
    margin-bottom: 5%;
}

/* ------------------------Report------------------------ */

[report] button {
    border-radius: 6px;
    background: #eee;
    color: #4183C4;
    font-size: medium;
    font-weight: 500;
    padding: 0.2rem 0.6rem;
    text-align: center;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

[report] button:hover,
[report] button.active {
    transform: scale(1.1);
}

[report] button.active {
    background-color: #d8d8d8;
}

section[report] {
    max-width: 700px;
    margin: 0 auto 48px;
}

[report] input,
[report] textarea {
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    box-sizing: border-box;
    border: 2px solid #eee;
    border-radius: 4px;
    text-align: left;
}

[report] textarea {
    height: 150px;
    vertical-align: top;
    resize: vertical;
}

[report] input:focus,
[report] textarea:focus {
    border: 3px solid #d8d8d8;
}

h2[report] {
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.5;
    font-size: x-large;
}

[report] p {
    padding-bottom: 2%;
}

@media (max-width: 700px) {
    section[report] {
        margin-bottom: 38px;
    }
}

.mobile-only {
    display: none; /* Hide mobile links by default */
}

.desktop-only {
    display: block; /* Show iframes by default */
}

@media (max-width: 700px) {
    .mobile-only {
        display: block; /* Show mobile links on small screens */
        padding: 10px;
        margin: 5px;
        border-radius: 6px;
        background: #eee;
        color: #444;
        text-align: center;
    }
    .desktop-only {
        display: none; /* Hide iframes on small screens */
    }
}
