/* arsad.in — stone paper, petrol ink, one loud wordmark. */

:root {
    --paper:   #e8eae4;
    --raised:  #f3f4ef;
    --ink:     #17201d;
    --petrol:  #0a5c5f;
    --amber:   #c8860d;
    --muted:   #5d6b66;
    --rule:    rgba(23, 32, 29, 0.16);

    --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --serif: "Newsreader", Georgia, "Times New Roman", serif;

    --measure: 64ch;
    --gap:     clamp(2.75rem, 7vw, 4.5rem);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: clamp(1.02rem, 0.98rem + 0.25vw, 1.14rem);
    line-height: 1.62;
    font-optical-sizing: auto;
}

.page {
    max-width: 46rem;
    margin: 0 auto;
    padding: clamp(2.5rem, 7vw, 5rem) clamp(1.25rem, 5vw, 3rem) 4rem;
}

a { color: var(--petrol); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

:focus-visible {
    outline: 2px solid var(--petrol);
    outline-offset: 3px;
}

.skip {
    position: absolute;
    left: -9999px;
}
.skip:focus {
    left: 1rem;
    top: 1rem;
    z-index: 10;
    background: var(--raised);
    padding: 0.5rem 0.85rem;
    font-family: var(--mono);
    font-size: 0.8rem;
}

/* ---------- masthead ---------- */

.masthead { margin-bottom: var(--gap); }

.wordmark {
    margin: 0;
    font-family: var(--mono);
    font-weight: 500;
    font-size: clamp(2.9rem, 12.5vw, 6.4rem);
    line-height: 0.94;
    letter-spacing: -0.055em;
    color: var(--ink);
    overflow-wrap: break-word;
}

.status {
    margin: 1.5rem 0 0;
    padding-top: 0.9rem;
    border-top: 1px solid var(--rule);
    font-family: var(--mono);
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--muted);
    max-width: var(--measure);
}

.dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 0.45rem;
    border-radius: 50%;
    background: var(--amber);
    vertical-align: 0.06em;
}

.routes {
    margin-top: 1.15rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
    font-family: var(--mono);
    font-size: 0.82rem;
}
.routes a { text-decoration: none; color: var(--muted); }
.routes a:hover { color: var(--petrol); text-decoration: underline; }

.intro {
    max-width: var(--measure);
    margin: 0 0 var(--gap);
    font-size: 1.24em;
    line-height: 1.5;
}

/* ---------- blocks ---------- */

.block {
    max-width: var(--measure);
    padding-top: 1.25rem;
    margin-bottom: var(--gap);
    border-top: 1px solid var(--rule);
}

.block-title {
    margin: 0 0 1.6rem;
    font-family: var(--mono);
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    color: var(--petrol);
}

/* ---------- work ---------- */

.entry-head h3 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.35em;
    line-height: 1.3;
}
.entry-head .at {
    color: var(--muted);
    font-style: italic;
    font-weight: 400;
}

.period {
    margin: 0.3rem 0 0;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--muted);
}

.entry-note {
    margin: 0.15rem 0 1.1rem;
    font-style: italic;
    color: var(--muted);
    font-size: 0.95em;
}

.points {
    margin: 0;
    padding: 0;
    list-style: none;
}
.points li {
    position: relative;
    padding-left: 1.35rem;
    margin-bottom: 0.65rem;
}
.points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 0.6rem;
    height: 1px;
    background: var(--petrol);
}

/* ---------- projects ---------- */

.records {
    margin: 0;
    padding: 0;
    list-style: none;
}

.record {
    padding: 1.35rem;
    margin-bottom: 0.9rem;
    background: var(--raised);
}

.record-name {
    margin: 0;
    font-family: var(--mono);
    font-weight: 500;
    font-size: 1.02rem;
    letter-spacing: -0.01em;
}
.record-name a { text-decoration: none; border-bottom: 1px solid var(--petrol); }
.record-name a:hover { border-bottom-color: var(--ink); }

.fields {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: 0.15rem 0.9rem;
    margin: 0.85rem 0 0.9rem;
    font-family: var(--mono);
    font-size: 0.76rem;
    color: var(--muted);
}
.fields dt { color: var(--petrol); }
.fields dd { margin: 0; }

.record-blurb {
    margin: 0;
    font-size: 0.98em;
}

/* ---------- stack ---------- */

.capabilities {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 0.9rem 1.4rem;
    margin: 0 0 1.9rem;
}
.capabilities dt {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--petrol);
    padding-top: 0.22em;
}
.capabilities dd {
    margin: 0;
    font-size: 0.98em;
}

.education {
    margin: 0;
    padding-top: 1.1rem;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-size: 0.95em;
}

/* ---------- contact ---------- */

.contact-lead {
    margin: 0 0 1.6rem;
    max-width: 52ch;
}

.note {
    margin: 0 0 1.4rem;
    padding: 0.85rem 1rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    line-height: 1.5;
}
.note-sent  { background: var(--raised); border-left: 2px solid var(--petrol); }
.note-error { background: var(--raised); border-left: 2px solid var(--amber); }

.trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.field { margin-bottom: 1.15rem; }

.field label {
    display: block;
    margin-bottom: 0.35rem;
    font-family: var(--mono);
    font-size: 0.76rem;
    color: var(--muted);
}

.field input,
.field textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    background: var(--raised);
    border: 1px solid var(--rule);
    border-radius: 0;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 1rem;
    line-height: 1.5;
}
.field textarea { resize: vertical; min-height: 8rem; }

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--petrol);
    box-shadow: inset 0 0 0 1px var(--petrol);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--amber); }

.err {
    display: block;
    margin-top: 0.35rem;
    font-family: var(--mono);
    font-size: 0.74rem;
    color: var(--amber);
}

.form button {
    padding: 0.72rem 1.5rem;
    background: var(--petrol);
    color: var(--raised);
    border: 1px solid var(--petrol);
    border-radius: 0;
    font-family: var(--mono);
    font-size: 0.84rem;
    cursor: pointer;
}
.form button:hover {
    background: var(--ink);
    border-color: var(--ink);
}

/* ---------- footer ---------- */

.foot {
    max-width: var(--measure);
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
    font-family: var(--mono);
    font-size: 0.76rem;
    color: var(--muted);
}
.foot p { margin: 0 0 0.4rem; }
.foot .links { display: flex; gap: 1.1rem; }
.foot .links a { text-decoration: none; }
.foot .links a:hover { text-decoration: underline; }
.colophon { margin-top: 0.9rem; }

/* ---------- one load reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
    .js-ready .wordmark,
    .js-ready .status,
    .js-ready .routes,
    .js-ready .intro {
        animation: rise 620ms cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
    }
    .js-ready .status { animation-delay: 90ms; }
    .js-ready .routes { animation-delay: 150ms; }
    .js-ready .intro  { animation-delay: 210ms; }

    @keyframes rise {
        from { opacity: 0; transform: translateY(0.5rem); }
        to   { opacity: 1; transform: none; }
    }
}

@media (max-width: 30rem) {
    .capabilities,
    .fields {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
    .capabilities dd { margin-bottom: 0.7rem; }
}

@media print {
    body { background: #fff; }
    .routes, .form, .contact-lead, .skip { display: none; }
}
