/* ---------------------------------------------------------------
   York Myers — personal site
   Typography-led, each content section in its own card. The accent
   color is used only as a hover/link treatment.
------------------------------------------------------------------ */

:root {
    --paper: #faf9f6;
    --ink: #191816;
    --muted: #6b655e;
    --hairline: rgba(25, 24, 22, 0.14);
    --accent: #1f4e4c;

    --card-bg: #ffffff;
    --card-border: rgba(25, 24, 22, 0.08);
    --card-shadow: 0 1px 2px rgba(25, 24, 22, 0.04), 0 12px 32px rgba(25, 24, 22, 0.05);

    --font-display: 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    --content-width: 920px;
    --gutter: clamp(24px, 6vw, 64px);
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #131412;
        --ink: #f1efe9;
        --muted: #9a948a;
        --hairline: rgba(241, 239, 233, 0.16);
        --accent: #6fc9bd;

        --card-bg: #1b1d1f;
        --card-border: rgba(241, 239, 233, 0.1);
        --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
    }
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

.wrap {
    max-width: var(--content-width);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

/* ---------------- Sections ---------------- */

section {
    margin-top: clamp(24px, 4vw, 40px);
}

section:first-of-type {
    margin-top: 0;
}

.section-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    box-shadow: var(--card-shadow);
    padding: clamp(28px, 4vw, 44px);
}

.section-label {
    display: block;
    font-size: 12px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 28px;
}

.section-intro {
    color: var(--muted);
    max-width: 68ch;
    margin: -12px 0 28px;
}

/* ---------------- Hero ---------------- */

.hero {
    padding-top: clamp(24px, 6vw, 48px);
    display: flex;
    align-items: center;
    gap: clamp(28px, 5vw, 48px);
}

.hero-photo {
    flex-shrink: 0;
    width: clamp(96px, 12vw, 148px);
    height: clamp(96px, 12vw, 148px);
    border-radius: 50%;
    object-fit: cover;
}

.hero-text {
    min-width: 0;
    flex: 1;
}

@media (max-width: 640px) {
    .hero {
        flex-direction: column;
        align-items: flex-start;
    }
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin: 0 0 20px;
}

.hero .tagline {
    font-size: clamp(15px, 1.8vw, 17px);
    color: var(--muted);
    max-width: 46ch;
    margin: 0 0 28px;
}

.hero .meta {
    font-size: 13px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero .meta .dot::before {
    content: '\2022';
    margin-right: 10px;
}

.social-row {
    display: flex;
    gap: 22px;
    margin-top: 36px;
    font-size: 20px;
    color: var(--muted);
}

.social-row a {
    display: inline-flex;
    transition: color 0.15s ease;
}

.social-row a:hover {
    color: var(--accent);
}

/* ---------------- Row lists (Now / Building / Experience) ---------------- */

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

.row-list li {
    border-top: 1px solid var(--hairline);
}

.row-list li:last-child {
    border-bottom: 1px solid var(--hairline);
}

.row-list a.row,
.row-list .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 0;
}

.row-list a.row {
    transition: color 0.15s ease;
}

.row-list a.row:hover .row-title {
    color: var(--accent);
}

.row-left {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
    flex: 1;
}

.row-logo {
    flex-shrink: 0;
    width: clamp(80px, 11vw, 108px);
    height: clamp(80px, 11vw, 108px);
    object-fit: contain;
}

.row-main {
    min-width: 0;
}

.row-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 300;
    transition: color 0.15s ease;
}

.row-sub {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

.row-desc {
    font-size: 13.5px;
    color: var(--muted);
    margin-top: 6px;
    max-width: 70ch;
}

.row-arrow {
    flex-shrink: 0;
    color: var(--muted);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.row-list a.row:hover .row-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--accent);
}

.row-dates {
    flex-shrink: 0;
    font-size: 12.5px;
    color: var(--muted);
    white-space: nowrap;
}

/* ---------------- About ---------------- */

.about p {
    max-width: 62ch;
    margin: 0 0 20px;
    color: var(--ink);
}

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

/* ---------------- Elsewhere ---------------- */

.elsewhere-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 15px;
}

.elsewhere-list li {
    border-top: 1px solid var(--hairline);
}

.elsewhere-list li:last-child {
    border-bottom: 1px solid var(--hairline);
}

.elsewhere-list a,
.elsewhere-list .row-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 0;
    width: 100%;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: color 0.15s ease;
}

.elsewhere-list a:hover,
.elsewhere-list .row-btn:hover {
    color: var(--accent);
}

.elsewhere-list svg {
    flex-shrink: 0;
    color: var(--muted);
}

.elsewhere-list a:hover svg,
.elsewhere-list .row-btn:hover svg {
    color: var(--accent);
}

/* ---------------- Contact modal ---------------- */

.modal {
    border: none;
    border-radius: 18px;
    padding: clamp(28px, 4vw, 44px);
    width: min(480px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: var(--card-bg);
    color: var(--ink);
    box-shadow: var(--card-shadow);
    position: relative;
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: color 0.15s ease, background 0.15s ease;
}

.modal-close:hover {
    color: var(--ink);
    background: var(--hairline);
}

.contact-intro h2 {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(22px, 4vw, 28px);
    margin: 0 0 12px;
}

.contact-intro p {
    color: var(--muted);
    max-width: 50ch;
    margin: 0 0 28px;
}

form.contact-form {
    margin-bottom: 32px;
}

.field {
    margin-bottom: 28px;
}

.field label {
    display: block;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.field input,
.field textarea {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--hairline);
    background: transparent;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    padding: 10px 0;
    outline: none;
    transition: border-color 0.15s ease;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--accent);
}

.field textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    appearance: none;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 500;
    padding: 13px 28px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.submit-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.form-message {
    margin-top: 18px;
    font-size: 13.5px;
    display: none;
}

.form-message.is-visible {
    display: block;
}

.form-message.is-success {
    color: var(--accent);
}

.form-message.is-error {
    color: #b5462f;
}

.contact-details {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13.5px;
    color: var(--muted);
}

.contact-details li {
    margin-bottom: 6px;
}

.contact-details a:hover {
    color: var(--accent);
}

/* ---------------- Footer ---------------- */

.site-footer {
    padding: 40px 0 56px;
    font-size: 12px;
    color: var(--muted);
}

.site-footer .wrap {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.site-footer a:hover {
    color: var(--accent);
}

/* ---------------- Reveal-on-scroll ---------------- */

[data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------------- Responsive ---------------- */

@media (max-width: 560px) {
    .row-list a.row,
    .row-list .row {
        flex-direction: column;
        gap: 4px;
    }

    .row-dates {
        order: -1;
    }
}
