:root {
  --bg: #07070a;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-2: rgba(255, 255, 255, 0.09);
  --text: rgba(255, 255, 255, 0.95);
  --muted: rgba(255, 255, 255, 0.78);
  --border: rgba(255, 255, 255, 0.18);
  --primary: #ff4fd8;
  --primary-2: #ff2dbf;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial,
    "Noto Sans", "Liberation Sans", sans-serif;
  background:
    radial-gradient(
      1000px 500px at 20% -10%,
      rgba(255, 79, 216, 0.26),
      transparent 60%
    ),
    radial-gradient(
      900px 450px at 92% 95%,
      rgba(255, 45, 191, 0.18),
      transparent 55%
    ),
    repeating-linear-gradient(
      to right,
      rgba(0, 0, 0, 0.35) 0,
      rgba(0, 0, 0, 0.35) 1px,
      transparent 1px,
      transparent 96px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.28) 0,
      rgba(0, 0, 0, 0.28) 1px,
      transparent 1px,
      transparent 96px
    ),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: #fff;
  color: #000;
  padding: 10px 12px;
  border-radius: 10px;
  z-index: 999;
}
.skip-link:focus {
  left: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(0, 0, 0, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 50;
  transition: background 160ms ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}
.brand-text {
  min-width: 0;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(
    135deg,
    rgba(255, 79, 216, 0.45),
    rgba(255, 45, 191, 0.35)
  );
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.brand-name {
  font-weight: 700;
  letter-spacing: 0.2px;
  overflow-wrap: anywhere;
}
.brand-role {
  font-size: 0.9rem;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: 160ms ease;
}
.nav a:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}
.nav-cta {
  color: #08111f !important;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent !important;
  transition:
    transform 160ms ease,
    filter 160ms ease,
    box-shadow 160ms ease;
}
.nav-cta:hover {
  color: #08111f !important;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)) !important;
  border-color: transparent !important;
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 10px 30px rgba(255, 45, 191, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.hero {
  padding: 44px 0 26px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 18px;
  align-items: start;
}

.hero-title {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 3rem);
  letter-spacing: -0.02em;
  font-weight: 700;
  line-height: 1.12;
}
.hero-title-name {
  display: block;
  font-size: 0.45em;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-bottom: 0.35em;
}
.hero-title-role {
  display: block;
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 10px;
}

.lead.tech-line {
  margin-top: 14px;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 650;
  color: #08111f;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 14px 48px rgba(255, 45, 191, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: 160ms ease;
}
.btn:hover {
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-block {
  width: 100%;
}

.hero-meta {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.meta-item {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  padding: 12px 14px;
  border-radius: 14px;
}
.meta-label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}
.meta-value {
  font-weight: 650;
}

.hero-card {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
.hero-card h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.section {
  padding: 34px 0;
}
.section-head {
  margin-bottom: 18px;
}
.section-head h2 {
  margin: 0;
  font-size: 1.6rem;
}

.section-head-sub {
  margin-top: 36px;
  margin-bottom: 14px;
}

.h3-section {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.expertise-card {
  margin-top: 18px;
}

.expertise-card > .bullets:first-child {
  margin-top: 0;
}

.bullets-tight li {
  margin: 6px 0;
}

.code-sample {
  margin-top: 12px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35);
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}

.code-sample code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  white-space: pre;
}

.card {
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.23);
  border-radius: var(--radius);
  padding: 16px 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

/* Reset UA h3 margins inside cards — avoids large gap above titles */
.card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.project-top h3,
.experience-top h3 {
  margin-bottom: 0;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 45, 191, 0.35);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.45),
    0 0 0 4px rgba(255, 45, 191, 0.08);
}

.tag {
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.tag:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 45, 191, 0.35);
}

