:root {
  --bg: #080b10;
  --surface: #0d1117;
  --surface2: #131920;
  --accent: #00e5ff;
  --accent2: #7c3aed;
  --accent3: #f59e0b;
  --text: #e8edf5;
  --text-dim: #6b7a8d;
  --text-muted: #3d4a58;
  --border: rgba(0,229,255,0.08);
  --border-hover: rgba(0,229,255,0.3);
  --glow: rgba(0,229,255,0.15);
  --glow-strong: rgba(0,229,255,0.35);
  --card-bg: rgba(13,17,23,0.9);
  --gradient: linear-gradient(135deg, #00e5ff 0%, #7c3aed 100%);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Bricolage Grotesque', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.7;
  cursor: none;
}

.cursor {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s ease;
  mix-blend-mode: screen;
}
.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1.5px solid rgba(0,229,255,0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transition: all 0.18s ease;
  transform: translate(-13px, -13px);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2.5rem;
  background: rgba(8,11,16,0.75);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.4s ease;
}
nav.scrolled { padding: 0.8rem 2.5rem; background: rgba(8,11,16,0.95); }

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--accent);
  letter-spacing: -0.5px;
  text-decoration: none;
}

.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.88rem;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.05em;
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }

header {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8rem 2rem 5rem;
  z-index: 1;
  overflow: hidden;
}

.header-orb { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,229,255,0.12) 0%, transparent 70%);
  top: -100px; left: -100px;
  animation: float 8s ease-in-out infinite;
}
.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(124,58,237,0.1) 0%, transparent 70%);
  bottom: 0; right: -80px;
  animation: float 10s ease-in-out infinite reverse;
}
.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(245,158,11,0.06) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse-orb 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(5deg); }
}
@keyframes pulse-orb {
  0%, 100% { opacity: 0.5; transform: translate(-50%,-50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%,-50%) scale(1.15); }
}

.hero-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s ease forwards;
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -3px;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.9s 0.35s ease forwards;
}
.hero-title .line-1 { display: block; color: var(--text); }
.hero-title .line-2 {
  display: block;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  max-width: 560px;
  color: var(--text-dim);
  font-weight: 300;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.9s 0.5s ease forwards;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: fadeUp 0.9s 0.65s ease forwards;
}

.btn {
  padding: 0.85rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.03em;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn:hover::before { opacity: 1; }
.btn-primary { background: var(--accent); color: #080b10; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 30px var(--glow-strong); }
.btn-outline { border: 1px solid var(--border-hover); color: var(--accent); background: transparent; }
.btn-outline:hover {
  background: rgba(0,229,255,0.07);
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 25px var(--glow);
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeIn 1s 1.2s ease forwards;
}
.scroll-indicator span {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.section-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1.5px;
  margin-bottom: 3.5rem;
  line-height: 1.1;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.7s 0.1s ease;
}
.section-label.visible, .section-title.visible { opacity: 1; transform: translateY(0); }

.featured-project {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.featured-project.visible { opacity: 1; transform: translateY(0); }
.featured-project:hover {
  border-color: var(--accent);
  box-shadow: 0 0 60px rgba(0,229,255,0.1), 0 20px 60px rgba(0,0,0,0.4);
}

.featured-badge {
  position: absolute;
  top: 1.5rem; left: 1.5rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,229,255,0.12);
  border: 1px solid rgba(0,229,255,0.3);
  border-radius: 4px;
  padding: 0.35rem 0.85rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
}
.featured-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.5s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0.3;} }

.featured-visual { position: relative; overflow: hidden; }
.featured-visual img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
  filter: brightness(0.7) saturate(1.2);
}
.featured-project:hover .featured-visual img { transform: scale(1.06); }
.featured-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 50%, var(--surface) 100%);
}

