:root {
  --bg: #0e1120;
  --bg-2: #141830;
  --card: rgba(22, 26, 46, 0.72);
  --card-solid: #161a2e;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f4fa;
  --muted: #a3a9bf;
  --faint: #6d7390;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --cyan: #22d3ee;
  --green: #10b981;
  --grad: linear-gradient(120deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
  --radius: 18px;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 8px; }

/* Ambient background: soft colour glows + faint stars */
.bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 420px at 30% 18%, rgba(59, 130, 246, 0.16), transparent 70%),
    radial-gradient(560px 460px at 72% 22%, rgba(236, 72, 153, 0.16), transparent 70%),
    radial-gradient(700px 500px at 60% 92%, rgba(34, 211, 238, 0.10), transparent 70%),
    radial-gradient(1px 1px at 12% 30%, rgba(255,255,255,0.5), transparent 2px),
    radial-gradient(1px 1px at 82% 12%, rgba(255,255,255,0.4), transparent 2px),
    radial-gradient(1px 1px at 46% 64%, rgba(255,255,255,0.35), transparent 2px),
    radial-gradient(1px 1px at 92% 58%, rgba(255,255,255,0.45), transparent 2px),
    radial-gradient(1px 1px at 22% 86%, rgba(255,255,255,0.35), transparent 2px),
    radial-gradient(1px 1px at 66% 42%, rgba(255,255,255,0.3), transparent 2px),
    var(--bg);
}

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* Header */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 17, 32, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px; background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: #fff; letter-spacing: -0.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 17px; }
.brand-text span { font-size: 12px; color: var(--muted); }
.nav-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 26px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 0 26px; font-size: 15px; }
.nav-links a { text-decoration: none; padding: 8px 0; color: var(--text); opacity: 0.86; }
.nav-links a:hover { opacity: 1; }
.lang { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; font-size: 12px; font-weight: 700; }
.lang a { text-decoration: none; padding: 5px 9px; border-radius: 7px; color: var(--muted); }
.lang a[aria-current="page"] { background: rgba(255,255,255,0.08); color: var(--text); }
.lang a:not([aria-current]):hover { color: var(--text); }
.btn-grad {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 15px;
  padding: 12px 22px; border-radius: 12px; border: 0;
  box-shadow: 0 10px 30px -10px rgba(139, 92, 246, 0.6);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-grad:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -10px rgba(236, 72, 153, 0.6); color: #fff; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  background: rgba(255,255,255,0.03); color: var(--text); font-weight: 700; font-size: 15px;
  padding: 12px 22px; border-radius: 12px; border: 1px solid var(--border-strong);
  transition: background .15s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); }
