:root {
  --cream: #fff9e9;
  --ink: #111111;
  --blue: #4d8df7;
  --yellow: #ffd83d;
  --purple: #b35bea;
  --green: #63ce75;
  --orange: #ff9d21;
  --coral: #ff646b;
  --white: #fffdf8;
  --border: 3px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-small: 4px 4px 0 var(--ink);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }

button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 8vw, 88px);
  transition: .3s ease;
}

.site-header.scrolled {
  background: rgba(255, 249, 233, .92);
  backdrop-filter: blur(12px);
  border-bottom: var(--border);
}

.logo, .talk-btn { font-weight: 700; }

.sticker {
  border: var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-small);
  transition: transform .2s ease, box-shadow .2s ease;
}

.sticker:hover {
  transform: translate(-2px, -2px) rotate(-1deg);
  box-shadow: 6px 6px 0 var(--ink);
}

.logo {
  background: var(--white);
  padding: 8px 12px;
  font-size: 20px;
  transform: rotate(-1deg);
}

.logo span { color: var(--blue); }

.nav-pill {
  display: flex;
  gap: 25px;
  background: var(--white);
  border: var(--border);
  border-radius: 999px;
  padding: 10px 22px;
  box-shadow: var(--shadow-small);
  font-size: 13px;
  font-weight: 600;
}

.nav-pill a { transition: .2s; }
.nav-pill a:hover { color: var(--blue); transform: translateY(-2px); }

.talk-btn {
  background: var(--yellow);
  padding: 10px 18px;
}

.section-pad {
  padding: 120px clamp(22px, 11vw, 140px);
}

.hero {
  min-height: 100vh;
  position: relative;
  padding-top: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-intro { margin-bottom: 20px; }

.pill {
  display: inline-block;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--ink);
}

.blue { background: var(--blue); color: var(--ink); }
.yellow { background: var(--yellow); }
.green { background: var(--green); }
.purple { background: var(--purple); }
.coral { background: var(--coral); }
.orange { background: var(--orange); }
.white { background: var(--white); }

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) .8fr;
  align-items: center;
  gap: 40px;
}

.display-title {
  font-size: clamp(52px, 8vw, 120px);
  line-height: .82;
  letter-spacing: -5px;
  margin: 20px 0 35px;
  font-weight: 700;
}

.display-title span { display: block; }

.outline {
  color: transparent;
  -webkit-text-stroke: 3px var(--ink);
}

.hero-description {
  max-width: 500px;
  padding: 18px 20px;
  font-size: 17px;
  line-height: 1.45;
  transform: rotate(-1deg);
}

.hero-description p { margin: 0; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 20px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}

.button:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.black { background: var(--ink); color: white; }
.purple { color: var(--ink); }

.hero-shape {
  height: 420px;
  position: relative;
}

.shape-star {
  position: absolute;
  right: 12%;
  top: 8%;
  font-size: clamp(100px, 16vw, 230px);
  color: var(--yellow);
  -webkit-text-stroke: 3px var(--ink);
  transform: rotate(12deg);
  filter: drop-shadow(8px 8px 0 var(--ink));
}

.shape-circle {
  position: absolute;
  width: 220px;
  height: 220px;
  right: 25%;
  bottom: 4%;
  border: var(--border);
  border-radius: 50%;
  background: var(--blue);
  box-shadow: var(--shadow);
  animation: pulse 3s ease-in-out infinite;
}

.float { animation: float 4s ease-in-out infinite; }

.scroll-cue {
  position: absolute;
  bottom: 24px;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  transform: translateX(-50%);
}

.scroll-cue span {
  width: 28px;
  height: 28px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  animation: bounce 1.6s infinite;
}

.marquee, .status-bar {
  overflow: hidden;
  white-space: nowrap;
  border-block: var(--border);
}

.marquee { height: 48px; display: flex; align-items: center; }
.black { background: var(--ink); color: white; }

.marquee-track, .status-bar {
  display: flex;
  align-items: center;
  gap: 22px;
  width: max-content;
  animation: marquee 24s linear infinite;
}

.marquee-track {
  font-family: "DM Mono", monospace;
  font-size: 18px;
  font-weight: 700;
}

.marquee-track span:nth-of-type(3n) { color: var(--yellow); }
.marquee-track span:nth-of-type(3n+1) { color: var(--blue); }
.marquee-track span:nth-of-type(3n+2) { color: var(--green); }

.blue-section {
  position: relative;
  background: var(--blue);
  border-bottom: var(--border);
}

.section-heading {
  font-size: clamp(48px, 7vw, 90px);
  line-height: .82;
  margin-bottom: 50px;
  text-shadow: 4px 4px 0 var(--white);
}

.section-heading span, .section-heading strong {
  display: block;
}

.section-heading strong { color: var(--yellow); }

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 50px;
  align-items: center;
}

.paper-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-card {
  padding: 30px;
  font-size: 16px;
  line-height: 1.65;
}

.rotate-left { transform: rotate(-1deg); }

.about-card hr {
  border: 0;
  border-top: 2px solid var(--ink);
  margin: 22px 0;
}

.profile-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-line small {
  display: block;
  font-size: 11px;
}

.avatar, .quote-avatar {
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-weight: 700;
}

