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

:root {
  --bg:        #0a0e17;
  --bg-card:   #111827;
  --bg-card2:  #1a2236;
  --accent:    #00d4ff;
  --accent2:   #7c3aed;
  --text:      #e2e8f0;
  --text-muted:#8892a4;
  --border:    #1e2d40;
  --font:      'Inter', sans-serif;
  --mono:      'JetBrains Mono', monospace;
  --radius:    12px;
  --nav-h:     64px;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }

/* ===================== NAV ===================== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: background 0.3s;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 2px;
}

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

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
}

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

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

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* ===================== HERO ===================== */
#hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: flex;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  gap: 4rem;
}

.hero-content { flex: 1; }

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

.hero-name {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.accent { color: var(--accent); font-weight: 600; }

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

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

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-primary:hover {
  background: #00b8d9;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.3);
}

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

.btn-outline:hover {
  background: rgba(0, 212, 255, 0.1);
  transform: translateY(-2px);
}

/* ===================== CODE BLOCK ===================== */
.hero-visual { flex: 1; display: flex; justify-content: center; }

.code-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card2);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

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

.code-body {
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.9;
  padding: 1.5rem;
  white-space: pre;
  overflow-x: auto;
}

.kw  { color: #c792ea; }
.fn  { color: #82aaff; }
.str { color: #c3e88d; }

/* ===================== ABOUT ===================== */
#about { background: var(--bg-card); }

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

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

.about-text strong { color: var(--text); }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--mono);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.skill-group-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 600;
}

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

/* ===================== TAGS ===================== */
.tag {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: var(--accent);
}

.tag.placeholder {
  background: rgba(136, 146, 164, 0.08);
  border-color: rgba(136, 146, 164, 0.2);
  color: var(--text-muted);
  font-style: italic;
}

.tag.small { font-size: 0.72rem; padding: 0.2rem 0.6rem; }

/* ===================== EXPERIENCE ===================== */
#experience { background: var(--bg-card); }

.timeline { position: relative; padding-left: 2rem; }

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 1px;
  height: calc(100% - 8px);
  background: var(--border);
}

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

.timeline-dot {
  position: absolute;
  left: -2.4rem;
  top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

.timeline-content {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.timeline-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.timeline-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.timeline-company {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--mono);
  display: block;
  margin-bottom: 1rem;
}

.timeline-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-bullets li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 1.2rem;
  position: relative;
}

.timeline-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ===================== TIMELINE SUB-ROLES ===================== */
.timeline-company-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.timeline-company-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.timeline-company-span {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

.timeline-subroles {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}

.timeline-subrole {
  position: relative;
}

.timeline-subrole::before {
  content: '';
  position: absolute;
  left: -1.4rem;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-card2);
  border: 1.5px solid var(--accent);
}

.timeline-subrole-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  padding-top: 0.25rem;
}

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(0, 212, 255, 0.08);
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-icon { font-size: 1.5rem; color: var(--accent); }

.icon-link {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: color 0.2s;
}

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

.project-title {
  font-size: 1rem;
  font-weight: 600;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex: 1;
  line-height: 1.7;
}

.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; }

/* ===================== CERTIFICATIONS ===================== */
.certs-row {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.certs-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.cert-issuer {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  font-weight: 600;
}

.cert-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.cert-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

.cert-expired {
  opacity: 0.45;
}

/* ===================== EDUCATION ===================== */
#education { background: var(--bg-card); }

.edu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.edu-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: border-color 0.2s;
}

.edu-card:hover { border-color: var(--accent); }

.edu-header { margin-bottom: 0.25rem; }

.edu-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.edu-field {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
}

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

.edu-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

.edu-award {
  font-size: 0.8rem;
  color: #f6c90e;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* ===================== CONTACT ===================== */
#contact { background: var(--bg-card); }

.contact-inner {
  text-align: center;
  max-width: 600px;
}

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

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

.social-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
  letter-spacing: 0.5px;
}

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

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

/* ===================== PLACEHOLDER STYLE ===================== */
.placeholder-note {
  color: #4a5568 !important;
  font-style: italic;
  font-size: 0.85rem !important;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  #hero {
    flex-direction: column;
    text-align: center;
    padding-top: calc(var(--nav-h) + 3rem);
    min-height: auto;
  }

  .hero-cta { justify-content: center; }
  .hero-visual { width: 100%; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
  .edu-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .skills-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
  .certs-grid { grid-template-columns: 1fr; }
}
