/* ===== SECTION BASE ===== */
.section {
  position: relative;
  padding: var(--section-padding);
  background: var(--bg-primary);
  z-index: 1;
}

.section + .section {
  margin-top: -60px;
  z-index: 2;
  border-top: 1px solid var(--border);
  border-radius: 32px 32px 0 0;
}

.section:nth-child(3) { z-index: 3; }
.section:nth-child(4) { z-index: 4; }
.section:nth-child(5) { z-index: 5; }
.section:nth-child(6) { z-index: 6; }
.section:nth-child(7) { z-index: 7; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
  border-radius: 0;
  margin-top: 0;
  border-top: none;
}

.hero + .section {
  z-index: 2;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.15;
}

.hero-content {
  position: relative;
  z-index: 1;
}

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

.hero-name {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -1px;
}

.hero-name .cursor {
  display: inline-block;
  width: 3px;
  height: 0.9em;
  background: var(--text-primary);
  margin-left: 4px;
  animation: blink 1s step-end infinite;
  vertical-align: baseline;
}

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

.hero-title {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  z-index: 2;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  animation: float 2s ease-in-out infinite;
}

.hero-scroll span {
  display: block;
  margin-top: 8px;
  font-size: 1.2rem;
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
  align-items: start;
}

.about-text p {
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.about-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-image img {
  width: 100%;
  max-width: 320px;
  filter: grayscale(100%) contrast(1.1);
  transition: filter 0.5s ease, transform 0.5s ease;
  position: relative;
  z-index: 1;
}

.about-image img:hover {
  filter: grayscale(0%) contrast(1);
  transform: scale(1.02);
}

/* Decorative glow behind cutout */
.about-image::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim, rgba(255,255,255,0.06)) 0%, transparent 70%);
  z-index: 0;
}


.about-facts {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.about-fact {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 12px 16px;
  border: 1px solid var(--border);
}

.about-fact::before {
  content: '> ';
  color: var(--text-muted);
}

/* ===== EXPERIENCE ===== */
.timeline {
  position: relative;
  padding-left: 40px;
}

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

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -44px;
  top: 6px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--text-primary);
  background: var(--bg-primary);
  border-radius: 50%;
}

.timeline-role {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.timeline-company {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.timeline-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.timeline-desc li {
  margin-bottom: 6px;
  list-style: none;
  padding-left: 16px;
  position: relative;
}

.timeline-desc li::before {
  content: '-';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* Education */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.education-card {
  border: 1px solid var(--border);
  padding: 24px;
  transition: border-color var(--transition);
}

.education-card:hover {
  border-color: var(--border-light);
}

.education-card h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.education-card .institution {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.education-card .details {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Skills */
.skills-section {
  margin-top: 48px;
}

.skills-group {
  margin-bottom: 24px;
}

.skills-group h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ===== PROJECTS ===== */
.featured-project {
  border: 1px solid var(--border);
  padding: 40px;
  margin-bottom: 40px;
  transition: border-color var(--transition);
}

.featured-project:hover {
  border-color: var(--border-light);
}

.featured-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 12px;
  display: block;
}

.featured-project h3 {
  font-size: 1.75rem;
  margin-bottom: 8px;
}

.featured-project .subtitle {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.featured-project .description {
  color: var(--text-secondary);
  margin-bottom: 20px;
  max-width: 700px;
}

.featured-project .tech-tags {
  margin-bottom: 24px;
}

.featured-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.featured-highlights li {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  list-style: none;
  padding-left: 16px;
  position: relative;
}

.featured-highlights li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project-card {
  border: 1px solid var(--border);
  padding: 28px;
  transition: all var(--transition);
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--text-primary);
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.project-card p {
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.project-card .tech-tags {
  margin-bottom: 16px;
}

.project-card .card-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.project-card .card-link:hover {
  color: var(--text-primary);
  opacity: 1;
}

.project-card .card-link::after {
  content: ' ->';
}

/* ===== BLOG SECTION ===== */
.blog-posts {
  display: grid;
  gap: 24px;
}

.blog-card {
  border: 1px solid var(--border);
  padding: 28px;
  transition: all var(--transition);
}

.blog-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card);
}

.blog-card time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.blog-card h3 {
  font-size: 1.1rem;
  margin: 8px 0;
}

.blog-card p {
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.blog-card .card-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.blog-card .card-link:hover {
  color: var(--text-primary);
  opacity: 1;
}

.blog-card .card-link::after {
  content: ' ->';
}

.blog-section-footer {
  margin-top: 32px;
  text-align: center;
}

/* ===== EXPERIENCE FOOTER ===== */
.experience-section-footer {
  margin-top: 40px;
  text-align: center;
}

/* ===== RESUME BUTTON ===== */
.btn-resume {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ===== EXPERIENCE DETAIL PAGE ===== */
.experience-detail .post-back {
  display: inline-block;
  margin-bottom: 32px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.experience-detail .post-back::before {
  content: '<- ';
}

.experience-detail .post-back:hover {
  color: var(--text-primary);
}

.experience-detail {
  padding-top: 120px;
  padding-bottom: 80px;
  min-height: 100vh;
}

.experience-detail .skills-section {
  margin-top: 24px;
}

.certifications-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.certification-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
}

.certification-card h3 {
  font-size: 1rem;
  font-family: var(--font-mono);
  margin-bottom: 8px;
}

.certification-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.certification-card .card-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  transition: color var(--transition);
}

.certification-card .card-link:hover {
  color: var(--text-primary);
}

/* ===== CONTACT ===== */
.contact-terminal {
  border: 1px solid var(--border);
  padding: 40px;
  max-width: 600px;
}

.contact-terminal-header {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.contact-terminal-header .dots {
  display: flex;
  gap: 6px;
  margin-right: 12px;
}

.contact-terminal-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
}

.contact-line {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.contact-line .prompt {
  color: var(--text-muted);
}

.contact-line a {
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
}

.contact-line a:hover {
  opacity: 0.7;
}

.contact-socials {
  display: flex;
  gap: 20px;
  margin-top: 32px;
}

.contact-socials a {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.contact-socials a:hover {
  color: var(--text-primary);
  opacity: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .section + .section {
    margin-top: -30px;
    border-radius: 20px 20px 0 0;
  }

  .hero-name { font-size: 2.5rem; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    max-width: 250px;
    order: -1;
  }

  .about-image::before {
    display: none;
  }

  .about-image img.color-active {
    filter: grayscale(0%) contrast(1);
  }

  .about-facts {
    grid-template-columns: 1fr;
  }

  .featured-highlights {
    grid-template-columns: 1fr;
  }

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

  .education-grid {
    grid-template-columns: 1fr;
  }

  .hero-scroll {
    bottom: 80px;
  }
}

@media (max-width: 480px) {
  .hero-name { font-size: 2rem; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { text-align: center; }

  .featured-project {
    padding: 24px;
  }
}
