/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f5f0e6;
  --bg-alt: #ede7d9;
  --surface: #fffdf7;
  --text: #2b2520;
  --text-muted: #6b6358;
  --accent: #c9a14a;
  --accent-hover: #b08d3e;
  --rust: #a8553c;
  --border: #d8cdb8;
  --radius: 4px;
  --max-width: 1100px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, .nav-logo {
  font-family: 'Cinzel', Georgia, serif;
  letter-spacing: 0.04em;
}

/* ===== NAVIGATION ===== */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(245, 240, 230, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 32px;
}

.nav-menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  font-family: 'Cinzel', serif;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: all var(--transition);
}

.nav-menu a:hover {
  color: var(--accent);
}

.nav-menu a:hover::after {
  width: 100%;
  left: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, #ede7d9 0%, #f5f0e6 100%);
  text-align: center;
  overflow: hidden;
}

.hero-sunburst {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  max-width: 120vw;
  max-height: 120vh;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(201, 161, 74, 0.06) 0deg,
    transparent 8deg,
    rgba(201, 161, 74, 0.06) 16deg,
    transparent 24deg
  );
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 24px;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  font-weight: 600;
  margin-bottom: 0;
  letter-spacing: 0.08em;
}

.hero-deco-top,
.hero-deco-bottom {
  width: 120px;
  height: 2px;
  margin: 0 auto;
  position: relative;
}

.hero-deco-top {
  margin-bottom: 32px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
}

.hero-deco-top::before,
.hero-deco-top::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  background: var(--accent);
  transform: translateY(-50%) rotate(45deg);
}

.hero-deco-top::before { left: 50%; transform: translateY(-50%) rotate(45deg); box-shadow: -20px 0 0 var(--accent), 20px 0 0 var(--accent); }
.hero-deco-top::after { display: none; }

.hero-deco-bottom {
  margin-top: 32px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
}

.hero-deco-bottom::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--accent);
  transform: translateY(-50%) rotate(45deg);
  box-shadow: -20px 0 0 var(--accent), 20px 0 0 var(--accent);
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 24px 0;
}

.hero-divider-line {
  width: 60px;
  height: 1px;
  background: var(--accent);
}

.hero-divider-diamond {
  width: 10px;
  height: 10px;
  background: var(--accent);
  transform: rotate(45deg);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--text-muted);
  margin-bottom: 40px;
  font-weight: 400;
  font-style: italic;
}

.btn-hero {
  display: inline-block;
  padding: 14px 40px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  border-radius: 0;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.1em;
  transition: all var(--transition);
  position: relative;
}

.btn-hero::before,
.btn-hero::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--accent);
  transform: rotate(45deg);
  transition: all var(--transition);
}

.btn-hero::before { top: -3px; left: -3px; }
.btn-hero::after { bottom: -3px; right: -3px; }

.btn-hero:hover {
  background: var(--accent);
  color: var(--bg);
}

.btn-hero:hover::before,
.btn-hero:hover::after {
  background: var(--rust);
}

/* ===== SECTION DIVIDERS ===== */
.deco-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 0;
  background: var(--bg);
}

.deco-diamond {
  width: 12px;
  height: 12px;
  background: var(--accent);
  transform: rotate(45deg);
  position: relative;
}

.deco-diamond::before,
.deco-diamond::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40px;
  height: 1px;
  background: var(--border);
  transform: translateY(-50%);
}

.deco-diamond::before { right: 100%; margin-right: 12px; }
.deco-diamond::after { left: 100%; margin-left: 12px; }

/* ===== SECTIONS ===== */
section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  margin-bottom: 0;
  text-align: center;
}

.section-deco {
  width: 80px;
  height: 2px;
  margin: 20px auto;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  position: relative;
}

.section-deco::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--accent);
  transform: translate(-50%, -50%) rotate(45deg);
}

.section-desc {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.15rem;
  font-weight: 400;
  font-style: italic;
  margin-bottom: 56px;
}

/* ===== ART DECO CORNER ORNAMENTS ===== */
.corner {
  position: absolute;
  width: 20px;
  height: 20px;
  pointer-events: none;
  z-index: 3;
}

.corner.tl {
  top: 0;
  left: 0;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}

.corner.tr {
  top: 0;
  right: 0;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

.corner.bl {
  bottom: 0;
  left: 0;
  border-bottom: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}

.corner.br {
  bottom: 0;
  right: 0;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: start;
  margin-top: 48px;
}

.about-text {
  align-self: start;
}

.about-text p {
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 1.2rem;
}

.about-text strong {
  color: var(--rust);
}

.about-card {
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.about-frame {
  position: relative;
  padding: 12px;
}

.about-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--bg-alt);
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-placeholder {
  color: var(--text-muted);
  font-size: 1rem;
  padding: 24px;
  text-align: center;
}

.about-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px;
  font-size: 0.9rem;
  font-family: 'Cinzel', serif;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  justify-content: center;
}

