/* ===== Theme tokens (dark is the default) ===== */
:root {
  --accent: #4f8cff;          /* change this to rebrand the whole site */
  --accent-soft: rgba(79, 140, 255, 0.14);
  --bg: #0b1020;
  --bg-alt: #0f1528;
  --surface: #141b30;
  --surface-2: #1b2340;
  --sidebar: #070b17;
  --text: #eef1f8;
  --muted: #9aa3b8;
  --border: #232c47;
  --shadow: 0 12px 32px -14px rgba(0, 0, 0, 0.7);
  --radius: 16px;
  --sidebar-w: 290px;
}
:root[data-theme="light"] {
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.09);
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f1f3f7;
  --sidebar: #0b1020;
  --text: #1b1d23;
  --muted: #5f6470;
  --border: #e3e6ec;
  --shadow: 0 12px 32px -16px rgba(20, 24, 40, 0.18);
}

/* ===== Base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
}
h1, h2, h3, h4 { font-family: "Poppins", sans-serif; line-height: 1.25; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
.accent { color: var(--accent); }
.small { font-size: 0.9rem; }
.container { width: min(1100px, 100% - 48px); margin-inline: auto; }

/* ===== Sidebar (iPortfolio style) ===== */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 100;
  background: var(--sidebar); color: #e9e9ee;
  display: flex; flex-direction: column; padding: 32px 20px 20px;
  overflow-y: auto; scrollbar-width: none; transition: transform 0.35s ease;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.profile { text-align: center; }
.profile-img {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto;
  border: 6px solid #1b2340;
}
.profile-name { font-size: 1.5rem; margin: 14px 0 2px; color: #fff; }
.profile-role { color: var(--accent); font-size: 0.9rem; font-weight: 500; }
.social { display: flex; justify-content: center; gap: 8px; margin: 16px 0 8px; }
.social a {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: #151c33; color: #fff; font-size: 1rem; transition: background 0.2s, transform 0.2s;
}
.social a:hover { background: var(--accent); transform: translateY(-2px); }

.side-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 28px; }
.side-nav a {
  display: flex; align-items: center; gap: 14px; padding: 11px 16px; border-radius: 10px;
  color: #a8abb4; font-weight: 500; font-size: 0.97rem; transition: color 0.2s, background 0.2s;
}
.side-nav a i { font-size: 1.15rem; }
.side-nav a:hover { color: #fff; }
.side-nav a.active { color: #fff; background: var(--accent); }

.side-actions { margin-top: auto; padding-top: 24px; display: flex; gap: 8px; }
.cv-btn, .theme-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 12px; border-radius: 10px; border: 1px solid #232c47; background: transparent;
  color: #c9ccd4; font: 500 0.9rem "Inter", sans-serif; cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.cv-btn { flex: 1; background: #151c33; color: #fff; }
.cv-btn:hover { background: var(--accent); border-color: var(--accent); }
.theme-btn { width: 44px; }
.theme-btn:hover { border-color: var(--accent); color: #fff; }
.theme-btn .bi-moon-stars { display: none; }
:root[data-theme="light"] .theme-btn .bi-sun { display: none; }
:root[data-theme="light"] .theme-btn .bi-moon-stars { display: inline; }

.menu-toggle {
  display: none; position: fixed; top: 16px; right: 16px; z-index: 200;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 1.5rem;
  box-shadow: 0 8px 20px -6px var(--accent);
}

main { margin-left: var(--sidebar-w); }

/* ===== Hero (Craftivo style) ===== */
.hero {
  position: relative; min-height: 100vh; display: grid; place-items: center; text-align: center;
  padding: 80px 24px; overflow: hidden; background: #070b17; color: #fff;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(79, 140, 255, 0.22), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(34, 211, 238, 0.12), transparent 45%),
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px) 0 0 / 48px 48px;
}
.hero-content { position: relative; max-width: 760px; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; padding: 6px 16px;
  border-radius: 999px; font-size: 0.85rem; font-weight: 500; color: #cfd7ea;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
}
.hero-kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2); }
.hero h2 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 700; letter-spacing: -0.02em; }
.typed-line { font-size: clamp(1.2rem, 3vw, 1.7rem); margin: 10px 0 18px; color: #d9d9df; }
.typed { color: var(--accent); font-weight: 600; border-bottom: 3px solid var(--accent); padding-bottom: 2px; }
.cursor { color: var(--accent); animation: blink 0.9s step-end infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.hero-sub { color: #b4b4bd; font-size: 1.08rem; max-width: 560px; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.scroll-down {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 1.5rem; opacity: 0.7; animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 8px); } }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: 999px; font-weight: 600; font-size: 0.97rem;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -10px var(--accent); }
.btn-outline { border: 2px solid rgba(255, 255, 255, 0.35); color: #fff; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; border-radius: 12px; }
.btn-ghost { border: 1.5px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Sections ===== */
.section { padding: 96px 0; }
.section.alt { background: var(--bg-alt); }
.section-title { margin-bottom: 48px; }
.section-title h2 { font-size: 2rem; font-weight: 700; position: relative; padding-bottom: 14px; margin-bottom: 14px; }
.section-title h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px;
  border-radius: 3px; background: var(--accent);
}
.section-title p { color: var(--muted); }
.badge {
  display: inline-block; padding: 4px 14px; border-radius: 999px; font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; background: var(--accent-soft); color: var(--accent);
}

/* About */
.about-grid { display: grid; grid-template-columns: 320px 1fr; gap: 40px; align-items: start; }
.profile-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 32px 24px; text-align: center; box-shadow: var(--shadow);
}
.ring {
  position: relative; width: 130px; height: 130px; margin: 0 auto 16px; border-radius: 50%;
  padding: 5px; background: conic-gradient(var(--accent), #22d3ee, var(--accent));
}
.ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid var(--surface); }
.status {
  position: absolute; right: 10px; bottom: 10px; width: 18px; height: 18px; border-radius: 50%;
  background: #22c55e; border: 3px solid var(--surface);
}
.profile-card h3 { font-size: 1.3rem; }
.card-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); margin: 22px 0; padding: 18px 0;
  border-block: 1px solid var(--border);
}
.card-stats strong { display: block; font: 700 1.5rem "Poppins", sans-serif; color: var(--accent); }
.card-stats div > span { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.about-text h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 14px 0 16px; }
.about-text p { color: var(--muted); margin-bottom: 14px; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 24px; }
.info-card {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
}
.info-card i {
  display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent); font-size: 1.2rem;
}
.info-card span { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.info-card strong { font-size: 0.95rem; font-weight: 600; }

/* Skills */
.skill-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.skill-card {
  padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color 0.25s, transform 0.25s;
}
.skill-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.skill-icon {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; margin-bottom: 14px;
  background: var(--accent-soft); color: var(--accent); font-size: 1.3rem;
}
.skill-card h4 { font-size: 1.05rem; margin-bottom: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  padding: 6px 14px; border-radius: 999px; font-size: 0.87rem; font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--border);
}
.tags.small li { padding: 3px 10px; font-size: 0.78rem; }

