:root {
  --bg:          #07070e;
  --bg2:         #0d0d1a;
  --bg3:         #12121f;
  --bg4:         #1a1a2e;
  --gold:        #c9a84c;
  --gold-lt:     #f0c060;
  --gold-dk:     #8b6a1a;
  --blue:        #4a7cf7;
  --blue-lt:     #7aa3ff;
  --txt:         #f0ede8;
  --txt2:        #b8b5cc;
  --txt3:        #7a7a9a;
  --border:      rgba(201,168,76,0.18);
  --border-gold: rgba(201,168,76,0.45);
  --glass:       rgba(18,18,31,0.75);
  --shadow-g:    0 0 40px rgba(201,168,76,0.12);
  --shadow-b:    0 0 40px rgba(74,124,247,0.12);
  --r:           14px;
  --ease:        cubic-bezier(0.4,0,0.2,1);
  --font-en:     'Space Grotesk', 'Inter', sans-serif;
  --font-fa:     'Vazirmatn', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-en);
  background: var(--bg);
  color: var(--txt);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--gold-dk); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

::selection { background: rgba(201,168,76,0.3); color: var(--txt); }

.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; border-radius: 50%;
  pointer-events: none; z-index: 99999; transform: translate(-50%,-50%);
  transition: opacity 0.3s var(--ease);
}
.cursor-dot {
  width: 8px; height: 8px;
  background: var(--gold); box-shadow: 0 0 10px var(--gold);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1.5px solid rgba(201,168,76,0.6);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), border-color 0.3s;
}
body.cursor-hover .cursor-ring { width: 52px; height: 52px; border-color: var(--gold); }
@media (hover: none) { .cursor-dot, .cursor-ring { display: none; } }

#preloader {
  position: fixed; inset: 0; z-index: 99998;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
#preloader.hide { opacity: 0; visibility: hidden; }
.preloader-inner { text-align: center; }
.preloader-logo {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 700; letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--gold-dk), var(--gold-lt), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulse-gold 1.4s ease-in-out infinite;
  margin-bottom: 1.5rem;
}
.preloader-track {
  width: 180px; height: 2px; background: var(--bg4); border-radius: 2px;
  margin: 0 auto 1rem; overflow: hidden;
}
.preloader-fill {
  height: 100%; background: linear-gradient(90deg, var(--gold-dk), var(--gold-lt));
  border-radius: 2px; animation: load-bar 1.4s var(--ease) forwards;
}
.preloader-text { font-size: 0.75rem; letter-spacing: 0.2em; color: var(--txt3); text-transform: uppercase; }
@keyframes pulse-gold { 0%,100%{opacity:1} 50%{opacity:0.6} }
@keyframes load-bar { from{width:0} to{width:100%} }

