/* === Custom Properties === */
:root {
  --bg: #0a0a0a;
  --bg-surface: #141414;
  --bg-overlay: rgba(0, 0, 0, 0.92);
  --text: #e8e8e8;
  --text-muted: #999;
  --accent: #c9a96e;
  --accent-hover: #dfc08a;
  --border: #2a2a2a;
  --font-body: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-heading: Georgia, 'Times New Roman', serif;
  --max-width: 1000px;
  --nav-height: 60px;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* === Layout === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* === Navigation === */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  color: var(--text-muted);
  padding: 8px 12px;
  font-size: 0.875rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: var(--bg-surface);
}
.nav-lang {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}
.nav-lang a {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 4px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.nav-lang a:hover { color: var(--text); }
.nav-lang a.active { color: var(--accent); }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    flex-direction: column;
  }
  .nav-menu.open { display: flex; }
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .nav-links a {
    padding: 10px 0;
    width: 100%;
    font-size: 1rem;
  }
  .nav-lang {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--border);
  }
}

/* === Hero (Homepage) === */
.hero {
  text-align: center;
  padding: 60px 0 40px;
}
.hero-image {
  max-width: 600px;
  margin: 0 auto 40px;
}
.hero-image img {
  width: 100%;
  margin: 0 auto;
}
.hero-name {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.hero-profession {
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* === Quote Slideshow === */
.quotes {
  text-align: center;
  padding: 40px 0 60px;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quotes-inner {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 120px;
}
.quote-line {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-muted);
  opacity: 0;
  animation: quoteFade var(--total-duration) infinite;
}
.quote-line:nth-child(1) { animation-delay: 0s; }
.quote-line:nth-child(2) { animation-delay: var(--delay-step); }
.quote-line:nth-child(3) { animation-delay: calc(var(--delay-step) * 2); }
.quote-line:nth-child(4) { animation-delay: calc(var(--delay-step) * 3); }
.quote-line:nth-child(5) {
  animation-delay: calc(var(--delay-step) * 4);
  font-style: normal;
  font-size: 0.9rem;
}
@keyframes quoteFade {
  0%, 5% { opacity: 0; }
  8%, 17% { opacity: 1; }
  20%, 100% { opacity: 0; }
}

/* === Footer === */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--accent); }

/* === CV Timeline === */
.cv-header {
  padding: 48px 0 24px;
  text-align: center;
}
.cv-header h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 8px;
}
.cv-header p {
  color: var(--text-muted);
}
.cv-section {
  padding: 24px 0;
}
.cv-section h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.cv-entry {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.cv-entry:last-child { border-bottom: none; }
.cv-date {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  padding-top: 2px;
}
.cv-title { font-weight: 500; }
.cv-info {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 2px;
}
.cv-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

/* === Tabs === */
.tabs {
  padding: 48px 0 16px;
}
.tab-list {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tab-btn {
  padding: 12px 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-panel {
  display: none;
  padding: 32px 0;
}
.tab-panel.active { display: block; }

/* === Page Title === */
.page-title {
  padding: 48px 0 0;
}
.page-title h1 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 400;
}

/* === Description Tab === */
.description {
  max-width: 720px;
  line-height: 1.85;
}
.description h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--accent);
  margin: 32px 0 12px;
}
.description h3:first-child { margin-top: 0; }
.description p {
  margin-bottom: 16px;
  color: var(--text);
}
.description .meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
  margin-top: 24px;
}

/* === Gallery Grid === */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.gallery-grid .thumb {
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  border-radius: 2px;
  border: 2px solid transparent;
  transition: border-color 0.2s, opacity 0.2s;
}
.gallery-grid .thumb:hover {
  border-color: var(--accent);
  opacity: 0.85;
}
.gallery-grid .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === Gallery sub-sections (for spoydes) === */
.gallery-sub h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--accent);
  margin: 24px 0 12px;
}
.gallery-sub h3:first-child { margin-top: 0; }

/* === Lightbox Overlay === */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg-overlay);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 24px;
  font-size: 2rem;
  color: var(--text);
  z-index: 1001;
  line-height: 1;
  padding: 8px;
}
.lightbox-close:hover { color: var(--accent); }
.lightbox-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 60px 60px 0;
  position: relative;
}
.lightbox-main img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
}
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: var(--text);
  padding: 16px;
  z-index: 1001;
}
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }
.lightbox-prev:hover,
.lightbox-next:hover { color: var(--accent); }
.lightbox-strip {
  display: flex;
  gap: 6px;
  padding: 12px 24px;
  overflow-x: auto;
  max-width: 100%;
  justify-content: center;
}
.lightbox-strip img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  border-radius: 2px;
  transition: opacity 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.lightbox-strip img:hover { opacity: 0.8; }
.lightbox-strip img.active {
  opacity: 1;
  border-color: var(--accent);
}

/* === Video === */
.video-wrap {
  max-width: 640px;
}
.video-wrap video {
  width: 100%;
  border-radius: 4px;
  background: #000;
}

@media (max-width: 768px) {
  .hero-name { font-size: 1.8rem; }
  .cv-entry {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .tab-btn { padding: 10px 16px; font-size: 0.85rem; }
  .lightbox-main { padding: 50px 16px 0; }
  .lightbox-prev,
  .lightbox-next { font-size: 1.8rem; padding: 8px; }
  .lightbox-prev { left: 0; }
  .lightbox-next { right: 0; }
  .lightbox-strip img { width: 48px; height: 48px; }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }
  .hero { padding: 40px 0 24px; }
  .quotes { padding: 24px 0 40px; }
}
