/* =========================================================
   B U Shiplu — portfolio
   To change the colour theme, edit the --accent values below.
   ========================================================= */

:root {
  --accent: #2b8cff;                       /* main blue */
  --accent-rgb: 43, 140, 255;              /* same blue, as R, G, B */
  --accent-bright: #5aa9ff;

  --bg: #000;
  --panel: #05080d;
  --card: #0a0f17;
  --card-border: rgba(255, 255, 255, 0.07);
  --text: #fff;
  --muted: #a4acb9;
  --dim: #666d80;

  --radius: 12px;
  --font-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 500; margin: 0; line-height: 1.15; }
h2 { font-size: clamp(34px, 5vw, 60px); letter-spacing: -0.02em; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.container { width: min(1240px, 100% - 48px); margin-inline: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.dot { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 4px; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }

.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--accent);
  position: relative;
  box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.55);
}
.logo-mark::after {
  content: ""; position: absolute; inset: 8px;
  border: 4px solid #000; border-radius: 2px;
}
.logo-text { font-family: var(--font-head); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }

.navlinks { display: flex; gap: 34px; }
.navlinks a, .footer-bottom a {
  font-size: 15px; color: var(--text); position: relative; padding: 4px 0;
  transition: color 0.2s;
}
.navlinks a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.25s;
}
.navlinks a:hover { color: var(--accent-bright); }
.navlinks a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 7px;
}
.nav-toggle span { width: 24px; height: 2px; background: #fff; transition: transform 0.25s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* ---------- Sections: stacked dark panels with a blue glow at the bottom ---------- */
.section {
  position: relative;
  padding: 130px 0 200px;
  background: var(--bg);
  border-radius: 28px 28px 0 0;
  margin-top: -28px;
  overflow: hidden;
}
.section::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 240px;
  background:
    radial-gradient(60% 100% at 50% 100%, rgba(var(--accent-rgb), 0.38), transparent 70%),
    linear-gradient(to top, rgba(var(--accent-rgb), 0.22), transparent);
  pointer-events: none;
}
.section > .container { position: relative; z-index: 1; }

/* ---------- Hero ---------- */
.hero { margin-top: 0; border-radius: 0; padding: 60px 0 190px; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr);
  gap: 48px; align-items: end; position: relative;
}
.hero-line { display: block; width: 120px; height: 1px; background: rgba(255, 255, 255, 0.25); margin-bottom: 26px; }
.eyebrow { font-family: var(--font-head); font-size: clamp(18px, 2vw, 26px); color: var(--muted); margin-bottom: 18px; }
.hero h1 {
  font-size: clamp(44px, 7.4vw, 108px);
  letter-spacing: -0.035em; line-height: 1.02; font-weight: 500;
}