#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  padding: 1rem 0;
  transition: background 0.4s var(--ease), box-shadow 0.4s, padding 0.3s;
}
#navbar.scrolled {
  background: rgba(7,7,14,0.9);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
  padding: 0.7rem 0;
}
.nav-container {
  max-width: 1280px; margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; gap: 2rem;
}
.nav-logo {
  font-size: 1.6rem; font-weight: 700; letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--gold-dk), var(--gold-lt));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; flex-shrink: 0;
  transition: opacity 0.3s;
}
.nav-logo:hover { opacity: 0.8; }
.nav-links {
  display: flex; align-items: center; gap: 0.25rem; margin-left: auto;
}
.nav-links a {
  font-size: 0.875rem; font-weight: 500; color: var(--txt2);
  padding: 0.4rem 0.75rem; border-radius: 8px;
  transition: color 0.3s, background 0.3s;
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 50%; right: 50%;
  height: 2px; background: var(--gold); border-radius: 2px;
  transition: left 0.3s var(--ease), right 0.3s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a:hover::after, .nav-links a.active::after { left: 0.75rem; right: 0.75rem; }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.lang-toggle {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em;
  color: var(--txt3); padding: 0.35rem 0.75rem;
  border: 1px solid var(--border); border-radius: 20px;
  transition: border-color 0.3s, color 0.3s;
}
.lang-toggle:hover { border-color: var(--border-gold); color: var(--gold); }
.lang-opt { transition: color 0.3s; }
.lang-opt.active { color: var(--gold); }
.lang-sep { color: var(--txt3); }
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  width: 28px; padding: 4px 0;
}
.hamburger span {
  display: block; height: 2px; border-radius: 2px;
  background: var(--txt2); transition: all 0.3s var(--ease);
}
.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-menu {
  position: fixed; top: 0; right: -100%; width: min(320px,85vw); height: 100%;
  background: var(--bg3); z-index: 950;
  padding: 5rem 2rem 2rem;
  border-left: 1px solid var(--border);
  transition: right 0.4s var(--ease);
}
.mobile-menu.open { right: 0; }
.mobile-close {
  position: absolute; top: 1.25rem; right: 1.25rem;
  font-size: 1.2rem; color: var(--txt3); padding: 0.5rem;
  transition: color 0.3s;
}
.mobile-close:hover { color: var(--gold); }
.mobile-menu ul { display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-menu a {
  display: block; font-size: 1.1rem; font-weight: 500; color: var(--txt2);
  padding: 0.75rem 1rem; border-radius: 10px;
  transition: color 0.3s, background 0.3s;
}
.mobile-menu a:hover { color: var(--gold); background: rgba(201,168,76,0.06); }
.mobile-overlay {
  position: fixed; inset: 0; z-index: 940;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: all 0.4s;
}
.mobile-overlay.show { opacity: 1; visibility: visible; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
section { padding: 6rem 0; }
.section-alt { background: var(--bg2); }
.section-head { text-align: center; margin-bottom: 4rem; }
.section-tag {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.75rem;
  padding: 0.3rem 1rem; border: 1px solid var(--border-gold);
  border-radius: 20px; background: rgba(201,168,76,0.06);
}
.section-title {
  font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 700;
  color: var(--txt); line-height: 1.2;
  background: linear-gradient(135deg, var(--txt) 60%, var(--gold-lt));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.925rem; font-weight: 600; padding: 0.75rem 1.75rem;
  border-radius: 10px; transition: all 0.3s var(--ease); white-space: nowrap;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-dk), var(--gold-lt));
  color: #06060b; box-shadow: 0 4px 20px rgba(201,168,76,0.3);
}
.btn-gold:hover {
  transform: translateY(-2px); box-shadow: 0 8px 30px rgba(201,168,76,0.45);
}
.btn-outline {
  border: 1.5px solid var(--border-gold); color: var(--gold);
  background: rgba(201,168,76,0.05);
}
.btn-outline:hover {
  background: rgba(201,168,76,0.12); transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(201,168,76,0.15);
}
.btn-sm { font-size: 0.85rem; padding: 0.6rem 1.25rem; }

#hero {
  min-height: 100vh; position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  overflow: hidden; padding: 0;
}
#particlesCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1200px; width: 100%; margin: 0 auto; padding: 8rem 2rem 2rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}

.hero-greeting {
  font-size: 1rem; font-weight: 400; color: var(--txt3);
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.5rem;
}
.hero-brand {
  font-size: clamp(4rem, 12vw, 8rem); font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, var(--gold-dk) 0%, var(--gold-lt) 50%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; letter-spacing: -0.02em;
  filter: drop-shadow(0 0 40px rgba(201,168,76,0.25));
  margin-bottom: 0.25rem;
}
.hero-name {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 400;
  color: var(--txt2); margin-bottom: 1.25rem; letter-spacing: 0.02em;
}
.hero-typewriter {
  font-size: clamp(1rem, 2.2vw, 1.25rem); color: var(--txt2);
  margin-bottom: 1rem; min-height: 2em;
}
.tw-text { color: var(--gold-lt); font-weight: 600; }
.tw-cursor {
  color: var(--gold); animation: blink 1s step-end infinite;
  font-weight: 300; margin-left: 1px;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.hero-location {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; color: var(--txt3); margin-bottom: 2rem;
}
.hero-location i { color: var(--gold); }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-photo { display: flex; justify-content: center; align-items: center; }
.photo-frame {
  position: relative; width: min(380px, 90%); aspect-ratio: 3/4;
}
.photo-ring {
  position: absolute; border-radius: 50%; border: 1px solid var(--border-gold);
  animation: ring-spin 12s linear infinite;
}
.ring-1 { inset: -18px; animation-duration: 20s; opacity: 0.5; }
.ring-2 { inset: -36px; animation-duration: 30s; animation-direction: reverse; opacity: 0.3; }
.ring-3 { inset: -54px; animation-duration: 40s; opacity: 0.15; }
@keyframes ring-spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
.hero-img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--border-gold);
  box-shadow: 0 0 60px rgba(201,168,76,0.15), 0 20px 60px rgba(0,0,0,0.5);
}
.photo-badge {
  position: absolute; bottom: -1rem; right: -1rem;
  background: linear-gradient(135deg, var(--gold-dk), var(--gold-lt));
  color: #06060b; border-radius: 12px; padding: 0.75rem 1rem;
  display: flex; flex-direction: column; align-items: center;
  box-shadow: 0 8px 24px rgba(201,168,76,0.35); min-width: 70px;
}
.badge-num { font-size: 1.4rem; font-weight: 700; line-height: 1; }
.badge-label { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.05em; }

