:root {
  --bg-color: #050505;
  --bg-gradient: radial-gradient(circle at 50% -20%, #1a1a2e, #050505 80%);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --accent-cyan: #00f0ff;
  --accent-purple: #8a2be2;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(12px);
  
  --font-sans: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;
}

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

body {
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 800; line-height: 1.2; }
a { color: inherit; text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--accent-cyan); }

/* Utilities */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}
.text-gradient {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.glow-box { box-shadow: 0 0 20px rgba(138, 43, 226, 0.3); }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; font-family: var(--font-display); font-weight: 600;
  color: var(--bg-color); background: var(--accent-cyan);
  border: none; border-radius: 8px; cursor: pointer; transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4); text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem;
}
.btn-primary:hover { background: #fff; box-shadow: 0 0 25px rgba(0, 240, 255, 0.7); transform: translateY(-2px); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; font-family: var(--font-display); font-weight: 600;
  color: var(--text-primary); background: transparent; border: 1px solid var(--accent-cyan);
  border-radius: 8px; cursor: pointer; transition: all 0.3s ease; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem;
}
.btn-secondary:hover { background: rgba(0, 240, 255, 0.1); box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.2); transform: translateY(-2px); }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-glow { 0% { box-shadow: 0 0 15px rgba(0, 240, 255, 0.2); } 50% { box-shadow: 0 0 30px rgba(0, 240, 255, 0.5); } 100% { box-shadow: 0 0 15px rgba(0, 240, 255, 0.2); } }
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }

.animate-fade-in { animation: fadeIn 1s ease forwards; }
.delay-100 { animation-delay: 100ms; opacity: 0; }
.delay-200 { animation-delay: 200ms; opacity: 0; }
.delay-300 { animation-delay: 300ms; opacity: 0; }

.grid-bg {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background-image: linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 50px 50px; z-index: -1; pointer-events: none; transform: scale(1.1);
}
.grid-bg::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 40vh;
  background: linear-gradient(to top, var(--bg-color), transparent);
}

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

/* Header */
.header { position: fixed; top: 0; left: 0; width: 100%; z-index: 100; padding: 1.5rem 0; transition: all 0.3s ease; }
.header.scrolled { padding: 1rem 0; background: rgba(5, 5, 5, 0.8); backdrop-filter: blur(16px); border-bottom: 1px solid var(--glass-border); box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5); }
.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 0.5rem; }
.logo-icon { color: var(--accent-cyan); filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.6)); }
.logo-text { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.5px; }
.nav-links { display: flex; gap: 2rem; }
.nav-link { font-size: 0.95rem; font-weight: 500; color: var(--text-secondary); position: relative; }
.nav-link::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--accent-cyan); transition: width 0.3s ease; box-shadow: 0 0 8px rgba(0, 240, 255, 0.6); }
.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { width: 100%; }

