/* ================================
   StudentTechLK Professional Styles
   Author: StudentTechLK
   ================================ */

/* Google-like clean system font */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;

  --accent: #38bdf8;
  --accent-light: #e0f2fe;

  --dark: #0f172a;
  --dark-2: #1e293b;
  --text: #334155;
  --muted: #64748b;

  --bg: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;

  --success: #16a34a;
  --warning: #f59e0b;

  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 22px 45px rgba(15, 23, 42, 0.18);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --container: 1150px;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Body */
body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--dark);
  line-height: 1.6;
}

/* Global container */
.container {
  width: 90%;
  max-width: var(--container);
  margin: 0 auto;
}

/* Links */
a {
  transition: 0.25s ease;
}

/* Selection */
::selection {
  background: var(--primary);
  color: var(--white);
}

/* ================================
   Header / Navigation
   ================================ */

.header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 999;
}

.nav-container {
  min-height: 74px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.logo {
  font-size: 27px;
  font-weight: 900;
  color: var(--dark);
  letter-spacing: -0.8px;
}

.logo span {
  color: var(--primary);
}

/* Menu */
nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 15.5px;
  position: relative;
}

nav a:hover {
  color: var(--primary);
}

/* underline hover */
nav a::after {
  content: "";
  width: 0;
  height: 2px;
  background: var(--primary);
  position: absolute;
  left: 0;
  bottom: -6px;
  border-radius: 4px;
  transition: 0.25s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Mobile menu button */
.menu-btn {
  display: none;
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  font-size: 24px;
  cursor: pointer;
  font-weight: 800;
}

/* ================================
   Hero Section
   ================================ */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.25), transparent 34%),
    linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #172554 100%);
  color: var(--white);
  padding: 100px 0;
}

.hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  background: rgba(56, 189, 248, 0.12);
  border-radius: 50%;
  right: -120px;
  bottom: -150px;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 45px;
  align-items: center;
}

.tagline {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e0f2fe;
  padding: 9px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
  font-weight: 800;
  font-size: 14px;
}

.hero h1 {
  max-width: 760px;
  font-size: 56px;
  line-height: 1.08;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

.hero-desc {
  max-width: 650px;
  font-size: 18px;
  line-height: 1.8;
  color: #dbeafe;
  margin-bottom: 34px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 26px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 900;
  font-size: 15.5px;
  box-shadow: var(--shadow-sm);
}

.primary {
  background: var(--accent);
  color: #082f49;
}

.primary:hover {
  transform: translateY(-3px);
  background: #7dd3fc;
  box-shadow: var(--shadow-md);
}

.secondary {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

.secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-3px);
}

