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

:root {
  --bg-primary: #0a0f1c;
  --bg-secondary: #111827;
  --bg-card: #1a2332;
  --bg-card-hover: #1f2b3d;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #38bdf8;
  --accent-dim: rgba(56, 189, 248, 0.1);
  --accent-glow: rgba(56, 189, 248, 0.3);
  --green: #4ade80;
  --red: #f87171;
  --yellow: #fbbf24;
  --border: #1e293b;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #7dd3fc;
}

ul {
  list-style: none;
}

/* ===== Navigation ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 15, 28, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
}

#navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent) !important;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-family: var(--font-mono);
  transition: color 0.2s;
  position: relative;
}

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

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a:hover::after {
  width: 100%;
}

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

.mobile-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
}

/* ===== Hero ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  padding: 120px 2rem 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content {
  flex: 1;
}

.hero-greeting {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-description {
  color: var(--text-secondary);
  max-width: 540px;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: #7dd3fc;
  color: var(--bg-primary);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent-dim);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1rem;
}

/* Terminal */
.hero-terminal {
  flex: 0 0 420px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.terminal-header {
  background: #1a1f2e;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.terminal-dot.red { background: var(--red); }
.terminal-dot.yellow { background: var(--yellow); }
.terminal-dot.green { background: var(--green); }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.terminal-body {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
}

.terminal-body .prompt {
  color: var(--green);
}

.terminal-body .cmd {
  color: var(--text-primary);
}

.terminal-body .output {
  color: var(--text-secondary);
  padding-left: 1rem;
}

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

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

/* ===== Sections ===== */
.section {
  padding: 100px 2rem;
}

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

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  max-width: 300px;
}

.section-number {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 400;
}

/* ===== About ===== */
.about-content {
  display: flex;
  gap: 3rem;
  align-items: start;
}

.about-text {
  flex: 1;
}

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

.about-image {
  flex: 0 0 250px;
}

.image-placeholder {
  width: 250px;
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border);
  transition: border-color 0.3s;
}

.image-placeholder:hover {
  border-color: var(--accent);
}

.image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Experience Timeline ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 2rem;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  z-index: 1;
}

.timeline-item:first-child .timeline-marker {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.timeline-header h3 {
  font-size: 1.2rem;
  color: var(--text-primary);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
}

.timeline-company {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.timeline-details {
  list-style: none;
}

.timeline-details li {
  color: var(--text-secondary);
  padding-left: 1.25rem;
  position: relative;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

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

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 0.3s, transform 0.3s;
}

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

.skill-category h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.cat-icon {
  color: var(--accent);
  margin-right: 0.5rem;
}

.skill-category li {
  color: var(--text-secondary);
  padding: 0.3rem 0;
  padding-left: 1rem;
  position: relative;
  font-size: 0.9rem;
}

.skill-category li::before {
  content: '~';
  position: absolute;
  left: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ===== Projects ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
}

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

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

.project-icon {
  font-size: 1.5rem;
}

.project-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  transition: all 0.2s;
}

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

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

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

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

.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.placeholder-card {
  border-style: dashed;
}

/* ===== Blog ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s;
}

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

.blog-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.blog-card h3 {
  font-size: 1.15rem;
  margin: 0.75rem 0;
  color: var(--text-primary);
}

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

.blog-read-more {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* ===== Contact ===== */
.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

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

.social-links {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.social-links a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.social-links a:hover {
  color: var(--accent);
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

/* ===== Scroll Animations ===== */
.section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(10, 15, 28, 0.95);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  #hero {
    flex-direction: column;
    padding-top: 100px;
    gap: 2rem;
    text-align: center;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-terminal {
    flex: none;
    width: 100%;
    max-width: 420px;
  }

  .about-content {
    flex-direction: column;
  }

  .about-image {
    flex: none;
    display: flex;
    justify-content: center;
  }

  .skills-grid,
  .projects-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .timeline-header {
    flex-direction: column;
  }
}