.btn-lg { padding: 16px 30px; font-size: 17px; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 48px; padding: 72px 0 88px; }
.hero-text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.status {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.03); font-size: 14px;
}
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(59,130,246,0.2); }
h1 { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.greet { font-size: clamp(24px, 3vw, 34px); font-weight: 400; color: var(--faint); letter-spacing: -0.01em; }
.name { font-size: clamp(52px, 8vw, 96px); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; }
.role { margin: 0; font-size: clamp(22px, 2.6vw, 32px); font-weight: 700; letter-spacing: -0.01em; }
.role .typed { background: linear-gradient(90deg, #3b82f6, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 28px rgba(59,130,246,0.35); }
.role .caret { display: inline-block; width: 3px; height: 0.95em; margin-left: 4px; vertical-align: -0.1em; background: #3b82f6; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lead { margin: 0; max-width: 560px; color: var(--muted); font-size: 18px; line-height: 1.7; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 4px 0 0; padding: 0; }
.pills li { padding: 7px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; color: #fff; }
.p-java { background: linear-gradient(135deg, #f97316, #f59e0b); }
.p-spring { background: linear-gradient(135deg, #16a34a, #22c55e); }
.p-react { background: linear-gradient(135deg, #0ea5e9, #22d3ee); }
.p-ts { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.p-docker { background: linear-gradient(135deg, #0284c7, #38bdf8); }
.p-claude { background: linear-gradient(135deg, #c2410c, #d97757); }
.btns { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.follow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-top: 8px; }
.follow a {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: rgba(255,255,255,0.04); display: flex; align-items: center; justify-content: center;
  transition: background .15s ease, border-color .15s ease;
}
.follow a:hover { background: rgba(255,255,255,0.1); border-color: var(--border-strong); }
.follow img { width: 18px; height: 18px; object-fit: contain; }
.invert { filter: invert(1); }

/* Hero visual */
.visual { min-width: 0; position: relative; display: flex; justify-content: center; padding: 150px 0 56px; }
.photo-ring {
  position: relative; width: min(400px, 82vw); aspect-ratio: 1 / 1; border-radius: 50%;
  padding: 6px; background: conic-gradient(from 200deg, #3b82f6, #8b5cf6, #ec4899, #8b5cf6, #3b82f6);
  box-shadow: 0 30px 80px -20px rgba(139, 92, 246, 0.5);
}
.photo-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #e9e6e5; }
.badge {
  position: absolute; width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,0.5);
}
.badge svg { width: 22px; height: 22px; }
.badge.b1 { left: 6%; top: 46%; border-radius: 50%; background: var(--green); }
.badge.b2 { right: 4%; bottom: 30%; background: var(--violet); transform: rotate(12deg); }
.badge.b3 { left: 18%; bottom: 10%; background: var(--blue); transform: rotate(-14deg); }
.code {
  position: absolute; right: 0; top: 0; width: min(350px, 92%);
  background: rgba(18, 21, 38, 0.86); border: 1px solid var(--border); border-radius: 16px;
  padding: 16px 18px; font-family: var(--mono); font-size: 13px; line-height: 1.75;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px -24px rgba(0,0,0,0.8);
}
.code .dots { display: flex; gap: 7px; margin-bottom: 8px; }
.code .dots span { width: 11px; height: 11px; border-radius: 50%; }
.code pre { margin: 0; white-space: pre; overflow: hidden; }
.k { color: #c084fc; } .p { color: #60a5fa; } .s { color: #34d399; } .y { color: #fbbf24; } .c { color: #94a3b8; }
.stat {
  position: absolute; background: rgba(18, 21, 38, 0.9); border: 1px solid var(--border); border-radius: 16px;
  padding: 16px 22px; text-align: center; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.stat strong { display: block; font-size: 32px; font-weight: 800; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); }
.stat.s1 { left: -4px; bottom: 0; }
.stat.s2 { right: 0; bottom: 96px; }

/* Sections */
.sec { padding: 72px 0; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 10px; }
h2 { margin: 0 0 32px; font-size: clamp(32px, 4.4vw, 48px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

/* Stack */
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.skills li {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--border); font-weight: 600; font-size: 15px;
  transition: border-color .15s ease, transform .15s ease;
}
.skills li:hover { border-color: rgba(139, 92, 246, 0.5); transform: translateY(-2px); }
.skills .ico { width: 34px; height: 34px; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.skills .ico img { width: 20px; height: 20px; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 22px; }
.project { overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, border-color .2s ease; }
.project:hover { transform: translateY(-4px); border-color: rgba(139, 92, 246, 0.45); }
.media { height: 230px; display: flex; align-items: center; justify-content: center; position: relative; }
.media img { max-height: 170px; width: auto; object-fit: contain; }
.media.cream { background: #f2ebdd; }
.media.black { background: #05060b; }
.media.full img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.media .num { position: absolute; left: 14px; top: 12px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(14,17,32,0.75); color: #fff; }
.body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.kind { font-size: 13px; font-weight: 700; color: #a78bfa; }
h3 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.body p { margin: 0; color: var(--muted); font-size: 15px; }
.stack-lines { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--faint); }
.stack-lines b { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tags li { font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: rgba(139, 92, 246, 0.12); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.25); }
.links { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 10px; }
.links .btn-grad, .links .btn-ghost { padding: 10px 18px; font-size: 14px; }
.soon { display: inline-flex; padding: 10px 18px; border-radius: 12px; border: 1px dashed var(--border-strong); font-size: 14px; font-weight: 700; color: var(--muted); }

/* About */
.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 22px; align-items: stretch; }
.about-text { padding: 32px; font-size: 17px; color: var(--muted); }
.about-text p { margin: 0 0 14px; }
.about-text p:last-child { margin: 0; }
.about-photo { position: relative; overflow: hidden; min-height: 300px; }
.about-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }

/* Contact */
.contact { padding: clamp(28px, 5vw, 56px); text-align: center; position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(500px 260px at 20% 0%, rgba(59,130,246,0.18), transparent 70%),
              radial-gradient(500px 260px at 80% 100%, rgba(236,72,153,0.18), transparent 70%);
}
.contact h2 { margin-bottom: 12px; }
.contact .tagline { color: var(--muted); margin: 0 0 28px; }
.grid-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; list-style: none; margin: 28px 0 0; padding: 0; text-align: left; }
.grid-links a {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; height: 100%;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border); text-decoration: none; font-weight: 600;
  transition: background .15s ease, border-color .15s ease;
}
.grid-links a:hover { background: rgba(255,255,255,0.08); border-color: var(--border-strong); }
.grid-links img { width: 20px; height: 20px; object-fit: contain; }

footer { border-top: 1px solid var(--border); margin-top: 40px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; padding-bottom: 36px; font-size: 14px; color: var(--faint); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .role .caret { animation: none; }
  .project, .skills li, .btn-grad { transition: none; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding: 48px 0 64px; gap: 24px; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .brand-text span { display: none; }
  .visual { padding: 150px 0 70px; }
  .code { right: 50%; transform: translateX(50%); top: 0; font-size: 12px; }
  .stat.s2 { right: 0; bottom: 10px; }
  .stat.s1 { left: 0; bottom: 10px; }
  .badge.b1 { top: 44%; }
}
