:root {
  --bg: #0b1015;
  --bg-soft: #101820;
  --bg-card: #141e28;
  --line: #22303d;
  --green: #00ed64;
  --green-dim: #00b84f;
  --green-glow: rgba(0, 237, 100, 0.18);
  --text: #e6edf3;
  --text-dim: #8b9aa8;
  --amber: #ffc86b;
  --mono: "SF Mono", "Fira Code", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  overflow-x: hidden;
}

::selection { background: var(--green); color: #06110b; }

/* ---------- Nav ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 6vw;
  background: rgba(11, 16, 21, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
nav.scrolled { border-bottom-color: var(--line); }
.logo {
  font-family: var(--mono); font-size: 1rem; font-weight: 700;
  color: var(--text); text-decoration: none; letter-spacing: .02em;
}
.logo span { color: var(--green); }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--text-dim); text-decoration: none; font-size: .9rem;
  transition: color .2s;
}
.nav-links a:hover { color: var(--green); }
.nav-links a .ext-arrow {
  display: inline-block; font-size: .78em; color: var(--green);
  transition: transform .2s ease;
}
.nav-links a:hover .ext-arrow { transform: translate(2px, -2px); }
.nav-links a.active { color: var(--green); position: relative; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px;
  background: var(--green); border-radius: 2px;
}
@media (max-width: 980px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: .82rem; }
}
@media (max-width: 760px) { .nav-links { display: none; } }

/* ---------- Hero ---------- */
header {
  min-height: 100vh;
  display: grid; place-items: center;
  position: relative;
  padding: 120px 6vw 60px;
  background:
    radial-gradient(ellipse 60% 45% at 70% 20%, var(--green-glow), transparent 70%),
    radial-gradient(ellipse 50% 40% at 15% 85%, rgba(0, 184, 79, .08), transparent 70%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 6vw;
  align-items: center; max-width: 1200px; width: 100%;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.kicker {
  font-family: var(--mono); color: var(--green); font-size: .85rem;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.kicker::before { content: ""; width: 34px; height: 1px; background: var(--green); display: inline-block; }

h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  line-height: 1.08; font-weight: 800; letter-spacing: -0.02em;
  margin-bottom: 22px;
}
h1 em { font-style: normal; color: var(--green); }

.hero-sub {
  color: var(--text-dim); font-size: 1.12rem; max-width: 46ch; margin-bottom: 34px;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 8px; font-size: .95rem; font-weight: 600;
  text-decoration: none; transition: transform .15s, box-shadow .15s, background .2s;
  cursor: pointer; border: none; font-family: var(--sans);
}
.btn-primary { background: var(--green); color: #06110b; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px var(--green-glow); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }

/* hero terminal */
.terminal {
  background: #0d1319; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  overflow: hidden; font-family: var(--mono); font-size: .82rem;
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
  transition: transform .4s;
}
.terminal:hover { transform: perspective(1200px) rotateY(0) rotateX(0); }
.term-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; background: #131c26; border-bottom: 1px solid var(--line);
}
.term-bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.term-bar i:nth-child(1) { background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 8px; color: var(--text-dim); font-size: .75rem; }
.term-body { padding: 16px 18px; min-height: 300px; max-height: 340px; overflow-y: auto; }
.term-body .ln { white-space: pre-wrap; word-break: break-word; margin-bottom: 2px; }
.prompt { color: var(--green); }
.t-key { color: #79c0ff; }
.t-str { color: var(--amber); }
.t-dim { color: var(--text-dim); }
.term-input-row { display: flex; gap: 0; align-items: baseline; }
.term-input {
  background: transparent; border: none; outline: none; color: var(--text);
  font-family: var(--mono); font-size: .82rem; flex: 1; caret-color: var(--green);
}
.cursor {
  display: inline-block; width: 8px; height: 15px; background: var(--green);
  vertical-align: text-bottom; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.term-hint {
  padding: 8px 18px 12px; color: var(--text-dim); font-size: .72rem;
  border-top: 1px dashed var(--line);
}
.term-hint code { color: var(--green); }

/* ---------- Sections ---------- */
section { padding: 100px 6vw; max-width: 1200px; margin: 0 auto; }
.section-kicker {
  font-family: var(--mono); color: var(--green); font-size: .8rem;
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px;
}
h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800;
  letter-spacing: -0.02em; margin-bottom: 16px;
}
h2 em { font-style: normal; color: var(--green); }
.section-sub { color: var(--text-dim); max-width: 60ch; margin-bottom: 52px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Books ---------- */
.books-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
}
@media (max-width: 900px) { .books-grid { grid-template-columns: 1fr; } }

.book-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px;
  padding: 40px; display: grid; grid-template-columns: 168px 1fr; gap: 32px;
  align-items: start; position: relative; overflow: hidden;
  transition: border-color .3s, transform .3s;
}
.book-card:hover { border-color: var(--green-dim); transform: translateY(-4px); }
@media (max-width: 560px) { .book-card { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

/* CSS 3D hardcover book */
.book3d { width: 150px; perspective: 1100px; position: relative; }
.book3d::after {
  /* floor shadow */
  content: ""; position: absolute; left: -14%; right: -20%; bottom: -26px; height: 26px;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, .55), transparent 66%);
  filter: blur(5px);
  transition: transform .6s ease, opacity .6s ease;
}
.book-card:hover .book3d::after { transform: scaleX(.9); opacity: .75; }

.book3d .vol {
  --w: 150px; --h: 216px; --t: 34px;
  position: relative; width: var(--w); height: var(--h);
  transform-style: preserve-3d;
  transform: rotateX(-4deg) rotateY(28deg);
  transition: transform .6s cubic-bezier(.22, 1, .36, 1);
}
.book-card:hover .vol { transform: rotateX(-2deg) rotateY(13deg); }

.vol .face { position: absolute; backface-visibility: hidden; }

/* front board */
.vol .front {
  inset: 0; transform: translateZ(calc(var(--t) / 2));
  border-radius: 2px 5px 5px 2px; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.vol .front img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vol .front::after {
  /* hinge groove near the spine + gloss sweep */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.2) 3%, rgba(255,255,255,.16) 5%, rgba(0,0,0,.14) 7%, transparent 11%),
    linear-gradient(118deg, transparent 34%, rgba(255,255,255,.09) 46%, transparent 56%);
  pointer-events: none;
}

/* back board */
.vol .back {
  inset: 0; transform: rotateY(180deg) translateZ(calc(var(--t) / 2));
  border-radius: 5px 2px 2px 5px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}
.cover-1 .back { background: linear-gradient(210deg, #0e3a24, #05160d); }
.cover-2 .back { background: linear-gradient(210deg, #12283f, #070f1a); }

/* spine */
.vol .spine {
  top: 0; left: 0; width: var(--t); height: 100%;
  transform-origin: left center;
  transform: translateZ(calc(var(--t) / -2)) rotateY(-90deg);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 16px 0 12px; overflow: hidden;
  box-shadow: inset -3px 0 7px rgba(0, 0, 0, .5), inset 3px 0 7px rgba(0, 0, 0, .5);
}
.cover-1 .spine { background: linear-gradient(180deg, #10412a, #071f13 70%, #05160d); }
.cover-2 .spine { background: linear-gradient(180deg, #163654, #0a1626 70%, #070f1a); }
.spine-title {
  writing-mode: vertical-rl; white-space: nowrap;
  font-weight: 700; font-size: .52rem; letter-spacing: .08em; color: #eef7f0;
}
.spine-author {
  font-family: var(--mono); font-size: .42rem; letter-spacing: .06em; color: var(--green);
}

/* page-block edges (inset so the boards overhang like a real hardcover) */
.vol .pages {
  top: 3px; right: 0; width: calc(var(--t) - 6px); height: calc(100% - 6px);
  transform-origin: right center;
  transform: translateZ(calc((var(--t) - 6px) / -2)) rotateY(90deg);
  background: repeating-linear-gradient(90deg, #f4efe2 0 2px, #d9d3c0 2px 3px);
}
.vol .pages-top {
  top: 0; left: 2px; width: calc(100% - 5px); height: calc(var(--t) - 6px);
  transform-origin: center top;
  transform: translateZ(calc((var(--t) - 6px) / -2)) rotateX(90deg);
  background: repeating-linear-gradient(180deg, #f7f2e5 0 2px, #ded8c5 2px 3px);
}

.badge {
  display: inline-block; font-family: var(--mono); font-size: .68rem;
  letter-spacing: .08em; text-transform: uppercase; padding: 5px 12px;
  border-radius: 100px; margin-bottom: 14px;
}
.badge-live { background: rgba(0,237,100,.12); color: var(--green); border: 1px solid rgba(0,237,100,.35); }
.badge-soon { background: rgba(255,200,107,.1); color: var(--amber); border: 1px solid rgba(255,200,107,.3); }
.badge-gold { background: rgba(255,153,0,.12); color: #ff9900; border: 1px solid rgba(255,153,0,.4); }

.book-card h3 { font-size: 1.45rem; font-weight: 700; margin-bottom: 10px; letter-spacing: -.01em; }
.book-card p { color: var(--text-dim); font-size: .95rem; margin-bottom: 18px; }

.progress-wrap { margin: 6px 0 20px; }
.progress-label {
  display: flex; justify-content: space-between; font-family: var(--mono);
  font-size: .72rem; color: var(--text-dim); margin-bottom: 7px;
}
.progress-label b { color: var(--amber); }
.progress-track { height: 7px; background: var(--line); border-radius: 100px; overflow: hidden; }
.progress-fill {
  height: 100%; width: 0; border-radius: 100px;
  background: linear-gradient(90deg, var(--green-dim), var(--green));
  transition: width 1.4s cubic-bezier(.22,1,.36,1);
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  font-family: var(--mono); font-size: .72rem; color: var(--text-dim);
  border: 1px solid var(--line); padding: 4px 11px; border-radius: 100px;
  transition: color .2s, border-color .2s;
}
.chip:hover { color: var(--green); border-color: var(--green-dim); }

/* ---------- Chapters accordion ---------- */
.accordion { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.acc-item + .acc-item { border-top: 1px solid var(--line); }
.acc-head {
  width: 100%; background: var(--bg-card); border: none; cursor: pointer;
  display: flex; align-items: center; gap: 18px; padding: 20px 26px;
  color: var(--text); font-family: var(--sans); font-size: 1rem; font-weight: 600;
  text-align: left; transition: background .2s;
}
.acc-head:hover { background: #182430; }
.acc-num { font-family: var(--mono); color: var(--green); font-size: .8rem; min-width: 30px; }
.acc-arrow { margin-left: auto; color: var(--text-dim); transition: transform .3s; font-size: .8rem; }
.acc-item.open .acc-arrow { transform: rotate(180deg); color: var(--green); }
.acc-body {
  max-height: 0; overflow: hidden; transition: max-height .4s ease;
  background: var(--bg-soft);
}
.acc-body-inner { padding: 4px 26px 24px 74px; color: var(--text-dim); font-size: .93rem; }
@media (max-width: 560px) { .acc-body-inner { padding-left: 26px; } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid p { color: var(--text-dim); margin-bottom: 16px; }
.about-grid p strong { color: var(--text); }

/* Author photo (drop img/author.jpg and add .author-photo img) */
.author-photo {
  width: 180px; height: 180px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--green-dim); box-shadow: 0 12px 40px rgba(0,0,0,.4);
  margin-bottom: 24px;
}

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stat {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px;
  padding: 28px 24px; transition: border-color .3s;
}
.stat:hover { border-color: var(--green-dim); }
.stat b {
  display: block; font-size: 2.2rem; font-weight: 800; color: var(--green);
  font-family: var(--mono); letter-spacing: -.02em;
}
.stat span { color: var(--text-dim); font-size: .85rem; }

/* ---------- Contact ---------- */
.contact-card {
  background: linear-gradient(135deg, var(--bg-card), #101d16);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 64px 6vw; text-align: center;
  position: relative; overflow: hidden;
}
.contact-card::before {
  content: ""; position: absolute; inset: -40%;
  background: radial-gradient(circle at 50% 120%, var(--green-glow), transparent 55%);
  pointer-events: none;
}
.contact-card h2, .contact-card p, .contact-card .btn-row { position: relative; }
.contact-icon {
  position: relative;
  display: grid; place-items: center;
  width: 78px; height: 78px; margin: 0 auto 22px;
  border-radius: 50%; font-size: 2.2rem; text-decoration: none;
  color: var(--green);
  background: rgba(0, 237, 100, .1); border: 1px solid rgba(0, 237, 100, .3);
  transition: transform .3s ease, box-shadow .3s ease;
}
.contact-icon:hover { transform: scale(1.12) rotate(-8deg); box-shadow: 0 12px 34px rgba(0, 237, 100, .18); }
.contact-card p { color: var(--text-dim); max-width: 52ch; margin: 0 auto 32px; }
.contact-card .btn-row { justify-content: center; }

footer {
  border-top: 1px solid var(--line); padding: 34px 6vw;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  color: var(--text-dim); font-size: .82rem;
}
footer .f-mono { font-family: var(--mono); }
footer .f-mono span { color: var(--green); }
footer .f-social {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--text-dim); text-decoration: none; font-size: .82rem;
  transition: color .2s;
}
footer .f-social svg { width: 20px; height: 20px; display: block; transition: transform .2s; }
footer .f-social:hover { color: #70b5f9; }
footer .f-social:hover svg { transform: scale(1.12); }

/* toast */
#toast {
  position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 80px);
  background: var(--bg-card); border: 1px solid var(--green-dim); color: var(--text);
  padding: 12px 22px; border-radius: 10px; font-size: .88rem; z-index: 200;
  opacity: 0; transition: transform .35s ease, opacity .35s ease; pointer-events: none;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Book detail pages ---------- */
/* hover works outside .book-card too (e.g. detail-page hero, linked covers) */
.book3d:hover .vol, a:hover > .book3d .vol { transform: rotateX(-2deg) rotateY(13deg); }
.book3d:hover::after, a:hover > .book3d::after { transform: scaleX(.9); opacity: .75; }
.book-link { text-decoration: none; display: inline-block; }

.book-hero {
  max-width: 1200px; margin: 0 auto;
  padding: 170px 6vw 90px;
  display: grid; grid-template-columns: 320px 1fr; gap: 6vw; align-items: center;
}
@media (max-width: 900px) {
  .book-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-top: 140px; }
  .book-hero .btn-row, .book-hero .meta-row { justify-content: center; }
}
.book-hero .book3d { width: 230px; margin: 0 auto; }
.book-hero .vol { --w: 230px; --h: 330px; --t: 48px; }
.book-hero .spine-title { font-size: .72rem; }
.book-hero .spine-author { font-size: .55rem; }
.book-hero h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }

.breadcrumb {
  font-family: var(--mono); font-size: .78rem; margin-bottom: 20px; display: inline-block;
  color: var(--text-dim); text-decoration: none; transition: color .2s;
}
.breadcrumb:hover { color: var(--green); }
.breadcrumb span { color: var(--green); }

.book-tagline { color: var(--text-dim); font-size: 1.1rem; max-width: 52ch; margin-bottom: 26px; }
.book-tagline strong { color: var(--text); }

.meta-row { display: flex; flex-wrap: wrap; gap: 14px 38px; margin-bottom: 32px; }
.meta-item b { display: block; font-family: var(--mono); color: var(--green); font-size: .95rem; }
.meta-item span { color: var(--text-dim); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-family: var(--mono); }

.learn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.learn-item {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px;
  padding: 26px 24px; transition: border-color .3s, transform .3s;
}
.learn-item:hover { border-color: var(--green-dim); transform: translateY(-3px); }
.learn-item .li-icon { font-size: 1.3rem; margin-bottom: 10px; display: block; }
.learn-item h4 { font-size: 1rem; margin-bottom: 6px; }
.learn-item p { color: var(--text-dim); font-size: .88rem; }

.author-strip {
  display: flex; gap: 28px; align-items: center;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px;
  padding: 30px 34px;
}
.author-strip img {
  width: 92px; height: 92px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--green-dim); flex-shrink: 0;
}
.author-strip p { color: var(--text-dim); font-size: .93rem; }
.author-strip b { color: var(--text); }
@media (max-width: 560px) { .author-strip { flex-direction: column; text-align: center; } }

/* ---------- Books listing page ---------- */
.page-head { padding-top: 170px; padding-bottom: 30px; }
.book-list { display: grid; gap: 40px; }
.book-list .book-card { grid-template-columns: 250px 1fr; gap: 48px; align-items: center; }
.book-list .book3d { width: 190px; margin: 0 auto; }
.book-list .vol { --w: 190px; --h: 274px; --t: 40px; }
.book-list .spine-title { font-size: .62rem; }
.book-list h3 a { color: inherit; text-decoration: none; transition: color .2s; }
.book-list h3 a:hover { color: var(--green); }
.book-list .meta-row { margin-bottom: 24px; gap: 12px 30px; }
@media (max-width: 760px) {
  .book-list .book-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .book-list .meta-row, .book-list .chip-row, .book-list .btn-row { justify-content: center; }
}

/* ---------- Best-seller showcase ---------- */
.bestseller-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
@media (max-width: 900px) { .bestseller-grid { grid-template-columns: 1fr; } }
.bestseller-grid h2 em { font-style: normal; color: #ff9900; }
.stars { color: #ff9900; font-size: 1.3rem; letter-spacing: 3px; }
.stars b { color: var(--text); font-family: var(--mono); font-size: .95rem; margin-left: 10px; letter-spacing: normal; }
.bestseller-copy { color: var(--text-dim); max-width: 52ch; margin: 16px 0 28px; }
.bestseller-copy strong { color: var(--text); }

.phone-shots { display: flex; gap: 22px; justify-content: center; align-items: flex-start; }
.phone-shot {
  display: block; width: min(46%, 230px);
  border-radius: 22px; border: 1px solid var(--line); overflow: hidden;
  background: #fff; box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  transition: transform .35s ease, box-shadow .35s ease;
}
.phone-shot img { width: 100%; display: block; }
.phone-shot:first-child { transform: rotate(-2.5deg) translateY(10px); }
.phone-shot:last-child { transform: rotate(2deg); }
.phone-shot:hover { transform: rotate(0) translateY(-6px); box-shadow: 0 26px 60px rgba(0, 0, 0, .55); }
.shot-caption {
  text-align: center; color: var(--text-dim);
  font-family: var(--mono); font-size: .72rem; margin-top: 20px;
}
.shot-caption span { color: #ff9900; }

.desktop-shot {
  display: block; margin-top: 44px;
  border-radius: 14px; border: 1px solid var(--line); overflow: hidden;
  background: #fff; box-shadow: 0 18px 50px rgba(0, 0, 0, .4);
}
.desktop-shot img { width: 100%; display: block; }

/* ---------- Profile page ---------- */
.profile-hero {
  max-width: 1200px; margin: 0 auto;
  padding: 170px 6vw 70px;
  display: grid; grid-template-columns: 250px 1fr; gap: 6vw; align-items: center;
}
@media (max-width: 800px) {
  .profile-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-top: 140px; }
  .profile-hero .btn-row, .profile-hero .contact-chips { justify-content: center; }
}
.profile-photo {
  width: 230px; height: 230px; border-radius: 24px; object-fit: cover;
  border: 2px solid var(--green-dim); box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.profile-hero h1 { font-size: clamp(2.1rem, 4.5vw, 3.1rem); margin-bottom: 12px; }
.profile-role { color: var(--green); font-family: var(--mono); font-size: .92rem; margin-bottom: 16px; }
.profile-intro { color: var(--text-dim); max-width: 60ch; margin-bottom: 22px; }
.profile-intro strong { color: var(--text); }

.contact-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.contact-chips a {
  font-family: var(--mono); font-size: .78rem; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 100px; padding: 6px 14px;
  text-decoration: none; transition: color .2s, border-color .2s;
}
.contact-chips a:hover { color: var(--green); border-color: var(--green-dim); }

.profile-stats { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 800px) { .profile-stats { grid-template-columns: 1fr 1fr; } }

/* career timeline */
.timeline { position: relative; border-left: 2px solid var(--line); margin-left: 8px; display: grid; gap: 38px; padding: 6px 0 6px 34px; }
.tl-item { position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: -41px; top: 7px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 5px rgba(0, 237, 100, .14);
}
.tl-date { font-family: var(--mono); color: var(--green); font-size: .74rem; letter-spacing: .06em; }
.tl-item h4 { font-size: 1.1rem; margin: 4px 0 2px; }
.tl-item .tl-org { color: var(--text-dim); font-size: .85rem; font-family: var(--mono); margin-bottom: 8px; }
.tl-item p { color: var(--text-dim); font-size: .92rem; max-width: 72ch; }
.tl-item p strong { color: var(--text); }

/* credential lists */
.cred-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .cred-cols { grid-template-columns: 1fr; } }
.cred-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; padding: 32px 34px; }
.cred-card h3 { font-size: 1.15rem; margin-bottom: 18px; }
.cred-card ul { list-style: none; display: grid; gap: 11px; }
.cred-card li { color: var(--text-dim); font-size: .92rem; padding-left: 22px; position: relative; }
.cred-card li::before { content: "▹"; color: var(--green); position: absolute; left: 0; }
.cred-card li b { color: var(--text); font-weight: 600; }

/* achievement boxes */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.ach-card {
  position: relative; overflow: hidden; display: block; text-decoration: none;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px;
  padding: 30px 26px 28px;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.reveal.visible .ach-card {
  animation: achIn .7s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: calc(var(--i, 0) * .09s);
}
@keyframes achIn {
  from { opacity: 0; transform: translateY(26px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.ach-card:hover {
  transform: translateY(-6px); border-color: var(--green-dim);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 237, 100, .12);
}
.ach-card::before {
  /* accent bar */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--green), transparent 70%);
  opacity: .75;
}
.ach-card::after {
  /* ghost number */
  content: attr(data-num); position: absolute; right: 16px; top: 8px;
  font-family: var(--mono); font-size: 3.2rem; font-weight: 800; line-height: 1;
  color: rgba(255, 255, 255, .045); pointer-events: none;
}
.ach-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.35rem;
  background: rgba(0, 237, 100, .1); border: 1px solid rgba(0, 237, 100, .25);
  margin-bottom: 16px; transition: transform .3s ease;
}
.ach-card:hover .ach-icon { transform: rotate(-8deg) scale(1.12); }
.ach-tag {
  display: block; font-family: var(--mono); font-size: .66rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--green);
  margin-bottom: 8px;
}
.ach-card h4 { color: var(--text); font-size: 1.08rem; margin-bottom: 8px; letter-spacing: -.01em; }
.ach-card p { color: var(--text-dim); font-size: .88rem; line-height: 1.6; margin: 0; }
.ach-card p b { color: var(--text); }
/* gold variant for the best-seller cards */
.ach-gold::before { background: linear-gradient(90deg, #ff9900, transparent 70%); }
.ach-gold .ach-icon { background: rgba(255, 153, 0, .1); border-color: rgba(255, 153, 0, .3); }
.ach-gold .ach-tag { color: #ff9900; }
.ach-gold:hover {
  border-color: rgba(255, 153, 0, .45);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 153, 0, .14);
}
.ach-tag.wip { color: var(--amber); }

/* certifications list variants */
.cred-card ul.cert-2col { grid-template-columns: 1fr 1fr; column-gap: 40px; }
@media (max-width: 760px) { .cred-card ul.cert-2col { grid-template-columns: 1fr; } }
.cred-card li a { color: var(--green); }

.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.edu-card {
  position: relative; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px;
  padding: 30px 28px 26px;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.reveal.visible .edu-card {
  animation: achIn .7s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: calc(var(--i, 0) * .12s);
}
.edu-card:hover {
  transform: translateY(-6px); border-color: var(--green-dim);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 237, 100, .12);
}
.edu-card::before {
  /* accent bar */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--green), transparent 70%); opacity: .75;
}
.edu-card::after {
  /* graduation-cap watermark */
  content: "🎓"; position: absolute; right: -6px; bottom: -14px;
  font-size: 4.6rem; opacity: .06; pointer-events: none;
  transform: rotate(-12deg); transition: transform .4s ease, opacity .4s ease;
}
.edu-card:hover::after { transform: rotate(0deg) scale(1.08); opacity: .1; }
.edu-mono {
  width: 56px; height: 56px; border-radius: 14px;
  display: grid; place-items: center;
  font-family: var(--mono); font-weight: 700; font-size: .78rem; letter-spacing: .03em;
  color: var(--green); background: rgba(0, 237, 100, .08); border: 1px solid rgba(0, 237, 100, .25);
  margin-bottom: 18px; transition: transform .3s ease;
}
.edu-card:hover .edu-mono { transform: rotate(-6deg) scale(1.1); }
.edu-card b { display: block; font-size: 1.14rem; margin-bottom: 4px; letter-spacing: -.01em; }
.edu-degree { display: block; font-family: var(--mono); color: var(--green); font-size: .8rem; margin-bottom: 12px; }
.edu-card p { color: var(--text-dim); font-size: .88rem; line-height: 1.6; margin: 0 0 18px; }
.edu-tag {
  display: inline-block; font-family: var(--mono); font-size: .68rem; letter-spacing: .06em;
  color: var(--text-dim); border: 1px solid var(--line); border-radius: 100px; padding: 5px 13px;
}
.edu-tag.edu-live { color: var(--amber); border-color: rgba(255, 200, 107, .35); background: rgba(255, 200, 107, .07); }

/* ---------- Gallery pages ---------- */
.gallery-cols { columns: 3 300px; column-gap: 22px; }
.g-item {
  display: block; break-inside: avoid; margin-bottom: 22px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; text-decoration: none;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.reveal.visible .g-item {
  animation: achIn .7s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: calc(var(--i, 0) * .08s);
}
.g-item:hover {
  transform: translateY(-5px); border-color: var(--green-dim);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 237, 100, .12);
}
.g-frame { overflow: hidden; position: relative; }
.g-item img { width: 100%; display: block; transition: transform .5s ease; }
.g-item:hover img { transform: scale(1.045); }
.g-frame::after {
  /* zoom hint */
  content: "⤢"; position: absolute; right: 12px; top: 12px;
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; font-size: .9rem;
  background: rgba(11, 16, 21, .65); color: var(--green);
  opacity: 0; transition: opacity .3s ease;
}
.g-item:hover .g-frame::after { opacity: 1; }
.g-cap { padding: 16px 20px 18px; color: var(--text-dim); font-size: .87rem; line-height: 1.6; }
.g-cap b { color: var(--text); }
.g-tag {
  display: block; font-family: var(--mono); font-size: .64rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--green); margin-bottom: 6px;
}
.gallery-switch { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* two-per-row grid variant: 2 images per row on desktop, 1 on mobile */
.gallery-2col { columns: unset; display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; align-items: start; }
.gallery-2col .g-item { margin-bottom: 0; }
@media (max-width: 700px) { .gallery-2col { grid-template-columns: 1fr; } }
