:root {
    --bg: #f4f1e6;
    --panel: #f8f6ee;
    --text: #27343b;
    --muted: #5f6f78;
    --link: #1a4f7a;
    --border: #d8d2c2;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Courier New", Courier, monospace;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    font-size: 15px;
}

.layout {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 14px 28px;
}

.top-nav {
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.top-nav a {
    color: var(--link);
    text-decoration: none;
}

.top-nav a:hover,
.top-nav a:focus-visible {
    text-decoration: underline;
}

.top-nav a[aria-current="page"] {
    text-decoration: underline;
    font-weight: 700;
}

.skip-to-content {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-to-content:focus {
    left: 10px;
    top: 10px;
    width: auto;
    height: auto;
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 10px;
    z-index: 1000;
}

.prompt {
    color: #2f9f68;
    margin-right: 8px;
    font-weight: 700;
}

h1 {
    margin: 20px 0 8px;
    font-size: 36px;
    line-height: 1.2;
    color: #202a2f;
}

h2 {
    margin: 18px 0 6px;
    font-size: 22px;
    line-height: 1.3;
}

h3 {
    margin: 12px 0 4px;
    font-size: 18px;
    line-height: 1.3;
}

.lead {
    margin: 0 0 14px;
    color: var(--muted);
}

.block {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0;
    margin: 14px 0 10px;
    border: 0;
    background: transparent;
    padding: 0;
    color: #233740;
    font-size: 14px;
    letter-spacing: 0.01em;
}

.block::before {
    content: "ibraheem@website:~";
    color: #4b88b3;
    margin-right: 8px;
}

.block::after {
    content: "_";
    color: #5f6f78;
    margin-left: 2px;
    animation: terminal-caret 1.1s step-end infinite;
}

@keyframes terminal-caret {
    50% {
        opacity: 0;
    }
}

.project,
.entry {
    margin: 16px 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--border);
}

.project:last-child,
.entry:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.profile-entry {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.profile-photo {
    width: 150px;
    height: 190px;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.meta {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 14px;
}

.desc {
    margin: 0 0 8px;
}

.plain-link {
    color: inherit;
    text-decoration: inherit;
}

.plain-link:hover {
    color: inherit;
    text-decoration: inherit;
}

.tags {
    margin: 6px 0;
    color: var(--muted);
    font-size: 14px;
}

.links {
    margin-top: 6px;
    font-size: 14px;
}

.links a {
    color: var(--link);
    margin-right: 14px;
}

.links .disabled {
    color: #8a9095;
    text-decoration: none;
    cursor: default;
    margin-right: 14px;
}

.project-details {
    margin: 8px 0 10px;
    border-left: 2px solid var(--border);
    padding-left: 10px;
}

.project-details summary {
    color: var(--link);
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

.project-toggle {
    border: 1px solid var(--border);
    background: var(--panel);
    padding: 0;
    margin: 10px 0 12px;
}

.project-toggle summary {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    list-style: none;
    color: var(--text);
    border-bottom: 1px solid transparent;
}

.project-toggle summary::-webkit-details-marker {
    display: none;
}

.project-toggle[open] summary {
    border-bottom-color: var(--border);
}

.toggle-num {
    color: #8a9095;
    font-size: 12px;
}

.toggle-title {
    color: var(--text);
    font-weight: 700;
}

.toggle-meta {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.project-toggle > .desc,
.project-toggle > .tags,
.project-toggle > .list,
.project-toggle > .links {
    margin-left: 12px;
    margin-right: 12px;
}

.project-toggle > .links {
    margin-bottom: 12px;
}

.project-details[open] summary {
    margin-bottom: 6px;
}

.project-details summary:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 2px;
}

.figure {
    margin: 14px 0;
}

.figure img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    background: var(--panel);
}

.figure figcaption {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.list {
    margin: 8px 0;
    padding-left: 20px;
}

.list li {
    margin-bottom: 6px;
}

footer {
    border-top: 1px solid var(--border);
    margin-top: 18px;
    padding-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 768px) {
    h1 {
        font-size: 30px;
    }

    .layout {
        padding: 0 10px 24px;
    }

    .top-nav {
        gap: 12px;
    }

    .profile-entry {
        flex-direction: column;
    }

    .profile-photo {
        width: 130px;
        height: 165px;
    }

    .project-toggle summary {
        grid-template-columns: 34px 1fr;
    }

    .toggle-meta {
        grid-column: 2;
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .block::after {
        animation: none;
    }
}
