:root {
  --bg: #050b14;
  --bg-2: #08111f;
  --surface: #0d1b2f;
  --surface-2: #10243e;
  --card: rgba(16, 36, 62, 0.78);
  --text: #f4f8ff;
  --muted: #a8b8cc;
  --soft: #74869d;
  --accent: #38bdf8;
  --accent-2: #2563eb;
  --accent-glow: rgba(56, 189, 248, 0.28);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(56, 189, 248, 0.35);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 22px;
  --max: 1180px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 34rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 30rem),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

a {
  color: inherit;
  text-decoration: none;
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 11, 20, 0.76);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  width: min(var(--max), 92%);
  margin: 0 auto;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 22px var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.45rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 650;
  transition: 0.18s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cv {
  padding: 0.62rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--accent) !important;
  background: rgba(56, 189, 248, 0.08);
}

.nav-cv:hover {
  background: rgba(56, 189, 248, 0.14);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.16);
}

.menu-toggle {
  display: none;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 1.4rem;
  cursor: pointer;
}

.section {
  width: min(var(--max), 92%);
  margin: 0 auto;
  padding: 7.5rem 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  align-items: center;
  gap: 4rem;
  min-height: calc(100vh - 78px);
  padding-top: 3rem;
}

.eyebrow {
  color: var(--accent);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  margin-bottom: 1.1rem;
}

.hero h1 {
  max-width: 850px;
  font-size: clamp(3.1rem, 6.4vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.075em;
  margin-bottom: 1.6rem;
}

.hero h1 span {
  color: var(--accent);
}

.hero-text {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 735px;
  margin-bottom: 2.1rem;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.25rem;
  border-radius: 999px;
  font-weight: 850;
  font-size: 0.92rem;
  transition: 0.2s ease;
  cursor: pointer;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  color: #02111f;
  box-shadow: 0 14px 35px rgba(56, 189, 248, 0.24);
  border: none;
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(56, 189, 248, 0.34);
}

.secondary-btn {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.secondary-btn:hover {
  border-color: var(--border-strong);
  color: var(--accent);
  transform: translateY(-3px);
}

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

.hero-links a {
  color: var(--soft);
  font-size: 0.9rem;
  font-weight: 800;
}

.hero-links a:hover {
  color: var(--accent);
}

.hero-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(56, 189, 248, 0.16), rgba(16, 36, 62, 0.76)),
    rgba(16, 36, 62, 0.78);
  border: 1px solid var(--border-strong);
  border-radius: 30px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -80px -80px auto auto;
  width: 190px;
  height: 190px;
  background: var(--accent-glow);
  border-radius: 50%;
  filter: blur(35px);
}

/* .profile-placeholder {
  width: 104px;
  height: 104px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  color: #02111f;
  display: grid;
  place-items: center;
  font-size: 2.25rem;
  font-weight: 1000;
  margin-bottom: 1.4rem;
  box-shadow: 0 18px 45px rgba(56, 189, 248, 0.28);
} */

.profile-photo-wrap {
  width: 118px;
  height: 118px;
  border-radius: 30px;
  padding: 4px;
  background: linear-gradient(135deg, #38bdf8, #60a5fa, #8b5cf6);
  margin-bottom: 1.4rem;
  box-shadow: 0 18px 45px rgba(56, 189, 248, 0.28);
}

.profile-photo {
  width: 100%;
  height: 100%;
  border-radius: 26px;
  object-fit: cover;
  display: block;
}

.hero-card h2 {
  font-size: 1.45rem;
  margin-bottom: 0.25rem;
}

.hero-card p {
  color: var(--muted);
}

.quick-stats {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.6rem;
}

.quick-stats div {
  padding: 1rem;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border);
}

.quick-stats strong {
  display: block;
  font-size: 1.3rem;
  color: var(--accent);
  line-height: 1.1;
}

.quick-stats span {
  color: var(--muted);
  font-size: 0.82rem;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 3.2rem;
}

