:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0a1626;
  --surface: #0f1d2e;
  --surface-raised: #142438;
  --text: #f3f7fc;
  --muted: #93a4b8;
  --line: rgba(169, 190, 214, .14);
  --primary: #758bff;
  --primary-strong: #91a1ff;
  --cyan: #52d7e8;
  --header: rgba(7, 17, 31, .78);
  --shadow: 0 24px 70px rgba(0, 0, 0, .24);
  --radius: 24px;
  --container: 1180px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f9fc;
  --bg-soft: #eef3f8;
  --surface: #fff;
  --surface-raised: #f5f8fc;
  --text: #101c2b;
  --muted: #56677c;
  --line: rgba(25, 46, 71, .12);
  --primary: #5368e8;
  --primary-strong: #4055d7;
  --cyan: #087f91;
  --header: rgba(247, 249, 252, .84);
  --shadow: 0 24px 70px rgba(47, 63, 86, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.container { width: min(calc(100% - 48px), var(--container)); margin-inline: auto; }
.skip-link {
  position: fixed; z-index: 1000; top: 8px; left: 8px; padding: 10px 16px;
  transform: translateY(-150%); background: var(--text); color: var(--bg); border-radius: 8px;
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }

.site-header { position: fixed; z-index: 100; top: 0; width: 100%; border-bottom: 1px solid transparent; transition: .25s ease; }
.site-header.scrolled { border-color: var(--line); background: var(--header); backdrop-filter: blur(18px); }
.nav-shell { height: 78px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: .98rem; letter-spacing: -.02em; }
.brand b { font-weight: 750; }
.brand-mark { width: 35px; height: 35px; fill: none; stroke: var(--primary-strong); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.main-nav { display: flex; align-items: center; gap: 36px; }
.main-nav a, .site-footer nav a { color: var(--muted); font-size: .88rem; font-weight: 600; transition: color .2s; }
.main-nav a:hover, .site-footer nav a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 8px; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; }
.theme-toggle svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }
.menu-toggle { display: none; }
.menu-toggle span { display: block; width: 18px; height: 1.5px; background: currentColor; transition: .2s; }
.menu-toggle span + span { margin-top: 5px; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
.mobile-nav { background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 24px 24px; }
.mobile-nav a { display: block; padding: 13px 0; border-bottom: 1px solid var(--line); font-weight: 650; }

.hero { position: relative; min-height: 780px; display: grid; align-items: center; padding: 130px 0 80px; background: radial-gradient(circle at 76% 40%, rgba(93, 112, 235, .12), transparent 30%); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .32; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(to bottom, black, transparent 76%); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 80px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; color: var(--primary-strong); font-size: .75rem; line-height: 1; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow span { width: 25px; height: 1px; background: currentColor; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 24px; font-size: clamp(2.8rem, 5.2vw, 5.15rem); line-height: 1.03; letter-spacing: -.06em; font-weight: 720; }
h1 em { color: var(--primary-strong); font-style: normal; }
.hero-text { max-width: 610px; margin-bottom: 34px; color: var(--muted); font-size: clamp(1.05rem, 1.4vw, 1.2rem); }
.hero-actions { display: flex; align-items: center; gap: 24px; }
.button { min-height: 51px; display: inline-flex; align-items: center; justify-content: center; gap: 18px; padding: 0 22px; border-radius: 12px; font-size: .9rem; font-weight: 700; }
.button-primary { background: var(--primary); color: #fff; box-shadow: 0 12px 32px rgba(83, 104, 232, .22); transition: transform .2s, background .2s; }
.button-primary:hover { transform: translateY(-2px); background: var(--primary-strong); }
.hero-note { color: var(--muted); font-size: .8rem; }
.hero-visual { position: relative; aspect-ratio: 1; max-width: 490px; justify-self: end; width: 100%; }
.orbit { position: absolute; border: 1px solid var(--line); border-radius: 50%; }
.orbit-a { inset: 5%; }
.orbit-b { inset: 20%; border-style: dashed; }
.visual-card { position: absolute; left: 22%; top: 26%; width: 62%; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: color-mix(in srgb, var(--surface) 90%, transparent); box-shadow: var(--shadow); transform: rotate(-3deg); backdrop-filter: blur(12px); }
.visual-top { display: flex; gap: 6px; margin-bottom: 28px; }
.visual-top span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .45; }
.code-line { height: 7px; margin-bottom: 9px; border-radius: 10px; background: var(--line); }
.w-70 { width: 70%; } .w-45 { width: 45%; }
.visual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 24px; }
.visual-grid span { height: 53px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-raised); }
.visual-grid span:first-child { background: linear-gradient(135deg, rgba(117,139,255,.3), rgba(82,215,232,.08)); }
.visual-chip { position: absolute; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); color: var(--primary-strong); }
.chip-code { right: 7%; top: 18%; width: 73px; height: 73px; border-radius: 20px; font-weight: 800; font-size: 1.2rem; }
.chip-spark { left: 9%; bottom: 16%; width: 58px; height: 58px; border-radius: 50%; }
.chip-spark svg { width: 25px; fill: none; stroke: var(--cyan); stroke-width: 1.6; }
.node { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 6px color-mix(in srgb, var(--cyan) 14%, transparent); }
.node-1 { left: 10%; top: 24%; }.node-2 { right: 14%; bottom: 18%; }.node-3 { left: 48%; bottom: 4%; }

