/* ════════════════════════════════════════════
   DESIGN TOKENS
════════════════════════════════════════════ */
:root {
  --ink: #04060d;
  --deep: #070b18;
  --card: #0b1022;
  --card2: #0d1328;
  --line: rgba(255, 255, 255, 0.06);
  --line2: rgba(255, 255, 255, 0.03);
  --muted: #4a5878;
  --body: #8899bb;
  --bright: #d4e0f7;
  --white: #eef3ff;
  --cyan: #00c2ff;
  --cyan2: #0090d4;
  --violet: #7c3aed;
  --violet2: #5b21b6;
  --glow-c: rgba(0, 194, 255, 0.18);
  --glow-v: rgba(124, 58, 237, 0.15);
}

/* ════════════════════════════════════════════
   RESET
════════════════════════════════════════════ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--ink);
  color: var(--bright);
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 400;
  overflow-x: hidden;
  cursor: none;
}

/* ── Grain ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px;
}

/* ════════════════════════════════════════════
   SCROLL PROGRESS BAR (right edge)
════════════════════════════════════════════ */
#scroll-bar {
  position: fixed;
  right: 0;
  top: 0;
  width: 3px;
  height: 100vh;
  z-index: 9997;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.04);
}

#scroll-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(to bottom, var(--cyan), var(--violet));
  transition: height .1s linear;
  box-shadow: 0 0 8px var(--cyan);
}

/* ════════════════════════════════════════════
   CURSOR
════════════════════════════════════════════ */
#cur {
  width: 8px;
  height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width .15s, height .15s, background .15s, box-shadow .15s;
  box-shadow: 0 0 12px var(--cyan), 0 0 24px rgba(0, 194, 255, .4);
}

#cur.big {
  width: 44px;
  height: 44px;
  background: rgba(0, 194, 255, .08);
  border: 1px solid rgba(0, 194, 255, .35);
  box-shadow: 0 0 20px var(--glow-c);
}

#cur.violet {
  background: rgba(124, 58, 237, .1);
  border: 1px solid rgba(124, 58, 237, .4);
  box-shadow: 0 0 20px var(--glow-v);
  width: 44px;
  height: 44px;
}

#cur-trail {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(0, 194, 255, .18);
  border-radius: 50%;
  position: fixed;
  z-index: 9998;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

/* ════════════════════════════════════════════
   BG CANVAS
════════════════════════════════════════════ */
#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ════════════════════════════════════════════
   NAV
════════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem 4rem;
  background: linear-gradient(to bottom, rgba(4, 6, 13, .96), transparent);
  backdrop-filter: blur(2px);
}

.logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: .12em;
  color: var(--white);
  text-decoration: none;
}

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

.nav-menu {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-menu a {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
  font-weight: 500;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -.3rem;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(to right, var(--cyan), var(--violet));
  transition: width .3s;
}

.nav-menu a:hover {
  color: var(--bright);
}

.nav-menu a:hover::after {
  width: 100%;
}

/* magnetic btn */
.nav-cta {
  padding: .5rem 1.4rem;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  font-weight: 500;
  transition: background .2s, color .2s, box-shadow .2s;
  font-family: 'Cabinet Grotesk', sans-serif;
  position: relative;
  display: inline-block;
}

.nav-cta:hover {
  background: var(--cyan);
  color: var(--ink);
  box-shadow: 0 0 20px var(--glow-c);
}

/* ════════════════════════════════════════════
   SECTION HELPERS
════════════════════════════════════════════ */
section {
  position: relative;
  z-index: 1;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 4rem;
}

.sec {
  padding: 9rem 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 500;
  margin-bottom: 2rem;
}

.eyebrow::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--cyan);
}

/* Section fade transitions */
.sec-fade {
  position: relative;
}

.sec-fade::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, var(--ink), transparent);
  z-index: 2;
  pointer-events: none;
}

.sec-fade::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--deep), transparent);
  z-index: 2;
  pointer-events: none;
}

/* gradient divider */
.g-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0, 194, 255, .18), rgba(124, 58, 237, .18), transparent);
  position: relative;
  z-index: 1;
}

/* ════════════════════════════════════════════
   HERO
════════════════════════════════════════════ */
#hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding-top: 5rem;
  position: relative;
  overflow: hidden;
}

/* Engineering grid overlay */
#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 194, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 194, 255, .025) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center center;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.hero-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 4rem;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-super {
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  animation: up .8s .1s forwards;
}

