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

:root {
  /* Copilot-inspired dark theme palette */
  --bg-body: #020617;
  --bg-gradient-top: #020617;
  --bg-gradient-bottom: #020617;
  --bg-surface: #020617;
  --bg-elevated: #020617;

  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.14);
  --accent-strong: #4f46e5;
  --accent-cyan: #22d3ee;

  --border-subtle: rgba(148, 163, 184, 0.35);
  --border-strong: rgba(148, 163, 184, 0.7);

  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --text-soft: #6b7280;

  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.85);
  --shadow-card: 0 16px 40px rgba(15, 23, 42, 0.9);
  --radius-card: 18px;
  --radius-pill: 999px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #0f172a 0%, #020617 50%, #020617 100%);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 16px;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(15, 23, 42, 0.82);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav__inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.04em;
}

.nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav__links a {
  font-weight: 600;
  padding: 0.28rem 0.1rem;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.nav__links a:hover,
.nav__links a:focus-visible {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

main {
  padding: 2.4rem 0 3.4rem;
}

.hero {
  margin-bottom: 1.2rem;
}

.hero__inner {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 0% 0%, rgba(79, 70, 229, 0.55) 0%, rgba(15, 23, 42, 0.9) 45%, #020617 100%);
  border: 1px solid rgba(129, 140, 248, 0.6);
  border-radius: 26px;
  padding: 2.2rem 1.7rem;
  box-shadow: var(--shadow-soft);
}

.hero__tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent-cyan));
  color: #0b1020;
  border-radius: var(--radius-pill);
  padding: 0.22rem 0.7rem;
  font-size: 0.82rem;
  margin-bottom: 0.85rem;
}

h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  line-height: 1.24;
  margin-bottom: 0.85rem;
  letter-spacing: -0.03em;
}

.hero__sub {
  max-width: 780px;
  color: var(--text-muted);
}

.hero__cta {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.68rem 1.25rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent-cyan));
  color: #020617;
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.58);
}

.btn--primary:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 18px 38px rgba(79, 70, 229, 0.72);
  text-decoration: none;
}

.btn--ghost {
  border-color: rgba(148, 163, 184, 0.65);
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.9);
}

.btn--ghost:hover {
  background: rgba(30, 64, 175, 0.7);
  border-color: var(--accent);
  color: #e5e7eb;
  transform: translateY(-1px);
  text-decoration: none;
}

.panel {
  background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.24), rgba(15, 23, 42, 0.96));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 1.4rem;
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow-soft);
}

.section-title {
  font-size: clamp(1.35rem, 3.4vw, 1.9rem);
  margin-bottom: 0.45rem;
}

.section-sub {
  margin-bottom: 0.95rem;
  color: var(--text-muted);
}

.about-grid,
.project-grid,
.skills-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.mini-card,
.project-card,
.skill-block,
.contact-card {
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.2), #020617);
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 16px;
  padding: 1rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.project-card:hover,
.skill-block:hover,
.contact-card:hover,
.mini-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  border-color: rgba(94, 234, 212, 0.9);
}

.mini-card h3,
.project-card h3,
.skill-block h3 {
  margin-bottom: 0.4rem;
  color: #e5e7eb;
}

.project-meta {
  margin-top: 0.55rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.skill-block ul,
.skill-block ol,
.contact-card ul {
  margin-left: 1rem;
}

.skill-block li,
.contact-card li {
  margin-bottom: 0.3rem;
}

.footer {
  border-top: 1px solid var(--border-subtle);
  background: radial-gradient(circle at top, #020617, #020617);
}

.footer__inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.94rem;
}

/* Work rhythm section */

.work-rhythm {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.work-rhythm-grid {
  display: flex;
  justify-content: flex-start;
  gap: 0.35rem;
}

.work-rhythm-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.work-rhythm-cell {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: rgba(30, 64, 175, 0.35);
}

.work-rhythm-cell--level-0 {
  background: transparent;
  border-color: rgba(30, 64, 175, 0.6);
}

.work-rhythm-cell--level-1 {
  background: rgba(79, 70, 229, 0.6);
}

.work-rhythm-cell--level-2 {
  background: linear-gradient(135deg, #6366f1, #22d3ee);
}

.work-rhythm-cell--level-3 {
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.7);
}

.work-rhythm-cell--level-4 {
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.95);
}

.work-rhythm-day {
  font-size: 0.7rem;
  color: var(--text-soft);
}

.work-rhythm-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.legend-label {
  font-weight: 600;
  color: var(--text-muted);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.legend-level-0 {
  background: transparent;
  border: 1px solid rgba(30, 64, 175, 0.6);
}

.legend-level-1 {
  background: rgba(79, 70, 229, 0.6);
}

.legend-level-2 {
  background: linear-gradient(135deg, #6366f1, #22d3ee);
}

.legend-level-3 {
  background: linear-gradient(135deg, #22d3ee, #a855f7);
}

.legend-level-4 {
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.95);
}

/* Project cards – allow blurred background images via inline styles */

.project-card {
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  filter: blur(6px);
  transform: scale(1.05);
  pointer-events: none;
}

.project-card > * {
  position: relative;
  z-index: 1;
}

.project-desc {
  margin-left: 1rem;
}

@media (min-width: 700px) {
  .about-grid,
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .skills-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 980px) {
  .hero__inner,
  .panel {
    padding: 1.7rem;
  }

  .about-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* GitHub activity section */

.activity-grid {
  display: grid;
  grid-template-columns: 2.1fr 1.4fr;
  gap: 1.1rem;
}

.activity-heatmap {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.activity-heatmap-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.18rem;
}

.activity-cell {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: rgba(30, 64, 175, 0.35);
  border: 1px solid rgba(51, 65, 85, 0.9);
}

.activity-cell.level-0 {
  background: transparent;
  border-color: rgba(30, 64, 175, 0.6);
}

.activity-cell.level-1 {
  background: rgba(79, 70, 229, 0.6);
}

.activity-cell.level-2 {
  background: linear-gradient(135deg, #6366f1, #22d3ee);
}

.activity-cell.level-3 {
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.9);
}

.activity-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  font-size: 0.76rem;
  color: var(--text-soft);
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.activity-item {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.55), #020617);
  padding: 0.75rem 0.85rem;
}

.activity-item-title {
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.activity-item-meta {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.activity-status {
  font-size: 0.86rem;
  color: var(--text-muted);
}

@media (max-width: 699px) {
  .activity-grid {
    grid-template-columns: 1fr;
  }
}

/* Two-column variants for skills and contact sections */

.skills-grid--2col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-grid--2col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.social-list {
  margin-left: 1rem;
}

@media (max-width: 699px) {
  .skills-grid--2col,
  .contact-grid--2col {
    grid-template-columns: 1fr;
  }
}