/* Hero card */
.hero-card {
  background: rgba(255, 255, 255, 0.96);
  color: var(--dark);
  padding: 34px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.hero-card h3 {
  font-size: 23px;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero-card ul {
  list-style: none;
}

.hero-card li {
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 13px 14px;
  border-radius: 12px;
  margin-bottom: 12px;
  font-weight: 750;
}

/* ================================
   Sections
   ================================ */

.categories,
.articles {
  padding: 82px 0;
}

.categories h2,
.articles h2,
.newsletter h2 {
  text-align: center;
  font-size: 38px;
  letter-spacing: -1.3px;
  margin-bottom: 12px;
  color: var(--dark);
}

.section-text {
  max-width: 620px;
  margin: 0 auto 42px;
  text-align: center;
  color: var(--muted);
  font-size: 17px;
}

/* Category cards */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.category-card {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  min-height: 205px;
  transition: 0.3s ease;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: #bfdbfe;
}

.category-card h3 {
  font-size: 21px;
  margin-bottom: 14px;
  color: var(--dark);
}

.category-card p {
  color: var(--muted);
  line-height: 1.75;
}

/* Article cards */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.article-card {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: 0.3s ease;
}

.article-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: #bfdbfe;
}

.article-label {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 18px;
}

.article-card h3 {
  font-size: 22px;
  line-height: 1.3;
  margin-bottom: 13px;
  color: var(--dark);
}

.article-card p {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 18px;
}

.article-card a {
  display: inline-block;
  color: var(--primary);
  text-decoration: none;
  font-weight: 900;
}

.article-card a:hover {
  color: var(--primary-dark);
  transform: translateX(4px);
}

/* ================================
   Newsletter
   ================================ */

.newsletter {
  padding: 70px 0 90px;
}

.newsletter-box {
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.25), transparent 30%),
    linear-gradient(135deg, #0f172a, #1e293b);
  color: var(--white);
  padding: 56px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.newsletter-box h2 {
  color: var(--white);
}

.newsletter-box p {
  color: #cbd5e1;
  margin: 14px auto 28px;
  max-width: 600px;
}

.newsletter form {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.newsletter input {
  width: 340px;
  max-width: 100%;
  padding: 15px 16px;
  border: none;
  border-radius: 12px;
  outline: none;
  font-size: 16px;
}

.newsletter button {
  padding: 15px 25px;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  color: #082f49;
  font-weight: 900;
  cursor: pointer;
  transition: 0.25s ease;
}

.newsletter button:hover {
  background: #7dd3fc;
  transform: translateY(-2px);
}

/* ================================
   Article / Page Hero
   ================================ */

.article-hero {
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.22), transparent 35%),
    linear-gradient(135deg, #0f172a 0%, #1e3a8a 70%, #172554 100%);
  color: var(--white);
  padding: 74px 0;
}

.article-category {
  display: inline-block;
  background: var(--accent);
  color: #082f49;
  padding: 8px 15px;
  border-radius: 999px;
  font-weight: 900;
  margin-bottom: 18px;
  font-size: 14px;
}

.article-hero h1 {
  max-width: 850px;
  font-size: 48px;
  line-height: 1.13;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.article-meta {
  color: #dbeafe;
  font-size: 16px;
}

/* Article layout */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 340px;
  gap: 34px;
  padding: 62px 0;
  align-items: start;
}

.article-content {
  background: var(--white);
  padding: 44px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.article-content p {
  color: var(--text);
  line-height: 1.85;
  font-size: 17px;
  margin-bottom: 22px;
}

.article-content h2 {
  font-size: 29px;
  margin: 38px 0 16px;
  color: var(--dark);
  letter-spacing: -0.8px;
}

.article-content h3 {
  color: var(--dark);
  margin-bottom: 10px;
}

.article-content ul,
.article-content ol {
  margin-left: 24px;
  margin-bottom: 26px;
}

.article-content li {
  color: var(--text);
  line-height: 1.85;
  font-size: 17px;
  margin-bottom: 6px;
}

.article-note {
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  border-left: 5px solid var(--primary);
  padding: 24px;
  border-radius: 14px;
  margin: 34px 0;
}

.article-note h3 {
  color: var(--primary-dark);
  margin-bottom: 8px;
  font-size: 20px;
}

.article-note p {
  margin-bottom: 0;
}

.back-link {
  display: inline-block;
  margin-top: 26px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 900;
}

.back-link:hover {
  color: var(--primary-dark);
  transform: translateX(-4px);
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 96px;
}

.sidebar-box {
  background: var(--white);
  padding: 26px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.sidebar-box h3 {
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--dark);
}

.sidebar-box a {
  display: block;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 12px;
  font-weight: 750;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
}

.sidebar-box a:hover {
  color: var(--primary);
  background: var(--primary-light);
  transform: translateX(4px);
}

.sidebar-box p {
  color: var(--muted);
  line-height: 1.7;
}

/* ================================
   Contact Form
   ================================ */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 22px;
}

.contact-form label {
  font-weight: 800;
  color: var(--dark);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 16px;
  outline: none;
  color: var(--dark);
  background: #ffffff;
  transition: 0.25s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  width: fit-content;
  padding: 15px 26px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.contact-form button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ================================
   Footer
   ================================ */

.footer {
  background: #020617;
  color: var(--white);
  padding: 56px 0 22px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer h3 {
  font-size: 24px;
  margin-bottom: 14px;
}

.footer h4 {
  font-size: 17px;
  margin-bottom: 16px;
}

.footer p {
  color: #94a3b8;
  line-height: 1.75;
  max-width: 430px;
}

.footer a {
  display: block;
  color: #94a3b8;
  text-decoration: none;
  margin-bottom: 11px;
  font-weight: 600;
}

.footer a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.copyright {
  text-align: center;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #64748b;
}

/* ================================
   Accessibility
   ================================ */

button:focus,
a:focus,
input:focus,
textarea:focus {
  outline: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.7);
  outline-offset: 3px;
}

/* ================================
   Responsive Design
   ================================ */

@media (max-width: 1050px) {
  .hero h1 {
    font-size: 48px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 850px) {
  .nav-container {
    min-height: 70px;
  }

  nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 14px 5%;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }

  nav.show {
    display: flex;
  }

  nav a {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
  }

  nav a::after {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    padding: 72px 0;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 39px;
    letter-spacing: -1.2px;
  }

  .hero-desc {
    font-size: 16.5px;
  }

  .hero-card {
    padding: 26px;
  }

  .categories,
  .articles {
    padding: 62px 0;
  }

  .categories h2,
  .articles h2,
  .newsletter h2 {
    font-size: 31px;
  }

  .category-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .article-hero {
    padding: 58px 0;
  }

  .article-hero h1 {
    font-size: 34px;
  }

  .article-content {
    padding: 30px;
    border-radius: var(--radius-md);
  }

  .article-content h2 {
    font-size: 25px;
  }

  .article-content p,
  .article-content li {
    font-size: 16px;
  }

  .newsletter-box {
    padding: 36px 22px;
  }

  .newsletter input {
    width: 100%;
  }

  .newsletter button {
    width: 100%;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 480px) {
  .container {
    width: 92%;
  }

  .logo {
    font-size: 23px;
  }

  .hero h1 {
    font-size: 33px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .category-card,
  .article-card,
  .sidebar-box {
    padding: 24px;
  }

  .article-content {
    padding: 24px;
  }

  .article-hero h1 {
    font-size: 30px;
  }
}