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

:root {
  --bg:          #07070f;
  --surface:     #0e0e1a;
  --card:        #12121e;
  --border:      #1c1c30;
  --border-glow: #3b3b6b;
  --purple:      #7c3aed;
  --purple-dim:  #4c1d95;
  --cyan:        #06b6d4;
  --cyan-dim:    #0e7490;
  --green:       #10b981;
  --text:        #e2e8f0;
  --text-muted:  #64748b;
  --text-dim:    #94a3b8;
  --font-mono:   'Space Mono', monospace;
  --font-sans:   'Inter', sans-serif;
}

html { scroll-behavior: smooth; }

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

/* ── Custom Cursor ───────────────────────────────────────────────── */
.cursor {
  width: 12px; height: 12px;
  background: var(--purple);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease, opacity 0.3s;
  mix-blend-mode: screen;
}
.cursor.expand { transform: scale(4); opacity: 0.4; }

/* ── Canvas Background ───────────────────────────────────────────── */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

/* ── Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--purple-dim); border-radius: 2px; }

/* ── Navigation ─────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  transition: background 0.4s, backdrop-filter 0.4s;
}
.nav.scrolled {
  background: rgba(7, 7, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 0.05em;
}
.blink {
  animation: blink 1.2s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.nav-links {
  list-style: none;
  display: flex; gap: 2rem;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--purple);
  transition: width 0.25s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 8rem 2rem 4rem;
  position: relative; z-index: 1;
  overflow: hidden;
}
.hero-noise {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-content {
  max-width: 1100px; margin: 0 auto; width: 100%;
}
.hero-pre {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cyan);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}
.hero-name {
  font-family: var(--font-mono);
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--text);
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

/* Glitch effect */
.hero-name::before,
.hero-name::after {
  content: attr(data-text);
  position: absolute; top: 0; left: 0;
  width: 100%;
}
.hero-name::before {
  color: var(--cyan);
  animation: glitch-1 3.5s infinite linear;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}
.hero-name::after {
  color: var(--purple);
  animation: glitch-2 3.5s infinite linear;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}
@keyframes glitch-1 {
  0%, 90%, 100% { transform: none; opacity: 0; }
  91%  { transform: translate(-3px, 1px) skewX(-5deg); opacity: 0.8; }
  93%  { transform: translate(3px, -1px) skewX(5deg);  opacity: 0.8; }
  95%  { transform: translate(-2px, 2px);               opacity: 0.8; }
  97%  { transform: none;                               opacity: 0; }
}
@keyframes glitch-2 {
  0%, 90%, 100% { transform: none; opacity: 0; }
  92%  { transform: translate(3px, 1px) skewX(3deg);  opacity: 0.7; }
  94%  { transform: translate(-3px, -1px) skewX(-3deg); opacity: 0.7; }
  96%  { transform: translate(1px, 2px);               opacity: 0.7; }
  98%  { transform: none;                              opacity: 0; }
}

.hero-roles {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  min-height: 2rem;
}
.role-static { color: var(--text-dim); margin-right: 0.5rem; }
.role-dynamic {
  color: var(--cyan);
  border-right: 2px solid var(--cyan);
  padding-right: 3px;
  animation: cursor-blink 0.75s step-end infinite;
}
@keyframes cursor-blink {
  0%, 100% { border-color: var(--cyan); }
  50%       { border-color: transparent; }
}
.hero-desc {
  max-width: 580px;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}
.highlight { color: var(--purple); font-weight: 600; }

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 4rem; }

.btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  padding: 0.8rem 1.8rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.25s;
  display: inline-block;
  cursor: none;
}
.btn-primary {
  background: var(--purple);
  color: #fff;
  border: 1px solid var(--purple);
}
.btn-primary:hover {
  background: transparent;
  color: var(--purple);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-glow);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--purple);
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.2);
}

.hero-scroll {
  display: flex; align-items: center; gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.scroll-line {
  width: 40px; height: 1px;
  background: linear-gradient(to right, var(--border-glow), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 50%; height: 100%;
  background: var(--purple);
  animation: scroll-anim 2s ease-in-out infinite;
}
@keyframes scroll-anim {
  0% { left: -100%; }
  100% { left: 200%; }
}

/* ── Sections ────────────────────────────────────────────────────── */
.section { padding: 7rem 2rem; position: relative; z-index: 1; }
.section-alt { background: rgba(14, 14, 26, 0.6); }

.container { max-width: 1100px; margin: 0 auto; }

.section-header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 3.5rem;
}
.section-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--purple);
  letter-spacing: 0.1em;
}
.section-title {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
}
.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

