/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */
:root {
  --primary:      #1A3A5C;
  --accent:       #1A6FAF;
  --cyan:         #00d4ff;
  --dark-bg:      #0a0e1a;
  --dark-card:    #0d1b2e;
  --light-bg:     #f4f7fb;
  --white:        #ffffff;
  --text:         #1A1A1A;
  --text-muted:   #4A4A4A;
  --text-light:   #6b7280;
  --border:       rgba(26, 111, 175, 0.14);
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 2px 16px rgba(26, 58, 92, 0.08);
  --shadow-md:    0 8px 40px rgba(26, 58, 92, 0.13);
  --transition:   0.22s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 88px 0; }
.section-light    { background: var(--light-bg); }
.section-dark-alt { background: var(--dark-card); color: var(--white); }

/* ============================================================
   NAVIGATION
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 18px 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

#navbar.scrolled {
  padding: 12px 0;
  background: rgba(8, 12, 22, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(0, 212, 255, 0.08);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  transition: color var(--transition);
  letter-spacing: 0.2px;
}
.nav-link:hover { color: var(--white); }
.nav-cta { color: var(--cyan) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 201;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark-bg);
  overflow: hidden;
}

#embeddingCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 80px 24px 100px;
  max-width: 680px;
}

.hero-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid rgba(0,212,255,0.28);
  border-radius: 20px;
  padding: 6px 18px;
  margin-bottom: 28px;
  background: rgba(0,212,255,0.05);
}

.hero-name {
  font-size: clamp(44px, 8vw, 82px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.02;
  letter-spacing: -2.5px;
  margin-bottom: 22px;
  text-shadow: 0 0 80px rgba(0,212,255,0.12);
}

.hero-typewriter {
  font-size: clamp(15px, 2.2vw, 19px);
  color: rgba(255,255,255,0.6);
  margin-bottom: 18px;
  min-height: 1.65em;
  font-weight: 400;
}

#typewriter-text {
  color: var(--cyan);
  font-weight: 600;
}

.cursor {
  display: inline-block;
  color: var(--cyan);
  font-weight: 200;
  margin-left: 1px;
  animation: blink 1.05s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255,255,255,0.38);
  margin-bottom: 38px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255,255,255,0.28);
  animation: nudge 2.2s ease-in-out infinite;
  transition: color var(--transition);
}
.scroll-down:hover { color: var(--cyan); }
@keyframes nudge {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  line-height: 1;
}

.btn-primary {
  background: var(--cyan);
  color: var(--dark-bg);
}
.btn-primary:hover {
  background: #2ce0ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,212,255,0.32);
}

.btn-ghost {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.14);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,0.28);
}

.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid rgba(26,111,175,0.45);
}
.btn-outline-accent:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn-sm { padding: 8px 16px; font-size: 12.5px; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  text-align: center;
  margin-bottom: 52px;
}
.section-header h2 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -1px;
}
.section-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ============================================================
   SPECIALIZATION STRIP
   ============================================================ */
#specialization {
  background: var(--dark-card);
  padding: 64px 0;
  border-top: 1px solid rgba(0,212,255,0.07);
  border-bottom: 1px solid rgba(0,212,255,0.07);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.spec-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 28px 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(0,212,255,0.1);
  background: rgba(0,212,255,0.03);
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.spec-card:hover {
  border-color: rgba(0,212,255,0.28);
  background: rgba(0,212,255,0.06);
  transform: translateY(-3px);
}

.spec-icon {
  flex-shrink: 0;
  color: var(--cyan);
  margin-top: 2px;
}

.spec-body h3 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 7px;
}
.spec-body p {
  font-size: 13.5px;
  color: rgba(255,255,255,0.5);
  line-height: 1.55;
}

/* Stagger reveal for spec cards */
.spec-card:nth-child(1).reveal { transition-delay: 0.05s; }
.spec-card:nth-child(2).reveal { transition-delay: 0.15s; }
.spec-card:nth-child(3).reveal { transition-delay: 0.25s; }

