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

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

:root {
  --orange: #ff6b2b;
  --pink: #e91e8c;
  --red: #ff5252;
  --yellow: #ffd600;
  --blue: #4da3ff;
  --green: #34d399;
  --white: #ffffff;

  --bg: #0a0812;
  --bg-soft: #110d1d;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(233, 30, 140, 0.45);

  --dark: #f4f2fa;
  --text: #f4f2fa;
  --gray: #a39fb8;
  --light: var(--bg);

  --gradient: linear-gradient(135deg, var(--orange) 0%, var(--pink) 100%);
  --gradient-soft: linear-gradient(135deg, rgba(255, 107, 43, 0.12) 0%, rgba(233, 30, 140, 0.12) 100%);

  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.55);
  --glow: 0 0 40px rgba(233, 30, 140, 0.35);

  --font: 'Nunito', system-ui, sans-serif;
  --font-display: 'Unbounded', 'Nunito', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Film-grain noise overlay for a digital texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: rgba(233, 30, 140, 0.4);
  color: var(--white);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--orange), var(--pink));
  border-radius: 10px;
  border: 2px solid var(--bg);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: min(1140px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------- Background ---------- */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse 80% 55% at 70% -10%, rgba(233, 30, 140, 0.18), transparent 65%),
    radial-gradient(ellipse 65% 45% at 12% 18%, rgba(255, 107, 43, 0.14), transparent 60%),
    radial-gradient(ellipse 55% 45% at 85% 80%, rgba(77, 110, 255, 0.10), transparent 65%),
    var(--bg);
}

.bg-sparkles {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
}

.bg-sparkles::before,
.bg-sparkles::after {
  content: '';
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
}

.bg-sparkles::before {
  background: radial-gradient(circle, rgba(233, 30, 140, 0.35), transparent 70%);
  top: -180px;
  right: -120px;
  animation: drift 16s ease-in-out infinite alternate;
}

.bg-sparkles::after {
  background: radial-gradient(circle, rgba(255, 107, 43, 0.28), transparent 70%);
  bottom: -200px;
  left: -140px;
  animation: drift 20s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(60px, 50px) scale(1.15); }
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(10, 8, 18, 0.72);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  background: rgba(10, 8, 18, 0.9);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

/* Data-stream line under the header */
.header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%, transparent 30%,
    rgba(255, 107, 43, 0.9) 45%, rgba(233, 30, 140, 0.9) 55%,
    transparent 70%, transparent 100%);
  background-size: 250% 100%;
  animation: stream 5s linear infinite;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.header.scrolled::after {
  opacity: 1;
}

@keyframes stream {
  from { background-position: 125% 0; }
  to { background-position: -125% 0; }
}

/* Scroll progress bar (created in script.js) */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  z-index: 1000;
  background: var(--gradient);
  box-shadow: 0 0 12px rgba(233, 30, 140, 0.7);
  transform-origin: left;
  transform: scaleX(0);
  pointer-events: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.875rem 0;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.logo img {
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--border), 0 4px 14px rgba(233, 30, 140, 0.25);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.75rem;
  margin-left: auto;
}

.nav-links a {
  text-decoration: none;
  color: var(--gray);
  font-weight: 700;
  font-size: 0.95rem;
  position: relative;
  padding: 0.25rem 0;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient);
  transition: right 0.3s ease;
}

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

.nav-links a:hover::after,
.nav-links a.nav-active::after {
  right: 0;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  width: 42px;
  height: 42px;
  padding: 0 9px;
}

.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav.open .burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav.open .burger span:nth-child(2) {
  opacity: 0;
}

.nav.open .burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.65rem;
  border-radius: 50px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition),
    background var(--transition), border-color var(--transition), color var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  background: var(--gradient);
  color: var(--white);
  box-shadow: 0 4px 18px rgba(233, 30, 140, 0.4);
}

.btn-sm:hover {
  box-shadow: 0 8px 28px rgba(233, 30, 140, 0.55);
}

.btn-primary {
  background: var(--gradient);
  color: var(--white);
  box-shadow: 0 8px 30px rgba(233, 30, 140, 0.4);
}

.btn-primary {
  overflow: hidden;
}

/* Shimmer sweep */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -80%;
  width: 50%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}

