:root {
  --page-bg: #f4f6f9;
  --ink: #0b0f1e;
  --muted: #5c6070;
  --line: rgba(11, 15, 30, 0.14);
  --card: #ffffff;
  --accent: #2b59ff;
  --shadow-soft: 0 28px 60px -40px rgba(11, 15, 30, 0.45);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Instrument Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--page-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 18% 20%, rgba(43, 89, 255, 0.12), transparent 55%),
    radial-gradient(circle at 80% 8%, rgba(43, 89, 255, 0.08), transparent 62%);
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(1.8rem, 4vw, 3rem) clamp(1.4rem, 5vw, 3.2rem) clamp(3rem, 6vw, 4rem);
  display: grid;
  gap: clamp(2.4rem, 5vw, 3.4rem);
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  width: 68px;
  height: 68px;
  filter: drop-shadow(0 18px 30px rgba(43, 89, 255, 0.25));
}

.brand-logo .logo-ring {
  fill: none;
  stroke: url(#logo-glow);
  stroke-width: 2;
  stroke-dasharray: 176;
  stroke-dashoffset: 176;
  opacity: 0;
  animation: logo-ring-draw 1.6s ease forwards;
}

.brand-logo .logo-glyph {
  fill: none;
  stroke: url(#logo-glow);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 150;
  stroke-dashoffset: 150;
  animation: logo-glyph-draw 1.4s ease forwards 0.25s;
}

.brand-logo .logo-orbit {
  fill: none;
  stroke: rgba(90, 245, 255, 0.85);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 96;
  stroke-dashoffset: 96;
  opacity: 0.8;
  transform-origin: 40px 40px;
  animation: logo-orbit-draw 1.8s ease forwards 0.6s, logo-orbit-spin 6s ease-in-out infinite 1.8s;
}

.brand-logo .logo-node {
  fill: rgba(90, 245, 255, 0.9);
  stroke: none;
  transform-origin: 52px 52px;
  transform: scale(0);
  animation: logo-node-pop 0.6s ease forwards 1.2s, logo-node-pulse 2.6s ease-in-out infinite 1.8s;
}

@keyframes logo-ring-draw {
  0% {
    stroke-dashoffset: 176;
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes logo-glyph-draw {
  0% {
    stroke-dashoffset: 150;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes logo-orbit-draw {
  0% {
    stroke-dashoffset: 96;
    opacity: 0;
  }
  60% {
    opacity: 0.8;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0.8;
  }
}

@keyframes logo-orbit-spin {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-6deg);
  }
}

@keyframes logo-node-pop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes logo-node-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.16);
    opacity: 0.75;
  }
}

.brand-name {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.16em;
  font-size: 1rem;
}

.masthead-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.translate-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 0.86rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.translate-btn:hover,
.translate-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  outline: none;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  outline: none;
}

.icon-btn .icon {
  width: 20px;
  height: 20px;
  display: block;
}

