/* Impressive dark theme, matched to PS3-style intro colors (cool blue/purple, minimal pink) */
:root {
  --bg: #000000;
  --bg-soft: #050312; /* same deep purple-black as loader */
  --card: #070718;
  --card-hover: #0b0b22;
  --accent: #6f8dff; /* cool PS3-style blue */
  --accent-glow: rgba(111, 141, 255, 0.45);
  --text: #f9f9ff;
  --text-soft: #9294aa;
  --border: rgba(255, 255, 255, 0.07);
  --radius: 16px;
  --radius-sm: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  scroll-behavior: smooth;
  background: #000000;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, sans-serif;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  position: relative;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html.page-ready body {
  opacity: 1;
  transform: none;
}

/* Starfield background */
.stars-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-repeat: repeat;
  opacity: 0.7;
}

.stars-layer-1 {
  background-image: radial-gradient(2px 2px at 20px 20px, rgba(255, 255, 255, 0.6) 0, transparent 60%),
    radial-gradient(1px 1px at 60px 80px, rgba(255, 255, 255, 0.45) 0, transparent 60%);
  background-size: 200px 200px;
  animation: starDrift1 60s linear infinite;
}

.stars-layer-2 {
  background-image: radial-gradient(1.5px 1.5px at 40px 120px, rgba(196, 206, 255, 0.7) 0, transparent 60%),
    radial-gradient(1px 1px at 160px 40px, rgba(196, 206, 255, 0.5) 0, transparent 60%);
  background-size: 260px 260px;
  animation: starDrift2 90s linear infinite;
  opacity: 0.5;
}

.stars-layer-3 {
  background-image: radial-gradient(2px 2px at 80px 40px, rgba(111, 141, 255, 0.8) 0, transparent 60%),
    radial-gradient(1px 1px at 120px 160px, rgba(255, 255, 255, 0.3) 0, transparent 60%);
  background-size: 320px 320px;
  animation: starDrift3 120s linear infinite;
  opacity: 0.35;
}

.stars-layer-4 {
  background-image:
    radial-gradient(1px 1px at 30px 30px, rgba(255, 255, 255, 0.6) 0, transparent 55%),
    radial-gradient(1px 1px at 90px 210px, rgba(196, 206, 255, 0.7) 0, transparent 55%),
    radial-gradient(1px 1px at 210px 90px, rgba(111, 141, 255, 0.9) 0, transparent 55%);
  background-size: 180px 220px;
  animation: starDrift4 80s linear infinite;
  opacity: 0.55;
}

@keyframes starDrift1 {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-200px, -200px, 0);
  }
}

@keyframes starDrift2 {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(260px, -260px, 0);
  }
}

@keyframes starDrift3 {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-320px, 320px, 0);
  }
}

@keyframes starDrift4 {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(220px, 180px, 0);
  }
}

/* Constellation overlay */
.stars-constellations {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.stars-constellations .constellation {
  stroke: rgba(160, 178, 255, 0.7);
  stroke-width: 0.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 1.5 4;
  animation: constellationPulse 10s ease-in-out infinite;
}

.stars-constellations circle {
  fill: rgba(220, 228, 255, 0.9);
  stroke: none;
}

@keyframes constellationPulse {
  0%,
  100% {
    opacity: 0.25;
    transform: translate3d(0, 0, 0);
  }
  50% {
    opacity: 0.7;
    transform: translate3d(1px, -1px, 0);
  }
}

/* Fullscreen loader - PS3-style intro */
.page-loader {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 10% 0, #050312, #000000 55%);
  z-index: 200;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  overflow: hidden;
}

.page-loader::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.12) 20%,
    rgba(255, 255, 255, 0) 60%
  );
  transform: translateX(-40%) skewY(-8deg);
  opacity: 0.7;
  mix-blend-mode: screen;
  animation: ps3Wave 5.5s ease-in-out infinite;
}

.ps3-logo-mark {
  font-size: clamp(40px, 4.4vw, 56px);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: #ffffff;
  font-weight: 500;
  text-indent: 0.4em;
  margin-bottom: 10px;
  background: linear-gradient(120deg, #ffffff 0%, #d5d5ff 40%, #ff375f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.45));
  animation: ps3FadeIn 1.2s ease-out forwards;
}

.ps3-logo-sub {
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
  margin-bottom: 26px;
  animation: ps3FadeIn 1.2s ease-out 0.2s forwards;
  opacity: 0;
}

.ps3-light-streak {
  position: relative;
  width: min(320px, 70vw);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 20%,
    rgba(255, 255, 255, 0.9) 50%,
    rgba(255, 255, 255, 0.4) 80%,
    rgba(255, 255, 255, 0) 100%
  );
  overflow: hidden;
  opacity: 0;
  animation: ps3FadeIn 1.2s ease-out 0.35s forwards;
}

