/* ============================================================
   kutsop.com — Global Styles
   Primary: #99ccff | Dark: #1a2a3a | Accent: #f4a261
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

:root {
  --primary: #99ccff;
  --primary-dark: #6ba3d6;
  --primary-deeper: #3d7ab5;
  --dark: #1a2a3a;
  --dark-mid: #2c3e50;
  --text: #2c2c2c;
  --text-light: #5a6a7a;
  --bg: #fcfcfc;
  --bg-warm: #f7f5f2;
  --bg-card: #ffffff;
  --accent: #f4a261;
  --accent-soft: #fce4c8;
  --border: #e0e6ec;
  --shadow-sm: 0 1px 3px rgba(26,42,58,0.06);
  --shadow-md: 0 4px 12px rgba(26,42,58,0.08);
  --shadow-lg: 0 8px 30px rgba(26,42,58,0.10);
  --radius: 6px;
  --font-display: 'Libre Baskerville', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
  --max-width: 960px;
  --nav-height: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------- NAVIGATION ---------- */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

nav .nav-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .site-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 0.01em;
}

nav .site-name:hover { color: var(--primary); }

nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
}

nav ul li a {
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

nav ul li a:hover,
nav ul li a.active {
  color: #fff;
  background: rgba(153,204,255,0.15);
}

/* Mobile hamburger */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: 0.3s;
}

/* ---------- HERO (index only) ---------- */

.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-mid) 50%, var(--primary-deeper) 100%);
  color: #fff;
  padding: 80px 24px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(153,204,255,0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(244,162,97,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.hero .subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.75);
  font-weight: 300;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.hero .hero-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.hero .hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero .hero-links a:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-primary {
  background: var(--primary);
  color: var(--dark);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.4);
}

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

/* ---------- PAGE HEADER (sub-pages) ---------- */

.page-header {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-mid) 100%);
  color: #fff;
  padding: 48px 24px 40px;
  text-align: center;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
}

.page-header p {
  color: rgba(255,255,255,0.65);
  margin-top: 8px;
  font-size: 1.05rem;
}

/* ---------- MAIN CONTENT ---------- */

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

section { margin-bottom: 56px; }
section:last-child { margin-bottom: 0; }

h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--dark);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary);
  display: inline-block;
}

h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--dark-mid);
  margin-bottom: 12px;
  margin-top: 28px;
}

p { margin-bottom: 16px; }

a { color: var(--primary-deeper); text-decoration: underline; text-decoration-color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--dark); text-decoration-color: var(--accent); }

/* ---------- ABOUT SECTION ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 36px;
  align-items: start;
}

.about-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary);
  box-shadow: var(--shadow-md);
  background: var(--border);
}

.photo-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 4px solid var(--primary);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-deeper));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
}

/* ---------- NEWS SECTION ---------- */

.news-list { list-style: none; }

.news-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 16px;
  align-items: baseline;
}

.news-list li:last-child { border-bottom: none; }

.news-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-deeper);
  white-space: nowrap;
  min-width: 90px;
}

/* ---------- PUBLICATION LIST ---------- */

.pub-list { list-style: none; counter-reset: pub-counter; }

.pub-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  padding-left: 40px;
  counter-increment: pub-counter;
}

.pub-list li::before {
  content: counter(pub-counter) ".";
  position: absolute;
  left: 0;
  top: 18px;
  font-weight: 700;
  color: var(--primary-deeper);
  font-size: 0.95rem;
}

.pub-list li:last-child { border-bottom: none; }

.pub-list .pub-title {
  font-style: italic;
  color: var(--dark);
}

.pub-list .pub-journal {
  font-weight: 600;
  color: var(--text-light);
}

.pub-list .pub-authors strong { color: var(--dark); }

/* ---------- DATA/CODE CARDS ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--dark);
}

.card p { font-size: 0.95rem; color: var(--text-light); }

.card .tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--dark-mid);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-right: 6px;
  margin-top: 8px;
}

/* ---------- BLOG LIST ---------- */

.blog-list { list-style: none; }

.blog-list li {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.blog-list li:last-child { border-bottom: none; }

.blog-list .blog-date {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.blog-list .blog-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--dark);
  text-decoration: none;
  display: block;
  margin: 4px 0 6px;
}

.blog-list .blog-title:hover { color: var(--primary-deeper); }

.blog-list .blog-excerpt {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ---------- GALLERY ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  position: relative;
}

.gallery-item:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.gallery-item .caption {
  padding: 12px 14px;
  background: var(--bg-card);
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.88);
  z-index: 200;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.lightbox-overlay.active { display: flex; }

.lightbox-overlay img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: var(--radius);
  box-shadow: 0 0 60px rgba(0,0,0,0.4);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: #fff;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-close:hover { opacity: 1; }

/* ---------- FOOTER ---------- */

footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 40px 24px;
  margin-top: 48px;
}

footer .footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

footer h4 {
  font-family: var(--font-display);
  color: #fff;
  font-size: 1rem;
  margin-bottom: 12px;
}

footer p { margin-bottom: 6px; font-size: 0.92rem; }

footer a { color: var(--primary); text-decoration: none; }
footer a:hover { color: #fff; }

footer .footer-bottom {
  grid-column: 1 / -1;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

/* ---------- UTILITIES ---------- */

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

.text-muted { color: var(--text-light); }

.mt-0 { margin-top: 0; }

.placeholder-box {
  background: var(--bg-warm);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-light);
  font-style: italic;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 768px) {
  .nav-toggle { display: block; }

  nav ul {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--dark);
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }

  nav ul.open { display: flex; }

  nav ul li a { display: block; padding: 10px 14px; }

  .hero h1 { font-size: 1.9rem; }
  .hero { padding: 56px 24px 48px; }

  .about-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  footer .footer-inner { grid-template-columns: 1fr; }

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

  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .gallery-item img { height: 160px; }
}
