:root {
  --bg-primary: #050b14;
  --bg-secondary: #070f1c;
  --bg-card: #0a1628;
  --accent-cyan: #00d4ff;
  --accent-green: #00ff88;
  --accent-orange: #ff6b35;
  --text-primary: #e2e8f0;
  --text-muted: #64748b;
  --border-glow: rgba(0,212,255,0.3);
  --mono: 'Share Tech Mono', monospace;
  --sans: 'Exo 2', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--sans);
  overflow-x: hidden;
}

/* CANVAS BACKGROUND */
#matrix-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.04;
  pointer-events: none;
}

/* SCANLINE OVERLAY */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,212,255,0.015) 2px,
    rgba(0,212,255,0.015) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* NAV */
nav {
  position: fixed;
  top: 0; width: 100%;
  z-index: 100;
  background: rgba(5,11,20,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,212,255,0.15);
  padding: 0 2rem;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-family: var(--mono);
  color: var(--accent-cyan);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

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

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

.nav-links a {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::before {
  content: '//';
  color: var(--accent-cyan);
  margin-right: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.nav-links a:hover { color: var(--accent-cyan); }
.nav-links a:hover::before { opacity: 1; }

/* HAMBURGER */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--accent-cyan);
  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-menu {
  display: none;
  flex-direction: column;
  background: rgba(5,11,20,0.98);
  border-top: 1px solid rgba(0,212,255,0.15);
  padding: 1rem 2rem;
  gap: 1rem;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.mobile-menu a:hover { color: var(--accent-cyan); }

/* SECTIONS */
section {
  position: relative;
  z-index: 2;
  padding: 5rem 2rem;
}

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

.section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent-green);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.section-title .accent { color: var(--accent-cyan); }

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

/* HERO */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent-green);
  border: 1px solid rgba(0,255,136,0.3);
  padding: 0.3rem 1rem;
  border-radius: 2px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.15em;
  animation: fadeInDown 0.6s ease forwards;
}

.hero-name {
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.5rem;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-name .first { color: var(--text-primary); }
.hero-name .last {
  color: var(--accent-cyan);
  text-shadow: 0 0 40px rgba(0,212,255,0.4);
}

.hero-title {
  font-family: var(--mono);
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  color: var(--text-muted);
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-title .pipe { color: var(--accent-cyan); margin: 0 0.5rem; }

.typing-text {
  font-family: var(--mono);
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  color: var(--accent-cyan);
  min-height: 1.5em;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s ease 0.5s both;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent-cyan);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-bio {
  max-width: 680px;
  margin: 0 auto 2.5rem;
  color: #94a3b8;
  font-size: 1rem;
  line-height: 1.7;
  animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s ease 0.7s both;
}

.btn-primary {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bg-primary);
  background: var(--accent-cyan);
  border: none;
  padding: 0.75rem 1.75rem;
  cursor: pointer;
  text-decoration: none;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: background 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: #fff;
  box-shadow: 0 0 20px rgba(0,212,255,0.5);
}

.btn-ghost {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: transparent;
  border: 1px solid rgba(0,212,255,0.4);
  padding: 0.75rem 1.75rem;
  cursor: pointer;
  text-decoration: none;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: background 0.2s, border-color 0.2s;
}

.btn-ghost:hover {
  background: rgba(0,212,255,0.1);
  border-color: var(--accent-cyan);
}

.hero-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  animation: fadeInUp 0.8s ease 0.8s both;
}

.hero-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.hero-link:hover { color: var(--accent-cyan); }
.hero-link svg { width: 16px; height: 16px; }

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: fadeIn 1s ease 1.5s both;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--accent-cyan), transparent);
  animation: scrollLine 1.5s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ABOUT */
#about { background: var(--bg-secondary); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: start;
}

.about-photo-wrap { position: relative; }

.about-photo-wrap::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: linear-gradient(135deg, var(--accent-cyan), transparent 60%);
  border-radius: 4px;
  z-index: -1;
}

.about-photo-wrap::after {
  content: '';
  position: absolute;
  top: 12px; left: 12px; right: -12px; bottom: -12px;
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 4px;
  z-index: -2;
}

.about-photo-wrap img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  border-radius: 4px;
  filter: grayscale(20%) contrast(1.05);
}

.photo-badge {
  position: absolute;
  bottom: -1rem; right: -1rem;
  background: var(--bg-card);
  border: 1px solid rgba(0,212,255,0.3);
  padding: 0.75rem 1rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
  line-height: 1.6;
}

.about-text p {
  color: #94a3b8;
  line-height: 1.8;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}

.about-text p strong { color: var(--accent-cyan); }

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.stat-box {
  border: 1px solid rgba(0,212,255,0.2);
  padding: 1rem;
  text-align: center;
  background: rgba(0,212,255,0.03);
  transition: border-color 0.3s, background 0.3s;
}

.stat-box:hover {
  border-color: var(--accent-cyan);
  background: rgba(0,212,255,0.07);
}

