:root {
  color-scheme: dark;
  --bg: #0b0f1a;
  --surface: #141a29;
  --surface-2: #1b2336;
  --text: #eef1f7;
  --muted: #8d99b8;
  --accent: #ff7a3d;
  --accent-light: #ffb98a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 15, 26, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 40px;
  height: 40px;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
}

.main-nav a,
.contact-list a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.contact-list a:hover {
  color: var(--text);
}

.nav-book-btn {
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: transparent;
  border: 1.5px solid var(--border-strong);
  border-radius: 0.75rem;
  cursor: pointer;
  padding: 0;
}

.nav-toggle-bar {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

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

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

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

.cta-button,
.primary-button,
.secondary-button {
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.cta-button,
.primary-button {
  background: var(--accent);
  color: #1a0e06;
  box-shadow: var(--shadow-sm);
}

.cta-button:hover,
.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--accent-light);
}

.secondary-button {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border-strong);
}

.secondary-button:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

/* Hero */
.hero-section {
  padding: 4.5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 1fr);
  gap: 3rem;
  align-items: center;
}

.hero-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.hero-badges {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.hero-badge {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 122, 61, 0.1);
  color: var(--accent-light);
  font-weight: 700;
  border: 1px solid rgba(255, 122, 61, 0.28);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-size: 0.75rem;
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.hero-copy h1,
.section-header h2,
.contact-section h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-text,
.section-header p,
.review-note,
.contact-section p,
.contact-list strong {
  color: var(--muted);
}

.hero-text {
  max-width: 42rem;
  margin: 1.4rem 0 2rem;
  font-size: 1.05rem;
}

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

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
  padding: 1.6rem;
  border-radius: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

.hero-stats div {
  display: grid;
  gap: 0.3rem;
}

.hero-stats strong {
  color: var(--text);
  font-weight: 800;
  font-size: 1.4rem;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.hero-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
}

.hero-card-inner {
  padding: 2rem;
}

.hero-card-inner h2 {
  margin-top: 0;
  font-size: 1.3rem;
}

.hero-card-inner ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.9rem;
}

.hero-card-inner li {
  padding-left: 1.3rem;
  position: relative;
  color: var(--muted);
  line-height: 1.5;
}

.hero-card-inner li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-header {
  display: grid;
  gap: 0.75rem;
  max-width: 42rem;
  margin-bottom: 2.75rem;
}

.card-grid,
.reviews-grid,
.portfolio-grid {
  display: grid;
  gap: 1.25rem;
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card,
.portfolio-card,
.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.6rem;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.service-card:hover,
.portfolio-card:hover,
.review-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-4px);
}

.service-icon {
  width: 46px;
  height: 46px;
  border-radius: 0.9rem;
  background: rgba(255, 122, 61, 0.12);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3,
.portfolio-copy h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.service-card p {
  color: var(--muted);
  margin: 0;
}

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* Experience timeline (collapsible) */
.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.timeline-item[open] {
  border-color: var(--border-strong);
}

.timeline-summary {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  list-style: none;
}

.timeline-summary::-webkit-details-marker {
  display: none;
}

.timeline-when {
  color: var(--accent-light);
  font-weight: 700;
  font-size: 0.85rem;
  min-width: 140px;
}

.timeline-title-group {
  display: grid;
  gap: 0.25rem;
  flex-grow: 1;
}

.timeline-title {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
}

.timeline-role {
  color: var(--muted);
  font-size: 0.88rem;
}

.toggle-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  position: relative;
  flex-shrink: 0;
  transition: transform 0.25s ease, border-color 0.2s ease;
}

.toggle-icon::before,
.toggle-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--accent-light);
  transition: transform 0.25s ease;
}

.toggle-icon::before {
  width: 12px;
  height: 2px;
  transform: translate(-50%, -50%);
}

.toggle-icon::after {
  width: 2px;
  height: 12px;
  transform: translate(-50%, -50%);
}

