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

body {
  font-family: 'Source Serif 4', Georgia, serif;
  background: #f6f3ee; color: #1a1e1c;
  min-height: 100vh; overflow-x: hidden;
}

/* Nav */
.tk-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px;
  background: linear-gradient(180deg, rgba(246,243,238,0.97) 0%, rgba(246,243,238,0.85) 80%, transparent 100%);
  backdrop-filter: blur(8px);
}
.tk-logo {
  font-family: 'Instrument Serif', serif;
  font-size: 28px; letter-spacing: 2px;
  color: #1a1e1c; text-decoration: none;
}
.tk-logo-accent { color: #1a7f7a; font-style: italic; }
.tk-nav-links {
  display: flex; gap: 32px; list-style: none;
  font-family: 'DM Sans', sans-serif; font-size: 13px;
  letter-spacing: 1.5px; text-transform: uppercase;
}
.tk-nav-links li a {
  color: rgba(26,30,28,0.5); text-decoration: none;
  transition: color 0.3s; position: relative;
}
.tk-nav-links li a:hover, .tk-nav-links li a.active { color: #1a7f7a; }
.tk-nav-links li a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1.5px; background: #1a7f7a; transition: width 0.3s;
}
.tk-nav-links li a:hover::after, .tk-nav-links li a.active::after { width: 100%; }

.tk-hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
}
.tk-hamburger span { width: 24px; height: 1.5px; background: #1a1e1c; }

/* Hero */
.tk-hero {
  position: relative; height: 100vh; overflow: hidden;
  display: flex; align-items: flex-end; padding: 80px 40px;
}
.tk-hero-bg {
  position: absolute; inset: 0; background: center/cover no-repeat;
  background-color: #c8d8d4;
}
.tk-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(246,243,238,1) 0%, rgba(246,243,238,0.65) 30%, rgba(0,0,0,0.02) 60%, rgba(0,0,0,0.1) 100%);
}
.tk-hero-content { position: relative; z-index: 2; max-width: 700px; }
.tk-hero-tag {
  font-family: 'DM Sans', sans-serif; font-size: 11px;
  letter-spacing: 3px; text-transform: uppercase;
  color: #1a7f7a; margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.tk-hero-tag::before { content: ''; width: 40px; height: 1.5px; background: #1a7f7a; }
.tk-hero h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 64px; line-height: 1.05; font-weight: 400;
}
.tk-hero p {
  font-size: 18px; line-height: 1.7; color: rgba(26,30,28,0.6);
  max-width: 520px; font-weight: 300; margin-top: 20px;
}

/* Section & Grid */
.tk-section { padding: 100px 40px; max-width: 1400px; margin: 0 auto; }
.tk-section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 60px; border-bottom: 1px solid rgba(26,30,28,0.1); padding-bottom: 20px;
}
.tk-section-title { font-family: 'Instrument Serif', serif; font-size: 42px; font-weight: 400; }

.tk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.tk-card {
  position: relative; overflow: hidden; cursor: pointer;
  aspect-ratio: 3/4; border-radius: 2px; text-decoration: none; display: block;
}
.tk-card:first-child { grid-column: 1 / 3; grid-row: 1 / 3; aspect-ratio: auto; }
.tk-card-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16,1,0.3,1), filter 0.6s;
  filter: brightness(0.88) saturate(1.05);
}
.tk-card:hover .tk-card-img { transform: scale(1.06); filter: brightness(0.6) saturate(1.15); }
.tk-card-content {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 30px; z-index: 2;
  background: linear-gradient(0deg, rgba(10,15,13,0.85) 0%, transparent 100%);
  transform: translateY(20px); opacity: 0;
  transition: all 0.5s cubic-bezier(0.16,1,0.3,1); color: #f6f3ee;
}
.tk-card:hover .tk-card-content { transform: translateY(0); opacity: 1; }
.tk-card:first-child .tk-card-content { transform: translateY(0); opacity: 1; padding: 50px; }
.tk-card-cat {
  font-family: 'DM Sans', sans-serif; font-size: 10px;
  letter-spacing: 2px; text-transform: uppercase; color: #6ec5c1; margin-bottom: 8px;
}
.tk-card-title {
  font-family: 'Instrument Serif', serif; font-size: 22px; font-weight: 400; color: #f6f3ee;
}
.tk-card:first-child .tk-card-title { font-size: 36px; }
.tk-card-sub { font-family: 'DM Sans', sans-serif; font-size: 13px; color: rgba(246,243,238,0.6); }

