/* ============ TOKENS ============ */
:root {
  --bg: #07070f;
  --text: #f3f4ff;
  --muted: rgba(243, 244, 255, 0.62);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.14);
  --accent: #8b7bff;
  --accent-2: #3de0ff;
  --accent-3: #ff6bd6;
  --radius: 26px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.container { width: min(1180px, 92%); margin-inline: auto; }
::selection { background: var(--accent); color: #fff; }

/* ============ GLASS ============ */
.glass {
  background: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03));
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.18);
  border-radius: var(--radius);
}

/* ============ BACKGROUND ============ */
.bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; background:
  radial-gradient(1200px 700px at 80% -10%, #1b1450 0%, transparent 60%),
  radial-gradient(900px 600px at -10% 90%, #0b2a45 0%, transparent 55%), var(--bg); }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; animation: float 18s ease-in-out infinite; }
.orb-1 { width: 520px; height: 520px; background: var(--accent); top: -120px; left: -100px; }
.orb-2 { width: 460px; height: 460px; background: var(--accent-2); bottom: -140px; right: -80px; animation-delay: -6s; opacity: 0.4; }
.orb-3 { width: 380px; height: 380px; background: var(--accent-3); top: 40%; left: 55%; animation-delay: -11s; opacity: 0.3; }
.grid-overlay { position: absolute; inset: 0; background-image:
  linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
  linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, 40px) scale(1.1); }
  66% { transform: translate(-40px, 70px) scale(0.95); }
}
.cursor-glow { position: fixed; width: 380px; height: 380px; left: 0; top: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(circle, rgba(139,123,255,0.22), transparent 65%); transform: translate(-50%, -50%); transition: opacity .3s; }
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 200; background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3)); }