.stat-num {
  font-family: var(--mono);
  font-size: 1.6rem;
  color: var(--accent-cyan);
  display: block;
  font-weight: 700;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* SKILLS */
#skills { background: var(--bg-primary); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid rgba(0,212,255,0.1);
  padding: 1.5rem;
  border-radius: 2px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--accent-cyan);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s;
}

.skill-card:hover {
  border-color: rgba(0,212,255,0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,212,255,0.1);
}

.skill-card:hover::before { transform: scaleY(1); }

.skill-card-icon {
  width: 36px; height: 36px;
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.3);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.skill-card h3 {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: #94a3b8;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 0.2rem 0.5rem;
  letter-spacing: 0.05em;
}

/* EXPERIENCE */
#experience { background: var(--bg-secondary); }

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--accent-cyan), rgba(0,212,255,0.1));
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s, transform 0.5s;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-dot {
  position: absolute;
  left: -2.4rem; top: 0.25rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan);
}

.timeline-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent-green);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.timeline-company {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
}

.timeline-desc {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.7;
  padding: 1rem;
  border-left: 2px solid rgba(0,212,255,0.2);
  background: rgba(0,212,255,0.02);
}

.timeline-desc li {
  margin-bottom: 0.3rem;
  padding-left: 1em;
  position: relative;
  list-style: none;
}

.timeline-desc li::before {
  content: '>';
  color: var(--accent-cyan);
  position: absolute;
  left: 0;
  font-family: var(--mono);
}

/* EDUCATION */
#education { background: var(--bg-primary); }

.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid rgba(0,212,255,0.1);
  padding: 1.5rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  position: relative;
}

.edu-card:hover {
  border-color: rgba(0,212,255,0.4);
  box-shadow: 0 8px 30px rgba(0,212,255,0.08);
}

.edu-year {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent-green);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.edu-degree {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.edu-school {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* PROJECTS */
#projects { background: var(--bg-secondary); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid rgba(0,212,255,0.1);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  border-color: rgba(0,212,255,0.5);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,212,255,0.12);
}

.project-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  filter: grayscale(30%) brightness(0.8);
  transition: filter 0.3s;
}

.project-card:hover .project-img {
  filter: grayscale(0%) brightness(1);
}

.project-body { padding: 1.25rem; }

.project-num {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--accent-cyan);
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
}

.project-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.project-desc {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.project-link {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent-cyan);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(0,212,255,0.3);
  padding-bottom: 1px;
  transition: border-color 0.2s;
}

.project-link:hover { border-color: var(--accent-cyan); }

/* CONTACT */
#contact { background: var(--bg-primary); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  text-decoration: none;
  color: #94a3b8;
  transition: color 0.2s;
}

.contact-item:hover { color: var(--accent-cyan); }

.contact-icon {
  width: 40px; height: 40px;
  border: 1px solid rgba(0,212,255,0.2);
  background: rgba(0,212,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.3s, background 0.3s;
}

.contact-item:hover .contact-icon {
  border-color: var(--accent-cyan);
  background: rgba(0,212,255,0.1);
}

.contact-icon svg { width: 18px; height: 18px; }

.contact-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-value { font-size: 0.9rem; }

/* FORM */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent-cyan);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.form-input, .form-textarea {
  background: var(--bg-card);
  border: 1px solid rgba(0,212,255,0.15);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  border-radius: 2px;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.07);
}

.form-textarea { resize: vertical; min-height: 130px; }

.form-status {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.6rem 1rem;
  border-radius: 2px;
  display: none;
}

.form-status.success {
  display: block;
  color: var(--accent-green);
  background: rgba(0,255,136,0.06);
  border: 1px solid rgba(0,255,136,0.3);
}

.form-status.error {
  display: block;
  color: var(--accent-orange);
  background: rgba(255,107,53,0.06);
  border: 1px solid rgba(255,107,53,0.3);
}

/* FOOTER */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid rgba(0,212,255,0.1);
  padding: 2rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  position: relative;
  z-index: 2;
}

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

/* ANIMATIONS */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* GLITCH EFFECT */
.glitch { position: relative; }

.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  color: inherit;
  pointer-events: none;
}

.glitch::before {
  color: var(--accent-orange);
  animation: glitch1 3s infinite linear;
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.glitch::after {
  color: var(--accent-cyan);
  animation: glitch2 3s infinite linear;
  clip-path: polygon(0 66%, 100% 66%, 100% 100%, 0 100%);
}

@keyframes glitch1 {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-3px, 1px); }
  94% { transform: translate(3px, -1px); }
  96% { transform: translate(0); }
}

@keyframes glitch2 {
  0%, 90%, 100% { transform: translate(0); }
  93% { transform: translate(3px, 1px); }
  95% { transform: translate(-3px, -1px); }
  97% { transform: translate(0); }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-photo-wrap { max-width: 280px; margin: 0 auto; }
  .about-stats { grid-template-columns: repeat(3, 1fr); }

  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .form-row { grid-template-columns: 1fr; }

  section { padding: 4rem 1.25rem; }
}

@media (max-width: 480px) {
  .about-stats { grid-template-columns: 1fr 1fr; }
  .hero-links { flex-direction: column; align-items: center; gap: 1rem; }
}