/* ============================================================
   PROJECTS
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: start;
}

.project-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  border: 1.5px solid var(--border);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.project-card:hover {
  border-color: rgba(26,111,175,0.45);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.project-card.featured {
  border-color: rgba(26,111,175,0.32);
  background: linear-gradient(140deg, #ffffff 0%, #edf4ff 100%);
}
.project-card.featured:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 44px rgba(26,111,175,0.18);
}

.project-badge {
  position: absolute;
  top: -1px; right: 20px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--white);
  background: var(--accent);
  padding: 4px 10px;
  border-radius: 0 0 8px 8px;
  letter-spacing: 0.3px;
}

.project-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.project-icon-wrap {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  background: var(--light-bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  border: 1px solid var(--border);
}
.project-card.featured .project-icon-wrap {
  background: rgba(26,111,175,0.08);
}

.project-header h3 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
}
.project-tagline {
  font-size: 12.5px;
  color: var(--text-light);
  margin-top: 4px;
}

.project-desc {
  list-style: disc;
  padding-left: 17px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tech-tags span {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(26,111,175,0.07);
  border: 1px solid rgba(26,111,175,0.18);
  border-radius: 4px;
  padding: 3px 8px;
  letter-spacing: 0.1px;
}

/* Stagger reveal for project cards */
.project-card:nth-child(1).reveal { transition-delay: 0.05s; }
.project-card:nth-child(2).reveal { transition-delay: 0.15s; }
.project-card:nth-child(3).reveal { transition-delay: 0.25s; }

/* ============================================================
   SKILLS
   ============================================================ */
#skills { background: var(--white); }

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

.skill-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  border: 1.5px solid var(--border);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.skill-card:hover {
  border-color: rgba(26,111,175,0.35);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.skill-icon {
  width: 36px; height: 36px;
  background: rgba(26,111,175,0.07);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.skill-card h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--primary);
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.skill-pills span {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 13px;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.skill-card:hover .skill-pills span {
  border-color: rgba(26,111,175,0.22);
}

/* Stagger reveal for skill cards */
.skill-card:nth-child(1).reveal { transition-delay: 0.05s; }
.skill-card:nth-child(2).reveal { transition-delay: 0.12s; }
.skill-card:nth-child(3).reveal { transition-delay: 0.19s; }
.skill-card:nth-child(4).reveal { transition-delay: 0.26s; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 36px;
  max-width: 820px;
  margin: 0 auto;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), rgba(26,111,175,0.15));
  border-radius: 2px;
}

.tl-item {
  position: relative;
  margin-bottom: 36px;
}
.tl-item:last-child { margin-bottom: 0; }

.tl-dot {
  position: absolute;
  left: -41px; top: 20px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(26,111,175,0.3);
  border: 2px solid var(--light-bg);
}
.tl-dot-accent {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(26,111,175,0.15);
}

.tl-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 28px;
  border: 1.5px solid var(--border);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.tl-card:hover {
  border-color: rgba(26,111,175,0.35);
  box-shadow: var(--shadow);
}
.tl-card-accent {
  border-color: rgba(26,111,175,0.28);
  background: linear-gradient(135deg, #ffffff 0%, #edf4ff 100%);
}

.tl-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.tl-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
}
.tl-company {
  font-size: 13.5px;
  color: var(--accent);
  font-weight: 500;
  margin-top: 3px;
  display: block;
}
.tl-date {
  font-size: 12.5px;
  color: var(--text-light);
  white-space: nowrap;
  font-weight: 500;
  background: var(--light-bg);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  align-self: flex-start;
}
.tl-card ul {
  list-style: disc;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.tl-card ul li {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ============================================================
   EDUCATION & CERTIFICATIONS
   ============================================================ */
.edu-cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  max-width: 900px;
  margin: 0 auto;
}

.subsection-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.edu-item { margin-bottom: 28px; }
.edu-item:last-child { margin-bottom: 0; }
.edu-item h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.edu-school {
  font-size: 13.5px;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 3px;
}
.edu-meta {
  font-size: 12.5px;
  color: var(--text-light);
  margin-bottom: 5px;
}
.edu-detail {
  font-size: 12.5px;
  color: var(--text-muted);
}

.cert-list { display: flex; flex-direction: column; gap: 22px; }
.cert-item { display: flex; align-items: flex-start; gap: 14px; }

.cert-badge {
  flex-shrink: 0;
  width: 38px; height: 38px;
  background: var(--primary);
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
}

.cert-body { flex: 1; }
.cert-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  line-height: 1.4;
}
.cert-meta {
  font-size: 12.5px;
  color: var(--accent);
  margin-bottom: 3px;
}
.cert-id {
  font-size: 11px;
  color: var(--text-light);
  font-family: 'Courier New', Courier, monospace;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-wrap {
  max-width: 660px;
  margin: 0 auto;
  text-align: center;
}
.about-wrap h2 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -1px;
  margin-bottom: 24px;
}
.about-wrap p {
  font-size: 15.5px;
  color: rgba(255,255,255,0.65);
  line-height: 1.8;
  margin-bottom: 18px;
}

