/* TOKENS */
:root {
  --bg: #0c0e14;
  --bg2: #11141d;
  --card: #171b26;
  --brd: #252a38;
  --tx: #dde1ec;
  --tx2: #7a849a;
  --tx3: #454e62;
  --acc: #5b8df5;
  --acc2: rgba(91, 141, 245, .12);
  --ok: #3dd68c;
  --err: #f87171;
  --r: 10px;
}

[data-theme="light"] {
  --bg: #f4f6fb;
  --bg2: #ffffff;
  --card: #ffffff;
  --brd: #dde3f0;
  --tx: #181c29;
  --tx2: #4a5470;
  --tx3: #9ba3b8;
  --acc: #4070e8;
  --acc2: rgba(64, 112, 232, .1);
  --ok: #16a34a;
  --err: #dc2626;
}

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

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--tx);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background .3s, color .3s
}

img {
  max-width: 100%;
  display: block
}

a {
  color: var(--acc);
  text-decoration: none;
  transition: color .2s
}

ul {
  list-style: none
}

button {
  font-family: inherit;
  cursor: pointer
}

/* ── 3. UTILITIES ── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.75rem
}

.section {
  padding: 90px 0
}

.alt {
  background: var(--bg2)
}

h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: .4rem;
  letter-spacing: -.02em
}

h2 span {
  color: var(--acc)
}

.s-tag {
  font-family: 'Space Mono', monospace;
  font-size: .78rem;
  color: var(--acc);
  letter-spacing: .1em;
  text-align: center;
  margin-bottom: .5rem;
  opacity: .75
}

.sub {
  text-align: center;
  color: var(--tx2);
  font-size: 1rem;
  margin-bottom: 3rem
}

.mono {
  font-family: 'Space Mono', monospace
}

.accent {
  color: var(--acc)
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.5rem;
  background: var(--acc);
  color: #fff;
  border-radius: var(--r);
  font-weight: 600;
  font-size: .9rem;
  border: none;
  transition: all .22s
}

.btn-primary:hover {
  background: #4070e8;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--acc2);
  color: #fff
}

.btn-primary.sm {
  padding: .45rem 1rem;
  font-size: .82rem
}

.btn-primary.full {
  width: 100%;
  justify-content: center
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.5rem;
  background: transparent;
  color: var(--acc);
  border: 1.5px solid var(--acc);
  border-radius: var(--r);
  font-weight: 600;
  font-size: .9rem;
  transition: all .22s
}

.btn-ghost:hover {
  background: var(--acc2);
  transform: translateY(-2px)
}

.pill {
  display: inline-block;
  padding: .15rem .6rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  background: var(--acc2);
  color: var(--acc);
  border: 1px solid rgba(91, 141, 245, .2)
}

.socials {
  display: flex;
  gap: .6rem
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--brd);
  border-radius: 8px;
  color: var(--tx2);
  transition: all .2s
}

.socials a:hover {
  color: var(--acc);
  border-color: var(--acc);
  background: var(--acc2);
  transform: translateY(-2px)
}

/* ── 4. HEADER ── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background .35s, border-color .35s
}

header.scrolled {
  background: rgba(12, 14, 20, .82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--brd)
}

[data-theme="light"] header.scrolled {
  background: rgba(244, 246, 251, .85)
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.75rem
}

.logo {
  font-family: 'Space Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tx);
  letter-spacing: -.02em
}

.logo span {
  color: var(--acc)
}

.logo:hover {
  color: var(--acc)
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none
}

nav ul a {
  font-size: .88rem;
  font-weight: 500;
  color: var(--tx2);
  transition: color .2s;
  position: relative;
  padding-bottom: 2px
}

nav ul a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--acc);
  border-radius: 2px;
  transition: width .25s
}

nav ul a:hover,
nav ul a.active {
  color: var(--tx)
}

nav ul a:hover::after,
nav ul a.active::after {
  width: 100%
}

.nav-right {
  display: flex;
  align-items: center;
  gap: .75rem
}

#theme-btn {
  background: var(--card);
  border: 1px solid var(--brd);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  color: var(--tx2);
  transition: all .2s
}

#theme-btn:hover {
  border-color: var(--acc);
  color: var(--acc)
}

#hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: var(--card);
  border: 1px solid var(--brd);
  border-radius: 8px;
  padding: 8px;
  width: 36px;
  height: 36px
}

#hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--tx);
  border-radius: 2px;
  transition: all .3s
}

#hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg)
}

#hamburger.open span:nth-child(2) {
  opacity: 0
}

#hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg)
}

/* Mobile drawer */
nav ul.open {
  display: flex
}

