:root {
  --background: #07111f;
  --foreground: #eef7ff;
  --muted: #9fb1c7;
  --line: rgba(148, 163, 184, 0.22);
  --surface: rgba(12, 25, 43, 0.76);
  --surface-strong: rgba(16, 35, 59, 0.9);
  --ink: #f8fbff;
  --accent: #22d3ee;
  --accent-strong: #67e8f9;
  --warm: #fbbf24;
  --violet: #a78bfa;
  --green: #34d399;
  --shadow: rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(103, 232, 249, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 15% 8%, rgba(34, 211, 238, 0.18), transparent 30%),
    radial-gradient(circle at 78% 12%, rgba(167, 139, 250, 0.18), transparent 28%),
    radial-gradient(circle at 50% 80%, rgba(52, 211, 153, 0.1), transparent 30%),
    var(--background);
  background-attachment: fixed;
  background-size: 44px 44px, 44px 44px, auto, auto, auto, auto;
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
}

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

main {
  min-height: 100vh;
}

.hero {
  min-height: 92vh;
  padding: 24px clamp(20px, 5vw, 72px) 64px;
  background:
    linear-gradient(145deg, rgba(6, 182, 212, 0.18), transparent 38%),
    linear-gradient(225deg, rgba(167, 139, 250, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(7, 17, 31, 0.78), rgba(7, 17, 31, 0.96));
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}

.hero::before {
  background:
    radial-gradient(circle, rgba(103, 232, 249, 0.16) 1px, transparent 2px),
    linear-gradient(120deg, transparent 10%, rgba(34, 211, 238, 0.12), transparent 32%),
    linear-gradient(300deg, transparent 14%, rgba(167, 139, 250, 0.14), transparent 42%);
  background-size: 28px 28px, auto, auto;
  content: "";
  inset: 0;
  opacity: 0.72;
  pointer-events: none;
  position: absolute;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.nav {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1160px;
}

.brand {
  align-items: center;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.22);
  color: #06111f;
  display: inline-flex;
  font-weight: 800;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.nav-links {
  align-items: center;
  color: #dbeafe;
  display: flex;
  font-size: 0.95rem;
  gap: clamp(12px, 3vw, 28px);
}

.nav-links a {
  opacity: 0.88;
}

.nav-links a:hover {
  color: var(--accent-strong);
  opacity: 1;
}

.hero-grid {
  align-items: center;
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 1.03fr) minmax(320px, 0.72fr);
  margin: 0 auto;
  max-width: 1160px;
  min-height: calc(92vh - 68px);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.section-kicker,
.project-category {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  color: #ffffff;
  font-size: clamp(3.8rem, 10vw, 8rem);
  letter-spacing: 0;
  line-height: 0.9;
  margin-bottom: 24px;
  max-width: 900px;
}

h1::after {
  background: linear-gradient(90deg, var(--accent), var(--violet), var(--green));
  border-radius: 999px;
  content: "";
  display: block;
  height: 6px;
  margin-top: 22px;
  max-width: 360px;
}

h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  letter-spacing: 0;
  line-height: 1.02;
  margin-bottom: 18px;
}

h3 {
  font-size: 1.25rem;
  letter-spacing: 0;
  line-height: 1.15;
  margin-bottom: 12px;
}

.subtitle {
  color: #c8d8eb;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 650px;
}

.role-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -10px 0 28px;
}

.role-strip span {
  background: rgba(103, 232, 249, 0.1);
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 999px;
  color: #dffbff;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 9px 12px;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

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

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--violet));
  box-shadow: 0 18px 48px rgba(34, 211, 238, 0.22);
  color: #06111f;
}

.button.secondary {
  border: 1px solid var(--line);
  color: var(--ink);
}

.button.secondary:hover {
  border-color: rgba(103, 232, 249, 0.62);
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.12);
}

