/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */
:root {
  /* Color */
  --bg: #0A0E16;
  --bg-alt: #0D1220;
  --surface: #11151F;
  --surface-2: #171C28;
  --border: #232A3A;
  --border-soft: #1A2030;

  --text: #E8ECF4;
  --text-dim: #8992A8;
  --text-faint: #545C70;

  --accent: #5B8CFF;
  --accent-soft: rgba(91, 140, 255, 0.12);
  --accent-2: #4FD8C4;
  --accent-2-soft: rgba(79, 216, 196, 0.12);

  --success: #4FD8A8;
  --warn: #FFB86B;

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --max-width: 1180px;
  --section-pad: 128px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 768px) {
  :root {
    --section-pad: 80px;
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.mono { font-family: var(--font-mono); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #05070c;
  padding: 10px 16px;
  z-index: 999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   LAYOUT HELPERS
   ========================================================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

section {
  padding: var(--section-pad) 0;
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px var(--accent-2-soft);
  display: inline-block;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--text);
  color: #05070c;
}
.btn-primary:hover {
  background: var(--accent);
  color: #05070c;
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-text {
  color: var(--text-dim);
  padding: 13px 8px;
}
.btn-text:hover { color: var(--text); }

.btn-sm { padding: 9px 16px; font-size: 13.5px; }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 14, 22, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled {
  border-bottom-color: var(--border-soft);
  background: rgba(10, 14, 22, 0.85);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nav-logo-dot { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 14.5px;
  color: var(--text-dim);
}
.nav-links a:hover { color: var(--text); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: min(320px, 80vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 99;
  padding: 100px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 17px;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a:not(.btn) { color: var(--text-dim); }
.mobile-menu .btn { margin-top: 12px; }

@media (max-width: 900px) {
  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: flex; }
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.9;
}
.pipeline-svg {
  width: 100%;
  height: 100%;
}
#pipePath {
  animation: dashFlow 18s linear infinite;
}
@keyframes dashFlow {
  to { stroke-dashoffset: -400; }
}
.pipe-nodes circle {
  animation: nodePulse 3s ease-in-out infinite;
}
.pipe-nodes circle:nth-child(2) { animation-delay: 0.4s; }
.pipe-nodes circle:nth-child(3) { animation-delay: 0.8s; }
.pipe-nodes circle:nth-child(4) { animation-delay: 1.2s; }
.pipe-nodes circle:nth-child(5) { animation-delay: 1.6s; }
@keyframes nodePulse {
  0%, 100% { r: 5; opacity: 1; }
  50% { r: 7; opacity: 0.6; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
}

.hero-title {
  font-size: clamp(48px, 8vw, 84px);
  margin-bottom: 6px;
  opacity: 0;
  animation: riseIn 0.8s var(--ease) 0.1s forwards;
}

.hero-role {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 24px;
  opacity: 0;
  animation: riseIn 0.8s var(--ease) 0.22s forwards;
}

.hero-sub {
  max-width: 620px;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-dim);
  margin-bottom: 28px;
  opacity: 0;
  animation: riseIn 0.8s var(--ease) 0.34s forwards;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-faint);
  margin-bottom: 40px;
  opacity: 0;
  animation: riseIn 0.8s var(--ease) 0.44s forwards;
}
.hero-meta .sep { color: var(--border); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 44px;
  opacity: 0;
  animation: riseIn 0.8s var(--ease) 0.54s forwards;
}

.hero-socials {
  display: flex;
  gap: 20px;
  color: var(--text-dim);
  opacity: 0;
  animation: riseIn 0.8s var(--ease) 0.64s forwards;
}
.hero-socials a:hover { color: var(--accent); }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 20px;
  z-index: 1;
}
.scroll-cue span {
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  animation: scrollCue 1.8s ease-in-out infinite;
}
@keyframes scrollCue {
  0% { opacity: 1; top: 7px; }
  70% { opacity: 0; top: 16px; }
  100% { opacity: 0; top: 7px; }
}

@media (max-width: 640px) {
  .scroll-cue { display: none; }
}

/* ==========================================================================
   SECTION TITLES / SHARED
   ========================================================================== */
.section-title {
  font-size: clamp(28px, 4vw, 42px);
  max-width: 700px;
  margin-bottom: 20px;
}
.section-sub {
  color: var(--text-dim);
  max-width: 560px;
  margin-bottom: 48px;
  font-size: 16px;
}
.text-dim { color: var(--text-dim); }
.text-faint { color: var(--text-faint); font-size: 13px; }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: var(--surface);
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about { border-top: 1px solid var(--border-soft); }
.about-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 72px;
  align-items: start;
}

.photo-frame {
  aspect-ratio: 4/5;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  position: relative;
}
.profile-photo { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder .profile-photo { display: none; }
.photo-placeholder::after {
  content: 'PK';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 64px;
  color: var(--text-faint);
}

.about-card {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: var(--surface);
  font-size: 13px;
}
.about-card-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  color: var(--text-dim);
}
.about-card-row span:first-child { color: var(--text-faint); }
.about-card-row span:last-child { color: var(--text); }
.about-card-row + .about-card-row { border-top: 1px solid var(--border-soft); }

.about-text p { color: var(--text-dim); margin-bottom: 16px; max-width: 620px; }
.about-text p:last-child { margin-bottom: 0; }

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 36px;
}
.highlight {
  display: flex;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.highlight-num { color: var(--accent); font-size: 13px; padding-top: 2px; }
.highlight h4 { font-size: 15px; margin-bottom: 6px; }
.highlight p { font-size: 13.5px; color: var(--text-dim); }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .photo-frame { max-width: 260px; }
  .about-highlights { grid-template-columns: 1fr; }
}

