/* ============================================
   TorbenIT — Dark Professional Portfolio
   ============================================ */

/* --- Custom Properties --- */
:root {
  --bg-primary: #0f172a;
  --bg-surface: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --accent: #38bdf8;
  --accent-hover: #0ea5e9;
  --border: #334155;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --max-width: 1100px;
  --radius: 12px;
  --radius-sm: 8px;
}

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

html {
  overflow-y: scroll;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 1.75rem; margin-bottom: 16px; }
h3 { font-size: 1.25rem; margin-bottom: 12px; }

p {
  font-size: 1rem;
  line-height: 1.7;
  margin: 16px 0;
}

ul, ol {
  padding-left: 1.5em;
}

li {
  margin-bottom: 0.5em;
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}

@supports (backdrop-filter: blur(12px)) {
  .site-header {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

@supports not (backdrop-filter: blur(12px)) {
  .site-header {
    background: var(--bg-primary);
  }
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

.nav-logo {
  height: 36px;
  width: auto;
  aspect-ratio: 279 / 107;
  display: block;
}

/* Hamburger toggle (CSS-only) */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  width: 32px;
  height: 24px;
  position: relative;
  z-index: 1001;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  position: absolute;
  transition: all 0.3s ease;
}

.nav-toggle-label span {
  top: 50%;
  transform: translateY(-50%);
}

.nav-toggle-label span::before {
  content: '';
  top: -8px;
}

.nav-toggle-label span::after {
  content: '';
  top: 8px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.nav-links a {
  display: block;
  padding: 8px 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links .active a {
  color: var(--text-primary);
  background: var(--bg-surface);
}

/* Mobile nav */
@media (max-width: 768px) {
  .site-header .container {
    height: 48px;
  }

  .nav-logo {
    height: 28px;
  }

  .nav-toggle-label {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 4px;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
  }

  .nav-toggle:checked ~ .nav-links {
    transform: translateY(0);
  }

  .nav-toggle:checked + .nav-toggle-label span {
    background: transparent;
  }

  .nav-toggle:checked + .nav-toggle-label span::before {
    top: 0;
    transform: rotate(45deg);
  }

  .nav-toggle:checked + .nav-toggle-label span::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .nav-links a {
    padding: 12px 16px;
    font-size: 1rem;
  }
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 0 24px 60px;
}

.hero-portrait {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  margin-bottom: 10px;
}

#main .hero h1 {
  margin-top: 0;
  margin-bottom: 12px;
}

.hero .subtitle {
  font-size: 1.25rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 16px;
}

.hero .tagline {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--bg-primary);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 36px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
  transform: translateY(-1px);
}

/* --- Sections --- */
.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-primary);
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* --- Skill Badges --- */
.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: var(--bg-surface);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 20px;
  border: 1px solid var(--border);
}

/* --- Cards Grid --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

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

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.15s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card h3 {
  color: var(--text-primary);
  margin-bottom: 12px;
}

.card ul {
  color: var(--text-secondary);
  padding-left: 1.25em;
}

.card ul li {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.card p {
  color: var(--text-secondary);
  margin: 8px 0;
}

.card-link {
  display: inline-block;
  color: var(--accent);
  font-weight: 500;
  margin-top: 12px;
  font-size: 0.9rem;
}

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

/* --- Guide List --- */
.guide-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guide-item {
  display: block;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s;
}

.guide-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.guide-item h3 {
  color: var(--text-primary);
  margin-bottom: 6px;
}

.guide-item p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.9rem;
}

/* --- Contact --- */
.contact-info {
  text-align: center;
}

.contact-info ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.contact-info li {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
}

.contact-info strong {
  color: var(--text-primary);
}

/* --- Code Blocks --- */
pre {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 24px 0;
  max-width: 100%;
  overflow-x: auto;
  padding: 20px 24px;
  border-radius: var(--radius-sm);
  page-break-inside: avoid;
  word-wrap: break-word;
}

code {
  background: var(--bg-surface);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 40px;
}

.easter-egg {
  color: var(--bg-primary);
  margin-left: 8px;
  font-size: 0.7rem;
  transition: color 0.3s;
}

.easter-egg:hover {
  color: var(--accent);
}

/* --- ProofPilot Showcase --- */
.showcase-hero {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px;
}

.showcase-hero img.hero-banner {
  width: 100%;
  max-width: 900px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.showcase-hero img.hero-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 10px;
}

.showcase-hero .tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 10px 0 25px;
}

.showcase-cta {
  display: inline-block;
  background: var(--accent);
  color: var(--bg-primary);
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}

.showcase-cta:link,
.showcase-cta:visited {
  color: var(--bg-primary);
}

.showcase-cta:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
}

.showcase-section {
  max-width: 900px;
  margin: 0 auto 40px;
}

.showcase-section h2 {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 6px;
  margin-bottom: 20px;
}

.showcase-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto 40px;
}

.showcase-feature {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.showcase-feature h3 {
  margin-top: 0;
  color: var(--text-primary);
}

.showcase-feature p {
  margin-bottom: 0;
  color: var(--text-secondary);
}

.showcase-screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto 20px;
}

.showcase-screenshots img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.showcase-steps {
  max-width: 900px;
  margin: 0 auto;
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.showcase-steps li {
  counter-increment: step;
  padding: 12px 0 12px 50px;
  position: relative;
  font-size: 0.95rem;
  line-height: 1.6;
}

.showcase-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 10px;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: var(--bg-primary);
  border-radius: 50%;
  text-align: center;
  line-height: 32px;
  font-weight: 700;
  font-size: 14px;
}

.showcase-models ul {
  columns: 2;
  list-style: disc;
  padding-left: 1.5em;
}

.showcase-models li {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.showcase-links {
  text-align: center;
  max-width: 900px;
  margin: 40px auto;
}

.showcase-links a {
  margin: 0 12px;
}

/* --- Privacy Policy --- */
.privacy-policy {
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

.privacy-policy .updated {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.privacy-policy h2 {
  color: var(--text-primary);
  margin-top: 2em;
}

.privacy-policy ul {
  padding-left: 1.5em;
}

.privacy-policy li {
  margin-bottom: 0.5em;
  font-size: 0.95rem;
}

.privacy-policy code {
  background: var(--bg-surface);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* --- Page content (guide pages via default layout) --- */
#main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px;
}

#main h1,
#main h2 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

#main h1:first-child,
#main h2:first-child {
  margin-top: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .hero { padding: 50px 16px 40px; }
  .section { padding: 40px 0; }
}

@media (min-width: 1024px) {
  .hero h1 { font-size: 3.25rem; }
}
