:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #eef3ff;
  --text: #0f172a;
  --muted: #5b6b7a;
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --ring: #93c5fd;
  --border: #e5e7eb;
  --card-shadow: 0 10px 24px rgba(0,0,0,0.08);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --surface: #111827;
    --surface-2: #0f172a;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --primary: #60a5fa;
    --primary-600: #3b82f6;
    --ring: #60a5fa;
    --border: #1f2937;
    --card-shadow: 0 10px 24px rgba(0,0,0,0.5);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}

/* Layout helpers */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.center { text-align: center; }

/* Nav */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}
.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
nav .brand a {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.nav-links {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a.active,
.nav-links a[aria-current="true"] {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Hero */
.hero {
  text-align: center;
  padding: 72px 0 40px;
  background: radial-gradient(900px 360px at 50% -20%, rgba(37,99,235,0.12), transparent 60%), var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 780px; margin: 0 auto; }
.profile-img {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 16px;
  border: 4px solid var(--surface);
  box-shadow: var(--card-shadow);
}
h1 { margin: 8px 0 6px; font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.5rem); line-height: 1.15; }
.lead { margin: 0 0 6px; color: var(--muted); font-size: 1.05rem; }
.hero-meta { color: var(--muted); margin-top: 4px; }
.hero-links a {
  display: inline-block;
  margin: 10px 8px 0;
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}
.hero-links a:hover { text-decoration: underline; }

/* Sections */
section h2 {
  text-align: center;
  margin: 0 0 10px;
  font-size: 1.7rem;
}
.muted { color: var(--muted); text-align: center; }

/* Filters */
.filters {
  max-width: 960px;
  margin: 12px auto 24px;
  display: grid;
  grid-template-columns: 1fr 200px 200px;
  gap: 12px;
}
.filters input, .filters select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn.small { padding: 6px 10px; font-size: 0.9rem; }

/* Project Cards */
.cards {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}
.card {
  background: var(--surface);
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  text-align: left;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--primary); }
.card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}
.card p { margin: 0 0 12px; color: var(--muted); min-height: 40px; }
.card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--text);
  font-size: 0.92rem;
}
.card .links {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}
.card .links a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  background: #edf2ff;
  color: #0b3d91;
  font-weight: 700;
}
.card .links a.primary {
  background: var(--primary);
  color: #fff;
}
.card--placeholder {
  text-align: center;
  color: var(--muted);
}

/* Skills */
/* Skills icon grid */
.skills-grid {
  --grid-min: 110px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--grid-min), 1fr));
  gap: 16px;
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}
.skill-item {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.skill-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow, 0 2px 8px rgba(0,0,0,.06));
  border-color: var(--primary, #3b82f6);
}
.skill-icon {
  width: 40px;
  height: 40px;
  display: block;
  margin: 0 auto;
}
.skill-label {
  display: block;
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted, #6b7280);
}

/* Contact + Footer */
#contact p { text-align: center; }
footer {
  text-align: center;
  padding: 28px 12px 40px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
/* Icon helper for contact line */
.icon {
  display: inline-block;
  margin-right: 6px;
  font-size: 1.05em; /* keep emojis crisp */
  line-height: 1;
  vertical-align: -1px;
}

/* NoScript */
.noscript {
  max-width: 900px;
  margin: 16px auto;
  background: #fff3cd;
  color: #7a6400;
  border: 1px solid #ffe69c;
  padding: 12px 14px;
  border-radius: 10px;
}

/* Accessibility and motion */
section { scroll-margin-top: 80px; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 8px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* Responsive */
@media (max-width: 900px) {
  .filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .filters { grid-template-columns: 1fr; }
  .nav-container { flex-direction: column; gap: 8px; }
}

/* About section enhancements */
.bio {
  max-width: 780px;
  margin: 8px auto 0;
  color: var(--muted);
}

.facts-list {
  margin: 12px auto 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: center;
}
.facts-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
}

/* Buttons layout + primary variant */
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 12px;
}
.btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* LinkedIn Btn Styling */
.linkedin-btn {
  display: inline-flex;          /* logo + text alignment */
  align-items: center;           /* vertically center */
  background-color: #0077B5;     /* LinkedIn blue */
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 15px;
  transition: background-color 0.3s;
}

.linkedin-btn:hover {
  background-color: #005983;
}

footer {
  padding: 20px 0;
  background-color: #f5f5f5; /* optional */
}

footer .footer-container {
  text-align: center;
}

footer a {
  color: #0077B5;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}