/* ===== GALLERY ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px;
  margin-top: 24px;
}

.gallery-item {
  position: relative;
  text-align: center;
}

.gallery-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  aspect-ratio: 4 / 3;
  cursor: pointer;
  padding: 10px;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}

.gallery-frame:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.gallery-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.gallery-frame:hover img {
  transform: scale(1.04);
}

.gallery-frame.img-missing img,
.gallery-frame img:not([src]),
.gallery-frame img[src=""] {
  display: none;
}

.gallery-frame.img-missing {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-frame.img-missing::after {
  content: "Kuva tulossa";
  color: var(--text-muted);
  font-size: 0.95rem;
  font-style: italic;
}

.gallery-item figcaption {
  margin-top: 14px;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-weight: 400;
  letter-spacing: 0.03em;
}

/* ===== CONTACT ===== */
.contact-content {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.contact-content > p {
  color: var(--text-muted);
  margin-bottom: 36px;
  font-size: 1.2rem;
  font-style: italic;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  text-decoration: none;
  font-size: 1.15rem;
  font-family: 'Cinzel', serif;
  font-weight: 500;
  transition: color var(--transition);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.contact-link:hover {
  color: var(--rust);
  border-bottom-color: var(--accent);
}

.contact-icon {
  font-size: 1.3rem;
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.footer-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-family: 'Cinzel', serif;
}

.footer-tagline {
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem !important;
  opacity: 0.8;
  max-width: 400px;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 15, 0.95);
  z-index: 200;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
}

.lightbox.active {
  display: flex;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border: 2px solid var(--accent);
  padding: 8px;
  background: var(--bg);
}

.lightbox-caption {
  margin-top: 20px;
  color: #e8e0d0;
  font-size: 1rem;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.04em;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  color: #e8e0d0;
  font-size: 2.5rem;
  cursor: pointer;
  transition: color var(--transition);
  font-family: 'Cinzel', serif;
}

.lightbox-close:hover {
  color: var(--accent);
}

/* ===== SCROLL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
/* ===== PROJECT CARD ===== */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 32px;
  max-width: 700px;
  margin: 0 auto 48px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  position: relative;
}

.project-card::before,
.project-card::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border: 2px solid var(--accent);
  pointer-events: none;
}

.project-card::before {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
}

.project-card::after {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.project-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.project-badge {
  background: var(--accent);
  color: var(--bg);
  padding: 4px 12px;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 24px;
}

.project-desc a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.project-desc a:hover {
  border-bottom-color: var(--accent);
}

.project-links {
  display: flex;
  justify-content: flex-start;
}

.btn-project {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  transition: all var(--transition);
}

.btn-project:hover {
  background: var(--accent);
  color: var(--bg);
}

.btn-arrow {
  font-size: 1.2rem;
  transition: transform var(--transition);
}

.btn-project:hover .btn-arrow {
  transform: translateX(4px);
}

.tech-description {
  max-width: 700px;
  margin: 0 auto;
}

.tech-description p {
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1.8;
}
/* ===== RSS FEED INTEGRATED ===== */
.rss-integrated {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.rss-title {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 16px;
  text-align: left;
}

.rss-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rss-item {
  padding: 12px;
  border-left: 2px solid var(--accent);
  background: transparent;
  transition: border-color var(--transition);
}

.rss-item:hover {
  border-left-color: var(--accent-hover);
}

.rss-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.rss-heading {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
}

.rss-heading a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition);
}

.rss-heading a:hover {
  color: var(--accent);
}

.rss-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

.rss-loading,
.rss-error,
.rss-empty {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 12px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
}

.rss-error {
  color: var(--rust);
}/* ===== VISITOR COUNTER ===== */
.visitor-counter {
  text-align: center;
  padding: 8px 16px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  letter-spacing: 0.04em;
}

.visitor-counter #counter-value {
  color: var(--accent);
  font-weight: 600;
}
/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 64px;
    right: 0;
    width: 100%;
    height: calc(100vh - 64px);
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    transform: translateX(100%);
    transition: transform var(--transition);
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  .nav-menu a {
    font-size: 1.3rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-text {
    align-self: auto;
  }

  .about-card {
    align-self: auto;
    max-width: 360px;
    margin: 0 auto;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }

  .corner {
    width: 14px;
    height: 14px;
  }

  section {
    padding: 60px 0;
  }

  .hero-deco-top,
  .hero-deco-bottom {
    width: 80px;
  }
}

@media (max-width: 480px) {
  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-frame {
    padding: 6px;
  }

  .corner {
    width: 10px;
    height: 10px;
  }
}