/* ── About ───────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 4rem;
  align-items: start;
}
.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 1.02rem;
  line-height: 1.85;
}
.about-text p:last-child { margin-bottom: 0; }

.edu-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex; gap: 1rem; align-items: flex-start;
  margin-bottom: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.edu-card:hover {
  border-color: var(--purple-dim);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.1);
}
.edu-icon { font-size: 1.5rem; flex-shrink: 0; }
.edu-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.edu-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.edu-meta { font-family: var(--font-mono); font-size: 0.78rem !important; }
.edu-location { font-size: 0.78rem !important; color: var(--text-muted); }

.status-badge {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 100px;
  padding: 0.5rem 1rem;
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--green);
  font-family: var(--font-mono);
}
.pulse-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  50%       { opacity: 0.7; box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

/* ── Skills ──────────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}
.skill-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.4rem;
  transition: border-color 0.3s, transform 0.3s;
}
.skill-group:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}
.skill-group-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.sg-icon { font-size: 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  background: rgba(28, 28, 48, 0.8);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-dim);
  transition: all 0.2s;
  cursor: default;
}
.tag:hover { border-color: var(--border-glow); color: var(--text); }
.tag-primary {
  border-color: rgba(124, 58, 237, 0.3);
  color: #a78bfa;
  background: rgba(124, 58, 237, 0.08);
}
.tag-primary:hover {
  background: rgba(124, 58, 237, 0.15);
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.3);
}
.tag-accent {
  border-color: rgba(6, 182, 212, 0.3);
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.08);
}
.tag-accent:hover {
  background: rgba(6, 182, 212, 0.15);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}

/* ── Timeline / Experience ───────────────────────────────────────── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--purple), var(--border), transparent);
}
.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.timeline-item.visible { opacity: 1; transform: none; }
.timeline-dot {
  position: absolute;
  left: -2.4rem;
  top: 1.2rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--purple);
  border: 2px solid var(--bg);
  box-shadow: 0 0 12px var(--purple);
}
.timeline-dot--dim {
  background: var(--border-glow);
  box-shadow: none;
}
.timeline-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.8rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.timeline-card:hover {
  border-color: rgba(124, 58, 237, 0.35);
  box-shadow: 0 4px 30px rgba(124, 58, 237, 0.08);
}
.tc-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap;
}
.tc-company {
  font-size: 1.1rem; font-weight: 600; color: var(--text);
  margin-bottom: 0.25rem;
}
.tc-sub { font-size: 0.82rem; color: var(--text-muted); font-weight: 400; }
.tc-role {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--purple);
  letter-spacing: 0.05em;
}
.tc-meta { text-align: right; flex-shrink: 0; }
.tc-date {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan);
  margin-bottom: 0.25rem;
}
.tc-location {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}
.tc-points {
  list-style: none; padding: 0;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.tc-points li {
  font-size: 0.92rem;
  color: var(--text-muted);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.75;
}
.tc-points li::before {
  content: '▸';
  position: absolute; left: 0;
  color: var(--purple);
  font-size: 0.75rem;
  top: 0.2rem;
}
.tc-points strong { color: var(--text-dim); font-weight: 600; }
.metric {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-weight: 700;
}

/* ── Projects ────────────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.75rem;
}
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.8rem;
  display: flex; flex-direction: column; gap: 1rem;
  opacity: 0; transform: translateY(24px);
  transition: border-color 0.3s, box-shadow 0.3s, opacity 0.6s, transform 0.6s;
  position: relative; overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--purple), var(--cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.project-card:hover::before { transform: scaleX(1); }
.project-card:hover {
  border-color: rgba(124, 58, 237, 0.35);
  box-shadow: 0 8px 40px rgba(124, 58, 237, 0.1);
}
.project-card.visible { opacity: 1; transform: none; }
.pc-top {
  display: flex; justify-content: space-between; align-items: center;
}
.pc-icon { font-size: 1.8rem; }
.pc-links { display: flex; gap: 0.75rem; }
.pc-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: none;
  display: flex; align-items: center; gap: 0.35rem;
  transition: color 0.2s;
  border: 1px solid var(--border);
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
}
.pc-link:hover { color: var(--text); border-color: var(--border-glow); }
.pc-link--live:hover { color: var(--cyan); border-color: var(--cyan-dim); }
.pc-title {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}
.pc-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.75; }
.pc-bullets {
  list-style: none; padding: 0;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.pc-bullets li {
  font-size: 0.84rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
}
.pc-bullets li::before {
  content: '–';
  position: absolute; left: 0;
  color: var(--purple);
}
.pc-bullets code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: rgba(124, 58, 237, 0.1);
  color: #c4b5fd;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}
.pc-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.25rem; }
.ptag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 100px;
  color: var(--cyan-dim);
  background: rgba(6, 182, 212, 0.06);
  color: #67e8f9;
}

/* ── Contact ─────────────────────────────────────────────────────── */
.contact-container { text-align: center; }
.contact-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 3rem;
  line-height: 1.8;
}
.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  text-align: left;
}
.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  display: flex; align-items: center; gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s, transform 0.25s, box-shadow 0.3s;
}
.contact-card:hover {
  border-color: var(--purple-dim);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.12);
}
.cc-icon {
  font-size: 1.2rem;
  width: 2.5rem; height: 2.5rem;
  background: rgba(124, 58, 237, 0.12);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--purple);
  font-family: var(--font-mono);
  font-weight: 700;
  flex-shrink: 0;
}
.cc-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.2rem;
}
.cc-val {
  font-size: 0.88rem;
  color: var(--text-dim);
}

/* ── Footer ──────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 2.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  position: relative; z-index: 1;
}
.footer-note {
  margin-top: 0.4rem;
  color: #2d2d4a;
  font-size: 0.72rem;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .tc-header   { flex-direction: column; }
  .tc-meta     { text-align: left; }
  .nav-links   { gap: 1.25rem; }
  .hero        { padding-top: 6rem; }
  .section     { padding: 5rem 1.25rem; }
  .timeline    { padding-left: 1.5rem; }
  .timeline-dot { left: -1.9rem; }
}
@media (max-width: 480px) {
  .nav-links { display: none; }
  .hero-cta  { flex-direction: column; }
  .btn       { text-align: center; }
}
