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

:root {
  --bg:          #0F172A;
  --bg-2:        #111827;
  --bg-card:     #162032;
  --primary:     #1E3A8A;
  --blue:        #2563EB;
  --blue-dim:    rgba(37, 99, 235, 0.12);
  --blue-border: rgba(37, 99, 235, 0.25);
  --orange:      #EA580C;
  --orange-dim:  rgba(234, 88, 12, 0.10);
  --text:        #E2E8F0;
  --text-muted:  #94A3B8;
  --text-dim:    #475569;
  --border:      #1E2D4A;
  --border-hover:#2D4470;
  --green:       #22C55E;
  --yellow:      #EAB308;
  --font:        'Inter', sans-serif;
  --mono:        'JetBrains Mono', monospace;
  --radius:      8px;
  --radius-sm:   6px;
  --ease:        0.2s ease;
}

html { scroll-behavior: smooth; }

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

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

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }

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

section { padding: 110px 0; }

/* ===================== NAVBAR ===================== */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 900;
  transition: background var(--ease), border-bottom var(--ease);
}

#navbar.scrolled {
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.5px;
}
.logo-bracket { color: var(--orange); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

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

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}

/* ===================== SECTION INDICATOR ===================== */
#section-nav {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 800;
}

#section-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  align-items: flex-end;
}

#section-nav li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.snav-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.4px;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity var(--ease), transform var(--ease), color var(--ease);
  white-space: nowrap;
}

.snav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: width var(--ease), height var(--ease), background var(--ease);
  flex-shrink: 0;
}

#section-nav li.active .snav-dot {
  width: 10px;
  height: 10px;
  background: var(--orange);
}
#section-nav li.active .snav-label {
  opacity: 1;
  color: var(--text-muted);
  transform: translateX(0);
}
#section-nav li:not(.active):hover .snav-label {
  opacity: 1;
  color: var(--text-dim);
  transform: translateX(0);
}
#section-nav li:not(.active):hover .snav-dot {
  background: var(--border-hover);
}

/* ===================== SECTION TITLE ===================== */
.section-title {
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 3.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 1rem;
  max-width: 260px;
}
.section-num {
  font-family: var(--mono);
  color: var(--orange);
  font-size: 1rem;
  font-weight: 400;
}

/* ===================== HERO ===================== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 2rem;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 5rem;
}

.hero-content { flex: 1; }

.hero-greeting {
  font-family: var(--mono);
  color: var(--orange);
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  letter-spacing: 0.5px;
}

.hero-name {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 0.5rem;
  letter-spacing: -1.5px;
}

.hero-role {
  font-family: var(--mono);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.role-prefix { color: var(--blue); }
.cursor {
  color: var(--orange);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 440px;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.hero-mail {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
  transition: color var(--ease);
  font-family: var(--mono);
}
.hero-mail svg { width: 15px; height: 15px; color: var(--orange); flex-shrink: 0; }
.hero-mail:hover { color: var(--text); }

.hero-bottom {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.hero-social {
  display: flex;
  gap: 0.75rem;
}
.hero-social a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: border-color var(--ease), color var(--ease);
}
.hero-social a svg { width: 17px; height: 17px; }
.hero-social a:hover { border-color: var(--blue); color: var(--blue); }

/* Code Window */
.hero-visual { flex: 1; max-width: 460px; }

.code-window {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-header {
  background: #0d1829;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.dot-red   { width:11px;height:11px;border-radius:50%;background:#ff5f57; flex-shrink:0; }
.dot-yellow{ width:11px;height:11px;border-radius:50%;background:#ffbd2e; flex-shrink:0; }
.dot-green { width:11px;height:11px;border-radius:50%;background:#28c840; flex-shrink:0; }

.code-filename {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-left: 0.5rem;
}
.code-body {
  padding: 1.4rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.85;
  overflow-x: auto;
}
.kw  { color: #c792ea; }
.var { color: #82aaff; }
.key { color: #b2ccd6; }
.str { color: #c3e88d; }
.bool{ color: #f78c6c; }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}
.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
}

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

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

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.85;
}

.learning-line { margin-bottom: 1.5rem !important; }

.highlight {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.skill-tags span {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--blue);
  background: var(--blue-dim);
  border: 1px solid var(--blue-border);
  padding: 0.2rem 0.7rem;
  border-radius: 4px;
}

.stat-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1rem;
  text-align: center;
  transition: border-color var(--ease);
}
.stat-card:hover { border-color: var(--border-hover); }

.stat-num {
  display: block;
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.2;
}
.stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.2rem;
}

/* ===================== PROJECTS ===================== */
.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  transition: border-color var(--ease);
}
.project-card:hover { border-color: var(--border-hover); }

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.project-icon {
  width: 42px;
  height: 42px;
  background: var(--blue-dim);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
}
.project-icon svg { width: 20px; height: 20px; }

.project-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}
.project-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.75;
}
.project-problem {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--orange);
}
.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.project-stack span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
}