.talk-badge {
  position: absolute; top: 0; left: 52%;
  width: 150px; height: 150px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: border-color 0.3s, transform 0.3s;
}
.talk-badge:hover { border-color: var(--accent); transform: scale(1.04); }
.talk-ring { position: absolute; inset: -1px; border-radius: 50%; animation: spin 7s linear infinite; }
.talk-ring::after {
  content: ""; position: absolute; left: 50%; bottom: -14px; width: 34px; height: 34px;
  margin-left: -17px; border-radius: 50% 50% 50% 0;
  background: var(--accent); box-shadow: 0 0 26px rgba(var(--accent-rgb), 0.8);
}
.talk-label { font-size: 13px; letter-spacing: 0.04em; display: inline-flex; align-items: center; gap: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-right { display: flex; flex-direction: column; gap: 60px; align-items: flex-end; }
.portrait {
  position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, #0c1a30, #05080d);
  border: 1px solid var(--card-border);
}
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 78%; }
.portrait-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  background-image:
    radial-gradient(circle at 50% 45%, rgba(var(--accent-rgb), 0.35), transparent 60%),
    linear-gradient(rgba(var(--accent-rgb), 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.12) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
}
.portrait-fallback span {
  font-family: var(--font-head); font-weight: 700; font-size: clamp(64px, 9vw, 120px);
  letter-spacing: -0.04em; color: #fff; text-shadow: 0 0 50px rgba(var(--accent-rgb), 0.9);
}
.hero-blurb { max-width: 340px; text-align: right; color: var(--muted); font-size: 15px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.cards { display: grid; gap: 14px; }
.mini-card {
  display: flex; align-items: center; gap: 28px; padding: 30px 34px;
  background: linear-gradient(120deg, var(--card), rgba(10, 15, 23, 0.4));
  border: 1px solid var(--card-border); border-radius: var(--radius);
  transition: border-color 0.3s, transform 0.3s;
}
.mini-card:hover { border-color: rgba(var(--accent-rgb), 0.5); transform: translateX(6px); }
.mini-card h4 { font-size: 24px; margin-bottom: 6px; }
.mini-card p { font-size: 14px; color: var(--muted); }

.icon-box {
  flex: none; width: 60px; height: 60px; border-radius: var(--radius);
  display: grid; place-items: center; color: var(--accent);
  background: rgba(var(--accent-rgb), 0.16);
}
.icon-box svg { width: 28px; height: 28px; }
.icon-box.solid { width: 48px; height: 48px; background: var(--accent); color: #000; border-radius: 10px; }
.icon-box.solid svg { width: 22px; height: 22px; }

.about-text h2 { margin-bottom: 32px; }
.about-text p { color: var(--muted); margin-bottom: 18px; max-width: 560px; }
.stats { display: flex; gap: 90px; margin-top: 40px; }
.stat strong {
  display: block; font-family: var(--font-head); font-weight: 500;
  font-size: clamp(44px, 5vw, 60px); line-height: 1.1; color: var(--accent);
}
.stat span { font-size: 14px; color: var(--muted); }

/* ---------- Experience timeline ---------- */
.timeline { position: relative; margin-top: 90px; display: grid; gap: 64px; }
.timeline-line {
  position: absolute; left: 50%; top: 12px; bottom: -40px; width: 1px;
  background: linear-gradient(to bottom, rgba(var(--accent-rgb), 0.7), rgba(var(--accent-rgb), 0.05));
}
.t-row { display: grid; grid-template-columns: 1fr 34px 1fr; gap: 60px; align-items: start; }
.t-dot {
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0.14), 0 0 30px rgba(var(--accent-rgb), 0.7);
  position: relative; z-index: 1;
}
.t-left h4, .t-right h4 { font-size: 26px; margin-bottom: 12px; }
.t-right p { color: var(--muted); font-size: 15px; max-width: 500px; }

/* ---------- Projects ---------- */
.split-head { display: flex; justify-content: space-between; align-items: center; gap: 40px; margin-bottom: 70px; }
.split-head p { max-width: 380px; font-size: 15px; }

.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s;
}
.project:hover {
  transform: translateY(-8px); border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 24px 60px -20px rgba(var(--accent-rgb), 0.45);
}
.project-art {
  position: relative; aspect-ratio: 16 / 10;
  background:
    radial-gradient(80% 90% at 50% 110%, rgba(var(--accent-rgb), 0.35), transparent 70%),
    linear-gradient(160deg, #0d1c33, #060a11);
}
.project-art svg { width: 100%; height: 100%; display: block; }
.art-panel { fill: rgba(255, 255, 255, 0.04); stroke: rgba(255, 255, 255, 0.28); stroke-width: 1.5; }
.art-line { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1.5; stroke-linecap: round; }
.art-line.soft { stroke: rgba(255, 255, 255, 0.13); }
.art-fill { fill: var(--accent); }
.art-fill.dim { opacity: 0.5; }
.art-dark { stroke: #04101f; stroke-width: 2.5; stroke-linecap: round; fill: none; }
.art-bars { stroke: rgba(var(--accent-rgb), 0.28); stroke-width: 14; }
.art-accent { stroke: var(--accent-bright); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.project-tag {
  position: absolute; left: 14px; bottom: 14px; padding: 6px 12px; border-radius: 100px;
  font-size: 12px; background: rgba(5, 18, 35, 0.7); border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
}
.project-body { padding: 28px; }
.project-body h3 { margin-bottom: 20px; }
.project dl { margin: 0; display: grid; gap: 14px; }
.project dt {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-bright); margin-bottom: 3px;
}
.project dd { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- What's next ---------- */
.next-card {
  margin: 70px auto 0; max-width: 940px; padding: 56px;
  background: linear-gradient(160deg, #0b1524, var(--panel));
  border: 1px solid var(--card-border); border-radius: var(--radius);
  text-align: center;
}
.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px; border-radius: 100px;
  font-size: 13px; color: var(--accent-bright);
  background: rgba(var(--accent-rgb), 0.14); border: 1px solid rgba(var(--accent-rgb), 0.3);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.800s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.7); }
  100% { box-shadow: 0 0 0 12px rgba(var(--accent-rgb), 0); }
}
.next-card h3 { font-size: clamp(32px, 4vw, 46px); margin: 22px 0 16px; letter-spacing: -0.02em; }
.next-lead { color: var(--muted); max-width: 600px; margin: 0 auto 44px; }
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; }
.features li {
  padding: 24px; border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--card-border);
}
.features strong { display: block; font-family: var(--font-head); font-weight: 500; font-size: 18px; margin-bottom: 8px; }
.features span { color: var(--muted); font-size: 14px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.contact-info h2 { margin-bottom: 22px; }
.contact-info > p { max-width: 460px; margin-bottom: 44px; font-size: 15px; }
.contact-item { display: flex; align-items: center; gap: 22px; margin-bottom: 26px; width: fit-content; }
.contact-item small { display: block; color: var(--muted); font-size: 13px; }
.contact-value { font-family: var(--font-head); font-size: 20px; transition: color 0.2s; }
.contact-item:hover .contact-value { color: var(--accent-bright); }

.contact-form {
  padding: 40px; display: grid; gap: 22px;
  background: var(--panel); border: 1px solid var(--card-border); border-radius: var(--radius);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label { display: grid; gap: 10px; font-family: var(--font-head); font-size: 17px; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; padding: 14px 16px; font: 14px var(--font-body); color: var(--text);
  background: #10151d; border: 1px solid transparent; border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form select:invalid { color: var(--dim); }
.contact-form option { color: #fff; background: #10151d; }
.contact-form ::placeholder { color: var(--dim); }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2);
}
.btn {
  justify-self: start; padding: 14px 26px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--accent); color: #000; font: 600 15px var(--font-body);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { background: var(--accent-bright); transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(var(--accent-rgb), 0.8); }
.form-note { font-size: 14px; color: var(--accent-bright); min-height: 1.4em; }

/* ---------- Footer ---------- */
.footer { padding-bottom: 60px; }
.footer h2 { max-width: 1000px; margin-inline: auto; }
.footer-mail {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  margin: 60px auto 0; width: fit-content;
  font-family: var(--font-head); font-size: clamp(22px, 3.4vw, 42px); transition: color 0.2s;
}
.footer-mail:hover { color: var(--accent-bright); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  margin-top: 50px; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px; color: var(--muted);
}
.footer-bottom nav { display: flex; gap: 26px; }
.footer-bottom a:hover { color: var(--accent-bright); }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .talk-ring, .pulse { animation: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .section { padding: 90px 0 160px; }
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .talk-badge { position: relative; left: auto; top: auto; width: 120px; height: 120px; order: -1; }
  .hero-right { flex-direction: row; align-items: flex-end; gap: 24px; }
  .portrait { max-width: 260px; }
  .hero-blurb { text-align: left; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 56px; }
  .projects { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .features { grid-template-columns: 1fr; }
  .split-head { flex-direction: column; align-items: flex-start; margin-bottom: 44px; }
}

/* ---------- Phone ---------- */
@media (max-width: 680px) {
  .container { width: calc(100% - 32px); }
  .logo-text { font-size: 22px; }
  .nav-toggle { display: flex; }
  .navlinks {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 16px 20px;
    background: rgba(0, 0, 0, 0.96); border-bottom: 1px solid var(--card-border);
    display: none;
  }
  .navlinks.open { display: flex; }
  .navlinks a { padding: 14px 0; font-size: 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
  .navlinks a::after { display: none; }

  .talk-badge { display: none; }
  .hero-right { flex-direction: column; align-items: flex-start; }
  .mini-card { padding: 22px; gap: 18px; }
  .mini-card h4 { font-size: 20px; }
  .stats { gap: 48px; }

  .timeline { margin-top: 56px; gap: 44px; }
  .timeline-line { left: 11px; }
  .t-row { grid-template-columns: 22px 1fr; gap: 6px 22px; }
  .t-dot { width: 22px; height: 22px; grid-column: 1; grid-row: 1 / span 2; margin-top: 4px; }
  .t-left, .t-right { grid-column: 2; }
  .t-left h4 { font-size: 15px; color: var(--accent-bright); margin-bottom: 2px; }
  .t-right h4 { font-size: 22px; margin-top: 8px; }

  .next-card { padding: 32px 22px; margin-top: 44px; }
  .contact-form { padding: 24px; }
  .field-row { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   INTERACTIVE EFFECTS
   ========================================================= */

html.smooth { scroll-behavior: auto; }   /* JS handles the glide instead */

/* Hero headline: words rise in one after another */
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.16em; margin-bottom: -0.16em; }
.hero h1 .w > span {
  display: inline-block; transform: translateY(115%);
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.1, 1) forwards;
  animation-delay: calc(var(--i) * 90ms + 150ms);
}
@keyframes rise { to { transform: none; } }
.eyebrow, .hero-line, .hero-right, .talk-badge { animation: fade-up 0.9s ease both; }
.hero-right { animation-delay: 0.35s; }
.talk-badge { animation-delay: 0.6s; }
@keyframes fade-up { from { opacity: 0; translate: 0 24px; } }

/* Menu links: text rolls up and turns blue on hover */
.navlinks a.rolling { overflow: hidden; display: inline-flex; padding: 0; line-height: 1.7; }
.navlinks a.rolling::after { display: none; }
.roll { position: relative; display: inline-block; transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.1, 1); }
.roll::after { content: attr(data-text); position: absolute; left: 0; top: 100%; color: var(--accent-bright); }
.navlinks a.rolling:hover .roll { transform: translateY(-100%); }

/* Magnetic elements lean toward the cursor */
.magnetic, .magnetic:hover {
  transform: translate(var(--tx, 0px), var(--ty, 0px)) scale(var(--s, 1));
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.1, 1), border-color 0.3s, background 0.2s, box-shadow 0.2s;
}
.magnetic:hover { --s: 1.05; }

/* Cursor spotlight on cards */
.glow { position: relative; isolation: isolate; }
.glow::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.22), transparent 65%);
  opacity: 0; transition: opacity 0.35s; pointer-events: none;
}
.glow:hover::before { opacity: 1; }
.project.glow::before { z-index: 2; mix-blend-mode: screen; }

