/* =============================================
   TOKENS
   ============================================= */
:root {
  --navy:       #0A0F1E;
  --slate:      #141929;
  --slate-mid:  #1A2035;
  --slate-light:#232B45;
  --cyan:       #00D4FF;
  --green:      #00FF9D;
  --white:      #E8EDF5;
  --muted:      #8892A4;
  --dim:        #4A5568;
  --border:     rgba(0, 212, 255, 0.12);

  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius: 6px;
  --transition: 0.25s ease;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
}

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

/* =============================================
   UTILITY
   ============================================= */
.container {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 24px;
}

.prompt { color: var(--green); font-family: var(--font-mono); }
.accent { color: var(--cyan); }
.highlight { color: var(--cyan); font-weight: 500; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.btn--primary {
  background: var(--cyan);
  color: var(--navy);
  border-color: var(--cyan);
}
.btn--primary:hover {
  background: transparent;
  color: var(--cyan);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: var(--dim);
}
.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--large {
  padding: 14px 32px;
  font-size: 0.95rem;
  margin-top: 40px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(0, 212, 255, 0.08);
  color: var(--cyan);
  border: 1px solid rgba(0, 212, 255, 0.2);
  white-space: nowrap;
}

/* =============================================
   NAV
   ============================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 64px;
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.nav__logo {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
}
.nav__name { color: var(--white); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav__links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.nav__links a:hover { color: var(--white); background: var(--slate-light); }

.nav__cta {
  color: var(--cyan) !important;
  border: 1px solid rgba(0, 212, 255, 0.3) !important;
}
.nav__cta:hover { background: rgba(0, 212, 255, 0.1) !important; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

/* Perspective grid */
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black, transparent);
  pointer-events: none;
}

/* CRT scanlines on hero only */
.hero__scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.04) 2px,
    rgba(0,0,0,0.04) 4px
  );
  pointer-events: none;
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  width: 100%;
}

/* Terminal window */
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--slate-light);
  padding: 10px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
}
.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot--red    { background: #FF5F57; }
.dot--yellow { background: #FFBD2E; }
.dot--green  { background: #28C840; }

.terminal__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: auto;
}

.terminal__body {
  background: rgba(20, 25, 41, 0.95);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 24px 28px 28px;
}

.terminal__line {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.terminal__line .prompt { margin-right: 8px; }

.hero__name {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  margin: 4px 0 16px;
  line-height: 1.15;
}

.hero__role {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--cyan);
  margin: 4px 0 16px;
  min-height: 1.5em;
}

.hero__location {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin: 4px 0 16px;
}

.hero__cmd { margin-top: 8px; opacity: 0.4; }

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

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero__actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

/* =============================================
   SECTIONS
   ============================================= */
.section {
  padding: 96px 0;
}
.section--dark {
  background: var(--slate);
}

.section__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.section__title {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 48px;
  letter-spacing: -0.02em;
}
.section__title::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: var(--cyan);
  margin-top: 12px;
}

/* =============================================
   ABOUT
   ============================================= */
.about__grid {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 64px;
  align-items: start;
}

.about__bio p {
  color: var(--muted);
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.75;
}
.about__bio p:last-child { margin-bottom: 0; }

.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.stat {
  background: var(--slate-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
}
.stat__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
  margin-bottom: 6px;
}
.stat__label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =============================================
   TIMELINE
   ============================================= */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

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

.timeline__item {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 32px;
  align-items: start;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.timeline__item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline__meta {
  text-align: right;
  padding-right: 32px;
  position: relative;
}
.timeline__meta::after {
  content: '';
  position: absolute;
  right: -5px; top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  border: 2px solid var(--slate);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.timeline__date {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.timeline__tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--green);
  background: rgba(0, 255, 157, 0.08);
  border: 1px solid rgba(0, 255, 157, 0.2);
  padding: 2px 8px;
  border-radius: 100px;
}

.timeline__card {
  background: var(--slate-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--transition);
}
.timeline__card:hover {
  border-color: rgba(0, 212, 255, 0.3);
}

.timeline__role {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
}
.timeline__company {
  font-size: 0.8rem;
  color: var(--cyan);
  margin-bottom: 14px;
  font-family: var(--font-mono);
}
.timeline__bullets li {
  font-size: 0.87rem;
  color: var(--muted);
  padding-left: 16px;
  position: relative;
  margin-bottom: 6px;
  line-height: 1.6;
}
.timeline__bullets li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-family: var(--font-mono);
}

/* =============================================
   PROJECTS
   ============================================= */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project__card {
  background: var(--slate-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--transition), transform var(--transition);
  opacity: 0;
  transform: translateY(16px);
}
.project__card.visible {
  opacity: 1;
  transform: translateY(0);
}
.project__card:hover {
  border-color: rgba(0, 212, 255, 0.35);
  transform: translateY(-3px);
}
.project__card--wide {
  grid-column: span 2;
}

.project__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.project__icon { font-size: 1.4rem; }
.project__links a {
  color: var(--muted);
  transition: color var(--transition);
}
.project__links a:hover { color: var(--cyan); }

.project__title {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
}
.project__desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}
.project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