.avatar {
  width: 48px;
  height: 48px;
  background: var(--coral);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.stat-card {
  min-height: 145px;
  padding: 22px;
  border: var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.stat-card strong {
  font-size: 54px;
  line-height: 1;
}

.stat-card span {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
}

.skills {
  background: var(--cream);
  border-bottom: var(--border);
}

.center-heading {
  text-align: center;
  margin-bottom: 55px;
}

.center-heading h2, .section-title-row h2, .contact h2 {
  margin: 16px 0 0;
  font-size: clamp(48px, 7vw, 90px);
  line-height: .9;
  letter-spacing: -4px;
}

.center-heading em, .section-title-row em, .contact em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
}

.skills-cloud {
  max-width: 760px;
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.skill {
  border: var(--border);
  border-radius: 10px;
  padding: 10px 17px;
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 700;
  animation: skillFloat 4s ease-in-out infinite;
}

.skill:nth-child(2n) { transform: rotate(-3deg); animation-delay: -.5s; }
.skill:nth-child(3n) { transform: rotate(2deg); animation-delay: -1s; }
.skill:nth-child(4n) { transform: rotate(-1deg); animation-delay: -1.5s; }

.black-pill { background: var(--ink); color: white; }

.yellow-section {
  background: var(--yellow);
  border-bottom: var(--border);
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: end;
  margin-bottom: 60px;
}

.section-title-row > p {
  max-width: 300px;
  font-family: "DM Mono", monospace;
  font-size: 12px;
}

.project-grid {
  display: grid;
  gap: 55px;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}

.project-card.reverse .project-info { order: 1; }
.project-card.reverse .project-media { order: 2; }

.project-media {
  min-height: 330px;
  border: var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.dark-art { background: #202127; }
.purple-art { background: #30204a; }
.black-art { background: #101010; }
.orange-art { background: var(--orange); }

.browser-window {
  width: 70%;
  min-height: 190px;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 7px;
  box-shadow: 9px 9px 0 rgba(0,0,0,.5);
  transform: rotate(-3deg);
  transition: transform .5s ease;
}

.project-media:hover .browser-window {
  transform: rotate(2deg) scale(1.04);
}

.browser-top {
  height: 23px;
  background: #dedede;
  border-bottom: 2px solid var(--ink);
  display: flex;
  align-items: center;
  gap: 5px;
  padding-left: 8px;
}

.browser-top i {
  width: 7px;
  height: 7px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.fake-screen { padding: 18px; }
.fake-line { width: 50%; height: 8px; background: var(--ink); margin-bottom: 10px; }
.fake-line.long { width: 78%; }
.fake-box { width: 100%; height: 55px; background: var(--blue); border: 2px solid var(--ink); margin-top: 18px; }
.fake-box.small { width: 42%; background: var(--yellow); }
.fake-circle { width: 60px; height: 60px; background: var(--coral); border: 3px solid var(--ink); border-radius: 50%; }

.big-word {
  color: white;
  font-size: clamp(50px, 9vw, 120px);
  font-weight: 700;
  transform: rotate(-7deg);
  text-shadow: 7px 7px 0 var(--purple);
}

.orange-art .big-word {
  color: var(--ink);
  text-shadow: 7px 7px 0 var(--yellow);
}

.project-info {
  padding: 30px;
  margin: 22px 0 22px -18px;
  position: relative;
  z-index: 2;
  align-self: center;
}

.project-card.reverse .project-info { margin: 22px -18px 22px 0; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.tags span {
  padding: 5px 9px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--purple);
  font-size: 10px;
  font-weight: 700;
}

.tags span:nth-child(2) { background: var(--green); }
.tags span:nth-child(3) { background: var(--yellow); }

.project-info h3 {
  margin: 0 0 12px;
  font-size: 30px;
}

.project-info p {
  max-width: 520px;
  line-height: 1.55;
}

.project-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.purple-section {
  background: #b35bea;
  border-bottom: var(--border);
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.16) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.16) 25%, transparent 25%);
  background-size: 28px 28px;
}

.center-heading.light h2 { color: white; text-shadow: 4px 4px 0 var(--ink); }
.center-heading.light em { -webkit-text-stroke-color: white; }

.timeline {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  padding-left: 60px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--ink);
}

.timeline-item {
  position: relative;
  margin-bottom: 35px;
}

.timeline-dot {
  position: absolute;
  left: -53px;
  top: 35px;
  width: 22px;
  height: 22px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  z-index: 2;
}

.green-dot { background: var(--green); }
.orange-dot { background: var(--orange); }
.yellow-dot { background: var(--yellow); }

.timeline-card {
  padding: 25px;
  transform: rotate(-.5deg);
}

.timeline-item:nth-child(2) .timeline-card { transform: rotate(.6deg); }
.timeline-item:nth-child(3) .timeline-card { transform: rotate(-.8deg); }

.date {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 10px;
  font-weight: 700;
}

.timeline-card h3 {
  margin: 12px 0 2px;
  font-size: 28px;
}

.timeline-card strong { color: var(--coral); }
.timeline-card p { line-height: 1.5; }

.testimonials {
  background: var(--cream);
  border-bottom: var(--border);
}

.inline-sticker {
  display: inline-block;
  padding: 5px 12px;
  font-size: .75em;
  transform: rotate(-2deg);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  align-items: center;
}

.testimonial {
  padding: 28px;
  position: relative;
  min-height: 270px;
  transform: rotate(-1deg);
}

.testimonial:nth-child(2) {
  transform: rotate(2deg);
  background: var(--green);
}

.testimonial:nth-child(3) { transform: rotate(-1deg); }

.quote-avatar {
  position: absolute;
  width: 52px;
  height: 52px;
  top: -25px;
  left: 22px;
}

.blue-avatar { background: var(--blue); }
.red-avatar { background: var(--coral); }
.orange-avatar { background: var(--orange); }

.stars {
  margin-top: 22px;
  color: #f4bd00;
  letter-spacing: 2px;
}

.testimonial p {
  line-height: 1.55;
  font-weight: 500;
}

.testimonial small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
}

.status-bar {
  min-height: 48px;
  background: var(--yellow);
  border-bottom: var(--border);
  padding: 0;
  gap: 28px;
  font-size: 14px;
  font-weight: 700;
}

.dark-section {
  min-height: 650px;
  position: relative;
  background-color: #111;
  color: white;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 28px 28px;
}

.contact-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding-top: 60px;
}

.contact h2 {
  color: white;
  text-shadow: 4px 4px 0 var(--yellow);
}

.contact em {
  color: var(--yellow);
  -webkit-text-stroke: 0;
}

.contact-inner > p {
  max-width: 620px;
  margin: 30px auto;
  color: #ddd;
  font-size: 17px;
  line-height: 1.6;
}

.contact-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.contact-actions .blue { background: var(--blue); }
.contact-actions .purple { background: var(--purple); }

.footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  min-height: 72px;
  padding: 15px clamp(22px, 8vw, 100px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--yellow);
  color: var(--ink);
  border-top: var(--border);
  font-size: 12px;
  font-weight: 700;
}

.accent { color: var(--blue); }