.ps3-light-streak::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 50%, rgba(255, 255, 255, 0.8), transparent 60%);
  transform: translateX(-120%);
  animation: ps3Streak 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite 0.6s;
}

.page-loader.page-loader--hidden {
  opacity: 0;
  visibility: hidden;
}

@keyframes ps3Wave {
  0% {
    transform: translateX(-40%) skewY(-8deg);
    opacity: 0.8;
  }
  50% {
    transform: translateX(10%) skewY(-10deg);
    opacity: 1;
  }
  100% {
    transform: translateX(60%) skewY(-8deg);
    opacity: 0.75;
  }
}

@keyframes ps3FadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ps3Streak {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

/* Animated background gradient */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(213, 213, 255, 0.15) 0%, transparent 55%),
    radial-gradient(circle at 80% 75%, rgba(111, 141, 255, 0.12) 0%, transparent 55%),
    radial-gradient(circle at 10% 0, #050312, #000000 60%);
  pointer-events: none;
  z-index: 0;
  animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

::selection {
  background: var(--accent);
  color: #000;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

main {
  flex: 1;
}

.shell-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* Header / nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  background: rgba(0, 0, 0, 0.7);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

.nav-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #d5d5ff 45%, #6f8dff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-tag {
  font-size: 11px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--text-soft);
  transition: all 0.2s ease;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-link.is-active,
.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.is-active::after {
  transform: scaleX(1);
}

/* Hero */
.hero {
  padding-top: 80px;
  padding-bottom: 40px;
  position: relative;
}

.hero-layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero-block {
  position: relative;
}

.hero-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 20px;
  font-weight: 600;
  display: inline-block;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.2s forwards;
}

.hero-title {
  font-size: clamp(48px, 8vw, 72px);
  line-height: 1.1;
  margin: 0 0 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #ffffff 0%, #d5d5ff 45%, #6f8dff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.3s forwards;
}

.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-soft);
  margin: 0 0 32px;
  line-height: 1.6;
  max-width: 680px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.4s forwards;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.5s forwards;
}

.hero-tag {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  color: var(--text-soft);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.hero-tag:hover {
  border-color: var(--accent);
  background: rgba(111, 141, 255, 0.13);
  color: var(--text);
  transform: translateY(-2px);
}

.hero-body {
  font-size: 16px;
  color: var(--text-soft);
  margin-bottom: 40px;
  line-height: 1.7;
  max-width: 680px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.6s forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.7s forwards;
}

.skills-strip {
  margin-top: 0;
  padding: 18px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.9);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.hero-aside {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: radial-gradient(circle at 0 0, rgba(213, 213, 255, 0.2), transparent 55%),
    rgba(5, 3, 18, 0.96);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
}

.hero-aside .skills-strip {
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(6, 6, 20, 0.9);
}

.hero-aside .skills-strip + .skills-strip {
  margin-top: 4px;
}

.skills-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-soft);
  font-weight: 600;
}

.skills-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skills-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: var(--text-soft);
}

/* TryHackMe badge card */
.thm-card {
  width: min(520px, 100%);
  margin: 14px auto 22px;
  position: relative;
  display: flex;
  justify-content: center;
}

.thm-link-wrap {
  display: block;
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at 0 0, rgba(213, 213, 255, 0.18), transparent 55%), rgba(0, 0, 0, 0.7);
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.thm-embed {
  border-radius: inherit;
  overflow: hidden;
}

/* Responsive iframe: works across browsers (no aspect-ratio dependency) */
.thm-embed iframe {
  display: block;
  width: 100%;
  height: 120px;
  border: 0;
}