/* HERO */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 66px
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--brd) 1px, transparent 1px), linear-gradient(90deg, var(--brd) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: .25;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000, transparent)
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3.5rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.75rem;
  width: 100%
}

/* Left */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--ok);
  background: rgba(61, 214, 140, .08);
  border: 1px solid rgba(61, 214, 140, .2);
  border-radius: 20px;
  padding: .28rem .85rem;
  margin-bottom: 1.4rem
}

.status-pill i {
  width: 7px;
  height: 7px;
  background: var(--ok);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
  font-style: normal
}

h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.03em;
  margin-bottom: .6rem
}

h1 span {
  color: var(--acc)
}

.hero-text .mono {
  font-size: clamp(.95rem, 2vw, 1.2rem);
  color: var(--tx2);
  margin-bottom: 1.4rem
}

.tagline {
  font-size: 1rem;
  color: var(--tx2);
  line-height: 1.75;
  margin-bottom: 2.2rem
}

.tagline b {
  color: var(--tx);
  font-weight: 600
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem
}

/* Avatar */
.avatar-wrap {
  position: relative;
  width: 300px;
  height: 300px;
  flex-shrink: 0
}

.avatar-ring {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1.5px dashed rgba(91, 141, 245, .3);
  animation: spin 18s linear infinite
}

.avatar-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid var(--brd);
  background: var(--card);
  box-shadow: 0 0 0 6px var(--bg2), 0 0 0 7.5px var(--brd), 0 20px 50px rgba(91, 141, 245, .18);
  transition: box-shadow .3s
}

.avatar-frame:hover {
  box-shadow: 0 0 0 6px var(--bg2), 0 0 0 7.5px var(--acc), 0 20px 50px rgba(91, 141, 245, .3)
}

.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.avatar-init {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', monospace;
  font-size: 4rem;
  font-weight: 700;
  color: var(--acc);
  background: linear-gradient(135deg, var(--card), var(--bg2));
  opacity: 0
}

.avatar-frame.no-img .avatar-init {
  opacity: 1
}

.float-tag {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--brd);
  border-radius: 8px;
  padding: .35rem .7rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--tx2);
  white-space: nowrap;
  animation: float 4s ease-in-out infinite
}

.float-tag:nth-child(3) {
  animation-delay: .5s
}

.float-tag:nth-child(4) {
  animation-delay: 1s
}

.float-tag:nth-child(5) {
  animation-delay: 1.5s
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--tx3);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase
}

.scroll-hint div {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--acc), transparent);
  animation: scrollpulse 2s ease infinite
}

/* ── 6. ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: start;
  margin-top: 3rem
}

.stats-row {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--brd);
  border-radius: var(--r);
  padding: 1.4rem 1.75rem;
  margin-bottom: 1.75rem
}

.stat {
  flex: 1;
  text-align: center
}

.stat b {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  margin-bottom: .25rem
}

.stat b span {
  color: var(--acc)
}

.stat small {
  font-size: .72rem;
  color: var(--tx3);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em
}

.stat-div {
  width: 1px;
  height: 36px;
  background: var(--brd);
  margin: 0 .5rem
}

.about-left p {
  color: var(--tx2);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1rem
}

.about-left strong,
.about-left b {
  color: var(--tx);
  font-weight: 600
}

.loc {
  color: var(--acc)
}

.traits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
  margin-top: 1.5rem
}

.trait {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  background: var(--card);
  border: 1px solid var(--brd);
  border-radius: 8px;
  padding: .85rem 1rem;
  transition: border-color .2s, transform .2s
}

.trait:hover {
  border-color: var(--acc);
  transform: translateY(-2px)
}

.trait>span {
  font-size: 1.3rem;
  flex-shrink: 0
}

.trait b {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: .1rem
}

.trait small {
  font-size: .75rem;
  color: var(--tx3)
}

/* Right cards */
.about-right {
  display: flex;
  flex-direction: column;
  gap: .85rem
}

