/* ==========================================================================
   MAHESH NANDIGAM — PERSONAL PORTFOLIO
   Brand Feel: Neat, Sharp, Minimal, Single Vertical Flow.
   Strict Rules: Pure Solid Theme (Black / White). No Gradients. No Emojis.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');
@import url('https://cdn.jsdelivr.net/gh/devicons/devicon@latest/devicon.min.css');

:root {
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Black Theme (Default) — Pure solid obsidian */
  --bg-page: #0a0a0c;
  --bg-card: #111114;
  --bg-card-hover: #17171c;
  --bg-badge: #16161b;
  --bg-overlay: rgba(10, 10, 12, 0.88);

  --text-primary: #f5f5f7;
  --text-secondary: #a0a0a8;
  --text-muted: #6e6e77;
  --text-dim: #4a4a53;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-strong: rgba(255, 255, 255, 0.32);
  --border-frame: rgba(255, 255, 255, 0.12);

  --accent-green: #10b981;
  --accent-green-bg: rgba(16, 185, 129, 0.12);

  /* GitHub Heatmap (Dark) */
  --gh-level-0: #141418;
  --gh-level-1: #0e3d2f;
  --gh-level-2: #056648;
  --gh-level-3: #10b981;
  --gh-level-4: #34d399;

  --max-width: 700px;
  --transition-fast: 0.16s ease;
  --transition-smooth: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* White Theme (Clean, Crisp, Sharp) */
[data-theme="light"] {
  --bg-page: #fafafa;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f3f5;
  --bg-badge: #f0f0f3;
  --bg-overlay: rgba(250, 250, 250, 0.9);

  --text-primary: #0a0a0c;
  --text-secondary: #4a4a53;
  --text-muted: #6e6e77;
  --text-dim: #9ca3af;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(0, 0, 0, 0.18);
  --border-strong: rgba(0, 0, 0, 0.36);
  --border-frame: rgba(0, 0, 0, 0.10);

  --accent-green: #059669;
  --accent-green-bg: rgba(5, 150, 105, 0.1);

  /* GitHub Heatmap (Light) */
  --gh-level-0: #e5e7eb;
  --gh-level-1: #9be9a8;
  --gh-level-2: #40c463;
  --gh-level-3: #30a14e;
  --gh-level-4: #216e39;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
  font-size: 14px;
  background-color: var(--bg-page);
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Framed Container with Subtle Left & Right Separator Lines */
.page-wrapper {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 28px 90px;
  position: relative;
  min-height: 100vh;
  border-left: 1px solid var(--border-frame);
  border-right: 1px solid var(--border-frame);
}

/* Header */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 38px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  position: sticky;
  top: 16px;
  z-index: 50;
}

.brand-logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-switch-group {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  background: var(--bg-badge);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  gap: 2px;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
  user-select: none;
}

.theme-toggle-btn svg {
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
}

.theme-toggle-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-medium);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Section Boundary with Technical Crosshairs */
.section-boundary {
  position: relative;
  margin: 38px -28px 20px;
  padding: 16px 28px 0;
}

.section-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--border-frame);
  opacity: 1;
}

.cross-l, .cross-r {
  position: absolute;
  top: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1;
  user-select: none;
}

.cross-l { left: 0; transform: translate(-50%, -50%); }
.cross-r { right: 0; transform: translate(50%, -50%); }

.section-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.section-sub {
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-weight: 400;
}

/* Hero Section */
.hero-block {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-profile-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-frame {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border-medium);
  background: var(--bg-card);
  flex-shrink: 0;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-name-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hero-name {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1.2;
}

.hero-meta {
  font-size: 13.5px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-top: 2px;
}

.hero-pitch {
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
}

.hero-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-bullet {
  position: relative;
  padding-left: 16px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.hero-bullet::before {
  content: "•";
  position: absolute;
  left: 2px;
  color: var(--text-muted);
}

/* Action Buttons */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 6px;
  background: var(--text-primary);
  color: var(--bg-page);
  font-size: 12.5px;
  font-weight: 600;
  transition: opacity var(--transition-fast);
}

.btn-primary:hover {
  opacity: 0.88;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}

/* Socials Row */
/* Profile Groups (Dev, CP, Creator) */
.profile-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.profile-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.profile-group-label {
  font-size: 10.5px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.profile-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.social-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
}

.social-pill svg {
  width: 14.5px;
  height: 14.5px;
  flex-shrink: 0;
  fill: currentColor;
}

.social-pill svg.atcoder-icon {
  width: 17px;
  height: 17px;
}

/* Projects Section */
.projects-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.project-item:hover {
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
}

.project-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.project-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.project-action-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-ext-link,
.project-github-link {
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.project-ext-link:hover,
.project-github-link:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
  background: var(--bg-card);
}

.project-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.project-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.project-tag {
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-badge);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* GitHub Heatmap Card */
.gh-card {
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gh-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.gh-bold-val {
  font-weight: 600;
  color: var(--text-primary);
}

.gh-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

.gh-scroll::-webkit-scrollbar {
  height: 5px;
}

.gh-scroll::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 3px;
}

.gh-grid {
  display: grid;
  grid-template-rows: repeat(7, 10px);
  grid-auto-flow: column;
  grid-auto-columns: 10px;
  gap: 3px;
  width: max-content;
}

.gh-cell {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background-color: var(--gh-level-0);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.gh-cell:hover {
  transform: scale(1.3);
  z-index: 10;
}

.gh-cell[data-level="0"] { background-color: var(--gh-level-0); }
.gh-cell[data-level="1"] { background-color: var(--gh-level-1); }
.gh-cell[data-level="2"] { background-color: var(--gh-level-2); }
.gh-cell[data-level="3"] { background-color: var(--gh-level-3); }
.gh-cell[data-level="4"] { background-color: var(--gh-level-4); }

.gh-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 11px;
  color: var(--text-dim);
}

.gh-legend {
  display: flex;
  gap: 3px;
  align-items: center;
}

.gh-legend-box {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.gh-tooltip {
  position: fixed;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, -120%);
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

/* Skills Section (Delta Batch Apna College Stack with Symbols) */
.skills-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skill-cat-title {
  font-size: 11.5px;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.skill-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.skill-pill:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.skill-pill i {
  font-size: 14px;
}

/* Blogs Section */
.blogs-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.blog-item:hover {
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
}

.blog-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.blog-heading {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.blog-snippet {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Footer */
.site-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
}

.footer-nav {
  display: flex;
  gap: 16px;
}

.footer-nav a {
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-nav a:hover {
  color: var(--text-primary);
}

.footer-quote-box {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.footer-quote {
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.footer-author {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
}



/* Toast Notice */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12.5px;
  z-index: 2000;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-smooth);
  pointer-events: none;
}

.toast-msg.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Layout Adjustments */
@media (max-width: 720px) {
  .page-wrapper {
    padding: 24px 18px 70px;
    border-left: none;
    border-right: none;
  }

  .section-boundary {
    margin: 32px -18px 18px;
    padding: 16px 18px 0;
  }
}
