/* ================================================
   FROM FRIENDS PORTFOLIO - Dark Mode Theme
   Primary Accent: #FF5722
   ================================================ */

/* === VARIABLES === */
:root {
  --background-color: #000;
  --text-color: #eaeaea;
  --secondary-text-color: #a0a0a0;
  --border-color: #333;
  --accent-color: #FF5722;
  --card-background: #111;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  min-height: 100vh;
  padding: 2rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
}

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

a:hover {
  text-decoration: underline;
}

/* === SITE HEADER (for blog/portfolio pages) === */
.site-header {
  display: none;
}

.has-site-header .site-header {
  display: block;
  padding: 1.5rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

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

.nav-logo {
  height: 20px;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--secondary-text-color);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-color);
  text-decoration: none;
}

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

/* === MAIN CONTENT === */
.main-content {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  flex-grow: 1;
}

/* === HEADER SECTION === */
.header {
  background-color: #0a0a0a;
  border-radius: 12px;
  padding: 3rem 1.5rem 0.5rem 1.5rem;
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
  text-align: left;
}

.logo {
  height: 27px;
  margin-bottom: 2rem;
}

.main-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: #d3d3d3;
}

.spraypaint-logo {
  height: auto;
  width: 100%;
  margin-bottom: 0;
  display: block;
}

