/* ===== Raynold Gerry — Portfolio (professional theme) ===== */
:root {
  --bg: #0a0d13;
  --bg-soft: #0e121a;
  --bg-card: #12171f;
  --bg-card-2: #151b25;
  --border: #202834;
  --border-soft: #1a212b;
  --text: #eaedf2;
  --text-dim: #a3adbd;
  --text-mute: #6a7688;
  --accent: #6d8cff;
  --accent-strong: #5b7cf7;
  --accent-soft: rgba(109,140,255,.12);
  --ring: rgba(109,140,255,.35);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.28);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.25);
  --radius: 14px;
  --radius-lg: 18px;
  --maxw: 1120px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Sora", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}
:root[data-theme="light"] {
  --bg: #fbfcfe;
  --bg-soft: #ffffff;
  --bg-card: #ffffff;
  --bg-card-2: #f7f9fc;
  --border: #e5e9f0;
  --border-soft: #eef1f6;
  --text: #0f1622;
  --text-dim: #46536a;
  --text-mute: #7a869a;
  --accent: #3a5bd9;
  --accent-strong: #2f4fca;
  --accent-soft: rgba(58,91,217,.09);
  --ring: rgba(58,91,217,.28);
  --shadow: 0 1px 2px rgba(20,40,80,.05), 0 14px 34px rgba(20,40,80,.08);
  --shadow-sm: 0 1px 2px rgba(20,40,80,.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { display: block; }
.ico { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-sm { width: 16px; height: 16px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.eyebrow {
  font-family: var(--sans);
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
h1,h2,h3,h4 { font-family: var(--display); line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; color: var(--text); }
h2.section-title { font-size: clamp(26px, 3.6vw, 36px); margin-bottom: 12px; font-weight: 700; }
.section-lead { color: var(--text-dim); max-width: 600px; font-size: 16.5px; margin-bottom: 48px; }
.accent-text { color: var(--accent); }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(16px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand .dot {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; font-family: var(--display);
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  padding: 8px 14px; border-radius: 9px; color: var(--text-dim); font-weight: 500; font-size: 14.5px;
  transition: color .16s, background .16s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); background: var(--bg-card); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.theme-btn, .burger {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-dim); cursor: pointer;
  display: grid; place-items: center; transition: border-color .16s, color .16s;
}
.theme-btn:hover, .burger:hover { border-color: var(--accent); color: var(--text); }
.theme-btn .i-moon { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-moon { display: block; }
.burger { display: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px;
  padding: 12px 20px; border-radius: 10px; cursor: pointer; border: 1px solid transparent;
  transition: transform .16s, box-shadow .16s, background .16s, border-color .16s, color .16s;
  font-family: var(--sans);
}
.btn .ico { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: 0 8px 22px var(--ring); }
.btn-ghost { border-color: var(--border); background: var(--bg-card); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Hero ===== */
.hero { position: relative; padding: 88px 0 76px; overflow: hidden; border-bottom: 1px solid var(--border-soft); }
.hero::before {
  content: ""; position: absolute; top: -40%; right: -5%; width: 560px; height: 560px;
  background: radial-gradient(circle, var(--accent-soft), transparent 62%); z-index: 0; pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.55fr .85fr; gap: 56px; align-items: center; }
.status-pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text-dim);
  font-size: 13px; font-weight: 500; margin-bottom: 26px;
}
.status-pill .live { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(34,197,94,.45);} 70%{box-shadow:0 0 0 7px rgba(34,197,94,0);} 100%{box-shadow:0 0 0 0 rgba(34,197,94,0);} }
.hero h1 { font-size: clamp(36px, 5.6vw, 58px); margin-bottom: 22px; font-weight: 800; letter-spacing: -.03em; }
.hero p.lead { font-size: clamp(16px, 1.8vw, 19px); color: var(--text-dim); max-width: 560px; margin-bottom: 32px; line-height: 1.65; }
.hero p.lead strong { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Profile card */
.hero-photo-wrap { position: relative; display: grid; place-items: center; }
.profile-card {
  width: 300px; max-width: 100%;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
}
.profile-media { position: relative; }
.profile-media img { width: 100%; height: 268px; object-fit: cover; object-position: center 14%; display: block; }
.profile-media-overlay {
  position: absolute; inset: auto 0 0 0; padding: 40px 20px 16px;
  background: linear-gradient(to top, rgba(6,10,18,.9) 12%, rgba(6,10,18,.4) 55%, transparent);
}
.pm-name { font-family: var(--display); font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.pm-role { font-size: 12.5px; color: #c3ccdb; font-weight: 500; margin-top: 3px; }
.profile-facts { padding: 16px 20px 18px; display: grid; gap: 11px; border-top: 1px solid var(--border-soft); }
.pf { display: flex; align-items: center; gap: 11px; font-size: 13.5px; color: var(--text-dim); }
.pf .ico { width: 16px; height: 16px; color: var(--accent); }

/* ===== Stats ===== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 64px; background: var(--border-soft); border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg); padding: 26px 24px; }
.stat .num { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.stat .label { color: var(--text-mute); font-size: 13.5px; margin-top: 4px; }

/* ===== Cards ===== */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: border-color .18s, transform .18s, box-shadow .18s; position: relative;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); box-shadow: var(--shadow); }
.card .tag-row { display: flex; gap: 7px; flex-wrap: wrap; margin: 16px 0 2px; }
.tag { font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 7px; background: var(--bg-card-2); border: 1px solid var(--border-soft); color: var(--text-dim); }
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; letter-spacing: .01em; }
.badge.live { background: rgba(34,197,94,.1); color: #34d17f; border: 1px solid rgba(34,197,94,.25); }
.badge.live .d { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
.badge.proto { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--ring); }
.card h3 { font-size: 20px; margin: 14px 0 8px; font-weight: 700; }
.card .role { color: var(--text-mute); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.card p { color: var(--text-dim); font-size: 15px; }
.card ul { list-style: none; margin-top: 14px; display: grid; gap: 8px; }
.card ul li { color: var(--text-dim); font-size: 14px; padding-left: 24px; position: relative; }
.card ul li::before { content: ""; position: absolute; left: 3px; top: 8px; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
.card .icon {
  width: 44px; height: 44px; border-radius: 11px; background: var(--accent-soft); border: 1px solid var(--ring);
  display: grid; place-items: center; color: var(--accent);
}
.card .icon .ico { width: 22px; height: 22px; }

/* ===== Skills ===== */
.skill-group { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.skill-group h3 { font-size: 15px; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); }
.skill-group h3 .ico { width: 17px; height: 17px; color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; font-weight: 500; padding: 7px 12px; border-radius: 8px; background: var(--bg-card-2); border: 1px solid var(--border-soft); color: var(--text-dim); }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.prose p { color: var(--text-dim); font-size: 16px; margin-bottom: 18px; line-height: 1.7; }
.prose strong { color: var(--text); font-weight: 600; }
.about-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.about-photo { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.about-photo img { width: 100%; display: block; }
.about-photo.tall { grid-row: span 2; }
.about-photo.tall img { height: 100%; object-fit: cover; }
.photo-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--bg-card); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===== Experience / Education ===== */
.xp { display: grid; gap: 16px; }
.xp-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 26px; transition: border-color .18s; }
.xp-item:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.xp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.xp-head h3 { font-size: 17px; font-weight: 700; }
.xp-head .org { color: var(--accent); font-weight: 500; font-size: 14px; margin-top: 3px; }
.xp-head .period { color: var(--text-mute); font-size: 13px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.xp-item ul { list-style: none; margin-top: 14px; display: grid; gap: 7px; }
.xp-item ul li { color: var(--text-dim); font-size: 14.5px; padding-left: 24px; position: relative; }
.xp-item ul li::before { content: ""; position: absolute; left: 3px; top: 8px; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.edu-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.edu-card .deg { font-size: 16px; font-weight: 700; font-family: var(--display); }
.edu-card .sch { color: var(--accent); font-weight: 500; font-size: 14px; margin: 5px 0; }
.edu-card .meta { color: var(--text-mute); font-size: 13.5px; font-variant-numeric: tabular-nums; }

/* ===== Contact ===== */
.contact-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 48px 40px; text-align: center; }
.contact-methods { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 36px; }
.cm { background: var(--bg-card-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 20px; transition: transform .16s, border-color .16s; display: block; }
.cm:hover { transform: translateY(-2px); border-color: var(--accent); }
.cm .ico { width: 22px; height: 22px; color: var(--accent); margin: 0 auto 12px; }
.cm .k { font-size: 12px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.cm .v { font-size: 14.5px; color: var(--text); font-weight: 500; margin-top: 5px; word-break: break-word; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border-soft); padding: 32px 0; color: var(--text-mute); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 14px; }

/* ===== Page header ===== */
.page-head { padding: 76px 0 20px; }
.page-head h1 { font-size: clamp(30px, 4.6vw, 46px); margin-bottom: 14px; font-weight: 800; letter-spacing: -.03em; }
.page-head p { color: var(--text-dim); font-size: 17px; max-width: 620px; line-height: 1.6; }

/* ===== Motion: scroll reveal ===== */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); transition-delay: var(--d, 0s); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
/* staggered children */
.js .stagger > * { opacity: 0; transform: translateY(22px); transition: opacity .6s cubic-bezier(.22,.61,.36,1), transform .6s cubic-bezier(.22,.61,.36,1); }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(1) { transition-delay: .04s; }
.stagger.in > *:nth-child(2) { transition-delay: .14s; }
.stagger.in > *:nth-child(3) { transition-delay: .24s; }
.stagger.in > *:nth-child(4) { transition-delay: .34s; }

/* Hero animated aurora */
.hero::after {
  content: ""; position: absolute; bottom: -45%; left: -12%; width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(109,140,255,.10), transparent 62%); z-index: 0; pointer-events: none;
  animation: drift 20s ease-in-out infinite alternate;
}
.hero::before { animation: drift2 24s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate(0,0); } to { transform: translate(70px,-44px) scale(1.08); } }
@keyframes drift2 { from { transform: translate(0,0); } to { transform: translate(-50px,40px) scale(1.06); } }

/* Nav scroll polish */
.nav { transition: box-shadow .25s, background .25s; }
.nav.scrolled { box-shadow: 0 1px 0 var(--border-soft), 0 10px 30px rgba(0,0,0,.16); }

/* Card sheen on hover */
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx,50%) var(--my,0%), var(--accent-soft), transparent 40%);
  opacity: 0; transition: opacity .3s;
}
.card:hover::after { opacity: 1; }

/* ===== AI highlight section ===== */
.ai-band {
  position: relative; overflow: hidden;
  background:
    radial-gradient(600px circle at 15% 20%, rgba(109,140,255,.10), transparent 55%),
    radial-gradient(600px circle at 85% 80%, rgba(56,226,195,.07), transparent 55%),
    var(--bg-soft);
  border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft);
}
.ai-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.ai-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid var(--ring); color: var(--accent);
  font-size: 12.5px; font-weight: 600; margin-bottom: 18px;
}
.ai-badge .ico { width: 15px; height: 15px; }
.ai-points { display: grid; gap: 14px; margin-top: 8px; }
.ai-point { display: flex; gap: 14px; align-items: flex-start; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; transition: border-color .2s, transform .2s; }
.ai-point:hover { border-color: var(--ring); transform: translateY(-2px); }
.ai-point .ai-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--ring); display: grid; place-items: center; color: var(--accent); flex: none; }
.ai-point .ai-ic .ico { width: 20px; height: 20px; }
.ai-point h4 { font-size: 15.5px; font-weight: 700; margin-bottom: 3px; }
.ai-point p { color: var(--text-dim); font-size: 14px; line-height: 1.55; }

