/* ============================================================
   Laman Web Peribadi — gaya utama
   Palet: kertas hangat + dakwat gelap + aksen hijau
   ============================================================ */

:root {
    --paper:      #f7f5f0;
    --paper-2:    #ffffff;
    --ink:        #16181d;
    --ink-soft:   #4d5259;
    --ink-faint:  #8a8f97;
    --line:       #e3ded4;
    --accent:     #0b6e4f;
    --accent-2:   #b45309;
    --radius:     14px;
    --shadow:     0 1px 2px rgba(22,24,29,.05), 0 8px 24px -12px rgba(22,24,29,.18);
    --serif:      Georgia, "Iowan Old Style", "Times New Roman", serif;
    --sans:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono:       ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.wrap { width: min(1080px, 92vw); margin-inline: auto; }

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

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1.05em; }

/* ---------------- Kepala ---------------- */
.site-head {
    border-bottom: 1px solid var(--line);
    background: rgba(247,245,240,.9);
    backdrop-filter: saturate(140%) blur(8px);
    position: sticky; top: 0; z-index: 20;
}
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
    display: grid; place-items: center;
    width: 40px; height: 40px; border-radius: 11px;
    background: var(--accent); color: #fff;
    font-family: var(--serif); font-size: 1.3rem;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: 1.05rem; }
.brand-text small { color: var(--ink-faint); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.nav { display: flex; gap: .3rem; flex-wrap: wrap; }
.nav-link {
    padding: .45rem .85rem; border-radius: 999px;
    color: var(--ink-soft); font-size: .94rem; font-weight: 500;
}
.nav-link:hover { background: #ece7dd; color: var(--ink); text-decoration: none; }
.nav-link.is-active { background: var(--ink); color: var(--paper); }

/* ---------------- Utama ---------------- */
.main { padding: 3rem 0 4rem; }

.hero { display: grid; grid-template-columns: 1.35fr .65fr; gap: 2.5rem; align-items: center; margin-bottom: 3.5rem; }
.hero-kicker { font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .8rem; }
.hero-lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.5rem; }

.btn { display: inline-block; padding: .7rem 1.3rem; border-radius: 999px; font-weight: 600; font-size: .95rem; border: 1px solid transparent; cursor: pointer; font-family: var(--sans); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #095a40; text-decoration: none; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--paper-2); }
.btn-ghost:hover { border-color: var(--ink-faint); text-decoration: none; }
.btn-small { padding: .4rem .85rem; font-size: .85rem; }

.portrait {
    aspect-ratio: 4/5; border-radius: var(--radius);
    background:
        radial-gradient(circle at 30% 25%, rgba(11,110,79,.22), transparent 55%),
        radial-gradient(circle at 75% 80%, rgba(180,83,9,.18), transparent 55%),
        var(--paper-2);
    border: 1px solid var(--line);
    display: grid; place-items: center;
    font-family: var(--serif); font-size: 4.5rem; color: var(--accent);
    box-shadow: var(--shadow);
}
.portrait small { display: block; font-family: var(--sans); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-top: .5rem; text-align: center; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 3rem 0 1.4rem; border-top: 1px solid var(--line); padding-top: 1.6rem; }
.section-head h2 { margin: 0; }
.section-head a { font-size: .92rem; font-weight: 600; }

.grid { display: grid; gap: 1.3rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
    background: var(--paper-2); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow);
    display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .45rem; }
.card p { color: var(--ink-soft); font-size: .96rem; }
.card .card-top { display: flex; align-items: center; gap: .7rem; margin-bottom: .9rem; }
.card-dot { width: 12px; height: 12px; border-radius: 4px; background: var(--accent); }
.card-foot { margin-top: auto; padding-top: 1rem; display: flex; gap: 1rem; font-size: .88rem; font-weight: 600; }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .2rem 0 1rem; }
.tag { font-family: var(--mono); font-size: .74rem; padding: .22rem .55rem; border-radius: 6px; background: #eee9df; color: var(--ink-soft); }

.post-list { display: grid; gap: .2rem; }
.post-item { padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.post-item:last-child { border-bottom: 0; }
.post-item h3 { margin: 0 0 .25rem; }
.post-item h3 a { color: var(--ink); }
.post-meta { font-family: var(--mono); font-size: .78rem; color: var(--ink-faint); letter-spacing: .04em; }
.post-item p { margin: .4rem 0 0; color: var(--ink-soft); font-size: .97rem; }

.prose { max-width: 68ch; }
.prose p, .prose li { color: #2c3037; }
.prose h2 { margin-top: 2rem; }
.prose blockquote { margin: 1.5rem 0; padding-left: 1.1rem; border-left: 3px solid var(--accent); color: var(--ink-soft); font-style: italic; }
.prose code { font-family: var(--mono); font-size: .9em; background: #ece7dd; padding: .1rem .35rem; border-radius: 5px; }

.panel { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 1.3rem; }

.notice { border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1.6rem; font-size: .95rem; border: 1px solid; }
.notice-warn { background: #fdf6e7; border-color: #ecd9ad; color: #6b4c0c; }
.notice-ok   { background: #eaf6f0; border-color: #b7dcc9; color: #0b5c42; }
.notice-err  { background: #fdeeee; border-color: #ecc3c3; color: #8a2020; }

/* ---------------- Borang ---------------- */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.field input, .field textarea {
    width: 100%; padding: .7rem .85rem; font: inherit;
    border: 1px solid var(--line); border-radius: 10px; background: #fdfcfa; color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: 2px solid rgba(11,110,79,.35); border-color: var(--accent); }
.field textarea { min-height: 150px; resize: vertical; }
.field-error { color: #a32626; font-size: .85rem; margin-top: .3rem; }
.honeypot { position: absolute; left: -9999px; }

.kv { display: grid; grid-template-columns: 130px 1fr; gap: .4rem 1rem; font-size: .95rem; }
.kv dt { color: var(--ink-faint); }
.kv dd { margin: 0; }

/* ---------------- Jadual (admin) ---------------- */
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.badge { font-size: .72rem; font-family: var(--mono); padding: .18rem .5rem; border-radius: 999px; background: #eee9df; color: var(--ink-soft); }
.badge-new { background: var(--accent); color: #fff; }

/* ---------------- Pengaki ---------------- */
.site-foot { border-top: 1px solid var(--line); background: #f1ede5; margin-top: 3rem; }
.foot-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding: 2.4rem 0 1.6rem; }
.foot-col { display: flex; flex-direction: column; gap: .35rem; font-size: .93rem; }
.foot-col p { margin: .2rem 0 0; color: var(--ink-soft); max-width: 34ch; }
.foot-label { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .35rem; }
.foot-col a { color: var(--ink-soft); }
.foot-col a:hover { color: var(--accent); }
.foot-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem 0 1.6rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-faint); }

/* ---------------- Responsif ---------------- */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
    .portrait { max-width: 280px; margin-inline: auto; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .foot-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    body { font-size: 16px; }
    .main { padding: 2rem 0 3rem; }
    .head-inner { flex-direction: column; align-items: flex-start; }
    .foot-inner { grid-template-columns: 1fr; }
    .kv { grid-template-columns: 1fr; }
}