.signal-panel {
  backdrop-filter: blur(18px);
  background: rgba(8, 20, 36, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 90px var(--shadow);
  overflow: hidden;
}

.panel-topline {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px;
}

.panel-topline span,
.metric-row span {
  color: var(--muted);
  font-size: 0.86rem;
}

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

.metric-row div {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 18px;
}

.metric-row div:last-child {
  border-right: 0;
}

.metric-row strong {
  color: #ffffff;
  display: block;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  margin-bottom: 4px;
}

.portrait-card {
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.18), transparent 34%),
    linear-gradient(225deg, rgba(167, 139, 250, 0.18), transparent 34%),
    rgba(3, 10, 20, 0.52);
  margin: 0;
  padding: 14px 14px 0;
  position: relative;
}

.portrait-card::after {
  background: linear-gradient(90deg, var(--accent), var(--violet), var(--green));
  border-radius: 999px;
  content: "";
  height: 4px;
  left: 24px;
  position: absolute;
  right: 24px;
  top: 24px;
  z-index: 2;
}

.portrait-card img {
  aspect-ratio: 0.86;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  object-position: 54% 36%;
  width: 100%;
}

.portrait-card figcaption {
  color: #dffbff;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 14px 4px 16px;
}

.section {
  margin: 0 auto;
  max-width: 1160px;
  padding: 88px clamp(20px, 5vw, 72px);
}

.intro {
  max-width: 980px;
}

.intro p:last-child,
.contact p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.75;
}

.section-heading {
  max-width: 820px;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.skills-grid span,
.stack-list span {
  backdrop-filter: blur(10px);
  background: rgba(12, 25, 43, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-weight: 700;
  padding: 10px 14px;
}

.projects-grid,
.compact-grid,
.medical-grid,
.reviews-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 36px;
}

.project-card,
.repo-card,
.medical-card,
.review-card {
  backdrop-filter: blur(16px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.18);
  padding: 24px;
}

.project-card,
.medical-card {
  overflow: hidden;
  position: relative;
}

.project-card::before,
.medical-card::before {
  background:
    linear-gradient(180deg, rgba(3, 10, 20, 0.04), rgba(3, 10, 20, 0.64)),
    linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(167, 139, 250, 0.14)),
    var(--project-image);
  background-position: center;
  background-size: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  content: "";
  display: block;
  height: 136px;
  margin-bottom: 22px;
  position: relative;
}

.project-card::after,
.medical-card::after {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.9), rgba(167, 139, 250, 0.86));
  border-radius: 999px;
  content: "";
  height: 4px;
  left: 48px;
  opacity: 0.95;
  position: absolute;
  top: 152px;
  width: 112px;
}