.section-heading h2 {
  font-size: clamp(2.25rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.section-subtitle {
  color: var(--muted);
  max-width: 760px;
  margin-top: 1rem;
  font-size: 1rem;
}

.alt-section {
  width: 100%;
  max-width: none;
  background:
    linear-gradient(180deg, rgba(8, 17, 31, 0.96), rgba(13, 27, 47, 0.94));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-left: 4%;
  padding-right: 4%;
}

.alt-section > .section-heading,
.alt-section > .skills-grid,
.alt-section > .projects-grid,
.alt-section > .project-filters {
  width: min(var(--max), 100%);
  margin-left: auto;
  margin-right: auto;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.2rem;
}

.about-grid > div {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.45rem;
}

.about-grid p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.skills-grid,
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

/* Shared card style */
.skill-card,
.project-card,
.focus-card,
.experience-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.45rem;
  transition: 0.2s ease;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
}

.skill-card:hover,
.project-card:hover,
.focus-card:hover,
.experience-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  background: rgba(16, 36, 62, 0.94);
}

/* Skill cards */
.skill-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 1.6rem;
}

.skill-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--skill-gradient);
  opacity: 0.12;
  pointer-events: none;
}

.skill-card::after {
  content: "";
  position: absolute;
  right: -35px;
  bottom: -35px;
  width: 120px;
  height: 120px;
  background: var(--skill-gradient);
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.22;
}

.skill-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 1.1rem;
  background: var(--skill-gradient);
  box-shadow: 0 14px 34px var(--skill-glow);
  position: relative;
  z-index: 2;
}

.skill-card h3,
.skill-card p {
  position: relative;
  z-index: 2;
}