.card {
  background: var(--card);
  border: 1px solid var(--brd);
  border-radius: var(--r);
  padding: 1.25rem;
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  transition: border-color .25s, transform .25s
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--acc), transparent);
  opacity: 0;
  transition: opacity .3s
}

.card:hover {
  border-color: rgba(91, 141, 245, .4);
  transform: translateY(-2px)
}

.card:hover::after {
  opacity: 1
}

.card-icon {
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  background: var(--acc2);
  border: 1px solid rgba(91, 141, 245, .2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0
}

.card small {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--tx3);
  margin-bottom: .5rem
}

.card b {
  display: block;
  font-size: .93rem;
  font-weight: 700;
  margin-bottom: .25rem
}

.card p {
  font-size: .83rem;
  color: var(--tx2)
}

/* Language bars */
.langs {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-top: .25rem
}

.langs li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: .5rem;
  align-items: center
}

.langs li>span {
  font-size: .84rem;
  font-weight: 600
}

.lv {
  font-size: .68rem;
  font-weight: 700;
  padding: .1rem .45rem;
  border-radius: 20px
}

.lv.native {
  background: rgba(61, 214, 140, .1);
  color: var(--ok)
}

.lv.b2 {
  background: var(--acc2);
  color: var(--acc)
}

.lv.n5 {
  background: rgba(245, 158, 11, .1);
  color: #f59e0b
}

.bar {
  grid-column: 1/-1;
  height: 3px;
  background: var(--brd);
  border-radius: 4px;
  overflow: hidden;
  margin-top: .2rem
}

.bar div,
.bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--acc), rgba(91, 141, 245, .4));
  width: 0;
  transition: width 1.2s cubic-bezier(.4, 0, .2, 1)
}

/* Status card */
.status-card {
  align-items: center
}

.pulse {
  width: 10px;
  height: 10px;
  background: var(--ok);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2s ease infinite
}

/* -0o-0 SKILLS */
.tab-row {
  display: flex;
  justify-content: center;
  gap: .45rem;
  margin-bottom: 2.25rem;
  flex-wrap: wrap
}

.tab {
  padding: .55rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--brd);
  background: transparent;
  color: var(--tx2);
  font-size: .87rem;
  font-weight: 600;
  transition: all .2s
}

.tab:hover {
  border-color: var(--acc);
  color: var(--acc);
  background: var(--acc2)
}

.tab.active {
  background: var(--acc);
  border-color: var(--acc);
  color: #fff;
  box-shadow: 0 4px 14px rgba(91, 141, 245, .3)
}

.panel {
  display: none
}

.panel.active {
  display: block;
  animation: fadeUp .3s ease both
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: .85rem
}

.sk {
  background: var(--card);
  border: 1px solid var(--brd);
  border-radius: var(--r);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: border-color .2s, transform .2s;
  position: relative;
  overflow: hidden
}

.sk:hover {
  border-color: rgba(91, 141, 245, .4);
  transform: translateY(-3px)
}

.sk.featured {
  border-left: 3px solid var(--acc)
}

.sk-head {
  display: flex;
  align-items: center;
  gap: .5rem
}

.sk-icon {
  font-size: 1.4rem
}

.sk-head b {
  font-size: .97rem;
  font-weight: 700;
  flex: 1
}

.core {
  font-size: .63rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--acc2);
  color: var(--acc);
  border: 1px solid rgba(91, 141, 245, .2);
  border-radius: 20px;
  padding: .1rem .45rem
}

.sk small {
  font-size: .77rem;
  color: var(--tx3);
  line-height: 1.45
}

.sk-bar {
  height: 3px;
  background: var(--brd);
  border-radius: 4px;
  overflow: hidden;
  margin-top: .2rem
}

.sk-bar div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--acc), rgba(168, 108, 247, .7));
  border-radius: 4px;
  transition: width 1s cubic-bezier(.4, 0, .2, 1)
}

