/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol { margin: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

/* === Variables === */
:root {
  --ink: #e0e0e0;
  --surface: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.1);
  --yellow: #28a745;
  --muted: #8892b0;
  --teal: #64ffda;
  --bg1: #1a1a2e;
  --bg2: #16213e;
  --text: #e0e0e0;
  --heading: #ffffff;
  --radius: 12px;
  --transition: 0.3s ease;
}

@media (prefers-color-scheme: light) {
  :root {
    --ink: #2d2d2d;
    --surface: rgba(0,0,0,0.04);
    --border: rgba(0,0,0,0.1);
    --muted: #666;
    --bg1: #f5f5f5;
    --bg2: #e8e8e8;
    --text: #333;
    --heading: #111;
  }
}

/* === Typography === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, var(--bg1), var(--bg2));
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  color: var(--heading);
  line-height: 1.3;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

p { margin-bottom: 1rem; }
a:hover { color: var(--teal); }

/* === Layout === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }

/* === Header / Nav === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26,26,46,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo i { font-size: 1.3rem; }

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--teal);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-links a:hover,
.nav-links a.active { color: var(--teal); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: var(--transition);
  display: block;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* === Main content offset === */
main { padding-top: 64px; }

/* === Hero === */
.hero {
  text-align: center;
  padding: 6rem 0 3rem;
}

.hero h1 { margin-bottom: 1rem; }
.hero h1 span { color: var(--teal); }

.hero .tagline {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* === Cards === */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

.card-body { padding: 1.5rem; }

.card-title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--heading);
}

.card-excerpt {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.card-meta i { margin-right: 0.25rem; }

/* Featured card */
.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 3rem;
}

.featured-card .card-image {
  background: linear-gradient(135deg, var(--yellow), var(--teal));
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-card .card-image i { font-size: 4rem; color: rgba(255,255,255,0.3); }

.featured-card .card-body {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-card .card-title { font-size: 1.6rem; margin-bottom: 1rem; }
.featured-card .card-excerpt { font-size: 1rem; margin-bottom: 1.5rem; }

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.card-image-placeholder {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.card-image-placeholder.green { background: linear-gradient(135deg, #1b4332, #2d6a4f); }
.card-image-placeholder.teal { background: linear-gradient(135deg, #0d3b4f, #1a6b7a); }
.card-image-placeholder.dark { background: linear-gradient(135deg, #1a1a2e, #2a2a4e); }
.card-image-placeholder.purple { background: linear-gradient(135deg, #2d1b69, #5b21b6); }
.card-image-placeholder.orange { background: linear-gradient(135deg, #7c2d12, #c2410c); }
.card-image-placeholder.blue { background: linear-gradient(135deg, #1e3a5f, #2563eb); }

/* === Tags === */
.tag {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tag-green { background: rgba(40,167,69,0.15); color: var(--yellow); border: 1px solid rgba(40,167,69,0.3); }
.tag-teal { background: rgba(100,255,218,0.1); color: var(--teal); border: 1px solid rgba(100,255,218,0.2); }
.tag-purple { background: rgba(139,92,246,0.15); color: #a78bfa; border: 1px solid rgba(139,92,246,0.3); }
.tag-orange { background: rgba(251,146,60,0.15); color: #fb923c; border: 1px solid rgba(251,146,60,0.3); }
.tag-blue { background: rgba(96,165,250,0.15); color: #60a5fa; border: 1px solid rgba(96,165,250,0.3); }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-primary {
  background: var(--yellow);
  color: #fff;
}

.btn-primary:hover { background: #22963e; color: #fff; transform: translateY(-1px); }

.btn-outline {
  border: 1px solid var(--border);
  color: var(--teal);
}

.btn-outline:hover { background: rgba(100,255,218,0.1); color: var(--teal); }

/* === Section headers === */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* === Article page === */
.article-header {
  padding: 4rem 0 2rem;
  text-align: center;
}

.article-header h1 {
  max-width: 800px;
  margin: 0 auto 1.5rem;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.article-meta span { display: flex; align-items: center; gap: 0.35rem; }
.article-meta i { color: var(--teal); }

.article-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 0;
}

.article-content p {
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.article-content h2 {
  margin: 2.5rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.article-content h3 { margin: 2rem 0 0.75rem; }

.article-content ul, .article-content ol {
  margin: 0 0 1.5rem 1.5rem;
  list-style: disc;
}

.article-content li { margin-bottom: 0.5rem; line-height: 1.7; }

.article-content code {
  background: rgba(100,255,218,0.1);
  color: var(--teal);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.article-content pre {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.article-content pre code { background: none; padding: 0; }

.article-content blockquote {
  border-left: 3px solid var(--teal);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: rgba(100,255,218,0.05);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--muted);
}

.share-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.share-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  transition: var(--transition);
  font-size: 1rem;
}

.share-btn:hover { background: var(--teal); color: var(--bg1); border-color: var(--teal); }

/* === About === */
.about-hero {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0 3rem;
}

.about-avatar {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--yellow), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: rgba(255,255,255,0.8);
}

.about-text h1 { margin-bottom: 0.5rem; }
.about-text .subtitle { color: var(--teal); font-size: 1.1rem; margin-bottom: 1rem; }
.about-text p { color: var(--muted); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.skill-card i {
  font-size: 2rem;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

.skill-card h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.skill-card p { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
  padding-left: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
  border: 2px solid var(--bg1);
  transform: translateX(-5px);
}

.timeline-item .year {
  font-size: 0.8rem;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline-item h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.timeline-item p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* === Contact === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 2rem 0 4rem;
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
}

.form-group textarea { resize: vertical; min-height: 140px; }

.contact-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.contact-info-card h3 { margin-bottom: 1.5rem; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.contact-item i {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(100,255,218,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  flex-shrink: 0;
}

.contact-item span { color: var(--muted); font-size: 0.95rem; }

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
}

.social-link {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-link:hover { background: var(--teal); color: var(--bg1); border-color: var(--teal); }

/* === Footer === */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-social { display: flex; gap: 0.75rem; }

/* === Filter bar === */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  transition: var(--transition);
  color: var(--muted);
}

.filter-btn:hover,
.filter-btn.active { background: var(--yellow); color: #fff; border-color: var(--yellow); }

/* === Responsive === */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(26,26,46,0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .featured-card { grid-template-columns: 1fr; }
  .featured-card .card-image { min-height: 200px; }

  .about-hero { grid-template-columns: 1fr; text-align: center; }
  .about-avatar { margin: 0 auto; width: 180px; height: 180px; font-size: 3.5rem; }

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

  .footer-inner { flex-direction: column; }
}

@media (max-width: 500px) {
  .cards-grid { grid-template-columns: 1fr; }
  .hero { padding: 4rem 0 2rem; }
  .section { padding: 2.5rem 0; }
  .article-meta { flex-direction: column; gap: 0.5rem; }
}