.hero-stats {
  position: relative; z-index: 1; width: 100%;
  display: flex; justify-content: center; align-items: center;
  gap: 0; padding: 1.5rem 2rem;
  background: rgba(18,18,31,0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border); margin-top: auto;
}
.stat-item { text-align: center; padding: 0 2.5rem; }
.stat-num {
  display: block; font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700; color: var(--gold-lt); line-height: 1;
}
.stat-label { font-size: 0.75rem; color: var(--txt3); letter-spacing: 0.05em; margin-top: 0.2rem; display: block; }
.stat-sep { width: 1px; height: 40px; background: var(--border); flex-shrink: 0; }

.scroll-mouse {
  position: absolute; bottom: 5.5rem; left: 50%;
  transform: translateX(-50%); z-index: 1;
  width: 24px; height: 38px; border: 1.5px solid var(--border-gold);
  border-radius: 12px; display: flex; justify-content: center; padding-top: 6px;
}
.scroll-wheel {
  width: 4px; height: 8px; border-radius: 2px; background: var(--gold);
  animation: scroll-anim 2s ease-in-out infinite;
}
@keyframes scroll-anim { 0%{opacity:1;transform:translateY(0)} 80%{opacity:0;transform:translateY(14px)} 100%{opacity:0} }

.about-grid {
  display: grid; grid-template-columns: 1fr 420px; gap: 5rem; align-items: center;
}
#about p {
  color: var(--txt2); margin-bottom: 1.25rem; font-size: 1.025rem; line-height: 1.8;
}
.about-details { margin: 2rem 0; display: flex; flex-direction: column; gap: 1rem; }
.detail-row {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 0.875rem 1rem; border-radius: var(--r);
  border: 1px solid var(--border); background: rgba(201,168,76,0.02);
  transition: border-color 0.3s, background 0.3s;
}
.detail-row:hover { border-color: var(--border-gold); background: rgba(201,168,76,0.05); }
.detail-row > i { color: var(--gold); margin-top: 0.15rem; flex-shrink: 0; font-size: 1rem; }
.detail-row > div { display: flex; flex-direction: column; gap: 0.1rem; }
.detail-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--txt3); }
.detail-val { font-size: 0.95rem; color: var(--txt2); }
.about-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.about-photo { display: flex; justify-content: center; }
.about-photo-wrap {
  position: relative; width: 100%;
  border-radius: 20px; overflow: visible;
}
.about-photo-wrap img {
  width: 100%; border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  position: relative; z-index: 1;
}
.deco-sq {
  position: absolute; border: 1.5px solid var(--border-gold);
  border-radius: 10px; z-index: 0;
}
.deco-sq-1 { width: 80px; height: 80px; top: -16px; left: -16px; opacity: 0.4; }
.deco-sq-2 { width: 50px; height: 50px; bottom: -12px; right: -12px; opacity: 0.3; }
.deco-line {
  position: absolute; bottom: -24px; left: 20%; right: 20%;
  height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent);
  z-index: 0;
}

