/* ============================================================
   SVFreelancing — Responsive Stylesheet
   Rebuilt: 2026-02-11
   Preserves desktop layout exactly. Adds proper mobile support.
   ============================================================ */

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

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f7f8fa;
  --color-bg-dark: #0f1923;
  --color-text: #1a1a2e;
  --color-text-light: #5a5a72;
  --color-text-on-dark: #e0e4ea;
  --color-heading: #0f1923;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-border: #e2e5eb;
  --color-card-bg: #ffffff;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1120px;
  --section-pad: 100px;
}

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

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

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

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

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

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

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.3s;
}

.nav.scrolled {
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-heading);
  letter-spacing: -0.02em;
}

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

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

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

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

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

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

.nav-cta {
  padding: 8px 20px;
  background: var(--color-accent);
  color: #fff !important;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}

.nav-cta:hover {
  background: var(--color-accent-hover);
  color: #fff !important;
  transform: translateY(-1px);
}

.nav-cta::after {
  display: none !important;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-heading);
  margin: 5px 0;
  transition: 0.3s;
}

/* ===== HERO ===== */
.hero {
  padding: 160px 0 var(--section-pad);
  background: var(--color-bg);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 64px;
  align-items: center;
}

.hero-content {
  max-width: 600px;
}

.hero-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.12;
  color: var(--color-heading);
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

/* Dark hero overrides */
.hero.section-dark h1 {
  color: #ffffff;
}

.hero.section-dark p {
  color: var(--color-text-on-dark);
}

.hero p {
  font-size: 1.125rem;
  color: var(--color-text-light);
  line-height: 1.75;
  margin-bottom: 36px;
  max-width: 520px;
}

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

.hero-image {
  position: relative;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  aspect-ratio: 4/5;
  box-shadow: 0 24px 48px rgba(15, 25, 35, 0.12);
}

.hero-image::before {
  content: '';
  position: absolute;
  top: -12px;
  right: -12px;
  width: 100%;
  height: 100%;
  border: 2px solid var(--color-accent);
  border-radius: 16px;
  z-index: -1;
  opacity: 0.3;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: var(--font-body);
}

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

.btn-primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--color-heading);
  border: 1.5px solid var(--color-border);
}

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

/* Outline button adjustment for dark sections */
.section-dark .btn-outline {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.section-dark .btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ===== SECTION LAYOUT ===== */
.section {
  padding: var(--section-pad) 0;
}

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

.section-dark {
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--color-heading);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-dark .section-header h2 {
  color: #fff;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
}

.section-dark .section-header p {
  color: var(--color-text-on-dark);
}

/* ===== SERVICES ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

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

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--color-accent);
  font-size: 1.3rem;
}

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.92rem;
  color: var(--color-text-light);
  line-height: 1.65;
}

/* ===== EXPERIENCE / PORTFOLIO ===== */
.experience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.exp-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 36px 32px;
  transition: border-color 0.25s;
}

.exp-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
}

.exp-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.exp-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.exp-card p {
  font-size: 0.92rem;
  color: var(--color-text-on-dark);
  line-height: 1.7;
}

.exp-card ul {
  list-style: none;
  margin-top: 16px;
}

.exp-card ul li {
  font-size: 0.88rem;
  color: var(--color-text-on-dark);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.exp-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 64px;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.stat-item p {
  font-size: 0.85rem;
  color: var(--color-text-on-dark);
  margin-top: 4px;
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-content h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 20px;
}

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

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.skill-tag {
  padding: 6px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(37, 99, 235, 0.07);
  color: var(--color-accent);
  border-radius: 6px;
}

.about-sidebar {
  background: var(--color-bg-alt);
  border-radius: 12px;
  padding: 36px 32px;
  border: 1px solid var(--color-border);
}

.about-sidebar h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 20px;
}

.timeline-item {
  padding-left: 24px;
  border-left: 2px solid var(--color-border);
  padding-bottom: 24px;
  position: relative;
}

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

.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

.timeline-item .year {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-accent);
}

.timeline-item h5 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-heading);
  margin: 4px 0 2px;
}

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

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  align-items: start;
}

.contact-info {
  max-width: 100%;
  min-width: 0;
}

.contact-info h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 16px;
}

.contact-info > p {
  font-size: 1rem;
  color: var(--color-text-light);
  margin-bottom: 32px;
}

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
}

.contact-method-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  flex-shrink: 0;
  font-size: 1.1rem;
}

.contact-method h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 12px;
}

.contact-method p,
.contact-method a {
  font-size: 0.88rem;
  color: var(--color-text-light);
}