/* =============================================
   SKILLS
   ============================================= */
.skills__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.skill__group-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
  margin-bottom: 14px;
}
.skill__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 5px 12px;
  border-radius: var(--radius);
  background: var(--slate-light);
  color: var(--white);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.pill:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* =============================================
   CERTS
   ============================================= */
.certs__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cert__card {
  background: var(--slate-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: border-color var(--transition);
  opacity: 0;
  transform: translateY(16px);
}
.cert__card.visible { opacity: 1; transform: translateY(0); }
.cert__card:hover { border-color: rgba(0, 212, 255, 0.3); }
.cert__card--pursuing { border-color: rgba(0, 255, 157, 0.15); }

.cert__badge {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--navy);
  background: var(--cyan);
  width: 44px; height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cert__badge--pursuing {
  background: var(--green);
}

.cert__name {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
}
.cert__issuer {
  font-size: 0.75rem;
  color: var(--cyan);
  font-family: var(--font-mono);
  margin-bottom: 2px;
}
.cert__desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

.cert__status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 100px;
  width: fit-content;
}
.cert__status--verified {
  color: var(--green);
  background: rgba(0, 255, 157, 0.08);
  border: 1px solid rgba(0, 255, 157, 0.2);
}
.cert__status--pursuing {
  color: #FFD700;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.2);
}

/* =============================================
   CONTACT
   ============================================= */
.contact__sub {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 500px;
  margin-bottom: 40px;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 0;
}

.contact__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--slate-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition);
  cursor: default;
}
a.contact__item { cursor: pointer; }
a.contact__item:hover { border-color: rgba(0, 212, 255, 0.35); }

.contact__icon {
  font-size: 1.2rem;
  margin-bottom: 4px;
}
.contact__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.contact__value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
  word-break: break-all;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
}
.footer__text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.footer__copy {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--dim);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: 40px; }
  .about__stats { grid-template-columns: repeat(4, 1fr); }
  .projects__grid { grid-template-columns: 1fr 1fr; }
  .project__card--wide { grid-column: span 2; }
  .certs__grid { grid-template-columns: 1fr 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .skills__grid { grid-template-columns: 1fr; }

  .timeline::before { left: 0; }
  .timeline__item { grid-template-columns: 1fr; }
  .timeline__meta { text-align: left; padding-right: 0; padding-left: 20px; }
  .timeline__meta::after { right: auto; left: -5px; }
}

@media (max-width: 640px) {
  .nav { padding: 0 20px; }
  .nav__links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--slate);
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-bottom: 1px solid var(--border);
  }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 12px 16px; }
  .nav__toggle { display: flex; }

  .hero__actions { flex-direction: column; }
  .projects__grid { grid-template-columns: 1fr; }
  .project__card--wide { grid-column: span 1; }
  .certs__grid { grid-template-columns: 1fr; }
  .about__stats { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
