/* assets/style.css */
:root {
  --bg-primary: #f8f9fa;
  --bg-secondary: #e9ecef;
  --text-primary: #343a40;
  --text-secondary: #6c757d;
  --accent-gold: #ffd700;
  --accent-teal: #20c997;
  --border-light: #dee2e6;
  --code-bg: #1e1e1e;
  --code-text: #f8f8f2;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

/* Header and Navigation */
header {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  padding: 1rem 0;
  border-bottom: 3px solid var(--accent-teal);
  position: sticky;
  top: 0;
  z-index: 100;
}

h2, h3, h4, h5 {
	margin-top: 1rem;
}

li {
  margin-left: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--text-primary);
  text-decoration: none;
}

/* Hexagonal Navigation */
nav ul {
  display: flex;
  list-style: none;
  gap: 0.5rem;
}

nav ul li {
	margin: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  background: var(--bg-primary);
  clip-path: polygon(15px 0%, calc(100% - 15px) 0%, 100% 50%, calc(100% - 15px) 100%, 15px 100%, 0% 50%);
  transition: all 0.3s ease;
  margin: 0 0.25rem;
}

.nav-link:hover {
  background: var(--accent-gold);
  transform: translateY(-2px);
}

/* Dropdown Menu */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-primary);
  border: 2px solid var(--border-light);
  border-radius: 0.5rem;
  min-width: 200px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.2s ease;
}

.dropdown a:hover {
  background: var(--accent-teal);
  color: white;
}

.dropdown a:last-child {
  border-bottom: none;
}

/* Right-align dropdown for the last nav item to prevent overflow */
.nav-item:last-child .dropdown {
  left: auto;
  right: 0;
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 2px solid var(--border-light);
  margin-top: 4rem;
  padding: 2rem 0;
}

.footer-content {
  text-align: center;
  color: var(--text-secondary);
}

.footer-content p {
  margin-bottom: 0.5rem;
}

.footer-content a {
  color: var(--accent-teal);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-content a:hover {
  color: var(--accent-gold);
}

/* Main Content */
main {
  padding: 3rem 0;
}

.content {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

/* Hexagonal Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.hex-title {
  display: inline-block;
  background: var(--accent-teal);
  color: white;
  padding: 1rem 2rem;
  clip-path: polygon(25px 0%, calc(100% - 25px) 0%, 100% 50%, calc(100% - 25px) 100%, 25px 100%, 0% 50%);
  font-size: 1.5rem;
  font-weight: bold;
}

/* Article/Project Cards with Cutout Images */
.card {
    position: relative;
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    overflow: hidden;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.card-content {
    flex: 1;
}

.card-image-container {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    padding: -5px;
    border-radius: 10px;
    overflow: hidden;
    align-self: center;
    position: relative;
}

.card-image {
    position: absolute;
    top: -5px;
    left: -5px;
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-secondary);
    box-shadow: inset 0 12px 20px rgba(0,0,0,0.2);
}

.card:hover .card-image {
    background-position: center calc(50% + 5px);
    box-shadow: inset 0 20px 25px rgba(0,0,0,0.2);
}

/* Hide image container for cards without images */
.card[data-image=""] .card-image-container,
.card:not([data-image]) .card-image-container {
    display: none;
}

.card-title {
    color: var(--accent-teal);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.card-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.card-description {
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card {
        flex-direction: column;
        gap: 1rem;
    }
    
    .card-image-container {
        width: 100%;
        height: 200px;
        align-self: center;
    }
}

/* Code Blocks */
.code-block {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 1.5rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
  font-family: 'Courier New', monospace;
  border-left: 4px solid var(--accent-gold);
}

.code-block pre {
  margin: 0;
}

/* Images */
.image-container {
  text-align: center;
  margin: 2rem 0;
}

.image-container img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.image-caption {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Download Links */
.download-link {
  display: inline-block;
  background: var(--accent-gold);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 2rem;
  margin: 0.5rem;
  transition: all 0.3s ease;
  font-weight: bold;
}

.download-link:hover {
  background: var(--accent-teal);
  color: white;
  transform: translateY(-2px);
}

.download-link:before {
  content: "📥 ";
}

/* Card/Content Links - Fixed angle hexagonal style */
.content-link {
  display: inline-block;
  background: var(--accent-gold);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  margin: 0.5rem;
  transition: all 0.3s ease;
  font-weight: bold;
  clip-path: polygon(15px 0%, calc(100% - 15px) 0%, 100% 50%, calc(100% - 15px) 100%, 15px 100%, 0% 50%);
}

.content-link:hover {
  background: var(--accent-teal);
  color: white;
  transform: translateY(-2px);
}

.content-link:before {
  content: "→ ";
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .container {
    padding: 0 1rem;
  }
}