:root {
  --bg: #090909;
  --surface: #121212;
  --surface-2: #1a1a1a;
  --text: #f5f5f5;
  --muted: #b0b0b0;
  --accent: #d4001a;
  --accent-2: #ff3a4c;
  --border: #2b2b2b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at 80% -10%, rgba(212, 0, 26, 0.18), transparent 38%),
    radial-gradient(circle at 0% 20%, rgba(255, 58, 76, 0.12), transparent 35%),
    linear-gradient(165deg, #060606 0%, var(--bg) 60%, #0d0d0d 100%);
  color: var(--text);
  line-height: 1.6;
}

.container {
  width: min(1080px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px);
  background: rgba(8, 8, 8, 0.84);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  gap: 1.2rem;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.main-nav a:hover {
  color: var(--text);
}

.main-nav a {
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}

.main-nav a:hover::after {
  transform: scaleX(1);
}

.hero {
  padding: 6.5rem 0 3.5rem;
  position: relative;
}

.eyebrow {
  color: var(--accent-2);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin-top: 0.3rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.15;
  max-width: 16ch;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.hero-copy {
  color: var(--muted);
  max-width: 58ch;
}


.hero-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
}

.hero-photo-wrap {
  margin: 0;
  display: flex;
  justify-content: center;
  position: relative;
  animation: floatPortrait 5.5s ease-in-out infinite;
}

.hero-photo-wrap::before {
  content: "";
  position: absolute;
  width: min(390px, 108%);
  aspect-ratio: 1 / 1;
  border-radius: 1.5rem;
  background: conic-gradient(from 180deg, rgba(113, 160, 255, 0.25), rgba(139, 255, 222, 0.55), rgba(113, 160, 255, 0.25));
  filter: blur(14px);
  z-index: 0;
  animation: rotateGlow 8s linear infinite;
}

.hero-photo {
  width: min(360px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 1.2rem;
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 1;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  animation: breathePhoto 4.2s ease-in-out infinite;
}

.hero-photo:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 24px 48px rgba(10, 16, 34, 0.6), 0 0 28px rgba(113, 160, 255, 0.25);
}


.floating-cube {
  width: 90px;
  height: 90px;
  position: absolute;
  right: 2rem;
  top: 1rem;
  transform-style: preserve-3d;
  animation: spinCube 12s linear infinite;
  pointer-events: none;
}

.floating-cube .face {
  position: absolute;
  width: 90px;
  height: 90px;
  border: 1px solid rgba(139, 255, 222, 0.45);
  background: rgba(113, 160, 255, 0.08);
  box-shadow: inset 0 0 20px rgba(139, 255, 222, 0.1);
}

.face-front { transform: translateZ(45px); }
.face-back { transform: rotateY(180deg) translateZ(45px); }
.face-left { transform: rotateY(-90deg) translateZ(45px); }
.face-right { transform: rotateY(90deg) translateZ(45px); }
.face-top { transform: rotateX(90deg) translateZ(45px); }
.face-bottom { transform: rotateX(-90deg) translateZ(45px); }

.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card-3d:hover {
  transform: perspective(900px) rotateX(4deg) rotateY(-6deg) translateY(-4px);
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.3);
}


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

@keyframes breathePhoto {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.01); }
}

@keyframes rotateGlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes spinCube {
  0% { transform: rotateX(-14deg) rotateY(0deg); }
  100% { transform: rotateX(-14deg) rotateY(360deg); }
}

.cta-row {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(180deg, #181818, #111111);
  transition: all 0.25s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(212, 0, 26, 0.25);
}

.btn-primary {
  background: linear-gradient(135deg, #b40016, var(--accent), var(--accent-2));
  border-color: transparent;
}

.section {
  padding: 3.5rem 0;
}

.section-muted {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

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

.card {
  background: linear-gradient(170deg, #151515, #101010);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1.1rem;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 0, 26, 0.45);
}

.card h3 {
  margin-top: 0;
}

.tagline {
  color: var(--accent-2);
  margin-top: -0.2rem;
}

.stack {
  color: var(--muted);
}

.timeline-item {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 0.9rem;
}

.meta {
  color: var(--muted);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
}

.skills-grid > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  padding: 1rem;
}

.contact-wrap {
  text-align: center;
}

.site-footer {
  padding: 1.4rem 0 2rem;
  color: var(--muted);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo-wrap,
  .hero-photo-wrap::before,
  .hero-photo,
  .floating-cube {
    animation: none;
  }
}

@media (max-width: 900px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    max-width: 300px;
  }

  .floating-cube {
    position: static;
    margin: 0 auto;
  }
}

@media (max-width: 700px) {
  .main-nav {
    display: none;
  }
}
