@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Outfit:wght@300;400;500;600;700&display=swap');

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

:root {
  --bg: hsl(222, 47%, 11%);
  --bg-card: hsl(222, 47%, 15%);
  --fg: hsl(45, 30%, 96%);
  --fg-muted: hsl(215, 20%, 65%);
  --primary: hsl(45, 93%, 47%);
  --primary-fg: hsl(222, 47%, 11%);
  --secondary: hsl(217, 33%, 17%);
  --border: hsl(217, 33%, 25%);
  --muted: hsl(217, 33%, 25%);
  --radius: 0.75rem;
  --font-heading: 'Amiri', serif;
  --font-body: 'Outfit', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(circle at 50% 0%, hsl(222, 47%, 20%, 0.5), transparent 70%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23daa520' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== NAVIGATION ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: hsla(222, 47%, 11%, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  text-decoration: none;
}

.nav-logo-icon {
  position: relative;
  width: 28px;
  height: 28px;
}

.nav-logo-icon .moon {
  font-size: 1.5rem;
  transform: rotate(-30deg);
  display: inline-block;
  color: var(--primary);
}

.nav-logo-icon .star {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 0.7rem;
  color: var(--primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.nav-logo-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--fg);
}

.nav-logo-text .highlight {
  color: var(--primary);
}

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

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  transition: color 0.2s;
  position: relative;
  padding: 0.25rem 0;
}

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 8px rgba(218, 165, 32, 0.8);
}

.nav-mobile-btn {
  display: none;
  background: none;
  border: none;
  color: var(--fg-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s;
}

.nav-mobile-btn:hover {
  color: var(--primary);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 1rem;
  gap: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg);
}

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

.nav-mobile a {
  display: block;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--fg-muted);
  transition: all 0.2s;
}

.nav-mobile a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg);
}

