/* ============================================================
   Personal Website + Journal — Md Arif Rabbani
   Change the colours below and the whole site updates.
   ============================================================ */
:root {
  --bg: #0b0d12;
  --bg-soft: #11141b;
  --card: #161a23;
  --card-2: #1b2029;
  --border: #252b37;
  --text: #ebeef4;
  --muted: #9aa3b4;
  --accent: #ff7a1a;
  --accent-2: #ffb25e;
  --radius: 18px;
  --max: 1140px;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Lora", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans); background: var(--bg); color: var(--text);
  line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }

body::before {
  content: ""; position: fixed; top: -200px; right: -150px; width: 640px; height: 640px;
  background: radial-gradient(circle, rgba(255,122,26,.16), transparent 65%);
  pointer-events: none; z-index: -1;
}

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,13,18,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 16px; }
.logo { font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: .95rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #111; font-weight: 800;
}
.logo span.dot { color: var(--accent); }
.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a {
  padding: 8px 16px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: .95rem; transition: .2s;
}
.nav-links a:hover { color: var(--text); background: var(--card); }
.nav-links a.active { color: #111; background: var(--accent); }
.menu-btn {
  display: none; background: none; border: 1px solid var(--border); color: var(--text);
  width: 42px; height: 42px; border-radius: 12px; font-size: 1.2rem; cursor: pointer;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 999px;
  font-weight: 600; transition: .25s; border: 1px solid transparent; cursor: pointer; font-family: inherit; font-size: .95rem;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #111; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255,122,26,.35); }
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- common ---------- */
section { padding: 70px 0; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; }
.section-head { margin-bottom: 36px; display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -.02em; line-height: 1.2; margin-top: 6px; }
.section-head p { color: var(--muted); margin-top: 10px; max-width: 560px; }
.grad { background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(255,122,26,.12); color: var(--accent-2); font-size: .82rem; font-weight: 600;
  border: 1px solid rgba(255,122,26,.3);
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* ---------- hero ---------- */
.hero { padding: 90px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); line-height: 1.08; letter-spacing: -.03em; margin: 20px 0; font-weight: 800; }
.hero .lead { color: var(--muted); font-size: 1.12rem; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

.photo-wrap { position: relative; justify-self: center; }
.photo {
  width: min(350px, 78vw); aspect-ratio: 4/5; border-radius: 28px; object-fit: cover;
  background: linear-gradient(160deg, #2a2f3d, #161a23); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 5rem; font-weight: 800; color: var(--accent);
}
.photo-wrap::after {
  content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: 28px;
  border: 2px solid var(--accent); z-index: -1; opacity: .45;
}
.float-card {
  position: absolute; left: -34px; bottom: 34px; background: var(--card); border: 1px solid var(--border);
  padding: 14px 18px; border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,.45);
}
.float-card strong { display: block; font-size: 1.35rem; color: var(--accent); line-height: 1.2; }
.float-card small { color: var(--muted); }

/* ---------- socials ---------- */
.socials { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.social {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--border); transition: .25s;
}
.social svg { width: 19px; height: 19px; fill: var(--text); transition: .25s; }
.social:hover { transform: translateY(-3px); border-color: var(--accent); }
.social:hover svg { fill: var(--accent); }

/* ---------- stats & cards ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.stat strong { font-size: 2.1rem; font-weight: 800; display: block; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .9rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
  transition: .3s; position: relative; overflow: hidden;
}
.card:hover { border-color: rgba(255,122,26,.45); }
.card .icon {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem;
  background: rgba(255,122,26,.12); margin-bottom: 18px;
}
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .95rem; }

/* ---------- journal cards (home) ---------- */
.j-card { display: flex; flex-direction: column; padding: 0; }
.j-card:hover { transform: translateY(-5px); }
.j-cover { height: 150px; display: grid; place-items: center; font-size: 3rem; }
.j-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.j-meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: .8rem; margin-bottom: 8px; flex-wrap: wrap; }
.j-meta .cat { color: var(--accent); font-weight: 700; }
.j-card h3 { font-family: var(--serif); font-size: 1.3rem; line-height: 1.35; font-weight: 600; }
.j-card p { margin-top: 8px; }
.j-card .read { margin-top: auto; padding-top: 16px; color: var(--accent); font-weight: 600; font-size: .9rem; }

/* ---------- journal page ---------- */
.page-hero { padding: 80px 0 30px; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -.03em; line-height: 1.12; margin-top: 8px; }
.page-hero p { color: var(--muted); max-width: 620px; margin-top: 14px; font-size: 1.08rem; }

.toolbar { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 36px; }
.search {
  flex: 1; min-width: 220px; background: var(--card); border: 1px solid var(--border); color: var(--text);
  padding: 12px 18px; border-radius: 999px; font-family: inherit; font-size: .95rem; outline: none;
}
.search:focus { border-color: var(--accent); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--card); border: 1px solid var(--border); color: var(--muted); padding: 8px 16px;
  border-radius: 999px; cursor: pointer; font-family: inherit; font-size: .88rem; transition: .2s;
}
.chip.active, .chip:hover { background: var(--accent); color: #111; border-color: var(--accent); }

.month { margin-bottom: 44px; }
.month-title { font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700;
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.month-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.entry-row {
  display: grid; grid-template-columns: 78px 1fr auto; gap: 22px; align-items: center;
  padding: 20px 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card);
  margin-bottom: 12px; transition: .25s;
}
.entry-row:hover { border-color: rgba(255,122,26,.5); transform: translateX(4px); }
.date-box { text-align: center; border-right: 1px solid var(--border); padding-right: 18px; }
.date-box b { display: block; font-size: 1.9rem; line-height: 1; font-weight: 800; }
.date-box small { color: var(--accent); font-weight: 700; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.entry-row h3 { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; line-height: 1.35; }
.entry-row p { color: var(--muted); font-size: .93rem; margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.entry-emoji { font-size: 2rem; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* ---------- single entry ---------- */
.entry-head { padding: 70px 0 30px; text-align: center; }
.entry-head .cover { font-size: 3.4rem; margin-bottom: 14px; }
.entry-head h1 { font-family: var(--serif); font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.2; font-weight: 600; margin: 12px 0 16px; }
.entry-head .j-meta { justify-content: center; font-size: .9rem; }
.mood { padding: 3px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); }

.prose { font-family: var(--serif); font-size: 1.16rem; line-height: 1.9; color: #dfe3ea; padding-bottom: 30px; }
.prose > * + * { margin-top: 1.25em; }
.prose > p:first-child::first-letter {
  float: left; font-size: 3.6em; line-height: .9; padding: 6px 10px 0 0; color: var(--accent); font-weight: 700;
}
.prose h2 { font-family: var(--sans); font-size: 1.5rem; letter-spacing: -.01em; margin-top: 1.8em; color: var(--text); }
.prose h3 { font-family: var(--sans); font-size: 1.2rem; margin-top: 1.5em; color: var(--text); }
.prose blockquote {
  border-left: 3px solid var(--accent); padding: 6px 0 6px 22px; font-style: italic; color: var(--text); font-size: 1.25rem;
}
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose a { color: var(--accent); text-decoration: underline; }
.prose img { border-radius: 14px; border: 1px solid var(--border); }
.prose strong { color: var(--text); }
.prose hr { border: none; height: 1px; background: var(--border); margin: 2em 0; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: .8rem; padding: 4px 12px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--muted); }

.author-box {
  display: flex; gap: 18px; align-items: center; padding: 24px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--border); margin-top: 30px;
}
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #111; display: grid; place-items: center; font-weight: 800; }
.author-box p { color: var(--muted); font-size: .92rem; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; }
.pager a { padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); transition: .25s; }
.pager a:hover { border-color: var(--accent); }
.pager small { color: var(--muted); display: block; }
.pager strong { font-family: var(--serif); font-weight: 600; }
.pager .next { text-align: right; }

.progress { position: fixed; top: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); z-index: 60; width: 0; }

/* ---------- about ---------- */
.about-intro { display: grid; grid-template-columns: 300px 1fr; gap: 50px; align-items: center; }
.about-intro .photo { width: 100%; }
.two-col { display: grid; grid-template-columns: 1fr 1.4fr; gap: 50px; }
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.t-item { position: relative; margin-bottom: 22px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.t-item::before {
  content: ""; position: absolute; left: -30px; top: 26px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
}
.t-date { color: var(--accent); font-weight: 600; font-size: .85rem; }
.t-item h3 { font-size: 1.12rem; margin: 2px 0; }
.t-item .org { opacity: .85; font-weight: 500; }
.t-item p { color: var(--muted); margin-top: 8px; font-size: .94rem; }
.t-item .tags { margin-top: 12px; }

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.contact-item { display: flex; gap: 14px; align-items: center; }
.contact-item .icon { margin: 0; flex-shrink: 0; }
.contact-item small { color: var(--muted); display: block; font-size: .8rem; }
.contact-item b { font-weight: 600; font-size: .95rem; word-break: break-word; }

/* quote / cta */
.quote {
  text-align: center; padding: 56px 40px; border-radius: 26px;
  background: linear-gradient(135deg, rgba(255,122,26,.16), rgba(255,178,94,.05)); border: 1px solid rgba(255,122,26,.32);
}
.quote blockquote { font-family: var(--serif); font-size: clamp(1.3rem, 2.6vw, 1.8rem); font-style: italic; line-height: 1.5; max-width: 760px; margin: 0 auto; }
.quote cite { display: block; margin-top: 14px; color: var(--muted); font-style: normal; font-size: .95rem; }
.quote .btn { margin-top: 26px; }

/* ---------- writer tool ---------- */
.writer { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.field input, .field textarea, .field select {
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); border-radius: 12px;
  padding: 11px 14px; font-family: inherit; font-size: .95rem; outline: none; width: 100%;
}
.field textarea { min-height: 280px; resize: vertical; font-family: var(--serif); line-height: 1.7; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.code-out { background: #07080b; border: 1px solid var(--border); border-radius: 12px; padding: 16px; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .8rem; color: #c8d0dc; white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto; }
.help { font-size: .85rem; color: var(--muted); }
.help code { background: var(--bg-soft); padding: 1px 6px; border-radius: 6px; color: var(--accent-2); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 44px 0 34px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.footer h4 { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.footer ul { list-style: none; }
.footer li a { color: var(--muted); font-size: .94rem; line-height: 2; }
.footer li a:hover { color: var(--accent); }
.footer .socials { margin-top: 16px; }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 30px; padding-top: 20px; color: var(--muted); font-size: .85rem;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: .8s cubic-bezier(.2,.7,.2,1); }
.reveal.show { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .two-col, .about-intro, .writer { grid-template-columns: 1fr; }
  .about-intro .photo { max-width: 280px; }
  .grid-3, .contact-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .photo-wrap { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .menu-btn { display: block; }
  .nav-links {
    position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; padding: 14px 16px;
    background: var(--bg-soft); border-bottom: 1px solid var(--border); display: none;
  }
  .nav-links.open { display: flex; }
  .grid-3, .grid-2, .contact-grid, .row-3 { grid-template-columns: 1fr; }
  .hero { padding-top: 46px; }
  .float-card { left: 0; }
  .entry-row { grid-template-columns: 62px 1fr; gap: 16px; padding: 16px; }
  .entry-emoji { display: none; }
  .date-box { padding-right: 14px; }
  .date-box b { font-size: 1.5rem; }
  .pager { grid-template-columns: 1fr; }
  .prose { font-size: 1.08rem; }
  .quote { padding: 40px 22px; }
}