.subtitle {
  font-size: clamp(1rem, 3vw, 1.4rem);
  color: #888888;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

/* === LINKS === */
.link-container {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.section-link-container {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background-color: var(--accent-color);
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  flex-grow: 1;
  justify-content: center;
}

.primary-link:hover {
  opacity: 0.9;
  text-decoration: none;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background-color: transparent;
  color: #ffffff;
  text-decoration: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.secondary-link:hover {
  border-color: #666666;
  text-decoration: none;
}

.arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.primary-link:hover .arrow,
.secondary-link:hover .arrow {
  transform: translateX(3px);
}

/* === ACCORDION === */
.accordion-item {
  background-color: #0a0a0a;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.accordion-item:hover {
  border-color: #555555;
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.accordion-header:hover {
  background-color: #0f0f0f;
}

.accordion-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.accordion-count {
  font-size: 0.85rem;
  color: #666666;
  margin-left: 0.5rem;
}

.accordion-icon {
  font-size: 1.2rem;
  color: #888888;
  transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-preview {
  padding: 0 1.5rem 1rem 1.5rem;
}

.show-all-btn {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background-color: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.75rem;
}

.show-all-btn:hover {
  border-color: #555555;
  background-color: #0f0f0f;
}

.accordion-item.active .show-all-btn {
  display: none;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
}

.accordion-item.active .accordion-content {
  max-height: 5000px;
  transition: max-height 0.3s ease;
}

.accordion-body {
  padding: 0 1.5rem 1.5rem 1.5rem;
  border-top: 1px solid #222222;
  padding-top: 1rem;
}

.preview-label {
  font-size: 0.7rem;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

/* === ITEMS === */
.item,
#news li,
#tools li,
#generative-art li,
#awards li,
#blog li {
  list-style-type: none;
  background: #0f0f0f;
  border: 1px solid #222222;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

#news ul,
#tools ul,
#generative-art ul,
#awards ul,
#blog ul {
  padding-left: 0;
}

.description {
  color: var(--secondary-text-color);
  margin-bottom: 0.5rem;
  margin-top: 0.25rem;
}

.tag {
  display: inline-block;
  background-color: transparent;
  color: #666;
  border: 1px solid #333;
  font-size: 0.7rem;
  padding: 0.1rem 0.8rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  font-weight: 500;
  vertical-align: middle;
}

.sold-out-tag {
  display: inline-block;
  background-color: var(--background-color);
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
  font-size: 0.7rem;
  padding: 0.1rem 0.8rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  font-weight: 500;
  vertical-align: middle;
}

/* === NEWS ITEMS === */
.news-item-with-thumb {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.news-thumb-wrapper {
  width: 100px;
  height: 100px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.news-thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-thumbnail {
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
  border-radius: 4px;
}

#awards .news-thumbnail {
  width: 100%;
}

#generative-art .news-thumbnail,
.genart-thumbnail {
  width: 50%;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* === CARD CONTENT === */
.card-content {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.card-content > a {
  display: block;
}

strong {
  font-size: 1.1rem;
  font-weight: 600;
}

/* === LOGO BELT === */
.logo-belt {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 2rem 0;
  margin: 1.5rem 0;
}

.logo-belt img {
  height: 40px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.logo-belt img:hover {
  opacity: 1;
}

/* === CONTACT === */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.contact-item {
  padding: 1rem;
  background-color: #0f0f0f;
  border: 1px solid #222222;
  border-radius: 6px;
  text-decoration: none;
  color: #ffffff;
  transition: all 0.2s ease;
  display: block;
}

.contact-item:hover {
  border-color: #444444;
  text-decoration: none;
}

.contact-label {
  font-size: 0.75rem;
  color: #666666;
  margin-bottom: 0.25rem;
}

.contact-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: #ffffff;
}

/* === FOOTER === */
.site-footer {
  text-align: left;
  padding: 2rem 0 2rem 1.5rem;
  margin-top: 3rem;
  max-width: 900px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.footer-logo {
  height: 20px;
  display: block;
}

/* === BLOG/PORTFOLIO PAGES === */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-header h1 .mdi {
  color: var(--accent-color);
}

.page-description {
  color: var(--secondary-text-color);
  font-size: 1.1rem;
}

/* === BLOG LIST === */
.blog-list,
.portfolio-list {
  display: grid;
  gap: 1rem;
}

.blog-card,
.portfolio-card {
  background: #0a0a0a;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.2s ease;
}

.blog-card:hover,
.portfolio-card:hover {
  border-color: #555555;
}

.blog-card h2,
.portfolio-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.blog-card h2 a,
.portfolio-card h2 a {
  color: var(--text-color);
  transition: color 0.2s ease;
}

.blog-card h2 a:hover,
.portfolio-card h2 a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.blog-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #666666;
  margin-bottom: 0.75rem;
}

.post-tags,
.blog-tags,
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-color);
  font-weight: 500;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.card-link:hover {
  text-decoration: underline;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #222222;
}

.card-footer time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #666666;
}

/* === SINGLE POST/PORTFOLIO === */
.blog-post,
.portfolio-item {
  max-width: 800px;
  margin: 0 auto;
}

.post-header,
.portfolio-header {
  margin-bottom: 2rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--secondary-text-color);
  font-weight: 500;
  margin-bottom: 1.5rem;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.post-header h1,
.portfolio-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.post-meta,
.portfolio-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  color: #666666;
  margin-bottom: 1rem;
}

.post-meta time,
.portfolio-meta time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.client {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--secondary-text-color);
  font-weight: 500;
}

.tech-stack {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: #0a0a0a;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.tech-stack h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--secondary-text-color);
}

.tech-stack ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.tech-stack li {
  padding: 0.5rem 1rem;
  background: #0f0f0f;
  border: 1px solid #222222;
  border-radius: 4px;
  font-size: 0.875rem;
  margin-bottom: 0;
}

/* === CONTENT STYLING === */
.post-content,
.portfolio-content {
  line-height: 1.8;
  font-size: 1.1rem;
  color: var(--secondary-text-color);
}

.post-content h2,
.portfolio-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-color);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.post-content h3,
.portfolio-content h3 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-color);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-content p,
.portfolio-content p {
  margin-bottom: 1rem;
}

.post-content ul,
.post-content ol,
.portfolio-content ul,
.portfolio-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.post-content li,
.portfolio-content li {
  margin-bottom: 0.5rem;
  list-style: disc;
  background: none;
  border: none;
  padding: 0;
}

.post-content ol li,
.portfolio-content ol li {
  list-style: decimal;
}

.post-content strong,
.portfolio-content strong {
  color: var(--text-color);
  font-weight: 600;
  font-size: inherit;
}

.post-content a,
.portfolio-content a {
  color: var(--accent-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-content code,
.portfolio-content code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.875em;
  padding: 0.2em 0.4em;
  background: #0f0f0f;
  border-radius: 4px;
  color: var(--accent-color);
}

.post-content pre,
.portfolio-content pre {
  background: #0a0a0a;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.post-content pre code,
.portfolio-content pre code {
  background: none;
  padding: 0;
  color: var(--secondary-text-color);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* === PORTFOLIO LINKS === */
.portfolio-links {
  display: flex;
  gap: 0.75rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent-color);
  color: #ffffff;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background-color: transparent;
  color: #ffffff;
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: #666666;
}

/* === POST FOOTER === */
.post-footer,
.portfolio-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  margin-top: 3rem;
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: #666666;
}

.empty-state .mdi {
  font-size: 4rem;
  opacity: 0.3;
  margin-bottom: 1rem;
  display: block;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  .header {
    padding: 2rem 1.5rem;
  }

  .news-item-with-thumb {
    flex-direction: column;
  }

  .news-thumb-wrapper {
    width: 100%;
    height: auto;
  }

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

  .card-content {
    grid-template-columns: 1fr;
  }

  .post-header h1,
  .portfolio-header h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .logo-belt img {
    height: 20px;
  }

  .section-link-container {
    flex-direction: column;
  }

  .secondary-link {
    width: 100%;
    justify-content: center;
  }
}

/* === SELECTION === */
::selection {
  background: var(--accent-color);
  color: white;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}