/* Calendly wrapper — ensures the widget content area fills available width */
.calendly-wrapper {
  min-width: 0;
  flex: 1;
}

/* ===== CALENDLY EMBED ===== */
.calendly-inline-widget {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 620px;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

/* Ensure Calendly iframe respects container */
.calendly-inline-widget iframe {
  width: 100% !important;
  max-width: 100% !important;
}

/* ===== CONTACT FORM ===== */
.contact-form {
  background: var(--color-bg-alt);
  border-radius: 12px;
  padding: 36px 32px;
  border: 1px solid var(--color-border);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.92rem;
  font-family: var(--font-body);
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  color: var(--color-text);
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--color-accent);
}

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

.form-submit {
  width: 100%;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  background: var(--color-accent);
  color: #fff;
  border: none;
  font-family: var(--font-body);
  transition: background 0.2s, transform 0.15s;
}

.form-submit:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--color-bg-dark);
  padding: 48px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
}

.footer a {
  color: rgba(255, 255, 255, 0.6);
}

.footer a:hover {
  color: #fff;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ---------- < 1024px — Tablet Landscape ---------- */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero p {
    margin-left: auto;
    margin-right: auto;
  }

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

  .hero-image {
    max-width: 320px;
    margin: 0 auto;
    order: -1;
  }

  .hero-image::before {
    display: none;
  }

  .hero h1 {
    font-size: 2.6rem;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

/* ---------- < 768px — Tablet Portrait / Large Mobile ---------- */
@media (max-width: 768px) {
  :root {
    --section-pad: 72px;
  }

  .container {
    padding: 0 24px;
  }

  .nav-inner {
    padding: 0 24px;
  }

  /* Mobile nav */
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .hero {
    padding-top: 120px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .section-header {
    margin-bottom: 48px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .service-card {
    padding: 28px 24px;
  }

  .exp-card {
    padding: 28px 24px;
  }

  .stat-item h3 {
    font-size: 2.2rem;
  }

  .about-content h3 {
    font-size: 1.35rem;
  }

  .about-sidebar {
    padding: 28px 24px;
  }

  .contact-form {
    padding: 28px 24px;
  }

  .contact-info h3 {
    font-size: 1.35rem;
  }

  /* Calendly — stack icon above on mobile */
  .contact-method--calendly {
    flex-direction: column;
  }

  .calendly-wrapper {
    width: 100%;
  }

  .calendly-inline-widget {
    height: 560px;
    padding: 8px;
  }

  .footer-links {
    gap: 16px;
  }
}

/* ---------- < 480px — Small Mobile ---------- */
@media (max-width: 480px) {
  :root {
    --section-pad: 56px;
  }

  .container {
    padding: 0 16px;
  }

  .nav-inner {
    padding: 0 16px;
  }

  .nav-links.open {
    padding: 20px 16px;
  }

  .hero {
    padding-top: 100px;
  }

  .hero h1 {
    font-size: 1.75rem;
    line-height: 1.18;
  }

  .hero p {
    font-size: 0.95rem;
    margin-bottom: 28px;
  }

  .hero-image {
    max-width: 260px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
  }

  .section-header h2 {
    font-size: 1.65rem;
  }

  .section-header p {
    font-size: 0.95rem;
  }

  .section-header {
    margin-bottom: 36px;
  }

  .service-card {
    padding: 24px 20px;
  }

  .service-card h3 {
    font-size: 1rem;
  }

  .exp-card {
    padding: 24px 20px;
  }

  .exp-card h3 {
    font-size: 1.05rem;
  }

  .stats-bar {
    gap: 16px;
    margin-bottom: 40px;
  }

  .stat-item h3 {
    font-size: 1.8rem;
  }

  .stat-item p {
    font-size: 0.78rem;
  }

  .about-content h3 {
    font-size: 1.2rem;
  }

  .about-content p {
    font-size: 0.92rem;
  }

  .about-sidebar {
    padding: 24px 20px;
  }

  .skills-list {
    gap: 8px;
  }

  .skill-tag {
    padding: 5px 12px;
    font-size: 0.78rem;
  }

  .contact-form {
    padding: 24px 20px;
  }

  .contact-info h3 {
    font-size: 1.2rem;
  }

  .calendly-inline-widget {
    height: 500px;
    padding: 4px;
    border-radius: 8px;
  }

  .footer {
    padding: 36px 0;
  }

  .footer-links {
    gap: 12px;
    flex-wrap: wrap;
  }

  .footer-links a {
    font-size: 0.82rem;
  }

  .footer p {
    font-size: 0.78rem;
  }
}
