*, *::before, *::after { box-sizing: border-box; margin: 0; }
:root {
  --bg: #fafbff;
  --surface: #ffffff;
  --border: #e6e8f0;
  --text: #0f172a;
  --muted: #475569;
  --brand: #4f46e5;
  --brand-2: #db2777;
  --brand-3: #0d9488;
  --gradient: linear-gradient(120deg, var(--brand), var(--brand-2));
  --radius: 24px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .04), 0 24px 48px -16px rgba(15, 23, 42, .22);
}
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* nav */
.nav { position: sticky; top: 1rem; z-index: 20; padding: 0 1rem; }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: .625rem .75rem .625rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  border: 1px solid rgba(230, 232, 240, .9);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: .625rem; font-weight: 800; text-decoration: none; }
.logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--gradient); color: #fff; font-weight: 800; }
.nav ul { display: flex; gap: .25rem; padding: 0; list-style: none; }
.nav ul a { display: block; padding: .5rem 1rem; border-radius: 999px; color: var(--muted); font-weight: 500; text-decoration: none; transition: background .2s, color .2s; }
.nav ul a:hover, .nav ul a:focus-visible { background: #f1f2f9; color: var(--text); }
.nav-cta { padding: .5rem 1.125rem; border-radius: 999px; background: var(--text); color: #fff; font-weight: 600; text-decoration: none; }

/* hero */
.hero { position: relative; padding: 6rem 0 5rem; }
.hero::before {
  content: "";
  position: absolute;
  inset: -10rem 0 0;
  z-index: -1;
  background:
    radial-gradient(40rem 28rem at 10% 20%, rgba(79, 70, 229, .16), transparent 70%),
    radial-gradient(34rem 24rem at 90% 10%, rgba(219, 39, 119, .12), transparent 70%),
    radial-gradient(30rem 22rem at 70% 90%, rgba(13, 148, 136, .10), transparent 70%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: -10rem 0 0;
  z-index: -1;
  background-image: radial-gradient(rgba(15, 23, 42, .09) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.hero-grid { display: grid; gap: 4rem; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.35fr 1fr; } }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.5rem;
  padding: .375rem .875rem .375rem .625rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: .875rem;
  font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); }
h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); font-weight: 800; line-height: 1.05; letter-spacing: -.035em; }
.lead { max-width: 56ch; margin-top: 1.5rem; color: var(--muted); font-size: 1.25rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .875rem 1.5rem;
  border-radius: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 12px 28px -12px rgba(79, 70, 229, .7); }
.btn-secondary { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }

