@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #f3f0e9;          /* warm paper */
    --bg-soft: #ece7dc;
    --surface: #fffdf8;     /* card surface */
    --ink: #1d1c18;         /* near-black text */
    --muted: #76716a;
    --line: #e4dece;        /* hairline borders */
    --accent: #46674f;      /* sage green */
    --accent-ink: #2f4a37;
    --accent-soft: #e6ede6;
    --terracotta: #c2683f;  /* warm secondary, used in shapes */
    --sky: #cdd9e0;
    --ok: #2f7d57;
    --danger: #b84a3b;
    --radius: 20px;
    --radius-sm: 12px;
    --shadow: 0 14px 40px -18px rgba(29, 28, 24, 0.25);
    --shadow-sm: 0 6px 18px -10px rgba(29, 28, 24, 0.25);
    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    line-height: 1.6;
    background: var(--bg);
    position: relative;
    overflow-x: hidden;
}

/* Decorative soft shapes floating behind the content. */
body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.5;
    pointer-events: none;
}
body::before {
    width: 460px; height: 460px;
    top: -160px; right: -120px;
    background: radial-gradient(circle at 30% 30%, var(--accent-soft), transparent 70%),
                radial-gradient(circle at 70% 70%, #d8e4dd, transparent 70%);
}
body::after {
    width: 520px; height: 520px;
    bottom: -220px; left: -160px;
    background: radial-gradient(circle at 50% 50%, #f1ddcf, transparent 70%);
    opacity: 0.55;
}

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------------------------------------------------------------- Nav */
nav.site-nav {
    position: sticky; top: 0; z-index: 20;
    background: rgba(243, 240, 233, 0.78);
    backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--line);
}
nav.site-nav .wrap { display: flex; align-items: center; gap: 0.5rem; height: 66px; }
nav.site-nav .brand {
    font-family: var(--serif); font-weight: 600; font-size: 1.25rem;
    color: var(--ink); margin-right: auto; letter-spacing: -0.02em;
}
nav.site-nav a.link {
    color: var(--muted); font-weight: 500; font-size: 0.95rem;
    padding: 0.4rem 0.85rem; border-radius: 999px; transition: all 0.15s ease;
}
nav.site-nav a.link:hover { color: var(--ink); background: var(--bg-soft); text-decoration: none; }
nav.site-nav a.link.active { color: var(--accent-ink); background: var(--accent-soft); }
nav.site-nav a.login-btn {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px; margin-left: 0.4rem;
    border-radius: 50%; background: var(--ink); color: var(--bg);
    transition: transform 0.15s ease, background 0.15s ease;
}
nav.site-nav a.login-btn:hover { background: var(--accent); transform: translateY(-1px); text-decoration: none; }
nav.site-nav a.login-btn svg { width: 20px; height: 20px; }

/* ---------------------------------------------------------------- Hero */
.hero { padding: 5.5rem 0 3rem; text-align: center; position: relative; }
.hero .eyebrow {
    display: inline-block; font-family: var(--sans); font-size: 0.78rem;
    text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent);
    background: var(--accent-soft); padding: 0.35rem 0.9rem; border-radius: 999px; margin-bottom: 1.25rem;
}
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.04; margin: 0 0 1rem; }
.hero .subtitle { font-family: var(--sans); font-size: 1.25rem; color: var(--accent-ink); font-weight: 500; margin: 0 0 1.25rem; }
.hero .message { color: var(--muted); max-width: 620px; margin: 0 auto; white-space: pre-wrap; font-size: 1.05rem; }

/* ---------------------------------------------------------------- Sections */
section { padding: 2.5rem 0; }
section > h2 {
    font-size: 1.9rem; margin: 0 0 1.5rem; display: flex; align-items: center; gap: 0.7rem;
}
section > h2::before {
    content: ""; width: 14px; height: 14px; border-radius: 4px;
    background: var(--terracotta); transform: rotate(12deg); display: inline-block;
}

/* ---------------------------------------------------------------- Skills */
.skill-list { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.skill {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 999px; padding: 0.45rem 1rem; font-size: 0.95rem; font-weight: 500;
    box-shadow: var(--shadow-sm);
}
.skill-icon { width: 22px; height: 22px; object-fit: contain; border-radius: 5px; }
.skill-emoji { font-size: 1.15rem; line-height: 1; }
.skill.small { font-size: 0.82rem; padding: 0.28rem 0.7rem; box-shadow: none; }
.skill.small .skill-icon { width: 16px; height: 16px; }

/* Proficiency level dots */
.level-dots { display: inline-flex; align-items: center; gap: 3px; margin-left: 0.15rem; }
.level-dots .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--line); border: 1px solid var(--muted); opacity: 0.5;
}
.level-dots .dot.on { background: var(--accent); border-color: var(--accent); opacity: 1; }