.nav-mobile a.active {
  background: rgba(218, 165, 32, 0.1);
  color: var(--primary);
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-btn { display: block; }
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-sm {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-md {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== GLASS PANEL ===== */
.glass-panel {
  background: hsla(222, 47%, 15%, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
  box-shadow: 0 0 20px rgba(218, 165, 32, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(218, 165, 32, 0.5);
  filter: brightness(1.1);
}

.btn-outline {
  background: transparent;
  color: var(--fg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
  border-radius: var(--radius);
}

.btn-full {
  width: 100%;
}

.btn-gold-ghost {
  background: rgba(218, 165, 32, 0.1);
  color: var(--primary);
  border: 1px solid rgba(218, 165, 32, 0.2);
}

.btn-gold-ghost:hover {
  background: rgba(218, 165, 32, 0.2);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(218, 165, 32, 0.1);
  color: var(--primary);
}

.badge-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--fg-muted);
}

/* ===== TEXT GRADIENT ===== */
.text-gradient {
  background: linear-gradient(to right, var(--primary), hsl(50, 90%, 70%), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 5rem 0 8rem;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero {
    padding: 3rem 0 4rem;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: rgba(218, 165, 32, 0.1);
  border: 1px solid rgba(218, 165, 32, 0.2);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: white;
  margin-bottom: 1.5rem;
}

@media (min-width: 769px) {
  .hero h1 {
    font-size: 4.5rem;
  }
}

.hero-desc {
  font-size: 1.125rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 2rem;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-img-wrap {
  position: relative;
}

.hero-img-glow {
  position: absolute;
  inset: -1rem;
  background: rgba(218, 165, 32, 0.2);
  filter: blur(48px);
  border-radius: 50%;
}

.hero-img-wrap img {
  position: relative;
  border-radius: 1rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  transition: transform 0.5s;
}

.hero-img-wrap:hover img {
  transform: scale(1.02);
}

/* ===== FEATURES GRID ===== */
.features {
  padding: 6rem 0;
  background: rgba(0, 0, 0, 0.2);
  position: relative;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  padding: 2rem;
  border-radius: 1rem;
}

.feature-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius);
  background: rgba(218, 165, 32, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: var(--primary);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1.5rem;
}

.cta-section p {
  color: var(--fg-muted);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  font-size: 1.125rem;
}

.cta-decor-1 {
  position: absolute;
  top: 50%;
  left: 0;
  width: 256px;
  height: 256px;
  background: rgba(218, 165, 32, 0.1);
  border-radius: 50%;
  filter: blur(48px);
  transform: translate(-50%, -50%);
}

.cta-decor-2 {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 384px;
  height: 384px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 50%;
  filter: blur(48px);
  transform: translate(50%, 50%);
}

/* ===== PAGE HEADER ===== */
.page-header {
  text-align: center;
  margin-bottom: 4rem;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

@media (min-width: 769px) {
  .page-header h1 {
    font-size: 3rem;
  }
}

.page-header p {
  color: var(--fg-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* ===== PROJECT GALLERY ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

.project-card {
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  border: 1px solid transparent;
}

.project-card:hover {
  border-color: rgba(218, 165, 32, 0.5);
  transform: translateY(-4px);
}

.project-card-img {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--muted);
}

.project-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.project-card:hover .project-card-img img {
  transform: scale(1.1);
}

.project-card-img .placeholder-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(218, 165, 32, 0.05);
  font-size: 2.5rem;
  color: rgba(218, 165, 32, 0.3);
}

.project-card-img .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, hsla(222, 47%, 11%, 0.9), transparent);
  opacity: 0.6;
}

.project-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card-body h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s;
}

.project-card:hover .project-card-body h3 {
  color: var(--primary);
}

.project-card-body .author {
  font-size: 0.875rem;
  color: rgba(218, 165, 32, 0.8);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.project-card-body .desc {
  font-size: 0.875rem;
  color: var(--fg-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
  flex: 1;
}

.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-card-footer {
  padding: 0 1.25rem 1.25rem;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 4rem;
}

.pagination .page-info {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
}

.pagination .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  border-radius: 1rem;
}

.empty-state h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg-muted);
}

.empty-state p {
  margin-top: 0.5rem;
  color: rgba(215, 200, 165, 0.4);
}

/* ===== LOADING ===== */
.loading-wrap {
  min-height: 60vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(218, 165, 32, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ===== FORM ===== */
.form-panel {
  border-radius: 1rem;
  padding: 2rem;
  border-top: 4px solid var(--primary);
}

@media (min-width: 769px) {
  .form-panel {
    padding: 3rem;
  }
}

.form-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.form-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.75rem;
}

.form-header p {
  color: var(--fg-muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  color: white;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--fg-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(218, 165, 32, 0.5);
}

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

.form-group .hint {
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-top: 0.375rem;
}

.form-group .error {
  font-size: 0.75rem;
  color: hsl(0, 62%, 50%);
  margin-top: 0.375rem;
}

.form-success {
  text-align: center;
  padding: 3rem 1rem;
}

.form-success h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.75rem;
}

.form-success p {
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
}

/* ===== RESOURCE CARDS ===== */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (max-width: 768px) {
  .resources-grid {
    grid-template-columns: 1fr;
  }
}

.resource-card {
  border-radius: 1rem;
  padding: 1.5rem;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.resource-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.resource-card-header .icon-wrap {
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: rgba(218, 165, 32, 0.1);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resource-card-header h2 {
  font-size: 1.25rem;
  color: white;
}

.resource-link {
  display: block;
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
  margin-bottom: 0.75rem;
}

.resource-link:last-child {
  margin-bottom: 0;
}

.resource-link:hover {
  border-color: rgba(218, 165, 32, 0.5);
  background: rgba(218, 165, 32, 0.05);
}

.resource-link-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.resource-link h4 {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
}

.resource-link:hover h4 {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.resource-link .ext-icon {
  color: var(--fg-muted);
  font-size: 0.875rem;
  transition: color 0.2s;
  flex-shrink: 0;
  margin-top: 2px;
}

.resource-link:hover .ext-icon {
  color: var(--primary);
}

.resource-link p {
  font-size: 0.875rem;
  color: var(--fg-muted);
  margin-top: 0.25rem;
}

/* ===== CONTACT ===== */
.contact-panel {
  text-align: center;
  padding: 2.5rem;
  border-radius: 1rem;
}

.contact-panel h1 {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
}

.contact-panel > p {
  color: var(--fg-muted);
  margin-bottom: 2rem;
}

.contact-btns {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-divider {
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-divider p {
  font-size: 0.875rem;
  color: var(--fg-muted);
}

/* ===== CONTENT PAGES ===== */
.content-page {
  min-height: calc(100vh - 64px);
  padding: 5rem 1rem;
}

.content-panel {
  border-radius: 1rem;
  padding: 2.5rem;
}

.content-panel h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1.5rem;
}

.content-panel h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.content-panel p {
  color: var(--fg-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.content-panel ul {
  list-style: disc;
  padding-left: 2rem;
  color: var(--fg-muted);
  margin-bottom: 1rem;
}

.content-panel ul li {
  margin-bottom: 0.5rem;
}

.content-panel strong {
  color: white;
}

/* ===== FOOTER ===== */
.footer {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 2rem 0;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-col h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
}

.footer-col p {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul a {
  font-size: 0.875rem;
  color: var(--fg-muted);
  transition: color 0.2s;
}

.footer-col ul a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--fg-muted);
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-1 { gap: 0.25rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== FADE IN ANIMATION ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
