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

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

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: 
    radial-gradient(ellipse at 20% 0%, rgba(26, 26, 46, 0.8) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(22, 33, 62, 0.6) 0%, transparent 50%),
    #0a0a0f;
  color: #f8fafc;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated background orbs */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
  z-index: -1;
}

body::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
  top: -200px;
  left: -100px;
  animation: float 20s ease-in-out infinite;
}

body::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
  bottom: -150px;
  right: -100px;
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection styling */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: #f8fafc;
}

/* Portfolio card styles */
.portfolio-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
  margin-bottom: 2rem;
  overflow: hidden;
}

.portfolio-card:hover {
  transform: translateY(-5px);
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(255, 255, 255, 0.15);
}

.portfolio-card h3 {
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: 1.75rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portfolio-card .year {
  font-size: 1rem;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-weight: 600;
  background: rgba(34, 197, 94, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.portfolio-card p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  max-width: 80ch;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tech-badge {
  font-size: 0.8rem;
  padding: 0.35rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 99px;
  color: var(--color-text-muted);
  transition: var(--transition-fast);
}

.tech-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.2);
}

.portfolio-images img {
  border-radius: 12px !important;
  transition: var(--transition-smooth);
  border: 1px solid var(--glass-border);
}

.portfolio-images img:hover {
  transform: scale(1.02);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Archive section */
.archive-card {
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: all 0.3s ease;
  height: 100%;
}

.archive-card:hover {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(30, 41, 59, 0.5);
}

.archive-card h3 {
  color: #e2e8f0;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.archive-card h3 a {
  color: #38bdf8;
  text-decoration: none;
}

.archive-card h3 a:hover {
  text-decoration: underline;
}

.archive-card .year {
  color: #64748b;
  font-weight: 500;
}

.archive-card p {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0;
}

/* Portfolio images */
.portfolio-img,
.archive-img {
  border: 1px solid rgba(148, 163, 184, 0.15);
  transition: all 0.3s ease;
  cursor: pointer;
  aspect-ratio: 16/10;
  width: 100%;
}

.portfolio-img {
  object-fit: contain;
  padding: 0.35rem;
  background: rgba(2, 6, 23, 0.35);
}

.archive-img {
  object-fit: cover;
  object-position: top center;
}

.portfolio-img:hover,
.archive-img:hover {
  transform: scale(1.02);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.portfolio-images,
.archive-images {
  margin-top: 1rem;
}

.portfolio-images a.glightbox,
.archive-images a.glightbox {
  display: block;
}

.archive-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(30, 41, 59, 0.25);
  transition: all 0.3s ease;
}

.archive-toggle-text {
  flex: 1 1 auto;
  padding-right: 1rem;
}

.archive-toggle:hover {
  background: rgba(30, 41, 59, 0.35);
  border-color: rgba(148, 163, 184, 0.2);
}

.archive-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.archive-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.18);
  color: #e2e8f0;
  flex: 0 0 auto;
}

.archive-toggle-icon i {
  font-size: 1.1rem;
}

.archive-toggle .archive-icon-minus {
  display: none;
}

.archive-toggle[aria-expanded="true"] .archive-icon-plus {
  display: none;
}

.archive-toggle[aria-expanded="true"] .archive-icon-minus {
  display: inline-block;
}