.skill-card h3 {
  color: var(--skill-title);
  font-size: 1.18rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.skill-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Project/focus heading styles */
.project-card h3,
.focus-card h3 {
  margin-bottom: 0.8rem;
  font-size: 1.13rem;
  letter-spacing: -0.02em;
}

.project-card p,
.focus-card p,
.experience-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Individual skill colours */
.frontend-skill {
  --skill-gradient: linear-gradient(135deg, #38bdf8, #2563eb);
  --skill-glow: rgba(56, 189, 248, 0.28);
  --skill-title: #7dd3fc;
}

.backend-skill {
  --skill-gradient: linear-gradient(135deg, #a855f7, #6366f1);
  --skill-glow: rgba(168, 85, 247, 0.28);
  --skill-title: #c084fc;
}

.cloud-skill {
  --skill-gradient: linear-gradient(135deg, #22c55e, #14b8a6);
  --skill-glow: rgba(34, 197, 94, 0.28);
  --skill-title: #86efac;
}

.database-skill {
  --skill-gradient: linear-gradient(135deg, #f97316, #facc15);
  --skill-glow: rgba(249, 115, 22, 0.28);
  --skill-title: #fdba74;
}

.testing-skill {
  --skill-gradient: linear-gradient(135deg, #ec4899, #f43f5e);
  --skill-glow: rgba(236, 72, 153, 0.28);
  --skill-title: #f9a8d4;
}

.ai-skill {
  --skill-gradient: linear-gradient(135deg, #06b6d4, #8b5cf6);
  --skill-glow: rgba(139, 92, 246, 0.28);
  --skill-title: #67e8f9;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.focus-card span {
  display: inline-flex;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 900;
  margin-bottom: 1rem;
}

.experience-list {
  display: grid;
  gap: 1.3rem;
}

.experience-card {
  padding: 1.7rem;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.experience-header h3 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.timeline-date {
  display: inline-flex;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.company {
  color: var(--text) !important;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.experience-points,
.project-highlights {
  margin: 1rem 0 1.2rem;
  padding-left: 1.1rem;
  color: var(--muted);
}

.experience-points li,
.project-highlights li {
  margin-bottom: 0.45rem;
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tech-pills span {
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.16);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.project-filters {
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  font-weight: 800;
  transition: 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  color: #02111f;
  background: var(--accent);
  border-color: var(--accent);
}

.project-card {
  min-height: 340px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.project-card.hide {
  display: none;
}

.project-card::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 160px;
  height: 160px;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 50%;
  filter: blur(25px);
}

.project-tag {
  width: fit-content;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 900;
  margin-bottom: 0.95rem;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.14);
  position: relative;
  z-index: 2;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: auto;
  padding-top: 1.2rem;
  position: relative;
  z-index: 2;
}

.project-links a {
  color: var(--accent);
  font-weight: 900;
  font-size: 0.86rem;
}

.project-links a:hover {
  text-decoration: underline;
}

.recruiter-card {
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(16, 36, 62, 0.78));
  border: 1px solid var(--border-strong);
  border-radius: 30px;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 2rem;
  align-items: center;
  box-shadow: var(--shadow);
}

.recruiter-card h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin-bottom: 1rem;
}

.recruiter-card p {
  color: var(--muted);
}

.recruiter-actions {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.copy-message {
  display: none;
  color: var(--accent) !important;
  font-weight: 800;
  font-size: 0.9rem;
  text-align: center;
}

.copy-message.show {
  display: block;
}

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

.contact-section .section-heading {
  margin-left: auto;
  margin-right: auto;
}

.contact-text {
  max-width: 720px;
  margin: 0 auto 2rem;
  color: var(--muted);
}

.contact-actions {
  justify-content: center;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 2.2rem 4%;
  text-align: center;
  color: var(--soft);
  background: rgba(5, 11, 20, 0.9);
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  color: #02111f;
  font-size: 1.15rem;
  font-weight: 1000;
  cursor: pointer;
  display: none;
  box-shadow: 0 16px 40px rgba(56, 189, 248, 0.24);
}

.back-to-top.show {
  display: block;
}

@media (max-width: 980px) {
  .hero,
  .about-grid,
  .recruiter-card {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-card {
    max-width: 520px;
  }

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

  .experience-header {
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    top: 78px;
    right: 4%;
    left: 4%;
    background: rgba(13, 27, 47, 0.98);
    border: 1px solid var(--border);
    border-radius: 20px;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.2rem;
    display: none;
    box-shadow: var(--shadow);
  }

  .nav-links.active {
    display: flex;
  }

  .section {
    padding: 5rem 0;
  }

  .skills-grid,
  .projects-grid,
  .focus-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-card {
    width: 100%;
  }

  .project-card {
    min-height: auto;
  }
}

.profiles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.profile-link-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  transition: 0.2s ease;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
}

.profile-link-card:hover {
  transform: translateY(-5px);
  border-color: var(--profile-border);
  background: rgba(16, 36, 62, 0.94);
}

.profile-link-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--profile-gradient);
  opacity: 0.12;
  pointer-events: none;
}

.profile-link-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 140px;
  height: 140px;
  background: var(--profile-gradient);
  border-radius: 50%;
  filter: blur(22px);
  opacity: 0.22;
}

.profile-link-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  background: var(--profile-gradient);
  box-shadow: 0 14px 34px var(--profile-glow);
  margin-bottom: 1.1rem;
  position: relative;
  z-index: 2;
}

.profile-link-card h3,
.profile-link-card p,
.profile-link-card a {
  position: relative;
  z-index: 2;
}

.profile-link-card h3 {
  color: var(--profile-title);
  font-size: 1.18rem;
  margin-bottom: 0.75rem;
}

.profile-link-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.profile-link-btn {
  margin-top: auto;
  padding-top: 1.3rem;
  color: var(--profile-title);
  font-weight: 900;
  font-size: 0.9rem;
}

.profile-link-btn:hover {
  text-decoration: underline;
}

.codestats-card {
  --profile-gradient: linear-gradient(135deg, #22c55e, #84cc16);
  --profile-glow: rgba(34, 197, 94, 0.25);
  --profile-title: #86efac;
  --profile-border: rgba(34, 197, 94, 0.45);
}

.stackoverflow-card {
  --profile-gradient: linear-gradient(135deg, #f97316, #facc15);
  --profile-glow: rgba(249, 115, 22, 0.25);
  --profile-title: #fdba74;
  --profile-border: rgba(249, 115, 22, 0.45);
}

.github-card-custom {
  --profile-gradient: linear-gradient(135deg, #38bdf8, #6366f1);
  --profile-glow: rgba(56, 189, 248, 0.25);
  --profile-title: #7dd3fc;
  --profile-border: rgba(56, 189, 248, 0.45);
}

@media (max-width: 980px) {
  .profiles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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