:root {
    --text-color: #1a1a1a;
    --text-color-4: #4a4a4a;

    --link-color: #54b3d6;
    --link-animation-speed: 250ms;
    --link-animation-hermite: cubic-bezier(0.33, 0.0, 0.67, 1.0);

    --project-shelf-blur: 85px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    margin: 4rem;

    color: var(--text-color);
    line-height: 1.5;
    font-family: 'IBM Plex Sans', Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif; 
}

a {
    background-image: linear-gradient(90deg, var(--link-color) 0%, var(--link-color) 40%, transparent 40%, transparent 60%, currentColor 60%, currentColor 100%);
    background-position: 100% 100%;
    background-size: 250% 0.15em;
    background-repeat: no-repeat;
    background-clip: padding-box;

    color: inherit;
    text-decoration: none;
    overflow: hidden;

    padding-bottom: 0.25em;

    transition: background-position var(--link-animation-speed) var(--link-animation-hermite);
}

a:hover {
    background-position: 0% 100%;
}

.layout {
    max-width: 80ch;
}

.header {
    padding-bottom: 2em;
    margin-bottom: 2em;

    border-bottom: 3px solid var(--text-color);
}

.header h1 {
    text-align: center;
    text-transform: uppercase;

    margin: 0.1em 0;

    font-size: 2.75rem;
    font-weight: 700;
}

.header h2 {
    text-align: center;

    font-size: 1.2rem;
    font-weight: 500;

    color: var(--text-color-4);
}

.header ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5em;
    
    padding: 0;

    list-style: none;
    font-size: 1rem;
}

.section {
    margin-bottom: 4rem;
}

.inner {
    margin: 0 3em 4em;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 32px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--text-color);
}

.grid-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #e5e5e5;
}

.grid-item:first-of-type {
    margin-top: initial;
    padding-top: initial;
    border-top: none;
}

.meta-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 16px;
    border-right: 2px solid #e5e5e5;
}

.content-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.meta-date {
    font-size: 13px;
    font-weight: 600;
    color: #4a4a4a;
    font-variant-numeric: tabular-nums;
}

.meta-location {
    font-size: 12px;
    color: #6a6a6a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
    letter-spacing: -0.2px;
}

.item-subtitle {
    margin-top: 4px;
}

.item-subtitle * {
    font-size: 15px;
    font-weight: 500;
    color: #4a4a4a;
}

.item-description {
    font-size: 14px;
    line-height: 24px;
    color: #2a2a2a;
    margin: 8px 0 0 0;
}

.highlights-list {
    margin: 16px 0 0 0;
    padding-left: 24px;
    list-style: none;
}

.highlights-list li {
    position: relative;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 24px;
}

.highlights-list li::before {
    content: '■';
    position: absolute;
    left: -24px;
    color: #1a1a1a;
    font-size: 10px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
    gap: 32px;
}

.skill-category {
    padding: 12px;
    border: 2px solid #e5e5e5;
    background: #fafafa;
}

.skill-category h4 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 16px 0;
    color: #1a1a1a;
}

.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    flex: 1 1 auto;
    display: inline-block;
    font-size: 12px;
    padding: 4px 12px;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    color: #2a2a2a;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-align: center;
}

.simple-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.simple-item {
    padding: 16px;
    border-left: 3px solid #e5e5e5;
    background: #fafafa;
}

.simple-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.simple-item p {
    font-size: 14px;
    margin: 0;
    color: #4a4a4a;
}

.simple-item a {
    color: inherit;
    text-decoration: underline;
}