.hero-super::before {
  content: '';
  display: block;
  width: 3rem;
  height: 1px;
  background: var(--muted);
}

.hero-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(5rem, 13vw, 14rem);
  line-height: .88;
  letter-spacing: -.01em;
  color: var(--white);
  margin-bottom: 0;
  opacity: 0;
  animation: up .8s .2s forwards;
}

.hero-name .stroke {
  -webkit-text-stroke: 1px var(--cyan);
  color: transparent;
}

.hero-role {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2.5rem;
  opacity: 0;
  animation: up .8s .35s forwards;
}

/* Role Switcher */
.role-switcher {
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--body);
  font-weight: 300;
  max-width: 480px;
  line-height: 1.6;
}

.role-switcher .static-text {
  color: var(--body);
  font-weight: 300;
  display: block;
  margin-bottom: .4rem;
  font-size: .95rem;
}

.role-switcher .dynamic-wrap {
  height: 2em;
  overflow: hidden;
  position: relative;
}

.role-label {
  position: absolute;
  width: 100%;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  letter-spacing: .06em;
  color: var(--cyan);
  transition: none;
}

.role-label.exit {
  animation: roleOut .5s cubic-bezier(.4, 0, .2, 1) forwards;
}

.role-label.enter {
  animation: roleIn .5s cubic-bezier(.4, 0, .2, 1) forwards;
}

@keyframes roleOut {
  0% {
    opacity: 1;
    transform: translateY(0) blur(0px);
    filter: blur(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-20px);
    filter: blur(8px);
  }
}

@keyframes roleIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Magnetic buttons */
.btn-c {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 2.2rem;
  background: var(--cyan);
  color: var(--ink);
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: opacity .2s, transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}

.btn-c::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, .15));
  opacity: 0;
  transition: opacity .2s;
}

.btn-c:hover {
  opacity: .9;
  box-shadow: 0 0 30px var(--glow-c);
}

.btn-c:hover::after {
  opacity: 1;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 2.2rem;
  background: transparent;
  color: var(--bright);
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}

.btn-ghost:hover {
  border-color: rgba(124, 58, 237, .5);
  box-shadow: 0 0 24px var(--glow-v), inset 0 0 12px rgba(124, 58, 237, .05);
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: 0;
  animation: up .8s .6s forwards;
  z-index: 1;
}

.scroll-track {
  width: 1px;
  height: 56px;
  background: var(--muted);
  position: relative;
  overflow: hidden;
}

.scroll-track::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, var(--cyan), var(--violet));
  animation: scrollDrop 2s ease infinite;
}

@keyframes scrollDrop {
  0% {
    transform: translateY(-100%)
  }

  100% {
    transform: translateY(100%)
  }
}

/* ════════════════════════════════════════════
   MARQUEE
════════════════════════════════════════════ */
.marquee-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.4rem 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
  background: rgba(0, 0, 0, .2);
}

.marquee-inner {
  display: flex;
  white-space: nowrap;
  animation: marquee 22s linear infinite;
}

.marquee-inner span {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: .2em;
  color: var(--muted);
  padding: 0 3rem;
  display: inline-flex;
  align-items: center;
  gap: 3rem;
}

.marquee-inner span::after {
  content: '✦';
  color: var(--cyan);
  font-size: .7rem;
}

@keyframes marquee {
  from {
    transform: translateX(0)
  }

  to {
    transform: translateX(-50%)
  }
}

/* ════════════════════════════════════════════
   ABOUT
════════════════════════════════════════════ */
#about {
  background: var(--deep);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 8rem;
  align-items: center;
}

.about-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.8rem, 5vw, 5.5rem);
  line-height: .92;
  letter-spacing: -.01em;
  color: var(--white);
  margin-bottom: 2.5rem;
}

.about-heading em {
  font-style: normal;
  color: var(--cyan);
}

.about-heading em.v {
  color: var(--violet);
}

.about-body {
  font-size: 1.05rem;
  color: var(--body);
  line-height: 1.85;
  font-weight: 300;
}

.about-body p+p {
  margin-top: 1.2rem;
}

.about-body strong {
  color: var(--bright);
  font-weight: 500;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 2.5rem;
}

.chip {
  padding: .35rem .85rem;
  background: rgba(0, 194, 255, .05);
  border: 1px solid rgba(0, 194, 255, .12);
  color: var(--body);
  font-size: .78rem;
  letter-spacing: .04em;
  border-radius: 2px;
  transition: all .25s;
  font-weight: 400;
}

