:root {
  --ink: #17221d;
  --muted: #657169;
  --paper: #f5f3ec;
  --line: rgba(23, 34, 29, 0.13);
  --warm: #e9a83a;
  --deep: #143429;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(23,34,29,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,34,29,.035) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
main { position: relative; overflow: hidden; min-height: 100vh; }
.shell { width: min(1160px, calc(100% - 48px)); margin: 0 auto; position: relative; z-index: 1; }
.ambient { position: absolute; border-radius: 999px; filter: blur(2px); pointer-events: none; }
.ambient-one { width: 480px; height: 480px; right: -180px; top: 70px; background: radial-gradient(circle, rgba(229,166,55,.18), transparent 67%); }
.ambient-two { width: 380px; height: 380px; left: -190px; top: 640px; background: radial-gradient(circle, rgba(35,97,76,.1), transparent 68%); }

.nav { height: 108px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; color: #f8f4e9; background: var(--deep); border-radius: 3px 13px 3px 3px; font-family: Georgia, serif; font-size: 20px; box-shadow: 0 7px 18px rgba(20,52,41,.16); }
.brand strong { display: block; font-family: Georgia, "Songti SC", serif; font-size: 20px; letter-spacing: .12em; }
.brand small { display: block; margin-top: 3px; color: #8b948e; font-size: 8px; letter-spacing: .33em; }
.nav-note { display: flex; align-items: center; gap: 9px; color: #59655e; font-size: 13px; letter-spacing: .12em; }
.nav-note i, .terminal-foot i, .unavailable i { width: 7px; height: 7px; border-radius: 50%; background: #4a8f69; box-shadow: 0 0 0 4px rgba(74,143,105,.12); }

.hero { min-height: 560px; padding: 94px 0 85px; display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 90px; }
.eyebrow { display: flex; align-items: center; gap: 15px; color: #897558; font-size: 10px; letter-spacing: .3em; font-weight: 700; }
.eyebrow b { display: inline-block; width: 62px; height: 1px; background: #c9aa73; }
h1 { margin: 25px 0 24px; max-width: 720px; font-family: Georgia, "STSong", "Songti SC", serif; font-weight: 500; font-size: clamp(46px, 5.4vw, 75px); line-height: 1.18; letter-spacing: -.04em; }
h1 em { color: #305f4d; font-style: normal; }
.intro { margin: 0; color: var(--muted); font-size: 16px; line-height: 2; letter-spacing: .03em; }
.explore { width: fit-content; margin-top: 35px; padding-bottom: 7px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid #9aa29d; font-size: 13px; letter-spacing: .1em; transition: color .2s, border-color .2s; }
.explore span { color: #a16c20; font-size: 17px; }
.explore:hover { color: #a16c20; border-color: #a16c20; }

.terminal-card { border: 1px solid rgba(255,255,255,.09); border-radius: 12px; overflow: hidden; color: #e8eee9; background: #16231e; box-shadow: 0 30px 65px rgba(20,36,29,.2); transform: rotate(1.4deg); }
.terminal-bar { height: 50px; padding: 0 17px; display: flex; align-items: center; gap: 7px; background: #1d2d26; border-bottom: 1px solid rgba(255,255,255,.07); }
.terminal-bar span { width: 8px; height: 8px; border-radius: 50%; background: #d67566; }
.terminal-bar span:nth-child(2) { background: #d5ae59; }
.terminal-bar span:nth-child(3) { background: #75a881; }
.terminal-bar b { margin-left: auto; color: #7f9489; font: 500 10px/1 Consolas, monospace; letter-spacing: .06em; }
.terminal-body { padding: 33px 31px 29px; font: 13px/1.6 Consolas, "Courier New", monospace; }
.terminal-body p { margin: 0 0 4px; color: #98a89f; }
.terminal-body p:not(:first-child) { margin-top: 22px; }
.terminal-body p i { color: #e4b45a; font-style: normal; }
.terminal-body strong { color: #e4eae6; font-weight: 400; }
.cursor { width: 7px; height: 14px; margin-left: 5px; display: inline-block; vertical-align: -2px; background: #d6a94f; animation: blink 1.1s step-end infinite; }
.terminal-foot { padding: 15px 21px; display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.07); color: #71867a; font: 9px/1 Consolas, monospace; letter-spacing: .11em; }
.terminal-foot span { display: flex; align-items: center; gap: 8px; }
.terminal-foot i { width: 5px; height: 5px; box-shadow: none; }
@keyframes blink { 50% { opacity: 0; } }

.projects { padding: 90px 0 110px; border-top: 1px solid var(--line); }
.section-head { margin-bottom: 37px; display: flex; align-items: flex-end; justify-content: space-between; }
.section-head > div { display: flex; align-items: baseline; gap: 20px; }
.section-number { color: #ad7e37; font: 700 10px/1 Consolas, monospace; letter-spacing: .15em; }
h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 33px; font-weight: 500; letter-spacing: .08em; }
.section-head p { margin: 0 0 4px; color: #8a938d; font-size: 12px; letter-spacing: .05em; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service-card { min-height: 340px; padding: 27px 27px 25px; display: flex; flex-direction: column; position: relative; overflow: hidden; background: rgba(255,255,255,.58); border: 1px solid rgba(23,34,29,.1); transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease; }
.service-card::before { content: ""; width: 150px; height: 150px; position: absolute; right: -92px; top: -91px; border-radius: 50%; background: var(--card-accent); opacity: .11; transition: transform .35s ease; }
.service-card:hover { transform: translateY(-6px); border-color: rgba(23,34,29,.18); box-shadow: 0 20px 40px rgba(36,48,42,.09); }
.service-card:hover::before { transform: scale(1.4); }
.service-card.amber { --card-accent: #d7922a; }
.service-card.green { --card-accent: #2f7659; }
.service-card.blue { --card-accent: #547d91; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.card-index { color: #9ca39f; font: 9px/1 Consolas, monospace; letter-spacing: .14em; }
.card-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--card-accent); font-size: 21px; background: rgba(255,255,255,.35); }
.card-copy { margin-top: 52px; }
.card-label { color: var(--card-accent); font-size: 10px; font-weight: 700; letter-spacing: .22em; }
.card-copy h3 { margin: 9px 0 13px; font-family: Georgia, "Songti SC", serif; font-size: 25px; font-weight: 500; letter-spacing: .02em; }
.card-copy p { max-width: 260px; margin: 0; color: #7a847e; font-size: 13px; line-height: 1.8; }
.card-foot { margin-top: auto; padding-top: 22px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
.unavailable { display: flex; align-items: center; gap: 8px; color: #8b948e; font-size: 10px; letter-spacing: .12em; }
.unavailable i { width: 5px; height: 5px; background: #a4aaa6; box-shadow: none; }
.arrow { color: #a3aaa6; font-size: 17px; opacity: .5; }

.about { margin-bottom: 110px; padding: 78px 75px; text-align: center; color: #eaf0eb; background: #183229; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.about-kicker { color: #8ca398; font: 700 9px/1 Consolas, monospace; letter-spacing: .3em; }
.about p { margin: 24px auto 27px; font-family: Georgia, "Songti SC", serif; font-size: clamp(25px, 3.2vw, 39px); line-height: 1.55; }
.about p em { color: #e5bd6a; font-style: normal; }
.about-meta { display: flex; align-items: center; justify-content: center; gap: 16px; color: #9dafaa; font-size: 10px; letter-spacing: .16em; }
.about-meta b { color: #d6ae5d; }

footer { background: rgba(231,229,220,.8); border-top: 1px solid var(--line); }
.footer-inner { min-height: 82px; display: flex; align-items: center; gap: 13px; color: #818a84; font-size: 11px; letter-spacing: .05em; }
.footer-dot { width: 3px; height: 3px; border-radius: 50%; background: #a7ada9; }
.footer-inner a { margin-left: auto; transition: color .2s; }
.footer-inner a:hover { color: #9a6924; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 55px; padding-top: 70px; }
  .terminal-card { width: min(460px, 100%); transform: none; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 290px; }
  .card-copy { margin-top: 35px; }
}

@media (max-width: 600px) {
  .shell { width: min(100% - 30px, 1160px); }
  .nav { height: 86px; }
  .nav-note { display: none; }
  .hero { padding: 65px 0 75px; }
  h1 { font-size: 43px; }
  .intro { font-size: 14px; }
  .desktop-break { display: none; }
  .terminal-body { padding: 27px 23px; }
  .projects { padding: 72px 0 80px; }
  .section-head { align-items: flex-start; gap: 20px; }
  .section-head > div { display: block; }
  .section-number { display: block; margin-bottom: 10px; }
  .section-head p { max-width: 130px; text-align: right; line-height: 1.7; }
  .about { margin-bottom: 75px; padding: 58px 20px; }
  .about-meta { gap: 9px; flex-wrap: wrap; }
  .footer-inner { padding: 24px 0; min-height: 0; justify-content: center; flex-wrap: wrap; text-align: center; }
  .footer-inner a { width: 100%; margin-left: 0; margin-top: 5px; }
}

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