/* ============================================
   Humans 2 Skills - Stylesheet
   Clean, warm, readable. Not corporate.
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Warm teal palette - approachable, not techy */
    --color-primary: #0d9488;
    --color-primary-dark: #0f766e;
    --color-primary-light: #14b8a6;

    /* Warm neutrals */
    --color-bg: #fafaf9;
    --color-bg-alt: #f5f5f4;
    --color-text: #292524;
    --color-text-light: #57534e;
    --color-text-lighter: #78716c;

    /* Accents */
    --color-border: #e7e5e4;
    --color-shadow: rgba(41, 37, 36, 0.08);

    /* Typography */
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-heading: Georgia, 'Times New Roman', serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;

    /* Layout */
    --max-width: 900px;
    --border-radius: 8px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- Typography ---------- */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.3;
    color: var(--color-text);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

h2 {
    font-size: 1.875rem;
    margin-bottom: var(--space-md);
}

h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

p {
    margin-bottom: var(--space-sm);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

strong {
    font-weight: 600;
}

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

main {
    flex: 1;
}

section {
    padding: var(--space-xl) 0;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    font-family: var(--font-body);
}

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

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: white;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: white;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: var(--color-text-light);
    border-color: var(--color-border);
}

.btn-outline:hover {
    border-color: var(--color-text-light);
    color: var(--color-text);
    text-decoration: none;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ---------- Hero Section ---------- */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: var(--space-xl) 0;
    text-align: center;
}

.hero h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: var(--space-xs);
}

.hero .tagline {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: var(--space-lg);
}

.hero-buttons {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.hero .btn-primary {
    background: white;
    color: var(--color-primary);
    border-color: white;
}

.hero .btn-primary:hover {
    background: var(--color-bg);
    border-color: var(--color-bg);
}

.hero .btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.hero .btn-secondary:hover {
    background: white;
    color: var(--color-primary);
}

/* ---------- About Section ---------- */
.about {
    background: white;
}

.about p {
    max-width: 650px;
    color: var(--color-text-light);
}

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

/* ---------- Section Intro ---------- */
.section-intro {
    color: var(--color-text-light);
    font-size: 1.1rem;
    margin-bottom: var(--space-lg);
    max-width: 600px;
}

/* ---------- Skills Grid ---------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-md);
}

.skill-card {
    background: white;
    border-radius: var(--border-radius);
    padding: var(--space-md);
    box-shadow: 0 2px 8px var(--color-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--color-shadow);
}

.skill-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: var(--space-sm);
    overflow: hidden;
}

.skill-image.placeholder {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-image.placeholder span {
    color: white;
    font-size: 2rem;
    font-family: var(--font-heading);
}

.skill-tagline {
    color: var(--color-primary);
    font-style: italic;
    font-size: 0.95rem;
    margin-bottom: var(--space-xs);
}

.skill-card p:last-of-type {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: var(--space-sm);
}

/* ---------- How It Works ---------- */
.how-it-works {
    background: white;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.step {
    text-align: center;
    padding: var(--space-sm);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.step h3 {
    font-family: var(--font-body);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.step p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ---------- CTA Section ---------- */
.cta {
    text-align: center;
    background: var(--color-bg-alt);
}

.cta h2 {
    margin-bottom: var(--space-xs);
}

.cta p {
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

/* ---------- Community Section ---------- */
.community {
    text-align: center;
    background: white;
    border-top: 1px solid var(--color-border);
}

.community h2 {
    margin-bottom: var(--space-xs);
}

.community > .container > p:first-of-type {
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

.community-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.btn-github {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-text);
    color: white;
    border-color: var(--color-text);
}

.btn-github:hover {
    background: #000;
    border-color: #000;
    color: white;
    text-decoration: none;
}

.btn-github svg {
    flex-shrink: 0;
}

.community-note {
    font-size: 0.9rem;
    color: var(--color-text-lighter);
}

/* ---------- Create Section ---------- */
.create {
    background: var(--color-bg-alt);
}

.create h2 {
    margin-bottom: var(--space-xs);
}

/* ---------- Navigation ---------- */
.nav {
    background: white;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--color-text);
}

.nav-logo:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-links a {
    color: var(--color-text-light);
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary);
    text-decoration: none;
}

.nav-github {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: var(--color-text);
    color: white !important;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: background 0.2s ease;
}

.nav-github:hover {
    background: var(--color-primary);
    color: white !important;
}

.nav-github svg {
    flex-shrink: 0;
}

/* ---------- Generator Form ---------- */
.generator {
    background: white;
}

.generator h1 {
    margin-bottom: var(--space-xs);
}

.skill-form {
    max-width: 600px;
    margin-top: var(--space-lg);
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.2s ease;
    background: var(--color-bg);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: white;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-lighter);
}

.helper-text {
    display: block;
    margin-top: var(--space-xs);
    font-size: 0.875rem;
    color: var(--color-text-lighter);
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-text);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.toast.hidden {
    opacity: 0;
    visibility: hidden;
}

/* ---------- Tips ---------- */
.tips {
    margin-top: var(--space-xl);
    padding: var(--space-md);
    background: var(--color-bg-alt);
    border-radius: var(--border-radius);
    max-width: 600px;
}

.tips h3 {
    font-family: var(--font-body);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.tips ul {
    list-style: none;
}

.tips li {
    margin-bottom: var(--space-sm);
    padding-left: 1.5rem;
    position: relative;
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.tips li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--color-primary);
}

.tips li:last-child {
    margin-bottom: 0;
}

/* ---------- Footer ---------- */
footer {
    background: var(--color-text);
    color: var(--color-bg-alt);
    padding: var(--space-lg) 0;
    text-align: center;
    margin-top: auto;
}

footer p {
    margin-bottom: var(--space-sm);
    font-size: 0.95rem;
}

footer a {
    color: var(--color-primary-light);
}

footer a:hover {
    color: white;
}

.footer-links {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--color-text-lighter);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--color-primary-light);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    html {
        font-size: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    section {
        padding: var(--space-lg) 0;
    }

    .hero {
        padding: var(--space-lg) 0;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 250px;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group .btn {
        width: 100%;
        text-align: center;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        gap: var(--space-sm);
    }

    .nav-links a:not(.nav-github) span,
    .nav-github span {
        display: none;
    }

    .nav-github {
        padding: 0.4rem;
    }

    .community-actions {
        flex-direction: column;
        align-items: center;
    }

    .community-actions .btn {
        width: 100%;
        max-width: 250px;
    }
}