.timeline-item[open] .toggle-icon {
  border-color: var(--accent);
}

.timeline-item[open] .toggle-icon::after {
  transform: translate(-50%, -50%) scaleY(0);
}

.timeline-detail {
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.timeline-detail ul {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.55rem;
  color: var(--muted);
}

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

@media (max-width: 640px) {
  .timeline-summary {
    flex-wrap: wrap;
  }

  .timeline-when {
    min-width: 0;
  }
}

/* Portfolio */
.portfolio-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.portfolio-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.portfolio-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.portfolio-copy {
  padding: 1.4rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.portfolio-copy p {
  color: var(--muted);
  margin: 0 0 1rem;
  flex-grow: 1;
}

.portfolio-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--accent-light);
  font-weight: 600;
}

/* Skills tags */
.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.skill-tag {
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

/* Reviews carousel */
.reviews-carousel {
  overflow: hidden;
}

.reviews-grid {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.25rem 0.25rem 0.5rem;
  margin: -0.25rem -0.25rem -0.5rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.reviews-grid::-webkit-scrollbar {
  display: none;
}

.review-card {
  flex: 0 0 auto;
  width: min(360px, 82vw);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  scroll-snap-align: start;
}

@media (min-width: 641px) {
  .review-card {
    width: calc(50% - 0.625rem);
  }
}

.review-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.review-upwork-logo {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  filter: invert(1);
  opacity: 0.85;
}

.reviews-dots {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.5rem;
}

.reviews-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--border-strong);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.reviews-dot:hover {
  background: var(--accent-light);
}

.reviews-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

.review-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}

.review-card p {
  color: var(--muted);
  flex-grow: 1;
  margin: 0.4rem 0 0;
}

.review-rating {
  margin-top: 1rem;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.review-note {
  margin-top: 1.5rem;
  font-size: 0.8rem;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
}

.contact-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-list div {
  display: grid;
  gap: 0.25rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}

.social-icon svg {
  width: 22px;
  height: 22px;
}

.icon-img {
  filter: invert(1);
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.social-icon:hover .icon-img,
.social-icon-small:hover .icon-img {
  opacity: 1;
}

.social-icon:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  transform: translateY(-3px);
}

.contact-form {
  display: grid;
  gap: 1.1rem;
  padding: 1.75rem;
  border-radius: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

.contact-form label {
  display: grid;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 0.9rem;
  background: var(--bg);
  color: var(--text);
  padding: 0.85rem 1.1rem;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.form-feedback {
  color: var(--accent-light);
  font-weight: 600;
}

/* Footer */
.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-content p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.heart {
  color: #e5484d;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.social-icon-small {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}

.social-icon-small svg {
  width: 18px;
  height: 18px;
}

.social-icon-small:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

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

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0 0 1rem 1rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease;
  }

  .main-nav.is-open {
    max-height: 380px;
    opacity: 1;
    visibility: visible;
  }

  .main-nav a {
    padding: 0.9rem 1.5rem;
    border-top: 1px solid var(--border);
  }

  .main-nav a:first-child {
    border-top: none;
  }
}

@media (max-width: 520px) {
  .header-inner .cta-button {
    display: none;
  }

  .main-nav a.nav-book-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0.75rem 1.5rem;
    padding: 0.85rem 1.4rem;
    border-radius: 999px;
    background: var(--accent);
    color: #1a0e06;
    font-weight: 600;
    border-top: none;
  }

  .main-nav a.nav-book-btn:hover {
    background: var(--accent-light);
    color: #1a0e06;
  }
}

@media (max-width: 640px) {
  .nav-work-link {
    display: none;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .hero-copy h1,
  .section-header h2,
  .contact-section h2 {
    font-size: 2.2rem;
  }

  #work,
  #skills {
    display: none;
  }
}

/* Motion */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service-card,
.portfolio-card,
.review-card,
.hero-card {
  animation: fadeIn 0.5s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