.featured-content {
  padding: 4rem 3rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.featured-number {
  font-family: 'Syne', sans-serif;
  font-size: 6rem;
  font-weight: 800;
  color: rgba(0,229,255,0.06);
  position: absolute;
  top: 1rem; right: 2rem;
  line-height: 1;
  pointer-events: none;
}
.featured-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent2);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.featured-title {
  font-family: 'Syne', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
  margin-bottom: 1.2rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.featured-desc {
  color: var(--text-dim);
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.8;
  font-weight: 300;
}
.featured-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent);
  text-decoration: none;
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: gap 0.3s ease;
}
.featured-link:hover { gap: 1rem; }
.featured-link svg { transition: transform 0.3s ease; }
.featured-link:hover svg { transform: translateX(3px); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  opacity: 0;
  transform: translateY(30px);
}
.project-card.visible { opacity: 1; transform: translateY(0); }
.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 30px var(--glow);
}

.card-img { position: relative; height: 190px; overflow: hidden; }
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.4s ease;
  filter: brightness(0.65) saturate(0.8);
}
.project-card:hover .card-img img { transform: scale(1.1); filter: brightness(0.8) saturate(1.2); }

.card-num {
  position: absolute;
  top: 1rem; right: 1rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.1em;
  z-index: 2;
}

.card-body { padding: 1.5rem; }
.card-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--accent2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.6rem;
}
.card-title a { color: var(--text); text-decoration: none; transition: color 0.3s; }
.card-title a:hover { color: var(--accent); }
.card-desc { color: var(--text-dim); font-size: 0.88rem; line-height: 1.7; font-weight: 300; }

.card-footer { padding: 0 1.5rem 1.5rem; display: flex; justify-content: flex-end; }
.card-arrow {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all 0.3s ease;
  text-decoration: none;
}
.project-card:hover .card-arrow { border-color: var(--accent); color: var(--accent); background: rgba(0,229,255,0.05); }

.tech-section { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 2rem 1rem;
  background: var(--surface2);
  transition: all 0.35s ease;
  opacity: 0;
  transform: scale(0.9);
}
.tech-item.visible { opacity: 1; transform: scale(1); }
.tech-item:hover { background: rgba(0,229,255,0.04); transform: scale(1.05); }
.tech-item img {
  width: 40px; height: 40px;
  transition: transform 0.35s ease, filter 0.35s ease;
  filter: grayscale(30%);
}
.tech-item:hover img { transform: scale(1.2) rotate(-3deg); filter: grayscale(0%) drop-shadow(0 0 8px var(--glow)); }
.tech-item span { font-family: 'DM Mono', monospace; font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.05em; }

.contact-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}
.contact-box.visible { opacity: 1; transform: translateY(0); }
.contact-box::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0,229,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.contact-title {
  font-family: 'Syne', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 1rem;
}
.contact-sub { color: var(--text-dim); font-size: 1rem; margin-bottom: 2.5rem; font-weight: 300; }
.contact-links { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-dim);
  text-decoration: none;
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.35s ease;
  letter-spacing: 0.03em;
}
.contact-link:hover {
  color: var(--accent);
  border-color: var(--border-hover);
  background: rgba(0,229,255,0.04);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--glow);
}

footer {
  position: relative;
  z-index: 1;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy { font-family: 'DM Mono', monospace; font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.05em; }
.footer-links { display: flex; gap: 2rem; }
.footer-links a { font-family: 'DM Mono', monospace; font-size: 0.78rem; color: var(--text-dim); text-decoration: none; letter-spacing: 0.05em; transition: color 0.3s; }
.footer-links a:hover { color: var(--accent); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(25px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 900px) {
  .featured-project { grid-template-columns: 1fr; min-height: auto; }
  .featured-visual { height: 240px; }
  .featured-visual::after { background: linear-gradient(180deg, transparent 50%, var(--surface) 100%); }
  .featured-content { padding: 2rem; }
  .featured-title { font-size: 2rem; }
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  footer { flex-direction: column; text-align: center; }
}
@media (max-width: 600px) {
  .section-wrapper { padding: 4rem 1.5rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-box { padding: 2.5rem 1.5rem; }
  .tech-grid { grid-template-columns: repeat(3, 1fr); }
  }
