:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --text: #1c1c2e;
  --muted: #6b7280;
  --accent: #2a9d8f;
  --accent-hover: #218f83;
  --border: #e5e7eb;
  --radius: 0.5rem;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --max-width: 1100px;
  --nav-height: 64px;
}

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

.container {
  width: min(var(--max-width), 100% - 2rem);
  margin-inline: auto;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--accent);
  margin-top: 0.5rem;
  border-radius: 2px;
}

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

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

/* NAV */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nav.scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: min(var(--max-width), 100% - 2rem);
  margin-inline: auto;
}

.nav-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  transition: color 0.2s;
}

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

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s;
  border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active::after,
.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* HERO */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-block: calc(var(--nav-height) + 3rem) 4rem;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 4rem;
  width: min(var(--max-width), 100% - 2rem);
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

.hero-photo {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15), var(--shadow-md);
}

.hero-greeting {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.25rem;
}

.hero-name {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.hero-title {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 400;
  margin-bottom: 1.25rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 100px;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  backdrop-filter: blur(4px);
}

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

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.1s;
  cursor: pointer;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(42, 157, 143, 0.3);
}

.btn-outline {
  border: 2px solid rgba(255, 255, 255, 0.65);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}

/* HERO SLIDES */

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8, 18, 28, 0.55) 0%,
    rgba(8, 18, 28, 0.42) 50%,
    rgba(8, 18, 28, 0.58) 100%
  );
  z-index: 1;
}

.carousel-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot.active {
  background: rgba(255, 255, 255, 0.92);
  transform: scale(1.25);
}

/* ABOUT */

.about {
  padding-block: 5rem;
  background: var(--bg);
}

.about-content {
  max-width: 680px;
}

.about-content p {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

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

.about-content strong {
  color: var(--text);
  font-weight: 600;
}

/* SKILLS */

.skills {
  padding-block: 5rem;
  background: var(--surface);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.skill-group-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-chip {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.3rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 500;
}

/* EXPERIENCE */

.experience {
  padding-block: 5rem;
  background: var(--bg);
}

.timeline {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 3.5rem;
}

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

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

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -1.5rem;
  top: 0.5rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  transform: translateX(-5px);
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.2rem;
  flex-wrap: wrap;
}

.timeline-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 500;
}

.timeline-company {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
}

.timeline-bullets {
  list-style: disc;
  padding-left: 1.25rem;
}

.timeline-bullets li {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
  line-height: 1.65;
}

.timeline-bullets li::marker {
  color: var(--accent);
}

.education-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 1rem;
}

.education-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.education-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.education-degree {
  font-weight: 600;
  font-size: 0.95rem;
}

.education-school {
  font-size: 0.875rem;
  color: var(--muted);
}

/* PROJECTS */

.projects {
  padding-block: 5rem;
  background: var(--surface);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

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

.project-name {
  font-size: 1.1rem;
  font-weight: 700;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}

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

.project-tag {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.project-links {
  display: flex;
  gap: 1.25rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  transition: color 0.2s;
}

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

.project-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* CONTACT */

.contact {
  padding-block: 5rem;
  background: var(--bg);
}

.contact-inner {
  max-width: 560px;
}

.contact-intro {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
}

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

.contact-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent);
}

/* FOOTER */

.footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
}

/* MOBILE */

@media (max-width: 767px) {
  .hero {
    padding-block: calc(var(--nav-height) + 2rem) 3rem;
  }

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

  .hero-photo {
    width: 180px;
    height: 180px;
  }

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

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

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem;
    flex-direction: column;
    gap: 0;
    box-shadow: var(--shadow-md);
  }

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

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 0;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .timeline {
    padding-left: 1.25rem;
  }

  .timeline-dot {
    left: -1.25rem;
  }

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

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