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

/* ── Variables ── */
:root {
  --bg-0: #010409;
  --bg-1: #0d1117;
  --bg-2: #161b22;
  --bg-3: #21262d;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #7d8590;
  --accent: #58a6ff;
  --green: #3fb950;
  --purple: #bc8cff;
  --orange: #d29922;
  --red: #f85149;
  --mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-1);
  color: var(--text);
  font-family: 'Inter', Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

::selection { background: rgba(88,166,255,.22); }

section { scroll-margin-top: 60px; }

/* ─────────────────── NAV ─────────────────── */
nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: 60px;
  z-index: 1000;
  background: rgba(13,17,23,.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--mono);
  font-size: .88rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

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

.nav-links {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  flex: 1;
}

.nav-links a {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
}

.nav-links a:hover { color: var(--accent); }

.nav-right {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-left: auto;
}

.nav-icon {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: color .2s;
}

.nav-icon:hover { color: var(--accent); }

.lang-btn {
  display: flex;
  align-items: center;
  border-radius: 3px;
  overflow: hidden;
  opacity: .65;
  transition: opacity .2s, transform .2s;
  text-decoration: none;
}

.lang-btn:hover { opacity: 1; transform: scale(1.08); }

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

#particles-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(88,166,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88,166,255,.025) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
  z-index: 0;
}

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

/* Left */
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.terminal-box {
  display: inline-flex;
  align-items: center;
  gap: .22rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .55rem 1rem;
  font-family: var(--mono);
  font-size: .83rem;
  width: fit-content;
  max-width: 100%;
}

.t-user   { color: var(--green); }
.t-at     { color: var(--text-muted); }
.t-host   { color: var(--accent); }
.t-colon  { color: var(--text-muted); }
.t-dir    { color: var(--purple); }
.t-dollar { color: var(--text-muted); margin: 0 .4rem; }
.t-cmd    { color: var(--text); }

.cursor {
  display: inline-block;
  width: 7px; height: 13px;
  background: var(--accent);
  border-radius: 1px;
  animation: blink .9s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
  flex-shrink: 0;
}

@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }

.hero-name {
  font-size: clamp(2.4rem,5vw,3.7rem);
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 65%, var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-role {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--text-muted);
}

.c-comment { color: #4a5568; }
.c-string  { color: var(--green); }

.hero-desc {
  color: var(--text-muted);
  font-size: .97rem;
  max-width: 460px;
}

.hero-cta {
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  padding-top: .15rem;
}

.btn-primary {
  padding: .62rem 1.45rem;
  background: var(--accent);
  color: var(--bg-1);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: .88rem;
  transition: background .2s, transform .2s, box-shadow .2s;
}

.btn-primary:hover {
  background: #79b8ff;
  transform: translateY(-2px);
  box-shadow: 0 0 22px rgba(88,166,255,.4);
}

.btn-ghost {
  padding: .62rem 1.45rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: .88rem;
  transition: border-color .2s, color .2s, transform .2s, box-shadow .2s;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(88,166,255,.12);
}

/* Right — profile */
.hero-right {
  position: relative;
  width: 300px;
  height: 300px;
  flex-shrink: 0;
}

.profile-wrap {
  width: 260px;
  height: 260px;
  position: absolute;
  top: 50%; left: 50%;
  translate: -50% -50%;
}

.profile-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(from var(--angle), var(--accent), var(--purple), var(--green), var(--accent));
  animation: spin 4s linear infinite;
  filter: blur(1.5px);
}

@keyframes spin { to { --angle: 360deg; } }

.profile-img {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-1);
  display: block;
}

.float-badge {
  position: absolute;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .28rem .6rem;
  font-family: var(--mono);
  font-size: .73rem;
  color: var(--text-muted);
  white-space: nowrap;
  animation: float 3.5s ease-in-out infinite;
  pointer-events: none;
}

