/* ============================================
   Variables & Reset
   ============================================ */

:root {
  --color-bg: #fafafa;
  --color-bg-alt: #f0f0f0;
  --color-text: #1a1a1a;
  --color-text-muted: #555;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-border: #e0e0e0;
  --color-card-bg: #fff;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  --max-width: 960px;
  --nav-height: 64px;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s;
}

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

ul {
  list-style: none;
}

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

/* ============================================
   Layout
   ============================================ */

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

.section {
  padding: 80px 0;
}

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

.section__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 12px;
}

.section__title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}

/* ============================================
   Navigation
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

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

.nav__links {
  display: flex;
  gap: 32px;
}

.nav__links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ============================================
   Hero
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
}

.hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.hero__content {
  max-width: 560px;
  flex: 1;
}

.hero__photo-wrap {
  flex-shrink: 0;
}

.hero__photo {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.hero__greeting {
  font-size: 1.1rem;
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: 8px;
}

.hero__name {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.hero__title {
  font-size: 1.5rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-bottom: 16px;
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

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

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
}

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

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

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

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

/* ============================================
   About
   ============================================ */

.about__content {
  max-width: 680px;
}

.about__content p {
  margin-bottom: 16px;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.about__content p:last-child {
  margin-bottom: 0;
}

/* ============================================
   Timeline / Experience
   ============================================ */

.timeline {
  position: relative;
  padding-left: 32px;
}

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

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

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

.timeline__marker {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-card-bg);
  border: 3px solid var(--color-accent);
}

.timeline__role {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline__company {
  font-size: 1rem;
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: 4px;
}

.timeline__period {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.timeline__desc {
  color: var(--color-text-muted);
  line-height: 1.7;
}

.timeline__highlights {
  margin-top: 12px;
  padding-left: 20px;
  list-style: disc;
}

.timeline__highlights li {
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.timeline__highlights li:last-child {
  margin-bottom: 0;
}

/* ============================================
   Skills
   ============================================ */

.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.skill-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 28px;
  transition: box-shadow 0.2s;
}

.skill-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.skill-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-accent);
}

.skill-card__list li {
  padding: 4px 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ============================================
   Projects
   ============================================ */

.project-card {
  display: block;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 32px;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: inherit;
  max-width: 640px;
}

.project-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 24px rgba(37, 99, 235, 0.1);
  color: inherit;
}

.project-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.project-card__title {
  font-size: 1.3rem;
  font-weight: 700;
}

.project-card__arrow {
  width: 20px;
  height: 20px;
  color: var(--color-text-muted);
  transition: transform 0.2s, color 0.2s;
}

.project-card:hover .project-card__arrow {
  color: var(--color-accent);
  transform: translate(2px, -2px);
}

.project-card__desc {
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

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

.project-card__tags li {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 12px;
  background: var(--color-bg-alt);
  border-radius: 20px;
  color: var(--color-text-muted);
}

/* ============================================
   Contact
   ============================================ */

.contact__intro {
  max-width: 560px;
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

.contact__links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.contact__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.contact__link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.1);
}

.contact__icon {
  width: 20px;
  height: 20px;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  padding: 32px 0;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--color-border);
}

/* ============================================
   Mobile Responsive
   ============================================ */

@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(250, 250, 250, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .nav__links--open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav__links a {
    font-size: 1.1rem;
  }

  .section {
    padding: 60px 0;
  }

  .section__title {
    font-size: 1.6rem;
  }

  .hero__inner {
    flex-direction: column-reverse;
    text-align: center;
    gap: 32px;
  }

  .hero__photo {
    width: 200px;
    height: 200px;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + 40px);
    padding-bottom: 60px;
  }

  .hero__cta {
    flex-direction: column;
  }

  .btn {
    text-align: center;
    justify-content: center;
  }

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

  .contact__links {
    flex-direction: column;
  }

  .contact__link {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .skills__grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Animations
   ============================================ */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in--visible {
  opacity: 1;
  transform: translateY(0);
}