.decor-star {
  position: absolute;
  right: 5%;
  top: 8%;
  color: rgba(255,255,255,.55);
  font-size: 100px;
  transform: rotate(18deg);
}

.reveal {
  opacity: 0;
  transform: translateY(45px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.rotate-left.reveal.visible { transform: rotate(-1deg); }

@keyframes float {
  0%,100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .92; }
}
  50% { transform: scale(1.07); }
}

@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@keyframes skillFloat {
  0%,100% { translate: 0 0; }
  50% { translate: 0 -5px; }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 900px) {
  .site-header { padding-inline: 18px; }
  .nav-pill { gap: 13px; padding-inline: 15px; }
  .talk-btn { display: none; }

  .hero-content,
  .about-grid,
  .project-card {
    grid-template-columns: 1fr;
  }

  .hero-shape { height: 230px; }
  .shape-star { right: 35%; top: 0; font-size: 130px; }
  .shape-circle { width: 120px; height: 120px; right: 28%; }

  .project-card.reverse .project-info,
  .project-card.reverse .project-media,
  .project-info {
    order: initial;
  }

  .project-info,
  .project-card.reverse .project-info {
    margin: -20px 18px 0;
  }

  .project-media { min-height: 280px; }

  .testimonial-grid { grid-template-columns: 1fr; }
  .testimonial { min-height: auto; margin: 12px 20px; }

  .section-title-row { align-items: start; flex-direction: column; }
}

@media (max-width: 650px) {
  .site-header { height: 66px; }
  .logo { font-size: 16px; padding: 7px 10px; }
  .nav-pill { gap: 10px; padding: 8px 12px; font-size: 11px; }

  .section-pad { padding: 90px 20px; }

  .hero { padding-top: 115px; }
  .display-title {
    font-size: clamp(45px, 14vw, 72px);
    letter-spacing: -3px;
  }

  .outline { -webkit-text-stroke-width: 2px; }

  .hero-description { font-size: 14px; }
  .hero-shape { height: 170px; }

  .section-heading,
  .center-heading h2,
  .section-title-row h2,
  .contact h2 {
    font-size: clamp(43px, 14vw, 68px);
    letter-spacing: -2px;
  }

  .stats-grid { gap: 12px; }
  .stat-card { min-height: 120px; }
  .stat-card strong { font-size: 40px; }

  .project-media { min-height: 220px; }
  .browser-window { width: 75%; }

  .timeline { padding-left: 40px; }
  .timeline::before { left: 10px; }
  .timeline-dot { left: -40px; }

  .footer {
    position: static;
    flex-direction: column;
    gap: 7px;
    text-align: center;
  }

  .dark-section { min-height: 600px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}


/* ===== EXTRA MOTION + GLOW ===== */
:root{
  --glow-blue: rgba(77,141,247,.75);
  --glow-yellow: rgba(255,216,61,.72);
  --glow-purple: rgba(179,91,234,.72);
  --glow-green: rgba(99,206,117,.65);
  --glow-coral: rgba(255,100,107,.65);
}

body{
  background:
    radial-gradient(circle at 12% 18%, rgba(77,141,247,.12), transparent 28%),
    radial-gradient(circle at 88% 72%, rgba(179,91,234,.10), transparent 30%),
    var(--cream);
}

body::after{
  content:"";
  position:fixed;
  width:420px;height:420px;
  border-radius:50%;
  pointer-events:none;
  z-index:-1;
  background:radial-gradient(circle, rgba(77,141,247,.14), transparent 68%);
  filter:blur(20px);
  left:-160px; top:25%;
  animation:ambientGlow 9s ease-in-out infinite alternate;
}

.sticker,
.paper-card,
.project-media,
.button,
.stat-card{
  will-change:transform, box-shadow;
}

.button:hover,
.sticker:hover{
  filter:brightness(1.04);
}

.hero::before,
.about::before,
.skills::before,
.work::before,
.purple-section::before,
.contact::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.7;
}

.hero::before{
  background:
    radial-gradient(circle at 76% 35%, rgba(77,141,247,.18), transparent 18%),
    radial-gradient(circle at 84% 62%, rgba(255,216,61,.15), transparent 17%);
  animation:heroAura 6s ease-in-out infinite alternate;
}

.hero-shape{
  filter:drop-shadow(0 0 18px rgba(77,141,247,.25));
}

.shape-star{
  animation:starFloat 4.5s ease-in-out infinite, starGlow 2.5s ease-in-out infinite alternate;
}

.shape-circle{
  box-shadow:
    6px 6px 0 var(--ink),
    0 0 18px var(--glow-blue),
    0 0 45px rgba(77,141,247,.25);
}

.pill,
.skill,
.stat-card,
.project-media,
.timeline-card,
.testimonial{
  transition:
    transform .35s cubic-bezier(.2,.8,.2,1),
    box-shadow .35s ease,
    filter .35s ease;
}

.pill:hover{
  box-shadow:3px 3px 0 var(--ink), 0 0 20px rgba(255,216,61,.45);
}

.skill:hover{
  transform:translateY(-8px) rotate(-2deg) scale(1.06)!important;
  box-shadow:5px 7px 0 var(--ink), 0 0 24px rgba(77,141,247,.42);
}

.stat-card:hover{
  transform:translateY(-10px) rotate(-2deg) scale(1.025);
}

.project-media:hover{
  box-shadow:8px 8px 0 var(--ink), 0 0 28px rgba(255,216,61,.28);
}

.project-info:hover{
  box-shadow:8px 8px 0 var(--ink), 0 0 25px rgba(255,255,255,.35);
}

.timeline-card:hover{
  transform:translateY(-6px) rotate(-1deg)!important;
  box-shadow:8px 8px 0 var(--ink), 0 0 25px rgba(179,91,234,.4);
}

.testimonial:hover{
  transform:translateY(-8px) rotate(-1deg) scale(1.015);
  box-shadow:8px 8px 0 var(--ink), 0 0 25px rgba(99,206,117,.35);
}

.marquee-track,
.status-bar{
  animation-duration:18s;
}

.status-bar{
  box-shadow:0 0 25px rgba(255,216,61,.35);
}

.reveal{
  filter:blur(5px);
}

.reveal.visible{
  filter:blur(0);
}