/* Resume timeline (iPortfolio style) */
.resume-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.resume-title { font-size: 1.35rem; margin: 0 0 20px; display: flex; gap: 10px; align-items: center; }
.resume-title i { color: var(--accent); }
.resume-item + .resume-title { margin-top: 36px; }
.resume-item {
  position: relative; padding: 0 0 26px 24px; border-left: 2px solid var(--accent);
}
.resume-item::before {
  content: ""; position: absolute; left: -9px; top: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.section.alt .resume-item::before { background: var(--bg-alt); }
.resume-item h4 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 8px; }
.resume-item .date {
  display: inline-block; padding: 3px 14px; border-radius: 6px; font-weight: 600; font-size: 0.85rem;
  background: var(--surface-2); margin-bottom: 8px;
}
.resume-item .place { font-style: italic; color: var(--muted); margin-bottom: 8px; }
.resume-item p { color: var(--muted); }
.resume-item ul { display: grid; gap: 6px; margin-top: 6px; }
.resume-item li { position: relative; padding-left: 18px; color: var(--muted); }
.resume-item li::before { content: ""; position: absolute; left: 0; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.resume-item a { color: var(--accent); }

/* Projects */
.featured {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; margin-bottom: 24px;
  padding: 36px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: var(--shadow);
}
.featured h3 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin: 14px 0 12px; }
.featured-main > p { color: var(--muted); }
.highlights { display: grid; gap: 8px; margin: 18px 0; }
.highlights li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.highlights i { color: var(--accent); margin-top: 2px; }
.featured-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.featured-links .btn { padding: 10px 22px; font-size: 0.92rem; }

