/* ======================
    THEME VARIABLES
====================== */
:root {
    --bg: #f6f8fa;
    --card-bg: #ffffff;
    --primary: #0969da;
    --text: #24292f;
    --muted: #57606a;
    --tag-bg: #eaeef2;
    --border: #d0d7de;
}

html[data-theme="dark"] {
    --bg: #0d1117;
    --card-bg: #161b22;
    --primary: #58a6ff;
    --text: #c9d1d9;
    --muted: #8b949e;
    --tag-bg: #21262d;
    --border: #30363d;
}

/* ======================
       RESET & BASE
    ====================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
    background: var(--bg);
    color: var(--text);
    padding: 2rem;
    padding-bottom: 1rem;
    transition: background-color 0.3s, color 0.3s;
}

/* ======================
    HEADER
====================== */
.header {
    max-width: 1200px;
    margin: 0 auto 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header ul {
    padding: 0;
    margin: 0;
    /*padding-top: 16px;*/
    display: flex;
    justify-content: center;
    flex-direction: row;
    list-style: none;
}

.header ul li {
    /*float: left;*/
    padding-left: 10px;
    padding-right: 10px;
    font-size: 16px;
}

.header ul li i {
    margin-right: 3px;
}

.header ul li a {
    text-decoration: none;
    color: var(--text);
}

.header ul li a:hover {
    border-bottom: 1px dashed var(--text);
}

#container {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    flex-direction: row;
    margin-bottom: 50px;
}

#container img {
    display: block;
    max-height: 320px;
    max-width: 320px;
    width: auto;
    margin-left: 20px;
    height: auto;
}

#vcard {
    margin-left: 20px;
    margin-right: 20px;
}

#vcard p.greeting {
    font-size: 30px;
    color: var(--text);
    padding: 0;
    margin: 0;
    margin-bottom: 15px;
}

#vcard p.dedicate {
    color: var(--text);
    /*font-family: "HermitLight";
    
    */
    text-align: justify;
    font-size: 16px;
    padding: 0;
    margin: 0;
    line-height: 1.6;
    max-width: 500px;

}

#vcard .btn {
    margin-top: 10px;
    margin-right: 10px;
}

h1 {
    font-size: 1.8rem;
}

.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text);
}

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

#bottom {
    /*position: fixed;*/
    /*height: 20px;*/
    text-align: center;
    color: var(--text);
    font-size: 14px;
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    background-color: var(--bg);
    margin-top: 20px;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal h2 {
    margin-bottom: 1rem;
}

.modal label {
    display: block;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.modal input {
    width: 100%;
    padding: 0.6rem;
    margin-top: 0.3rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}

#editor {
    height: 200px;
    background: var(--bg);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.2rem;
}

.btn.secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.sending {
    display: none;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: var(--muted);
}

/* ======================
    FLEX GRID (FIXED CARDS)
====================== */
.projects {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));

    gap: 1.5rem;
}

.card {
    /* fixed width, no stretching */
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.card h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.description {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    background: var(--tag-bg);
    border-radius: 999px;
    color: var(--muted);
}

.btn {
    display: inline-block;
    text-align: center;
    padding: 0.65rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}

/* ======================
       MOBILE
====================== */
@media (max-width: 640px) {
    body {
        padding: 1.2rem;
    }

    #container {
        margin-top: 20px;
        display: flex;
        justify-content: center;
        flex-direction: column;
        overflow-y: auto;
    }

    #container img {
        margin: 0 auto;
        margin-bottom: 10px;
    }

    /*  .card {
                flex: 0 0 100%;
            } */
}