/* Portfolio homepage styles. Separate from style.css, which older pages
   (axefx_tempo.html, music.html) still depend on. */

:root {
    --bg-top: #1d1012;
    --bg-bottom: #0a0d2e;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.12);
    --text: #e6e1dc;
    --muted: #a39b94;
    --accent: #e0a458;
    --link: #8fb3ff;
    --radius: 12px;
    --max: 960px;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-top: #f7f2ec;
        --bg-bottom: #e9ecf7;
        --surface: rgba(0, 0, 0, 0.03);
        --surface-hover: rgba(0, 0, 0, 0.06);
        --border: rgba(0, 0, 0, 0.12);
        --text: #231c1a;
        --muted: #6b625c;
        --accent: #a5601a;
        --link: #2a55c4;
    }
}

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

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

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom)) fixed;
    background-color: var(--bg-bottom);
    color: var(--text);
    font-family: "Cardo", Georgia, serif;
    font-size: 19px;
    line-height: 1.55;
}

h1,
h2,
h3,
.nav,
.tag,
.btn {
    font-family: "Strait", "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
}

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

a:hover {
    text-decoration: underline;
}

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 20px 0;
    font-size: 17px;
}

.nav .home {
    color: var(--text);
    letter-spacing: 0.02em;
}

.nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav ul a {
    color: var(--muted);
}

.nav ul a:hover {
    color: var(--text);
}

/* Hero */

.hero {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 36px;
    align-items: center;
    padding: 48px 0 56px;
}

.hero img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.hero h1 {
    margin: 0 0 8px;
    font-size: 48px;
    line-height: 1.1;
}

.hero p {
    margin: 0 0 20px;
    color: var(--muted);
    max-width: 36em;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font-size: 16px;
}

.btn:hover {
    background: var(--surface-hover);
    text-decoration: none;
}

.btn.primary {
    border-color: var(--accent);
    color: var(--accent);
}

/* Sections */

section {
    padding: 28px 0;
}

section > h2 {
    margin: 0 0 6px;
    font-size: 28px;
}

section > .lede {
    margin: 0 0 20px;
    color: var(--muted);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 14px;
}

.card {
    display: flex;
    flex-direction: column;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: background 0.15s, border-color 0.15s;
}

a.card:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
    text-decoration: none;
}

.card h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.card p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 17px;
    flex: 1;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--surface-hover);
    color: var(--muted);
    font-size: 13px;
}

.tag.star {
    color: var(--accent);
}

/* Footer */

footer {
    margin-top: 40px;
    padding: 28px 0 40px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 16px;
}

footer ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
}

/* Tool pages (audio utilities, guitar practice) */

.tool {
    padding: 32px 0 8px;
}

.tool h1 {
    margin: 0 0 8px;
    font-size: 40px;
    line-height: 1.15;
}

.tool > .lede {
    margin: 0 0 28px;
    color: var(--muted);
    max-width: 40em;
}

.tool h2 {
    margin: 36px 0 8px;
    font-size: 26px;
}

.tool h3 {
    margin: 28px 0 4px;
    font-size: 20px;
}

.tool p {
    max-width: 40em;
}

.panel {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.field {
    display: grid;
    grid-template-columns: 7em 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.field:last-child {
    margin-bottom: 0;
}

.field > label,
.field > .label {
    font-family: "Strait", "Helvetica Neue", Arial, sans-serif;
    color: var(--muted);
}

select,
input[type="text"],
input[type="number"] {
    width: 100%;
    max-width: 20em;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-bottom);
    color: var(--text);
    font: inherit;
    font-size: 18px;
}

select:focus,
input:focus,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button.btn {
    background: none;
    cursor: pointer;
}

.btn[disabled] {
    opacity: 0.5;
    pointer-events: none;
}

.output {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

code,
.mono {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.9em;
}

.output .mono {
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--surface-hover);
    color: var(--accent);
    font-size: 18px;
    letter-spacing: 0.04em;
}

.icon-btn {
    display: inline-flex;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: none;
    cursor: pointer;
}

.icon-btn:hover {
    background: var(--surface-hover);
}

.icon-btn img {
    filter: invert(1);
}

@media (prefers-color-scheme: light) {
    .icon-btn img {
        filter: none;
    }
}

.tool figure {
    margin: 24px 0;
}

.tool figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.chips li {
    min-width: 5.5em;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    font-family: "Strait", "Helvetica Neue", Arial, sans-serif;
    font-size: 26px;
    text-align: center;
}

@media (max-width: 640px) {
    body {
        font-size: 18px;
    }

    .tool h1 {
        font-size: 32px;
    }

    .field {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .wrap {
        padding: 0 16px;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 24px 0 36px;
    }

    .hero img {
        width: 128px;
        height: 128px;
    }

    .hero h1 {
        font-size: 38px;
    }
}