.lbl {
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--acc);
  letter-spacing: .05em
}

/* ── 8. PROJECTS ── */
.filter-row {
  display: flex;
  justify-content: center;
  gap: .45rem;
  margin-bottom: 2.25rem;
  flex-wrap: wrap
}

.flt {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem 1.15rem;
  border-radius: 8px;
  border: 1px solid var(--brd);
  background: transparent;
  color: var(--tx2);
  font-size: .85rem;
  font-weight: 600;
  transition: all .2s
}

.flt:hover {
  border-color: var(--acc);
  color: var(--acc);
  background: var(--acc2)
}

.flt.active {
  background: var(--acc);
  border-color: var(--acc);
  color: #fff;
  box-shadow: 0 4px 14px rgba(91, 141, 245, .3)
}

.flt span {
  background: rgba(255, 255, 255, .2);
  border-radius: 20px;
  padding: .05rem .4rem;
  font-size: .72rem;
  font-weight: 700
}

.proj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-bottom: 2rem
}

.proj {
  background: var(--card);
  border: 1px solid var(--brd);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s, box-shadow .3s, border-color .3s
}

.proj:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .2)
}

.proj.hidden {
  display: none
}

.proj-bar {
  height: 3px;
  flex-shrink: 0
}

.proj-bar.backend {
  background: linear-gradient(90deg, #5b8df5, #4070e8)
}

.proj-bar.ai {
  background: linear-gradient(90deg, #a86cf7, #7c3aed)
}

.proj-bar.fullstack {
  background: linear-gradient(90deg, #3dd68c, #16a34a)
}

.proj-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  flex: 1
}

.proj-head {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.proj-emoji {
  width: 44px;
  height: 44px;
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  transition: transform .3s
}

.proj:hover .proj-emoji {
  transform: rotate(-5deg) scale(1.1)
}

.proj-head>div {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .3rem
}

.cat-badge {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: .12rem .55rem;
  border-radius: 20px
}

.cat-badge.backend {
  background: rgba(91, 141, 245, .12);
  color: #5b8df5;
  border: 1px solid rgba(91, 141, 245, .2)
}

.cat-badge.ai {
  background: rgba(168, 108, 247, .12);
  color: #a86cf7;
  border: 1px solid rgba(168, 108, 247, .2)
}

.cat-badge.fullstack {
  background: rgba(61, 214, 140, .12);
  color: #3dd68c;
  border: 1px solid rgba(61, 214, 140, .2)
}

.live {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .68rem;
  color: var(--tx3)
}

.live i {
  width: 6px;
  height: 6px;
  background: var(--ok);
  border-radius: 50%;
  animation: pulse 2.5s ease infinite;
  font-style: normal
}

.proj h3 {
  font-size: 1.1rem;
  font-weight: 700
}

.proj>div p,
.proj-body p {
  font-size: .83rem;
  color: var(--tx2);
  line-height: 1.6
}

.feats {
  display: flex;
  flex-direction: column;
  gap: .3rem
}

.feats li {
  font-size: .78rem;
  color: var(--tx2);
  font-weight: 500
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding-top: .5rem;
  border-top: 1px solid var(--brd)
}

.tags span {
  font-size: .72rem;
  font-family: 'Space Mono', monospace;
  font-weight: 600;
  color: var(--tx2);
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: 4px;
  padding: .2rem .55rem
}

.proj-links {
  display: flex;
  gap: .6rem
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--tx2);
  padding: .35rem .8rem;
  border: 1px solid var(--brd);
  border-radius: 6px;
  transition: all .2s
}

.link-btn:hover {
  color: var(--acc);
  border-color: var(--acc);
  background: var(--acc2)
}

.link-btn.accent {
  color: var(--acc);
  border-color: rgba(91, 141, 245, .3);
  background: var(--acc2)
}

.link-btn.accent:hover {
  background: var(--acc);
  color: #fff;
  border-color: var(--acc)
}

.proj-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 1.75rem;
  background: var(--card);
  border: 1px solid var(--brd);
  border-radius: var(--r)
}

.proj-cta p {
  color: var(--tx2);
  font-size: .92rem;
  font-weight: 500
}

/*CONTACT */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3.5rem;
  align-items: start;
  margin-top: 3rem
}

