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

:root {
  --bg: #0b1020;
  --surface: #111933;
  --surface-soft: #151f3d;
  --ink: #e8eeff;
  --ink-soft: #b7c4e6;
  --ink-faint: #7f90bd;
  --accent: #39d0ff;
  --accent-light: #1a2a52;
  --accent-mid: #7cf6d2;
  --ink-on-dark: #eaf2ff;
  --ink-on-dark-soft: rgba(234, 242, 255, 0.72);
  --border: rgba(133, 164, 230, 0.20);
  --border-strong: rgba(133, 164, 230, 0.34);
  --radius: 12px;
  --font-display: 'DM Serif Display', serif;
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'DM Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 300;
  overflow-x: hidden;
  position: relative;
}
body::before,
body::after {
  content: '';
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(70px);
  z-index: 0;
  pointer-events: none;
}
body::before {
  background: rgba(57, 208, 255, 0.18);
  top: -220px;
  left: -140px;
}
body::after {
  background: rgba(124, 246, 210, 0.12);
  right: -180px;
  bottom: -220px;
}
nav, .hero, section, footer {
  position: relative;
  z-index: 1;
}

.bg-orbs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.24;
  will-change: transform;
}
.orb-1 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle at 30% 30%, rgba(57, 208, 255, 0.55), rgba(57, 208, 255, 0));
  left: -80px;
  top: 8%;
  animation: driftA 18s ease-in-out infinite alternate;
}
.orb-2 {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at 40% 40%, rgba(124, 246, 210, 0.5), rgba(124, 246, 210, 0));
  right: 8%;
  top: 26%;
  animation: driftB 22s ease-in-out infinite alternate;
}
.orb-3 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at 35% 35%, rgba(74, 123, 255, 0.36), rgba(74, 123, 255, 0));
  right: -100px;
  bottom: -30px;
  animation: driftC 26s ease-in-out infinite alternate;
}

.scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  height: 3px;
  width: 0;
  z-index: 120;
  background: linear-gradient(90deg, var(--accent), var(--accent-mid));
  box-shadow: 0 0 14px rgba(57, 208, 255, 0.55);
}

.cursor-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57,208,255,0.16) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(11,16,32,0.82);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 58px;
  transition: box-shadow 0.3s;
}
nav.scrolled {
  box-shadow: 0 2px 24px rgba(26,26,24,0.06);
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-decoration: none;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active {
  color: var(--accent);
}
.nav-links a.active::after {
  width: 100%;
}

.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 6.5rem 2rem 4rem;
  max-width: 900px; margin: 0 auto;
  position: relative;
}
.hero-inner {
  width: 100%;
  max-width: 700px;
}
.hero-profile {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin-bottom: 1.5rem;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  opacity: 0;
  animation: heroFadeUp 0.7s cubic-bezier(0.22,1,0.36,1) 0.05s forwards;
}
.hero-profile-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 12px 30px rgba(26,26,24,0.18);
  background: linear-gradient(145deg, #f4f4f2, #e8e7e3);
}
.hero-profile-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(57, 208, 255, 0.45);
  animation: spin 16s linear infinite;
  z-index: -1;
}

.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--accent); letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: heroFadeUp 0.7s cubic-bezier(0.22,1,0.36,1) 0.1s forwards;
}
.hero-tag::before {
  content: ''; display: block;
  width: 24px; height: 1.5px; background: var(--accent);
  animation: lineGrow 0.5s ease 0.6s both;
}
h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.05;
  font-weight: 400;
  color: var(--ink);
  opacity: 0;
  animation: heroFadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.2s forwards;
}
h1 em { font-style: italic; color: var(--accent); }