/* Article page */
.tk-article-hero {
  width: 100%; height: 60vh; background: center/cover no-repeat;
  background-color: #c8d8d4;
}
.tk-article-header {
  max-width: 800px; margin: -60px auto 0; position: relative; z-index: 2;
  background: #f6f3ee; padding: 40px 40px 20px; border-radius: 8px 8px 0 0;
}
.tk-article-cat {
  font-family: 'DM Sans', sans-serif; font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase; color: #1a7f7a; margin-bottom: 12px;
}
.tk-article-header h1 {
  font-family: 'Instrument Serif', serif; font-size: 48px; font-weight: 400; line-height: 1.1;
}
.tk-article-sub {
  font-size: 18px; color: rgba(26,30,28,0.5); margin-top: 12px; font-weight: 300;
}
.tk-article-body {
  max-width: 800px; margin: 0 auto; padding: 20px 40px 80px;
  font-size: 17px; line-height: 1.8; color: rgba(26,30,28,0.8);
}
.tk-article-body img {
  max-width: 100%; height: auto; border-radius: 6px; margin: 12px 0;
}
.tk-article-body img[src*="api/images"],
.tk-article-body img[src*="altervista"] {
  display: block; margin: 16px auto;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.tk-article-body table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.tk-article-body td, .tk-article-body th { padding: 8px; vertical-align: top; }

/* Legacy content from imported pages */
.tk-article-body .tk-legacy { margin: 0; }
.tk-article-body .tk-block {
  margin: 20px 0; padding: 0;
  font-size: 17px; line-height: 1.8;
}
.tk-article-body .tk-block:empty { display: none; }
.tk-article-body .tk-row { margin: 8px 0; }
.tk-article-body .tk-cell { padding: 4px 0; }
.tk-article-body a { color: #1a7f7a; }
.tk-article-body a:hover { opacity: 0.7; }
.tk-article-body font { font-family: inherit !important; font-size: inherit !important; }
.tk-article-body center { text-align: left; }

/* Footer */
.tk-footer {
  border-top: 1px solid rgba(26,30,28,0.08);
  padding: 60px 40px; display: flex; justify-content: space-between;
  align-items: center; max-width: 1400px; margin: 0 auto;
  font-family: 'DM Sans', sans-serif;
}
.tk-footer-left { font-size: 13px; color: rgba(26,30,28,0.35); }
.tk-footer-right a {
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
  color: rgba(26,30,28,0.35); text-decoration: none;
}
.tk-footer-right a:hover { color: #1a7f7a; }

/* Mobile */
@media (max-width: 900px) {
  .tk-nav { padding: 16px 20px; }
  .tk-nav-links { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(246,243,238,0.98); flex-direction: column; justify-content: center;
    align-items: center; gap: 24px; font-size: 18px; }
  .tk-nav-links.open { display: flex; }
  .tk-hamburger { display: flex; }
  .tk-hero { padding: 60px 24px; }
  .tk-hero h1 { font-size: 38px; }
  .tk-grid { grid-template-columns: 1fr; }
  .tk-card:first-child { grid-column: auto; grid-row: auto; }
  .tk-card { aspect-ratio: 16/10; }
  .tk-card .tk-card-content { transform: translateY(0); opacity: 1; }
  .tk-section { padding: 60px 24px; }
  .tk-section-title { font-size: 30px; }
  .tk-article-header { margin-top: 0; padding: 24px 20px 16px; border-radius: 0; }
  .tk-article-header h1 { font-size: 32px; }
  .tk-article-body { padding: 16px 20px 60px; }
  .tk-footer { flex-direction: column; gap: 16px; text-align: center; padding: 40px 20px; }
}