.muted {
  color: var(--muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.grid-2 .card {
  height: 100%;
}

/* Natural card heights — avoids a short column stretching with empty space */
.grid-2-top {
  align-items: start;
}

.grid-2-top .card {
  height: auto;
}

/* System design + API: tighter vertical rhythm */
.card-design > h3 {
  margin-bottom: 0.4rem;
}

.card-design .muted + .code-sample {
  margin-top: 0.5rem;
}

.design-outcomes {
  margin-top: 14px;
}

.design-outcomes > .bullets {
  margin-top: 0.35rem;
}

/* Kill default <p> margins inside cards (was adding large gaps under h3) */
.card p {
  margin: 0 0 0.65rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.card > h3 + p,
.card > .project-top + p,
.card > .experience-top + p {
  margin-top: 0;
}

.card > h3 + .bullets {
  margin-top: 0.35rem;
}

section#system-design {
  padding-bottom: 34px;
}

.checklist {
  margin: 10px 0 0;
  padding-left: 18px;
}
.checklist li {
  color: var(--muted);
  margin: 8px 0;
}

.bullets {
  margin: 10px 0 0;
  padding-left: 18px;
}
.bullets li {
  color: var(--muted);
  margin: 8px 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.09);
  color: var(--muted);
  font-weight: 600;
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.experience-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.experience-item {
  height: 100%;
}

.experience-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.project-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.project h3 {
  margin: 0;
}

.pill {
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  white-space: nowrap;
}

.project-links {
  display: flex;
  gap: 16px;
  margin-top: 14px;
}

.link {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-weight: 650;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}
.link:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.55);
}

.form {
  margin-top: 12px;
}

.field {
  display: block;
  margin: 12px 0;
}

.field span {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 8px;
}

input,
textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input:focus,
textarea:focus {
  border-color: rgba(255, 45, 191, 0.7);
  box-shadow: 0 0 0 4px rgba(255, 45, 191, 0.15);
}

.site-footer {
  padding: 26px 0 calc(40px + env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animate section appearance on initial load */
main > section {
  animation: revealUp 650ms ease both;
}

main > section:nth-child(1) {
  animation-delay: 0ms;
}
main > section:nth-child(2) {
  animation-delay: 90ms;
}
main > section:nth-child(3) {
  animation-delay: 180ms;
}
main > section:nth-child(4) {
  animation-delay: 270ms;
}
main > section:nth-child(5) {
  animation-delay: 360ms;
}
main > section:nth-child(6) {
  animation-delay: 450ms;
}
main > section:nth-child(7) {
  animation-delay: 540ms;
}
main > section:nth-child(8) {
  animation-delay: 720ms;
}

@media (prefers-reduced-motion: reduce) {
  main > section {
    animation: none !important;
  }
  .card,
  .tag {
    transition: none !important;
  }
  .card:hover,
  .tag:hover {
    transform: none !important;
    box-shadow: none !important;
  }
}

@media (max-width: 980px) {
  body {
    background-attachment: scroll;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }
  .projects {
    grid-template-columns: 1fr;
  }
  .experience-items {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .brand {
    min-width: unset;
  }
  .experience-top,
  .project-top {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .pill {
    white-space: normal;
    text-align: center;
    max-width: 100%;
  }
  .nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }
  .nav a {
    padding: 8px 10px;
    font-size: 0.9rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 600px) {
  .container {
    width: min(1100px, calc(100% - 1.25rem));
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 0;
    gap: 12px;
  }

  .nav {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    margin: 0 -0.125rem;
    padding: 4px 0.125rem 8px;
    gap: 6px;
  }

  .nav a {
    flex: 0 0 auto;
  }

  .hero {
    padding: 28px 0 20px;
  }

  .lead.tech-line {
    overflow-wrap: anywhere;
  }

  .btn {
    min-height: 48px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .card p,
  .card .link {
    overflow-wrap: anywhere;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .code-sample {
    font-size: 0.8rem;
    padding: 12px;
  }
}

/* 16px+ inputs avoid iOS zoom on focus */
@media (max-width: 480px) {
  input,
  textarea {
    font-size: 1rem;
  }
}

