/* ============================================
   Sebastian Scheller – Portfolio
   Dark theme: charcoal + subtle red accents
   ============================================ */

:root {
  --bg: #0d0d0f;
  --bg-elevated: #141416;
  --surface: #1a1a1d;
  --border: #2a2a2e;
  --text: #e8e8ea;
  --text-muted: #9a9aa0;
  --accent: #c41e3a;
  --accent-hover: #e02445;
  --accent-subtle: rgba(196, 30, 58, 0.15);
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --nav-height: 4rem;
  --section-padding: 5rem 0;
  --container-max: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* Cybersecurity-inspired background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(196, 30, 58, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(196, 30, 58, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Faint network nodes */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(196, 30, 58, 0.08), transparent 50%),
              radial-gradient(ellipse 60% 40% at 100% 80%, rgba(196, 30, 58, 0.04), transparent 40%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

ul {
  margin: 0;
  padding-left: 1.25rem;
}

/* ============================================
   Sticky Navigation
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(13, 13, 15, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: background 0.2s ease;
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.05em;
  color: var(--text);
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  padding: 0;
  margin: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2rem;
  height: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav.scrolled {
  box-shadow: 0 1px 0 var(--border);
}

/* ============================================
   Hero Section (Full Screen)
   ============================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--nav-height) 1.5rem 3rem;
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(196, 30, 58, 0.06), transparent 45%);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  max-width: 42rem;
}

.hero-name {
  margin: 0 0 0.5rem;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  animation: fadeInUp 0.8s ease forwards;
}

.hero-subtitle {
  margin: 0 0 1rem;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  font-weight: 500;
  animation: fadeInUp 0.8s ease 0.1s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.hero-statement {
  margin: 0 0 2rem;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease 0.3s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-linkedin {
  font-size: 0.9rem;
  color: var(--text-muted);
  animation: fadeInUp 0.8s ease 0.4s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.hero-linkedin:hover {
  color: var(--accent);
}

/* ============================================
   Sections
   ============================================ */

.section {
  position: relative;
  padding: var(--section-padding);
  z-index: 1;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-title {
  margin: 0 0 2.5rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* Reveal animation (triggered by JS on scroll) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   About
   ============================================ */

.about {
  background: var(--bg-elevated);
}

.about-content p {
  margin: 0 0 1rem;
  max-width: 52rem;
  color: var(--text-muted);
}

.about-content p:last-child {
  margin-bottom: 0;
}

/* ============================================
   Experience (Timeline)
   ============================================ */

.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--border);
  margin-left: 0.5rem;
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  margin-left: -7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline-content h3 {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.timeline-date {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.timeline-content ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.timeline-content li {
  margin-bottom: 0.35rem;
}

/* ============================================
   Projects (Cards)
   ============================================ */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(196, 30, 58, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.project-card-inner {
  padding: 1.5rem;
}

.project-year {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.project-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.project-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================
   Skills (Grid)
   ============================================ */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
}

.skill-category h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.skill-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-category li {
  padding: 0.25rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.skill-category li:last-child {
  border-bottom: none;
}

/* ============================================
   Certifications & Achievements
   ============================================ */

.certifications {
  background: var(--bg-elevated);
}

.cert-list,
.achievement-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 36rem;
}

.cert-list li,
.achievement-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cert-list li:last-child,
.achievement-list li:last-child {
  border-bottom: none;
}

/* ============================================
   Contact
   ============================================ */

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 56rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-links a {
  font-size: 1rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-form label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  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: 100px;
}

.contact-form .btn {
  align-self: flex-start;
  margin-top: 0.25rem;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  padding: 2rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  z-index: 1;
  position: relative;
}

/* ============================================
   Mobile Responsive
   ============================================ */

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem 0;
  }

  .timeline {
    padding-left: 1.5rem;
    margin-left: 0.25rem;
  }

  .timeline-marker {
    left: -1.5rem;
    margin-left: -6px;
    width: 10px;
    height: 10px;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.5rem 0;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}