.thm-link-wrap:hover {
  border-color: rgba(111, 141, 255, 0.7);
  box-shadow: 0 18px 55px rgba(111, 141, 255, 0.28);
  transform: translateY(-2px);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.button-primary {
  border-radius: 999px;
  background:
    radial-gradient(circle at 0 0, rgba(140, 166, 255, 0.35), transparent 60%),
    linear-gradient(135deg, #3d58ff 0%, #8aa6ff 100%);
  color: #050312;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 14px 40px rgba(111, 141, 255, 0.42);
  position: relative;
  overflow: hidden;
}

.button-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.button-primary:hover::before {
  left: 100%;
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 55px rgba(111, 141, 255, 0.55);
}

.button-primary:active {
  transform: translateY(0);
}

.button-ghost {
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(141, 152, 255, 0.65);
  background: rgba(4, 6, 26, 0.7);
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.button-ghost:hover {
  background: rgba(10, 16, 48, 0.98);
  border-color: rgba(160, 178, 255, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(111, 141, 255, 0.3);
}

/* Sections */
.section {
  margin-top: 80px;
  opacity: 0;
  animation: fadeInUp 0.7s ease forwards;
  scroll-margin-top: 90px;
}

.section.visible {
  opacity: 1;
}

.section-header {
  margin-bottom: 40px;
  position: relative;
}

.section-header::after {
  content: "";
  position: absolute;
  bottom: -16px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.6;
}

.section-label {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 700;
}

.section-title {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  line-height: 1.2;
}

.section-description {
  font-size: 16px;
  color: var(--text-soft);
  line-height: 1.6;
  max-width: 600px;
}

/* Projects */
.project-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.project {
  border-radius: 20px;
  border: 1px solid rgba(165, 178, 255, 0.2);
  background:
    linear-gradient(135deg, rgba(10, 12, 36, 0.96), rgba(3, 4, 18, 0.98));
  backdrop-filter: blur(22px);
  padding: 28px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px);
}

.project::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transition: transform 0.5s ease;
}

.project::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(111, 141, 255, 0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.project:hover {
  border-color: rgba(111, 141, 255, 0.5);
  background: linear-gradient(135deg, rgba(14, 16, 40, 0.98) 0%, rgba(6, 8, 26, 0.99) 100%);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(111, 141, 255, 0.22), 0 0 0 1px rgba(111, 141, 255, 0.25);
}

.project:hover::before {
  transform: scaleX(1);
}

.project:hover::after {
  opacity: 1;
}

.project-media {
  margin-bottom: 20px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #050513;
  position: relative;
  transition: all 0.4s ease;
}

.project-media::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.project:hover .project-media {
  border-color: rgba(111, 141, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.project:hover .project-media::after {
  opacity: 1;
}

.project-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project:hover .project-media img {
  transform: scale(1.02);
}

.project-media img[src="purge-sniffer-teaser.png"],
.project-media img[src*="purge-sniffer-teaser"] {
  max-height: 300px;
  object-fit: contain;
  border-radius: 14px;
}

/* Hide project-media if image is broken or missing */
.project-media img[src=""],
.project-media img:not([src]) {
  display: none;
}

.project-media:empty {
  display: none;
}

/* Featured project styling */
.project:first-child {
  border-color: rgba(111, 141, 255, 0.4);
  background: linear-gradient(135deg, rgba(16, 20, 60, 0.98) 0%, rgba(10, 10, 30, 0.98) 100%);
}

.project:first-child::before {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), rgba(111, 141, 255, 0.8), transparent);
}

.project:first-child:hover {
  border-color: rgba(111, 141, 255, 0.8);
  box-shadow: 0 24px 70px rgba(111, 141, 255, 0.3), 0 0 0 1px rgba(111, 141, 255, 0.3);
}

/* Staggered entrance for projects when section becomes visible */
.section.visible .project {
  opacity: 1;
  transform: none;
}

.section.visible .project:nth-child(1) {
  transition-delay: 0.05s;
}
.section.visible .project:nth-child(2) {
  transition-delay: 0.12s;
}
.section.visible .project:nth-child(3) {
  transition-delay: 0.19s;
}
.section.visible .project:nth-child(4) {
  transition-delay: 0.26s;
}

.project-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.project-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 70%, rgba(255, 255, 255, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}

.project:hover .project-title {
  background: linear-gradient(135deg, #ffffff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.project-meta {
  font-size: 11px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.project:hover .project-meta {
  background: rgba(111, 141, 255, 0.18);
  border-color: rgba(111, 141, 255, 0.4);
  color: #dde3ff;
}

.project-body {
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.75;
  margin: 0;
}

.project-body a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.project-body a:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.project-body a::after {
  content: " →";
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.2s ease;
  display: inline-block;
}

.project-body a:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* About */
.about-card {
  border-radius: 20px;
  border: 1px solid rgba(165, 178, 255, 0.2);
  background:
    linear-gradient(135deg, rgba(9, 11, 32, 0.96), rgba(4, 4, 18, 0.98));
  backdrop-filter: blur(22px);
  padding: 32px;
  font-size: 16px;
  color: var(--text-soft);
  line-height: 1.8;
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(18px);
}

.about-card:hover {
  border-color: rgba(111, 141, 255, 0.55);
  background: var(--card-hover);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.section.visible .about-card {
  opacity: 1;
  transform: none;
  transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1) 0.05s;
}

.about-card p {
  margin: 0 0 20px;
}

.about-card p:last-child {
  margin-bottom: 0;
}

.about-card strong {
  color: var(--text);
  font-weight: 600;
}

/* Contact */
.contact-card {
  position: relative;
  border-radius: 22px;
  border: 1px solid rgba(165, 178, 255, 0.32);
  background:
    radial-gradient(circle at 0 0, rgba(140, 166, 255, 0.22), transparent 58%),
    radial-gradient(circle at 100% 100%, rgba(20, 26, 90, 0.5), transparent 60%),
    linear-gradient(145deg, rgba(6, 6, 20, 0.96), rgba(2, 2, 10, 0.98));
  backdrop-filter: blur(26px);
  padding: 28px 30px 26px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(18px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  column-gap: 32px;
  row-gap: 22px;
  overflow: hidden;
}

.contact-card:hover {
  border-color: rgba(173, 189, 255, 0.9);
  box-shadow:
    0 26px 80px rgba(5, 8, 40, 0.9),
    0 0 0 1px rgba(111, 141, 255, 0.45);
  transform: translateY(-4px);
}

.section.visible .contact-card {
  opacity: 1;
  transform: none;
  transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1) 0.05s;
}

.contact-text {
  font-size: 16px;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.7;
  grid-column: 1 / 2;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  grid-column: 2 / 3;
}

.field-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 8px;
  font-weight: 600;
}

.field-input,
.field-textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 15px;
  padding: 14px 16px;
  outline: none;
  resize: vertical;
  min-height: 48px;
  transition: all 0.3s ease;
  font-family: inherit;
}

.field-textarea {
  min-height: 120px;
}

.field-input::placeholder,
.field-textarea::placeholder {
  color: rgba(160, 160, 160, 0.6);
}

.field-input:focus,
.field-textarea:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(111, 141, 255, 0.2);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.socials-card {
  border-radius: 20px;
  border: 1px solid rgba(165, 178, 255, 0.2);
  background:
    linear-gradient(135deg, rgba(10, 12, 36, 0.96), rgba(3, 4, 18, 0.98));
  backdrop-filter: blur(22px);
  padding: 28px 28px 24px;
  margin-top: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px);
}

.socials-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.socials-card:hover {
  border-color: rgba(111, 141, 255, 0.5);
  background: linear-gradient(135deg, rgba(16, 20, 60, 0.98) 0%, rgba(6, 8, 26, 0.99) 100%);
  box-shadow: 0 16px 48px rgba(111, 141, 255, 0.24), 0 0 0 1px rgba(111, 141, 255, 0.25);
  transform: translateY(-2px);
}

.socials-card:hover::before {
  transform: scaleX(1);
}

.socials-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0 0 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.socials-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.3;
}

.socials-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.socials-link {
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  font-size: 14px;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.socials-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(111, 141, 255, 0.23), transparent);
  transition: left 0.5s ease;
}