.chip:hover {
  background: linear-gradient(135deg, rgba(0, 194, 255, .1), rgba(124, 58, 237, .1));
  border-color: rgba(124, 58, 237, .4);
  color: var(--bright);
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.stat-row:first-child {
  border-top: 1px solid var(--line);
}

.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  letter-spacing: -.02em;
  color: var(--white);
  line-height: 1;
}

.stat-num span {
  font-size: 1.5rem;
  color: var(--cyan);
}

.stat-text {
  text-align: right;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.5;
  max-width: 180px;
}

/* ════════════════════════════════════════════
   EXPERIENCE
════════════════════════════════════════════ */
.exp-block {
  max-width: 800px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 3.5rem;
  transition: border-color .3s, transform .3s;
}

.exp-block:hover {
  border-color: rgba(0, 194, 255, .2);
  transform: translateY(-4px);
}

.exp-head {
  padding: 2.5rem 3rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.exp-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: .02em;
  color: var(--white);
}

.exp-company {
  font-size: .9rem;
  color: var(--cyan);
  font-weight: 500;
  margin-top: .3rem;
  letter-spacing: .04em;
}

.exp-period {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  border: 1px solid var(--line);
  padding: .4rem .9rem;
  border-radius: 2px;
}

.exp-body {
  padding: 2.5rem 3rem;
  background: linear-gradient(135deg, var(--card), rgba(11, 16, 34, .5));
}

.exp-desc {
  color: var(--body);
  line-height: 1.85;
  font-size: 1rem;
  font-weight: 300;
  margin-bottom: 2rem;
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.etag {
  padding: .3rem .75rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all .2s;
}

.etag:hover {
  border-color: rgba(0, 194, 255, .3);
  color: var(--cyan);
}

/* ════════════════════════════════════════════
   PROJECTS  — upgraded
════════════════════════════════════════════ */
#projects {
  background: var(--deep);
}

.proj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 4rem;
}

.pcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color .35s, transform .4s cubic-bezier(.16, 1, .3, 1), box-shadow .4s;
  position: relative;
  cursor: none;
  transform-style: preserve-3d;
}

.pcard:hover {
  border-color: rgba(0, 194, 255, .25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6), 0 0 30px rgba(0, 194, 255, .08);
}

/* Browser frame mockup */
.pcard-browser {
  background: #0a0f1e;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  height: 175px;
}

.browser-bar {
  height: 28px;
  background: #0f1628;
  border-bottom: 1px solid var(--line2);
  display: flex;
  align-items: center;
  padding: 0 .75rem;
  gap: .4rem;
}

.browser-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.bd-r {
  background: #ff5f56;
  opacity: .7;
}

.bd-y {
  background: #febc2e;
  opacity: .7;
}

.bd-g {
  background: #27c93f;
  opacity: .7;
}

.browser-url {
  flex: 1;
  height: 16px;
  margin-left: .5rem;
  background: rgba(255, 255, 255, .04);
  border-radius: 2px;
  display: flex;
  align-items: center;
  padding: 0 .5rem;
  font-size: .6rem;
  color: var(--muted);
  letter-spacing: .04em;
}

.browser-screen {
  height: calc(100% - 28px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* placeholder gradient screens */
.bs-1 {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
}

.bs-2 {
  background: linear-gradient(135deg, #0f172a 0%, #052e16 100%);
}

.bs-3 {
  background: linear-gradient(135deg, #0f172a 0%, #1e0a2e 100%);
}

.browser-screen .mockup-lines {
  width: 80%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.mockup-lines .ml {
  height: 3px;
  border-radius: 2px;
  margin-bottom: .5rem;
  opacity: .15;
}

.ml-1 {
  background: var(--cyan);
  width: 60%;
}

.ml-2 {
  background: var(--violet);
  width: 40%;
}

.ml-3 {
  background: var(--bright);
  width: 80%;
}

.ml-4 {
  background: var(--bright);
  width: 55%;
}

/* Hover tilt handled by JS */

/* video overlay on hover */
.pcard-video {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}

.pcard:hover .pcard-video {
  opacity: 1;
}

.pcard-video video,
.pcard-video .video-fallback {
  width: 100%;
  height: 175px;
  object-fit: cover;
  display: block;
}

.pcard-video .video-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 194, 255, .08), rgba(124, 58, 237, .08));
  font-size: .75rem;
  color: var(--cyan);
  letter-spacing: .1em;
  text-transform: uppercase;
  height: 175px;
}

.pcard-body {
  padding: 1.8rem 1.6rem;
}

.pcard-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  color: rgba(255, 255, 255, .04);
  line-height: 1;
  margin-bottom: 1rem;
  letter-spacing: -.02em;
}

.pcard-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: .6rem;
  line-height: 1.3;
}