.btn-primary:hover {
  box-shadow: 0 12px 42px rgba(233, 30, 140, 0.55);
}

.btn-primary:hover::before {
  left: 130%;
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  border-color: var(--border-hover);
  color: var(--white);
  background: var(--surface-strong);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 3rem;
  padding: 5rem 0 6.5rem;
  min-height: calc(100vh - 80px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
  backdrop-filter: blur(8px);
}

/* Blinking terminal cursor */
.hero-badge::after {
  content: '_';
  color: var(--pink);
  font-weight: 700;
  animation: blink 1.1s steps(2) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 12px rgba(233, 30, 140, 0.9);
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.8); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.highlight {
  background: linear-gradient(110deg, var(--orange), var(--pink), #8b5cf6, var(--pink), var(--orange));
  background-size: 280% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 7s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-text {
  font-size: 1.15rem;
  color: var(--gray);
  max-width: 480px;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--gray);
  font-weight: 600;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-ring {
  position: relative;
  animation: float 5s ease-in-out infinite;
}

.logo-ring::before {
  content: '';
  position: absolute;
  inset: -36px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--orange), var(--pink), #6d4dff, var(--orange));
  opacity: 0.45;
  filter: blur(50px);
  z-index: -1;
  animation: spin 14s linear infinite;
}

.logo-ring::after {
  content: '';
  position: absolute;
  inset: -18px;
  border-radius: calc(var(--radius-lg) + 14px);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), transparent 50%);
  z-index: -1;
}

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

.hero-logo {
  width: min(320px, 78vw);
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow:
    0 0 0 1px var(--border),
    0 30px 70px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(233, 30, 140, 0.25);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ---------- Sections ---------- */
.section {
  padding: 5.5rem 0;
}

.section-alt {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 0 1rem;
  padding: 5.5rem 0;
  overflow: hidden;
}

.section-alt::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(233, 30, 140, 0.6), transparent);
}

.section-header {
  text-align: center;
  margin-bottom: 3.25rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

.section-tag::before {
  content: '[ ';
  opacity: 0.6;
}

.section-tag::after {
  content: ' ]';
  opacity: 0.6;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.section-desc {
  color: var(--gray);
  max-width: 580px;
  margin: 1.1rem auto 0;
  font-size: 1.05rem;
}

.inline-link {
  color: #ff7eb8;
  font-weight: 700;
  text-decoration: none;
  transition: color var(--transition);
}

.inline-link:hover {
  color: var(--orange);
  text-decoration: underline;
}

/* ---------- History pages ---------- */
.page-hero {
  padding: 3.5rem 0 2rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gray);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  margin-bottom: 1.75rem;
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--surface);
  transition: color var(--transition), border-color var(--transition), transform var(--transition);
}

.back-link:hover {
  color: var(--text);
  border-color: var(--border-hover);
  transform: translateX(-3px);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 1rem 0;
}

.page-hero-text {
  font-size: 1.1rem;
  color: var(--gray);
  max-width: 640px;
  line-height: 1.75;
}

.page-project-header {
  margin-bottom: 1rem;
  justify-content: flex-start;
  gap: 0.75rem;
}

.page-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--orange), var(--pink) 50%, rgba(233, 30, 140, 0.15));
  border-radius: 2px;
}

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

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 0.3rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--pink);
  box-shadow: 0 0 14px rgba(233, 30, 140, 0.5);
  z-index: 1;
}

.timeline-item-highlight::before {
  border-color: var(--yellow);
  background: var(--orange);
  box-shadow: 0 0 0 5px rgba(255, 107, 43, 0.18), 0 0 20px rgba(255, 214, 0, 0.5);
}

.timeline-date {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #ff9ecf;
  background: rgba(233, 30, 140, 0.12);
  border: 1px solid rgba(233, 30, 140, 0.25);
  border-radius: 50px;
  padding: 0.2rem 0.75rem;
  margin-bottom: 0.7rem;
}

.timeline-content h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.timeline-content p {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.7;
}

.timeline-content a {
  color: #ff7eb8;
  font-weight: 700;
  text-decoration: none;
}

.timeline-content a:hover {
  text-decoration: underline;
}

.timeline-post {
  display: inline-block;
  margin-top: 0.75rem;
  margin-right: 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue) !important;
  text-decoration: none;
  transition: color var(--transition);
}

