* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

:root {
  --bg-primary: #0a0f0a;
  --bg-secondary: #121a12;
  --bg-card: #1a241a;
  --accent: #22c55e;
  --accent-glow: rgba(34, 197, 94, 0.4);
  --accent-secondary: #10b981;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(34, 197, 94, 0.15);
  --gradient: linear-gradient(135deg, var(--accent), var(--accent-secondary));
}

html {
  scroll-behavior: smooth;
}

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

.cursor, .cursor-follower {
  display: none;
}

@media (pointer: fine) {
  .cursor {
    display: block;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
  }
  
  .cursor-follower {
    display: block;
    width: 32px;
    height: 32px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease, width 0.2s, height 0.2s;
  }
  
  .cursor-follower.hover {
    width: 48px;
    height: 48px;
    background: var(--accent-glow);
  }
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-bracket {
  color: var(--accent);
}

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

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 20%, var(--accent-glow) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(6, 182, 212, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-greeting {
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.hero-name {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glitch {
  position: relative;
  animation: glitch-skew 5s infinite;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  -webkit-background-clip: text;
  background-clip: text;
}

.glitch::before {
  left: 3px;
  text-shadow: -3px 0 #22c55e;
  animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

.glitch::after {
  left: -3px;
  text-shadow: 3px 0 #10b981;
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% { 
    clip-path: inset(40% 0 61% 0);
    transform: translate(-3px, 2px);
  }
  20% { 
    clip-path: inset(92% 0 1% 0);
    transform: translate(3px, -2px);
  }
  40% { 
    clip-path: inset(43% 0 1% 0);
    transform: translate(-3px, 2px);
  }
  60% { 
    clip-path: inset(25% 0 58% 0);
    transform: translate(3px, -2px);
  }
  80% { 
    clip-path: inset(54% 0 7% 0);
    transform: translate(-3px, 2px);
  }
  100% { 
    clip-path: inset(58% 0 43% 0);
    transform: translate(3px, -2px);
  }
}

@keyframes glitch-anim-2 {
  0% { 
    clip-path: inset(65% 0 15% 0);
    transform: translate(3px, -2px);
  }
  20% { 
    clip-path: inset(12% 0 23% 0);
    transform: translate(-3px, 2px);
  }
  40% { 
    clip-path: inset(80% 0 5% 0);
    transform: translate(3px, -2px);
  }
  60% { 
    clip-path: inset(37% 0 51% 0);
    transform: translate(-3px, 2px);
  }
  80% { 
    clip-path: inset(91% 0 1% 0);
    transform: translate(3px, -2px);
  }
  100% { 
    clip-path: inset(15% 0 76% 0);
    transform: translate(-3px, 2px);
  }
}

@keyframes glitch-skew {
  0% { transform: skew(0deg); }
  1% { transform: skew(-2deg); }
  2% { transform: skew(0deg); }
  3% { transform: skew(1deg); }
  4% { transform: skew(0deg); }
  100% { transform: skew(0deg); }
}

.typing-container {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  height: 2rem;
}

.typing-cursor {
  animation: blink 1s infinite;
  color: var(--accent);
}

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

.hero-desc {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--accent-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.1);
}

.hero-visual {
  perspective: 1000px;
}

.code-window {
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  transform: rotateY(-5deg) rotateX(5deg);
  transition: transform 0.5s;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.code-window:hover {
  transform: rotateY(0) rotateX(0);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

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

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca40; }

.code-title {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.code-content {
  padding: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  overflow-x: auto;
}

.code-content .keyword { color: #c678dd; }
.code-content .class-name { color: #e5c07b; }
.code-content .function { color: #61afef; }
.code-content .param { color: #e06c75; }
.code-content .string { color: #98c379; }
.code-content .number { color: #d19a66; }
.code-content .boolean { color: #d19a66; }

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  animation: bounce 2s infinite;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.5rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
}

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

.about-image {
  position: relative;
}

.image-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--border);
}

.image-frame img {
  width: 100%;
  display: block;
  transition: transform 0.5s;
}

.image-frame:hover img {
  transform: scale(1.05);
}

.image-glow {
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s;
}

.image-frame:hover .image-glow {
  opacity: 0.2;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.about-text h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.about-stats {
  display: flex;
  gap: 3rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

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

.skill-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
}

.skill-icon svg {
  width: 100%;
  height: 100%;
}

.skill-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.skill-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.skill-level {
  height: 4px;
  background: var(--bg-secondary);
  border-radius: 2px;
  overflow: hidden;
}

.skill-bar {
  height: 100%;
  background: var(--gradient);
  border-radius: 2px;
  width: var(--level);
  transition: width 1s ease-out;
}

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s;
  position: relative;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-card.featured {
  grid-column: span 1;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.1));
  border-color: var(--accent);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.project-type {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.project-status {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-weight: 500;
}

.project-status.wip {
  background: rgba(234, 179, 8, 0.2);
  color: #fbbf24;
}

.project-link {
  color: var(--text-muted);
  transition: color 0.3s;
}

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

.project-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tech span {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: var(--bg-secondary);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.contact {
  text-align: center;
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
}

.contact-text {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s;
  min-width: 180px;
}

.contact-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.contact-card svg {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

.contact-card span:first-of-type {
  font-weight: 600;
}

.contact-handle {
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer {
  padding: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-visual {
    display: none;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .about-image {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .image-frame {
    max-width: 200px;
  }
  
  .about-stats {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.3s;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-link {
    font-size: 1.25rem;
  }
  
  .menu-toggle {
    display: flex;
    z-index: 1001;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  section {
    padding: 4rem 1rem;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-links {
    flex-direction: column;
    align-items: center;
  }
  
  .contact-card {
    width: 100%;
    max-width: 280px;
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

::selection {
  background: var(--accent);
  color: white;
}