.hero-intro.reveal.visible{
  animation:popIn .75s cubic-bezier(.2,1.4,.4,1) both;
}

.display-title span{
  animation:titleReveal .9s cubic-bezier(.2,.8,.2,1) both;
}
.display-title span:nth-child(1){animation-delay:.1s}
.display-title span:nth-child(2){animation-delay:.22s}
.display-title span:nth-child(3){animation-delay:.34s}

.hero-description{
  animation:paperFloat 5s ease-in-out infinite;
  box-shadow:6px 6px 0 var(--ink), 0 0 25px rgba(255,255,255,.2);
}

.hero-actions .button:nth-child(1){
  animation:buttonPulse 2.8s ease-in-out infinite;
}

.scroll-cue span{
  box-shadow:0 0 15px rgba(77,141,247,.45);
}

.decor-star{
  animation:decorSpin 14s linear infinite;
  text-shadow:0 0 25px rgba(255,255,255,.4);
}

.section-heading strong{
  animation:textGlow 2.2s ease-in-out infinite alternate;
}

.center-heading .pill{
  animation:badgeGlow 2.5s ease-in-out infinite alternate;
}

.contact .pill{
  animation:badgeGlowYellow 2.5s ease-in-out infinite alternate;
}

.contact h2{
  animation:contactGlow 3s ease-in-out infinite alternate;
}

.contact-actions .button{
  animation:contactFloat 4s ease-in-out infinite;
}
.contact-actions .button:nth-child(2){animation-delay:-1.3s}
.contact-actions .button:nth-child(3){animation-delay:-2.6s}

.cursor-dot{
  position:fixed;
  left:0;top:0;
  width:9px;height:9px;
  border-radius:50%;
  background:var(--blue);
  box-shadow:0 0 12px var(--glow-blue),0 0 30px rgba(77,141,247,.35);
  pointer-events:none;
  z-index:10000;
  transform:translate(-50%,-50%);
  opacity:0;
  transition:opacity .2s ease, width .2s ease, height .2s ease;
}

@keyframes ambientGlow{
  from{transform:translate(0,0) scale(.85);opacity:.45}
  to{transform:translate(250px,80px) scale(1.2);opacity:.9}
}
@keyframes heroAura{
  from{transform:scale(.9);opacity:.45}
  to{transform:scale(1.08);opacity:.9}
}
@keyframes starFloat{
  0%,100%{transform:rotate(12deg) translateY(0)}
  50%{transform:rotate(18deg) translateY(-16px)}
}
@keyframes starGlow{
  from{filter:drop-shadow(8px 8px 0 var(--ink)) drop-shadow(0 0 2px var(--yellow))}
  to{filter:drop-shadow(8px 8px 0 var(--ink)) drop-shadow(0 0 22px var(--glow-yellow))}
}
@keyframes titleReveal{
  from{opacity:0;transform:translateY(45px);clip-path:inset(0 0 100% 0)}
  to{opacity:1;transform:translateY(0);clip-path:inset(0 0 0 0)}
}
@keyframes popIn{
  from{opacity:0;transform:translateY(20px) scale(.88) rotate(-5deg)}
  to{opacity:1;transform:translateY(0) scale(1) rotate(0)}
}
@keyframes paperFloat{
  0%,100%{transform:rotate(-1deg) translateY(0)}
  50%{transform:rotate(.4deg) translateY(-5px)}
}
@keyframes buttonPulse{
  0%,100%{box-shadow:4px 4px 0 var(--ink)}
  50%{box-shadow:4px 4px 0 var(--ink),0 0 20px rgba(255,100,107,.4)}
}
@keyframes textGlow{
  from{text-shadow:4px 4px 0 var(--white),0 0 0 rgba(255,216,61,0)}
  to{text-shadow:4px 4px 0 var(--white),0 0 22px rgba(255,216,61,.7)}
}
@keyframes badgeGlow{
  from{box-shadow:3px 3px 0 var(--ink),0 0 0 rgba(99,206,117,0)}
  to{box-shadow:3px 3px 0 var(--ink),0 0 22px rgba(99,206,117,.55)}
}
@keyframes badgeGlowYellow{
  from{box-shadow:3px 3px 0 var(--ink),0 0 0 rgba(255,216,61,0)}
  to{box-shadow:3px 3px 0 var(--ink),0 0 22px rgba(255,216,61,.6)}
}
@keyframes contactGlow{
  from{text-shadow:4px 4px 0 var(--yellow),0 0 0 rgba(255,216,61,0)}
  to{text-shadow:4px 4px 0 var(--yellow),0 0 28px rgba(255,216,61,.45)}
}
@keyframes contactFloat{
  0%,100%{transform:translateY(0) rotate(0)}
  50%{transform:translateY(-5px) rotate(-1deg)}
}
@keyframes decorSpin{
  from{transform:rotate(18deg)}
  to{transform:rotate(378deg)}
}

@media (max-width:650px){
  .cursor-dot{display:none}
}


/* ===== LIVE BUTTON MOTION — reference-style ===== */
.button,
.talk-btn,
.contact-actions .button {
  position: relative;
  overflow: hidden;
  transform-origin: center;
  isolation: isolate;
  transition:
    transform .18s cubic-bezier(.2,.9,.25,1.4),
    box-shadow .18s ease,
    filter .18s ease;
}

.button::before,
.talk-btn::before {
  content: "";
  position: absolute;
  width: 38px;
  height: 180%;
  left: -55px;
  top: -40%;
  background: rgba(255,255,255,.45);
  transform: rotate(20deg);
  filter: blur(5px);
  pointer-events: none;
  z-index: -1;
  animation: buttonShine 3.2s ease-in-out infinite;
}

.button::after,
.talk-btn::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  pointer-events: none;
}

.button:hover,
.talk-btn:hover {
  filter: brightness(1.1) saturate(1.08);
  transform: translate(var(--mx, 0px), var(--my, 0px)) scale(1.045) rotate(var(--rot, 0deg));
  box-shadow:
    5px 6px 0 var(--ink),
    0 0 20px var(--button-glow, rgba(77,141,247,.45));
}

.hero-actions .button:first-child {
  --button-glow: rgba(255,100,107,.7);
  animation: liveButton 2.8s ease-in-out infinite;
}