.lang-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 32px 0 24px;
  flex-wrap: wrap;
}
.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.1);
  transition: border-color var(--transition), background var(--transition);
}
.lang-item:hover {
  border-color: rgba(0,212,255,0.28);
  background: rgba(0,212,255,0.05);
}
.lang-flag { font-size: 22px; }
.lang-item strong { display: block; font-size: 13.5px; color: var(--white); font-weight: 600; }
.lang-item span { font-size: 12px; color: rgba(255,255,255,0.45); }

.open-to {
  font-size: 14px !important;
  color: rgba(0,212,255,0.75) !important;
  font-style: italic;
  margin-top: 4px !important;
}

/* ============================================================
   FOOTER
   ============================================================ */
#contact {
  background: var(--dark-bg);
  padding: 64px 0 32px;
  border-top: 1px solid rgba(0,212,255,0.07);
}

.footer-top { text-align: center; margin-bottom: 44px; }
.footer-logo {
  font-size: 22px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.footer-tagline {
  font-size: 13.5px;
  color: rgba(255,255,255,0.38);
  margin-bottom: 32px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  padding: 10px 22px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.footer-link:hover {
  color: var(--white);
  border-color: var(--cyan);
  background: rgba(0,212,255,0.06);
}

.footer-bottom {
  text-align: center;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 12.5px;
  color: rgba(255,255,255,0.2);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 960px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
  .project-card.featured {
    grid-column: 1 / -1;
  }
  .project-card:nth-child(2).reveal { transition-delay: 0.05s; }
  .project-card:nth-child(3).reveal { transition-delay: 0.15s; }

  .spec-grid { gap: 16px; }
}

@media (max-width: 800px) {
  .edu-cert-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 680px) {
  section { padding: 64px 0; }

  /* Mobile nav overlay */
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 22, 0.97);
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 200;
  }
  .nav-links.open { display: flex; }
  .nav-links .nav-link { font-size: 22px; font-weight: 600; }
  .nav-toggle { display: flex; }

  .spec-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .spec-card:nth-child(1).reveal { transition-delay: 0s; }
  .spec-card:nth-child(2).reveal { transition-delay: 0.1s; }
  .spec-card:nth-child(3).reveal { transition-delay: 0.2s; }

  .projects-grid {
    grid-template-columns: 1fr;
  }
  .project-card.featured { grid-column: auto; }

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

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn { justify-content: center; }

  .timeline { padding-left: 24px; }
  .tl-dot { left: -30px; }
  .tl-card { padding: 20px; }

  .lang-row { gap: 10px; }
  .lang-item { padding: 10px 14px; }

  .footer-links { flex-direction: column; align-items: center; }
}

@media (max-width: 420px) {
  .hero-name { letter-spacing: -1.5px; }
  .project-card { padding: 22px 18px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .cursor { animation: none; opacity: 1; }
  .scroll-down { animation: none; }
  #embeddingCanvas { display: none; }
  html { scroll-behavior: auto; }
}