.skills-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.skill-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.75rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s;
}
.skill-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow-g);
}
.skill-card-header { display: flex; align-items: center; gap: 0.875rem; margin-bottom: 1.25rem; }
.skill-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: rgba(201,168,76,0.1); border: 1px solid var(--border-gold);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 1rem; flex-shrink: 0;
}
.skill-card-header h3 { font-size: 0.975rem; font-weight: 600; color: var(--txt); }
.skill-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-pills span {
  font-size: 0.78rem; font-weight: 500;
  background: var(--bg4); color: var(--txt2);
  padding: 0.3rem 0.75rem; border-radius: 20px;
  border: 1px solid var(--border);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.skill-card:hover .skill-pills span { border-color: rgba(201,168,76,0.25); }

.timeline {
  position: relative; max-width: 860px; margin: 0 auto;
}
.timeline::before {
  content: ''; position: absolute;
  left: 50%; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, transparent 0%, var(--gold-dk) 8%, var(--border-gold) 50%, var(--gold-dk) 92%, transparent 100%);
  transform: translateX(-50%);
}
.tl-item {
  position: relative; width: 50%; padding-right: 3rem;
  padding-bottom: 2.5rem;
}
.tl-item.tl-right {
  margin-left: 50%; padding-right: 0; padding-left: 3rem;
}
.tl-dot {
  position: absolute; top: 1.5rem; right: -7px; z-index: 2;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--bg);
  box-shadow: 0 0 14px rgba(201,168,76,0.6);
}
.tl-item.tl-right .tl-dot { right: auto; left: -7px; }
.tl-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.5rem;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.tl-card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-g);
  transform: translateY(-2px);
}
.tl-top {
  display: flex; align-items: center; gap: 0.5rem;
  flex-wrap: wrap; margin-bottom: 0.75rem;
}
.tl-period {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em;
  color: var(--gold); text-transform: uppercase;
}
.tl-badge {
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.08em;
  padding: 0.15rem 0.6rem; border-radius: 20px; text-transform: uppercase;
}
.tl-badge.remote {
  background: rgba(74,124,247,0.15); color: var(--blue-lt);
  border: 1px solid rgba(74,124,247,0.3);
}
.tl-role { font-size: 1.05rem; font-weight: 700; color: var(--txt); margin-bottom: 0.4rem; }
.tl-company { font-size: 0.825rem; color: var(--txt3); margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.4rem; }
.tl-company i { color: var(--gold-dk); font-size: 0.75rem; }
.tl-desc { font-size: 0.875rem; color: var(--txt2); line-height: 1.65; margin-bottom: 1rem; }
.tl-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tl-tags span {
  font-size: 0.72rem; font-weight: 500;
  background: rgba(201,168,76,0.07); color: var(--gold);
  border: 1px solid var(--border); padding: 0.2rem 0.6rem; border-radius: 20px;
}

.projects-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem;
}
.projects-grid .project-card:last-child:nth-child(odd) {
  grid-column: 1 / -1; max-width: 600px; margin: 0 auto; width: 100%;
}
.project-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.project-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-5px);
  box-shadow: var(--shadow-g);
}
.project-img { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.project-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.project-card:hover .project-img img { transform: scale(1.04); }
.project-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7,7,14,0.9) 0%, transparent 60%);
  display: flex; align-items: flex-end; padding: 1rem;
}
.project-img-overlay span { font-size: 0.72rem; color: var(--gold); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.project-img-placeholder {
  display: flex; align-items: center; justify-content: center;
}
.project-placeholder-icon { font-size: 3rem; color: rgba(255,255,255,0.15); }
.project-body { padding: 1.5rem; }
.project-meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.proj-cat {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 0.2rem 0.6rem; border-radius: 20px;
}
.cat-desktop { background: rgba(201,168,76,0.1); color: var(--gold); border: 1px solid var(--border-gold); }
.cat-web     { background: rgba(74,124,247,0.1); color: var(--blue-lt); border: 1px solid rgba(74,124,247,0.3); }
.cat-mobile  { background: rgba(52,211,153,0.1); color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
.proj-year { font-size: 0.72rem; color: var(--txt3); margin-left: auto; }
.project-name { font-size: 1.3rem; font-weight: 700; color: var(--txt); margin-bottom: 0.25rem; }
.project-fullname { font-size: 0.8rem; color: var(--gold); margin-bottom: 0.75rem; font-weight: 500; }
.project-desc { font-size: 0.875rem; color: var(--txt2); line-height: 1.65; margin-bottom: 1rem; }
.project-stack { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-stack span {
  font-size: 0.72rem; background: var(--bg4); color: var(--txt2);
  padding: 0.2rem 0.6rem; border-radius: 20px; border: 1px solid var(--border);
}

.papers-list { display: flex; flex-direction: column; gap: 1rem; max-width: 860px; margin: 0 auto; }
.paper-card {
  display: flex; align-items: flex-start; gap: 1.25rem;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.5rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.paper-card:hover {
  border-color: var(--border-gold);
  transform: translateX(4px);
  box-shadow: var(--shadow-g);
}
.paper-icon {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  background: rgba(201,168,76,0.1); border: 1px solid var(--border-gold);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 1rem;
}
.paper-body { flex: 1; }
.paper-year {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  color: var(--gold); background: rgba(201,168,76,0.1);
  border: 1px solid var(--border-gold); padding: 0.15rem 0.6rem;
  border-radius: 20px; margin-bottom: 0.4rem; letter-spacing: 0.06em;
}
.paper-title { font-size: 1rem; font-weight: 600; color: var(--txt); margin-bottom: 0.35rem; line-height: 1.4; }
.paper-conf { font-size: 0.82rem; color: var(--txt3); }
.research-note {
  display: flex; align-items: flex-start; gap: 1.25rem;
  max-width: 860px; margin: 2.5rem auto 0;
  padding: 1.5rem; border-radius: var(--r);
  background: rgba(201,168,76,0.04); border: 1px solid var(--border-gold);
}
.research-note-icon {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  background: rgba(201,168,76,0.12); border: 1px solid var(--border-gold);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 1.1rem;
}
.research-note h4 { font-size: 0.95rem; font-weight: 600; color: var(--gold-lt); margin-bottom: 0.4rem; }
.research-note p { font-size: 0.875rem; color: var(--txt2); line-height: 1.65; }

.certs-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.cert-card {
  position: relative; border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--border); cursor: pointer;
  aspect-ratio: 4/3;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.cert-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow-g);
}
.cert-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.cert-card:hover img { transform: scale(1.06); }
.cert-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7,7,14,0.92) 0%, rgba(7,7,14,0.3) 60%, transparent 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 1rem; text-align: center;
  opacity: 0; transition: opacity 0.3s;
}
.cert-card:hover .cert-overlay { opacity: 1; }
.cert-overlay i { font-size: 1.5rem; color: var(--gold); margin-bottom: 0.5rem; }
.cert-overlay span { font-size: 0.78rem; color: var(--txt); font-weight: 500; }