.hero-desc {
  max-width: 520px;
  font-size: 17px;
  color: var(--ink-soft);
  margin: 1.8rem 0 2.5rem;
  font-weight: 300;
  opacity: 0;
  animation: heroFadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.38s forwards;
}
.hero-cta {
  display: flex; gap: 1rem; flex-wrap: wrap;
  opacity: 0;
  animation: heroFadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.52s forwards;
}
.hero-meta {
  margin-top: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  opacity: 0;
  animation: heroFadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.64s forwards;
}
.hero-chip {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  background: rgba(24, 38, 74, 0.55);
  border: 1px solid rgba(133, 164, 230, 0.25);
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
  background: var(--accent-light);
  opacity: 0;
  animation: shapeFloat 0.8s ease 0.8s forwards;
  pointer-events: none;
}
.hero-shape-1 {
  width: 180px; height: 180px;
  right: 5%; top: 25%;
  animation-delay: 0.9s;
}
.hero-shape-2 {
  width: 80px; height: 80px;
  right: 18%; top: 55%;
  animation-delay: 1.1s;
  background: rgba(57, 208, 255, 0.12);
}
@keyframes shapeFloat {
  0%   { opacity: 0; transform: translateY(30px) scale(0.85); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.hero-shape-1 { animation: shapeFloat 1s ease 0.9s forwards, floatBob 6s ease-in-out 1.8s infinite; }
.hero-shape-2 { animation: shapeFloat 1s ease 1.1s forwards, floatBob 4s ease-in-out 2s infinite reverse; }

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

.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.22,1,0.36,1);
  cursor: pointer;
  border: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, #39d0ff, #7cf6d2);
  color: #071123;
  box-shadow: 0 8px 24px rgba(57,208,255,0.22);
}
.btn-primary:hover { box-shadow: 0 12px 30px rgba(57,208,255,0.28); }
.btn-outline {
  background: rgba(24,38,74,0.55);
  color: var(--ink);
  border: 0.5px solid var(--border-strong);
}
.btn-outline:hover { background: var(--surface); box-shadow: 0 4px 16px rgba(26,26,24,0.08); }

section { padding: 6rem 2rem; max-width: 900px; margin: 0 auto; }
.section-label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; color: var(--ink-faint);
  text-transform: uppercase; margin-bottom: 0.5rem;
}
h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}
h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 48%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.divider {
  height: 0.5px; background: var(--border);
  max-width: 900px; margin: 0 auto;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1),
              transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1),
              transform 0.6s cubic-bezier(0.22,1,0.36,1);
}
.reveal-stagger.visible > *:nth-child(1) { opacity:1; transform:none; transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { opacity:1; transform:none; transition-delay: 0.08s; }
.reveal-stagger.visible > *:nth-child(3) { opacity:1; transform:none; transition-delay: 0.16s; }
.reveal-stagger.visible > *:nth-child(4) { opacity:1; transform:none; transition-delay: 0.24s; }
.reveal-stagger.visible > *:nth-child(5) { opacity:1; transform:none; transition-delay: 0.32s; }
.reveal-stagger.visible > *:nth-child(6) { opacity:1; transform:none; transition-delay: 0.40s; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.skill-cell {
  background: var(--surface-soft);
  padding: 1.5rem 1.25rem;
  transition: background 0.25s, transform 0.25s cubic-bezier(0.22,1,0.36,1);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(133, 164, 230, 0.06);
}
.skill-cell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-light);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
  z-index: 0;
}
.skill-cell:hover::before { transform: scaleY(1); }
.skill-cell > * { position: relative; z-index: 1; }
.skill-cell:hover { transform: translateY(-2px); }