.timeline-post:hover {
  color: #ff7eb8 !important;
  text-decoration: underline;
}

.timeline-details {
  margin-top: 0.85rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 0.875rem;
  color: var(--gray);
  line-height: 1.65;
}

.timeline-details ul {
  margin: 0.5rem 0 0 1.1rem;
}

.timeline-details li {
  margin-bottom: 0.25rem;
}

.timeline-content code {
  font-size: 0.8rem;
  word-break: break-all;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  color: #ffd6ea;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.about-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
}

.about-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  background: var(--surface-strong);
}

/* Cursor-tracking spotlight (coordinates set in script.js) */
.about-card::after,
.project-card::after,
.team-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 142, 198, 0.1), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.about-card:hover::after,
.project-card:hover::after,
.team-card:hover::after {
  opacity: 1;
}

.card-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}

.card-icon-red { background: rgba(255, 82, 82, 0.14); box-shadow: 0 0 24px rgba(255, 82, 82, 0.12); }
.card-icon-blue { background: rgba(77, 163, 255, 0.14); box-shadow: 0 0 24px rgba(77, 163, 255, 0.12); }
.card-icon-yellow { background: rgba(255, 214, 0, 0.14); box-shadow: 0 0 24px rgba(255, 214, 0, 0.12); }

.about-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.625rem;
}

.about-card p {
  color: var(--gray);
  font-size: 0.95rem;
}

/* ---------- Projects ---------- */
.projects-group-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray);
  margin-bottom: 1.25rem;
}

.projects-group-title:not(.projects-group-title-toggle)::before {
  content: '> ';
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.projects-group-title:not(.projects-group-title-toggle)::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.projects-group-title:not(:first-of-type):not(.projects-group-title-toggle) {
  margin-top: 3rem;
}

.projects-archive {
  margin-top: 3rem;
}

.projects-group-title-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: color var(--transition), border-color var(--transition);
}

.projects-group-title-toggle::-webkit-details-marker {
  display: none;
}

.projects-group-title-toggle::marker {
  content: '';
}

.projects-group-title-toggle:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

.projects-group-title-toggle::after {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--transition);
  flex-shrink: 0;
  opacity: 0.7;
}

.projects-archive[open] .projects-group-title-toggle::after {
  transform: rotate(45deg);
}

.projects-archive-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.75;
  margin-left: auto;
}

.projects-archive .projects-grid {
  margin-top: 1.25rem;
}

.projects-group-title-foundation {
  color: var(--blue);
}

.projects-group-desc {
  color: var(--gray);
  font-size: 0.95rem;
  margin: -0.5rem 0 1.25rem;
  max-width: 640px;
}

.projects-grid-foundation .project-card-muted {
  border-color: rgba(77, 163, 255, 0.2);
  background: linear-gradient(135deg, rgba(77, 163, 255, 0.05) 0%, rgba(233, 30, 140, 0.04) 100%);
}

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

.projects-grid-archive {
  grid-template-columns: repeat(2, 1fr);
  max-width: 760px;
}

.project-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.75rem;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition),
    background var(--transition), box-shadow var(--transition);
}

.project-card::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -40%;
  width: 70%;
  height: 120%;
  background: radial-gradient(circle, rgba(233, 30, 140, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.project-card:hover,
.project-card-link:hover {
  border-color: var(--border-hover);
  background: var(--surface-strong);
  transform: translateY(-4px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.4), 0 0 30px rgba(233, 30, 140, 0.08);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.project-card-link .project-link {
  margin-top: auto;
}

.project-card-muted {
  opacity: 0.7;
}

.project-card-muted:hover {
  opacity: 1;
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-badge {
  display: inline-block;
  padding: 0.28rem 0.7rem;
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
}

.badge-active {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.35);
  color: var(--green);
}

.badge-dev {
  background: rgba(77, 163, 255, 0.12);
  border-color: rgba(77, 163, 255, 0.35);
  color: var(--blue);
}

.badge-frozen {
  background: rgba(255, 167, 38, 0.12);
  border-color: rgba(255, 167, 38, 0.35);
  color: #ffa726;
}

.badge-closed {
  background: rgba(163, 159, 184, 0.1);
  border-color: rgba(163, 159, 184, 0.3);
  color: var(--gray);
}

.project-type {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.project-type::before {
  content: '# ';
  opacity: 0.55;
}

.project-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.625rem;
  color: var(--text);
}

.project-card p {
  color: var(--gray);
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 1.25rem;
}

.project-link {
  display: inline-block;
  color: #ff7eb8;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  transition: color var(--transition);
}

.project-link:hover {
  color: var(--orange);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 760px;
  margin-inline: auto;
}

.team-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2.25rem 2rem;
  border-radius: var(--radius);
  text-align: center;
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.team-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(233, 30, 140, 0.7), transparent);
}

.team-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  background: var(--surface-strong);
}