/* ---------------------------------------------------------------- Cards / grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
    box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card img.thumb { width: 100%; height: 180px; object-fit: cover; background: var(--bg-soft); }
.card .body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.card h3 { margin: 0; font-size: 1.25rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.96rem; }
.card .actions { margin-top: auto; padding-top: 0.4rem; display: flex; gap: 0.9rem; align-items: center; }

/* ---------------------------------------------------------------- Experience timeline */
.exp { border-left: 2px solid var(--line); padding: 0 0 1.5rem 1.4rem; position: relative; }
.exp:last-child { padding-bottom: 0; }
.exp::before {
    content: ""; position: absolute; left: -8px; top: 5px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--surface); border: 3px solid var(--accent);
}
.exp h3 { margin: 0; font-size: 1.2rem; }
.exp .meta { color: var(--muted); font-size: 0.92rem; }
.exp p { margin: 0.4rem 0 0; white-space: pre-wrap; }

/* ---------------------------------------------------------------- Forms */
form.stack { display: grid; gap: 0.9rem; }
label { font-size: 0.88rem; color: var(--muted); font-weight: 500; display: grid; gap: 0.35rem; }
input, textarea, select {
    width: 100%; padding: 0.7rem 0.9rem; border-radius: var(--radius-sm);
    border: 1px solid var(--line); background: var(--surface); color: var(--ink);
    font: inherit; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus, select:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; min-height: 96px; }

button, .btn {
    background: var(--ink); color: var(--bg); border: none; cursor: pointer;
    padding: 0.65rem 1.4rem; border-radius: 999px; font-weight: 600; font: inherit; font-weight: 600;
    text-decoration: none; display: inline-block; transition: transform 0.15s ease, background 0.15s ease;
}
button:hover, .btn:hover { background: var(--accent); transform: translateY(-1px); text-decoration: none; }
button.secondary, .btn.secondary {
    background: transparent; color: var(--ink); border: 1px solid var(--line);
}
button.secondary:hover, .btn.secondary:hover { background: var(--bg-soft); color: var(--ink); }
button.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
button.danger:hover { background: var(--danger); color: var(--bg); }
button:disabled { opacity: 0.55; cursor: default; transform: none; }

.notice { min-height: 1.2rem; font-size: 0.9rem; }
.notice.error { color: var(--danger); }
.notice.ok { color: var(--ok); }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------------------------------------------------------------- Auth card (login) */
.auth-card {
    max-width: 400px; margin: 4rem auto; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 2.25rem; box-shadow: var(--shadow);
}
.auth-card .auth-icon {
    width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft);
    color: var(--accent-ink); display: grid; place-items: center; margin: 0 auto 1rem;
}
.auth-card .auth-icon svg { width: 28px; height: 28px; }

/* ---------------------------------------------------------------- Dashboard */
.dash-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin: 2rem 0 1rem; }
.dash-head h2 { margin: 0; font-size: 2rem; }
.tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.tab {
    background: transparent; border: 1px solid transparent; color: var(--muted);
    padding: 0.5rem 1.1rem; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 0.92rem;
    transition: all 0.15s ease; transform: none;
}
.tab:hover { background: var(--bg-soft); color: var(--ink); }
.tab.active { color: var(--bg); background: var(--ink); }
.panel { display: none; animation: fade 0.25s ease; }
.panel.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.row { display: flex; gap: 2rem; flex-wrap: wrap; align-items: flex-start; }
.row > * { flex: 1; min-width: 280px; }
.col-form { max-width: 460px; }
.col-list { max-width: 440px; }

.item {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 0.85rem 1rem; margin-bottom: 0.7rem; box-shadow: var(--shadow-sm);
}
.item .top { display: flex; justify-content: space-between; gap: 0.5rem; align-items: start; }
.item .top strong { font-size: 1.02rem; font-weight: 600; }
.item-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.item-actions button { padding: 0.3rem 0.75rem; font-size: 0.82rem; }

/* Draggable project rows */
.item.draggable { display: flex; align-items: center; gap: 0.75rem; cursor: grab; }
.item.draggable .drag-handle { color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: grab; user-select: none; }
.item.draggable .grow { flex: 1; min-width: 0; }
.item.dragging { opacity: 0.5; cursor: grabbing; border-style: dashed; border-color: var(--accent); }
.item.draggable.over-target { box-shadow: 0 0 0 2px var(--accent); }

.checks { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.checks label {
    flex-direction: row; align-items: center; gap: 0.4rem; background: var(--bg-soft);
    border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.75rem; cursor: pointer;
    color: var(--ink); font-weight: 500;
}
.checks input { width: auto; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.75rem; }
legend { color: var(--muted); padding: 0 0.4rem; }

footer.site-footer { padding: 3rem 0; text-align: center; color: var(--muted); font-size: 0.9rem; }
