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

:root {
  --white:   #ffffff;
  --off-white: #f5f5f7;
  --light:   #e8e8ed;
  --mid:     #86868b;
  --dark:    #1d1d1f;
  --black:   #000000;
  --accent:  #0071e3;
  --accent-hover: #0077ed;
  --radius:  18px;
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
               "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* =============================================
   TYPOGRAPHY SCALE
   ============================================= */
h1 { font-size: clamp(3.5rem, 10vw, 8rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
p  { font-size: 1rem; color: var(--mid); line-height: 1.75; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.6rem;
  border-radius: 980px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: var(--white);
}
.btn--primary:hover { background: var(--accent-hover); }

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid rgba(0, 113, 227, 0.4);
}
.btn--ghost:hover {
  background: rgba(0, 113, 227, 0.08);
  border-color: var(--accent);
}

.btn--nav {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  font-size: 0.85rem;
  padding: 0.5rem 1.1rem;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15);
}
.btn--nav:hover { background: rgba(255,255,255,0.18); }

/* =============================================
   NAV
   ============================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(0,0,0,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: var(--transition);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav__logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--white);
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  gap: 2.5rem;
  flex: 1;
  justify-content: center;
}

.nav__links a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.75);
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--white); }

/* =============================================
   HERO
   ============================================= */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0,113,227,0.18) 0%, transparent 70%),
              var(--black);
  position: relative;
}

.hero__eyebrow {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero__title {
  background: linear-gradient(160deg, #fff 0%, rgba(255,255,255,0.55) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

.hero__sub {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--mid);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}

.hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__scroll-hint span {
  display: block;
  width: 1.5px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  30% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  70% { opacity: 0; transform: scaleY(1); transform-origin: bottom; }
}

/* =============================================
   SECTIONS (shared)
   ============================================= */
.section {
  padding: 7rem 2rem;
}

.section--light {
  background: var(--off-white);
  color: var(--dark);
}
.section--light h2, .section--light h3 { color: var(--dark); }
.section--light p { color: #515154; }
.section--light .section__label { color: var(--accent); }

.section__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section__label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

.section h2 {
  color: var(--white);
  margin-bottom: 3.5rem;
}

/* =============================================
   ABOUT
   ============================================= */
.about {
  background: var(--off-white);
}

.about h2 {
  color: var(--dark);
  margin-bottom: 0;
}

.about p { color: #515154; }
.about .section__label { color: var(--accent); }

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
  margin-top: 1rem;
}

.about__text h2 { margin-bottom: 1.75rem; }
.about__text p + p { margin-top: 1rem; }

.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding-top: 0.5rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.75rem;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.stat__num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.03em;
}

.stat__label {
  font-size: 0.8125rem;
  color: var(--mid);
  font-weight: 500;
}

/* =============================================
   SKILLS
   ============================================= */
.skills {
  background: var(--black);
}

.skills__categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius);
  overflow: hidden;
}

.skill-cat {
  background: #111;
  padding: 2.5rem 2rem;
  transition: var(--transition);
}

.skill-cat:hover {
  background: #161616;
}

.skill-cat__icon {
  width: 44px;
  height: 44px;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.skill-cat__icon svg {
  width: 100%;
  height: 100%;
}

.skill-cat h3 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 1.0625rem;
}

.skill-cat ul {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.skill-cat li {
  font-size: 0.9rem;
  color: var(--mid);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-cat li::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* =============================================
   JOURNEY / TIMELINE
   ============================================= */
.journey {
  background: var(--off-white);
}

.journey h2 { color: var(--dark); }
.journey .section__label { color: var(--accent); }

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

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent) 0%, rgba(0,113,227,0.1) 100%);
}

.timeline__item {
  position: relative;
  margin-bottom: 3.5rem;
}

.timeline__item:last-child { margin-bottom: 0; }

.timeline__dot {
  position: absolute;
  left: -2.5rem;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid rgba(0,113,227,0.4);
  z-index: 1;
}

.timeline__dot.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,113,227,0.2);
}

.timeline__content {
  background: var(--white);
  border-radius: 14px;
  padding: 1.75rem 2rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.timeline__date {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.4rem;
}

.timeline__content h3 {
  color: var(--dark);
  margin-bottom: 0.2rem;
}

.timeline__company {
  font-size: 0.875rem !important;
  color: var(--mid) !important;
  margin-bottom: 0.75rem !important;
  line-height: 1.4 !important;
}

.timeline__content > p:not(.timeline__company) {
  color: #515154;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.timeline__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.timeline__tags span {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border-radius: 980px;
  background: var(--off-white);
  color: var(--dark);
}

/* =============================================
   PROJECTS
   ============================================= */
.projects {
  background: var(--black);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius);
  overflow: hidden;
}

.project-card {
  background: #111;
  padding: 2.25rem 2rem;
  transition: var(--transition);
}

.project-card:hover {
  background: #161616;
}

.project-card__header {
  margin-bottom: 1rem;
}

.project-card__tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

.project-card h3 {
  color: var(--white);
  font-size: 1.0625rem;
}

.project-card > p {
  color: var(--mid);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  line-height: 1.65;
}

.project-card code {
  font-family: "SF Mono", Menlo, monospace;
  font-size: 0.85em;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.05);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.project-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-card__tech span {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 980px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.1);
}

/* =============================================
   CERTIFICATIONS
   ============================================= */
.certs {
  background: var(--off-white);
}

.certs h2 { color: var(--dark); }
.certs .section__label { color: var(--accent); }

.certs__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--white);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  transition: var(--transition);
}

.cert-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.cert-card__logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.cert-card__logo--aws  { background: #FF9900; color: #000; }
.cert-card__logo--docker { background: #2496ED; color: #fff; }
.cert-card__logo--linux  { background: #FCC624; color: #000; }
.cert-card__logo--git    { background: #24292e; color: #fff; }

.cert-card__logo--docker svg {
  width: 30px;
  height: 24px;
}

.cert-card__info h3 {
  font-size: 0.9375rem;
  color: var(--dark);
  margin-bottom: 0.2rem;
}

.cert-card__info p {
  font-size: 0.8125rem !important;
  color: var(--mid) !important;
  line-height: 1.4 !important;
}

/* =============================================
   CONTACT
   ============================================= */
.contact {
  background: var(--black);
  text-align: center;
}

.contact h2 {
  color: var(--white);
}

.contact__sub {
  font-size: 1.0625rem;
  color: var(--mid);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.contact__links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: #111;
  padding: 2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer p {
  font-size: 0.8125rem;
  color: #6e6e73;
}

.footer__tagline {
  font-style: italic;
}

/* =============================================
   SCROLL REVEAL ANIMATIONS
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* staggered children */
.reveal-item:nth-child(2) { transition-delay: 0.07s; }
.reveal-item:nth-child(3) { transition-delay: 0.14s; }
.reveal-item:nth-child(4) { transition-delay: 0.21s; }
.reveal-item:nth-child(5) { transition-delay: 0.28s; }
.reveal-item:nth-child(6) { transition-delay: 0.35s; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: 3rem; }
  .skills__categories { grid-template-columns: repeat(2, 1fr); }
  .projects__grid { grid-template-columns: repeat(2, 1fr); }
  .certs__grid { grid-template-columns: 1fr; }
  .nav__links { display: none; }
}

@media (max-width: 600px) {
  .section { padding: 4.5rem 1.25rem; }
  .skills__categories { grid-template-columns: 1fr; }
  .projects__grid { grid-template-columns: 1fr; }
  .about__stats { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .footer__inner { flex-direction: column; text-align: center; }
  .hero { padding: 5rem 1.5rem 4rem; }
}
