:root {
  --bg:           #08080F;
  --surface:      #0F0F1A;
  --border:       rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);
  --text:         #E8E8F5;
  --muted:        rgba(232,232,245,0.45);
  --accent:       #8B7FF5;
  --accent-glow:  rgba(139,127,245,0.18);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}


.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}


.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(139,127,245,0.18) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 85% 90%,  rgba(90,140,245,0.09)  0%, transparent 55%),
    radial-gradient(ellipse 40% 35% at  5% 75%,  rgba(200,120,245,0.07) 0%, transparent 50%);
  animation: aurora 14s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes aurora {
  from { opacity: .75; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.06); }
}


.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black 20%, transparent 75%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 36px;
  backdrop-filter: blur(4px);
  animation: fade-up 0.8s cubic-bezier(.16,1,.3,1) both;
}

.hero-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.75); }
}

.hero-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(4.5rem, 14vw, 10rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: .95;
  color: var(--text);
  animation: fade-up 0.9s cubic-bezier(.16,1,.3,1) .1s both;
}

.hero-title .accent { color: var(--accent); }

.hero-tagline {
  margin-top: 22px;
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: var(--muted);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: fade-up 1s cubic-bezier(.16,1,.3,1) .2s both;
}

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
  animation: fade-in 1.5s ease 1s both;
}

.hero-scroll:hover { color: var(--text); }

.hero-scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, transparent, var(--muted));
  animation: line-grow 2s ease-in-out infinite;
}

@keyframes line-grow {
  0%, 100% { transform: scaleY(0.5); opacity: .4; transform-origin: top; }
  50%       { transform: scaleY(1);   opacity: 1;  transform-origin: top; }
}


.projects {
  padding: 110px 24px 130px;
  max-width: 1020px;
  margin: 0 auto;
}

.section-label {
  text-align: center;
  margin-bottom: 64px;
}

.section-label h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--text);
}

.section-label p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.35s cubic-bezier(.16,1,.3,1), box-shadow 0.35s ease;
}


.card::before {
  content: '';
  position: absolute;
  top: -1px; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}


.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, var(--accent-glow), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: 0 24px 70px rgba(0,0,0,0.45);
}

.card:hover::before,
.card:hover::after { opacity: 1; }

.card-icon {
  font-size: 2.4rem;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  line-height: 1;
}

.card-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.card-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.card-desc {
  font-size: 0.87rem;
  line-height: 1.7;
  color: var(--muted);
  flex: 1;
  position: relative;
  z-index: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  position: relative;
  z-index: 1;
}

.card-cta {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.card:hover .card-cta { gap: 10px; }

.card-arrow {
  transition: transform 0.2s ease;
}

.card:hover .card-arrow { transform: translateX(3px); }


footer {
  border-top: 1px solid var(--border);
  padding: 36px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover { color: var(--text); }


@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}


.card { animation: fade-up .7s cubic-bezier(.16,1,.3,1) both; }
.card:nth-child(1) { animation-delay: .05s; }
.card:nth-child(2) { animation-delay: .15s; }
.card:nth-child(3) { animation-delay: .25s; }
.card:nth-child(4) { animation-delay: .35s; }


@media (max-width: 540px) {
  .cards { grid-template-columns: 1fr; }
  .projects { padding: 80px 18px 100px; }
}