.pcard-desc {
  font-size: .875rem;
  color: var(--body);
  line-height: 1.75;
  font-weight: 300;
  margin-bottom: 1.4rem;
}

.pcard-techs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1.4rem;
}

.pt {
  padding: .22rem .6rem;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  font-size: .7rem;
  color: var(--muted);
  letter-spacing: .04em;
  border-radius: 2px;
}

.pcard-cta-row {
  display: flex;
  gap: .8rem;
  align-items: center;
}

.pcard-modal-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.1rem;
  background: linear-gradient(135deg, rgba(0, 194, 255, .1), rgba(124, 58, 237, .1));
  border: 1px solid rgba(0, 194, 255, .2);
  color: var(--cyan);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: none;
  transition: all .25s;
}

.pcard-modal-btn:hover {
  background: linear-gradient(135deg, rgba(0, 194, 255, .18), rgba(124, 58, 237, .18));
  border-color: rgba(124, 58, 237, .5);
  color: var(--bright);
  box-shadow: 0 0 18px var(--glow-v);
}

/* ════════════════════════════════════════════
   CASE STUDY MODAL
════════════════════════════════════════════ */
#modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(4, 6, 13, .8);
  backdrop-filter: blur(16px) saturate(1.2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
  padding: 2rem;
}

#modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: rgba(11, 16, 34, .92);
  border: 1px solid rgba(0, 194, 255, .15);
  border-radius: 10px;
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 3rem;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .8), 0 0 60px rgba(0, 194, 255, .06);
  transform: scale(.95) translateY(16px);
  transition: transform .35s cubic-bezier(.16, 1, .3, 1);
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 194, 255, .2) transparent;
}

#modal-overlay.open .modal-box {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1.1rem;
  transition: all .2s;
}

.modal-close:hover {
  background: rgba(255, 0, 0, .1);
  border-color: rgba(255, 80, 80, .3);
  color: #ff5f56;
}

.modal-label {
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1rem;
}

.modal-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.8rem;
  letter-spacing: .02em;
  color: var(--white);
  margin-bottom: 2.5rem;
  line-height: 1;
}

.modal-section {
  margin-bottom: 2rem;
}

.modal-section-title {
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .8rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.modal-section-title::before {
  content: '';
  display: block;
  width: 1.5rem;
  height: 1px;
  background: linear-gradient(to right, var(--cyan), var(--violet));
}

.modal-text {
  color: var(--body);
  line-height: 1.8;
  font-size: .95rem;
  font-weight: 300;
}

.modal-techs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .8rem;
}

.modal-tag {
  padding: .3rem .8rem;
  background: linear-gradient(135deg, rgba(0, 194, 255, .08), rgba(124, 58, 237, .08));
  border: 1px solid rgba(0, 194, 255, .18);
  color: var(--cyan);
  font-size: .75rem;
  letter-spacing: .04em;
  border-radius: 2px;
}

.modal-divider {
  height: 1px;
  background: var(--line);
  margin: 1.8rem 0;
}

.modal-github {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1.8rem;
  background: var(--cyan);
  color: var(--ink);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: opacity .2s, box-shadow .2s;
  cursor: none;
}

.modal-github:hover {
  opacity: .85;
  box-shadow: 0 0 24px var(--glow-c);
}

.modal-github svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ════════════════════════════════════════════
   BUILDING IN PUBLIC — "Şu Anda"
════════════════════════════════════════════ */
#now {
  background: var(--ink);
}

.now-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 4rem;
}

.now-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2.2rem 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color .3s, transform .35s;
}

.now-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--cyan), var(--violet));
  opacity: 0;
  transition: opacity .3s;
}

.now-card:hover {
  border-color: rgba(0, 194, 255, .2);
  transform: translateY(-6px);
}

.now-card:hover::before {
  opacity: 1;
}

.now-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgba(0, 194, 255, .12), rgba(124, 58, 237, .12));
  border: 1px solid rgba(0, 194, 255, .15);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.4rem;
}

.now-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--cyan);
  fill: none;
  stroke-width: 1.5;
}

.now-card-label {
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .6rem;
}