/* ============ NAV ============ */
.nav-wrap { position: fixed; top: 18px; left: 0; right: 0; z-index: 100; display: flex; justify-content: center; padding: 0 4%; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 10px 12px 10px 26px; width: min(960px, 100%); border-radius: 999px; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; }
.logo span { color: var(--accent-2); }
.nav-links { display: flex; gap: 6px; }
.nav-links a { padding: 8px 16px; border-radius: 999px; font-size: 0.92rem; color: var(--muted); transition: all .25s; }
.nav-links a sup { font-size: 0.65rem; color: var(--accent-2); }
.nav-links a:hover, .nav-links a.active { color: #fff; background: var(--glass-strong); }
.nav-resume-mobile { display: none; }
.burger { display: none; width: 44px; height: 44px; border-radius: 50%; position: relative; background: var(--glass-strong); }
.burger span { position: absolute; left: 13px; right: 13px; height: 2px; background: #fff; border-radius: 2px; transition: .3s; }
.burger span:first-child { top: 18px; } .burger span:last-child { top: 25px; }
.burger.open span:first-child { top: 21px; transform: rotate(45deg); }
.burger.open span:last-child { top: 21px; transform: rotate(-45deg); }

/* ============ BUTTONS ============ */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px; font-weight: 500; font-size: 0.95rem;
  background: linear-gradient(135deg, var(--accent), #5b6bff); color: #fff; box-shadow: 0 10px 30px rgba(139,123,255,0.4), inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform .25s, box-shadow .25s; position: relative; overflow: hidden; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(139,123,255,0.55); }
.btn .arrow { font-style: normal; display: inline-block; transition: transform .25s; }
.btn:hover .arrow { transform: translate(3px, -3px); }
.btn-small { padding: 10px 20px; font-size: 0.88rem; }
.btn-ghost { background: var(--glass); border: 1px solid var(--border); box-shadow: inset 0 1px 0 rgba(255,255,255,0.15); backdrop-filter: blur(14px); }
.btn-ghost:hover { background: var(--glass-strong); box-shadow: none; }
.round { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem; transition: .25s; }
.round:hover { background: var(--accent); transform: scale(1.08); }

/* ============ HERO ============ */
.hero { min-height: 100vh; padding: 150px 0 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 50px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 50px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px; border-radius: 999px; font-size: 0.85rem; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3dffa2; box-shadow: 0 0 0 0 rgba(61,255,162,.6); animation: pulse 2s infinite; display: inline-block; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(61,255,162,0); } 100% { box-shadow: 0 0 0 0 rgba(61,255,162,0); } }
.hero-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(4rem, 12vw, 9.5rem); line-height: 0.88; letter-spacing: -0.045em; margin: 24px 0 26px; }
.hero-title .line { display: block; background: linear-gradient(180deg, #fff, rgba(255,255,255,0.55)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-title .outline { color: transparent; background: none; -webkit-text-stroke: 2px rgba(255,255,255,0.75); }
.hero-sub { max-width: 540px; color: var(--muted); font-size: 1.08rem; }
.typed { color: var(--accent-2); font-weight: 600; }
.caret { color: var(--accent-2); animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.meta-card { padding: 14px 20px; border-radius: 18px; display: flex; flex-direction: column; }
.meta-card small { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; }
.meta-card strong { font-weight: 500; font-size: 0.95rem; }

.hero-visual { position: relative; display: grid; place-items: center; }
.portrait { position: relative; width: min(420px, 100%); aspect-ratio: 4/5; padding: 12px; border-radius: 34px; overflow: hidden; transition: transform .2s ease-out; transform-style: preserve-3d; }
.portrait img { width: 100%; height: 100%; object-fit: cover; border-radius: 24px; }
.portrait-fallback { position: absolute; inset: 12px; border-radius: 24px; display: none; place-items: center; font-family: var(--font-display); font-size: 6rem; font-weight: 700;
  background: linear-gradient(135deg, rgba(139,123,255,.5), rgba(61,224,255,.35)); }
.portrait.no-img .portrait-fallback { display: grid; }
.portrait.no-img img { display: none; }
.portrait-badge { position: absolute; left: 24px; right: 24px; bottom: 24px; padding: 12px 18px; border-radius: 18px; display: flex; flex-direction: column; font-size: 0.85rem; }
.portrait-badge span { color: var(--muted); font-size: 0.78rem; }
.float-card { position: absolute; padding: 14px 20px; border-radius: 20px; display: flex; flex-direction: column; font-size: 0.8rem; color: var(--muted); animation: bob 6s ease-in-out infinite; }
.float-card .fc-num { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: #fff; line-height: 1; }
.fc-1 { top: 10%; left: -4%; }
.fc-2 { bottom: 18%; right: -4%; animation-delay: -3s; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.marquee { overflow: hidden; border-radius: 999px; padding: 16px 0; width: min(1180px, 92%); margin-inline: auto; }
.marquee-track { display: flex; gap: 60px; width: max-content; animation: scroll 28s linear infinite; font-family: var(--font-display); font-size: 1.15rem; color: var(--muted); }
.marquee-track span { white-space: nowrap; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ============ SECTIONS ============ */
.section { padding: 110px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 48px; }
.eyebrow { color: var(--accent-2); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.18em; margin-bottom: 12px; }
h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.05; letter-spacing: -0.03em; max-width: 780px; }
h2 em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ============ SLIDER ============ */
.slider-ctrl { display: flex; align-items: center; gap: 12px; }
.counter { color: var(--muted); margin-right: 8px; font-family: var(--font-display); }
.counter b { color: #fff; font-size: 1.4rem; }
.slider { overflow: hidden; border-radius: var(--radius); }
.track { display: flex; transition: transform .7s cubic-bezier(.77,0,.18,1); }
.project { flex: 0 0 100%; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 0; overflow: hidden; min-height: 460px; }
.project-art { position: relative; display: grid; place-items: center; overflow: hidden; }
.project-art span { font-family: var(--font-display); font-weight: 700; font-size: clamp(6rem, 16vw, 12rem); color: rgba(255,255,255,0.18); letter-spacing: -0.05em; transition: transform .6s; }
.project:hover .project-art span { transform: scale(1.08) rotate(-3deg); }
.project-art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.22), transparent 55%); }
.art-1 { background: linear-gradient(135deg, #5b3dff, #1fd0ff); }
.art-2 { background: linear-gradient(135deg, #ff5fa2, #ff9a3d); }
.art-3 { background: linear-gradient(135deg, #12c2a0, #2b6cff); }
.art-4 { background: linear-gradient(135deg, #a259ff, #ff5fd6); }
.project-info { padding: 44px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span, .pills span { padding: 6px 14px; border-radius: 999px; font-size: 0.78rem; background: var(--glass-strong); border: 1px solid var(--border); color: var(--muted); }
.project-info h3 { font-family: var(--font-display); font-size: 2.6rem; letter-spacing: -0.03em; line-height: 1; }
.project-info p { color: var(--muted); }
.link { display: inline-flex; gap: 8px; align-items: center; color: var(--accent-2); font-weight: 500; }
.link .arrow { font-style: normal; transition: transform .25s; }
.link:hover .arrow { transform: translate(4px, -4px); }

/* ============ ABOUT ============ */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; }
.about-card { padding: 48px; display: flex; flex-direction: column; gap: 22px; }
.big-cv { font-size: clamp(6rem, 14vw, 11rem); line-height: 0.85; display: flex; flex-direction: column; background: linear-gradient(180deg, #fff, rgba(255,255,255,0.25)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.big-cv span { font-size: 1.1rem; letter-spacing: 0; color: var(--accent-2); -webkit-text-fill-color: var(--accent-2); font-weight: 500; margin-top: 10px; }
.about-card p { color: var(--muted); max-width: 520px; }
.about-side { display: flex; flex-direction: column; gap: 24px; }
.stat-card, .stack-card { padding: 32px; }
.stat-card h3 { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.15; margin-bottom: 10px; }
.stat-card p, .stack-card p { color: var(--muted); font-size: 0.92rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.stats div { background: var(--glass); border: 1px solid var(--border); border-radius: 18px; padding: 14px; text-align: center; }
.stats b { font-family: var(--font-display); font-size: 2rem; display: block; line-height: 1.1; }
.stats span { font-size: 0.72rem; color: var(--muted); }
.stack-card h4 { font-family: var(--font-display); font-size: 1.3rem; }
.stack-icons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.stack-icons span { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; font-size: 0.78rem; font-weight: 600; background: var(--glass-strong); border: 1px solid var(--border); transition: .3s; }
.stack-icons span:hover { transform: translateY(-6px) rotate(-6deg); background: var(--accent); }

/* ============ FEATURES / STEPS / BLOG ============ */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { padding: 34px; transition: transform .35s, border-color .35s; }
.feature:hover, .step:hover, .blog:hover { transform: translateY(-8px); border-color: rgba(139,123,255,.6); }
.ficon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 20px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.feature h3, .step h3 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 10px; letter-spacing: -0.02em; }
.feature p, .step p { color: var(--muted); font-size: 0.95rem; }
.workflow { margin-top: 22px; padding: 34px; display: flex; flex-wrap: wrap; gap: 20px 50px; align-items: center; justify-content: space-between; }
.workflow h3 { font-family: var(--font-display); font-size: 1.6rem; }
.workflow ul { display: grid; grid-template-columns: repeat(2, auto); gap: 12px 40px; color: var(--muted); }
.workflow li { display: flex; gap: 10px; align-items: center; }
.workflow li i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; background: var(--accent); color: #fff; flex: none; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.step { padding: 36px; position: relative; overflow: hidden; transition: transform .35s, border-color .35s; }
.step-no { position: absolute; right: 18px; top: 0; font-family: var(--font-display); font-size: 6rem; font-weight: 700; color: rgba(255,255,255,0.06); line-height: 1; }
.step h3 { margin-top: 60px; }

.blog { display: block; padding: 14px 14px 26px; transition: transform .35s, border-color .35s; }
.blog-img { aspect-ratio: 16/10; border-radius: 18px; margin-bottom: 18px; position: relative; overflow: hidden; }
.blog-img::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 25% 20%, rgba(255,255,255,.3), transparent 55%); }
.b1 { background: linear-gradient(135deg, #5b3dff, #3de0ff); } .b2 { background: linear-gradient(135deg, #ff5fa2, #ffb03d); } .b3 { background: linear-gradient(135deg, #12c2a0, #8b7bff); }
.blog-meta { display: flex; gap: 14px; padding: 0 10px; color: var(--accent-2); font-size: .8rem; margin-bottom: 8px; }
.blog h3 { padding: 0 10px; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; }

/* ============ SKILLS ============ */
.skills-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 60px; align-items: start; }
.skills-title { margin-bottom: 30px; }
.accordion { display: flex; flex-direction: column; gap: 14px; }
.acc-item { border-radius: 22px; overflow: hidden; transition: border-color .3s; }
.acc-item.open { border-color: rgba(139,123,255,.65); }
.acc-head { width: 100%; display: flex; align-items: center; gap: 18px; padding: 22px 26px; text-align: left; }
.acc-head .num { color: var(--accent-2); font-size: .82rem; }
.acc-head .ttl { flex: 1; font-family: var(--font-display); font-size: 1.15rem; }
.plus { font-style: normal; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--glass-strong); transition: transform .35s, background .35s; font-size: 1.2rem; }
.acc-item.open .plus { transform: rotate(45deg); background: var(--accent); }
.acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s ease; }
.acc-item.open .acc-body { grid-template-rows: 1fr; }
.acc-body > div { overflow: hidden; padding: 0 26px; }
.acc-item.open .acc-body > div { padding-bottom: 26px; }
.acc-body p { color: var(--muted); margin-bottom: 16px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }

/* ============ CONTACT ============ */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 48px; }
.contact-left { display: flex; flex-direction: column; gap: 24px; }
.person { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-radius: 22px; width: fit-content; }
.person small { display: block; color: var(--muted); }
.avatar { width: 54px; height: 54px; border-radius: 50%; overflow: hidden; position: relative; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; font-weight: 700; flex: none; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.email-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-radius: 22px; }
.email-box small { display: block; color: var(--muted); font-size: .78rem; }
.email-box strong { font-weight: 500; word-break: break-all; }
.contact-form { display: flex; flex-direction: column; gap: 16px; background: rgba(0,0,0,0.25); border: 1px solid var(--border); border-radius: 24px; padding: 32px; }
.contact-form h3 { font-family: var(--font-display); font-size: 1.6rem; }
.contact-form label { display: flex; flex-direction: column; gap: 8px; font-size: .88rem; color: var(--muted); }
.contact-form input, .contact-form textarea { font: inherit; color: #fff; padding: 14px 16px; border-radius: 14px; background: var(--glass); border: 1px solid var(--border); outline: none; resize: vertical; transition: .25s; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(139,123,255,.2); background: var(--glass-strong); }
.contact-form input.invalid { border-color: #ff6b8a; }
.contact-form .btn { align-self: flex-start; }
.form-note { font-size: .88rem; min-height: 1.3em; color: #3dffa2; }
.form-note.error { color: #ff6b8a; }

/* ============ FOOTER ============ */
.footer { padding: 40px 0 30px; }
.footer-card { padding: 48px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 10px; }
.footer p { color: var(--muted); font-size: .92rem; max-width: 320px; }
.footer h5 { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent-2); margin-bottom: 14px; font-weight: 500; }
.footer-top a, .status { display: block; color: var(--muted); margin-bottom: 8px; font-size: .94rem; transition: .25s; }
.footer-top a:hover { color: #fff; transform: translateX(4px); }
.status { display: flex; align-items: center; gap: 8px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: .88rem; }
.to-top:hover { color: #fff; }

/* ============ REVEAL ============ */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .hero { padding-top: 130px; }
  .hero-grid, .about-grid, .skills-grid, .contact { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .portrait { width: min(340px, 80%); }
  .fc-1 { left: 2%; } .fc-2 { right: 2%; }
  .cards-3, .steps { grid-template-columns: 1fr; }
  .project { grid-template-columns: 1fr; }
  .project-art { min-height: 240px; }
  .project-info { padding: 30px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .workflow ul { grid-template-columns: 1fr; }
  .nav .btn-small { display: none; }
  .burger { display: block; }
  .nav-resume-mobile { display: block; }
  .nav-links { position: absolute; top: calc(100% + 10px); left: 0; right: 0; flex-direction: column; padding: 14px; border-radius: 26px;
    background: rgba(15,15,30,0.85); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--border);
    opacity: 0; pointer-events: none; transform: translateY(-10px); transition: .3s; }
  .nav-links.open { opacity: 1; pointer-events: auto; transform: none; }
  .nav { position: relative; }
  .nav-links a { display: block; padding: 14px 18px; }
}
@media (max-width: 560px) {
  .section { padding: 80px 0; }
  .about-card, .contact, .footer-card { padding: 28px; }
  .footer-top { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .float-card { display: none; }
  .section-head { align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
