:root {
  --bg: #FAFAF8;
  --text: #2D2D2D;
  --accent: #3B6B9E;
  --accent-hover: #2E5680;
  --secondary: #6B7280;
  --card-bg: #FFFFFF;
  --tag-bg: #F3F4F6;
  --tag-text: #4B5563;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
  --max-width: 1080px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

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

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

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

/* ── Navigation ── */

.nav {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  z-index: 100;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

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

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

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

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s;
}

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

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }

  .nav.open .nav-links {
    display: flex;
  }
}

/* ── Hero ── */

.hero {
  padding: 5rem 1.5rem 4rem;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4rem;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.hero-stats {
  font-size: 0.95rem;
  color: var(--secondary);
  margin-bottom: 2rem;
  font-weight: 500;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
}

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

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

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

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

.hero-photo img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

@media (max-width: 768px) {
  .hero {
    padding: 3rem 1.5rem 2rem;
  }

  .hero-inner {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-photo img {
    width: 200px;
    height: 200px;
  }
}

/* ── Shared Section ── */

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section-inner h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* ── About ── */

.about {
  background: var(--card-bg);
}

.about-text {
  max-width: 720px;
}

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

.about-text p:last-child {
  margin-bottom: 0;
  font-weight: 500;
}

/* ── Projects ── */

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

.project-card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.project-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-card > p {
  color: var(--secondary);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.project-card ul {
  list-style: none;
  margin-bottom: 1rem;
}

.project-card ul li {
  font-size: 0.88rem;
  padding: 0.2rem 0;
  padding-left: 1.1rem;
  position: relative;
}

.project-card ul li::before {
  content: "·";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--accent);
}

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

.tags span {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

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

/* ── Skills ── */

.skills {
  background: var(--card-bg);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.skill-group h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}

@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ── Experience ── */

.timeline {
  max-width: 640px;
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

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

.timeline-date {
  flex-shrink: 0;
  width: 120px;
  font-size: 0.85rem;
  color: var(--secondary);
  font-weight: 500;
  padding-top: 0.1rem;
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.timeline-content strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.timeline-content span {
  font-size: 0.88rem;
  color: var(--secondary);
}

@media (max-width: 480px) {
  .timeline-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .timeline-date {
    width: auto;
  }
}

/* ── Contact ── */

.contact {
  background: var(--card-bg);
}

.contact-inner {
  text-align: center;
  padding: 5rem 1.5rem;
}

.contact-inner h2 {
  font-size: 2rem;
}

.contact-inner > p {
  color: var(--secondary);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}

.contact-links {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.contact-links a {
  color: var(--secondary);
}

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

.contact-sep {
  color: var(--secondary);
  margin: 0 0.5rem;
}