.hero-actions .button:nth-child(2) {
  --button-glow: rgba(255,255,255,.5);
  animation: liveButtonAlt 3.4s ease-in-out infinite;
}

.talk-btn {
  --button-glow: rgba(255,216,61,.7);
  animation: talkFloat 3s ease-in-out infinite;
}

.contact-actions .button:nth-child(1) {
  --button-glow: rgba(255,255,255,.6);
}
.contact-actions .button:nth-child(2) {
  --button-glow: rgba(77,141,247,.75);
}
.contact-actions .button:nth-child(3) {
  --button-glow: rgba(179,91,234,.75);
}

@keyframes liveButton {
  0%,100% { transform: translateY(0) rotate(0deg); }
  18% { transform: translateY(-4px) rotate(-1deg); }
  36% { transform: translateY(2px) rotate(1.2deg); }
  52% { transform: translateY(-2px) rotate(-.6deg); }
  70% { transform: translateY(1px) rotate(.4deg); }
}

@keyframes liveButtonAlt {
  0%,100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(3px) rotate(1deg); }
  50% { transform: translateY(-4px) rotate(-1deg); }
  75% { transform: translateY(2px) rotate(.6deg); }
}

@keyframes talkFloat {
  0%,100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-5px) rotate(1.5deg); }
}

@keyframes buttonShine {
  0%, 48% { left: -65px; opacity: 0; }
  58% { opacity: .8; }
  75%,100% { left: 125%; opacity: 0; }
}

/* Buttons react continuously to pointer proximity */
.magnetic-btn {
  will-change: transform;
}


/* ===== REFINED BUTTON MOTION =====
   Subtle independent floating + micro tilt.
   No large bouncing. Designed to feel like the reference.
*/
.button,
.talk-btn,
.contact-actions .button {
  --bx: 0px;
  --by: 0px;
  --br: 0deg;
  --float-y: 0px;
  --float-r: 0deg;
  position: relative;
  transform:
    translate3d(var(--bx), calc(var(--by) + var(--float-y)), 0)
    rotate(calc(var(--br) + var(--float-r)));
  transform-origin: center;
  will-change: transform, box-shadow;
  transition:
    transform .16s cubic-bezier(.2,.75,.25,1),
    box-shadow .18s ease,
    filter .18s ease;
}

.hero-actions .button:nth-child(1) {
  animation: referenceFloatA 4.2s ease-in-out infinite;
}

.hero-actions .button:nth-child(2) {
  animation: referenceFloatB 4.8s ease-in-out infinite;
}

.talk-btn {
  animation: referenceTalk 4.5s ease-in-out infinite;
}

.contact-actions .button:nth-child(1) {
  animation: referenceContactA 4.6s ease-in-out infinite;
}

.contact-actions .button:nth-child(2) {
  animation: referenceContactB 5.1s ease-in-out infinite;
}

.contact-actions .button:nth-child(3) {
  animation: referenceContactC 4.9s ease-in-out infinite;
}

/* Very small movements; each button has a different phase. */
@keyframes referenceFloatA {
  0%,100% { --float-y: 0px; --float-r: 0deg; }
  25% { --float-y: -2px; --float-r: -.45deg; }
  50% { --float-y: 1px; --float-r: .35deg; }
  75% { --float-y: -1px; --float-r: -.2deg; }
}

@keyframes referenceFloatB {
  0%,100% { --float-y: 0px; --float-r: 0deg; }
  30% { --float-y: 1px; --float-r: .35deg; }
  60% { --float-y: -2px; --float-r: -.35deg; }
  82% { --float-y: 0px; --float-r: .2deg; }
}

@keyframes referenceTalk {
  0%,100% { --float-y: 0px; --float-r: -.7deg; }
  35% { --float-y: -2px; --float-r: .1deg; }
  70% { --float-y: 1px; --float-r: -.15deg; }
}

@keyframes referenceContactA {
  0%,100% { --float-y: 0px; --float-r: 0deg; }
  40% { --float-y: -2px; --float-r: -.3deg; }
  70% { --float-y: 1px; --float-r: .2deg; }
}

@keyframes referenceContactB {
  0%,100% { --float-y: 0px; --float-r: .3deg; }
  35% { --float-y: 1px; --float-r: -.2deg; }
  70% { --float-y: -2px; --float-r: .35deg; }
}

@keyframes referenceContactC {
  0%,100% { --float-y: 0px; --float-r: -.25deg; }
  30% { --float-y: -1px; --float-r: .35deg; }
  65% { --float-y: 2px; --float-r: -.15deg; }
}

/* Reference-like hover: stronger but still controlled. */
.button:hover,
.talk-btn:hover,
.contact-actions .button:hover {
  transform:
    translate3d(var(--bx), calc(var(--by) - 2px), 0)
    rotate(calc(var(--br) - 1deg))
    scale(1.025);
  filter: brightness(1.04);
  box-shadow:
    5px 6px 0 var(--ink),
    0 8px 22px rgba(0,0,0,.16);
}

/* Soft highlight passing over the button. */
.button::before,
.talk-btn::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 140%;
  top: -20%;
  left: -45px;
  background: rgba(255,255,255,.34);
  transform: rotate(18deg);
  filter: blur(4px);
  pointer-events: none;
  z-index: 1;
  animation: softButtonShine 5.5s ease-in-out infinite;
}

@keyframes softButtonShine {
  0%, 62% { left: -50px; opacity: 0; }
  68% { opacity: .45; }
  84%,100% { left: 125%; opacity: 0; }
}

/* Respect reduced-motion settings. */
@media (prefers-reduced-motion: reduce) {
  .button,
  .talk-btn,
  .contact-actions .button {
    animation: none !important;
  }
}


/* ===== STATUS BAR: RIGHT TO LEFT ===== */
.status-bar {
  overflow: hidden;
  white-space: nowrap;
  display: block;
  position: relative;
}

.status-bar .status-track {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  min-width: max-content;
  padding: 10px 0;
  animation: statusRightToLeft 18s linear infinite;
  will-change: transform;
}

@keyframes statusRightToLeft {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 650px) {
  .status-bar .status-track {
    animation-duration: 14s;
  }
}

