/* ============ Tokens ============ */
:root {
  --orange: #f6a623;
  --orange-d: #e8951a;
  --ink: #2b2c39;
  --body: #5b6072;
  --muted: #9aa0b0;
  --line: #ecedf2;
  --panel: #ffffff;
  --soft: #f5f6f9;
  --green: #34c759;
  --radius: 18px;
  --shadow: 0 30px 70px rgba(60, 45, 10, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--body);
  background: linear-gradient(125deg, #ffc24b 0%, #ffa92e 45%, #ff9d2f 100%);
  background-attachment: fixed;
  min-height: 100vh;
  padding: clamp(14px, 3vw, 40px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *{animation:none!important;transition:none!important} }
h1, h2, h3, h4 { color: var(--ink); font-weight: 700; line-height: 1.15; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ============ App shell ============ */
.app {
  max-width: 1460px;
  margin: 0 auto;
  background: var(--panel);
  border-radius: 26px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 312px 1fr 74px;
  overflow: hidden;
  min-height: calc(100vh - clamp(28px, 6vw, 80px));
}

/* ============ Left profile card ============ */
.side {
  padding: 34px 28px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow-y: auto;
  max-height: calc(100vh - clamp(28px, 6vw, 80px));
}
.side::-webkit-scrollbar { width: 6px; }
.side::-webkit-scrollbar-thumb { background: #e6e7ee; border-radius: 6px; }
.avatar-wrap { position: relative; }
.avatar {
  width: 132px; height: 132px; border-radius: 50%; object-fit: cover;
  border: 5px solid #fff; box-shadow: 0 10px 30px rgba(246,166,35,0.28);
  outline: 2px solid var(--orange); outline-offset: 4px;
}
.online { position: absolute; right: 12px; bottom: 12px; width: 16px; height: 16px; border-radius: 50%; background: var(--green); border: 3px solid #fff; }
.side-name { font-size: 1.45rem; margin-top: 18px; }
.side-role { color: var(--muted); font-size: 0.9rem; margin-top: 2px; }

.socials { display: flex; gap: 10px; margin: 18px 0 22px; }
.socials a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--soft); color: var(--body); transition: 0.25s var(--ease);
}
.socials a svg { width: 17px; height: 17px; }
.socials a:hover { background: var(--orange); color: #fff; transform: translateY(-3px); box-shadow: 0 8px 18px rgba(246,166,35,0.4); }

.facts { list-style: none; width: 100%; }
.facts li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 0.86rem; }
.facts .tag { background: rgba(246,166,35,0.14); color: var(--orange-d); font-weight: 600; padding: 4px 11px; border-radius: 7px; font-size: 0.76rem; }
.facts .val { color: var(--ink); font-weight: 500; }
.facts .val.accent { color: var(--green); font-weight: 600; }

.block { width: 100%; margin-top: 26px; text-align: left; }
.block-title { font-size: 1rem; margin-bottom: 14px; position: relative; padding-left: 14px; }
.block-title::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 3px; background: var(--orange); }

.bar { margin-bottom: 14px; font-size: 0.8rem; }
.bar span { color: var(--body); display: block; margin-bottom: 6px; font-weight: 500; }
.bar i { display: block; height: 6px; border-radius: 6px; background: var(--soft); overflow: hidden; }
.bar b { display: block; height: 100%; width: var(--w); border-radius: 6px; background: linear-gradient(90deg, var(--orange), #ffce6a); transform-origin: left; animation: growx 1.15s var(--ease) both; }
@keyframes growx { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.extra { list-style: none; display: grid; gap: 9px; }
.extra li { position: relative; padding-left: 20px; font-size: 0.84rem; color: var(--body); }
.extra li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 8px; height: 8px; border-radius: 2px; background: var(--orange); transform: rotate(45deg); }

.certs { list-style: none; display: grid; gap: 13px; width: 100%; text-align: left; }
.certs li { position: relative; padding-left: 18px; }
.certs li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 8px; height: 8px; border-radius: 2px; background: var(--orange); transform: rotate(45deg); }
.certs strong { display: block; color: var(--ink); font-size: 0.86rem; font-weight: 600; line-height: 1.3; }
.certs span { display: block; color: var(--muted); font-size: 0.76rem; margin-top: 1px; }
.certs a { color: var(--orange-d); font-weight: 600; }
.certs a:hover { text-decoration: underline; }

.cv-btn {
  margin-top: 28px; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--orange); color: #fff; font-weight: 600; padding: 13px; border-radius: 11px; font-size: 0.9rem;
  box-shadow: 0 12px 26px rgba(246,166,35,0.4); transition: 0.25s var(--ease);
}
.cv-btn svg { width: 17px; height: 17px; }
.cv-btn:hover { background: var(--orange-d); transform: translateY(-2px); box-shadow: 0 16px 32px rgba(246,166,35,0.5); }

/* ============ Center main ============ */
.main { overflow-y: auto; max-height: calc(100vh - clamp(28px, 6vw, 80px)); }
.main::-webkit-scrollbar { width: 8px; }
.main::-webkit-scrollbar-thumb { background: #e6e7ee; border-radius: 8px; }

/* hero */
.hero { position: relative; padding: clamp(34px, 5vw, 64px) clamp(28px, 5vw, 60px); display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 30px; align-items: center; min-height: 420px; }
.hello { color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.hero-name { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.02em; }
.hero-title { font-size: clamp(1.5rem, 3.2vw, 2.4rem); font-weight: 800; margin-top: 2px; }
.hero-title .orange { color: var(--orange); }
.hero-desc { margin: 20px 0 28px; color: var(--body); max-width: 460px; font-size: 0.96rem; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-orange { display: inline-flex; align-items: center; gap: 9px; background: var(--orange); color: #fff; font-weight: 600; padding: 13px 24px; border-radius: 11px; box-shadow: 0 12px 26px rgba(246,166,35,0.4); transition: 0.25s var(--ease); }
.btn-orange svg { width: 18px; height: 18px; }
.btn-orange:hover { background: var(--orange-d); transform: translateY(-2px); box-shadow: 0 16px 32px rgba(246,166,35,0.52); }
.btn-line { display: inline-flex; align-items: center; padding: 13px 24px; border-radius: 11px; font-weight: 600; color: var(--ink); border: 2px solid var(--line); transition: 0.25s var(--ease); }
.btn-line:hover { border-color: var(--orange); color: var(--orange-d); transform: translateY(-2px); }

/* hero photo */
.hero-photo { position: relative; display: grid; place-items: center; min-height: 320px; }
.hero-photo .blob { position: absolute; width: 300px; height: 300px; border-radius: 46% 54% 58% 42% / 48% 44% 56% 52%; background: linear-gradient(140deg, #ffd27a, #ffae3a); animation: morph 9s ease-in-out infinite; box-shadow: 0 24px 60px rgba(246,166,35,0.4); }
@keyframes morph { 0%,100%{border-radius:46% 54% 58% 42%/48% 44% 56% 52%;} 50%{border-radius:58% 42% 44% 56%/54% 58% 42% 46%;} }
.hero-photo .photo-ring { position: absolute; width: 330px; height: 330px; border-radius: 50%; border: 2px dashed rgba(255,255,255,0.7); animation: spin 26s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-photo img { position: relative; width: 270px; height: 270px; object-fit: cover; border-radius: 50%; border: 6px solid #fff; box-shadow: 0 20px 44px rgba(0,0,0,0.18); }
.badge { position: absolute; background: #fff; color: var(--ink); font-size: 0.78rem; font-weight: 600; padding: 8px 13px; border-radius: 30px; box-shadow: 0 10px 26px rgba(0,0,0,0.12); white-space: nowrap; z-index: 3; }
.badge.b-top { top: 18px; right: 4px; animation: float 4s ease-in-out infinite; }
.badge.b-bot { bottom: 22px; left: 0; animation: float 4s ease-in-out infinite 1.5s; }
@keyframes float { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-9px);} }

/* decorative shapes */
.shapes { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-text, .hero-photo { position: relative; z-index: 1; }
.shapes .sh { position: absolute; opacity: 0.85; }
.sh.ring { border: 2px solid var(--orange); border-radius: 50%; }
.sh.dot { border-radius: 50%; }
.sh.dia { transform: rotate(45deg); }
.s1 { width: 16px; height: 16px; top: 40px; left: 30px; opacity: 0.5; }
.s2 { width: 10px; height: 10px; background: var(--green); top: 30px; left: 48%; }
.s3 { width: 12px; height: 12px; border: 2px solid var(--orange); top: 60px; right: 36%; }
.s4 { width: 26px; height: 26px; bottom: 60px; left: 22%; opacity: 0.35; }
.s5 { width: 9px; height: 9px; background: var(--orange); bottom: 70px; right: 30%; }
.s6 { width: 14px; height: 14px; border: 2px solid var(--green); bottom: 40px; right: 12%; }
.s7 { width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 14px solid rgba(246,166,35,0.5); top: 50%; left: 8px; }

/* services */
.services, .contact { padding: clamp(30px, 4vw, 56px) clamp(22px, 3.5vw, 44px); background: var(--soft); }
.sec-head { text-align: center; max-width: 560px; margin: 0 auto 34px; }
.sec-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
.sec-head h2::after { content: ""; display: block; width: 54px; height: 4px; border-radius: 4px; background: var(--orange); margin: 12px auto 0; }
.sec-head p { color: var(--muted); margin-top: 14px; font-size: 0.94rem; }

.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.svc {
  background: #fff; border-radius: var(--radius); padding: 36px 30px; text-align: center;
  border: 1px solid var(--line); transition: 0.3s var(--ease); cursor: default;
}
.svc:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(60,45,10,0.12); border-color: transparent; }
.svc-ico { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 20px; display: grid; place-items: center; background: rgba(246,166,35,0.12); transition: 0.3s var(--ease); }
.svc:hover .svc-ico { background: rgba(246,166,35,0.22); transform: scale(1.08); }
.svc h4 { font-size: 1.12rem; margin-bottom: 7px; }
.svc p { color: var(--muted); font-size: 0.88rem; }

/* custom svg icons (orange) */
.ico-dna { width: 40px; height: 40px; }
.ico-dna .dna-s1, .ico-dna .dna-s2 { stroke: var(--orange); stroke-dasharray: 90; animation: dnaflow 3.4s linear infinite; }
.ico-dna .dna-s2 { stroke: var(--orange-d); animation-delay: -1.7s; }
.ico-dna .r { stroke-width: 2.6; transform-origin: center; animation: rpulse 3.4s ease-in-out infinite; }
.ico-dna .r:nth-of-type(odd){stroke:var(--orange)} .ico-dna .r:nth-of-type(even){stroke:#ffc663}
.ico-dna .r:nth-of-type(1){animation-delay:0s}.ico-dna .r:nth-of-type(2){animation-delay:.25s}.ico-dna .r:nth-of-type(3){animation-delay:.5s}.ico-dna .r:nth-of-type(4){animation-delay:.75s}.ico-dna .r:nth-of-type(5){animation-delay:1s}.ico-dna .r:nth-of-type(6){animation-delay:1.25s}
@keyframes dnaflow { to { stroke-dashoffset: -180; } }
@keyframes rpulse { 0%,100%{opacity:.4;transform:scaleX(.72)} 50%{opacity:1;transform:scaleX(1)} }
.ico-chart { width: 40px; height: 40px; }
.ico-chart .axis { stroke: #d9b066; }
.ico-chart .cbar { transform-origin: 50% 46px; animation: bargrow 2.6s ease-in-out infinite; }
.ico-chart .b1 { fill: var(--orange); animation-delay: 0s; }
.ico-chart .b2 { fill: #ffc663; animation-delay: .25s; }
.ico-chart .b3 { fill: var(--orange-d); animation-delay: .5s; }
@keyframes bargrow { 0%,100%{transform:scaleY(.35);opacity:.7} 50%{transform:scaleY(1);opacity:1} }

/* AI sparkle icon */
.ico-ai { width: 42px; height: 42px; }
.ico-ai .sp { fill: var(--orange); animation: twinkle 2.4s ease-in-out infinite; }
.ico-ai .sp-b { fill: #ffc663; animation-delay: 0.7s; }
@keyframes twinkle { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

/* projects */
.projects2 { padding: clamp(30px, 4vw, 56px) clamp(22px, 3.5vw, 44px); background: #fff; }
.proj2-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.proj2 {
  background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; display: flex; flex-direction: column; transition: 0.3s var(--ease);
}
.proj2:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(60,45,10,0.12); border-color: transparent; background: #fff; }
.proj2.feature { grid-column: span 2; background: linear-gradient(135deg, rgba(246,166,35,0.12), rgba(255,206,106,0.06)); border-color: rgba(246,166,35,0.3); }
.proj2-tag { align-self: flex-start; font-size: 0.72rem; font-weight: 600; color: var(--orange-d); background: rgba(246,166,35,0.14); padding: 5px 11px; border-radius: 8px; margin-bottom: 13px; }
.proj2 h4 { font-size: 1.08rem; margin-bottom: 9px; line-height: 1.25; }
.proj2.feature h4 { font-size: 1.35rem; }
.proj2 p { color: var(--body); font-size: 0.88rem; flex: 1; margin-bottom: 15px; }
.proj2-stack { display: flex; flex-wrap: wrap; gap: 7px; }
.proj2-stack span { font-size: 0.74rem; color: var(--muted); background: #fff; border: 1px solid var(--line); padding: 4px 10px; border-radius: 7px; }
.proj2:hover .proj2-stack span { border-color: rgba(246,166,35,0.3); }
.proj2-link { margin-top: 14px; align-self: flex-start; font-weight: 600; font-size: 0.86rem; color: var(--orange-d); }
.proj2-link:hover { text-decoration: underline; }

/* contact */
.contact { background: var(--soft); text-align: center; }
.contact-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.foot { color: var(--muted); font-size: 0.84rem; }

/* ============ Right icon rail ============ */
.rail { background: var(--soft); border-left: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 0; }
.rail-btn { position: relative; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); background: transparent; transition: 0.25s var(--ease); }
.rail-btn svg { width: 20px; height: 20px; }
.rail-btn:hover { color: var(--orange-d); background: rgba(246,166,35,0.12); }
.rail-btn.active { background: var(--orange); color: #fff; box-shadow: 0 10px 22px rgba(246,166,35,0.45); }
.rail-btn::after { content: attr(data-tip); position: absolute; right: 52px; top: 50%; transform: translateY(-50%) translateX(6px); background: var(--ink); color: #fff; font-size: 0.72rem; padding: 5px 9px; border-radius: 7px; white-space: nowrap; opacity: 0; pointer-events: none; transition: 0.2s var(--ease); }
.rail-btn:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ============ Reveal ============ */
.reveal-up { opacity: 0; transform: translateY(22px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal-up.in { opacity: 1; transform: none; }

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .app { grid-template-columns: 280px 1fr 64px; }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .proj2-grid { grid-template-columns: repeat(2, 1fr); }
  .proj2.feature { grid-column: span 2; }
}
@media (max-width: 860px) {
  body { padding: 0; }
  .app { grid-template-columns: 1fr; border-radius: 0; min-height: 100vh; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); max-height: none; }
  .main { max-height: none; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-text { order: 2; }
  .hero-photo { order: 1; }
  .hero-desc { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .rail { flex-direction: row; justify-content: center; flex-wrap: wrap; border-left: 0; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: #fff; }
  .rail-btn::after { display: none; }
}
@media (max-width: 520px) {
  .svc-grid { grid-template-columns: 1fr; }
  .proj2-grid { grid-template-columns: 1fr; }
  .proj2.feature { grid-column: span 1; }
  .proj2.feature h4 { font-size: 1.15rem; }
  .hero-photo .blob { width: 240px; height: 240px; }
  .hero-photo img { width: 210px; height: 210px; }
  .hero-photo .photo-ring { width: 256px; height: 256px; }
}
