:root {
  --bg: #f7fbff;
  --bg-soft: #edf6ff;
  --text: #15314b;
  --muted: #5d7891;
  --primary: #4c9fff;
  --primary-dark: #2679da;
  --white: #ffffff;
  --border: rgba(76, 159, 255, 0.16);
  --shadow: 0 18px 45px rgba(18, 73, 124, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 35%, #eef7ff 100%);
  color: var(--text);
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  background: radial-gradient(circle at top right, rgba(76, 159, 255, 0.22), transparent 25%),
    linear-gradient(135deg, #ffffff 0%, #eef7ff 60%, #e3f1ff 100%);
  padding-bottom: 3rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  background-color: var(--white);
  z-index: 1000;
  box-shadow: var(--shadow);
}

.brand {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.nav-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.hero-content {
  min-height: 78vh;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0 1rem;
}

.eyebrow,
.section-title p,
.meta,
.note {
  color: var(--muted);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  margin: 0.3rem 0 1rem;
  line-height: 1.05;
}

h1 span {
  color: var(--primary-dark);
}

.lead {
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 640px;
}

.hero-buttons,
.contact-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.3rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 12px 24px rgba(76, 159, 255, 0.22);
}

.btn-secondary {
  background: white;
  color: var(--primary-dark);
  border: 1px solid var(--border);
}

/* Ensure GitHub button matches btn-primary style but with black theme */
.btn.github {
  background-color: #000;
  color: #fff;
  font-weight: 600;
  border: 1px solid #000;
  border-radius: 5px;
  padding: 0.5rem 1rem;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s, color 0.3s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn.github:hover {
  background-color: #333;
  color: #fff;
}

.hero-card,
.card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 24px;
  padding: 1.6rem;
  position: relative;
  backdrop-filter: blur(10px);
}

.hero-card {
  min-height: 280px;
  overflow: hidden;
}

.glow {
  position: absolute;
  inset: -30px auto auto -20px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(76, 159, 255, 0.35), transparent 70%);
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(236, 246, 255, 0.7), rgba(247, 251, 255, 0.7));
}

.section-title {
  margin-bottom: 1.8rem;
}

.section-title p {
  margin: 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.section-title h2 {
  margin: 0.5rem 0 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.grid {
  display: grid;
  gap: 1.25rem;
}

.grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.skill-card h3,
.timeline-item h3,
.card h3,
.hero-card h2 {
  margin-top: 0;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.item-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.contact-card {
  text-align: center;
}

.footer {
  padding: 1.7rem 0 2.5rem;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero-content,
  .grid.three,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .hero-content {
    min-height: auto;
    padding-top: 1.5rem;
  }

  .nav {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 1.1rem, 1100px);
  }

  .card,
  .hero-card {
    padding: 1.2rem;
    border-radius: 18px;
  }

  .btn {
    width: 100%;
  }
}

/* Sidebar navigation styling */
.nav.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 250px;
  background-color: var(--white);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  padding: 1rem;
  z-index: 1000;
}

.nav.sidebar .brand {
  margin-bottom: 1rem; /* Ensure spacing below the logo */
}

.nav.sidebar .nav-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.nav.sidebar .nav-links a {
  font-size: 1.2rem;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s;
}

.nav.sidebar .nav-links a:hover {
  background-color: var(--primary);
  color: var(--white);
}

/* Position the logo at the top of the sidebar */
.nav.sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* Align items to the top */
  gap: 2rem; /* Maintain spacing between the logo and menu */
  padding-top: 1rem; /* Add some padding at the top */
}

/* Top navigation bar styling */
.nav.topbar {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  box-shadow: var(--shadow);
  z-index: 1000;
}

.nav.topbar .nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav.topbar .nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}
