/*
 * Damir Mikec — Personal Website
 * Design: Swiss Precision / International Typographic Style
 * Palette: #0A0A0A, #FAFAFA, #6B6B6B, accent #B8860B
 * Fonts: Playfair Display (headings), Source Sans 3 (body)
 */

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

/* ===== BASE ===== */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  color: #0A0A0A;
  background: #FAFAFA;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  color: #0A0A0A;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.125rem, 2vw, 1.5rem); margin-bottom: 1rem; }

p {
  margin-bottom: 1rem;
  color: #1A1A1A;
}

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 640px) { .container { padding: 0 2rem; } }
@media (min-width: 1024px) { .container { padding: 0 2.5rem; } }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #E5E5E5;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

@media (min-width: 768px) { .header-inner { height: 64px; } }

.site-logo-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: #0A0A0A;
  letter-spacing: -0.01em;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.site-logo-name:hover { opacity: 0.6; }

/* Desktop Nav */
.desktop-nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

@media (min-width: 768px) { .desktop-nav { display: flex; } }

.nav-link {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  color: #6B6B6B;
  transition: color 0.2s;
}

.nav-link:hover { color: #0A0A0A; }
.nav-link.active { color: #0A0A0A; font-weight: 600; }

.nav-divider {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: #E5E5E5;
}

.nav-icon {
  color: #6B6B6B;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.nav-icon:hover { color: #0A0A0A; }
.nav-icon svg { width: 16px; height: 16px; }

/* Language Switch — plain <a> links */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.8125rem;
}

.lang-link {
  padding: 2px 6px;
  letter-spacing: 0.05em;
  color: #6B6B6B;
  transition: color 0.2s;
}

.lang-link:hover { color: #0A0A0A; }

.lang-link.active {
  color: #0A0A0A;
  font-weight: 700;
}

.lang-sep {
  color: #D5D5D5;
  user-select: none;
}

/* Mobile Controls */
.mobile-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

@media (min-width: 768px) { .mobile-controls { display: none; } }

.hamburger {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #0A0A0A;
  display: flex;
  align-items: center;
}

.hamburger svg { width: 22px; height: 22px; }

/* Mobile Menu */
.mobile-menu {
  display: none;
  border-top: 1px solid #E5E5E5;
  background: #FAFAFA;
  padding: 1.25rem 0;
}

.mobile-menu.open { display: block; }

@media (min-width: 768px) { .mobile-menu { display: none !important; } }

.mobile-menu .nav-link {
  display: block;
  padding: 0.625rem 0;
  font-size: 1.125rem;
  text-align: center;
}

.mobile-menu .mobile-instagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding-top: 0.75rem;
  margin-top: 0.5rem;
  border-top: 1px solid #E5E5E5;
  color: #6B6B6B;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.mobile-menu .mobile-instagram:hover { color: #0A0A0A; }
.mobile-menu .mobile-instagram svg { width: 16px; height: 16px; }

/* ===== HERO ===== */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #0A0A0A;
}

.hero-image {
  width: 100%;
  height: 65vh;
  min-height: 420px;
  max-height: 720px;
  object-fit: cover;
  object-position: center 20%;
  opacity: 0.7;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 0 3.5rem;
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.92) 0%,
    rgba(10, 10, 10, 0.55) 45%,
    rgba(10, 10, 10, 0) 100%
  );
}

.hero-content { color: #FAFAFA; }

.hero-content h1 {
  color: #FAFAFA;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  margin-bottom: 0.35rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: #FAFAFA;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.hero-meta {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.8125rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(250, 250, 250, 0.55);
}

/* ===== SECTIONS ===== */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: #F3F3F3;
}

.section-heading {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 2.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid #0A0A0A;
  display: inline-block;
}

/* ===== INTRO ===== */
.intro-text {
  font-size: 1.125rem;
  line-height: 1.85;
  max-width: 720px;
  color: #1A1A1A;
}

/* ===== HIGHLIGHTS ===== */
.highlights-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
  .highlights-grid { grid-template-columns: 1fr 1fr; }
}

