/* 
 * Martin Minárik - Portfolio Website
 * Design System & Main Styles
 */

/* ── VARIABLES ── */
:root {
  /* Colors - Light Theme (Default) */
  --bg-primary: #FAF9F7;
  --bg-secondary: #FFFFFF;
  --text-primary: #1A1A1A;
  --text-secondary: #6B6560;
  --accent: #C8510B;
  /* Burnt Orange */
  --accent-hover: #A03D05;
  --accent-light: #F4E8DF;
  --border: #E0DCD7;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --card-bg: #FFFFFF;

  /* Layout */
  --container-width: 1200px;
  --header-height: 70px;
  /* Reduced from 80px */
  --section-spacing: 120px;
  --border-radius: 8px;

  /* Typography */
  --font-heading: 'DM Serif Display', serif;
  --font-body: 'Outfit', sans-serif;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-medium), color var(--transition-medium);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-primary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
}

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

.section {
  padding: var(--section-spacing) 0;
}

/* Vertical Centering Modifier */
.section-centered {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 80px;
  /* Offset for fixed header + optical balance */
}

/* ── UTILITIES ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-fast);
  letter-spacing: 0.5px;
}

.btn-primary {
  background-color: var(--accent);
  color: white;
  box-shadow: 0 4px 14px rgba(200, 81, 11, 0.3);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 81, 11, 0.4);
}

.btn-outline {
  border: 2px solid var(--border);
  color: var(--text-primary);
}

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

.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--accent);
}

/* ── HEADER & NAV ── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(250, 249, 247, 0.95);
  backdrop-filter: blur(12px);
  z-index: 1000;
  transition: all var(--transition-medium);
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  position: relative;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  z-index: 1002;
  position: relative;
}

/* Desktop Navigation */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

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

.nav-link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  transition: color var(--transition-fast);
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

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

.nav-cta {
  padding: 10px 24px;
  font-size: 0.95rem;
}

/* Mobile Toggle - Hamburger */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1002;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  position: relative;
  transition: background 0.3s;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.3s, top 0.3s, bottom 0.3s;
  left: 0;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  bottom: -8px;
}

.nav-toggle.active .hamburger {
  background: transparent;
}

.nav-toggle.active .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
  bottom: 0;
  transform: rotate(-45deg);
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

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

.nav-cta {
  padding: 10px 24px;
  font-size: 0.95rem;
}

/* Mobile Toggle Button */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1002;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  position: relative;
  transition: background 0.3s;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.3s, top 0.3s, bottom 0.3s;
  left: 0;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  bottom: -8px;
}

/* Hamburger Open State */
.nav-toggle.active .hamburger {
  background: transparent;
}

.nav-toggle.active .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
  bottom: 0;
  transform: rotate(-45deg);
}

/* ── RESPONSIVE NAV ── */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  .nav-link {
    font-size: 1.5rem;
    /* Larger for mobile */
    font-weight: 600;
  }
}

/* ── HERO SECTION ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  position: relative;
  overflow: hidden;
  /* Ensure blobs don't overflow */
}

/* Background Animation */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  /* Reduced blur slightly for better visibility */
  opacity: 1;
  /* Reset to 1, control via RGBA */
  animation: float 10s infinite alternate ease-in-out;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: rgba(200, 81, 11, 0.15);
  /* Increased from 0.08 */
  top: -10%;
  right: -10%;
  animation-delay: 0s;
  animation-duration: 9s;
  /* Faster */
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: rgba(255, 189, 46, 0.2);
  /* Increased from 0.08 */
  bottom: -10%;
  left: -5%;
  animation-delay: -2s;
  animation-duration: 11s;
  /* Slightly different */
}

.blob-3 {
  width: 300px;
  height: 300px;
  background: rgba(200, 81, 11, 0.1);
  /* Increased from 0.05 */
  top: 40%;
  left: 40%;
  animation-delay: -5s;
  animation-duration: 10s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -50px) scale(1.1);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }

  100% {
    transform: translate(0, 0) scale(1);
  }
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  /* Ensure content is above bg */
  z-index: 1;
}

.hero-text h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-role {
  font-size: 1.25rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 1rem;
  display: block;
}

.hero-tagline {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

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

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-img-placeholder {
  width: 100%;
  max-width: 450px;
  aspect-ratio: 1/1.2;
  background-color: var(--border);
  border-radius: var(--border-radius);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.hero-img-placeholder::before {
  content: 'Photo Placeholder';
}

/* ── ABOUT SECTION ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.about-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 800px;
}

.about-text p {
  margin-bottom: 1.5rem;
}

/* ── EXPERIENCE SECTION ── */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background-color: var(--border);
}

.timeline-item {
  position: relative;
  padding-left: 40px;
  margin-bottom: 60px;
}

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

.timeline-dot {
  position: absolute;
  top: 0;
  left: -9px;
  width: 20px;
  height: 20px;
  background-color: var(--bg-primary);
  border: 4px solid var(--accent);
  border-radius: 50%;
  z-index: 10;
}

.timeline-date {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timeline-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.timeline-company {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.timeline-desc {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.timeline-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

.timeline-link:hover {
  gap: 12px;
  text-decoration: underline;
}

/* ── SKILLS SECTION ── */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.skill-category {
  background-color: var(--bg-secondary);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.skill-category h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1rem;
  font-weight: 700;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border);
}

/* ── PROJECTS SECTION ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.project-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.project-img {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-weight: 500;
}

.project-img-real {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background-color: var(--border);
  display: block;
}

.project-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  flex: 1;
}

.project-link {
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── CONTACT SECTION ── */
.contact-container {
  display: flex;
  /* Changed from grid to flex because we removed form */
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  /* Center content */
  text-align: center;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.contact-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-value {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Simple form styling (Netlify/static ready) */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
}

.form-control {
  padding: 12px 16px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
}

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

/* ── FOOTER ── */
.footer {
  padding: 60px 0;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  text-align: center;
}

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

.social-link {
  font-size: 1.5rem;
  color: var(--text-primary);
}

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

/* ── RESPONSIVE ── */
@media (max-width: 992px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-text {
    order: 2;
  }

  .hero-image {
    order: 1;
    justify-content: center;
  }

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

  .hero-tagline {
    margin: 0 auto 2.5rem;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
    --section-spacing: 80px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    /* Behind toggle button */
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  .nav-link {
    font-size: 1.5rem;
    font-weight: 600;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

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

  .skills-container {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    padding-left: 60px;
  }

  .timeline-dot {
    left: 11px;
  }
}

/* ── ANIMATIONS ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 {
  transition-delay: 0.1s;
}

.stagger-2 {
  transition-delay: 0.2s;
}

.stagger-3 {
  transition-delay: 0.3s;
}

.hero-img-container {
  width: 100%;
  max-width: 450px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}