.skill-icon {
  width: 32px; height: 32px;
  background: var(--accent-light);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.75rem;
  transition: background 0.25s, transform 0.3s cubic-bezier(0.22,1,0.36,1);
}
.skill-cell:hover .skill-icon {
  background: rgba(57, 208, 255, 0.24);
  transform: rotate(-8deg) scale(1.12);
}
.skill-icon svg { width: 16px; height: 16px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.skill-name { font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 0.25rem; }
.skill-sub  { font-size: 12px; color: var(--ink-faint); font-family: var(--font-mono); }

.projects-list {
  display: flex; flex-direction: column;
  gap: 1px; background: var(--border);
  border: 0.5px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.project-card {
  background: var(--surface-soft);
  padding: 1.75rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
  transition: background 0.25s, transform 0.3s cubic-bezier(0.22,1,0.36,1);
  cursor: default;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(133, 164, 230, 0.06);
}
.project-card::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
  transform-origin: top;
}
.project-card:hover::after { transform: scaleY(1); }
.project-card:hover {
  background: #1b274c;
  transform: translateX(4px);
  box-shadow: 0 12px 30px rgba(7, 17, 35, 0.34);
}
.project-num { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); margin-bottom: 0.5rem; }
.project-title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 400; color: var(--ink); margin-bottom: 0.5rem; }
.project-desc { font-size: 14px; color: var(--ink-soft); max-width: 480px; }
.project-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 1rem; }
.tag {
  font-family: var(--font-mono); font-size: 11px;
  padding: 3px 10px; border-radius: 20px;
  background: var(--accent-light); color: var(--accent);
  border: 0.5px solid rgba(57, 208, 255, 0.24);
  transition: background 0.2s, color 0.2s;
}
.tag:hover { background: var(--accent); color: #fff; }
.project-arrow {
  width: 36px; height: 36px;
  border-radius: 50%; border: 0.5px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint); font-size: 16px;
  flex-shrink: 0; margin-top: 4px;
  transition: border-color 0.25s, color 0.25s, transform 0.3s cubic-bezier(0.22,1,0.36,1);
}
.project-card:hover .project-arrow {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(45deg);
}