/* profile card */
.profile {
  padding: 2rem;
  border: 1px solid transparent;
  border-radius: 28px;
  /* gradient border without a z-index:-1 layer, which flashed during the reveal transform */
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(120deg, rgba(79, 70, 229, .35), rgba(219, 39, 119, .35)) border-box;
  box-shadow: var(--shadow-lg);
}
.avatar {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  box-shadow: 0 0 0 6px #fff, 0 0 0 8px #e0e7ff;
}
.profile h2 { margin-top: 1.25rem; font-size: 1.5rem; font-weight: 800; }
.profile .role { color: var(--muted); }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 1.5rem 0; padding: 0; list-style: none; }
.profile-stats li { padding: .875rem .5rem; border-radius: 14px; background: var(--bg); border: 1px solid var(--border); text-align: center; }
.profile-stats strong { display: block; font-size: 1.375rem; font-weight: 800; line-height: 1.2; }
.profile-stats span { color: var(--muted); font-size: .8125rem; }
.socials { display: flex; gap: .625rem; }
.socials a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
.socials a:hover, .socials a:focus-visible { background: var(--bg); border-color: #c7cbe0; }
.socials svg { width: 18px; height: 18px; }

/* sections */
section { padding: 6rem 0; }
.section-head { max-width: 640px; margin-bottom: 3.5rem; }
.kicker { color: var(--brand); font-size: .875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.section-head h2 { margin-top: .5rem; font-size: clamp(2rem, 4.5vw, 2.75rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.section-head p { margin-top: 1rem; color: var(--muted); font-size: 1.125rem; }

/* projects */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 1.75rem; padding: 0; list-style: none; }
.project {
  --accent: var(--brand);
  --accent-2: #818cf8;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}
.project:hover, .project:focus-within { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.cover {
  position: relative;
  padding: 1.125rem 1.25rem 0;
  background:
    radial-gradient(circle at 85% 0%, rgba(255, 255, 255, .35), transparent 50%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
}
.window {
  height: 150px;
  border-radius: 14px 14px 0 0;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 -4px 24px -8px rgba(15, 23, 42, .25);
  overflow: hidden;
}
.window-bar { display: flex; align-items: center; gap: .375rem; padding: .625rem .875rem; border-bottom: 1px solid var(--border); }
.window-bar i { width: 9px; height: 9px; border-radius: 50%; background: #e2e8f0; }
.window-bar span { margin-left: .5rem; padding: .125rem .625rem; border-radius: 6px; background: #f1f5f9; color: var(--muted); font-size: .75rem; }
.window-body { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; }
.window-body b {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
}
.lines { flex: 1; display: grid; gap: .5rem; }
.lines i { display: block; height: 9px; border-radius: 99px; background: #eef1f6; }
.lines i:first-child { width: 70%; background: color-mix(in srgb, var(--accent) 25%, #fff); }
.lines i:nth-child(2) { width: 90%; }
.lines i:nth-child(3) { width: 55%; }
.project-body { display: flex; flex-direction: column; flex: 1; padding: 1.75rem; }
.tag { align-self: flex-start; padding: .25rem .75rem; border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent); font-size: .8125rem; font-weight: 700; }
.project h3 { margin-top: .875rem; font-size: 1.625rem; font-weight: 800; letter-spacing: -.015em; }
.project .desc { margin-top: .5rem; color: var(--muted); }
.features { display: grid; gap: .5rem; margin-top: 1.25rem; padding: 0; list-style: none; font-size: .975rem; }
.features li { display: flex; gap: .625rem; }
.features li::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: .2rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='%230f172a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; padding: 0; list-style: none; }
.chips li { padding: .25rem .75rem; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); font-size: .8125rem; font-weight: 600; color: #334155; }
.project .chips { margin-bottom: 1.75rem; }
.project .link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: auto;
  padding: .875rem 1rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 8%, #fff);
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease;
}
.project .link:hover, .project .link:focus-visible { background: color-mix(in srgb, var(--accent) 15%, #fff); }
.project .link::after { content: "→"; transition: transform .2s ease; }
.project:hover .link::after, .project .link:focus-visible::after { transform: translateX(4px); }
.features-wrap { padding-top: 1.25rem; border-top: 1px dashed var(--border); margin-top: 1.25rem; }
.features-wrap .features { margin-top: 0; }

/* skills */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.skill { padding: 1.75rem; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.skill-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #eef2ff; color: var(--brand); }
.skill-icon svg { width: 24px; height: 24px; }
.skill h3 { margin-top: 1rem; font-size: 1.125rem; font-weight: 700; }
.skill .chips { margin-top: .875rem; }

/* contact */
.contact {
  position: relative;
  overflow: hidden;
  padding: 4rem 2rem;
  border-radius: 32px;
  background: var(--text);
  color: #fff;
  text-align: center;
}
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(30rem 18rem at 15% 0%, rgba(79, 70, 229, .55), transparent 70%),
    radial-gradient(26rem 16rem at 90% 100%, rgba(219, 39, 119, .45), transparent 70%);
}
.contact > * { position: relative; }
.contact h2 { font-size: clamp(2rem, 4.5vw, 2.75rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.contact p { max-width: 48ch; margin: 1rem auto 0; color: #cbd5e1; font-size: 1.125rem; }
.contact .actions { justify-content: center; }
.contact .btn { background: #fff; color: var(--text); }
.contact .btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .25); }

footer { padding: 2.5rem 0; color: var(--muted); font-size: .9375rem; }
footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
footer nav { display: flex; gap: 1.5rem; }
footer a { color: var(--text); font-weight: 600; text-decoration: none; }
footer a:hover, footer a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

/* reveal on scroll (only when JS is on, so content is never hidden without it) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

@media (max-width: 720px) {
  .nav ul { display: none; }
  .hero { padding-top: 4rem; }
  section { padding: 4.5rem 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover, .project:hover { transform: none; }
}

/* production badges */
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.live {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: .8125rem;
  font-weight: 700;
}
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
  70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.window-bar .live { margin-left: auto; padding: .125rem .55rem; font-size: .6875rem; }
.live-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: .9375rem;
}
.live-strip a { color: var(--text); font-weight: 600; text-decoration: none; }
.live-strip a:hover, .live-strip a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* language switch */
.nav-right { display: flex; align-items: center; gap: .5rem; }
.lang { padding: .5rem .75rem; border-radius: 999px; color: var(--muted); font-weight: 700; font-size: .875rem; text-decoration: none; }
.lang:hover, .lang:focus-visible { background: #f1f2f9; color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .live::before { animation: none; }
}
.contact .contact-mail { margin-top: 1.5rem; font-size: 1rem; }
.contact-mail a { color: #fff; font-weight: 600; text-underline-offset: 4px; }
