/* ========== IMPORTS ========== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ========== CSS VARIABLES ========== */
:root {
  --bg-primary: #070b14;
  --bg-secondary: #0d1225;
  --bg-card: #111833;
  --bg-card-hover: #162040;
  --border-color: rgba(79, 110, 247, 0.15);
  --border-color-hover: rgba(79, 110, 247, 0.35);
  --accent: #4f6ef7;
  --accent-hover: #6b85ff;
  --accent-glow: rgba(79, 110, 247, 0.25);
  --text-primary: #e8ecf4;
  --text-secondary: #8b95b0;
  --text-muted: #5a6480;
  --white: #ffffff;
  --success: #34d399;
  --gradient-accent: linear-gradient(135deg, #4f6ef7 0%, #7c5cfc 100%);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1200px;
  --nav-height: 72px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 40px rgba(79, 110, 247, 0.1);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; font-family: var(--font); }

/* ========== UTILITIES ========== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0 0; }
.section-label {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 16px;
}
.section-label::before {
  content: ''; width: 32px; height: 2px; background: var(--accent); display: block;
}
.section-title {
  font-size: 2rem; font-weight: 700; color: var(--text-primary); margin-bottom: 48px;
}

/* Fade-in animation */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ========== NAVBAR ========== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height);
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between; height: 100%;
}
.nav-logo {
  font-size: 1.35rem; font-weight: 800; color: var(--white);
  display: flex; align-items: center; gap: 0;
}
.nav-logo img { height: 36px; width: auto; }
.nav-logo .brace { color: var(--white); }
.nav-logo .next { color: var(--white); }
.nav-logo .line { color: #e53e3e; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-size: 0.9rem; font-weight: 500; color: var(--text-secondary);
  transition: var(--transition); position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--accent); border-radius: 1px;
}
.nav-cta {
  padding: 10px 24px; background: linear-gradient(135deg, #4f6ef7 0%, #7c5cfc 100%);
  color: var(--white); font-weight: 600; font-size: 0.9rem;
  border-radius: var(--radius-sm); transition: var(--transition);
}
.nav-cta:hover { background: linear-gradient(135deg, #6b85ff 0%, #9b7eff 100%); }

/* Mobile menu button */
.nav-toggle {
  display: none; background: none; border: none;
  flex-direction: column; gap: 5px; cursor: pointer; padding: 4px;
}
.nav-toggle span {
  width: 24px; height: 2px; background: var(--text-primary);
  transition: var(--transition); display: block;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ========== HERO ========== */
.hero {
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 60px;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-content { position: relative; z-index: 1; }
.hero-greeting {
  font-size: 1.2rem; font-weight: 500; color: var(--accent); margin-bottom: 16px;
}
.hero-title {
  font-size: 4.2rem; font-weight: 800; line-height: 1.12; margin-bottom: 24px;
}
.hero-title .accent {
  background: linear-gradient(135deg, #4f6ef7 0%, #7c5cfc 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.1rem; color: var(--text-secondary); line-height: 1.7;
  margin-bottom: 36px; max-width: 520px;
}
.hero-ctas { display: flex; gap: 16px; margin-bottom: 40px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; background: linear-gradient(135deg, #4f6ef7 0%, #7c5cfc 100%);
  color: var(--white); font-weight: 600; font-size: 0.95rem;
  border-radius: var(--radius-sm); transition: var(--transition);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #6b85ff 0%, #9b7eff 100%);
}
.btn-icon {
  font-size: 1.5em;
}
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; background: transparent;
  color: var(--white); font-weight: 600; font-size: 0.95rem;
  border: 1px solid var(--border-color-hover); border-radius: var(--radius-sm);
  transition: var(--transition);
}
.btn-secondary:hover {
  background: rgba(79, 110, 247, 0.08);
  border-color: var(--accent);
}
.hero-badges { display: flex; gap: 24px; flex-wrap: wrap; }
.hero-badge {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--text-secondary);
}
.hero-badge svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }

/* Hero image area */
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-photo-wrapper {
  position: relative; width: 380px; height: 420px;
  border-radius: 24px; overflow: hidden;
  background: var(--bg-card);
  border: 2px solid rgba(79, 110, 247, 0.4);
  box-shadow:
    0 0 30px rgba(79, 110, 247, 0.15),
    0 0 60px rgba(79, 110, 247, 0.08),
    0 4px 24px rgba(0, 0, 0, 0.3);
}
.hero-photo-wrapper img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
}
.hero-code-badge {
  position: absolute; top: 20px; left: -20px;
  width: 56px; height: 56px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 1.2rem; font-weight: 700;
  box-shadow: var(--shadow-card);
}
.availability-badge {
  position: absolute; bottom: 20px; right: -20px;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 500; color: var(--text-primary);
  box-shadow: var(--shadow-card);
  white-space: nowrap;
}
.availability-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
}

/* ========== SERVICES ========== */
.services {
  background: transparent;
  padding: 0;
}
.services .container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.services-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
}
.service-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 48px 36px;
  position: relative;
}
.service-card:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 2px;
  background: var(--border-color);
}
.service-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
}
.service-icon {
  width: 56px; height: 56px;
  background: none;
  border: none;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.service-icon svg {
  width: 40px; height: 40px;
  stroke: url(#service-gradient);
}
.service-card h3 {
  font-size: 0.95rem; font-weight: 700; color: var(--text-primary);
  margin: 0; line-height: 1.4;
}
.service-card p {
  font-size: 0.85rem; color: var(--text-secondary); line-height: 1.7;
}

/* ========== PROJECTS ========== */
.projects-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 48px;
}
.projects-header .section-title { margin-bottom: 0; }
.view-all {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent); font-size: 0.9rem; font-weight: 500;
  transition: var(--transition);
}
.view-all:hover { gap: 10px; }
.projects-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}
.project-card:hover {
  border-color: var(--border-color-hover);
}
.project-image {
  width: 100%; height: 200px; overflow: hidden;
  background: var(--bg-secondary);
}
.project-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-image img { transform: scale(1.05); }
.project-info { padding: 24px; }
.project-info h3 {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 6px;
}
.project-type {
  font-size: 0.82rem; color: var(--accent); font-weight: 500; margin-bottom: 10px;
}
.project-desc {
  font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.project-tag {
  padding: 4px 12px; background: rgba(79, 110, 247, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 6px; font-size: 0.78rem; color: var(--text-secondary);
  font-weight: 500;
}
.project-link {
  position: absolute; top: 4px; right: 4px; z-index: 2;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: var(--transition);
}
.project-link svg { width: 20px; height: 20px; }
.project-card:hover .project-link { color: var(--accent); border-color: var(--accent); }

/* ========== BOTTOM SECTION (About + Tech + Contact) ========== */
.bottom-section {
  background: transparent;
  border-top: none;
  padding-bottom: 0;
}
.bottom-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px;
}
.bottom-card {
  padding: 36px; border-radius: var(--radius);
}
.bottom-card h3 {
  font-size: 1.2rem; font-weight: 700; margin-bottom: 16px;
}
.card-heading {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.card-heading svg {
  width: 22px; height: 22px; color: var(--accent); flex-shrink: 0;
}
.card-heading h3 { margin-bottom: 0; }

/* About card */
.about-card { background: transparent; border: none; border-radius: 0; position: relative; }
.about-card::after {
  content: ''; position: absolute; right: 0; top: 15%; height: 70%;
  width: 2px; background: var(--border-color);
}
.about-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 24px; }
.about-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px; border: 1px solid var(--border-color-hover);
  border-radius: var(--radius-sm); font-size: 0.88rem; font-weight: 500;
  color: var(--text-primary); transition: var(--transition);
}
.about-link:hover { background: rgba(79, 110, 247, 0.08); border-color: var(--accent); }

