/* =========================================
   Coderlyn Website — Shared Stylesheet
   ========================================= */

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

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f8f8f8;
  --color-text: #1a1a2e;
  --color-text-muted: #666680;
  --color-accent: #1e6eb5;
  --color-accent-hover: #155a96;
  --color-border: #e4e4ed;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --max-width: 900px;
  --header-height: 68px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* ---- HEADER ---- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}

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

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-link img {
  height: 36px;
  width: auto;
  display: block;
}

/* Fallback text logo if image missing */
.logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

/* ---- NAV ---- */
nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

nav a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

nav a:hover {
  color: var(--color-text);
  background: var(--color-bg-alt);
  text-decoration: none;
}

nav a.active {
  color: var(--color-accent);
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  border-radius: 6px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* ---- MAIN CONTENT ---- */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* ---- HOME PAGE ---- */
.home-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - var(--header-height) - 80px);
  padding: 40px 24px;
}

.home-image {
  width: 100%;
  max-width: 460px;
  border-radius: 24px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.10);
  display: block;
}

/* ---- CONTENT PAGES ---- */
.page-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: 44px;
}

.content-body {
  color: var(--color-text);
}

.content-body h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  margin-top: 36px;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.content-body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 24px;
  margin-bottom: 8px;
}

.content-body p {
  margin-bottom: 14px;
  color: #333348;
}

.content-body ul,
.content-body ol {
  padding-left: 22px;
  margin-bottom: 14px;
}

.content-body li {
  margin-bottom: 6px;
  color: #333348;
}

.content-body .meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

/* Contact block */
.contact-block {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 24px;
}

.contact-block h2 {
  margin-top: 0;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.contact-block p {
  margin-bottom: 4px;
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 36px 0;
}

/* ---- FOOTER ---- */
footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

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

.footer-copy {
  font-size: 0.83rem;
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.83rem;
  padding: 4px 10px;
  border-radius: 5px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.footer-links a:hover {
  color: var(--color-text);
  background: var(--color-bg-alt);
  text-decoration: none;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  nav.desktop-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px 16px;
    gap: 2px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  }

  nav.desktop-nav.open {
    display: flex;
  }

  nav.desktop-nav a {
    width: 100%;
    padding: 10px 14px;
    font-size: 1rem;
  }

  main {
    padding: 36px 16px 60px;
  }

  .home-wrap {
    padding: 24px 16px;
    min-height: calc(100vh - var(--header-height) - 60px);
  }

  .home-image {
    max-width: 320px;
    border-radius: 16px;
  }

  .page-title {
    font-size: 1.55rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 16px;
  }

  .footer-links {
    gap: 0;
  }

  .footer-links a {
    padding: 6px 10px;
  }

  .contact-block {
    padding: 20px;
  }
}

@media (max-width: 400px) {
  .home-image {
    max-width: 100%;
  }
}