/* Browser mockup (pure CSS illustration of a dashboard) */
.mock { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--bg); box-shadow: var(--shadow); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--surface-2); }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.mock-bar span:nth-child(2) { background: #f59e0b; }
.mock-bar span:nth-child(3) { background: #22c55e; }
.mock-bar em { margin-left: 10px; font-style: normal; font-size: 0.75rem; color: var(--muted); padding: 2px 12px; border-radius: 6px; background: var(--bg); }
.mock-body { display: grid; grid-template-columns: 56px 1fr; min-height: 230px; }
.mock-side { display: grid; align-content: start; gap: 12px; padding: 16px 12px; background: var(--surface); border-right: 1px solid var(--border); }
.mock-side i { height: 10px; border-radius: 4px; background: var(--surface-2); }
.mock-side i:first-child { background: var(--accent); }
.mock-main { padding: 16px; display: grid; gap: 14px; }
.mock-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-row b { height: 48px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); position: relative; }
.mock-row b::after { content: ""; position: absolute; left: 10px; bottom: 10px; width: 45%; height: 8px; border-radius: 4px; background: var(--accent); opacity: 0.8; }
.mock-chart {
  height: 80px; border-radius: 8px; border: 1px solid var(--border);
  background:
    linear-gradient(to top, var(--accent-soft), transparent),
    repeating-linear-gradient(90deg, transparent 0 18px, var(--border) 18px 19px);
  clip-path: polygon(0 100%, 0 70%, 15% 55%, 30% 62%, 45% 35%, 60% 45%, 75% 20%, 90% 30%, 100% 10%, 100% 100%);
}
.mock-lines { display: grid; gap: 8px; }
.mock-lines i { height: 8px; border-radius: 4px; background: var(--surface-2); }
.mock-lines i:nth-child(2) { width: 80%; }
.mock-lines i:nth-child(3) { width: 60%; }

.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.projects-grid.two { grid-template-columns: repeat(2, 1fr); }
.project {
  display: flex; flex-direction: column; gap: 12px; padding: 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.project:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow); }
.project-icon {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent); font-size: 1.5rem;
}
.project h3 { font-size: 1.12rem; }
.project p { color: var(--muted); font-size: 0.95rem; }
.project-link { margin-top: auto; color: var(--accent); font-weight: 600; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 32px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform 0.25s, border-color 0.25s;
}
a.contact-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.contact-card i {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; margin-bottom: 8px;
  background: var(--accent-soft); color: var(--accent); font-size: 1.4rem;
}
.contact-card span { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

/* Footer & back-to-top */
.footer { padding: 28px 24px; text-align: center; color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--border); }
.back-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 44px; height: 44px; border-radius: 10px;
  display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 1.2rem;
  opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.back-top.show { opacity: 1; visibility: visible; }

/* ===== Engagement layer ===== */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 300;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), #22d3ee);
}