/* Tech stack card */
.tech-card { background: transparent; border: none; }
.tech-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px;
}
.tech-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.tech-icon {
  width: 56px; height: 56px; border-radius: 10px;
  background: rgba(79, 110, 247, 0.08);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.tech-icon svg { width: 36px; height: 36px; }
.tech-icon img { width: 36px; height: 36px; }
.tech-item:hover .tech-icon { background: rgba(79, 110, 247, 0.15); }
.tech-item span { font-size: 0.75rem; color: var(--text-secondary); font-weight: 500; }
.tech-more {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent); font-size: 0.88rem; font-weight: 500;
  transition: var(--transition);
}
.tech-more:hover { gap: 10px; }

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.contact-card::before {
  content: '';
  position: absolute; top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: rgba(79, 110, 247, 0.05);
  border-radius: 50%;
}
.contact-card p {
  font-size: 0.9rem; color: var(--text-secondary);
  line-height: 1.7; margin-bottom: 24px;
}
.contact-info { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.contact-info-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.88rem; color: var(--text-primary);
}
.contact-info-item svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent); opacity: 0.8; }
.contact-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px 28px;
  background: linear-gradient(135deg, #4f6ef7 0%, #7c5cfc 100%);
  color: var(--white);
  font-weight: 600; font-size: 0.95rem;
  border-radius: var(--radius-sm); transition: var(--transition);
  margin-top: auto;
}
.contact-btn:hover { background: linear-gradient(135deg, #6b85ff 0%, #9b7eff 100%); }

/* ========== CONTACT FORM SECTION ========== */
.contact-section { position: relative; }
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start;
}
.contact-left h2 { font-size: 2.2rem; font-weight: 700; margin-bottom: 16px; }
.contact-left p { font-size: 1rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 32px; }
.contact-details { display: flex; flex-direction: column; gap: 20px; }
.contact-detail {
  display: flex; align-items: center; gap: 16px;
}
.contact-detail-icon {
  width: 48px; height: 48px; border-radius: 10px;
  background: rgba(79, 110, 247, 0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); flex-shrink: 0;
}
.contact-detail-text h4 { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; margin-bottom: 2px; }
.contact-detail-text p, .contact-detail-text a {
  font-size: 0.95rem; color: var(--text-primary); font-weight: 500; margin-bottom: 0;
}
.contact-detail-text a:hover { color: var(--accent); }

/* Contact form */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 36px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 0.85rem; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 8px;
}
.form-group input,
.form-group textarea {
  width: 100%; padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 0.9rem;
  font-family: var(--font);
  transition: var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-submit {
  width: 100%; padding: 14px 28px; background: linear-gradient(135deg, #4f6ef7 0%, #7c5cfc 100%);
  color: var(--white); font-weight: 600; font-size: 0.95rem;
  border-radius: var(--radius-sm); transition: var(--transition);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.form-submit:hover { background: linear-gradient(135deg, #6b85ff 0%, #9b7eff 100%); }

/* ========== EXPERIENCE TIMELINE ========== */
.experience { position: relative; }
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: ''; position: absolute; left: 15px; top: 0; bottom: 0;
  width: 2px; background: var(--border-color);
}
.timeline-item { position: relative; margin-bottom: 48px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute; left: -30px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg-primary);
}
.timeline-item.current .timeline-dot {
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.timeline-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px; flex-wrap: wrap; gap: 8px;
}
.timeline-header h3 { font-size: 1.1rem; font-weight: 700; }
.timeline-date {
  font-size: 0.82rem; color: var(--accent); font-weight: 500;
}
.timeline-company {
  font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 12px;
}
.timeline-desc { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; }
.timeline-desc li { margin-bottom: 6px; padding-left: 16px; position: relative; }
.timeline-desc li::before {
  content: '•'; position: absolute; left: 0; color: var(--accent);
}
.timeline-stack {
  margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px;
}
.timeline-stack .project-tag { font-size: 0.72rem; }

/* ========== FOOTER ========== */
.footer {
  border-top: 1px solid var(--border-color);
  margin-top: 100px;
  padding: 32px 0;
}
.footer .container {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer-logo {
  font-size: 1.1rem; font-weight: 800;
  display: flex; align-items: center; gap: 0;
}
.footer-logo .brace { color: var(--white); }
.footer-logo .next { color: var(--white); }
.footer-logo .line { color: #e53e3e; }
.footer-copy { font-size: 0.82rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-size: 0.85rem; color: var(--text-secondary); transition: var(--transition);
}
.footer-links a:hover { color: var(--white); }
.footer-socials { display: flex; gap: 16px; }
.footer-socials a {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: var(--transition);
}
.footer-socials a:hover { color: var(--accent); border-color: var(--accent); }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .hero-title { font-size: 3.2rem; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card:nth-child(2)::after { display: none; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .bottom-grid { grid-template-columns: 1fr; }
  .about-card::after { display: none; }
  .bottom-card { text-align: center; }
  .card-heading { justify-content: center; }
  .tech-grid { justify-items: center; }
  .about-link { margin: 0 auto; }
  .bottom-card { padding-left: 0; padding-right: 0; }
  .contact-card { margin: 0 auto; width: 100%; box-sizing: border-box; padding: 36px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { 
    display: none; position: fixed; top: var(--nav-height); left: 0; right: 0;
    background: var(--bg-secondary); border-bottom: 1px solid var(--border-color);
    flex-direction: column; padding: 24px; gap: 20px;
  }
  .nav-links.active { display: flex; }
  .nav-toggle { display: flex; }
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-content { order: 2; }
  .hero-visual { order: 1; }
  .hero-title { font-size: 2.5rem; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-badges { justify-content: center; }
  .hero-photo-wrapper { width: 280px; height: 320px; }
  .availability-badge { right: -10px; bottom: 10px; font-size: 0.75rem; }
  .hero-code-badge { left: -10px; top: 10px; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card::after { display: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer .container { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .section { padding: 60px 0; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .hero-photo-wrapper { width: 220px; height: 260px; }
  .container { padding: 0 16px; }
}