/* =========================================================
   FIX: PREVENT WHOLE-PAGE AUTO ZOOM / VISUAL-VIEWPORT JUMP
   ========================================================= */

html {
    width: 100%;
    min-width: 320px;
    overflow-x: hidden;
}

body {
    width: 100%;
    min-width: 320px;
    overflow-x: hidden;
}

/* Never scale the root/page wrappers themselves. */
html,
body,
main,
header,
footer,
section {
    transform: none;
}

/* Keep animated decorative layers inside their own boxes. */
.hero,
.hero-content,
.hero-visual,
.about,
.skills,
.work,
.contact,
.purple-section,
.status-bar,
.tech-marquee {
    overflow-x: clip;
}

/* Disable the large ambient scale animations that can look like
   the whole viewport is zooming. */
@keyframes ambientGlow {
    from { transform: translate(0, 0); opacity: .45; }
    to   { transform: translate(250px, 80px); opacity: .9; }
}

@keyframes heroAura {
    from { opacity: .45; }
    to   { opacity: .9; }
}

/* Disable scale on reveal so entrance motion is translate/opacity only. */
@keyframes popIn {
    from { opacity: 0; transform: translateY(20px) rotate(-5deg); }
    to   { opacity: 1; transform: translateY(0) rotate(0); }
}

/* The page itself must never receive a scale transform. */
body.zoom-safe,
body.zoom-safe * {
    -webkit-text-size-adjust: 100%;
}


/* =========================================================
   PROFILE PHOTO — EXACTLY INSIDE THE EXISTING CIRCLE
   ========================================================= */

.shape-circle {
  position: absolute !important;
  overflow: hidden !important;
  border-radius: 50% !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  background: transparent !important;
}

.shape-circle .profile-circle-image {
  position: absolute !important;
  inset: 0 !important;

  width: 100% !important;
  height: 100% !important;

  min-width: 100% !important;
  min-height: 100% !important;
  max-width: none !important;
  max-height: none !important;

  display: block !important;
  margin: 0 !important;
  padding: 0 !important;

  object-fit: cover !important;
  object-position: center 35% !important;

  border: 0 !important;
  outline: 0 !important;
  border-radius: 50% !important;

  transform: none !important;
  box-sizing: border-box !important;
}

/* Keep the original circle's border above the image. */
.shape-circle {
  isolation: isolate;
}

.shape-circle::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: var(--border);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  box-sizing: border-box;
}





/* =========================================================
   RESPONSIVE DEVICE FIX
   Desktop / Tablet / Phone
   No browser-like zooming; layout reflows naturally.
   ========================================================= */

html {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  zoom: 1 !important;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  zoom: 1 !important;
  -webkit-text-size-adjust: 100%;
  margin: 0;
}

img, svg, video, canvas {
  max-width: 100%;
}

/* ---- TABLET ---- */
@media (max-width: 1024px) {
  .container {
    width: min(92%, 900px);
    margin-inline: auto;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    gap: 32px;
  }

  .hero-visual {
    transform: none !important;
  }

  .shape-circle {
    max-width: 280px !important;
    max-height: 280px !important;
  }

  .status-bar,
  .tech-marquee {
    width: 100%;
  }
}

/* ---- PHONE ---- */
@media (max-width: 767px) {
  html, body {
    overflow-x: hidden !important;
  }

  .container {
    width: calc(100% - 32px) !important;
    max-width: 100% !important;
    margin-inline: auto !important;
  }

  header,
  nav {
    width: 100%;
    max-width: 100%;
  }

  .hero,
  .about,
  .skills,
  .work,
  .contact,
  .purple-section {
    width: 100% !important;
    min-width: 0 !important;
  }

  .hero-content {
    grid-template-columns: 1fr !important;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-visual {
    order: 2;
    justify-self: center;
    transform: none !important;
  }

  .shape-circle {
    width: min(78vw, 300px) !important;
    height: min(78vw, 300px) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
  }

  .nav-links {
    gap: 12px;
    flex-wrap: wrap;
  }

  .button,
  .talk-btn {
    max-width: 100%;
  }

  .tech-marquee__track {
    animation-duration: 12s;
  }
}

/* ---- SMALL PHONE ---- */
@media (max-width: 480px) {
  .container {
    width: calc(100% - 24px) !important;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .button,
  .contact-actions .button {
    width: 100%;
  }

  .shape-circle {
    width: 72vw !important;
    height: 72vw !important;
  }
}

/* Visitor counter */
.visitor-counter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
}
.visitor-counter strong {
  font-variant-numeric: tabular-nums;
}

/* Visitor total inside the former IDEAS BREWING spot */
#ideaVisitorCount {
  font-variant-numeric: tabular-nums;
}


/* =========================================================
   SOURCE CODE VIEWER
   ========================================================= */