.fb-1 { top: -2%; left: -38%; animation-delay: 0s; }
.fb-2 { top: 18%; right: -38%; animation-delay: .6s; }
.fb-3 { bottom: 18%; left: -34%; animation-delay: 1.2s; }
.fb-4 { bottom: -2%; right: -34%; animation-delay: 1.8s; }

@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ─────────────────── SECTIONS ─────────────────── */
.section-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-label {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--accent);
  display: block;
  margin-bottom: .3rem;
}

.section-title {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: .45rem;
}

.section-divider {
  width: 44px; height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
  margin-bottom: 2.4rem;
}

/* scroll reveal */
.animate-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease;
}

.animate-in.visible { opacity: 1; transform: none; }

.animate-left {
  opacity: 0;
  transform: translateX(-22px);
  transition: opacity .55s ease, transform .55s ease;
}

.animate-left.visible { opacity: 1; transform: none; }

/* ─────────────────── PROJECTS ─────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.pcard {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s, transform .3s;
}

.pcard:hover {
  border-color: var(--accent);
  box-shadow: 0 0 28px rgba(88,166,255,.1), 0 8px 32px rgba(0,0,0,.5);
  transform: translateY(-4px);
}

.pcard--wide { grid-column: 1 / -1; }

.pcard-bar {
  padding: .52rem .9rem;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .38rem;
}

.wd { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.wd-r { background: var(--red); }
.wd-y { background: var(--orange); }
.wd-g { background: var(--green); }

.pcard-file {
  margin-left: auto;
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--text-muted);
}

.pcard-body { padding: 1.35rem; }

.pcard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .7rem;
  margin-bottom: .55rem;
}

.pcard-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
}

.status {
  font-family: var(--mono);
  font-size: .68rem;
  padding: .18rem .5rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: .28rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.status-dot { width: 5px; height: 5px; border-radius: 50%; }

.status-live { background: rgba(63,185,80,.12); color: var(--green); border: 1px solid rgba(63,185,80,.25); }
.status-live .status-dot { background: var(--green); animation: pulse-g 2s infinite; }

.status-wip { background: rgba(210,153,34,.12); color: var(--orange); border: 1px solid rgba(210,153,34,.25); }
.status-wip .status-dot { background: var(--orange); }

@keyframes pulse-g { 0%,100% { opacity:1; } 50% { opacity:.3; } }

.pcard-desc {
  font-family: var(--mono);
  font-size: .8rem;
  color: #4a5568;
  margin-bottom: .95rem;
  line-height: 1.55;
}

.pcard-desc::before { content: '// '; }

.pcard-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .38rem;
  margin-bottom: 1rem;
}

.ptag {
  font-family: var(--mono);
  font-size: .7rem;
  padding: .18rem .52rem;
  border-radius: 4px;
  border: 1px solid;
}

.ptag-blue   { color: #58a6ff; background: rgba(88,166,255,.07);  border-color: rgba(88,166,255,.2); }
.ptag-green  { color: #3fb950; background: rgba(63,185,80,.07);   border-color: rgba(63,185,80,.2); }
.ptag-purple { color: #bc8cff; background: rgba(188,140,255,.07); border-color: rgba(188,140,255,.2); }
.ptag-orange { color: #d29922; background: rgba(210,153,34,.07);  border-color: rgba(210,153,34,.2); }

.pcard-links { display: flex; gap: 1rem; align-items: center; }

.pcard-link {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  font-size: .82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
}

.pcard-link:hover { color: var(--accent); }

/* ─────────────────── EXPERIENCE ─────────────────── */
.exp-timeline {
  position: relative;
  padding-left: 1.7rem;
}

.exp-timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), rgba(88,166,255,0));
}

.exp-item {
  position: relative;
  margin-bottom: 2.4rem;
}

.exp-item::before {
  content: '';
  position: absolute;
  left: -1.95rem;
  top: .4rem;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-1);
  box-shadow: 0 0 10px rgba(88,166,255,.5);
}