.team-avatar {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 2.25rem;
  border-radius: 50%;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  box-shadow: 0 0 30px rgba(233, 30, 140, 0.15);
}

.team-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.375rem;
}

.team-role {
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.75rem;
}

.team-card p:last-child {
  color: var(--gray);
  font-size: 0.9rem;
}

/* ---------- Contact ---------- */
.contact-block {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3rem;
  background:
    radial-gradient(ellipse 90% 100% at 100% 0%, rgba(255, 255, 255, 0.12), transparent 55%),
    var(--gradient);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  color: var(--white);
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 70px rgba(233, 30, 140, 0.3);
}

.contact-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 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='%23ffffff' fill-opacity='0.06'%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");
  pointer-events: none;
}

.contact-content {
  position: relative;
  z-index: 1;
}

.contact-block .section-tag {
  background: none;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.85);
  color: rgba(255, 255, 255, 0.85);
}

.contact-block h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  font-weight: 700;
  margin: 0.75rem 0 1rem;
  line-height: 1.2;
}

.contact-block > .contact-content > p {
  opacity: 0.92;
  margin-bottom: 2rem;
  max-width: 440px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--white);
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateX(6px);
}

.contact-icon {
  font-size: 1.5rem;
}

.contact-item strong {
  display: block;
  font-weight: 800;
  font-size: 0.875rem;
}

.contact-item span:last-child {
  font-size: 0.9rem;
  opacity: 0.88;
}

.contact-visual {
  position: relative;
  z-index: 1;
}

.contact-visual img {
  border-radius: var(--radius);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
  animation: float 5s ease-in-out infinite 1s;
}

/* ---------- Footer ---------- */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}

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

.logo-sm {
  font-size: 1.05rem;
}

.logo-sm img {
  border-radius: 8px;
}

.footer p {
  color: var(--gray);
  font-size: 0.875rem;
}

.footer a {
  color: #ff7eb8;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer a:hover {
  color: var(--orange);
  text-decoration: underline;
}

.footer-domains {
  flex: 1 1 100%;
  text-align: center;
}

.footer-domains a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gray);
  font-weight: 400;
}

.footer-domains a:hover {
  color: #ff7eb8;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav > .btn-sm {
    margin-left: auto;
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
  }

  .burger {
    display: flex;
  }

  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: -1.25rem;
    right: -1.25rem;
    margin: 0;
    background: rgba(13, 10, 22, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.25rem 1.5rem 1.5rem;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  }

  .nav.open .nav-links a {
    display: block;
    padding: 0.75rem 0.75rem;
    border-radius: 12px;
    font-size: 1.05rem;
  }

  .nav.open .nav-links a:hover,
  .nav.open .nav-links a.nav-active {
    background: var(--surface-strong);
  }

  .nav.open .nav-links a::after {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 2.5rem 0 4rem;
    min-height: auto;
  }

  .hero-text {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-logo {
    width: 190px;
  }

  .logo-ring::before {
    inset: -24px;
  }

  .section {
    padding: 3.75rem 0;
  }

  .section-alt {
    padding: 3.75rem 0;
  }

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

  .projects-grid,
  .projects-grid-archive {
    grid-template-columns: 1fr;
    max-width: none;
  }

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

  .contact-block {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 2.25rem 1.5rem;
  }

  .contact-block > .contact-content > p {
    margin-inline: auto;
  }

  .contact-links {
    align-items: stretch;
  }

  .contact-item {
    text-align: left;
  }

  .contact-visual {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .timeline::before {
    left: 6px;
  }

  .timeline-item {
    padding-left: 2.1rem;
  }

  .timeline-item::before {
    left: 0;
  }

  .page-hero-links {
    justify-content: center;
  }
}