/* Project cards tilt toward the cursor */
.js .project.reveal.in {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
}
.js .project.settled { transition: transform 0.18s ease-out, border-color 0.35s, box-shadow 0.35s; }
.project:hover { --lift: -8px; }
.projects { will-change: transform; }

/* Timeline fills in as you scroll */
.timeline-fill {
  position: absolute; inset: 0; transform-origin: top; transform: scaleY(var(--p, 1));
  background: var(--accent); box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.9);
}
.js .timeline-line { background: rgba(255, 255, 255, 0.12); bottom: 0; }
.js .t-dot { background: #0d1622; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); transition: background 0.4s, box-shadow 0.4s, transform 0.4s; }
.js .t-dot.on {
  background: var(--accent); transform: scale(1.08);
  box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0.14), 0 0 30px rgba(var(--accent-rgb), 0.7);
}

/* Portrait zooms slightly on hover */
.portrait img { transition: scale 0.6s ease; }
.portrait:hover img { scale: 1.05; }

@media (prefers-reduced-motion: reduce) {
  .hero h1 .w > span { animation: none; transform: none; }
  .eyebrow, .hero-line, .hero-right, .talk-badge { animation: none; }
  .roll, .magnetic { transition: none; }
}

/* ---------- Content loading ---------- */
body { transition: opacity 0.25s ease; }
.loading body { opacity: 0; }
.project-art img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Spam trap field: kept out of sight and out of the tab order */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