.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; max-width: 900px; margin: 0 auto; }
.edu-card {
  display: flex; align-items: flex-start; gap: 1.25rem;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r); padding: 2rem;
  border-top: 3px solid var(--gold);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.edu-card:hover {
  border-color: var(--border-gold);
  border-top-color: var(--gold-lt);
  transform: translateY(-4px); box-shadow: var(--shadow-g);
}
.edu-icon {
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
  background: rgba(201,168,76,0.1); border: 1px solid var(--border-gold);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 1.3rem;
}
.edu-degree { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); font-weight: 600; margin-bottom: 0.35rem; display: block; }
.edu-field { font-size: 1rem; font-weight: 700; color: var(--txt); margin-bottom: 0.5rem; line-height: 1.35; }
.edu-uni { font-size: 0.875rem; color: var(--txt2); font-weight: 500; margin-bottom: 0.35rem; }
.edu-loc { font-size: 0.8rem; color: var(--txt3); display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.75rem; }
.edu-loc i { color: var(--gold-dk); }
.edu-year {
  display: inline-block; font-size: 1.2rem; font-weight: 700; color: var(--gold-lt);
  background: rgba(201,168,76,0.08); border: 1px solid var(--border-gold);
  padding: 0.3rem 0.85rem; border-radius: 8px;
}

