/* ============================================================
   SideIT – Main Stylesheet
   Design system: light + gradient, accent indigo/violet #6366f1
   ============================================================ */

/* ── Custom properties ─────────────────────────────────────── */
:root {
  --bg-primary:   #ffffff;
  --bg-secondary: #f5f3ff;
  --bg-card:      #ffffff;
  --accent:       #6366f1;
  --accent-hover: #4f46e5;
  --accent-glow:  rgba(99, 102, 241, 0.1);
  --text-primary: #111827;
  --text-muted:   #6b7280;
  --border:       #e5e7eb;
  --border-hover: #d1d5db;
  --radius:       10px;
  --radius-lg:    16px;
  --nav-height:   68px;
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --transition:   0.2s ease;
  --gradient:     linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  --gradient-soft: linear-gradient(135deg, #ede9fe 0%, #f5f3ff 50%, #eef2ff 100%);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.2rem; }

/* ── Layout helpers ─────────────────────────────────────────── */
.container {
  width: min(1100px, 100% - 2rem);
  margin-inline: auto;
}
.section {
  padding: 5rem 0;
}
.section-alt {
  background: var(--gradient-soft);
}
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title h2 { margin-bottom: 0.5rem; }
.section-title p { color: var(--text-muted); font-size: 1.05rem; }

/* ── Fade-in animation ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}
.btn-outline {
  border: 1.5px solid var(--border-hover);
  color: var(--text-primary);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}
.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1rem;
}

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}
.nav-brand img { height: 36px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--border);
}
.nav-cta {
  margin-left: 0.5rem;
  padding: 0.45rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background var(--transition), box-shadow var(--transition);
}
.nav-cta:hover {
  background: var(--accent-hover);
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.35);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.25rem;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 0.75rem 1rem; border-radius: var(--radius); }
  .nav-cta { text-align: center; margin-left: 0; margin-top: 0.5rem; padding: 0.75rem 1rem; }
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  background:
    radial-gradient(ellipse 55% 60% at 80% 30%, rgba(99, 102, 241, 0.12) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 60%),
    var(--bg-primary);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #16a34a;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hero-badge::before {
  content: '';
  width: 7px; height: 7px;
  background: #16a34a;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}
.hero-title { margin-bottom: 1.25rem; }
.hero-title span { color: var(--accent); }
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--accent);
  gap: 0;
}
.scroll-hint svg:first-child { animation: scrollBounce 1.6s ease-in-out infinite; }
.scroll-hint svg:last-child  { animation: scrollBounce 1.6s ease-in-out 0.2s infinite; margin-top: -10px; opacity: 0.5; }
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(5px); opacity: 0.6; }
}
.hero-avatar {
  width: 260px;
  height: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid rgba(99, 102, 241, 0.2);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.15), 0 8px 24px rgba(0,0,0,0.08);
  flex-shrink: 0;
  transition: transform var(--transition), box-shadow var(--transition);
}
.hero-avatar:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px rgba(99, 102, 241, 0.25), 0 8px 24px rgba(0,0,0,0.08);
}
.hero-avatar { display: grid; }
.hero-avatar img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: opacity 0.45s ease;
}
.hero-avatar .photo-avatar {
  opacity: 0;
  object-position: center;
}
.hero-avatar:hover .photo-real   { opacity: 0; }
.hero-avatar:hover .photo-avatar { opacity: 1; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-avatar { display: none; }
}

/* ── Stats ──────────────────────────────────────────────────── */
.stats {
  background: var(--gradient);
  padding: 3.5rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat-item {
  background: rgba(255,255,255,0.08);
  padding: 2rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(4px);
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ── Skills ─────────────────────────────────────────────────── */
.skills-categories {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.skill-group h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.skill-tag {
  padding: 0.45rem 0.9rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: #fff;
  transition: all var(--transition);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}
.skill-tag.primary {
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--accent);
  font-size: 0.95rem;
  background: var(--accent-glow);
  font-weight: 600;
}

/* ── Portfolio ──────────────────────────────────────────────── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.portfolio-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.15);
}
.card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--gradient-soft);
  border: 1px solid rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.card-client {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 600;
}
.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}
.card-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  background: #f3f4f6;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ── Contact ────────────────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 2rem; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.contact-icon {
  width: 44px; height: 44px;
  background: var(--gradient-soft);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  color: var(--accent);
}
.contact-item-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.contact-item-value {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}
.contact-item-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.contact-item a:hover { color: var(--accent); text-decoration: underline; }

/* Form */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 0.7rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group select option { background: #fff; }
.form-group textarea { resize: vertical; min-height: 130px; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
  color: #16a34a;
}
.form-success.visible { display: block; }

@media (max-width: 768px) {
  .contact-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ── CV Page ────────────────────────────────────────────────── */
.cv-layout {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 4rem;
  align-items: start;
}
.cv-photo {
  min-height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid rgba(99, 102, 241, 0.2);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.12), 0 6px 18px rgba(0,0,0,0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}
.cv-photo:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px rgba(99, 102, 241, 0.22), 0 6px 18px rgba(0,0,0,0.06);
}
.cv-photo { display: grid; }
.cv-photo img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: opacity 0.45s ease;
}
.cv-photo .photo-avatar {
  opacity: 0;
  object-position: center;
}
.cv-photo:hover .photo-real   { opacity: 0; }
.cv-photo:hover .photo-avatar { opacity: 1; }
.cv-bio h1 { margin-bottom: 0.5rem; }
.cv-tagline {
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}
.cv-bio p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.8;
}
.cv-downloads { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }

@media (max-width: 768px) {
  .cv-layout { grid-template-columns: 1fr; }
  .cv-photo { max-width: 280px; }
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  background: #f9fafb;
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
.footer-brand img { height: 28px; }
.footer-tagline { font-size: 0.9rem; color: var(--text-muted); max-width: 340px; }
.footer-links { display: flex; gap: 0.25rem; }
.footer-link {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.footer-link:hover { color: var(--text-primary); background: var(--border); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-social { display: flex; gap: 0.5rem; }
.footer-social a {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}
.footer-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}
@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { flex-wrap: wrap; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ── Page hero (sub-pages) ──────────────────────────────────── */
.page-hero {
  padding: calc(var(--nav-height) + 3.5rem) 0 3.5rem;
  text-align: center;
  background: var(--gradient-soft);
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}
.page-hero h1 { margin-bottom: 0.75rem; }
.page-hero p { color: var(--text-muted); font-size: 1.1rem; max-width: 560px; margin: 0 auto; }

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* ── Theme toggle button ────────────────────────────────────── */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  margin-left: 0.25rem;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun  { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }

/* ── Dark mode variables ────────────────────────────────────── */
html[data-theme="dark"] {
  --bg-primary:    #0f1117;
  --bg-secondary:  #1a1f2e;
  --bg-card:       #1a1f2e;
  --accent:        #818cf8;
  --accent-hover:  #6366f1;
  --accent-glow:   rgba(129, 140, 248, 0.12);
  --text-primary:  #f1f5f9;
  --text-muted:    #94a3b8;
  --border:        #2d3748;
  --border-hover:  #4a5568;
  --gradient:      linear-gradient(135deg, #4338ca 0%, #5b21b6 50%, #6d28d9 100%);
  --gradient-soft: linear-gradient(135deg, #1e1b4b 0%, #1a1f2e 50%, #0f172a 100%);
}

/* ── Dark mode overrides (hardcoded colors) ─────────────────── */
html[data-theme="dark"] .nav {
  background: rgba(15, 17, 23, 0.88);
}
html[data-theme="dark"] .hero-badge {
  background: rgba(74, 222, 128, 0.1);
  border-color: rgba(74, 222, 128, 0.25);
  color: #4ade80;
}
html[data-theme="dark"] .hero-badge::before { background: #4ade80; }
html[data-theme="dark"] .skill-tag { background: var(--bg-card); }
html[data-theme="dark"] .card-tag {
  background: #2d3748;
  border-color: var(--border);
}
html[data-theme="dark"] .form-group input,
html[data-theme="dark"] .form-group select,
html[data-theme="dark"] .form-group textarea {
  background: var(--bg-secondary);
  border-color: var(--border);
  color: var(--text-primary);
}
html[data-theme="dark"] .form-group input:focus,
html[data-theme="dark"] .form-group select:focus,
html[data-theme="dark"] .form-group textarea:focus {
  background: var(--bg-card);
}
html[data-theme="dark"] .form-group select option { background: var(--bg-secondary); }
html[data-theme="dark"] .footer { background: #0a0e1a; }
html[data-theme="dark"] .nav-links { background: var(--bg-secondary); }
