* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 40px 20px;
    background: #008080;
    color: #111;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
}

.portfolio {
    max-width: 80%;
    margin: 0 auto;
    padding: 8px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #fff #404040 #404040 #fff;
    box-shadow: 2px 2px 0 #000;
}

.titlebar {
    display: block;
    position: static;
    height: auto;
    min-height: 0;
    margin: 0 0 16px;
    padding: 10px 14px;
    background: #000080 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 17px;
    font-weight: bold;
}

.titlebar::before,
.titlebar::after {
    content: none !important;
    display: none !important;
}

.intro {
    display: block !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 16px !important;
    background: transparent !important;
    color: #111 !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.intro::before,
.intro::after {
    content: none !important;
    display: none !important;
}

h1 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 4vw, 2.6rem);
    line-height: 1.2;
    font-weight: bold;
}

h2 {
    margin: 0 0 14px;
    font-size: 21px;
    line-height: 1.35;
    font-weight: bold;
}

h3 {
    margin: 0 0 12px;
    font-size: 18px;
    line-height: 1.4;
    font-weight: bold;
}

h4 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: bold;
}

p {
    line-height: 1.7;
}

.intro .subtitle {
    font-size: 1.25rem;
    line-height: 1.4;
}

.muted {
    color: #444;
    font-size: 14px;
    line-height: 1.5;
}

.section-heading {
    margin: 16px 16px 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #808080;
}

.cards {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1.5fr;
    gap: 16px;
    align-items: stretch;
}

@media (max-width: 850px) {
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .cards {
        grid-template-columns: 1fr;
    }
}

.card-window {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100%;
    padding: 12px;
    background: #c0c0c0;
    color: #111;
    border: 2px solid;
    border-color: #fff #404040 #404040 #fff;
}

.card-title {
    flex: 0 0 auto;
    margin: -12px -12px 14px;
    padding: 9px 10px;
    background: #000080;
    color: #fff;
    font-size: 17px;
    line-height: 1.4;
    font-weight: bold;
}

.card-window> :last-child {
    margin-bottom: 0;
}

.card-window p:last-child {
    margin-bottom: 0;
}

/*
Make tree views fill the remaining card height.
The grid stretches the cards; flex makes the tree
take up the available space inside each card.
*/
.card-window>.tree-view {
    flex: 1 1 auto;
    min-height: 150px;
    height: auto;
}

/* Windows Explorer-style tree */
.tree-view {
    min-width: 0;
    padding: 10px;
    background: #fff;
    color: #111;
    border: 2px solid;
    border-color: #404040 #fff #fff #404040;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.tree-view details {
    margin: 0;
    padding: 0;
}

.tree-view summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 4px 2px;
    cursor: pointer;
    list-style: none;
    overflow-wrap: anywhere;
    line-height: 1.5;
}

.tree-view summary::-webkit-details-marker {
    display: none;
}

.tree-view summary::before {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 1px solid #808080;
    font-family: monospace;
    font-size: 12px;
    line-height: 10px;
}

.tree-view details[open]>summary::before {
    content: "−";
}

.tree-view summary:hover {
    background: #e5e5e5;
}

.tree-view summary:focus-visible {
    outline: 1px dotted #111;
    outline-offset: -2px;
}

/* Folder icon */
.folder-icon {
    position: relative;
    display: inline-block;
    flex: 0 0 18px;
    width: 18px;
    height: 13px;
    background: #e9c65b;
    border: 1px solid #806b29;
}

.folder-icon::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 0;
    width: 8px;
    height: 3px;
    background: #e9c65b;
    border: 1px solid #806b29;
    border-bottom: 0;
}

/* Tree branches */
.tree-children {
    margin-left: 8px;
    padding-left: 14px;
    border-left: 1px dotted #808080;
}

.tree-leaf {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 0px 0;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.tree-leaf::before {
    content: "";
    flex: 0 0 12px;
    height: 1px;
    margin-top: 12px;
    background: #808080;
}

.tree-file {
    flex: 0 0 16px;
}

.tree-muted {
    display: block;
    margin-top: 3px;
    color: #555;
    font-size: 13px;
    line-height: 1.5;
}

.tree-leaf a {
    color: #000080;
}

.tree-leaf a:hover {
    background: #000080;
    color: #fff;
}

/* Raised Windows-style buttons */
.links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px 16px 20px;
}

.links a {
    display: inline-block;
    padding: 8px 14px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #fff #404040 #404040 #fff;
    color: #111;
    font-size: 16px;
    line-height: 1.5;
    text-decoration: none;
}

.links a:hover {
    color: #000080;
}

.links a:active {
    border-color: #404040 #fff #fff #404040;
}

footer {
    padding: 0 16px 8px;
}

footer p {
    margin: 0;
}

/* Tablet and mobile */
@media (max-width: 850px) {
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .portfolio {
        padding: 6px;
    }

    .cards {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 0 6px 10px;
    }

    .card-window {
        min-height: 0;
    }

    .card-window>.tree-view {
        min-height: 150px;
    }

    .intro {
        padding: 12px !important;
    }

    h1 {
        font-size: 26px;
    }

    .titlebar {
        overflow-wrap: anywhere;
    }
}

.exp-description {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 2px 0 6px;
    line-height: 1.4;
}

.exp-description::before {
    content: "";
    flex: 0 0 12px;
    height: 1px;
    margin-top: 10px;
    background: #808080;
}

.exp-description span {
    display: block;
    flex: 1 1 0;
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.4;
}

.exp-description ul {
    flex: 1 1 calc(100% - 20px);
    min-width: 0;
    margin: 0;
    padding-left: 18px;
    box-sizing: border-box;
}

.exp-description li {
    margin: 0 0 3px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.exp-tools {
    display: block;
    margin-top: 4px;
    color: #444;
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
    font-weight: bold;
}

/* Reduce indentation on narrower cards */
@media (max-width: 850px) {
    .exp-description {
        padding-left: 0;
        padding-right: 0;
    }

    .exp-description ul {
        padding-left: 16px;
    }
}

.tree-leaf {
    min-width: 0;
}

.tree-leaf>div {
    flex: 1;
    min-width: 0;
}

/* Keep the original Explorer tree guide and indentation */
.tree-children.exp-children {
    display: block;
    width: auto;
    min-width: 0;
    box-sizing: border-box;

    /* Preserve the original tree indentation and guide */
    margin-left: inherit;
    padding-bottom: 4px;
}

/* Let each description use the available width */
.exp-children>.exp-description,
.exp-children>.exp-tools {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* Let the description fill the available width */
.exp-children>.exp-description {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Only adjust the company dropdown guide */
.tree-item>details>.tree-children {
    margin-left: 10px;
    padding-left: 18px;
}

.pixel-art {
    display: block;
    width: 250px;
    height: 250px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    margin: 0 auto;
}

.pixel-frame {
    width: fit-content;
    max-width: 100%;
    margin: 16px auto;
    padding: 4px;
    background: #c0c0c0;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
}

.pixel-frame img {
    display: block;
    max-width: 100%;
}