:root {
    --bg: #0f1115;
    --bg-card: #171a21;
    --text: #e8eaed;
    --muted: #9aa0a6;
    --accent: #4fd1c5;
    --border: #262a33;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

/* Home page header */
header {
    text-align: center;
    margin-bottom: 3rem;
}
header h1 {
    font-size: 2.4rem;
    margin: 0 0 0.5rem;
    letter-spacing: -0.5px;
}
header h1 span {
    color: var(--accent);
}
.tagline {
    color: var(--muted);
    font-size: 1.05rem;
    margin: 0 0 0.75rem;
}
.description {
    color: var(--text);
    font-size: 1rem;
}

section h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.tutorial-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.tutorial-list li a {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.tutorial-list li a:hover {
    border-color: var(--accent);
    transform: translateX(2px);
}
.tutorial-list li a::before {
    content: "→ ";
    color: var(--accent);
}

footer {
    margin-top: 3rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
}

/* Tutorial article pages */
.back-link {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}
.back-link:hover {
    text-decoration: underline;
}
article h1 {
    font-size: 1.9rem;
    margin: 0 0 0.5rem;
}
article .meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}
article h2 {
    font-size: 1.2rem;
    margin-top: 2rem;
    border: none;
    padding-bottom: 0;
}
article p {
    margin: 0.8rem 0;
}
article code {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-size: 0.9em;
}
article pre {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
}
article pre code {
    background: none;
    border: none;
    padding: 0;
}
.article-figure {
    margin: 1.5rem 0;
    text-align: center;
}
.article-image {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.article-figure figcaption {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 0.6rem;
}
.tutorial-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.tutorial-nav a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
}
.tutorial-nav a:hover {
    text-decoration: underline;
}

/* Main navigation (small) */
.main-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}
.main-nav a {
    color: var(--accent);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
}
.main-nav a:hover { text-decoration: underline; }

/* Projects grid and cards */
.projects-controls { margin: 0.75rem 0 1rem; }
.projects-controls input[type="search"] {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat( auto-fit, minmax(220px, 1fr) );
    gap: 1rem;
    margin-top: 0.5rem;
}
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
}
.project-card h3 { margin: 0 0 0.5rem; }
.project-description { color: var(--muted); margin: 0 0 0.65rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.project-tag {
    font-size: 0.78rem;
    background: rgba(79,209,197,0.06);
    color: var(--accent);
    padding: 0.25rem 0.45rem;
    border-radius: 999px;
}
.project-actions { display: flex; gap: 0.5rem; }
.btn {
    display: inline-block;
    text-decoration: none;
    padding: 0.45rem 0.7rem;
    border-radius: 6px;
    font-size: 0.95rem;
    border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #062023; }
.btn-secondary { background: transparent; color: var(--accent); border: 1px solid var(--border); }
.muted { color: var(--muted); }

@media (max-width: 560px) {
    .container { padding: 2.5rem 1rem; }
    .projects-grid { grid-template-columns: 1fr; }
}