.socials-link:hover::before {
  left: 100%;
}

.socials-link span {
  font-weight: 600;
  color: var(--text);
  position: relative;
  z-index: 1;
}

.socials-handle {
  font-weight: 400;
  color: var(--text-soft);
  font-size: 13px;
  position: relative;
  z-index: 1;
}

.socials-link:hover {
  border-color: var(--accent);
  background: rgba(111, 141, 255, 0.16);
  color: var(--text);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(111, 141, 255, 0.35);
}

.socials-link:hover .socials-handle {
  color: var(--text);
}

.section.visible .socials-card {
  opacity: 1;
  transform: none;
  transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  font-size: 12px;
  color: var(--text-soft);
  display: flex;
  justify-content: center;
  text-align: center;
}

footer span {
  max-width: 1040px;
  width: 100%;
}

footer a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 600;
}

footer a:hover {
  color: var(--text);
}

.mono {
  font-family: "JetBrains Mono", "SF Mono", "Monaco", "Consolas", monospace;
}

/* Responsive */
@media (max-width: 768px) {
  .shell-inner {
    padding: 0 20px 60px;
  }

  .nav-inner {
    padding: 12px 20px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 60px;
  }

  .thm-embed iframe {
    height: 140px;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .section {
    margin-top: 60px;
  }

  .project {
    padding: 20px;
  }

  .about-card,
  .contact-card {
    padding: 24px;
  }

  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .section-title {
    font-size: 24px;
  }
}

@media (min-width: 900px) {
  .hero {
    padding-top: 96px;
    padding-bottom: 56px;
  }

  .hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.4fr);
    align-items: flex-start;
    gap: 40px;
  }

  .hero-aside {
    margin-top: 40px;
  }

  .project-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
