:root{
  --bg-0: #0b0b0b;
  --bg-1: #0f0f12;
  --muted: #bfc6cf;
  --accent: #6a5acd;
  --accent-2: #00c6ff;
  --card-bg: rgba(255,255,255,0.04);
}

*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(1200px 600px at 10% 10%, rgba(106,90,205,0.03), transparent), linear-gradient(180deg, var(--bg-0), var(--bg-1));
  color: #eaeaea;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========= Navbar ========= */

header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 10px 6%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(11,11,11,0.55);
  backdrop-filter: blur(6px);
  transition: box-shadow 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

header.scrolled{
  box-shadow: 0 6px 18px rgba(2,6,23,0.6);
  background: rgba(11,11,11,0.78);
}

/* Header logo styling */
/* header title removed - nav centered */

nav a {
  color: var(--muted);
  margin: 0 14px;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  padding: 8px 10px;
  border-radius: 6px;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: #6a5acd;
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

nav a.active {
  color: var(--accent-2);
}

nav a.active::after {
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* ========= Hero ========= */
.hero {
  text-align: center;
  padding: 40px 6% 56px 6%;
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero h3 {
  font-weight: 500;
  color: var(--muted);
  margin-top: 6px;
}

/* ========= Sections ========= */
section {
  padding: 60px 6%;
}

/* Page container to control width and centering */
.container{
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* Small tweak: reduce top gap between header and main on wide screens */
@media (min-width: 1100px){
  .container{padding-top:6px}
}

h2 {
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  margin-bottom: 22px;
  text-align: center;
  position: relative;
}

h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  margin: 10px auto 0;
  background: #6a5acd;
  border-radius: 2px;
}

/* ========= Cards ========= */
.card-container {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start; /* don't stretch cards to row height */
}

.card {
  background: var(--card-bg);
  padding: 14px 16px;
  border-radius: 12px;
  backdrop-filter: blur(6px);
  transition: transform 0.32s cubic-bezier(.2,.9,.2,1), box-shadow 0.32s;
  align-self: start; /* ensure card height fits content */
  min-height: 90px; /* compact default height */
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(2,6,23,0.6);
}

/* Tighter typography inside cards */
.card h3{ font-size: 1rem; margin-bottom: 8px; }
.card p{ color: var(--muted); font-size: 0.95rem; margin: 0; }

/* Make education cards a bit narrower on large screens */
@media (min-width: 1000px){
  #education .card-container{ grid-template-columns: repeat(3, 1fr); gap: 22px; }
  #education .card{ min-height: 110px; padding: 16px 18px; }
}

/* Reveal animation helper */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ========= Footer ========= */
footer {
  text-align: center;
  padding: 28px 6%;
  border-top: 1px solid rgba(255,255,255,0.04);
}

footer a {
  margin: 0 15px;
  color: #aaa;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #6a5acd;
}