.icon-btn .icon * {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.icon-btn.primary:hover,
.icon-btn.primary:focus-visible {
  color: #fff;
}

.theme-toggle .icon { display: none; }
.theme-toggle[data-next="light"] .icon-sun { display: block; }
.theme-toggle[data-next="dark"] .icon-moon { display: block; }

.page-grid {
  display: grid;
  gap: clamp(2.2rem, 5vw, 3.2rem);
}

.hero {
  display: grid;
  gap: 1.4rem;
}

.hero-copy {
  display: grid;
  gap: 1rem;
}

.hero h1 {
  font-family: var(--mono);
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  line-height: 1.15;
}

.hero-lede {
  color: var(--muted);
  font-size: 1.02rem;
}

.about-section {
  display: grid;
}

.about-card {
  padding: clamp(1.6rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);
  display: grid;
  gap: 1.1rem;
  box-shadow: var(--shadow-soft);
}

.about-card p {
  color: var(--muted);
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.skill {
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.services {
  display: grid;
  gap: 1.6rem;
}

.section-heading h2 {
  font-family: var(--mono);
  font-size: clamp(1.9rem, 3.5vw, 2.3rem);
  line-height: 1.2;
  text-align: left;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1.1rem, 3vw, 1.6rem);
}

.service-card {
  padding: clamp(1.4rem, 3vw, 1.9rem);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--card);
  display: grid;
  gap: 0.7rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease;
}

.service-card:hover,
.service-card:focus-within {
  transform: translateY(-3px);
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

.service-card p {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1.2rem;
  padding-top: 1.6rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-top h2 {
  font-family: var(--mono);
  letter-spacing: 0.2em;
  font-size: 1rem;
}

.footer-btn {
  padding-inline: 1.1rem;
}

@media (max-width: 720px) {
  .masthead {
    flex-direction: column;
    align-items: flex-start;
  }

  .masthead-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .translate-btn,
  .icon-btn {
    flex: 1 1 auto;
    width: auto;
  }

  .icon-btn {
    padding: 0.55rem 1rem;
  }

  .icon-btn .icon {
    width: 18px;
    height: 18px;
  }
}

body[data-theme='dark'] {
  background: #0b0f1e;
  color: #eef2ff;
}

body[data-theme='dark']::before {
  background: radial-gradient(circle at 18% 20%, rgba(86, 112, 255, 0.22), transparent 55%),
    radial-gradient(circle at 80% 8%, rgba(86, 112, 255, 0.18), transparent 62%);
}

body[data-theme='dark'] .brand-logo {
  filter: drop-shadow(0 18px 32px rgba(90, 245, 255, 0.35));
}

body[data-theme='dark'] .brand-logo .logo-orbit {
  stroke: rgba(90, 245, 255, 0.9);
}

body[data-theme='dark'] .brand-logo .logo-node {
  fill: rgba(90, 245, 255, 0.95);
}

body[data-theme='dark'] .translate-btn {
  border-color: rgba(238, 242, 255, 0.18);
  color: rgba(238, 242, 255, 0.78);
}

body[data-theme='dark'] .translate-btn:hover,
body[data-theme='dark'] .translate-btn:focus-visible {
  border-color: rgba(238, 242, 255, 0.4);
  color: #fff;
}

body[data-theme='dark'] .icon-btn {
  border-color: rgba(238, 242, 255, 0.18);
  color: rgba(238, 242, 255, 0.82);
  box-shadow: none;
}

body[data-theme='dark'] .icon-btn:hover,
body[data-theme='dark'] .icon-btn:focus-visible {
  border-color: rgba(238, 242, 255, 0.4);
  color: #fff;
}

body[data-theme='dark'] .icon-btn.primary {
  background: #eef2ff;
  border-color: #eef2ff;
  color: #0b0f1e;
}

body[data-theme='dark'] .icon-btn.primary:hover,
body[data-theme='dark'] .icon-btn.primary:focus-visible {
  color: #0b0f1e;
}

body[data-theme='dark'] .about-card,
body[data-theme='dark'] .service-card {
  background: rgba(17, 21, 42, 0.92);
  border-color: rgba(238, 242, 255, 0.1);
  color: #eef2ff;
  box-shadow: 0 28px 60px -38px rgba(0, 0, 0, 0.65);
}

body[data-theme='dark'] .about-card p,
body[data-theme='dark'] .service-card p,
body[data-theme='dark'] .hero-lede,
body[data-theme='dark'] .site-footer {
  color: rgba(226, 233, 255, 0.72);
}

body[data-theme='dark'] .skill {
  border-color: rgba(238, 242, 255, 0.2);
  color: rgba(238, 242, 255, 0.7);
}

body[data-theme='dark'] .site-footer {
  border-top-color: rgba(238, 242, 255, 0.2);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
.hero-title {
  display: inline-flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.hero-word {
  position: relative;
  display: inline-block;
  opacity: 1;
  transform: none;
}

.hero-word::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, rgba(90, 245, 255, 0.15), rgba(90, 245, 255, 0));
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
}

.hero-word.animate {
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  animation: hero-word-in 0.8s ease forwards;
}

.hero-word.animate:nth-child(1) {
  animation-delay: 0.15s;
}

.hero-word.animate:nth-child(2) {
  animation-delay: 0.35s;
}

.hero-word.animate:nth-child(3) {
  animation-delay: 0.55s;
}

.hero-word.animate:nth-child(1)::after {
  animation: hero-word-underline 0.6s ease forwards;
  animation-delay: 0.15s;
}





@keyframes hero-word-in {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.92);
  }
  45% {
    transform: translateY(-6px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hero-word-underline {
  0% {
    transform: scaleX(0);
    opacity: 0;
  }
  100% {
    transform: scaleX(1);
    opacity: 1;
  }
}

body[data-theme='dark'] .hero-word::after {
  background: linear-gradient(90deg, rgba(90, 245, 255, 0.35), rgba(90, 245, 255, 0));
}