/* Hero */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 80px; position: relative; }
.hero-content { display: flex; flex-direction: column; gap: 4rem; align-items: center; width: 100%; }
.hero-visuals { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; width: 100%; align-items: center; }
.hero-text { text-align: center; max-width: 800px; display: flex; flex-direction: column; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 20px; font-size: 0.85rem; font-weight: 500; margin-bottom: 2rem; color: var(--text-secondary); }
.glow-dot { width: 8px; height: 8px; background: var(--accent-cyan); border-radius: 50%; box-shadow: 0 0 10px var(--accent-cyan); animation: pulse-glow 2s infinite; }
.hero-title { font-size: 4.5rem; margin-bottom: 1.5rem; line-height: 1.1; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 2.5rem; max-width: 100%; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; }
.portrait-wrapper { width: 100%; max-width: 500px; margin: 0 auto; }
.hacker-portrait { width: 100%; height: auto; border-radius: 20px; box-shadow: 0 0 20px rgba(138, 43, 226, 0.3); border: 1px solid rgba(0, 240, 255, 0.3); object-fit: cover; transition: transform 0.3s ease; }
.hacker-portrait:hover { transform: scale(1.02); }
.hero-visual { position: relative; width: 100%; max-width: 500px; margin: 0 auto; display: flex; justify-content: center; }
.visual-card { position: relative; z-index: 2; background: rgba(10, 10, 15, 0.8); border: 1px solid rgba(138, 43, 226, 0.4); transform: perspective(1000px) rotateY(-5deg) rotateX(5deg); transition: transform 0.5s ease; }
.visual-card:hover { transform: perspective(1000px) rotateY(0deg) rotateX(0deg); }
.card-header { display: flex; align-items: center; padding: 1rem; background: rgba(0, 0, 0, 0.5); border-bottom: 1px solid var(--glass-border); border-radius: 16px 16px 0 0; }
.window-controls { display: flex; gap: 0.5rem; }
.control { width: 12px; height: 12px; border-radius: 50%; }
.control.close { background: #ff5f56; }
.control.minimize { background: #ffbd2e; }
.control.maximize { background: #27c93f; }
.window-title { margin-left: auto; margin-right: auto; font-family: monospace; font-size: 0.85rem; color: var(--text-secondary); }
.card-body { padding: 2rem; overflow-x: auto; }
.code-snippet { font-family: 'Fira Code', monospace; font-size: 0.95rem; line-height: 1.5; }
.code-snippet .keyword { color: #ff7b72; }
.code-snippet .entity { color: #d2a8ff; }
.code-snippet .function { color: #79c0ff; }
.code-snippet .string { color: #a5d6ff; }
.floating-element { position: absolute; background: var(--glass-bg); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); padding: 0.5rem 1.5rem; border-radius: 30px; font-weight: 600; font-size: 0.9rem; color: var(--accent-cyan); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); z-index: 3; animation: float 6s ease-in-out infinite; }
.el-1 { top: -20px; right: 20px; animation-delay: 0s; }
.el-2 { bottom: 40px; left: -30px; animation-delay: 1s; }
.el-3 { bottom: -20px; right: 40px; animation-delay: 2s; }

/* Projects */
.projects { position: relative; z-index: 10; background: linear-gradient(to bottom, transparent, rgba(5, 5, 5, 0.9)); }
.section-header { display: flex; align-items: center; gap: 2rem; margin-bottom: 4rem; }
.section-title { font-size: 2.5rem; white-space: nowrap; }
.section-line { height: 1px; flex-grow: 1; background: linear-gradient(to right, var(--accent-cyan), transparent); opacity: 0.3; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 2.5rem; }
.project-card { display: flex; flex-direction: column; overflow: hidden; transition: all 0.4s ease; border-color: rgba(255, 255, 255, 0.05); }
.project-card:hover { transform: translateY(-10px); border-color: var(--accent-cyan); box-shadow: 0 10px 30px rgba(0, 240, 255, 0.15); }
.project-image { position: relative; height: 220px; overflow: hidden; }
.project-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.project-card:hover .project-image img { transform: scale(1.05); }
.project-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10, 10, 15, 0.8); display: flex; justify-content: center; align-items: center; gap: 1rem; opacity: 0; transition: opacity 0.3s ease; }
.project-card:hover .project-overlay { opacity: 1; }
.overlay-btn { width: 45px; height: 45px; border-radius: 50%; background: rgba(0, 240, 255, 0.1); border: 1px solid var(--accent-cyan); display: flex; justify-content: center; align-items: center; color: var(--accent-cyan); transition: all 0.3s ease; }
.overlay-btn:hover { background: var(--accent-cyan); color: var(--bg-color); box-shadow: 0 0 15px var(--accent-cyan); transform: scale(1.1); }
.project-info { padding: 2rem; flex-grow: 1; display: flex; flex-direction: column; }
.project-category { font-family: monospace; font-size: 0.85rem; color: var(--accent-purple); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 1px; }
.project-title { font-size: 1.4rem; margin-bottom: 1rem; transition: color 0.3s ease; }
.project-card:hover .project-title { color: var(--accent-cyan); }
.project-desc { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 1.5rem; flex-grow: 1; }
.project-tech { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tech-tag { font-size: 0.8rem; padding: 0.25rem 0.75rem; background: rgba(255, 255, 255, 0.05); border-radius: 20px; color: var(--text-primary); border: 1px solid transparent; transition: all 0.3s ease; }
.project-card:hover .tech-tag { border-color: rgba(138, 43, 226, 0.3); }

/* Contact */
.contact { position: relative; z-index: 10; padding-bottom: 8rem; }
.contact-wrapper { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; }
.contact-info { padding: 3rem; display: flex; flex-direction: column; }
.contact-info h3 { font-size: 1.8rem; margin-bottom: 1rem; color: var(--accent-cyan); }
.contact-info p { color: var(--text-secondary); margin-bottom: 3rem; }
.info-items { display: flex; flex-direction: column; gap: 2rem; margin-top: auto; }
.info-item { display: flex; align-items: center; gap: 1.5rem; }
.icon-wrapper { width: 50px; height: 50px; border-radius: 12px; background: rgba(138, 43, 226, 0.1); border: 1px solid rgba(138, 43, 226, 0.3); display: flex; justify-content: center; align-items: center; color: var(--accent-purple); box-shadow: 0 0 15px rgba(138, 43, 226, 0.2); }
.info-label { font-family: monospace; font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; display: block; margin-bottom: 0.2rem; }
.info-value { font-size: 1.1rem; font-weight: 500; color: var(--text-primary); margin: 0; }
.contact-form { padding: 3rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-family: monospace; font-size: 0.85rem; color: var(--accent-cyan); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 1px; }
.form-control { width: 100%; padding: 1rem; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--glass-border); border-radius: 8px; color: var(--text-primary); font-family: var(--font-sans); font-size: 1rem; transition: all 0.3s ease; }
.form-control:focus { outline: none; border-color: var(--accent-cyan); box-shadow: 0 0 10px rgba(0, 240, 255, 0.2); background: rgba(0, 0, 0, 0.5); }
.form-control::placeholder { color: rgba(255, 255, 255, 0.2); }
textarea.form-control { resize: vertical; min-height: 120px; }
.submit-btn { width: 100%; margin-top: 1rem; }

@media (max-width: 992px) {
  .hero-visuals, .contact-wrapper { grid-template-columns: 1fr; gap: 2rem; }
  .contact-wrapper { text-align: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .portrait-wrapper { max-width: 300px; margin: 0 auto; height: auto; }
  .visual-card { transform: none; margin-top: 0; width: 100%; box-sizing: border-box; }
}

/* Mobile Navigation Styles */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

@media (max-width: 768px) {
  .container { padding: 0 1.5rem; }
  
  .desktop-only { display: none; }
  .mobile-menu-btn { display: block; }
  
  .nav-links { 
    display: none; 
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .hero { min-height: auto; padding-top: 100px; padding-bottom: 2rem; align-items: flex-start; }
  .hero-content { gap: 1rem; }
  .hero-title { font-size: 2.2rem; margin-bottom: 1rem; }
  .hero-subtitle { margin-bottom: 1.5rem; }
  
  .hero-visual { padding-top: 0; }
  .card-body { padding: 1rem; }
  .code-snippet { font-size: 0.75rem; white-space: pre-wrap; word-wrap: break-word; }
  
  .floating-element { padding: 0.3rem 0.8rem; font-size: 0.75rem; }
  .el-1 { top: -10px; right: 10px; }
  .el-2 { bottom: 10px; left: 10px; }
  .el-3 { bottom: -10px; right: 10px; }
  
  .projects-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  
  .section-header { gap: 0.4rem; margin-bottom: 2rem; justify-content: space-between; }
  .section-title { font-size: 1.1rem; white-space: nowrap; line-height: 1.2; }
  .view-all-link { font-size: 0.75rem !important; }
  
  section { padding: 3rem 0; }
  
  .contact-wrapper { gap: 2rem; }
  .contact-info, .contact-form { padding: 1.5rem; }
}

