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

:root {
  --color-bg: #fafafa;
  --color-bg-alt: #f0f4f8;
  --color-navy: #1a2744;
  --color-navy-light: #253354;
  --color-accent: #0ea5e9;
  --color-accent-dark: #0284c7;
  --color-text: #2d3748;
  --color-text-light: #718096;
  --color-border: #e2e8f0;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1100px;
  --section-pad: 100px 0;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.14);
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
  display: block;
}

.accent {
  color: var(--color-accent);
}

/* ===========================
   CONTAINER
=========================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===========================
   BUTTONS
=========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

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

.btn--primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
}

.btn--outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn--outline:hover {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-2px);
}

.btn--large {
  padding: 16px 40px;
  font-size: 1rem;
}

/* ===========================
   NAVIGATION
=========================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}

.nav.scrolled {
  border-bottom-color: var(--color-border);
  padding: 12px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.nav__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-navy);
  letter-spacing: -0.02em;
  background: var(--color-navy);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 36px;
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-light);
  transition: color var(--transition);
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

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

.nav__links a:hover::after {
  width: 100%;
}

/* ===========================
   HERO
=========================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--color-bg);
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(14,165,233,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero__content {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.hero__greeting {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.hero__name {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 800;
  color: var(--color-navy);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.hero__title {
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  font-weight: 400;
  color: var(--color-text-light);
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}

.hero__desc {
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 540px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ===========================
   SECTIONS
=========================== */
.section {
  padding: var(--section-pad);
}

.section:nth-child(even) {
  background: var(--color-bg-alt);
}

.section__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 56px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section__title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
  max-width: 300px;
}

/* ===========================
   ABOUT
=========================== */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 72px;
  align-items: center;
}

.about__text p {
  margin-bottom: 18px;
  color: var(--color-text-light);
  font-size: 1rem;
}

.about__text p strong {
  color: var(--color-text);
  font-weight: 600;
}

.about__text .btn {
  margin-top: 12px;
}

.about__photo-wrapper {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about__photo-wrapper::before {
  content: '';
  position: absolute;
  inset: -3px;
  border: 3px solid var(--color-accent);
  border-radius: calc(var(--radius) + 3px);
  opacity: 0;
  transition: opacity var(--transition);
}

.about__photo-wrapper:hover::before {
  opacity: 1;
}

.about__photo-wrapper img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}

.about__photo-wrapper:hover img {
  transform: scale(1.03);
}

/* ===========================
   TIMELINE
=========================== */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--color-border);
}

.timeline__item {
  position: relative;
  margin-bottom: 52px;
}

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

.timeline__dot {
  position: absolute;
  left: -40px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid var(--color-bg-alt);
  box-shadow: 0 0 0 2px var(--color-accent);
}

.experience .timeline__dot {
  border-color: var(--color-bg);
}

.timeline__date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}

.timeline__role {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 4px;
}

.timeline__company {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-light);
  display: block;
  margin-bottom: 12px;
}

.timeline__content p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  max-width: 680px;
}

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

.skills__group-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.skills__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skills__tags span {
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: default;
}

.skills__tags span:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14,165,233,0.3);
}

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

.project-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.project-card__header {
  margin-bottom: 12px;
}

.project-card__date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 12px;
  line-height: 1.4;
}

.project-card__desc {
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 20px;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.project-card__tags span {
  background: var(--color-bg-alt);
  color: var(--color-text-light);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ===========================
   CERTIFICATIONS
=========================== */
.certs__grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cert-item {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
}

.cert-item:last-child {
  border-bottom: none;
}

.cert-item__year {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.06em;
  min-width: 48px;
  padding-top: 2px;
}

.cert-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 4px;
}

.cert-item p {
  font-size: 0.88rem;
  color: var(--color-text-light);
}

/* ===========================
   CONTACT
=========================== */
.contact {
  text-align: center;
}

.contact__content {
  max-width: 540px;
  margin: 0 auto;
}

.contact__content p {
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin-bottom: 40px;
  line-height: 1.8;
}

/* ===========================
   FOOTER
=========================== */
.footer {
  background: var(--color-navy);
  color: rgba(255,255,255,0.6);
  padding: 32px 24px;
  text-align: center;
}

.footer__container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer a {
  color: var(--color-accent);
  transition: opacity var(--transition);
}

.footer a:hover {
  opacity: 0.8;
}

.footer__copy {
  font-size: 0.8rem;
  opacity: 0.5;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1024px) {
  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about__grid {
    grid-template-columns: 1fr 280px;
    gap: 48px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-pad: 72px 0;
  }

  .nav__links {
    display: none;
  }

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

  .about__photo {
    order: -1;
    max-width: 280px;
    margin: 0 auto;
  }

  .about__photo-wrapper img {
    height: 320px;
  }

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

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

  .hero__name {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }
}

@media (max-width: 480px) {
  .hero__cta {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }

  .section__title {
    font-size: 1.4rem;
  }
}