.section { padding: 120px 0; }
.projects { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 48px; }
.section-heading h2, .about-intro h2 { margin-bottom: 0; font-size: clamp(2.1rem, 3.7vw, 3.4rem); line-height: 1.1; letter-spacing: -.045em; }
.section-heading > p { max-width: 420px; margin-bottom: 3px; color: var(--muted); }
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.project-card { --accent: #54d8b0; position: relative; display: flex; min-width: 0; min-height: 640px; flex-direction: column; overflow: hidden; padding: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 18px 45px rgba(0,0,0,.06); transition: transform .25s, border-color .25s, box-shadow .25s; }
.project-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: var(--shadow); }
.project-petflow { --accent: #a486ff; }
.project-accent { position: absolute; right: -50px; top: -90px; width: 260px; height: 260px; border-radius: 50%; background: var(--accent); opacity: .09; filter: blur(10px); }
.project-head { position: relative; display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 46px; }
.project-icon { width: 67px; height: 67px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 18px; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.project-icon svg { width: 39px; height: 39px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.project-petflow .project-icon svg ellipse { fill: color-mix(in srgb, var(--accent) 18%, transparent); }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: var(--surface-raised); font-size: .7rem; font-weight: 700; white-space: nowrap; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: #f3b850; }
.status-live i { background: #55d496; box-shadow: 0 0 0 4px rgba(85,212,150,.1); }
.project-label { margin-bottom: 8px; color: var(--accent); font-size: .72rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.project-card h3 { margin-bottom: 8px; font-size: 2.45rem; line-height: 1.1; letter-spacing: -.045em; }
.project-card h4 { margin-bottom: 19px; color: var(--text); font-size: 1.02rem; line-height: 1.4; }
.project-body > p:not(.project-label) { color: var(--muted); }
.feature-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 27px 0 32px; padding: 0; list-style: none; }
.feature-list li { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface-raised); font-size: .75rem; }
.project-link { margin-top: auto; min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 17px; border-top: 1px solid var(--line); color: var(--text); font-size: .9rem; font-weight: 750; transition: color .2s; }
.project-link:hover { color: var(--accent); }
.project-link span { font-size: 1.1rem; }
.future-note { margin: 32px 0 0; color: var(--muted); text-align: center; font-size: .82rem; }
.future-note span { margin-right: 7px; color: var(--primary-strong); font-weight: 800; }

.about { position: relative; }
.about-intro { max-width: 820px; margin-bottom: 64px; }
.about-intro h2 { margin-bottom: 24px; }
.about-intro > p:last-child { max-width: 760px; color: var(--muted); font-size: 1.08rem; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.principles article { position: relative; padding: 38px 36px 10px 0; }
.principles article + article { padding-left: 36px; border-left: 1px solid var(--line); }
.principle-number { position: absolute; top: 19px; right: 24px; color: var(--line); font-size: 2.5rem; font-weight: 800; }
.principles svg { width: 31px; margin-bottom: 28px; fill: none; stroke: var(--primary-strong); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.principles h3 { margin-bottom: 12px; font-size: 1.1rem; }
.principles p { margin-bottom: 0; color: var(--muted); font-size: .9rem; }

.profile { overflow: hidden; border-top: 1px solid var(--line); background: var(--bg-soft); }
.profile-grid { display: block; }
.profile-content { max-width: 920px; }
.profile-heading { display: flex; align-items: center; gap: 24px; margin-bottom: 28px; }
.profile-avatar { width: 96px; height: 96px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--primary) 34%, var(--line)); border-radius: 26px; background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 16%, var(--surface)), var(--surface)); color: var(--primary-strong); box-shadow: 0 16px 38px rgba(0, 0, 0, .12); font-size: 2.1rem; font-weight: 800; letter-spacing: -.07em; transform: rotate(-3deg); }
.profile-heading .eyebrow { margin-bottom: 13px; }
.profile-content h2 { margin-bottom: 12px; font-size: clamp(2.5rem, 4.6vw, 4rem); line-height: 1.05; letter-spacing: -.05em; }
.profile-role { max-width: 680px; margin-bottom: 0; color: var(--primary-strong); font-size: clamp(1.05rem, 1.8vw, 1.3rem); font-weight: 650; line-height: 1.45; }
.profile-summary { max-width: 720px; margin-bottom: 36px; color: var(--muted); font-size: 1.02rem; }
.profile-highlights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.profile-highlights article { display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.profile-highlights strong { margin-bottom: 4px; color: var(--text); font-size: 1.45rem; line-height: 1.2; letter-spacing: -.03em; }
.profile-highlights span { color: var(--muted); font-size: .78rem; }
.profile-credentials { display: flex; flex-wrap: wrap; gap: 9px; }
.profile-credentials span { padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line)); border-radius: 99px; color: var(--muted); background: color-mix(in srgb, var(--primary) 5%, var(--surface)); font-size: .72rem; font-weight: 650; }
.profile-contact { max-width: 530px; min-height: 72px; display: flex; align-items: center; gap: 14px; margin-top: 26px; padding: 13px 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); transition: transform .2s, border-color .2s, box-shadow .2s; }
.profile-contact:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 42%, var(--line)); box-shadow: 0 14px 36px rgba(0, 0, 0, .1); }
.profile-contact svg { width: 23px; flex: 0 0 auto; fill: none; stroke: var(--primary-strong); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.profile-contact > span { min-width: 0; overflow-wrap: anywhere; font-size: .86rem; font-weight: 700; }
.profile-contact small { display: block; margin-bottom: 1px; color: var(--muted); font-size: .67rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.profile-contact i { margin-left: auto; color: var(--primary-strong); font-size: 1.05rem; font-style: normal; }

.site-footer { padding: 64px 0 24px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.footer-main { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-bottom: 50px; }
.footer-main > div > p { margin: 12px 0 0 46px; color: var(--muted); font-size: .84rem; }
.site-footer nav { display: flex; gap: 30px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 22px; border-top: 1px solid var(--line); }
.footer-bottom p { margin: 0; color: var(--muted); font-size: .72rem; }

@media (max-width: 900px) {
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 50px; }
  .hero-visual { max-width: 420px; justify-self: center; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 590px; }
  .section-heading { align-items: start; flex-direction: column; }
  .principles { grid-template-columns: 1fr; }
  .principles article, .principles article + article { padding: 30px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 680px) {
  .container { width: min(calc(100% - 32px), var(--container)); }
  .main-nav { display: none; }
  .menu-toggle { display: block; }
  .hero { padding: 122px 0 64px; }
  .hero-grid { gap: 38px; }
  h1 { font-size: clamp(2.6rem, 13vw, 4rem); }
  .hero-actions { align-items: start; flex-direction: column; gap: 16px; }
  .hero-visual { max-width: 340px; }
  .chip-code { width: 58px; height: 58px; border-radius: 16px; }
  .section { padding: 84px 0; }
  .project-card { min-height: 0; padding: 24px; }
  .project-head { margin-bottom: 35px; }
  .project-icon { width: 58px; height: 58px; }
  .status { padding: 6px 9px; font-size: .64rem; }
  .project-card h3 { font-size: 2.1rem; }
  .project-link { margin-top: 15px; }
  .about-intro { margin-bottom: 45px; }
  .profile-heading { align-items: flex-start; flex-direction: column; gap: 20px; }
  .profile-avatar { width: 78px; height: 78px; border-radius: 21px; font-size: 1.7rem; }
  .profile-highlights { grid-template-columns: 1fr; }
  .profile-contact { align-items: flex-start; }
  .footer-main, .footer-bottom { align-items: start; flex-direction: column; }
  .footer-main > div > p { margin-left: 0; }
}

@media (max-width: 370px) {
  .brand span { font-size: .87rem; }
  .nav-actions { gap: 5px; }
  .icon-button { width: 39px; height: 39px; }
  .project-head { align-items: start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