/* ===================== CERTS & GOALS ===================== */
#certs-goals { background: var(--bg-2); }

.cg-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 5rem;
  align-items: start;
}

.cg-sub {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  font-family: var(--mono);
  margin-bottom: 1.25rem;
}

.cert-card {
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: border-color var(--ease);
}
.cert-card:hover { border-color: var(--border-hover); border-left-color: var(--orange); }

.cert-issuer {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 0.25rem;
}
.cert-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.cert-date {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: block;
  margin-top: 0.2rem;
  font-family: var(--mono);
}
.cert-verify {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--blue);
  white-space: nowrap;
  transition: color var(--ease);
  flex-shrink: 0;
}
.cert-verify:hover { color: var(--text); }

/* Goals */
.goals-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.goal-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.goal-item:last-child { border-bottom: none; }

.goal-year {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--orange);
  background: var(--orange-dim);
  border: 1px solid rgba(234,88,12,0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  height: fit-content;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.goal-body h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.6rem;
}
.goal-body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.goal-body li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-left: 1.1rem;
  position: relative;
}
.goal-body li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--text-dim);
}
.goal-body li.done {
  color: var(--text-dim);
  text-decoration: line-through;
  text-decoration-color: var(--text-dim);
}
.goal-body li.done::before {
  content: '✓';
  color: var(--green);
  font-size: 0.65rem;
  top: 2px;
}
.goal-body li.in-progress { color: var(--text); }
.goal-body li.in-progress::before {
  content: '›';
  color: var(--blue);
  font-weight: 700;
  font-size: 0.9rem;
  top: -1px;
}

/* ===================== CONTACT ===================== */
.contact-intro {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--ease);
  width: fit-content;
}
.contact-link svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--blue); }
.contact-link:hover { color: var(--text); }

/* ===================== HIRE ===================== */
#hire {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}

.hire-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.hire-tag {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--orange);
  letter-spacing: 0.5px;
}

.hire-heading {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
}

.hire-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.btn-hire {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2.25rem;
  background: var(--blue);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: background var(--ease), transform var(--ease);
  margin-top: 0.5rem;
}
.btn-hire svg { width: 18px; height: 18px; }
.btn-hire:hover { background: #1d4ed8; transform: translateY(-2px); }

/* ===================== FOOTER ===================== */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.footer-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
  text-align: center;
}
.footer-copy {
  color: var(--text-dim);
  font-size: 0.82rem;
}
.footer-privacy {
  color: var(--text-dim);
  font-size: 0.72rem;
  max-width: 620px;
  line-height: 1.6;
  display: inline-flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-family: var(--mono);
}
.footer-privacy svg {
  width: 13px;
  height: 13px;
  color: var(--orange);
  flex-shrink: 0;
  margin-top: 2px;
}
.footer-name { color: var(--blue); }

/* ===================== SCROLL TOP ===================== */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  background: var(--primary);
  border: 1px solid var(--border-hover);
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--ease);
  z-index: 700;
}
.scroll-top svg { width: 18px; height: 18px; }
.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: var(--blue); border-color: var(--blue); }

/* ===================== FADE-IN ===================== */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1200px) {
  #section-nav { display: none; }
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .cg-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-inner { flex-direction: column; gap: 3rem; padding-top: 5rem; }
  .hero-visual { width: 100%; max-width: 100%; }
}

@media (max-width: 768px) {
  section { padding: 80px 0; }

  .hero-name { letter-spacing: -1px; }

  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    inset: 0 0 0 30%;
    background: var(--bg-2);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    z-index: 850;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1rem; }

  .stat-cards { grid-template-columns: 1fr 1fr; }
  .project-card { max-width: 100%; }
}

@media (max-width: 480px) {
  .hero-bottom { flex-wrap: wrap; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .cg-grid { gap: 2rem; }
}