.highlight-card {
  border: 1px solid #E0E0E0;
  background: #FFFFFF;
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.highlight-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.highlight-card-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.highlight-card-body {
  padding: 1.5rem;
}

.highlight-medal {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.highlight-medal.gold { color: #B8860B; }
.highlight-medal.silver { color: #6B6B6B; }

.highlight-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #0A0A0A;
}

.highlight-desc {
  font-size: 0.9375rem;
  color: #6B6B6B;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Medal Count */
.medal-count {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #D5D5D5;
}

.medal-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(3.5rem, 9vw, 5.5rem);
  font-weight: 900;
  line-height: 1;
  color: #0A0A0A;
}

.medal-label {
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6B6B6B;
  line-height: 1.5;
}

/* ===== BIOGRAPHY ===== */
.bio-section {
  margin-bottom: 3rem;
}

.bio-section:last-child { margin-bottom: 0; }

.bio-section h3 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #E5E5E5;
}

.bio-section p {
  font-size: 1.0625rem;
  line-height: 1.85;
  max-width: 720px;
}

.bio-hero {
  margin-bottom: 3rem;
}

.bio-hero img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  object-position: center 30%;
}

/* Info Table */
.info-table {
  width: 100%;
  max-width: 600px;
  border-collapse: collapse;
}

.info-table tr {
  border-bottom: 1px solid #E5E5E5;
}

.info-table td {
  padding: 0.75rem 0;
  font-size: 0.9375rem;
  vertical-align: top;
}

.info-table td:first-child {
  font-weight: 700;
  color: #6B6B6B;
  width: 40%;
  padding-right: 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.info-table td:last-child { color: #1A1A1A; }

/* ===== RESULTS ===== */
.results-block {
  margin-bottom: 3.5rem;
}

.results-block:last-child { margin-bottom: 0; }

.results-block h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

/* Results Table */
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.results-table thead th {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6B6B6B;
  text-align: left;
  padding: 0.75rem;
  border-bottom: 2px solid #0A0A0A;
}

.results-table tbody td {
  padding: 0.75rem;
  border-bottom: 1px solid #EBEBEB;
  vertical-align: middle;
}

.results-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

.results-table tbody tr:last-child td { border-bottom: none; }

/* Medal badges */
.medal-badge {
  display: inline-block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
}

.medal-badge.gold { background: #F5E6A3; color: #6B5900; }
.medal-badge.silver { background: #E5E5E5; color: #4A4A4A; }
.medal-badge.bronze { background: #E8D5C4; color: #6B4A2E; }

/* Summary Table */
.summary-table {
  width: 100%;
  max-width: 700px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.summary-table thead th {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6B6B6B;
  text-align: left;
  padding: 0.75rem;
  border-bottom: 2px solid #0A0A0A;
}

.summary-table thead th:not(:first-child) { text-align: center; }

.summary-table tbody td {
  padding: 0.75rem;
  border-bottom: 1px solid #EBEBEB;
}

.summary-table tbody tr:hover { background: rgba(0, 0, 0, 0.02); }

.summary-table tbody td:not(:first-child) {
  text-align: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
}

.summary-table tfoot td {
  padding: 0.75rem;
  border-top: 2px solid #0A0A0A;
  font-weight: 700;
}

.summary-table tfoot td:not(:first-child) {
  text-align: center;
  font-family: 'Playfair Display', Georgia, serif;
}

/* Responsive tables */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -1.25rem;
  padding: 0 1.25rem;
}

@media (min-width: 640px) {
  .table-wrap { margin: 0; padding: 0; }
}

/* ===== FOOTER ===== */
.site-footer {
  margin-top: auto;
  border-top: 1px solid #E5E5E5;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0;
  font-size: 0.8125rem;
  color: #6B6B6B;
}

.footer-inner a {
  color: #6B6B6B;
  transition: color 0.2s;
}

.footer-inner a:hover { color: #0A0A0A; }
.footer-inner svg { width: 18px; height: 18px; }

/* ===== UTILITY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
