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

:root {
  --bg: #0f1117;
  --bg-card: #1a1d27;
  --bg-card-hover: #222636;
  --text: #e4e6ed;
  --text-muted: #9498a8;
  --accent: #6c8aff;
  --accent-hover: #8da4ff;
  --border: #2a2e3d;
  --radius: 8px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { line-height: 1.2; }
h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

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

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius);
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* Visible focus styles */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

/* === Navbar === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.nav-brand:hover { color: var(--accent-hover); }
.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
}
.nav-links a {
  color: var(--text-muted);
  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; }
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: all 0.3s;
}

/* === Hero === */
.hero {
  padding: 160px 0 100px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 36px;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* === About === */
.about {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.about-content p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 16px;
}
.about-stats {
  display: flex;
  gap: 48px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === Services === */
.services {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.2s;
}
.service-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.service-icon {
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.service-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.service-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.service-price {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

/* === Portfolio === */
.portfolio {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.portfolio-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
.portfolio-card:hover { border-color: var(--accent); }
.portfolio-header {
  padding: 28px 32px 20px;
  cursor: pointer;
}
.portfolio-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(108, 138, 255, 0.1);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.portfolio-header h3 {
  font-size: 1.2rem;
}
.portfolio-body {
  padding: 0 32px 28px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.portfolio-card.open .portfolio-body {
  max-height: 600px;
  padding: 0 32px 28px;
}
.portfolio-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.portfolio-body ul {
  list-style: none;
  margin-bottom: 16px;
}
.portfolio-body li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}
.portfolio-body li::before {
  content: '\2192';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.portfolio-meta {
  font-size: 0.85rem !important;
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 4px;
}

/* === Contact === */
.contact {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.contact-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 36px;
}
.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.contact-card h3 {
  margin-bottom: 12px;
}
.contact-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.contact-platforms {
  display: flex;
  gap: 12px;
}

/* === Footer === */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* === Mobile === */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 17, 23, 0.98);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav-toggle { display: block; }
  .hero { padding: 120px 0 60px; }
  .about-stats { gap: 24px; }
  .services-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
}