/* Hero: two columns with code card + tech marquee */
.hero { text-align: left; padding: 96px 48px 120px; }
.hero-inner {
  position: relative; width: min(1150px, 100%); display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center;
}
.hero-content { max-width: 600px; }
.hero-sub { margin: 0 0 32px; }
.hero-inner .hero-content h2 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); }
.hero-cta { justify-content: flex-start; }
.code-card {
  border-radius: 16px; overflow: hidden; background: rgba(13, 19, 38, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(8px);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(79, 140, 255, 0.08);
  transform: perspective(1200px) rotateY(-6deg) rotateX(2deg); transition: transform 0.5s ease;
}
.code-card:hover { transform: none; }
.code-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.code-bar span { width: 11px; height: 11px; border-radius: 50%; background: #ef4444; }
.code-bar span:nth-child(2) { background: #f59e0b; }
.code-bar span:nth-child(3) { background: #22c55e; }
.code-bar em { margin-left: 10px; font-style: normal; font-size: 0.78rem; color: #8b95b3; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.code-card pre { margin: 0; padding: 22px 24px; overflow-x: auto; font: 0.84rem/1.75 ui-monospace, "Cascadia Code", Consolas, monospace; color: #d7def0; }
.code-card .k { color: #c792ea; } .code-card .v { color: #82aaff; } .code-card .p { color: #7fdbca; }
.code-card .s { color: #c3e88d; } .code-card .b { color: #f78c6c; }
.marquee {
  position: absolute; left: 0; right: 0; bottom: 0; overflow: hidden; padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06); background: rgba(255, 255, 255, 0.02);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 32s linear infinite; }
.marquee-track span { color: #7d88a8; font: 600 0.95rem "Poppins", sans-serif; white-space: nowrap; }
.marquee-track span::before { content: "◆"; color: var(--accent); font-size: 0.6rem; margin-right: 14px; vertical-align: middle; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Spotlight hover on cards */
.spot { position: relative; overflow: hidden; }
.spot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(79, 140, 255, 0.12), transparent 60%);
}
.spot:hover::after { opacity: 1; }

/* Services & process */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service {
  padding: 32px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform 0.25s, border-color 0.25s;
}
.service:hover { transform: translateY(-6px); border-color: var(--accent); }
.service-icon {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--accent), #22d3ee); color: #fff; font-size: 1.5rem;
  box-shadow: 0 10px 24px -10px var(--accent);
}
.service h3 { font-size: 1.15rem; margin-bottom: 10px; }
.service p { color: var(--muted); font-size: 0.95rem; }
.process-title, .more-title { font-size: 1.3rem; margin: 64px 0 24px; }
.process { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.process li { position: relative; padding: 24px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.process li span { font: 700 2rem "Poppins", sans-serif; color: transparent; -webkit-text-stroke: 1.5px var(--accent); opacity: 0.9; }
.process h4 { font-size: 1.02rem; margin: 6px 0 6px; }
.process p { color: var(--muted); font-size: 0.9rem; }
.process li:not(:last-child)::after {
  content: "\F138"; font-family: "bootstrap-icons"; position: absolute; right: -16px; top: 50%;
  transform: translateY(-50%); color: var(--accent); font-size: 1rem; z-index: 1;
}

/* Case study */
.case { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0 18px; }
.case > div { padding: 16px 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.case h4 { font-size: 0.92rem; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.case h4 i { color: var(--accent); }
.case p { color: var(--muted); font-size: 0.9rem; }
.impact {
  display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 24px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), #2563eb 55%, #0891b2); color: #fff; overflow: hidden;
}
.impact div { padding: 26px 20px; text-align: center; }
.impact div + div { border-left: 1px solid rgba(255, 255, 255, 0.18); }
.impact strong { display: block; font: 700 2rem "Poppins", sans-serif; line-height: 1.2; }
.impact div > span { font-size: 0.82rem; opacity: 0.9; text-transform: uppercase; letter-spacing: 0.06em; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; transition: border-color 0.25s; }
.feature:hover { border-color: var(--accent); }
.feature > i { font-size: 1.4rem; color: var(--accent); }
.feature h4 { font-size: 0.98rem; margin: 10px 0 4px; }
.feature p { color: var(--muted); font-size: 0.86rem; line-height: 1.55; }

/* Project filters + cards */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 48px 0 24px; }
.filter {
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font: 500 0.9rem "Inter", sans-serif; cursor: pointer; transition: all 0.2s;
}
.filter:hover { color: var(--text); border-color: var(--accent); }
.filter.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 20px -10px var(--accent); }
.project-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.pcard {
  display: flex; flex-direction: column; gap: 12px; padding: 26px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s, opacity 0.3s;
}
.pcard:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: var(--shadow); }
.pcard.is-hidden { display: none; }
.pcard-head { display: flex; align-items: center; justify-content: space-between; }
.pcard-icon {
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #22d3ee); color: #fff; font-size: 1.35rem;
  box-shadow: 0 10px 22px -10px var(--accent);
}
.pcard-cat { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.pcard h3 { font-size: 1.15rem; }
.pcard > p { color: var(--muted); font-size: 0.93rem; }
.pcard details { border-top: 1px dashed var(--border); padding-top: 10px; }
.pcard summary {
  cursor: pointer; list-style: none; font-weight: 600; font-size: 0.88rem; color: var(--text);
  display: flex; align-items: center; justify-content: space-between;
}
.pcard summary::-webkit-details-marker { display: none; }
.pcard summary::after { content: "\F282"; font-family: "bootstrap-icons"; color: var(--accent); transition: transform 0.25s; }
.pcard details[open] summary::after { transform: rotate(180deg); }
.checks { display: grid; gap: 7px; margin-top: 12px; }
.checks li { position: relative; padding-left: 24px; font-size: 0.87rem; color: var(--muted); line-height: 1.5; }
.checks li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: 0; color: var(--accent); }
.pcard .project-link { margin-top: 4px; }

/* Build timeline */
.build { list-style: none; position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; padding-top: 28px; }
.build::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 2px; background: linear-gradient(90deg, var(--accent), #22d3ee); opacity: 0.6; }
.build li { position: relative; }
.build li::before {
  content: ""; position: absolute; top: -26px; left: 0; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.build time { font: 600 0.78rem "Inter", sans-serif; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.build h4 { font-size: 0.95rem; margin: 4px 0; }
.build p { color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
@media (max-width: 1100px) {
  .project-list { grid-template-columns: repeat(2, 1fr); }
  .build { grid-template-columns: 1fr; gap: 18px; padding: 0 0 0 28px; }
  .build::before { left: 6px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: linear-gradient(180deg, var(--accent), #22d3ee); }
  .build li::before { top: 2px; left: -28px; }
}
@media (max-width: 600px) { .project-list { grid-template-columns: 1fr; } }
/* Contact CTA */
.cta {
  position: relative; overflow: hidden; text-align: center; padding: 64px 32px; margin-bottom: 28px;
  border-radius: 24px; color: #fff;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.18), transparent 40%),
    linear-gradient(135deg, #1d4ed8, var(--accent) 50%, #0891b2);
}
.cta h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: 12px; }
.cta p { max-width: 560px; margin: 0 auto 28px; opacity: 0.92; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-light { background: #fff; color: #1d4ed8; }
.btn-light:hover { box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.5); }
.cta .btn-outline { border-color: rgba(255, 255, 255, 0.6); }
.cta .btn-outline:hover { color: #fff; border-color: #fff; background: rgba(255, 255, 255, 0.1); }

@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .code-card { transform: none; max-width: 560px; }
  .feature-grid, .process { grid-template-columns: repeat(2, 1fr); }
  .process li::after { display: none; }
}
@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; }
  .impact { grid-template-columns: repeat(2, 1fr); }
  .impact div:nth-child(3) { border-left: 0; }
  .impact div:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, 0.18); }
}
@media (max-width: 600px) {
  .hero { padding: 88px 16px 110px; }
  .code-card pre { font-size: 0.78rem; padding: 16px; }
  .case, .feature-grid, .process { grid-template-columns: 1fr; }
  .cta { padding: 44px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .code-card { transform: none; }
}
/* Reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cursor, .scroll-down { animation: none; }
}

/* ===== Responsive ===== */
@media (max-width: 1199px) {
  .sidebar { transform: translateX(-100%); }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 60px rgba(0,0,0,0.6); }
  .menu-toggle { display: grid; place-items: center; }
  main { margin-left: 0; }
}
@media (max-width: 900px) {
  .about-grid, .resume-grid, .featured { grid-template-columns: 1fr; }
  .profile-card { max-width: 380px; width: 100%; margin-inline: auto; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .container { width: calc(100% - 32px); }
  .section { padding: 72px 0; }
  .featured { padding: 24px; }
  .info-grid, .skill-cards, .projects-grid, .projects-grid.two, .contact-grid { grid-template-columns: 1fr; }
}

/* ===== Print: "Download CV" prints a clean one-column resume ===== */
@media print {
  @page { margin: 14mm; }
  :root, :root[data-theme] {
    --bg: #fff; --bg-alt: #fff; --surface: #fff; --surface-2: #f1f3f7; --text: #111;
    --muted: #333; --border: #d5d9e2; --accent: #1d4ed8; --accent-soft: #eef2ff; --shadow: none;
  }
  body { font-size: 10.5pt; line-height: 1.5; }
  .sidebar, .menu-toggle, .hero, .back-top, .project-link, .featured-links, .featured-visual,
  .profile-card, .info-grid, #contact, .footer, .section-title p, .about-text .badge, .no-print, .progress, .impact, .feature-grid, .more-title, .project-list, .build { display: none !important; }
  main { margin: 0; }
  main::before {
    content: "Rakesh KC  ·  Full-Stack Web Developer\A Dallas–Fort Worth, TX  ·  rakesh-kc-tech.github.io  ·  linkedin.com/in/rakesh-kc-671b96307  ·  github.com/Rakesh-KC-Tech";
    white-space: pre-wrap; display: block; font: 600 11pt "Inter", sans-serif; padding-bottom: 10px;
    border-bottom: 2px solid #1d4ed8; margin-bottom: 8px;
  }
  .container { width: 100%; }
  .section { padding: 8px 0; }
  .section-title { margin-bottom: 10px; }
  .section-title h2 { font-size: 13pt; padding-bottom: 4px; margin-bottom: 4px; }
  .about-grid, .resume-grid, .featured { display: block; }
  .about-text h3 { font-size: 11pt; margin: 0 0 6px; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .skill-cards { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .skill-card, .featured, .project { padding: 10px; box-shadow: none; }
  .skill-icon, .project-icon { display: none; }
  .tags li { padding: 1px 8px; font-size: 8.5pt; }
  .resume-item { padding-bottom: 12px; }
  .resume-item::before { background: #fff !important; }
  .resume-item + .resume-title, .resume-title { margin: 10px 0 8px; font-size: 12pt; }
  .resume-item h4 { font-size: 10.5pt; }
  .featured h3 { font-size: 12pt; margin: 6px 0; }
  .highlights { margin: 8px 0; gap: 3px; }
  .skill-card, .resume-item, .project, .featured { break-inside: avoid; }
  .resume-title, .section-title { break-after: avoid; }
}