.certificate-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.75fr);
  background: var(--surface-soft);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(133, 164, 230, 0.06);
}
.certificate-art {
  aspect-ratio: 927 / 656;
  min-height: 360px;
  padding: 2rem 2.5rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #10142e;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(242,245,252,0.92)),
    repeating-linear-gradient(120deg, rgba(94, 52, 235, 0.08) 0 2px, transparent 2px 18px);
}
.certificate-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 18%, rgba(94, 52, 235, 0.12), transparent 22%),
    radial-gradient(circle at 82% 78%, rgba(0, 174, 255, 0.15), transparent 20%),
    linear-gradient(12deg, transparent 0 70%, rgba(94, 52, 235, 0.08) 70% 76%, transparent 76%),
    linear-gradient(-12deg, transparent 0 72%, rgba(245, 158, 11, 0.14) 72% 78%, transparent 78%);
  pointer-events: none;
}
.cert-circuit,
.cert-ribbon {
  position: absolute;
  pointer-events: none;
}
.cert-circuit {
  width: 170px;
  height: 74px;
  border-top: 5px solid #5e34eb;
  border-left: 5px solid #5e34eb;
  opacity: 0.95;
}
.cert-circuit::before,
.cert-circuit::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 5px solid #5e34eb;
  border-radius: 999px;
  background: #f8f9ff;
}
.cert-circuit::before {
  right: -8px;
  top: -10px;
}
.cert-circuit::after {
  left: 44px;
  bottom: -8px;
}
.cert-circuit-top {
  left: 0;
  top: 0;
}
.cert-circuit-bottom {
  right: 0;
  bottom: 0;
  transform: rotate(180deg);
}
.cert-ribbon {
  width: 210px;
  height: 72px;
  bottom: -22px;
  background:
    linear-gradient(135deg, transparent 0 20%, #00aeff 20% 32%, transparent 32% 38%, #5e34eb 38% 64%, transparent 64%),
    linear-gradient(135deg, transparent 0 48%, #f59e0b 48% 58%, transparent 58% 64%, #f97316 64% 74%, transparent 74%);
}
.cert-ribbon-left {
  left: -46px;
}
.cert-ribbon-right {
  right: -46px;
  transform: scaleX(-1);
}
.certificate-art > *:not(.cert-circuit):not(.cert-ribbon) {
  position: relative;
  z-index: 1;
}
.certificate-office {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #25305f;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}
.certificate-title {
  font-family: var(--font-body);
  font-size: 3.4rem;
  line-height: 1;
  font-weight: 500;
  color: #5e34eb;
  text-transform: uppercase;
}
.certificate-subtitle {
  font-size: 1.35rem;
  line-height: 1.2;
  color: #5e34eb;
  margin-bottom: 1rem;
}
.certificate-awarded {
  font-weight: 500;
  color: #161616;
}
.certificate-name {
  font-family: var(--font-display);
  font-size: 2.45rem;
  line-height: 1.15;
  font-style: italic;
  color: #5e34eb;
  margin: 0.45rem 0 0.1rem;
}
.certificate-rule {
  width: min(78%, 460px);
  height: 1px;
  background: #172038;
  margin-bottom: 0.7rem;
}
.certificate-copy {
  max-width: 540px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #151515;
}
.certificate-date {
  margin-top: 0.8rem;
  font-size: 0.86rem;
  color: #242424;
}
.certificate-signatures {
  width: min(72%, 430px);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.15rem;
  color: #0b145c;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
}
.certificate-info {
  padding: 1.7rem 1.5rem;
  border-left: 1px solid rgba(133, 164, 230, 0.18);
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.certificate-info h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.15;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.8rem;
}
.certificate-info p {
  font-size: 14px;
  color: var(--ink-soft);
}

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.about-text { font-size: 16px; color: var(--ink-soft); }
.about-text p + p { margin-top: 1rem; }
.stats-col {
  display: flex; flex-direction: column;
  gap: 1px; background: var(--border);
  border: 0.5px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.stat-row {
  background: var(--surface-soft); padding: 1.25rem 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
  transition: background 0.2s;
}
.stat-row:hover { background: var(--accent-light); }
.stat-label { font-size: 13px; color: var(--ink-soft); }
.stat-val { font-family: var(--font-mono); font-size: 13px; color: var(--ink); font-weight: 500; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-box {
  background: linear-gradient(140deg, #0c1530, #12234a);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 2rem;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s;
  border: 1px solid rgba(133, 164, 230, 0.22);
}
.contact-box::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(57,208,255,0.2) 0%, transparent 70%);
  right: -80px; top: -80px;
  border-radius: 50%;
  pointer-events: none;
  animation: contactPulse 4s ease-in-out infinite;
}
.contact-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(255,255,255,0.07), transparent 40%);
  pointer-events: none;
}
@keyframes contactPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50%       { transform: scale(1.15); opacity: 1; }
}
.contact-box:hover { box-shadow: 0 16px 48px rgba(26,26,24,0.18); }
.contact-box h2 { color: var(--ink-on-dark); margin-bottom: 0.5rem; }
.contact-sub { color: var(--ink-on-dark-soft); font-size: 15px; }
.contact-links { display: flex; flex-direction: column; gap: 0.75rem; }
.contact-link {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-family: var(--font-mono);
  color: var(--ink-on-dark-soft);
  text-decoration: none;
  transition: color 0.2s, gap 0.2s;
}
.contact-link:hover { color: var(--ink-on-dark); gap: 14px; }
.contact-link-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-mid); flex-shrink: 0;
  transition: transform 0.25s;
}
.contact-link:hover .contact-link-dot { transform: scale(1.5); }

footer {
  text-align: center; padding: 2.5rem 2rem;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-faint); letter-spacing: 0.04em;
}

.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(133, 164, 230, 0.35);
  background: rgba(17, 25, 51, 0.85);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 90;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.2s ease;
}
.to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.to-top:hover {
  border-color: var(--accent);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes driftA {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(90px, 70px) scale(1.1); }
}
@keyframes driftB {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-110px, 60px) scale(1.08); }
}
@keyframes driftC {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-70px, -80px) scale(1.12); }
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes lineGrow {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); }
}