.now-card-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: .04em;
  color: var(--white);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.now-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.now-items li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .88rem;
  color: var(--body);
  font-weight: 300;
  line-height: 1.5;
}

.now-items li::before {
  content: '▸';
  color: var(--cyan);
  font-size: .7rem;
  margin-top: .2rem;
  flex-shrink: 0;
}

.now-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .25rem .7rem;
  background: rgba(0, 194, 255, .08);
  border: 1px solid rgba(0, 194, 255, .15);
  color: var(--cyan);
  font-size: .7rem;
  letter-spacing: .08em;
  border-radius: 100px;
  margin-top: .4rem;
}

.now-badge-dot {
  width: 5px;
  height: 5px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}

/* ════════════════════════════════════════════
   HARDWARE
════════════════════════════════════════════ */
#hardware {
  background: var(--deep);
}

.hw-intro {
  max-width: 500px;
  margin-bottom: 5rem;
}

.hw-intro p {
  color: var(--body);
  line-height: 1.8;
  font-size: 1rem;
  font-weight: 300;
}

.hw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.hwcard {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--card);
  transition: border-color .35s, transform .4s cubic-bezier(.16, 1, .3, 1), box-shadow .4s;
  cursor: none;
}

.hwcard:hover {
  border-color: rgba(0, 194, 255, .25);
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6), 0 0 30px rgba(0, 194, 255, .07);
}

.hw-canvas-wrap {
  width: 100%;
  height: 200px;
  position: relative;
  display: block;
  background: radial-gradient(ellipse at center, rgba(0, 194, 255, .08), transparent 70%);
  overflow: hidden;
}

.hw-canvas-wrap canvas {
  display: block;
  /* Three.js sets inline width/height — let it; CSS must not fight it */
}

.hw-info {
  padding: 1.8rem;
}

.hw-type-label {
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 500;
  margin-bottom: .6rem;
  display: block;
}

.hw-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: .4rem;
}

.hw-spec {
  font-size: .82rem;
  color: var(--muted);
  font-weight: 300;
}

.hw-bar {
  height: 2px;
  background: var(--line);
  margin-top: 1.5rem;
  border-radius: 2px;
  overflow: hidden;
}

.hw-bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--cyan2), var(--cyan), var(--violet));
  width: 0;
  transition: width 1.5s 0.5s cubic-bezier(.16, 1, .3, 1);
}

.hwcard.bar-animated .hw-bar-fill {
  width: var(--pct);
}

/* Terminal overlay on hover */
.hw-terminal {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(4, 6, 13, .92);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(0, 194, 255, .15);
  padding: .9rem 1rem;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.16, 1, .3, 1);
  z-index: 10;
  font-family: 'Courier New', monospace;
  font-size: .72rem;
}

.hwcard:hover .hw-terminal {
  transform: translateY(0);
}

.hw-term-line {
  display: flex;
  gap: .5rem;
  margin-bottom: .3rem;
  align-items: flex-start;
}

.hw-term-line:last-child {
  margin-bottom: 0;
}

.term-prompt {
  color: var(--cyan);
}

.term-cmd {
  color: var(--body);
}

.term-out {
  color: var(--violet);
  margin-left: 1.1rem;
}

/* breathing glow for cpu */
.cpu-glow-anim {
  animation: cpuBreathe 3s ease-in-out infinite;
}

@keyframes cpuBreathe {

  0%,
  100% {
    filter: drop-shadow(0 0 4px rgba(0, 194, 255, .3));
  }

  50% {
    filter: drop-shadow(0 0 16px rgba(0, 194, 255, .7));
  }
}

/* ════════════════════════════════════════════
   CONTACT
════════════════════════════════════════════ */
#contact {
  background: var(--ink);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8rem;
  align-items: start;
}

.contact-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 5.5vw, 6rem);
  line-height: .9;
  letter-spacing: -.01em;
  color: var(--white);
  margin-bottom: 2rem;
}

.contact-heading em {
  font-style: normal;
  color: var(--cyan);
}

.contact-text {
  color: var(--body);
  line-height: 1.8;
  font-size: 1rem;
  font-weight: 300;
  margin-bottom: 2.5rem;
}

.clink {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--body);
  font-size: .9rem;
  text-decoration: none;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  margin-bottom: .7rem;
  background: rgba(0, 0, 0, .2);
  transition: all .25s;
  font-weight: 400;
}

.clink:hover {
  border-color: rgba(0, 194, 255, .3);
  color: var(--bright);
  transform: translateX(6px);
  background: linear-gradient(to right, rgba(0, 194, 255, .04), transparent);
}