/* ===== Tech marquee ===== */
.marquee { overflow: hidden; position: relative; padding: 6px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marq 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marq { to { transform: translateX(-50%); } }
.marq-item { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); color: var(--text-dim); font-size: 14px; font-weight: 500; white-space: nowrap; }
.marq-item .dotmark { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ===== AI tool orbit ===== */
.ai-orbit-wrap { margin-top: 34px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.ai-orbit { position: relative; width: 220px; height: 220px; }
.ai-orbit-ring { position: absolute; inset: 4px; border: 1px dashed var(--border); border-radius: 50%; }
.orbit-core {
  position: absolute; top: 50%; left: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px;
  border-radius: 50%; background: var(--accent-soft); border: 1px solid var(--ring);
  display: grid; place-items: center; color: var(--accent); font-weight: 800; font-size: 14px; font-family: var(--display);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 6%, transparent);
}
.orbit-item {
  position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border-radius: 15px; background: var(--bg-card); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); display: grid; place-items: center;
  animation: orbit 18s linear infinite; transition: box-shadow .25s, border-color .25s;
}
.orbit-item svg { width: 28px; height: 28px; }
.orbit-item.p1 { animation-delay: 0s; }
.orbit-item.p2 { animation-delay: -6s; }
.orbit-item.p3 { animation-delay: -12s; }
.ai-orbit:hover .orbit-item { animation-play-state: paused; }
.orbit-item:hover { border-color: currentColor; box-shadow: 0 8px 22px color-mix(in srgb, currentColor 30%, transparent); }
@keyframes orbit {
  from { transform: rotate(0deg) translateX(88px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(88px) rotate(-360deg); }
}
.ai-orbit-caption { font-size: 12.5px; color: var(--text-mute); font-weight: 500; }
/* brand colors */
.brand-openai { color: #10a37f; }
.brand-claude { color: #d97757; }
.orbit-item.orbit-kimi { background: #0b0b0d; border: 1px solid rgba(255,255,255,.16); }
.orbit-item.orbit-kimi .kimi-k { color: #fff; font-family: var(--display); font-weight: 800; font-size: 23px; line-height: 1; }
.orbit-item.orbit-kimi:hover { border-color: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.4); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero::after, .hero::before { animation: none !important; }
  .marquee-track { animation: none !important; }
  .orbit-item { animation: none !important; }
  .orbit-item.p1 { transform: rotate(0deg) translateX(88px) rotate(0deg); }
  .orbit-item.p2 { transform: rotate(120deg) translateX(88px) rotate(-120deg); }
  .orbit-item.p3 { transform: rotate(240deg) translateX(88px) rotate(-240deg); }
  * { scroll-behavior: auto !important; }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .ai-grid { grid-template-columns: 1fr; gap: 32px; }
  .stats { grid-template-columns: repeat(2,1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-methods { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo-wrap { order: -1; justify-items: start; }
  .profile-card { width: 260px; }
  .profile-media img { height: 230px; }
  .edu-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav-links { position: fixed; inset: 66px 0 auto 0; flex-direction: column; background: var(--bg-soft);
    border-bottom: 1px solid var(--border); padding: 12px 24px 20px; gap: 2px; display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .burger { display: grid; }
  .section { padding: 64px 0; }
  .contact-card { padding: 32px 22px; }
}