.code-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.code-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(4, 5, 8, .78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.code-modal.show {
  display: flex;
  animation: codeOverlayIn .18s ease-out;
}

@keyframes codeOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.code-modal-box {
  width: min(1050px, 96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #101216;
  color: #f5f7fa;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0,0,0,.65), 0 0 35px rgba(255,255,255,.06);
  transform: translateY(0);
  animation: codeBoxIn .22s ease-out;
}

@keyframes codeBoxIn {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.code-modal-header {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 0 16px 0 20px;
  background: #171a20;
  border-bottom: 1px solid rgba(255,255,255,.09);
}

.code-window-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.code-window-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-window-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 50%;
  background: #ff5570;
  box-shadow: 0 0 14px rgba(255,85,112,.55);
}

.code-close {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  background: rgba(255,255,255,.07);
  color: #fff;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}

.code-close:hover {
  transform: rotate(4deg);
  background: rgba(255,255,255,.15);
}

.code-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  background: #0c0e12;
  border-bottom: 1px solid rgba(255,255,255,.08);
  overflow-x: auto;
}

.code-tab {
  flex: 0 0 auto;
  border: 0;
  border-radius: 9px;
  padding: 9px 14px;
  background: transparent;
  color: #8d96a3;
  font: 700 12px/1 system-ui, sans-serif;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.code-tab:hover {
  color: #fff;
  transform: translateY(-1px);
}

.code-tab.active {
  background: #fff;
  color: #101216;
}

.code-editor {
  min-height: 300px;
  height: 55vh;
  display: flex;
  overflow: auto;
  background: #0a0c0f;
  overscroll-behavior: contain;
}

.code-line-numbers {
  flex: 0 0 50px;
  padding: 20px 10px 20px 0;
  text-align: right;
  color: #4d5663;
  border-right: 1px solid rgba(255,255,255,.06);
  user-select: none;
  font: 13px/1.72 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.code-editor pre {
  margin: 0;
  padding: 20px 20px 28px;
  min-width: max-content;
  white-space: pre;
  tab-size: 2;
}

.code-editor code {
  color: #dbe2ea;
  font: 13px/1.72 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.code-modal-footer {
  min-height: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px 9px 18px;
  background: #11141a;
  border-top: 1px solid rgba(255,255,255,.08);
}

.code-hint {
  color: #788291;
  font: 12px/1.4 system-ui, sans-serif;
}

.copy-code {
  flex: 0 0 auto;
  border: 0;
  border-radius: 9px;
  padding: 10px 15px;
  background: #fff;
  color: #111;
  font: 800 12px/1 system-ui, sans-serif;
  cursor: pointer;
}

.copy-code:hover {
  transform: translateY(-1px);
}

@media (max-width: 700px) {
  .code-modal {
    padding: 8px;
  }

  .code-modal-box {
    width: 100%;
    max-height: 94vh;
    border-radius: 14px;
  }

  .code-modal-header {
    min-height: 55px;
    padding-left: 14px;
  }

  .code-editor {
    height: 62vh;
  }

  .code-editor code,
  .code-line-numbers {
    font-size: 11px;
  }

  .code-line-numbers {
    flex-basis: 38px;
    padding-right: 7px;
  }

  .code-editor pre {
    padding: 15px;
  }

  .code-modal-footer {
    align-items: flex-end;
  }

  .code-hint {
    display: none;
  }
}

/* =========================================================
   CODE VIEWER — TERMINAL / SOURCE CODE STYLE
   ========================================================= */
.code-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 5, 10, .82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.code-modal.show {
  display: flex;
  animation: codeFade .18s ease-out;
}
@keyframes codeFade { from { opacity: 0; } to { opacity: 1; } }

.code-terminal {
  width: min(1180px, 96vw);
  height: min(760px, 88vh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #0b0e14;
  color: #e8edf5;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  box-shadow: 0 35px 100px rgba(0,0,0,.7), 0 0 45px rgba(75,105,255,.08);
}

.terminal-top {
  height: 58px;
  flex: 0 0 58px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #10131b;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.traffic-lights {
  position: absolute;
  left: 18px;
  display: flex;
  gap: 10px;
}
.traffic {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  display: block;
}
.traffic.red { background: #ff5f57; }
.traffic.yellow { background: #febc2e; }
.traffic.green { background: #28c840; }

.terminal-title {
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #aeb7c5;
  font: 600 13px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.terminal-close {
  position: absolute;
  right: 15px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #77808e;
  font-size: 25px;
  cursor: pointer;
}
.terminal-close:hover { color: #fff; background: rgba(255,255,255,.08); }

.terminal-toolbar {
  min-height: 48px;
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  background: #0e1118;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.terminal-toolbar .code-tab {
  border: 0;
  border-radius: 7px;
  padding: 8px 13px;
  background: transparent;
  color: #737d8d;
  font: 700 11px/1 system-ui, sans-serif;
  cursor: pointer;
}
.terminal-toolbar .code-tab:hover { color: #dfe5ee; }
.terminal-toolbar .code-tab.active {
  background: #1d2430;
  color: #fff;
}
.terminal-copy {
  margin-left: auto;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 7px;
  padding: 8px 12px;
  background: #151a23;
  color: #cbd3df;
  font: 700 11px/1 system-ui, sans-serif;
  cursor: pointer;
}
.terminal-copy:hover { background: #202733; color: #fff; }

.terminal-code-wrap {
  min-height: 0;
  flex: 1;
  display: flex;
  overflow: auto;
  background:
    radial-gradient(circle at 80% 0%, rgba(80,100,160,.05), transparent 35%),
    #090c12;
  overscroll-behavior: contain;
}

.terminal-lines {
  flex: 0 0 55px;
  padding: 24px 12px 35px 0;
  text-align: right;
  color: #3f4856;
  user-select: none;
  border-right: 1px solid rgba(255,255,255,.045);
  font: 14px/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.terminal-code {
  margin: 0;
  padding: 24px 28px 35px;
  min-width: max-content;
  white-space: pre;
  tab-size: 2;
}
.terminal-code code {
  color: #d7dee9;
  font: 14px/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* lightweight source-code coloring */
.terminal-code .tok-keyword { color: #ff7b8b; }
.terminal-code .tok-name { color: #77b9ff; }
.terminal-code .tok-string { color: #b9d78c; }
.terminal-code .tok-number { color: #d5a7ff; }
.terminal-code .tok-comment { color: #697586; }
.terminal-code .tok-function { color: #f4c76d; }

@media (max-width: 700px) {
  .code-modal { padding: 8px; }
  .code-terminal {
    width: 100%;
    height: 92vh;
    border-radius: 12px;
  }
  .terminal-top { height: 52px; flex-basis: 52px; }
  .traffic-lights { left: 13px; gap: 7px; }
  .traffic { width: 10px; height: 10px; }
  .terminal-title { font-size: 11px; }
  .terminal-lines { flex-basis: 38px; padding-right: 8px; font-size: 11px; }
  .terminal-code { padding: 18px 18px 28px; }
  .terminal-code code { font-size: 11px; line-height: 1.7; }
  .terminal-toolbar { overflow-x: auto; }
}

/* ===== CODE BUTTON CLICK FIX ===== */
.code-btn {
  position: relative !important;
  z-index: 20 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
}

/* ===== CODE EDITOR ===== */
.code-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(5,7,12,.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  pointer-events: none;
}
.code-modal.show {
  display: flex !important;
  pointer-events: auto !important;
}
.code-window {
  width: min(1100px, 96vw);
  height: min(82vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0d1017;
  color: #e8edf5;
  border: 1px solid #2a3140;
  border-radius: 14px;
  box-shadow: 0 30px 100px rgba(0,0,0,.7);
  pointer-events: auto !important;
}
.code-window-top {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 14px;
  background: #10131b;
  border-bottom: 1px solid #222938;
}
.window-dots { display:flex; gap:8px; }
.window-dots i { width:13px; height:13px; border-radius:50%; display:block; background:#ff5b64; }
.window-dots i:nth-child(2){background:#ffbd3d;}
.window-dots i:nth-child(3){background:#29c941;}
#codeProjectTitle { flex:1; text-align:center; font-size:14px; }
.code-close {
  width:36px;height:36px;border:0;border-radius:8px;
  background:#1a1f29;color:#fff;font-size:24px;cursor:pointer;
  touch-action:manipulation;
}
.code-tabs {
  display:flex;gap:5px;padding:9px 12px;background:#090c12;
  border-bottom:1px solid #222938;overflow-x:auto;
}
.code-tab {
  border:0;padding:9px 15px;border-radius:7px;background:transparent;
  color:#8993a3;font-weight:800;cursor:pointer;touch-action:manipulation;
}
.code-tab.active { background:#fff;color:#111; }
.code-body {
  flex:1;display:flex;overflow:auto;min-height:0;background:#0b0e14;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
.code-lines {
  flex:0 0 48px;padding:18px 9px 30px 0;text-align:right;
  color:#485263;border-right:1px solid #202633;user-select:none;
  white-space:pre;font-size:13px;line-height:1.7;
}
.code-body pre { margin:0;padding:18px 20px 30px;min-width:max-content; }
.code-body code { font-size:13px;line-height:1.7;color:#e5e9ef;white-space:pre; }
.code-footer { padding:10px 14px;text-align:right;background:#10131b;border-top:1px solid #222938; }
#copyCode { border:0;border-radius:8px;padding:10px 15px;font-weight:800;cursor:pointer;touch-action:manipulation; }
@media(max-width:600px){
  .code-window{width:100%;height:90vh;border-radius:10px}
  .code-body code,.code-lines{font-size:11px}
  .code-lines{flex-basis:36px}
}

/* ===== CODE SYNTAX HIGHLIGHTING ===== */
.code-body code {
  color: #d7dee8;
  text-shadow: 0 0 8px rgba(255,255,255,.025);
}

.tok-keyword { color: #ff7ab2; }
.tok-string  { color: #a8e6a3; }
.tok-comment { color: #657184; font-style: italic; }
.tok-tag     { color: #7dd3fc; }
.tok-attr    { color: #ffd580; }
.tok-object  { color: #8ecbff; }
.tok-number  { color: #c9a7ff; }
.tok-punc    { color: #b9c2cf; }

/* Better editor appearance */
.code-body {
  scrollbar-width: thin;
  scrollbar-color: #3b4352 #0b0e14;
}

.code-body pre {
  background:
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 100%;
}

.code-lines {
  background: #0a0d13;
}

.code-window {
  border-color: rgba(255,255,255,.13);
}

/* FINAL MOBILE CLICK FIX */
.project-links,
.project-links .code-btn {
  position: relative !important;
  z-index: 9999 !important;
}

.project-links .code-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 44px !important;
  min-width: 72px !important;
  margin: 0 !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: rgba(0,0,0,.12);
}

.code-modal {
  pointer-events: none;
}
.code-modal.show {
  pointer-events: auto;
}


/* FINAL CODE BUTTON TOUCH FIX */
.project-links .code-btn {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  isolation: isolate !important;
}
.project-links .code-btn::before,
.project-links .code-btn::after {
  pointer-events: none !important;
}

/* ===== CERTIFICATES ===== */
.certificate-section{background:#ffd92f;color:#111214;position:relative;overflow:hidden;}
.certificate-section:before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.16;background-image:radial-gradient(#111214 1.5px,transparent 1.5px);background-size:18px 18px;mask-image:linear-gradient(90deg,black,transparent 22%,transparent 78%,black);}
.certificate-section>*{position:relative;z-index:1;}
.certificate-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px;margin-top:35px;}
.certificate-card{border:2.5px solid #111214;border-radius:24px;padding:24px;display:grid;grid-template-columns:40% 1fr;gap:22px;align-items:center;box-shadow:7px 7px 0 #111214;transition:.25s ease;overflow:hidden;}
.certificate-card:hover{transform:translate(-3px,-3px);box-shadow:10px 10px 0 #111214;}
.certificate-card.light{background:#fffdf5;color:#111214;}
.certificate-card.dark{background:#151619;color:#fff;}
.certificate-thumb{aspect-ratio:3/4;border:2px solid #111214;border-radius:8px;overflow:hidden;background:#eee;box-shadow:4px 4px 0 #111214;cursor:pointer;}
.certificate-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.certificate-tag{display:inline-block;background:#ffd92f;color:#111214;border:1.5px solid #111214;border-radius:99px;padding:5px 10px;font-size:11px;font-weight:800;}
.certificate-info h3{font-size:24px;line-height:1.08;margin:14px 0 18px;}
.certificate-info p{font-size:13px;margin:7px 0;}
.certificate-view{margin-top:16px;border:2px solid #111214;border-radius:13px;background:#111214;color:#fff;padding:10px 14px;font-weight:800;cursor:pointer;}
.certificate-card.dark .certificate-view{background:#ffd92f;color:#111214;}
.certificate-modal{position:fixed;inset:0;background:rgba(0,0,0,.88);display:none;place-items:center;padding:25px;z-index:9999;}
.certificate-modal.open{display:grid;}
.certificate-modal img{max-width:90vw;max-height:88vh;border:4px solid #fff;border-radius:10px;box-shadow:8px 8px 0 #ffd92f;}
.certificate-close{position:fixed;right:20px;top:18px;width:46px;height:46px;border:2px solid #111214;border-radius:50%;background:#ffd92f;font-size:30px;cursor:pointer;}
@media(max-width:850px){.certificate-grid{grid-template-columns:1fr;}}
@media(max-width:560px){.certificate-card{grid-template-columns:1fr;padding:18px;}.certificate-thumb{width:65%;margin:auto;}.certificate-info h3{font-size:21px;}}