.page-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: var(--ink);
  transform: scaleY(1);
  transform-origin: top;
  animation: overlayOut 0.7s cubic-bezier(0.77,0,0.18,1) 0.1s forwards;
  pointer-events: none;
}
@keyframes overlayOut {
  0%   { transform: scaleY(1); transform-origin: top; }
  100% { transform: scaleY(0); transform-origin: top; }
}

/* ============================================================
   MOBILE MENU
   ============================================================ */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 0.5px solid var(--border-strong);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s, background 0.2s;
}
.nav-hamburger:hover {
  border-color: var(--accent);
  background: rgba(57,208,255,0.06);
}
.nav-hamburger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink-soft);
  border-radius: 999px;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), opacity 0.2s, background 0.2s;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); background: var(--accent); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); background: var(--accent); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 58px;
  left: 0; right: 0;
  background: rgba(11,16,32,0.97);
  backdrop-filter: blur(16px);
  border-bottom: 0.5px solid var(--border);
  z-index: 99;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), opacity 0.25s ease;
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu ul {
  list-style: none;
  padding: 0.75rem 0 1rem;
}
.mobile-menu ul li a {
  display: block;
  padding: 0.85rem 2rem;
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s, padding-left 0.2s;
  border-left: 2px solid transparent;
}
.mobile-menu ul li a:hover {
  color: var(--accent);
  padding-left: 2.4rem;
  border-left-color: var(--accent);
}

/* ============================================================
   CV DOWNLOAD BUTTON
   ============================================================ */
.btn-cv {
  background: transparent;
  color: var(--ink-soft);
  border: 0.5px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
}
.btn-cv:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(57,208,255,0.06);
  box-shadow: 0 0 16px rgba(57,208,255,0.12);
}
.btn-cv svg {
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
}
.btn-cv:hover svg {
  transform: translateY(2px);
}

/* ============================================================
   HERO SOCIAL LINKS
   ============================================================ */
.hero-social {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  opacity: 0;
  animation: heroFadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.72s forwards;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  text-decoration: none;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  border: 0.5px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.social-link:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  background: rgba(24,38,74,0.55);
}

@media (max-width: 640px) {
  .certificate-card {
    grid-template-columns: 1fr;
  }
  .certificate-art {
    min-height: 390px;
    padding: 2rem 1.15rem;
  }
  .certificate-title {
    font-size: 2.45rem;
  }
  .certificate-subtitle {
    font-size: 1.1rem;
  }
  .certificate-name {
    font-size: 1.95rem;
  }
  .certificate-copy {
    font-size: 0.78rem;
  }
  .certificate-signatures {
    width: 100%;
    font-size: 0.58rem;
  }
  .certificate-info {
    border-left: 0;
    border-top: 1px solid rgba(133, 164, 230, 0.18);
  }
  .about-grid { grid-template-columns: 1fr; }
  .contact-box { padding: 2rem 1.5rem; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .mobile-menu { display: block; }
  .hero-shape { display: none; }
  .bg-orb {
    opacity: 0.18;
    filter: blur(14px);
  }
  .orb-1 {
    width: 210px;
    height: 210px;
  }
  .orb-2 {
    width: 170px;
    height: 170px;
  }
  .orb-3 {
    width: 220px;
    height: 220px;
  }
  body::before,
  body::after {
    width: 320px;
    height: 320px;
    filter: blur(45px);
  }
  .hero {
    min-height: auto;
    padding-top: 6rem;
    padding-bottom: 3.5rem;
  }
  .hero-profile {
    width: 126px;
    height: 126px;
  }
  .hero-profile-img {
    width: 116px;
    height: 116px;
  }
  .hero-desc {
    margin: 1.4rem 0 2rem;
  }
  .hero-meta {
    margin-top: 1rem;
  }
  .to-top {
    right: 0.95rem;
    bottom: 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-profile-ring {
    animation: none !important;
  }
  .bg-orb {
    animation: none !important;
  }
}