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

:root {
  --bg: #05070f;
  --bg-2: #0a1128;
  --text: #ffffff;
  --muted: #9aa3c4;
  --accent: #2563eb;
  --accent-2: #60a5fa;
}

html, body { min-height: 100%; }
html { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: transparent;
  color: var(--text);
  overflow-x: hidden;
  transition: background 1s ease, color 1s ease;
  -webkit-user-select: none; user-select: none;
}

html[data-theme="day"] { background: linear-gradient(180deg, #eaf0ff 0%, #d6e2ff 100%); }
html[data-theme="day"] body { color: #0a1128; }
html[data-theme="day"] .brand { color: #0a1128; }
html[data-theme="day"] .nav-links a { color: #0a1128; }
html[data-theme="day"] .nav-links a:hover { text-shadow: 0 0 16px rgba(37,99,235,0.6); }
html[data-theme="day"] .hero-btn { background: #0a1128; color: #fff; }
html[data-theme="day"] .theme-toggle { background: rgba(10,17,40,0.08); border-color: rgba(10,17,40,0.15); color: #0a1128; }
html[data-theme="day"] .hero-black h1 { background: linear-gradient(90deg, #0a1128, var(--accent)); -webkit-background-clip: text; background-clip: text; }
html[data-theme="day"] .intro-line { color: #0a1128; }
html[data-theme="day"] .about-body { color: #3a4470; }
html[data-theme="day"] .about-tags span { background: rgba(10,17,40,0.06); border-color: rgba(10,17,40,0.15); color: #0a1128; }
html[data-theme="day"] .stat span { color: #3a4470; }
html[data-theme="day"] .stat strong { color: #0a1128; }
html[data-theme="day"] .work-info p { color: #3a4470; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem 6%; }
.brand { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.1rem; color: #fff; text-decoration: none; transition: color 1s ease; }
.brand .dot { font-size: 0.7rem; vertical-align: super; color: var(--accent-2); }

.brand { display: flex; align-items: center; }
.brand-logo { height: 36px; width: auto; display: block; }
.logo-day { display: none; }
html[data-theme="day"] .logo-night { display: none; }
html[data-theme="day"] .logo-day { display: block; }

.nav-links { display: flex; gap: 2.2rem; }
.nav-links a { color: #fff; text-decoration: none; font-weight: 600; font-size: 1.05rem; transition: text-shadow 0.3s ease, color 1s ease; }
.nav-links a:hover { text-shadow: 0 0 16px var(--accent-2), 0 0 30px var(--accent-2); }

.theme-toggle { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: #fff; width: 38px; height: 38px; border-radius: 50%; font-size: 1rem; cursor: pointer; transition: background 1s ease, border-color 1s ease; }

.hero-black { padding: 3.5rem 0 3rem; }
.hero-black h1 {
  font-family: 'Poppins', sans-serif; font-weight: 900; font-size: clamp(2.6rem, 8vw, 5.5rem);
  line-height: 0.98; letter-spacing: -0.01em; margin-bottom: 2.5rem; padding: 0 6%;
  background: linear-gradient(90deg, #ffffff, var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.cta-center { display: flex; justify-content: center; padding: 2rem 6% 3.5rem; }
.hero-btn {
  display: inline-block; background: #fff; color: #000; text-decoration: none;
  font-family: inherit; line-height: normal; cursor: pointer; border: 1.5px solid transparent;
  font-weight: 700; font-size: 0.95rem; padding: 0.9rem 2rem; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(96,165,250,0.25);
  transition: background 1s ease, color 1s ease, transform 0.2s ease; white-space: nowrap;
}
.hero-btn:hover { transform: translateY(-3px); }

.about { display: flex; align-items: flex-start; gap: 5rem; padding: 2rem 6% 6rem; flex-wrap: wrap; }
.about-photo { flex-shrink: 0; margin: 0 auto; }
.about-photo img {
  width: 300px; height: 300px; border-radius: 50%; object-fit: cover; background: #fffdf5;
  border: 4px solid var(--accent-2); box-shadow: 0 0 70px rgba(96, 165, 250, 0.55);
  transition: box-shadow 1s ease, border-color 1s ease;
}
.about-text { flex: 1; min-width: 320px; max-width: 640px; }
.intro-line { font-size: 1.2rem; color: var(--muted); margin-bottom: 0.4rem; transition: color 1s ease; }
.intro-line strong { color: var(--accent-2); }
.intro-role { font-family: 'Poppins', sans-serif; font-size: 1.3rem; font-weight: 700; color: var(--accent-2); margin-bottom: 1.8rem; }
.cursor { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.about-text h2 { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.08; margin-bottom: 1.3rem; }
.about-body { color: var(--muted); font-size: 1.05rem; line-height: 1.75; margin-bottom: 1.8rem; transition: color 1s ease; }
.about-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2.2rem; }
.about-tags span { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); padding: 0.5rem 1.1rem; border-radius: 999px; font-size: 0.88rem; font-weight: 600; transition: background 1s ease, border-color 1s ease, color 1s ease; }
.stats-row { display: flex; gap: 2.5rem; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,0.12); }
.stat { display: flex; flex-direction: column; }
.stat strong { font-family: 'Poppins', sans-serif; font-size: 1.8rem; font-weight: 800; color: var(--accent-2); transition: color 1s ease; }
.stat span { font-size: 0.85rem; color: var(--muted); transition: color 1s ease; }

.portfolio { padding: 2rem 6% 6rem; }
.portfolio-head { text-align: center; max-width: 620px; margin: 0 auto 3.5rem; }
.portfolio-head .eyebrow { color: var(--accent-2); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.6rem; transition: color 1s ease; }
.portfolio-head h2 { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.6rem); }

.work-group { margin-bottom: 3.5rem; }
.group-title { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.25rem; margin-bottom: 1.3rem; }

.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.6rem; }

.work-card {
  display: block; width: 100%; text-align: left;
  border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit;
  cursor: pointer; background: none; border: none; font: inherit; padding: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.work-card:hover { transform: translateY(-6px); box-shadow: 0 20px 45px rgba(37,99,235,0.25); }

/* Card that is not a link (no click, no lift) */
.work-card.static { cursor: default; }
.work-card.static:hover { transform: none; box-shadow: none; }

.work-img {
  aspect-ratio: 16/10; border-radius: 16px 16px 0 0; overflow: hidden;
  background: transparent; position: relative;
}
.work-img img { width: 100%; height: 100%; object-fit: cover; object-position: center; pointer-events: none; }

.work-img-contain .cycle-img { object-fit: contain; }

/* SEO and content screenshots: show the whole screenshot, no cropping */
.seo-card .swap-img img { object-fit: contain; background: #f0f4f9; }

.swap-img { position: relative; }
.swap-img img { position: absolute; top: 0; left: 0; opacity: 0; transition: opacity 1s ease; }
.swap-img img.is-visible { opacity: 1; }

.cycle-wrap { position: relative; }

.cycle-bg {
  width: 100%; height: 100%; object-fit: cover;
  filter: blur(30px) brightness(0.7);
  transform: scale(1.4);
  position: absolute; top: 0; left: 0;
  opacity: 0; transition: opacity 1s ease;
  z-index: 1;
}
.cycle-bg.is-visible { opacity: 1; }

.cycle-img {
  width: 100%; height: 100%;
  position: absolute; top: 0; left: 0;
  opacity: 0; transition: opacity 1s ease;
  z-index: 2;
}
.cycle-img.is-visible { opacity: 1; }

.work-info { padding: 1rem 1.2rem 1.3rem; }
.work-info h4 { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.05rem; margin-bottom: 0.3rem; }
.work-info p { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.8rem; transition: color 1s ease; }
.work-btn { display: inline-block; font-size: 0.82rem; font-weight: 700; color: var(--accent-2); transition: color 1s ease, opacity 0.2s ease; }
.work-card:hover .work-btn { opacity: 0.8; }

/* ---------- Resume (compact) ---------- */
.resume { text-align: center; padding: 1rem 6% 6rem; }
.resume .eyebrow { color: var(--accent-2); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.6rem; transition: color 1s ease; }
.resume h2 { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.6rem); }
.resume-sub { color: var(--muted); font-size: 1rem; margin: 0.8rem 0 1.8rem; transition: color 1s ease; }
html[data-theme="day"] .resume-sub { color: #3a4470; }
.resume-actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

.cv-peek {
  position: relative; display: block; width: min(380px, 100%); height: 250px;
  margin: 0 auto 1.8rem; padding: 0; border-radius: 14px; overflow: hidden; cursor: pointer;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(96,165,250,0.35);
  box-shadow: 0 0 28px rgba(96,165,250,0.30), 0 0 70px rgba(96,165,250,0.12);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 1s ease, border-color 1s ease;
}
.cv-peek:hover { transform: translateY(-4px); box-shadow: 0 0 36px rgba(96,165,250,0.50), 0 0 90px rgba(96,165,250,0.20); }
.cv-peek-frame {
  display: block; height: 100%; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}
.cv-peek-frame img { width: 100%; height: auto; display: block; opacity: 0.85; pointer-events: none; }
.cv-peek-label {
  position: absolute; left: 0; right: 0; bottom: 14px;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; color: var(--accent-2);
  text-shadow: 0 0 12px rgba(5,7,15,0.9);
  transition: color 1s ease;
}
html[data-theme="day"] .cv-peek { background: rgba(10,17,40,0.04); border-color: rgba(37,99,235,0.35); box-shadow: 0 0 28px rgba(37,99,235,0.28), 0 0 70px rgba(37,99,235,0.12); }
html[data-theme="day"] .cv-peek:hover { box-shadow: 0 0 36px rgba(37,99,235,0.45), 0 0 90px rgba(37,99,235,0.18); }
html[data-theme="day"] .cv-peek-label { color: var(--accent); text-shadow: 0 0 12px rgba(234,240,255,0.95); }

.hero-btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); box-shadow: none; }
.hero-btn-outline:hover { background: rgba(255,255,255,0.08); }
html[data-theme="day"] .hero-btn-outline { background: transparent; color: #0a1128; border-color: rgba(10,17,40,0.35); }
html[data-theme="day"] .hero-btn-outline:hover { background: rgba(10,17,40,0.06); }

/* ---------- CV popup ---------- */
.cv-modal {
  position: fixed; inset: 0; z-index: 210;
  background: rgba(0,0,0,0.88);
  display: none; overflow-y: auto;
  padding: 64px 16px 40px;
}
.cv-modal.open { display: block; }
.cv-sheet { max-width: 820px; margin: 0 auto; }
.cv-sheet img { width: 100%; height: auto; display: block; border-radius: 12px; pointer-events: none; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.cv-close {
  position: fixed; top: 16px; right: 20px; z-index: 211;
  background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%; width: 44px; height: 44px; font-size: 1.2rem; cursor: pointer;
}
.cv-close:hover { background: rgba(255,255,255,0.22); }
body.modal-open { overflow: hidden; }


/* ---------- Contact ---------- */
.contact { text-align: center; padding: 1rem 6% 3rem; }
.contact .eyebrow { color: var(--accent-2); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.6rem; transition: color 1s ease; }
.contact h2 { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.6rem); }
.contact-sub { color: var(--muted); font-size: 1rem; margin: 0.8rem auto 1.8rem; max-width: 460px; transition: color 1s ease; }
html[data-theme="day"] .contact-sub { color: #3a4470; }

.social-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.social-link {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; text-decoration: none;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, background 1s ease, border-color 1s ease;
}
.social-link svg { width: 20px; height: 20px; }
.social-link:hover { transform: translateY(-4px); color: var(--accent-2); box-shadow: 0 0 22px rgba(96,165,250,0.45); }
html[data-theme="day"] .social-link { color: #0a1128; background: rgba(10,17,40,0.06); border-color: rgba(10,17,40,0.15); }
html[data-theme="day"] .social-link:hover { color: var(--accent); box-shadow: 0 0 22px rgba(37,99,235,0.4); }

/* small popup message */
.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 220;
  transform: translate(-50%, 20px);
  padding: 0.75rem 1.4rem; border-radius: 999px; font-weight: 700; font-size: 0.9rem; color: #fff;
  background: rgba(10,17,40,0.78); border: 1px solid rgba(96,165,250,0.45);
  box-shadow: 0 0 26px rgba(96,165,250,0.35);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
html[data-theme="day"] .toast { background: rgba(255,255,255,0.85); color: #0a1128; border-color: rgba(37,99,235,0.4); box-shadow: 0 0 26px rgba(37,99,235,0.3); }

/* footer: text only, no line, stays transparent */
.site-footer { text-align: center; padding: 1.2rem 6% 2.2rem; color: var(--muted); font-size: 0.85rem; transition: color 1s ease; }
html[data-theme="day"] .site-footer { color: #3a4470; }

.c1 { background: linear-gradient(145deg, #2563eb, #60a5fa); }
.c2 { background: linear-gradient(145deg, #0a1128, #1e2a5e); }
.c3 { background: linear-gradient(145deg, #1e40af, #3b82f6); }

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 85%; max-height: 80%; border-radius: 10px; object-fit: contain; pointer-events: none; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%; width: 44px; height: 44px; font-size: 1.3rem; cursor: pointer;
}
.lb-close { top: 24px; right: 24px; }
.lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lb-prev, .lb-next {
  background: rgba(0,0,0,0.65); border: 1.5px solid rgba(255,255,255,0.8);
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.lb-prev:hover, .lb-next:hover { background: rgba(0,0,0,0.85); }
@media (max-width: 700px) {
  .lightbox img { max-height: 76%; }
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
  .lb-prev { left: calc(50% - 64px); }
  .lb-next { right: calc(50% - 64px); }
}

.go-up {
  position: fixed; bottom: 24px; right: 24px; z-index: 50;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  color: #05070f; font-size: 1.3rem; font-weight: 900; line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255,255,255,0.15);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.2s ease, background 1s ease, border-color 1s ease, color 1s ease, box-shadow 1s ease;
}
.go-up.visible { opacity: 1; pointer-events: auto; }
.go-arrow { display: inline-block; transition: transform 0.35s ease; }
.go-up.down .go-arrow { transform: rotate(180deg); }
.go-up:hover { transform: translateY(-3px); background: rgba(255,255,255,1); }

html[data-theme="day"] .go-up {
  background: #0a1128;
  color: #fff;
  border-color: rgba(10,17,40,0.3);
  box-shadow: 0 8px 24px rgba(10,17,40,0.25);
}
html[data-theme="day"] .go-up:hover { background: #142150; }

@media (max-width: 700px) {
  .nav-links { display: none; }
  .about { flex-direction: column; text-align: center; padding: 1.5rem 6% 4rem; }
  .about-tags, .stats-row { justify-content: center; }
}

.hidden-data { display: none; }