/* ============================================================
   DOROBU GIT — GitHub-inspired minimal portfolio
   Font: -apple-system stack (same as GitHub)
   Accent: #1a7f37 (GitHub green)
   ============================================================ */

:root {
  --bg:        #ffffff;
  --bg-subtle: #f6f8fa;
  --bg-inset:  #f6f8fa;
  --border:    #d0d7de;
  --border-muted: #d8dee4;
  --text:      #1f2328;
  --text-muted:#57606a;
  --text-light:#6e7781;
  --accent:    #1a7f37;
  --accent-bg: #dafbe1;
  --accent-border: #2da44e;
  --link:      #0969da;
  --tag-bg:    #ddf4ff;
  --tag-text:  #0550ae;
  --tag-border:#b6e3ff;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-subtle);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

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

/* ── TOPBAR (GitHub-style header) ───────────────────────── */
.topbar {
  background: #24292f;
  border-bottom: 1px solid #30363d;
  padding: .75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.topbar-logo {
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}
.topbar-logo svg { fill: #ffffff; }
.topbar-logo:hover { color: #ffffff; text-decoration: none; }

.topbar-nav {
  display: flex;
  gap: .25rem;
  list-style: none;
  margin-left: .5rem;
}
.topbar-nav a {
  color: rgba(255,255,255,.7);
  font-size: .875rem;
  font-weight: 500;
  padding: .375rem .5rem;
  border-radius: 6px;
  text-decoration: none;
  transition: color .15s, background .15s;
}
.topbar-nav a:hover {
  color: #ffffff;
  background: rgba(255,255,255,.1);
  text-decoration: none;
}

.topbar-badge {
  margin-left: auto;
  background: var(--accent);
  color: #ffffff;
  font-size: .72rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 20px;
  letter-spacing: .02em;
  flex-shrink: 0;
}

/* ── MAIN LAYOUT ─────────────────────────────────────────── */
.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: grid;
  grid-template-columns: 296px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* ── LEFT SIDEBAR (GitHub profile panel) ───────────────── */
.sidebar {
  position: sticky;
  top: 60px;
}

.profile-avatar {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #e1e4e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.profile-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}
.profile-username {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.profile-bio {
  font-size: .875rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.btn-follow {
  display: block;
  width: 100%;
  padding: .375rem .75rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  margin-bottom: 1rem;
  text-decoration: none;
  transition: background .15s;
}
.btn-follow:hover { background: #f3f4f6; text-decoration: none; color: var(--text); }

.profile-meta {
  list-style: none;
  margin-bottom: 1rem;
}
.profile-meta li {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  color: var(--text-muted);
  padding: .2rem 0;
}
.profile-meta li svg { flex-shrink: 0; fill: var(--text-light); }
.profile-meta li a { color: var(--text-muted); }
.profile-meta li a:hover { color: var(--link); }

.profile-section-title {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .5rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: 1rem;
}
.skill-tag {
  font-size: .75rem;
  font-weight: 500;
  color: var(--tag-text);
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  border-radius: 20px;
  padding: .1rem .65rem;
}
.skill-tag.green {
  color: var(--accent);
  background: var(--accent-bg);
  border-color: #aadebc;
}

/* ── MAIN CONTENT ────────────────────────────────────────── */
.main-content { min-width: 0; }

/* Tab bar */
.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  gap: 0;
}
.tab {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: .5rem 1rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  transition: color .15s;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active {
  color: var(--text);
  border-bottom-color: #fd8c73;
}
.tab-count {
  font-size: .75rem;
  font-weight: 600;
  background: rgba(175,184,193,.2);
  color: var(--text-muted);
  padding: .1rem .45rem;
  border-radius: 20px;
}

/* Pinned / About section */
.about-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.about-box strong { color: var(--text); font-weight: 600; }
.about-box a { color: var(--link); }

/* Contribution-style header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.section-header-title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
}
.section-header-link {
  font-size: .75rem;
  color: var(--link);
}

/* Repo cards (project cards) */
.repo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.repo-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: border-color .15s;
}
.repo-card:hover { border-color: #0969da; }

.repo-card-header {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.repo-icon { color: var(--text-muted); flex-shrink: 0; }
.repo-name {
  font-size: .875rem;
  font-weight: 600;
  color: var(--link);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.repo-visibility {
  font-size: .65rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border-muted);
  border-radius: 20px;
  padding: .05rem .45rem;
  flex-shrink: 0;
}

.repo-desc {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.repo-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.repo-lang {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  color: var(--text-muted);
}
.lang-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.repo-stars {
  display: flex;
  align-items: center;
  gap: .25rem;
  font-size: .75rem;
  color: var(--text-muted);
}
.repo-tag {
  font-size: .65rem;
  font-weight: 500;
  color: var(--tag-text);
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  border-radius: 20px;
  padding: .05rem .45rem;
}
.repo-tag.green { color: var(--accent); background: var(--accent-bg); border-color: #aadebc; }
.repo-tag.purple { color: #6639ba; background: #fbefff; border-color: #d8b9f8; }
.repo-tag.orange { color: #bc4c00; background: #fff1e5; border-color: #fdb97a; }

/* Activity / Services list */
.activity-list {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 2rem;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: .875rem;
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  flex-shrink: 0;
  margin-top: .1rem;
  color: var(--text-light);
}
.activity-body { flex: 1; }
.activity-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: .15rem;
}
.activity-desc { color: var(--text-muted); font-size: .8125rem; line-height: 1.5; }

/* Contact items */
.contact-list {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.contact-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-size: .875rem;
  transition: background .1s;
}
.contact-row:last-child { border-bottom: none; }
.contact-row:hover { background: var(--bg-subtle); text-decoration: none; color: var(--link); }
.contact-row svg { flex-shrink: 0; fill: var(--text-light); }
.contact-row-label {
  font-weight: 600;
  min-width: 90px;
  color: var(--text-muted);
  font-size: .8125rem;
}
.contact-row-val { flex: 1; color: inherit; }
.contact-row-arr { margin-left: auto; color: var(--border); font-size: .75rem; }
.contact-row:hover .contact-row-arr { color: var(--link); }

/* Contribution graph placeholder */
.contrib-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}
.contrib-title {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
}
.contrib-title span { color: var(--text); font-weight: 600; }
.contrib-grid {
  display: grid;
  grid-template-columns: repeat(52, 1fr);
  gap: 2px;
}
.contrib-cell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: #ebedf0;
}
.contrib-cell.l1 { background: #9be9a8; }
.contrib-cell.l2 { background: #40c463; }
.contrib-cell.l3 { background: #30a14e; }
.contrib-cell.l4 { background: #216e39; }

/* ── ARTICLES ────────────────────────────────────────────── */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.article-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: border-color .15s;
}
.article-card:hover { border-color: var(--link); text-decoration: none; }

.article-thumb {
  width: 100%;
  aspect-ratio: 16/7;
  overflow: hidden;
  background: var(--bg-subtle);
}
.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.article-card:hover .article-thumb img { transform: scale(1.03); }

.article-thumb-placeholder {
  background: linear-gradient(135deg, #f0f3f6 0%, #dde3ea 100%);
}

.article-body {
  padding: .875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  flex: 1;
}

.article-tag {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}

.article-title {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.article-card:hover .article-title { color: var(--link); }

.article-excerpt {
  font-size: .8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.article-date {
  font-size: .75rem;
  color: var(--text-light);
  margin-top: .25rem;
}

/* Archive page */
.articles-archive {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.article-row {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 180px 1fr;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s;
}
.article-row:hover { border-color: var(--link); text-decoration: none; }
.article-row .article-thumb { aspect-ratio: auto; height: 100%; min-height: 110px; }
.article-row .article-body { padding: 1rem 1.25rem; }
.article-row:hover .article-title { color: var(--link); }

/* Single article */
.single-hero-img {
  width: 100%;
  aspect-ratio: 16/6;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  display: block;
}

.single-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.single-content {
  font-size: .9375rem;
  line-height: 1.75;
  color: var(--text);
}
.single-content h2 { font-size: 1.25rem; font-weight: 600; margin: 2rem 0 .75rem; color: var(--text); }
.single-content h3 { font-size: 1.05rem; font-weight: 600; margin: 1.5rem 0 .5rem; color: var(--text); }
.single-content p  { margin-bottom: 1rem; color: var(--text-muted); }
.single-content p strong { color: var(--text); }
.single-content ul, .single-content ol { margin: 0 0 1rem 1.5rem; color: var(--text-muted); }
.single-content li { margin-bottom: .35rem; }
.single-content pre {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  font-size: .8125rem;
  margin-bottom: 1rem;
}
.single-content code {
  font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace;
  font-size: .85em;
  background: rgba(175,184,193,.2);
  padding: .15em .35em;
  border-radius: 3px;
}
.single-content pre code { background: none; padding: 0; }
.single-content a { color: var(--link); }
.single-content blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}
.single-content img { max-width: 100%; border-radius: 6px; border: 1px solid var(--border); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .8125rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color .15s;
}
.back-link:hover { color: var(--link); text-decoration: none; }

@media (max-width: 768px) {
  .articles-grid { grid-template-columns: 1fr; }
  .article-row { grid-template-columns: 1fr; }
  .article-row .article-thumb { height: 160px; }
}

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  max-width: 1280px;
  margin: 2rem auto 0;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--border);
  font-size: .75rem;
  color: var(--text-muted);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--link); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .page-wrap {
    grid-template-columns: 1fr;
  }
  .sidebar { position: static; }
  .repo-grid { grid-template-columns: 1fr; }
  .topbar-nav { display: none; }
  .profile-avatar { width: 80px; aspect-ratio: 1; border-radius: 50%; }
}