/* ==========================================================================
   EXPERIENCE / TIMELINE
   ========================================================================== */
.experience { border-top: 1px solid var(--border-soft); }

.timeline-item { display: flex; gap: 28px; }
.timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
}
.timeline-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  flex-shrink: 0;
}
.timeline-line { flex: 1; width: 1px; background: var(--border); margin-top: 8px; }

.timeline-content {
  flex: 1;
  padding-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  background: var(--surface);
}
.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.timeline-content h3 { font-size: 20px; margin-bottom: 4px; }
.timeline-company { color: var(--accent); font-size: 14px; }
.timeline-date {
  font-size: 12.5px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
}
.timeline-note {
  color: var(--text-faint);
  font-size: 13.5px;
  font-style: italic;
  margin-bottom: 16px;
}
.timeline-list { margin-bottom: 20px; }
.timeline-list li {
  position: relative;
  padding-left: 18px;
  color: var(--text-dim);
  font-size: 14.5px;
  margin-bottom: 10px;
  line-height: 1.55;
}
.timeline-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent-2);
}

/* ==========================================================================
   PROJECTS
   ========================================================================== */
.projects { border-top: 1px solid var(--border-soft); }

.project-list { display: flex; flex-direction: column; gap: 24px; }

.project-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.25s var(--ease);
}
.project-card:hover { border-color: var(--accent); }

.project-visual {
  position: relative;
  background: linear-gradient(135deg, var(--surface-2), var(--bg-alt));
  min-height: 220px;
}
.visual-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: var(--text-faint);
  font-size: 11px;
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 24px 24px;
}

.project-body { padding: 28px 32px; }
.project-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}
.project-head h3 { font-size: 19px; max-width: 480px; }
.project-links { display: flex; gap: 12px; color: var(--text-dim); flex-shrink: 0; }
.project-links a:hover { color: var(--accent); }
.project-links-pending {
  font-size: 11.5px;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.project-desc {
  color: var(--text-dim);
  font-size: 14.5px;
  margin-bottom: 20px;
  max-width: 620px;
}

@media (max-width: 860px) {
  .project-card { grid-template-columns: 1fr; }
  .project-visual { min-height: 160px; }
}

/* ==========================================================================
   SKILLS
   ========================================================================== */
.skills { border-top: 1px solid var(--border-soft); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.skill-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  background: var(--surface);
}
.skill-group h4 {
  font-size: 12.5px;
  color: var(--accent-2);
  margin-bottom: 16px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
@media (max-width: 900px) { .skills-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .skills-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   ACHIEVEMENTS
   ========================================================================== */
.achievements { border-top: 1px solid var(--border-soft); }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 40px;
}
.stat-box {
  background: var(--surface);
  padding: 32px 24px;
  text-align: center;
}
.stat-num {
  font-size: clamp(30px, 4vw, 44px);
  color: var(--text);
  font-weight: 600;
}
.stat-plus {
  font-size: clamp(20px, 3vw, 28px);
  color: var(--accent-2);
}
.stat-box p { font-size: 13px; color: var(--text-dim); margin-top: 8px; }

@media (max-width: 700px) { .stat-grid { grid-template-columns: 1fr 1fr; } }

.edu-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  background: var(--surface);
  flex-wrap: wrap;
}
.edu-card h4 { font-size: 17px; margin-bottom: 6px; }
.edu-date {
  font-size: 13px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ==========================================================================
   STRENGTHS
   ========================================================================== */
.strengths { border-top: 1px solid var(--border-soft); }
.strengths-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.strength-card {
  background: var(--surface);
  padding: 28px;
  transition: background 0.25s var(--ease);
}
.strength-card:hover { background: var(--surface-2); }
.strength-card h4 { font-size: 16px; margin-bottom: 10px; color: var(--text); }
.strength-card p { font-size: 13.5px; color: var(--text-dim); }

@media (max-width: 900px) { .strengths-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .strengths-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact { border-top: 1px solid var(--border-soft); }
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
}

.contact-form {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  background: var(--surface);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 8px;
  font-family: var(--font-mono);
}
.form-field input, .form-field textarea {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14.5px;
  resize: vertical;
  transition: border-color 0.2s var(--ease);
}
.form-field input:focus, .form-field textarea:focus {
  border-color: var(--accent);
  outline: none;
}
.form-submit { width: 100%; margin-top: 4px; }
.form-status { margin-top: 12px; font-size: 12.5px; text-align: center; min-height: 16px; }
.form-status.success { color: var(--accent-2); }
.form-status.error { color: #ff8080; }

.contact-info {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: fit-content;
}
.contact-info-row {
  display: flex;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  transition: background 0.2s var(--ease);
}
.contact-info-row:last-child { border-bottom: none; }
.contact-info-row:hover { background: var(--surface-2); }
.contact-info-row span:first-child { color: var(--text-faint); font-size: 12.5px; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 48px 0 32px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 32px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-soft);
}
.footer-links { display: flex; gap: 24px; font-size: 14px; color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }
.footer-socials { display: flex; gap: 20px; font-size: 14px; color: var(--text-dim); }
.footer-socials a:hover { color: var(--accent); }
.footer-copy { font-size: 12px; color: var(--text-faint); }

.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.25s var(--ease);
  z-index: 50;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { color: var(--accent); border-color: var(--accent); }

/* ==========================================================================
   SCROLL REVEAL
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

.nav-links a.active { color: var(--text); }
