/*
Theme Name: Sharaf Portfolio
Theme URI: https://example.com
Author: Sharaf
Description: A minimal personal portfolio theme with an avatar, bio, projects, blog links and a contact form.
Version: 2.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: sharaf-portfolio
*/

:root {
  --bg: #ffffff;
  --fg: #171717;
  --muted: #737373;
  --line: #ececec;
  --soft: #f2f2f2;
  --btn-bg: #171717;
  --btn-fg: #ffffff;
}
:root[data-theme="dark"] {
  --bg: #0d0d0d;
  --fg: #f2f2f2;
  --muted: #8f8f8f;
  --line: #232323;
  --soft: #181818;
  --btn-bg: #f2f2f2;
  --btn-fg: #0d0d0d;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 14px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 460px; margin: 0 auto; padding: 48px 20px 40px; }
a { color: inherit; text-decoration: none; }

.top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.theme {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--fg); cursor: pointer; display: grid; place-items: center; padding: 0;
}
svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.hero { margin-top: 48px; }
.avatar {
  width: 56px; height: 56px; border-radius: 8px; background: var(--soft); color: var(--muted);
  display: grid; place-items: center; object-fit: cover;
}
.avatar svg { width: 20px; height: 20px; }
h1 { font-size: 20px; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; margin: 22px 0 14px; max-width: 340px; }
.bio { color: var(--muted); max-width: 330px; margin: 0 0 14px; }
.bio b { color: var(--fg); font-weight: 500; }
.meta { font-size: 12px; color: var(--muted); }
.meta b { color: var(--fg); font-weight: 500; }

.section { margin-top: 56px; }
.head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.head h2 { margin: 0; font-size: 13px; font-weight: 600; }
.head span { font-size: 12px; color: var(--muted); }

.row { display: flex; gap: 12px; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .t { font-weight: 600; font-size: 13px; }
.row .d { font-size: 12px; color: var(--muted); max-width: 260px; margin-top: 2px; }
.row .tag { font-size: 12px; color: var(--muted); white-space: nowrap; }
a.row:hover .t { text-decoration: underline; }
.thumb {
  width: 38px; height: 38px; flex: none; border-radius: 6px; background: var(--soft); color: var(--muted);
  display: grid; place-items: center;
}
.post { display: flex; gap: 12px; flex: 1; }

.box { background: var(--soft); border-radius: 8px; padding: 18px; margin-top: 56px; }
.box h2 { margin: 0 0 2px; font-size: 13px; font-weight: 600; }
.box p { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
form { display: grid; gap: 8px; }
input, textarea {
  font: inherit; font-size: 12px; color: var(--fg); background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; width: 100%;
}
input:focus, textarea:focus { outline: 1px solid var(--fg); }
textarea { min-height: 90px; resize: vertical; }
button.send {
  justify-self: start; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-fg); border: 0; border-radius: 6px; padding: 9px 16px;
}
button.send:disabled { opacity: .6; cursor: default; }
#status { margin: 4px 0 0; min-height: 1.4em; }
.hp { position: absolute; left: -9999px; }

footer { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
footer nav { display: flex; gap: 14px; }
footer a:hover { color: var(--fg); }

.empty-row { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.empty-row strong { color: var(--fg); font-weight: 500; }
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.content-page { padding-top: 8px; }
.content-page h1 { max-width: none; margin-top: 48px; }
.entry-content { color: var(--fg); font-size: 15px; }
.entry-content img, .post-image { max-width: 100%; height: auto; border-radius: 8px; }
.entry-content a { text-decoration: underline; }
.post-header { margin-top: 48px; }
.post-header h1 { margin-top: 8px; }
.post-image { margin-top: 16px; width: 100%; }
footer { clear: both; }