.project-card:nth-child(1) { --project-image: url("https://images.unsplash.com/photo-1555949963-aa79dcee981c?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(2) { --project-image: url("https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(3) { --project-image: url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(4) { --project-image: url("https://images.unsplash.com/photo-1576091160550-2173dba999ef?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(5) { --project-image: url("https://images.unsplash.com/photo-1505751172876-fa1923c5c528?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(6) { --project-image: url("https://images.unsplash.com/photo-1582719471384-894fbb16e074?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(7) { --project-image: url("https://images.unsplash.com/photo-1579154204601-01588f351e67?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(8) { --project-image: url("https://images.unsplash.com/photo-1518152006812-edab29b069ac?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(9) { --project-image: url("https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(10) { --project-image: url("https://images.unsplash.com/photo-1535378917042-10a22c95931a?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(11) { --project-image: url("https://images.unsplash.com/photo-1498050108023-c5249f4df085?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(12) { --project-image: url("https://images.unsplash.com/photo-1576091160550-2173dba999ef?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(13) { --project-image: url("https://images.unsplash.com/photo-1576091160550-2173dba999ef?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(14) { --project-image: url("https://images.unsplash.com/photo-1505751172876-fa1923c5c528?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(15) { --project-image: url("https://images.unsplash.com/photo-1518495973542-4542c06a5843?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(16) { --project-image: url("https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(17) { --project-image: url("https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(18) { --project-image: url("https://images.unsplash.com/photo-1515879218367-8466d910aaa4?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(19) { --project-image: url("https://images.unsplash.com/photo-1518152006812-edab29b069ac?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(20) { --project-image: url("https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(21) { --project-image: url("https://images.unsplash.com/photo-1551434678-e076c223a692?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(22) { --project-image: url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=900&q=80"); }
.project-card:nth-child(23) { --project-image: url("https://images.unsplash.com/photo-1522202176988-66273c2fd55f?auto=format&fit=crop&w=900&q=80"); }

.medical-card:nth-child(1) { --project-image: url("https://images.unsplash.com/photo-1505751172876-fa1923c5c528?auto=format&fit=crop&w=900&q=80"); }
.medical-card:nth-child(2) { --project-image: url("https://images.unsplash.com/photo-1579154204601-01588f351e67?auto=format&fit=crop&w=900&q=80"); }
.medical-card:nth-child(3) { --project-image: url("https://images.unsplash.com/photo-1582719471384-894fbb16e074?auto=format&fit=crop&w=900&q=80"); }
.medical-card:nth-child(4) { --project-image: url("https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=900&q=80"); }
.medical-card:nth-child(5) { --project-image: url("https://images.unsplash.com/photo-1576091160550-2173dba999ef?auto=format&fit=crop&w=900&q=80"); }
.medical-card:nth-child(6) { --project-image: url("https://images.unsplash.com/photo-1518152006812-edab29b069ac?auto=format&fit=crop&w=900&q=80"); }

.project-card:hover,
.repo-card:hover,
.medical-card:hover,
.review-card:hover {
  border-color: rgba(103, 232, 249, 0.42);
}

.project-card {
  min-height: 548px;
}

.repo-card,
.medical-card,
.review-card {
  min-height: 210px;
}

.project-card p:not(.project-category),
.repo-card p,
.medical-card p:not(.project-category),
.review-card p,
.review-cta p {
  color: var(--muted);
  line-height: 1.65;
}

.project-card strong {
  color: var(--accent-strong);
  display: block;
  line-height: 1.45;
  margin: 18px 0;
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack-list span {
  background: rgba(103, 232, 249, 0.08);
  font-size: 0.82rem;
  padding: 7px 10px;
}

.project-link,
.text-link,
.private-label {
  color: var(--accent-strong);
  display: inline-flex;
  font-weight: 800;
  margin-top: 18px;
}

.private-label {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  color: #fde68a;
  font-size: 0.85rem;
  padding: 8px 12px;
}

.repo-card span {
  color: var(--accent-strong);
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.repo-card strong {
  display: block;
  font-size: 1.14rem;
  margin-bottom: 10px;
}

.medical-section {
  border-top: 1px solid var(--line);
  max-width: none;
  padding-left: max(clamp(20px, 5vw, 72px), calc((100vw - 1160px) / 2 + 72px));
  padding-right: max(clamp(20px, 5vw, 72px), calc((100vw - 1160px) / 2 + 72px));
  position: relative;
}

.medical-section::before {
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.1), transparent 42%),
    linear-gradient(315deg, rgba(52, 211, 153, 0.1), transparent 38%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.medical-section > * {
  margin-left: auto;
  margin-right: auto;
  max-width: 1160px;
  position: relative;
}

.section-note {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-top: 10px;
  max-width: 760px;
}

.medical-card h3 {
  min-height: 58px;
}

.reviews-section,
.experience-section {
  border-top: 1px solid var(--line);
}

.review-card p {
  font-size: 1.05rem;
  margin-bottom: 22px;
}

.review-card strong,
.review-project {
  display: block;
}

.review-project {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 6px;
}

.stars {
  color: var(--warm);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 14px;
}

.review-form {
  backdrop-filter: blur(18px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  margin-top: 34px;
  padding: 24px;
}

.field-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}

.review-form label {
  color: var(--ink);
  display: grid;
  font-weight: 800;
  gap: 8px;
}

.review-form input,
.review-form select,
.review-form textarea {
  background: rgba(3, 10, 20, 0.5);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  padding: 12px;
  width: 100%;
}

.review-form textarea {
  line-height: 1.55;
  resize: vertical;
}

.hidden-field {
  display: none;
}

.form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.form-status {
  color: var(--muted);
  margin: 0;
}

.review-cta {
  align-items: center;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-top: 18px;
  padding: 24px;
}

.timeline {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

.timeline article {
  display: grid;
  gap: 18px;
  grid-template-columns: 18px 1fr;
}

.timeline article > span {
  background: var(--accent);
  border-radius: 999px;
  height: 14px;
  margin-top: 5px;
  width: 14px;
}

.timeline p {
  color: var(--muted);
  line-height: 1.65;
}

.timeline .place {
  color: var(--ink);
  font-weight: 800;
  margin-bottom: 6px;
}

.contact {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.16), transparent 34%),
    linear-gradient(225deg, rgba(167, 139, 250, 0.16), transparent 38%),
    #050b14;
  color: #fffdf8;
  display: flex;
  gap: 32px;
  justify-content: space-between;
  padding: 64px clamp(20px, 5vw, 72px);
}

.contact > div:first-child {
  max-width: 760px;
}

.contact .section-kicker,
.contact p {
  color: #c8e7f8;
}

.contact .button.primary {
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: #06111f;
}

.contact .button.secondary {
  border-color: rgba(255, 253, 248, 0.28);
  color: #fffdf8;
}

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

  .projects-grid,
  .compact-grid,
  .medical-grid,
  .reviews-grid {
    display: grid;
    grid-auto-columns: minmax(280px, 84vw);
    grid-auto-flow: column;
    grid-template-columns: none;
    margin-left: calc(clamp(20px, 5vw, 72px) * -1);
    margin-right: calc(clamp(20px, 5vw, 72px) * -1);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 6px clamp(20px, 5vw, 72px) 18px;
    scroll-padding-inline: clamp(20px, 5vw, 72px);
    scroll-snap-type: inline mandatory;
    scrollbar-color: rgba(103, 232, 249, 0.7) rgba(255, 255, 255, 0.08);
  }

  .section:has(.projects-grid) .section-heading::after,
  .section:has(.compact-grid) .section-heading::after,
  .section:has(.medical-grid) .section-heading::after,
  .section:has(.reviews-grid) .section-heading::after {
    color: var(--accent-strong);
    content: "Swipe sideways";
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    margin-top: 8px;
    text-transform: uppercase;
  }

  .project-card,
  .repo-card,
  .medical-card,
  .review-card {
    scroll-snap-align: start;
  }

  .projects-grid::-webkit-scrollbar,
  .compact-grid::-webkit-scrollbar,
  .medical-grid::-webkit-scrollbar,
  .reviews-grid::-webkit-scrollbar {
    height: 8px;
  }

  .projects-grid::-webkit-scrollbar-thumb,
  .compact-grid::-webkit-scrollbar-thumb,
  .medical-grid::-webkit-scrollbar-thumb,
  .reviews-grid::-webkit-scrollbar-thumb {
    background: rgba(103, 232, 249, 0.62);
    border-radius: 999px;
  }

  .hero-grid {
    min-height: auto;
    padding-top: 72px;
  }

  .contact,
  .review-cta {
    align-items: flex-start;
    display: grid;
  }
}

@media (max-width: 620px) {
  .hero {
    min-height: auto;
    padding-bottom: 48px;
  }

  .nav {
    align-items: flex-start;
    gap: 18px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  h1 {
    font-size: 3.8rem;
  }

  .metric-row {
    grid-template-columns: 1fr;
  }

  .metric-row div {
    border-right: 0;
  }

  .section {
    padding-bottom: 58px;
    padding-top: 58px;
  }
}
