/* ============================================================
   Sanjarbek Ismailov — Personal Portfolio
   style.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Mono:wght@400;700&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0d0d0f;
  --bg2:         #111114;
  --card:        rgba(255,255,255,0.04);
  --border:      rgba(255,255,255,0.08);
  --border-h:    rgba(245,158,11,0.4);
  --text:        #f0f0f0;
  --muted:       #888899;
  --accent:      #f59e0b;
  --accent-glow: rgba(245,158,11,0.25);
  --radius:      16px;
  --font:        'Inter', sans-serif;
  --mono:        'Space Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button, input, textarea { font-family: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

/* ── Navbar ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  background: rgba(13,13,15,0.85);
  backdrop-filter: blur(18px);
  border-color: var(--border);
  padding: 14px 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}
.lang-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.78rem;
  font-family: var(--mono);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.lang-btn.active {
  background: var(--accent);
  color: #000;
}
.lang-btn:not(.active):hover { color: var(--text); }

/* Mobile hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.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 nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0;
  background: rgba(13,13,15,0.97);
  border-top: 1px solid var(--border);
  padding: 16px 24px 24px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 12px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  transition: color 0.2s;
}
.mobile-nav a:last-of-type { border-bottom: none; }
.mobile-nav a:hover { color: var(--text); }
.mobile-lang {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.mobile-lang .lang-btn { flex: 1; text-align: center; }

/* ── Hero ── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

/* Particle/dot background */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}
.hero-glow-1 {
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(245,158,11,0.08), transparent 70%);
  top: 20%; left: 20%;
  pointer-events: none;
  animation: float1 8s ease-in-out infinite;
}
.hero-glow-2 {
  position: absolute;
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(99,102,241,0.06), transparent 70%);
  bottom: 20%; right: 15%;
  pointer-events: none;
  animation: float2 10s ease-in-out infinite;
}
@keyframes float1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(30px,-20px)} }
@keyframes float2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-20px,30px)} }

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Avatar */
.avatar-ring {
  width: 110px; height: 110px;
  border-radius: 50%;
  border: 2px solid rgba(245,158,11,0.35);
  padding: 4px;
  position: relative;
  margin-bottom: 28px;
  animation: fadeScaleIn 0.6s ease both;
}
.avatar-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a1a1f, #111114);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(245,158,11,0.2);
}
.avatar-inner span {
  font-family: var(--mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}
.avatar-badge {
  position: absolute;
  bottom: -4px; right: -4px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-family: var(--mono);
  color: var(--muted);
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  50% { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

.hero-tags {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(10px);
  font-size: 0.82rem;
  color: var(--muted);
  font-family: var(--mono);
  margin-bottom: 24px;
  animation: fadeUp 0.6s 0.1s ease both;
}
.hero-tags span.dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
}

.hero-title {
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 24px;
  animation: fadeUp 0.6s 0.2s ease both;
}
.hero-title .grad {
  background: linear-gradient(135deg, var(--accent), #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--muted);
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 40px;
  animation: fadeUp 0.6s 0.3s ease both;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.6s 0.4s ease both;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 32px rgba(245,158,11,0.45);
}
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 1.1rem;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-icon:hover {
  background: rgba(245,158,11,0.1);
  border-color: var(--border-h);
  color: var(--accent);
}
.btn-icon svg { width: 20px; height: 20px; }

.scroll-hint {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-family: var(--mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  animation: fadeIn 1s 1s ease both;
}
.scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

/* ── Section base ── */
section { padding: 96px 0; }
.section-alt { background: rgba(255,255,255,0.015); }

.section-tag {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.section-title .mono { font-family: var(--mono); color: var(--accent); }
.section-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.7;
}
.text-center { text-align: center; }
.text-center .section-sub { margin: 0 auto; }

/* ── Glass card ── */
.glass-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  transition: border-color 0.25s, transform 0.25s;
}
.glass-card:hover {
  border-color: rgba(245,158,11,0.25);
  transform: translateY(-4px);
}

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-text p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 20px;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--text); }
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stat-card {
  padding: 24px;
  border-radius: 16px;
}
.stat-icon {
  width: 36px; height: 36px;
  margin-bottom: 14px;
  opacity: 0.9;
}
.stat-card h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.stat-card p {
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--mono);
}
.c-blue { color: #60a5fa; }
.c-green { color: #4ade80; }
.c-amber { color: var(--accent); }
.c-purple { color: #a78bfa; }

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  max-width: 900px;
  margin: 0 auto;
}
.skills-label {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 28px;
}
.skill-item { margin-bottom: 20px; }
.skill-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.skill-name { font-weight: 600; font-size: 0.95rem; }
.skill-pct {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.skill-bar-bg {
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  border-radius: 3px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}
.tools-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.tool-tag {
  padding: 8px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s;
  cursor: default;
}
.tool-tag:hover {
  border-color: rgba(245,158,11,0.4);
  color: var(--accent);
}
.skill-quote {
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
}
.skill-quote p {
  font-size: 0.85rem;
  font-family: var(--mono);
  color: var(--muted);
  font-style: italic;
  line-height: 1.6;
}

/* ── Projects ── */
.projects-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
  gap: 24px;
  flex-wrap: wrap;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.project-card {
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.project-img {
  height: 200px;
  overflow: hidden;
  position: relative;
}
.project-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transition: opacity 0.5s, transform 0.5s;
}
.project-card:hover .project-img img {
  opacity: 1;
  transform: scale(1.07);
}
.project-img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  transition: background 0.4s;
}
.project-card:hover .project-img-overlay { background: transparent; }
.project-img-icon {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  z-index: 2;
}
.project-img-icon svg { width: 18px; height: 18px; color: #fff; }
.project-ext-link {
  position: absolute;
  top: 14px; right: 14px;
  width: 38px; height: 38px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  z-index: 2;
  transition: background 0.2s, border-color 0.2s;
}
.project-ext-link:hover {
  background: var(--accent);
  color: #000;
  border-color: transparent;
}
.project-ext-link svg { width: 14px; height: 14px; }
.project-gradient {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.project-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-body h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
  transition: color 0.2s;
}
.project-card:hover .project-body h3 { color: var(--accent); }
.project-body p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 20px;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.project-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 4px 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  color: rgba(255,255,255,0.6);
}
.view-all-link {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.view-all-link:hover { color: #fb923c; }
.view-all-link svg { width: 14px; height: 14px; }

/* ── Experience / Timeline ── */
.timeline-wrap {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  padding-left: 40px;
  border-left: 1px solid var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 48px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -49px;
  top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  background: var(--muted);
}
.timeline-dot.active {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(245,158,11,0.7);
}
.timeline-year {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.timeline-year.active { color: var(--accent); }
.timeline-item h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.timeline-item p { color: var(--muted); font-size: 0.95rem; line-height: 1.7; }

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: flex-start;
}
.contact-links { margin-top: 36px; display: flex; flex-direction: column; gap: 20px; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(255,255,255,0.75);
  transition: color 0.2s;
}
.contact-link:hover { color: var(--accent); }
.contact-link-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.contact-link:hover .contact-link-icon {
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.4);
}
.contact-link-icon svg { width: 20px; height: 20px; }
.contact-label { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); margin-bottom: 2px; }
.contact-val { font-weight: 500; }

/* Contact form */
.contact-form { padding: 36px; border-radius: 24px; }
.contact-form h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 24px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.1);
}
.form-group textarea { resize: none; height: 120px; }
.btn-submit {
  width: 100%;
  padding: 14px;
  background: #fff;
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  transition: background 0.2s, color 0.2s;
}
.btn-submit:hover {
  background: var(--accent);
  color: #000;
}
.btn-submit svg { width: 18px; height: 18px; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
}
.footer-brand span { color: var(--accent); }
.footer-copy {
  font-size: 0.82rem;
  color: var(--muted);
  font-family: var(--mono);
}

/* ── Animations ── */
@keyframes fadeScaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left.visible {
  opacity: 1;
  transform: none;
}
.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-right.visible {
  opacity: 1;
  transform: none;
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .skills-grid { grid-template-columns: 1fr; gap: 48px; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 600px) {
  .projects-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-cta { flex-direction: column; width: 100%; }
  .btn-primary { width: 100%; justify-content: center; }
  .projects-header { flex-direction: column; align-items: flex-start; }
}