.exp-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .7rem;
  flex-wrap: wrap;
  margin-bottom: .3rem;
}

.exp-role { font-size: 1.05rem; font-weight: 600; color: var(--text); }
.exp-co   { color: var(--accent); font-size: .88rem; margin-top: .1rem; }

.exp-period {
  font-family: var(--mono);
  font-size: .73rem;
  color: var(--text-muted);
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: .18rem .55rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.exp-desc {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: .75rem;
}

/* ─────────────────── EDUCATION ─────────────────── */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-bottom: 1.8rem;
}

.edu-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.4rem;
  transition: border-color .3s;
}

.edu-card:hover { border-color: var(--purple); }

.edu-badge {
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--purple);
  background: rgba(188,140,255,.1);
  border: 1px solid rgba(188,140,255,.2);
  padding: .18rem .52rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: .7rem;
}

.edu-degree { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: .18rem; }
.edu-school { color: var(--accent); font-size: .88rem; margin-bottom: .18rem; }
.edu-period { font-family: var(--mono); font-size: .76rem; color: var(--text-muted); }
.edu-desc   { color: var(--text-muted); font-size: .84rem; margin-top: .5rem; }

.certs-title {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--accent);
  display: block;
  margin-bottom: .9rem;
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: .8rem;
}

.cert-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  transition: border-color .3s;
}

.cert-card:hover { border-color: var(--orange); }

.cert-icon { font-size: 1.35rem; flex-shrink: 0; line-height: 1; }
.cert-name { font-size: .88rem; font-weight: 600; color: var(--text); margin-bottom: .14rem; }
.cert-meta { font-family: var(--mono); font-size: .73rem; color: var(--text-muted); }

/* ─────────────────── SKILLS ─────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.skill-block {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .3s;
}

.skill-block:hover { border-color: var(--accent); }

.skill-block-head {
  padding: .52rem 1rem;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .45rem;
}

.skill-dot { width: 9px; height: 9px; border-radius: 50%; }

.skill-block-label {
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--text-muted);
}

.skill-chips {
  padding: 1.05rem;
  display: flex;
  flex-wrap: wrap;
  gap: .42rem;
}

.chip {
  font-family: var(--mono);
  font-size: .76rem;
  padding: .26rem .62rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-3);
  transition: all .2s;
  cursor: default;
  user-select: none;
}

.chip:hover { border-color: var(--accent); color: var(--accent); }

/* ─────────────────── CONTACT ─────────────────── */
.contact-wrap {
  display: flex;
  justify-content: center;
}

.contact-box {
  max-width: 600px;
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  text-align: center;
}

.contact-label {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--green);
  display: block;
  margin-bottom: .3rem;
}

.contact-title { font-size: 1.7rem; font-weight: 700; margin-bottom: .45rem; }

.contact-sub {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: .93rem;
}

.contact-actions {
  display: flex;
  gap: .8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .65rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .86rem;
  transition: border-color .2s, color .2s, box-shadow .2s;
}

.contact-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 14px rgba(88,166,255,.15);
}

/* ─────────────────── FOOTER ─────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.7rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-text {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--text-muted);
}

.footer-text span { color: var(--accent); }

.footer-links { display: flex; gap: 1.2rem; }

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

.footer-links a:hover { color: var(--accent); }

/* ─────────────────── RESPONSIVE ─────────────────── */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-right { display: none; }
  .hero-text  { align-items: center; }
  .hero-desc  { max-width: 100%; }

  .projects-grid,
  .skills-grid,
  .edu-grid { grid-template-columns: 1fr; }

  .nav-links { display: none; }

  .section-wrap { padding: 3.5rem 1.5rem; }
}

@media (max-width: 560px) {
  .hero { padding-top: 60px; }
  .hero-inner { padding: 2.5rem 1.25rem; }
  .hero-cta { justify-content: center; }

  footer { padding: 1.5rem; }
  .footer-inner { justify-content: center; text-align: center; }
}