.clink-icon {
  width: 36px;
  height: 36px;
  background: rgba(0, 194, 255, .07);
  border: 1px solid rgba(0, 194, 255, .12);
  border-radius: 3px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.clink-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--cyan);
  fill: none;
  stroke-width: 2;
}

.cform {
  background: rgba(11, 16, 34, .7);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3rem;
  backdrop-filter: blur(10px);
}

.fg {
  position: relative;
  margin-bottom: 1.4rem;
}

.fi {
  width: 100%;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 3px;
  padding: 1.1rem 1.2rem .6rem;
  color: var(--white);
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: .95rem;
  font-weight: 300;
  outline: none;
  resize: none;
  transition: border-color .2s, background .2s;
}

.fi:focus {
  border-color: rgba(0, 194, 255, .35);
  background: rgba(0, 194, 255, .03);
  box-shadow: 0 0 0 3px rgba(0, 194, 255, .06);
}

.fl {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: .9rem;
  pointer-events: none;
  transition: all .2s;
  font-weight: 300;
}

textarea~.fl {
  top: 1.1rem;
  transform: none;
}

.fi:focus~.fl,
.fi:not(:placeholder-shown)~.fl {
  top: .35rem;
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--cyan);
  transform: none;
}

textarea:focus~.fl,
textarea:not(:placeholder-shown)~.fl {
  top: .35rem;
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--cyan);
}

.fi::placeholder {
  color: transparent;
}

textarea.fi {
  padding-top: 1.5rem;
  min-height: 140px;
}

.bsend {
  width: 100%;
  padding: 1.1rem;
  background: linear-gradient(135deg, var(--cyan2), var(--cyan));
  color: var(--ink);
  border: none;
  border-radius: 3px;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: none;
  transition: opacity .2s, transform .2s, box-shadow .2s;
  margin-top: .5rem;
}

.bsend:hover {
  opacity: .85;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--glow-c);
}

/* ════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--line);
  padding: 2rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
  background: var(--ink);
}

.f-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: .1em;
  color: var(--muted);
}

.f-copy {
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .04em;
}

.f-links {
  display: flex;
  gap: 1.5rem;
}

.f-links a {
  color: var(--muted);
  font-size: .78rem;
  text-decoration: none;
  transition: color .2s;
}

.f-links a:hover {
  color: var(--cyan);
}

/* ════════════════════════════════════════════
   REVEAL
════════════════════════════════════════════ */
.r {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1);
}

.r2 {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s .12s cubic-bezier(.16, 1, .3, 1), transform .7s .12s cubic-bezier(.16, 1, .3, 1);
}

.r3 {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s .24s cubic-bezier(.16, 1, .3, 1), transform .7s .24s cubic-bezier(.16, 1, .3, 1);
}

.r,
.r2,
.r3 {
  will-change: opacity, transform;
}

.r.on,
.r2.on,
.r3.on {
  opacity: 1;
  transform: none;
}

/* ── HERO ── */
@keyframes up {
  from {
    opacity: 0;
    transform: translateY(24px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

/* ── pulse ── */
@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1)
  }

  50% {
    opacity: .5;
    transform: scale(1.5)
  }
}

/* ════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════ */
@media(max-width:980px) {
  nav {
    padding: 1.2rem 1.5rem;
  }

  .nav-menu,
  .nav-cta {
    display: none;
  }

  .wrap {
    padding: 0 1.5rem;
  }

  .about-grid,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .proj-grid,
  .hw-grid,
  .now-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-wrap {
    padding: 0 1.5rem;
  }

  .hero-role {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }

  footer {
    padding: 1.5rem;
    flex-direction: column;
    gap: .5rem;
    text-align: center;
  }

  .sec {
    padding: 6rem 0;
  }

  .exp-head {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media(max-width:580px) {

  .proj-grid,
  .hw-grid,
  .now-grid {
    grid-template-columns: 1fr;
  }
}



/* ══ NAV ACTIVE ══ */
.nav-menu a.active {
  color: var(--accent);
}

.nav-menu a.active::after {
  width: 100%;
}

/* ══ EMAIL COPY TOOLTIP ══ */
.clink-copy {
  position: relative;
}

.clink-copy .copy-tip {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  white-space: nowrap;
}

.clink-copy:hover .copy-tip {
  opacity: 1;
}

.clink-copy.copied .copy-tip {
  color: #4ade80;
  opacity: 1;
}

