/* =========================================================
   Ali Abbasi — personal site
   Minimal academic; system serif/sans, restrained palette
   ========================================================= */

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 17px;
    line-height: 1.6;
    color: #1a1a1a;
    background: #fbfaf7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

/* ---------- Layout ---------- */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}
.container--wide {
    max-width: 960px;
}
main {
    padding: 64px 0 96px;
}

/* ---------- Site header ---------- */
.site-header {
    padding: 18px 0;
    border-bottom: 1px solid #e5e2d8;
    border-top: 3px solid #0a3d3d;
    background: rgba(251, 250, 247, 0.92);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
}
.site-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}
.site-logo {
    font-family: Charter, "Iowan Old Style", Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    letter-spacing: -0.005em;
}
.site-logo:hover { color: #0a3d3d; text-decoration: none; }

.site-nav {
    display: flex;
    gap: 28px;
}
.site-nav a {
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.005em;
    padding: 4px 0;
}
.site-nav a:hover {
    color: #0a3d3d;
    text-decoration: none;
}
.site-nav a.active {
    color: #0a3d3d;
    border-bottom: 2px solid #0a3d3d;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    font-family: Charter, "Iowan Old Style", Georgia, serif;
    font-weight: 600;
    line-height: 1.2;
    color: #111;
    margin: 0 0 0.5em;
    letter-spacing: -0.01em;
}
h1 {
    font-size: 44px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 16px;
}
h1::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 56px;
    height: 3px;
    background: #ffb800;
}
h2 {
    font-size: 30px;
    margin: 64px 0 20px;
    position: relative;
    padding-left: 18px;
}
h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    width: 4px;
    height: 22px;
    background: #0a3d3d;
}
h3 { font-size: 22px; margin: 40px 0 12px; }
h4 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }

p { margin: 0 0 1em; }

.lead {
    font-size: 19px;
    line-height: 1.55;
    color: #444;
    margin-bottom: 32px;
}

.meta {
    font-size: 14px;
    color: #777;
    margin: 0 0 32px;
}

.page-eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #0a3d3d;
    margin-bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.page-eyebrow::before {
    content: "";
    display: inline-block;
    width: 28px;
    height: 2px;
    background: #0a3d3d;
}

a {
    color: #0a3d3d;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.15s;
}
a:hover {
    text-decoration-thickness: 2px;
}

ul, ol {
    padding-left: 24px;
    margin: 0 0 1em;
}
li { margin-bottom: 0.4em; }

code {
    background: #f3f1ec;
    color: #0a3d3d;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.88em;
}

hr {
    border: 0;
    border-top: 1px solid #e5e2d8;
    margin: 56px 0;
}

/* ---------- Page header ---------- */
.page-header { margin-bottom: 40px; }

/* ---------- Tool cards (Home) ---------- */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 24px 0 32px;
}
.tool-card {
    padding: 24px;
    border: 1px solid #e5e2d8;
    border-top: 3px solid #0a3d3d;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-top-color 0.2s ease;
}
.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(10, 61, 61, 0.08);
    border-top-color: #ffb800;
}
.tool-card h3 { margin: 0 0 4px; font-size: 20px; }
.tool-card-meta {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.tool-card p {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.5;
    color: #444;
}
.tool-card-link {
    margin-top: auto;
    font-size: 14px;
    font-weight: 500;
}
.tool-card-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #b58100;
    background: rgba(255, 184, 0, 0.12);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}

/* ---------- Buttons ---------- */
.button {
    display: inline-block;
    padding: 12px 22px;
    background: #0a3d3d;
    color: #fbfaf7;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    border: 1px solid #0a3d3d;
    transition: background 0.15s, color 0.15s, box-shadow 0.2s, transform 0.2s;
}
.button:hover {
    background: #1a5f5f;
    color: #fbfaf7;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(10, 61, 61, 0.18);
    transform: translateY(-1px);
}
.button.secondary {
    background: transparent;
    color: #0a3d3d;
}
.button.secondary:hover {
    background: #f3f1ec;
    color: #0a3d3d;
}
.button.disabled {
    background: #ddd;
    border-color: #ddd;
    color: #fff;
    cursor: not-allowed;
    pointer-events: none;
}
.button + .button { margin-left: 8px; }

/* ---------- Download card (Bravais page) ---------- */
.download-card {
    padding: 28px 32px;
    background: #fff;
    border: 1px solid #e5e2d8;
    margin: 24px 0;
}
.download-card .platform-name {
    font-family: Charter, Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 4px;
}
.download-card .platform-sub {
    font-size: 14px;
    color: #777;
    margin: 0 0 16px;
}
.download-card .meta-list {
    font-size: 13px;
    color: #555;
    margin: 0 0 20px;
}
.download-card .meta-list span:not(:last-child)::after {
    content: "·";
    margin: 0 8px;
    color: #ccc;
}

/* ---------- Install steps (first-launch instructions) ---------- */
.install-steps {
    background: #f3f1ec;
    border-left: 3px solid #0a3d3d;
    padding: 24px 28px;
    margin: 32px 0;
}
.install-steps h3 {
    margin: 0 0 8px;
    font-size: 18px;
}
.install-steps p { font-size: 15px; color: #444; }
.install-steps ol {
    padding-left: 22px;
    margin: 12px 0;
}
.install-steps li {
    margin-bottom: 8px;
    font-size: 15px;
    color: #333;
}
.install-steps .note {
    font-size: 13px;
    color: #777;
    font-style: italic;
    margin: 12px 0 0;
}

/* ---------- Figures (screenshots) ---------- */
.figure { margin: 32px 0; }
.figure img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #e5e2d8;
}
.figure figcaption {
    font-size: 13px;
    color: #777;
    margin-top: 8px;
    font-style: italic;
}

/* ---------- Contact list (About) ---------- */
.contact-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
}
.contact-list li {
    display: flex;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #e5e2d8;
    margin: 0;
    align-items: baseline;
}
.contact-list li:last-child { border-bottom: 0; }
.contact-list .label {
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    min-width: 110px;
    flex-shrink: 0;
}
.contact-list .value {
    font-size: 15px;
    color: #1a1a1a;
}

/* ---------- Definition-style fact list (Research) ---------- */
.fact-list {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}
.fact-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e5e2d8;
    display: flex;
    gap: 16px;
    align-items: baseline;
    margin: 0;
}
.fact-list .label {
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    min-width: 140px;
    flex-shrink: 0;
}

/* ---------- Footer ---------- */
.site-footer {
    padding: 28px 0;
    border-top: 1px solid #e5e2d8;
    margin-top: 64px;
    font-size: 13px;
    color: #777;
}
.site-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.site-footer a { color: #555; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    html { font-size: 16px; }
    h1 { font-size: 32px; }
    h2 { font-size: 24px; margin-top: 48px; }
    h3 { font-size: 19px; }
    .site-nav { gap: 16px; }
    .tool-grid { grid-template-columns: 1fr; }
    .contact-list li, .fact-list li {
        flex-direction: column;
        gap: 4px;
    }
    .contact-list .label, .fact-list .label { min-width: 0; }
    main { padding: 40px 0 64px; }
}