.grid-template {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

.image-thumbnail {
    max-width: 100%;
    transition: transform 250ms, box-shadow 250ms;
    border-radius: 10px;
    cursor: pointer;
}

.image-thumbnail:hover {
    transform: translateY(-4px);
    box-shadow: 3px 3px 10px black;
}

.video-thumbnail {
    display: grid;
    border-radius: 10px;
    position: relative;
    place-items: center;
    transition: transform 250ms, box-shadow 250ms;
    cursor: pointer;
}

.video-thumbnail:hover {
    transform: translateY(-4px);
    box-shadow: 3px 3px 10px black;
}

.video-thumbnail:hover .video-thumbnail-button {
    transform: scale(1.1);
    box-shadow: 2px 2px 8px black;
}

.video-thumbnail-image {
    grid-area: 1 / 1;
    display: block;
    width: 100%;
    border-radius: inherit;
    height: auto;
}

.video-thumbnail-button {
    grid-area: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100%;
    width: 60px;
    height: 60px;
    box-shadow: 0px 0px 10px var(--text-color);
    transition: transform 250ms, box-shadow 250ms;
    pointer-events: none;
}

dialog {
    padding: 1em;
    border: 0;
    box-shadow: 3px 3px 10px black;
    opacity: 0;
    transition: opacity 250ms;
}

dialog:open {
    opacity: 1;
    transition: opacity 250ms;
}

.close-button {
    position: absolute;
    width: 5em;
    height: 5em;
    right: 2em;
    top: 2em;

    background: none;
    border: none;
    padding: 0;
}

.close-button span {
    position: relative;
    top: -0.25em;

    font-size: 4em;
    font-weight: 500;

    color: white;
    text-shadow: 0px 0px 2px white;

    transition: text-shadow 120ms;

    cursor: pointer;
}

.close-button:hover span {
    text-shadow: 0px 0px 8px white;
}

.project-shelf {
    display: flex;
    position: relative;
    align-items: center;

    padding: 25px;
    background-color: black;
    border-radius: 10px;
}

.project-shelf::before {
    content: "";
    
    position: absolute;
    inset: 0;
    z-index: 1;

    background: var(--background-image);
    background-size: cover;
    background-position: 50%;

    filter: blur(var(--project-shelf-blur)) saturate(1.6);
}

.project-shelf-content {
    color: hsla(0, 0%, 100%, 0.92);

    display: flex;
    flex-flow: row wrap;
    align-items: center;
    gap: 1em;

    z-index: 2;
}

.project-shelf-content img {
    height: 128px;
    border-radius: 25%;
    box-shadow: 0px 0px 40px rgba(255, 255, 255, 0.38);
}

.project-shelf h1 {
    font-size: 2em;
    line-height: 40px;
    margin: 0px;
}

.project-shelf h2 {
    font-size: 1em;
    line-height: 22px;
    margin: 0px;
}

.project-shelf-links {
    display: flex;
    flex-direction: row;
    gap: 0.65em;

    margin-top: 1em;
}

.project-shelf-links a {
    font-size: 1em;
    display: flex;
    align-items: end;
}

.project-info-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;

    padding: 0px;
}

.project-info-items li{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.project-info-title {
    font-size: 0.8em;
    font-weight: 600;
}

.project-info-content {
    font-size: 1.6em;
    font-weight: 700;
}

.project-info-subtitle {
    font-size: 0.8em;
    font-weight: 400;
}

.project-description {
    max-width: 614px;
}

.project-description h3 {
    margin-top: 1.5em;
}

.project-rating {
    display: flex;
    padding-bottom: 1.5em;
}

.project-rating-title {
    display: flex;
    justify-content: center;
    font-size: 50px;
    font-weight: 700;
}

.project-rating-subtitle {
    display: flex;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.project-rating-stats {
    line-height: normal;
    flex: 0 40px;
    margin-right: 8px;
}

.project-rating-numbers {
    display: flex;
    flex-direction: column-reverse;
    justify-content: start;
    width: 100%;
}

.project-rating-count {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.project-rating-stars {
    margin-top: 12px;
}

.project-rating-star-bar {
    display: flex;
    width: 100%;
}

.rating-progress {
    display: flex;
    flex-direction: row;
}

.stars {
    display: flex;
    justify-content: flex-end;
    margin-right: 6px;
    min-width: 45px;
}

.rating-bar {
    height: 2px;
    margin-top: 3px;
    width: 100%;

    background-color: rgba(0, 0, 0, 0.1);
}

.rating-bar-slider {
    display: block;
    height: 2px;
    max-width: 100%;

    background-color: rgba(0, 0, 0, 0.88);
}

.project-comment {
    padding: 1.5em 0;
    font-weight: 400;
}

.project-comment-content {
    padding-left: 20px;
    border-left: 2px solid rgba(0, 0, 0, 0.3);
}

@starting-style {
    dialog {
        opacity: 1;
    }
  
    dialog:open {
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .grid-item {
            grid-template-columns: 1fr;
            gap: 16px;
    }

    .meta-column {
            border-right: none;
            border-bottom: 2px solid #e5e5e5;
            padding-right: 0;
            padding-bottom: 16px;
    }
}

@media print {
    .layout { padding: 48px 32px; }
    .header { page-break-inside: avoid; }
    .grid-item { page-break-inside: avoid; }
    .no-break { page-break-inside: avoid;}
    .section .section-title { page-break-after: avoid; }
}