:root {
  --bg: #0f1419;
  --bg-soft: #1a1f2e;
  --surface: #16192b;
  --surface-2: #1e2235;
  --text: #e8ecf1;
  --muted: #8b92a1;
  --line: #2a3142;
  --brand: #60a5fa;
  --brand-dark: #3b82f6;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(96, 165, 250, 0.08), transparent 36%),
    radial-gradient(circle at 95% 0%, rgba(96, 165, 250, 0.06), transparent 42%),
    linear-gradient(180deg, var(--bg), #0d111a 30%, #0a0f17 100%);
  line-height: 1.65;
}

.container { width: min(100% - 2rem, var(--max)); margin: 0 auto; }

.top-socials {
  border-bottom: 1px solid var(--line);
  background: rgba(15, 20, 25, 0.82);
  backdrop-filter: blur(7px);
}

.top-socials .container {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.pill {
  text-decoration: none;
  color: var(--brand);
  font-weight: 600;
  font-size: 0.82rem;
  border: 1px solid #3b4556;
  border-radius: 999px;
  padding: 0.28rem 0.64rem;
  background: #1a2332;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.pill:hover {
  transform: translateY(-2px);
  border-color: #4a5568;
  box-shadow: 0 8px 18px rgba(96, 165, 250, 0.12);
}

header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 20, 25, 0.86);
  backdrop-filter: blur(10px);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  text-decoration: none;
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 0.01em;
}

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

.links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.4rem 0.68rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.links a:hover, .links a.active {
  border-color: #3b4556;
  color: var(--brand);
  background: #1a2332;
}

main { min-height: calc(100vh - 188px); }
section { padding: 4.8rem 0; animation: enter .7s ease both; }

.hero { padding-top: 5.3rem; }

.hero-simple {
  text-align: center;
  max-width: 820px;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 3.7rem);
  line-height: 1.08;
  margin: 0 0 1rem;
}

h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
}

.lead, .subtitle { color: var(--muted); margin: 0; }

.cta { margin-top: 1.2rem; display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  border-radius: 11px;
  padding: 0.68rem 0.95rem;
  border: 1px solid #3b4556;
  color: var(--brand);
  background: #1a2332;
  transition: transform .23s ease, box-shadow .23s ease, background .23s ease;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 9px 20px rgba(96, 165, 250, 0.2); }

.btn.primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(130deg, #60a5fa, var(--brand-dark));
}

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
}

.meta-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.62rem; }
.meta-list li { color: var(--muted); font-size: 0.95rem; }
.meta-list strong { color: var(--text); display: block; margin-bottom: 0.08rem; }

.grid {
  margin-top: 1.3rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project { transition: transform .25s ease, box-shadow .25s ease; }
.project:hover { transform: translateY(-5px); box-shadow: 0 26px 42px rgba(96, 165, 250, 0.15); }

.project h3 { margin: 0 0 0.5rem; }
.project p { margin: 0 0 0.8rem; color: var(--muted); font-size: 0.94rem; }

.featured-grid .project h3 { margin: 0 0 0.5rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.43rem; }
.chip {
  font-size: 0.76rem;
  border-radius: 999px;
  padding: 0.24rem 0.58rem;
  color: #a8d5ff;
  background: #1e3a5f;
  border: 1px solid #2a4a7c;
}

.project-links { margin-top: 0.86rem; }
.project-links a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.page-hero {
  padding-top: 4.8rem;
  text-align: center;
}

.page-hero h1 { margin-inline: auto; max-width: 18ch; }
.page-hero p { margin: 0 auto; max-width: 70ch; color: var(--muted); }

.single-col { max-width: 860px; margin: 0 auto; }

.contact-grid {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.8rem;
}

.contact-grid a {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.82rem 0.95rem;
  background: #1a1f2e;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  transition: transform .22s ease, box-shadow .22s ease;
}

.contact-grid a:hover { transform: translateY(-3px); box-shadow: 0 14px 24px rgba(96, 165, 250, 0.12); }

footer {
  border-top: 1px solid var(--line);
  padding: 1.1rem 0 1.9rem;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

@keyframes enter {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Focus Cards on Homepage */
.focus-grid {
  margin-top: 1.3rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.focus-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.2rem;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  transition: transform .25s ease, box-shadow .25s ease;
}

.focus-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(96, 165, 250, 0.1);
}

.focus-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  color: var(--brand);
}

.focus-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Featured Projects on Homepage */
.featured-grid {
  margin-top: 1.3rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.featured-grid .project { padding: 1.2rem; }

/* Project Sections */
.project-section {
  margin-bottom: 3rem;
}

.category-title {
  margin: 0 0 1.2rem;
  font-size: 1.3rem;
  color: var(--brand);
  font-weight: 700;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--line);
}

/* Projects Table Layout */
.projects-table {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.2rem;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.2rem;
  align-items: start;
  transition: transform .25s ease, box-shadow .25s ease;
}

.project-row:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(96, 165, 250, 0.1);
}

.project-row h4 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--text);
}

.project-row p {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.project-meta .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.43rem;
}

/* Skill Highlights on About Page */
.skill-highlight {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.2rem;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  transition: transform .25s ease, box-shadow .25s ease;
}

.skill-highlight:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 38px rgba(96, 165, 250, 0.12);
}

.skill-highlight h3 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
  color: var(--brand);
}

.skill-highlight p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Approach List */
.approach-list {
  margin: 1.3rem 0 0;
  padding: 0 0 0 1.5rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.approach-list li {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.approach-list strong {
  color: var(--text);
}

/* Tech Grid */
.tech-grid {
  margin-top: 1.3rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tech-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.tech-group h3 {
  margin: 0 0 0.6rem;
  color: var(--brand);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
}

.tech-group p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .hero-grid, .grid, .skills-grid, .focus-grid, .featured-grid, .tech-grid { grid-template-columns: 1fr; }
  .project-row { grid-template-columns: 1fr; }
}

@media (max-width: 740px) {
  nav { flex-direction: column; align-items: flex-start; }
  .hero { padding-top: 4.6rem; }
  section { padding: 3.8rem 0; }
  .top-socials .container { justify-content: flex-start; }
  .cta { justify-content: flex-start; }
}