.contact-intro {
  text-align: center; max-width: 560px; margin: 0 auto 3rem;
  color: var(--txt2); font-size: 1.05rem; line-height: 1.7;
}
.contact-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 860px; margin: 0 auto;
}
.contact-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  padding: 1.75rem 1rem; border-radius: var(--r);
  background: var(--bg3); border: 1px solid var(--border);
  text-align: center;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s, background 0.3s;
}
.contact-card:hover {
  transform: translateY(-5px); box-shadow: var(--shadow-g);
}
.contact-card[data-platform="linkedin"]:hover { border-color: #0077b5; box-shadow: 0 0 30px rgba(0,119,181,0.2); }
.contact-card[data-platform="x"]:hover        { border-color: #aaa; box-shadow: 0 0 30px rgba(170,170,170,0.15); }
.contact-card[data-platform="instagram"]:hover{ border-color: #e1306c; box-shadow: 0 0 30px rgba(225,48,108,0.2); }
.contact-card[data-platform="facebook"]:hover { border-color: #1877f2; box-shadow: 0 0 30px rgba(24,119,242,0.2); }
.contact-card[data-platform="telegram"]:hover { border-color: #0088cc; box-shadow: 0 0 30px rgba(0,136,204,0.2); }
.contact-card[data-platform="email"]:hover    { border-color: var(--border-gold); box-shadow: var(--shadow-g); }
.contact-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--gold);
  background: rgba(201,168,76,0.1); border: 1px solid var(--border-gold);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.contact-card[data-platform="linkedin"]:hover .contact-icon { background: #0077b5; color: #fff; border-color: #0077b5; }
.contact-card[data-platform="x"]:hover .contact-icon        { background: #222; color: #fff; border-color: #444; }
.contact-card[data-platform="instagram"]:hover .contact-icon{ background: #e1306c; color: #fff; border-color: #e1306c; }
.contact-card[data-platform="facebook"]:hover .contact-icon { background: #1877f2; color: #fff; border-color: #1877f2; }
.contact-card[data-platform="telegram"]:hover .contact-icon { background: #0088cc; color: #fff; border-color: #0088cc; }
.contact-platform { font-size: 0.875rem; font-weight: 600; color: var(--txt); }
.contact-handle { font-size: 0.78rem; color: var(--txt3); }
.contact-location {
  text-align: center; margin-top: 2.5rem;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  color: var(--txt3); font-size: 0.9rem;
}
.contact-location i { color: var(--gold); }

#footer {
  background: var(--bg); border-top: 1px solid var(--border);
  padding: 3rem 2rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
}
.footer-logo {
  font-size: 1.8rem; font-weight: 700;
  background: linear-gradient(135deg, var(--gold-dk), var(--gold-lt));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.25rem; justify-content: center; }
.footer-nav a {
  font-size: 0.825rem; color: var(--txt3); padding: 0.35rem 0.75rem;
  border-radius: 6px; transition: color 0.3s;
}
.footer-nav a:hover { color: var(--gold); }
.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--border); color: var(--txt3);
  display: flex; align-items: center; justify-content: center; font-size: 0.875rem;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.footer-social a:hover { color: var(--gold); border-color: var(--border-gold); background: rgba(201,168,76,0.06); }
.footer-copy { font-size: 0.78rem; color: var(--txt3); text-align: center; }

#lightbox {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity 0.35s, visibility 0.35s;
}
#lightbox.open { opacity: 1; visibility: visible; }
.lb-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.92); backdrop-filter: blur(8px);
}
.lb-box {
  position: relative; z-index: 1;
  max-width: min(92vw, 900px); max-height: 90vh;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.lb-box img {
  max-height: 80vh; object-fit: contain;
  border-radius: 12px; border: 1px solid var(--border-gold);
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}
.lb-caption { font-size: 0.875rem; color: var(--txt2); text-align: center; }
.lb-close, .lb-prev, .lb-next {
  position: fixed; background: rgba(18,18,31,0.9);
  border: 1px solid var(--border); color: var(--txt2); border-radius: 50%;
  width: 44px; height: 44px; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.3s, border-color 0.3s;
}
.lb-close { top: 1.25rem; right: 1.25rem; }
.lb-prev  { top: 50%; left: 1.25rem; transform: translateY(-50%); }
.lb-next  { top: 50%; right: 1.25rem; transform: translateY(-50%); }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: var(--gold); border-color: var(--border-gold); }

.back-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 800;
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(18,18,31,0.9); border: 1px solid var(--border-gold);
  color: var(--gold); font-size: 0.875rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: all 0.3s var(--ease);
  box-shadow: 0 4px 20px rgba(201,168,76,0.15);
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--gold); color: #06060b; box-shadow: 0 8px 24px rgba(201,168,76,0.35); }

@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 420px; margin: 0 auto; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 7rem; }
  .hero-photo { order: -1; }
  .photo-frame { width: min(300px, 80vw); }
  .hero-text { text-align: center; }
  .hero-cta { justify-content: center; }
  .hero-location { justify-content: center; }
  .timeline::before { left: 20px; }
  .tl-item, .tl-item.tl-right {
    width: 100%; padding-left: 52px; padding-right: 0; margin-left: 0;
  }
  .tl-dot, .tl-item.tl-right .tl-dot { left: 14px; right: auto; }
  .projects-grid { grid-template-columns: 1fr; }
  .projects-grid .project-card:last-child:nth-child(odd) { grid-column: auto; max-width: none; }
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
  .edu-grid { grid-template-columns: 1fr; max-width: 500px; }
}

@media (max-width: 600px) {
  section { padding: 4rem 0; }
  .hero-stats { flex-wrap: wrap; gap: 1rem; justify-content: center; }
  .stat-sep { display: none; }
  .stat-item { padding: 0 1.5rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-brand { font-size: clamp(3.5rem, 18vw, 6rem); }
}

@media (max-width: 420px) {
  .contact-grid { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: 1fr; }
}