.contact-info h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: .85rem;
  line-height: 1.3
}

.contact-info>p {
  color: var(--tx2);
  font-size: .95rem;
  line-height: 1.7;
  margin-bottom: 1.75rem
}

.c-list {
  display: flex;
  flex-direction: column;
  gap: .85rem
}

.c-list li {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--tx2);
  font-size: .9rem
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem
}

.fg {
  display: flex;
  flex-direction: column;
  gap: .35rem
}

label {
  font-size: .84rem;
  font-weight: 600;
  color: var(--tx2)
}

input,
textarea {
  width: 100%;
  padding: .7rem 1rem;
  background: var(--card);
  border: 1px solid var(--brd);
  border-radius: 8px;
  color: var(--tx);
  font-size: .93rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  resize: vertical;
  transition: border-color .2s, box-shadow .2s
}

input::placeholder,
textarea::placeholder {
  color: var(--tx3)
}

input:focus,
textarea:focus {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--acc2)
}

input.bad,
textarea.bad {
  border-color: var(--err);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, .1)
}

input.ok,
textarea.ok {
  border-color: var(--ok);
  box-shadow: 0 0 0 3px rgba(61, 214, 140, .08)
}

.err {
  font-size: .78rem;
  color: var(--err);
  font-weight: 500;
  min-height: 1rem
}

.form-ok {
  background: rgba(61, 214, 140, .08);
  border: 1px solid rgba(61, 214, 140, .25);
  color: var(--ok);
  padding: .8rem 1rem;
  border-radius: 8px;
  font-size: .87rem;
  text-align: center
}

/* FOOTER*/
footer {
  background: var(--bg2);
  border-top: 1px solid var(--brd);
  padding: 1.75rem 0
}

.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.foot-inner p {
  color: var(--tx3);
  font-size: .85rem
}

/*BACK TO TOP*/
#top-btn {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: var(--acc);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .3s;
  z-index: 99;
  box-shadow: 0 4px 14px rgba(91, 141, 245, .3)
}

#top-btn:hover {
  background: #4070e8;
  transform: translateY(-2px)
}

#top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0)
}

/* ANIMATIONS */
@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(61, 214, 140, .45)
  }

  50% {
    box-shadow: 0 0 0 5px rgba(61, 214, 140, 0)
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

@keyframes float {

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

  50% {
    transform: translateY(-7px)
  }
}

@keyframes scrollpulse {

  0%,
  100% {
    opacity: .3;
    transform: scaleY(.8)
  }

  50% {
    opacity: 1;
    transform: scaleY(1)
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s ease, transform .55s ease
}

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

/* ── 13. RESPONSIVE ── */
@media(max-width:1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem
  }

  .proj-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .hero-inner {
    gap: 2rem
  }

  .avatar-wrap {
    width: 260px;
    height: 260px
  }

  .float-tag {
    display: none
  }
}

@media(max-width:768px) {
  .section {
    padding: 70px 0
  }

  nav ul {
    display: none;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--brd);
    padding: 1rem 1.75rem;
    z-index: 99;
  }

  nav ul li {
    border-bottom: 1px solid var(--brd)
  }

  nav ul li:last-child {
    border: none
  }

  nav ul a {
    display: block;
    padding: .85rem 0;
    font-size: 1rem
  }

  #hamburger {
    display: flex
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center
  }

  .hero-text {
    order: 2
  }

  .avatar-wrap {
    order: 1;
    width: 200px;
    height: 200px
  }

  .hero-cta,
  .socials {
    justify-content: center
  }

  .proj-grid {
    grid-template-columns: 1fr
  }

  .foot-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center
  }

  .traits {
    grid-template-columns: 1fr
  }

  .skill-grid {
    grid-template-columns: 1fr 1fr
  }
}

@media(max-width:480px) {
  .skill-grid {
    grid-template-columns: 1fr
  }

  .proj-grid {
    grid-template-columns: 1fr
  }
}